Skip to content

Commit 49f4d3a

Browse files
committed
Fix debug build. Add version info.
1 parent a6699fa commit 49f4d3a

File tree

4 files changed

+38
-17
lines changed

4 files changed

+38
-17
lines changed

SerialPrograms/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2086,7 +2086,7 @@ endif()
20862086
#extract opencv_world460d.dll from archive on Windows Debug builds
20872087
if (MSVC)
20882088
if (CMAKE_BUILD_TYPE MATCHES "Debug")
2089-
file(ARCHIVE_EXTRACT INPUT ../3rdPartyBinaries/opencv_world460d.zip DESTINATION ../3rdPartyBinaries/)
2089+
file(ARCHIVE_EXTRACT INPUT ../../../3rdPartyBinaries/opencv_world460d.zip DESTINATION ../../../3rdPartyBinaries/)
20902090
endif()
20912091
endif()
20922092

SerialPrograms/Source/CommonFramework/Globals.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace PokemonAutomation{
2525
const bool IS_BETA_VERSION = true;
2626
const int PROGRAM_VERSION_MAJOR = 0;
2727
const int PROGRAM_VERSION_MINOR = 50;
28-
const int PROGRAM_VERSION_PATCH = 3;
28+
const int PROGRAM_VERSION_PATCH = 4;
2929

3030
const std::string PROGRAM_VERSION_BASE =
3131
"v" + std::to_string(PROGRAM_VERSION_MAJOR) +
@@ -52,6 +52,21 @@ const std::string PROJECT_GITHUB = "github.com/PokemonAutomation";
5252
const std::string PROJECT_GITHUB_URL = "https://github.com/PokemonAutomation/";
5353
const std::string PROJECT_SOURCE_URL = "https://github.com/PokemonAutomation/Arduino-Source/";
5454

55+
#if 0
56+
#elif __INTEL_LLVM_COMPILER
57+
const std::string COMPILER_VERSION = "ICX " + std::to_string(__VERSION__);
58+
#elif __INTEL_COMPILER
59+
const std::string COMPILER_VERSION = "ICC " + std::to_string(__INTEL_COMPILER) + "." + std::to_string(__INTEL_COMPILER_UPDATE);
60+
#elif _MSC_VER
61+
const std::string COMPILER_VERSION = "MSVC " + std::to_string(_MSC_FULL_VER);
62+
#elif __clang__
63+
const std::string COMPILER_VERSION = "Clang " + std::string(__clang_version__);
64+
#elif __GNUC__
65+
const std::string COMPILER_VERSION = "GCC " + std::to_string(__GNUC__) + "." + std::to_string(__GNUC_MINOR__);
66+
#else
67+
const std::string COMPILER_VERSION = "Unknown Compiler";
68+
#endif
69+
5570

5671
namespace{
5772

SerialPrograms/Source/CommonFramework/Globals.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ extern const std::string PROJECT_GITHUB;
2828
extern const std::string PROJECT_GITHUB_URL;
2929
extern const std::string PROJECT_SOURCE_URL;
3030

31+
extern const std::string COMPILER_VERSION;
32+
3133
const auto SERIAL_REFRESH_RATE = std::chrono::milliseconds(1000);
3234

3335
// Folder path (end with "/") to hold program setting files.

SerialPrograms/Source/CommonFramework/Windows/MainWindow.cpp

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
#include "MainWindow.h"
2323

2424

25-
#include <iostream>
26-
using std::cout;
27-
using std::endl;
25+
//#include <iostream>
26+
//using std::cout;
27+
//using std::endl;
2828

2929
namespace PokemonAutomation{
3030

@@ -119,19 +119,23 @@ MainWindow::MainWindow(QWidget* parent)
119119
connect(
120120
about, &QLabel::linkActivated,
121121
this, [](const QString&){
122+
std::string str;
123+
str += PROGRAM_NAME + " Computer-Control Programs<br>";
124+
str += "Copyright: 2020 - 2025<br>";
125+
str += "Version: " + PROGRAM_VERSION + "<br>";
126+
str += "<br>";
127+
str += "Framwork: Qt " + std::to_string(QT_VERSION_MAJOR);
128+
str += "." + std::to_string(QT_VERSION_MINOR);
129+
str += "." + std::to_string(QT_VERSION_PATCH);
130+
str += "<br>";
131+
str += "Compiler: " + COMPILER_VERSION;
132+
str += "<br><br>";
133+
str += "Made by the " + PROGRAM_NAME + " Discord Server.<br>";
134+
str += "<br>";
135+
str += "This program uses Qt and dynamically links to unmodified Qt libraries under LGPL.<br>";
136+
122137
QMessageBox box;
123-
box.information(
124-
nullptr,
125-
"About",
126-
QString::fromStdString(
127-
PROGRAM_NAME + " Computer-Control Programs (" + PROGRAM_VERSION + ")<br>" +
128-
"Copyright: 2020 - 2022<br>" +
129-
"<br>"
130-
"Made by the " + PROGRAM_NAME + " Discord Server.<br>"
131-
"<br>"
132-
"This program uses Qt and dynamically links to unmodified Qt libraries under LGPL.<br>"
133-
)
134-
);
138+
box.information(nullptr, "About", QString::fromStdString(str));
135139
}
136140
);
137141
}

0 commit comments

Comments
 (0)