Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/c++ #56

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added gui/C++Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions gui/gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ var logo []byte
//go:embed CLogo.png
var CLogo []byte

// Embed C++ logo
//
//go:embed C++Logo.png
var CPPLogo []byte

// Embed CSharp logo
//
//go:embed CSharpLogo.png
Expand Down Expand Up @@ -151,6 +156,12 @@ func Gui() {
return image
}

getCPPLogoImage := func() string {
image := base64.StdEncoding.EncodeToString(CPPLogo)

return image
}

getCSharpLogoImage := func() string {
image := base64.StdEncoding.EncodeToString(CSharpLogo)

Expand Down Expand Up @@ -209,6 +220,7 @@ func Gui() {
ui.Bind("getLogsJSON", getLogsJSON)
ui.Bind("getImage", getImage)
ui.Bind("getCLogoImage", getCLogoImage)
ui.Bind("getCPPLogoImage", getCPPLogoImage)
ui.Bind("getCSharpLogoImage", getCSharpLogoImage)
ui.Bind("getGoLogoImage", getGoLogoImage)
ui.Bind("getJavaLogoImage", getJavaLogoImage)
Expand Down
11 changes: 11 additions & 0 deletions gui/gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ function createBuildsListTable(buildsJSON) {
case "c":
image = "<img src='' alt='C Logo' class='c_logo' width='30' height='30'>"
break;
case "c++":
image = "<img src='' alt='C++ Logo' class='cpp_logo' width='30' height='30'>"
break;
case "c#":
case "csharp":
image = "<img src='' alt='C# Logo' class='csharp_logo' width='30' height='30'>"
break;
Expand Down Expand Up @@ -130,6 +134,13 @@ const renderBuildsList = async () => {
c_logos[i].src = "data:image/png;base64," + c_logo_img;
}

// C++
let cpp_logo_img = await getCPPLogoImage();
const cpp_logos = document.getElementsByClassName("cpp_logo");
for (let i = 0; i < cpp_logos.length; i++) {
cpp_logos[i].src = "data:image/png;base64," + cpp_logo_img;
}

// C#
let csharp_logo_img = await getCSharpLogoImage();
const csharp_logos = document.getElementsByClassName("csharp_logo");
Expand Down
2 changes: 1 addition & 1 deletion utils/configDerive.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func ConfigDerive() []string {
} else {
files = []string{"requirements.txt"}
}
} else if configType == "c" {
} else if configType == "c" || configType == "c++" {
if buildFile != "" {
files = []string{buildFile}
} else {
Expand Down