diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 79ca6f6deea257f5db9df1c09649ad042b1e0adc..42412c34c2c0362633c9839ec8e8a2d50bc484ad 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -24,9 +24,8 @@ "windowsSdkVersion": "10.0.19041.0", "cStandard": "c17", "cppStandard": "c++17", - "intelliSenseMode": "windows-msvc-x64", + "intelliSenseMode": "windows-msvc-x86", "mergeConfigurations": false, - "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe", "browse": { "path": [ "${workspaceFolder}/src/shared", diff --git a/CMakeLists.txt b/CMakeLists.txt index 3101d9b0326bea5126c7d8fa49acf54b2272ad3d..7a22b8b96d5222a1d9420429e83e8642adfc0821 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,6 @@ add_executable(groundstation src/shared/Core/Message/Message.cpp src/shared/Core/Message/Topic.cpp src/shared/Core/MessageBroker/MessageBroker.cpp - # src/shared/Core/MessageBroker/Subscription.cpp src/shared/Core/QCustomPlot/QCustomPlot.cpp src/shared/Core/Window/Window.cpp src/shared/Core/SkywardHubCore.cpp @@ -89,6 +88,7 @@ add_executable(groundstation src/shared/Modules/Module.cpp src/entrypoints/groundstation/application.qrc src/entrypoints/groundstation/main.cpp + src/entrypoints/groundstation/resources.rc ) target_include_directories(groundstation PRIVATE src/shared) target_link_libraries(groundstation PUBLIC @@ -118,12 +118,30 @@ if (DEFINED ENV{WIN_DEPLOY_QT}) # Execute windeployqt.exe in the binary directory after every build. # It adds all the necessary data in the directory to run the executable without external dependencies. # Reference: https://doc.qt.io/qt-5/windows-deployment.html#the-windows-deployment-tool + + add_custom_command( TARGET groundstation POST_BUILD COMMAND $ENV{WIN_DEPLOY_QT} groundstation.exe WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Running windeployqt.exe..." ) + + #add_custom_command( + # TARGET groundstation POST_BUILD + # COMMAND $ENV{WIN_DEPLOY_QT} --dir ..\\Deploy\\SkywardHub groundstation.exe + # WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + # COMMENT "Running windeployqt.exe..." + #) + + #add_custom_command( + # TARGET groundstation POST_BUILD + # COMMAND xcopy groundstation.exe ..\\Deploy\\SkywardHub\\SkywardHub.exe /f /y + # WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + # COMMENT "Deploying executable..." + #) + + endif () # For now we keep debug information on diff --git a/src/entrypoints/groundstation/resources.rc b/src/entrypoints/groundstation/resources.rc new file mode 100644 index 0000000000000000000000000000000000000000..e29ff5f821f453d763999c43527b5f9f86e793ce --- /dev/null +++ b/src/entrypoints/groundstation/resources.rc @@ -0,0 +1,43 @@ +#if defined(__MINGW64__) || defined(__MINGW32__) + // MinGW-w64, MinGW + #if defined(__has_include) && __has_include(<winres.h>) + #include <winres.h> + #else + #include <afxres.h> + #include <winresrc.h> + #endif +#else + // MSVC, Windows SDK + #include <winres.h> +#endif + +IDI_ICON1 ICON DISCARDABLE "assets\\icons\\SkywardHub.ico" + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 0,0,0,0 + PRODUCTVERSION 0,0,0,0 + FILEFLAGSMASK 0x3fL + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L + BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "" + VALUE "FileDescription", "" + VALUE "FileVersion", "0.0.0.0" + VALUE "LegalCopyright", "" + VALUE "OriginalFilename", "skywardhub.exe" + VALUE "ProductName", "skywardhub" + VALUE "ProductVersion", "0.0.0.0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1200 + END + END +/* End of Version info */ +