diff --git a/.gitattributes b/.gitattributes index 27f9a2e..c7459c5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1 @@ -# Ignore GLAD generated API files -glad.* linguist-generated \ No newline at end of file +Content/Ogre/** linguist-vendored \ No newline at end of file diff --git a/.gitignore b/.gitignore index 07bac6a..fdb5034 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,4 @@ _deps build Disassembly .vscode -Ogre.log +*.log \ No newline at end of file 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/CMakeLists.txt b/CMakeLists.txt index 4942e20..35c7c57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,6 @@ set(DEPENDENCIES_DIR ${CMAKE_SOURCE_DIR}/Dependencies) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes -Wno-return-type") # Ignore warnings generated by Luau and Qt find_package(Boost REQUIRED) -find_package(cglm REQUIRED CONFIG) find_package(OGRE REQUIRED COMPONENTS Bites CONFIG) add_subdirectory(Projects) \ No newline at end of file diff --git a/Content/RNR/fonts/OgreXMLConverter.log b/Content/RNR/fonts/OgreXMLConverter.log deleted file mode 100644 index 26e5c33..0000000 --- a/Content/RNR/fonts/OgreXMLConverter.log +++ /dev/null @@ -1,21 +0,0 @@ -17:36:32: XMLMeshSerializer reading mesh data from /home/caesium/projects/rbxnu/Content/RNR/fonts/Cube.mesh.xml... -17:36:32: Reading geometry... -17:36:32: Geometry done... -17:36:32: Reading submeshes... -17:36:32: Submeshes done. -17:36:32: Reading mesh names... -17:36:32: Mesh names done. -17:36:32: XMLMeshSerializer import successful. -17:36:32: MeshSerializer writing mesh data to stream /home/caesium/projects/rbxnu/Content/RNR/fonts/Cube.mesh... -17:36:32: File header written. -17:36:32: Writing mesh data... -17:36:32: Writing submesh... -17:36:32: Exporting submesh texture aliases... -17:36:32: Submesh texture aliases exported. -17:36:32: Submesh exported. -17:36:32: Exporting bounds information.... -17:36:32: Bounds information exported. -17:36:32: Exporting submesh name table... -17:36:32: Submesh name table exported. -17:36:32: Mesh data exported. -17:36:32: MeshSerializer export successful. diff --git a/Projects/Client/CMakeLists.txt b/Projects/Client/CMakeLists.txt index 289168d..d637df9 100644 --- a/Projects/Client/CMakeLists.txt +++ b/Projects/Client/CMakeLists.txt @@ -5,8 +5,10 @@ if(COMPILE_PLAYER OR COMPILE_STUDIO) if(LINUX) include(/usr/share/cmake/Modules/FindX11.cmake) endif() + find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets OpenGLWidgets) set(QT6_LIBRARIES_INCL Qt6::Core Qt6::Gui Qt6::Widgets Qt6::OpenGLWidgets Qt6::GuiPrivate ${X11_X11_LIB}) + add_subdirectory(Common) if(COMPILE_PLAYER) diff --git a/Projects/Client/Common/CMakeLists.txt b/Projects/Client/Common/CMakeLists.txt index bf1d3dc..6bdd7d1 100644 --- a/Projects/Client/Common/CMakeLists.txt +++ b/Projects/Client/Common/CMakeLists.txt @@ -1,22 +1,16 @@ -project(Common) - -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/Common/Header/OgreWidget.hpp b/Projects/Client/Common/Header/OgreWidget.hpp index 5f1c63c..180f9f4 100644 --- a/Projects/Client/Common/Header/OgreWidget.hpp +++ b/Projects/Client/Common/Header/OgreWidget.hpp @@ -8,7 +8,7 @@ #include #include #include -#include > +#include #include diff --git a/Projects/Client/Common/Source/OgreWidget.cpp b/Projects/Client/Common/Source/OgreWidget.cpp index 490c00b..d4efec9 100644 --- a/Projects/Client/Common/Source/OgreWidget.cpp +++ b/Projects/Client/Common/Source/OgreWidget.cpp @@ -114,6 +114,7 @@ namespace RNR Ogre::NameValuePairList options; options["externalWindowHandle"] = getWindowHandle(); + options["FSAA"] = "4"; #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE options["macAPI"] = "cocoa"; options["macAPICocoaUseNSView"] = "true"; diff --git a/Projects/Client/Player/CMakeLists.txt b/Projects/Client/Player/CMakeLists.txt index 6655941..798c405 100644 --- a/Projects/Client/Player/CMakeLists.txt +++ b/Projects/Client/Player/CMakeLists.txt @@ -1,23 +1,23 @@ -project(Player) - -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 0450c07..9b42ddc 100644 --- a/Projects/Client/Server/CMakeLists.txt +++ b/Projects/Client/Server/CMakeLists.txt @@ -1,17 +1,13 @@ -project(Server) +create_resources(Resource ${CMAKE_BINARY_DIR}/Resource/Server.hpp) -create_resources(Resource ${CMAKE_BINARY_DIR}/Resources/ServerResources.hpp) +list(APPEND SOURCE Source/main.cpp) +list(APPEND HEADER ${CMAKE_BINARY_DIR}/Resource/Server.hpp) -add_executable(Server - ${CMAKE_BINARY_DIR}/Resources/ServerResources.hpp - - Source/main.cpp -) +if(WIN32) + list(APPEND HEADER Resource/Windows/Script.rc) +endif() -add_custom_command(TARGET Server POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy -t $ $ - COMMAND_EXPAND_LISTS -) +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 2f2ddf7..28d66de 100644 --- a/Projects/Client/Studio/CMakeLists.txt +++ b/Projects/Client/Studio/CMakeLists.txt @@ -1,23 +1,23 @@ -project(Studio) - -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() { diff --git a/Projects/Engine/CMakeLists.txt b/Projects/Engine/CMakeLists.txt index 757ba33..8dd13eb 100644 --- a/Projects/Engine/CMakeLists.txt +++ b/Projects/Engine/CMakeLists.txt @@ -1,6 +1,3 @@ -project(Engine) - - add_library(Engine STATIC Header/Helpers/Name.hpp Header/Helpers/Strings.hpp @@ -38,7 +35,7 @@ add_library(Engine STATIC ) target_include_directories(Engine PUBLIC ${BOOST_INCLUDE_DIRS} Header/) -target_link_libraries(Engine PUBLIC ${BOOST_LIBRARIES} OgreBites cglm Luau.Analysis Luau.Ast Luau.Compiler Luau.VM) +target_link_libraries(Engine PUBLIC ${BOOST_LIBRARIES} OgreBites Luau.Analysis Luau.Ast Luau.Compiler Luau.VM) if(WIN32 OR MINGW) file(COPY ${CMAKE_SOURCE_DIR}/Content/win32_plugins.cfg DESTINATION ${CMAKE_BINARY_DIR}) diff --git a/Projects/Engine/Header/Rendering/Adorn.hpp b/Projects/Engine/Header/Rendering/Adorn.hpp index e83f9ac..071ae97 100644 --- a/Projects/Engine/Header/Rendering/Adorn.hpp +++ b/Projects/Engine/Header/Rendering/Adorn.hpp @@ -2,8 +2,6 @@ #include -#include - #include namespace RNR