diff --git a/CMake/CreateResources.cmake b/CMake/CreateResources.cmake index 96f27f6..e4419d7 100644 --- a/CMake/CreateResources.cmake +++ b/CMake/CreateResources.cmake @@ -1,6 +1,6 @@ function(create_resources directory output) file(WRITE ${output} "#include \n\n") - file(GLOB bins ${directory}/*) + file(GLOB bins "${directory}/*.png") # Add other file types if necessary foreach(bin ${bins}) string(REGEX MATCH "([^/]+)$" filename ${bin}) diff --git a/Projects/Client/Common/CMakeLists.txt b/Projects/Client/Common/CMakeLists.txt index bfedaf6..6bdd7d1 100644 --- a/Projects/Client/Common/CMakeLists.txt +++ b/Projects/Client/Common/CMakeLists.txt @@ -1,20 +1,16 @@ -qt_standard_project_setup() -qt_add_library(Common STATIC - Header/GL/Adorn.hpp - Header/GL/RenderContext.hpp - Header/OgreWidget.hpp - +list(APPEND SOURCE Source/GL/Adorn.cpp Source/OgreWidget.cpp ) -if(WIN32) - add_custom_command(TARGET Common POST_BUILD - COMMAND ${TOOL_WINDEPLOYQT} - $ - COMMENT "Running windeployqt..." - ) -endif() +list(APPEND HEADER + Header/GL/Adorn.hpp + Header/GL/RenderContext.hpp + Header/OgreWidget.hpp +) + +qt_standard_project_setup() +qt_add_library(Common STATIC ${SOURCE} ${HEADER}) target_include_directories(Common PUBLIC Header) target_link_libraries(Common PUBLIC ${QT6_LIBRARIES_INCL} Engine) \ No newline at end of file diff --git a/Projects/Client/Player/CMakeLists.txt b/Projects/Client/Player/CMakeLists.txt index e37bb16..798c405 100644 --- a/Projects/Client/Player/CMakeLists.txt +++ b/Projects/Client/Player/CMakeLists.txt @@ -1,21 +1,23 @@ -create_resources(Resource ${CMAKE_BINARY_DIR}/Resources/PlayerResources.hpp) +create_resources(Resource ${CMAKE_BINARY_DIR}/Resource/Player.hpp) set(CMAKE_AUTOMOC ON) -qt_add_executable(Player - ${CMAKE_BINARY_DIR}/Resources/PlayerResources.hpp - - Header/MainWindow.hpp - +list(APPEND SOURCE Source/main.cpp Source/MainWindow.cpp ) -add_custom_command(TARGET Player POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy -t $ $ - COMMAND_EXPAND_LISTS +list(APPEND HEADER + ${CMAKE_BINARY_DIR}/Resource/Player.hpp + Header/MainWindow.hpp ) +if(WIN32) + list(APPEND HEADER Resource/Windows/Script.rc) +endif() + +qt_add_executable(Player ${SOURCE} ${HEADER}) + target_include_directories(Player PRIVATE Header) target_link_libraries(Player PRIVATE Common Engine) diff --git a/Projects/Client/Player/Header/MainWindow.hpp b/Projects/Client/Player/Header/MainWindow.hpp index aec09ff..d309363 100644 --- a/Projects/Client/Player/Header/MainWindow.hpp +++ b/Projects/Client/Player/Header/MainWindow.hpp @@ -2,6 +2,8 @@ #include +#include "Resource/Player.hpp" + class MainWindow : public QMainWindow { Q_OBJECT diff --git a/Projects/Client/Player/Resource/Windows/Icon.ico b/Projects/Client/Player/Resource/Windows/Icon.ico new file mode 100644 index 0000000..edf7d61 Binary files /dev/null and b/Projects/Client/Player/Resource/Windows/Icon.ico differ diff --git a/Projects/Client/Player/Resource/Windows/Information.h b/Projects/Client/Player/Resource/Windows/Information.h new file mode 100644 index 0000000..c678e1a --- /dev/null +++ b/Projects/Client/Player/Resource/Windows/Information.h @@ -0,0 +1,22 @@ +#pragma once + +#define VERSION_MAJOR_MINOR_STR "1.0" +#define VERSION_MAJOR_MINOR_PATCH_STR "1.0.0" +#define VERSION_FULL_STR "1.0.0.0" +#define VERSION_RESOURCE 1, 0, 0, 0 +#define VERSION_RESOURCE_STR VERSION_FULL_STR "\0" + +/* + * These properties are part of VarFileInfo. + * PRODUCT_LANGUAGE is also the resource file's recognizer (but still shares the same value.) + * For more information, please see: https://learn.microsoft.com/en-us/windows/win32/menurc/varfileinfo-block + */ +#define PRODUCT_LANGUAGE 0x0409 // en-US +#define PRODUCT_CHARSET 1200 // Unicode + +#define APP_ICON "Icon.ico" + +#define APP_NAME "RNR Player\0" +#define APP_DESCRIPTION "RNR's Not Roblox\0" +#define APP_ORGANIZATION "Legacy Roblox Reverse Engineers\0" +#define APP_COPYRIGHT "This program is licensed under the GNU General Public License v3.0.\0" \ No newline at end of file diff --git a/Projects/Client/Player/Resource/Windows/Script.rc b/Projects/Client/Player/Resource/Windows/Script.rc new file mode 100644 index 0000000..dd45a93 --- /dev/null +++ b/Projects/Client/Player/Resource/Windows/Script.rc @@ -0,0 +1,49 @@ +#include "Information.h" + +#if defined(__MINGW64__) || defined(__MINGW32__) + // MinGW-w64, MinGW + #if defined(__has_include) && __has_include() + #include + #else + #include + #include + #endif +#else + // MSVC, Windows SDK + #include +#endif + +IDI_ICON1 ICON APP_ICON + +LANGUAGE PRODUCT_LANGUAGE, SUBLANG_DEFAULT + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION_RESOURCE + PRODUCTVERSION VERSION_RESOURCE + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", APP_ORGANIZATION + VALUE "FileDescription", APP_DESCRIPTION + VALUE "FileVersion", VERSION_RESOURCE_STR + VALUE "LegalCopyright", APP_COPYRIGHT + VALUE "ProductName", APP_NAME + VALUE "ProductVersion", VERSION_RESOURCE_STR + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", PRODUCT_LANGUAGE, PRODUCT_CHARSET + END +END \ No newline at end of file diff --git a/Projects/Client/Player/Source/MainWindow.cpp b/Projects/Client/Player/Source/MainWindow.cpp index 6d84c9e..744d25e 100644 --- a/Projects/Client/Player/Source/MainWindow.cpp +++ b/Projects/Client/Player/Source/MainWindow.cpp @@ -1,7 +1,5 @@ #include -#include "Resources/PlayerResources.hpp" - MainWindow::MainWindow() { QPixmap pixmap = QPixmap(); diff --git a/Projects/Client/Server/CMakeLists.txt b/Projects/Client/Server/CMakeLists.txt index abed4f4..9b42ddc 100644 --- a/Projects/Client/Server/CMakeLists.txt +++ b/Projects/Client/Server/CMakeLists.txt @@ -1,15 +1,13 @@ -create_resources(Resource ${CMAKE_BINARY_DIR}/Resources/ServerResources.hpp) +create_resources(Resource ${CMAKE_BINARY_DIR}/Resource/Server.hpp) -add_executable(Server - ${CMAKE_BINARY_DIR}/Resources/ServerResources.hpp - - Source/main.cpp -) +list(APPEND SOURCE Source/main.cpp) +list(APPEND HEADER ${CMAKE_BINARY_DIR}/Resource/Server.hpp) -add_custom_command(TARGET Server POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy -t $ $ - COMMAND_EXPAND_LISTS -) +if(WIN32) + list(APPEND HEADER Resource/Windows/Script.rc) +endif() + +add_executable(Server ${SOURCE} ${HEADER}) target_include_directories(Server PRIVATE Header) target_link_libraries(Server PRIVATE Engine) \ No newline at end of file diff --git a/Projects/Client/Server/Resource/Windows/Icon.ico b/Projects/Client/Server/Resource/Windows/Icon.ico new file mode 100644 index 0000000..c6e9215 Binary files /dev/null and b/Projects/Client/Server/Resource/Windows/Icon.ico differ diff --git a/Projects/Client/Server/Resource/Windows/Information.h b/Projects/Client/Server/Resource/Windows/Information.h new file mode 100644 index 0000000..420e92d --- /dev/null +++ b/Projects/Client/Server/Resource/Windows/Information.h @@ -0,0 +1,22 @@ +#pragma once + +#define VERSION_MAJOR_MINOR_STR "1.0" +#define VERSION_MAJOR_MINOR_PATCH_STR "1.0.0" +#define VERSION_FULL_STR "1.0.0.0" +#define VERSION_RESOURCE 1, 0, 0, 0 +#define VERSION_RESOURCE_STR VERSION_FULL_STR "\0" + +/* + * These properties are part of VarFileInfo. + * PRODUCT_LANGUAGE is also the resource file's recognizer (but still shares the same value.) + * For more information, please see: https://learn.microsoft.com/en-us/windows/win32/menurc/varfileinfo-block + */ +#define PRODUCT_LANGUAGE 0x0409 // en-US +#define PRODUCT_CHARSET 1200 // Unicode + +#define APP_ICON "Icon.ico" + +#define APP_NAME "RNR Server\0" +#define APP_DESCRIPTION "RNR's Not Roblox\0" +#define APP_ORGANIZATION "Legacy Roblox Reverse Engineers\0" +#define APP_COPYRIGHT "This program is licensed under the GNU General Public License v3.0.\0" \ No newline at end of file diff --git a/Projects/Client/Server/Resource/Windows/Script.rc b/Projects/Client/Server/Resource/Windows/Script.rc new file mode 100644 index 0000000..dd45a93 --- /dev/null +++ b/Projects/Client/Server/Resource/Windows/Script.rc @@ -0,0 +1,49 @@ +#include "Information.h" + +#if defined(__MINGW64__) || defined(__MINGW32__) + // MinGW-w64, MinGW + #if defined(__has_include) && __has_include() + #include + #else + #include + #include + #endif +#else + // MSVC, Windows SDK + #include +#endif + +IDI_ICON1 ICON APP_ICON + +LANGUAGE PRODUCT_LANGUAGE, SUBLANG_DEFAULT + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION_RESOURCE + PRODUCTVERSION VERSION_RESOURCE + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", APP_ORGANIZATION + VALUE "FileDescription", APP_DESCRIPTION + VALUE "FileVersion", VERSION_RESOURCE_STR + VALUE "LegalCopyright", APP_COPYRIGHT + VALUE "ProductName", APP_NAME + VALUE "ProductVersion", VERSION_RESOURCE_STR + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", PRODUCT_LANGUAGE, PRODUCT_CHARSET + END +END \ No newline at end of file diff --git a/Projects/Client/Studio/CMakeLists.txt b/Projects/Client/Studio/CMakeLists.txt index c1bbf3a..28d66de 100644 --- a/Projects/Client/Studio/CMakeLists.txt +++ b/Projects/Client/Studio/CMakeLists.txt @@ -1,21 +1,23 @@ -create_resources(Resource ${CMAKE_BINARY_DIR}/Resources/StudioResources.hpp) +create_resources(Resource ${CMAKE_BINARY_DIR}/Resource/Studio.hpp) set(CMAKE_AUTOMOC ON) -qt_add_executable(Studio - ${CMAKE_BINARY_DIR}/Resources/StudioResources.hpp - - Header/MainWindow.hpp - +list(APPEND SOURCE Source/main.cpp Source/MainWindow.cpp ) -add_custom_command(TARGET Studio POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy -t $ $ - COMMAND_EXPAND_LISTS +list(APPEND HEADER + ${CMAKE_BINARY_DIR}/Resource/Studio.hpp + Header/MainWindow.hpp ) +if(WIN32) + list(APPEND HEADER Resource/Windows/Script.rc) +endif() + +qt_add_executable(Studio ${SOURCE} ${HEADER}) + target_include_directories(Studio PRIVATE Header) target_link_libraries(Studio PRIVATE Common Engine) diff --git a/Projects/Client/Studio/Header/MainWindow.hpp b/Projects/Client/Studio/Header/MainWindow.hpp index 7b42c0e..e118989 100644 --- a/Projects/Client/Studio/Header/MainWindow.hpp +++ b/Projects/Client/Studio/Header/MainWindow.hpp @@ -7,9 +7,15 @@ #include #include #include +#include +#include +#include +#include #include +#include "Resource/Studio.hpp" + class MainWindow : public QMainWindow { Q_OBJECT diff --git a/Projects/Client/Studio/Resource/Windows/Icon.ico b/Projects/Client/Studio/Resource/Windows/Icon.ico new file mode 100644 index 0000000..317aed1 Binary files /dev/null and b/Projects/Client/Studio/Resource/Windows/Icon.ico differ diff --git a/Projects/Client/Studio/Resource/Windows/Information.h b/Projects/Client/Studio/Resource/Windows/Information.h new file mode 100644 index 0000000..5c1eaa7 --- /dev/null +++ b/Projects/Client/Studio/Resource/Windows/Information.h @@ -0,0 +1,22 @@ +#pragma once + +#define VERSION_MAJOR_MINOR_STR "1.0" +#define VERSION_MAJOR_MINOR_PATCH_STR "1.0.0" +#define VERSION_FULL_STR "1.0.0.0" +#define VERSION_RESOURCE 1, 0, 0, 0 +#define VERSION_RESOURCE_STR VERSION_FULL_STR "\0" + +/* + * These properties are part of VarFileInfo. + * PRODUCT_LANGUAGE is also the resource file's recognizer (but still shares the same value.) + * For more information, please see: https://learn.microsoft.com/en-us/windows/win32/menurc/varfileinfo-block + */ +#define PRODUCT_LANGUAGE 0x0409 // en-US +#define PRODUCT_CHARSET 1200 // Unicode + +#define APP_ICON "Icon.ico" + +#define APP_NAME "RNR Studio\0" +#define APP_DESCRIPTION "RNR's Not Roblox\0" +#define APP_ORGANIZATION "Legacy Roblox Reverse Engineers\0" +#define APP_COPYRIGHT "This program is licensed under the GNU General Public License v3.0.\0" \ No newline at end of file diff --git a/Projects/Client/Studio/Resource/Windows/Script.rc b/Projects/Client/Studio/Resource/Windows/Script.rc new file mode 100644 index 0000000..dd45a93 --- /dev/null +++ b/Projects/Client/Studio/Resource/Windows/Script.rc @@ -0,0 +1,49 @@ +#include "Information.h" + +#if defined(__MINGW64__) || defined(__MINGW32__) + // MinGW-w64, MinGW + #if defined(__has_include) && __has_include() + #include + #else + #include + #include + #endif +#else + // MSVC, Windows SDK + #include +#endif + +IDI_ICON1 ICON APP_ICON + +LANGUAGE PRODUCT_LANGUAGE, SUBLANG_DEFAULT + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION_RESOURCE + PRODUCTVERSION VERSION_RESOURCE + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", APP_ORGANIZATION + VALUE "FileDescription", APP_DESCRIPTION + VALUE "FileVersion", VERSION_RESOURCE_STR + VALUE "LegalCopyright", APP_COPYRIGHT + VALUE "ProductName", APP_NAME + VALUE "ProductVersion", VERSION_RESOURCE_STR + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", PRODUCT_LANGUAGE, PRODUCT_CHARSET + END +END \ No newline at end of file diff --git a/Projects/Client/Studio/Source/MainWindow.cpp b/Projects/Client/Studio/Source/MainWindow.cpp index a5cadd6..06d6920 100644 --- a/Projects/Client/Studio/Source/MainWindow.cpp +++ b/Projects/Client/Studio/Source/MainWindow.cpp @@ -1,11 +1,4 @@ #include -#include -#include -#include -#include - - -#include "Resources/StudioResources.hpp" MainWindow::MainWindow() {