├── .gitignore ├── .travis.yml ├── CMakeLists.txt ├── LICENSE ├── README.md ├── build-unix.sh ├── cmake ├── FindEasyFind.cmake ├── addToBinDir.cmake ├── common.cmake ├── searchDependencies.cmake └── variables.cmake ├── config ├── Achievement_Locked.png ├── Achievement_Unlocked.png ├── Config.h.in ├── RSAKey.h ├── ServerConfig.h.in ├── Spine.ico ├── Spine_Version.xml ├── changelog.xml ├── icon.rc ├── qt.conf └── setup.nsi.in ├── copyright ├── Qt LICENSE ├── boost LICENSE ├── clockUtils LICENSE ├── gtest LICENSE ├── m2etis LICENSE └── openSSL LICENSE ├── css ├── dark_theme_for_spine_app.css ├── monokai.css └── styles.css ├── dependencies ├── build-boost.bat ├── build-boost.sh ├── build-clockUtils.bat ├── build-clockUtils.sh ├── build-common.bat ├── build-common.sh ├── build-dependencies.bat ├── build-dependencies.sh ├── build-discord.bat ├── build-discord.sh ├── build-gmock.bat ├── build-gmock.sh ├── build-mariadb.bat ├── build-mariadb.sh ├── build-openSSL.bat ├── build-simplewebserver.bat ├── build-simplewebserver.sh ├── build-sqlite.bat ├── build-sqlite.sh ├── build-tinyxml.bat ├── build-tinyxml.sh ├── build-translator.bat ├── build-translator.sh ├── build-zipper.bat ├── build-zipper.sh ├── build-zlib.bat └── build-zlib.sh ├── ext └── patches │ ├── SimpleWebServer │ ├── client_http.patch │ └── server_http.patch │ ├── boost │ ├── user-config-AndroidLinux.jam │ └── user-config-AndroidWindows.jam │ └── sqlite3 │ ├── Android.mk │ └── Application.mk ├── include ├── api │ ├── API.h │ ├── APIMessage.h │ ├── Friends.h │ ├── Gamepad.h │ ├── Multiplayer.h │ ├── Statistics.h │ └── zString.h ├── client │ ├── DatabaseFilterModel.h │ ├── DirValidator.h │ ├── FontAwesome.h │ ├── IconCache.h │ ├── InstallMode.h │ ├── LibraryFilterModel.h │ ├── ManagementCommon.h │ ├── MissingMetadataChecker.h │ ├── ReportGenerator.h │ ├── RtfToHtmlConverter.h │ ├── SavegameManager.h │ ├── ScreenshotManager.h │ ├── SteamProcess.h │ ├── Uninstaller.h │ ├── UrlProtocolHandler.h │ ├── launcher │ │ ├── GameLauncher.h │ │ ├── Gothic1And2Launcher.h │ │ ├── Gothic1Launcher.h │ │ ├── Gothic2Launcher.h │ │ ├── Gothic3Launcher.h │ │ ├── ILauncher.h │ │ └── LauncherFactory.h │ ├── models │ │ ├── CustomStatisticsModel.h │ │ └── SpineEditorModel.h │ └── widgets │ │ ├── AboutDialog.h │ │ ├── AchievementInfoView.h │ │ ├── AchievementOrientationPreview.h │ │ ├── AchievementSpineSettingsWidget.h │ │ ├── AchievementView.h │ │ ├── AddFriendDialog.h │ │ ├── AutoUpdateDialog.h │ │ ├── CenteredIconDelegate.h │ │ ├── ChangelogDialog.h │ │ ├── DeveloperSettingsWidget.h │ │ ├── DownloadProgressDialog.h │ │ ├── ExportDialog.h │ │ ├── FAQDialog.h │ │ ├── FAQEntry.h │ │ ├── FeedbackDialog.h │ │ ├── FriendRequestView.h │ │ ├── FriendsListView.h │ │ ├── FriendsView.h │ │ ├── GameSettingsWidget.h │ │ ├── GamepadSpineSettingsWidget.h │ │ ├── GeneralSettingsWidget.h │ │ ├── GeneralSpineSettingsWidget.h │ │ ├── Gothic1IniWidget.h │ │ ├── Gothic2IniWidget.h │ │ ├── HiddenAchievementsView.h │ │ ├── ImportDialog.h │ │ ├── IniConfigurator.h │ │ ├── InstallGothic2FromCDDialog.h │ │ ├── IntegrityCheckDialog.h │ │ ├── LeGoSpineSettingsWidget.h │ │ ├── LibraryListView.h │ │ ├── LocationSettingsWidget.h │ │ ├── LoginDialog.h │ │ ├── MainWindow.h │ │ ├── ManagementDialog.h │ │ ├── ModDatabaseView.h │ │ ├── ModInfoPage.h │ │ ├── ModInfoView.h │ │ ├── ModUpdateDialog.h │ │ ├── NewsWidget.h │ │ ├── NewsWriterDialog.h │ │ ├── ProfileModView.h │ │ ├── ProfileView.h │ │ ├── ProjectInfoBoxWidget.h │ │ ├── RatingWidget.h │ │ ├── ReviewWidget.h │ │ ├── SavegameDialog.h │ │ ├── ScoreSpineSettingsWidget.h │ │ ├── SettingsDialog.h │ │ ├── SpineEditor.h │ │ ├── SpineLevelRankingWidget.h │ │ ├── StartPageWidget.h │ │ ├── SubmitCompatibilityDialog.h │ │ ├── SurveyDialog.h │ │ ├── SystempackIniWidget.h │ │ ├── UninstallDialog.h │ │ ├── UpdateLanguage.h │ │ ├── gothic2IniPages │ │ ├── ControlsPage.h │ │ ├── EnginePage.h │ │ ├── GamePage.h │ │ ├── PerformancePage.h │ │ ├── SoundPage.h │ │ ├── VideoPage.h │ │ └── VisualizationPage.h │ │ ├── gothicIniPages │ │ ├── ControlsPage.h │ │ ├── EnginePage.h │ │ ├── GamePage.h │ │ ├── PerformancePage.h │ │ ├── SoundPage.h │ │ ├── VideoPage.h │ │ └── VisualizationPage.h │ │ ├── management │ │ ├── AchievementWidget.h │ │ ├── AchievementsWidget.h │ │ ├── CustomStatisticsWidget.h │ │ ├── EnterChangelogDialog.h │ │ ├── GeneralConfigurationWidget.h │ │ ├── IManagementWidget.h │ │ ├── ModFilesWidget.h │ │ ├── ScoresWidget.h │ │ ├── StatisticsWidget.h │ │ ├── SurveyAnswersWidget.h │ │ ├── SurveyEditWidget.h │ │ ├── SurveyEntryWidget.h │ │ ├── SurveyWidget.h │ │ └── UserManagementWidget.h │ │ └── systempackIniPages │ │ ├── GamePage.h │ │ └── SystemPage.h ├── common │ ├── Encryption.h │ ├── GameType.h │ ├── Language.h │ ├── MessageStructs.h │ ├── MessageTypes.h │ ├── Mod.h │ ├── ModType.h │ ├── ModVersion.h │ ├── NewsTickerTypes.h │ ├── ProjectPrivileges.h │ ├── ProjectStats.h │ ├── ScoreOrder.h │ ├── SpineModules.h │ ├── TeamPrivileges.h │ ├── TranslationModel.h │ └── UserPrivileges.h ├── discord │ └── DiscordManager.h ├── gui │ ├── DontShowAgainDialog.h │ ├── DownloadEntryWidget.h │ ├── DownloadQueueWidget.h │ ├── FullscreenPreview.h │ ├── OverlayMessageHandler.h │ ├── ReportContentDialog.h │ ├── Spoiler.h │ └── WaitSpinner.h ├── https │ └── Https.h ├── input │ └── KeyMapping.h ├── security │ └── Hash.h ├── server │ ├── Cleanup.h │ ├── DatabaseCreator.h │ ├── DatabaseMigrator.h │ ├── DatabaseServer.h │ ├── DownloadSizeChecker.h │ ├── FileSynchronizer.h │ ├── GMPServer.h │ ├── LanguageConverter.h │ ├── ManagementServer.h │ ├── MariaDBWrapper.h │ ├── MatchmakingServer.h │ ├── RamChecker.h │ ├── Server.h │ ├── ServerCommon.h │ ├── Smtp.h │ ├── SpineLevel.h │ ├── StatsCollector.h │ ├── TranslatorServer.h │ └── UploadServer.h ├── translator │ ├── AccessRightsDialog.h │ ├── ApplyTranslationDialog.h │ ├── GothicParser.h │ ├── TranslationApplier.h │ ├── TranslationRequestDialog.h │ ├── TranslationWidget.h │ ├── TranslatorAPI.h │ └── TranslatorDialog.h └── utils │ ├── Compression.h │ ├── Config.h │ ├── Conversion.h │ ├── Database.h │ ├── DownloadQueue.h │ ├── ErrorReporting.h │ ├── FileDownloader.h │ ├── FileLogger.h │ ├── GothicVdf.h │ ├── Hashing.h │ ├── ImageMerger.h │ ├── LanguageConverter.h │ ├── ModUpdate.h │ ├── MultiFileDownloader.h │ └── WindowsExtensions.h ├── installer ├── CMakeLists.txt └── Windows │ ├── CWGames.nsh │ ├── English.nsh │ ├── German.nsh │ ├── Gothic2-Addon-Setup.bat │ ├── Gothic2-Setup.bat │ ├── MoveFileFolder.nsh │ ├── Polish.nsh │ ├── makeSymlink.bat │ ├── removeSymlink.bat │ └── setup.ini ├── languages ├── de_DE.ts ├── en_US.ts ├── es_ES.ts ├── po_PO.ts └── ru_RU.ts ├── media └── Spine.vdf ├── scriptApi ├── CMakeLists.txt ├── Changelog.txt ├── Spine.src ├── Spine_API.d ├── Spine_Achievements.d ├── Spine_Constants.d ├── Spine_Friends.d ├── Spine_Gamepad.d ├── Spine_Message.d ├── Spine_Multiplayer.d ├── Spine_OverallSave.d ├── Spine_Scores.d ├── Spine_Statistics.d ├── Spine_Statistics_UserDefined.d ├── Spine_TestMode.d ├── Spine_UserConstants.d └── Spine_Utils.d ├── src ├── CMakeLists.txt ├── api │ ├── API.cpp │ ├── APIMessage.cpp │ ├── CMakeLists.txt │ ├── Friends.cpp │ ├── Gamepad.cpp │ ├── Multiplayer.cpp │ ├── Statistics.cpp │ └── zString.cpp ├── argumentPrinter │ ├── CMakeLists.txt │ └── main.cpp ├── cleanup │ ├── CMakeLists.txt │ ├── main.cpp │ └── resources │ │ ├── Lato-Semibold.ttf │ │ └── resources.qrc ├── client │ ├── CMakeLists.txt │ ├── DatabaseFilterModel.cpp │ ├── DirValidator.cpp │ ├── IconCache.cpp │ ├── LibraryFilterModel.cpp │ ├── ManagementCommon.cpp │ ├── MissingMetadataChecker.cpp │ ├── ReportGenerator.cpp │ ├── RtfToHtmlConverter.cpp │ ├── SavegameManager.cpp │ ├── ScreenshotManager.cpp │ ├── SteamProcess.cpp │ ├── Uninstaller.cpp │ ├── UrlProtocolHandler.cpp │ ├── launcher │ │ ├── GameLauncher.cpp │ │ ├── Gothic1And2Launcher.cpp │ │ ├── Gothic1Launcher.cpp │ │ ├── Gothic2Launcher.cpp │ │ ├── Gothic3Launcher.cpp │ │ ├── ILauncher.cpp │ │ └── LauncherFactory.cpp │ ├── main.cpp │ ├── models │ │ ├── CustomStatisticsModel.cpp │ │ └── SpineEditorModel.cpp │ ├── resources │ │ ├── ClockworkOrigins_Logo.png │ │ ├── Gothic.ico │ │ ├── Gothic2.ico │ │ ├── Lato-Semibold.ttf │ │ ├── Patreon.jpg │ │ ├── Patreon_hover.jpg │ │ ├── SpineSplash.png │ │ ├── donate.png │ │ ├── donate_hover.png │ │ ├── fontawesome-webfont.ttf │ │ ├── invalidFileChars.txt │ │ ├── languages │ │ │ ├── de-DE.png │ │ │ ├── en-US.png │ │ │ ├── pl-PL.png │ │ │ └── ru-RU.png │ │ ├── resources.qrc │ │ ├── stylesheet-branch-closed.png │ │ ├── stylesheet-branch-open.png │ │ └── svg │ │ │ ├── add.svg │ │ │ ├── check.svg │ │ │ ├── close.svg │ │ │ ├── download.svg │ │ │ ├── edit.svg │ │ │ ├── flag.svg │ │ │ ├── loading.svg │ │ │ ├── remove.svg │ │ │ ├── star-edit-full.svg │ │ │ ├── star-edit.svg │ │ │ ├── star-full.svg │ │ │ ├── star-half.svg │ │ │ └── star.svg │ └── widgets │ │ ├── AboutDialog.cpp │ │ ├── AchievementInfoView.cpp │ │ ├── AchievementOrientationPreview.cpp │ │ ├── AchievementSpineSettingsWidget.cpp │ │ ├── AchievementView.cpp │ │ ├── AddFriendDialog.cpp │ │ ├── AutoUpdateDialog.cpp │ │ ├── CenteredIconDelegate.cpp │ │ ├── ChangelogDialog.cpp │ │ ├── DeveloperSettingsWidget.cpp │ │ ├── DownloadProgressDialog.cpp │ │ ├── ExportDialog.cpp │ │ ├── FAQDialog.cpp │ │ ├── FAQEntry.cpp │ │ ├── FeedbackDialog.cpp │ │ ├── FriendRequestView.cpp │ │ ├── FriendsListView.cpp │ │ ├── FriendsView.cpp │ │ ├── GameSettingsWidget.cpp │ │ ├── GamepadSpineSettingsWidget.cpp │ │ ├── GeneralSettingsWidget.cpp │ │ ├── GeneralSpineSettingsWidget.cpp │ │ ├── Gothic1IniWidget.cpp │ │ ├── Gothic2IniWidget.cpp │ │ ├── HiddenAchievementsView.cpp │ │ ├── ImportDialog.cpp │ │ ├── IniConfigurator.cpp │ │ ├── InstallGothic2FromCDDialog.cpp │ │ ├── IntegrityCheckDialog.cpp │ │ ├── LeGoSpineSettingsWidget.cpp │ │ ├── LibraryListView.cpp │ │ ├── LocationSettingsWidget.cpp │ │ ├── LoginDialog.cpp │ │ ├── MainWindow.cpp │ │ ├── ManagementDialog.cpp │ │ ├── ModDatabaseView.cpp │ │ ├── ModInfoPage.cpp │ │ ├── ModInfoView.cpp │ │ ├── ModUpdateDialog.cpp │ │ ├── NewsWidget.cpp │ │ ├── NewsWriterDialog.cpp │ │ ├── ProfileModView.cpp │ │ ├── ProfileView.cpp │ │ ├── ProjectInfoBoxWidget.cpp │ │ ├── RatingWidget.cpp │ │ ├── ReviewWidget.cpp │ │ ├── SavegameDialog.cpp │ │ ├── ScoreSpineSettingsWidget.cpp │ │ ├── SettingsDialog.cpp │ │ ├── SpineEditor.cpp │ │ ├── SpineLevelRankingWidget.cpp │ │ ├── StartPageWidget.cpp │ │ ├── SubmitCompatibilityDialog.cpp │ │ ├── SurveyDialog.cpp │ │ ├── SystempackIniWidget.cpp │ │ ├── UninstallDialog.cpp │ │ ├── gothic2IniPages │ │ ├── ControlsPage.cpp │ │ ├── EnginePage.cpp │ │ ├── GamePage.cpp │ │ ├── PerformancePage.cpp │ │ ├── SoundPage.cpp │ │ ├── VideoPage.cpp │ │ └── VisualizationPage.cpp │ │ ├── gothicIniPages │ │ ├── ControlsPage.cpp │ │ ├── EnginePage.cpp │ │ ├── GamePage.cpp │ │ ├── PerformancePage.cpp │ │ ├── SoundPage.cpp │ │ ├── VideoPage.cpp │ │ └── VisualizationPage.cpp │ │ ├── management │ │ ├── AchievementWidget.cpp │ │ ├── AchievementsWidget.cpp │ │ ├── CustomStatisticsWidget.cpp │ │ ├── EnterChangelogDialog.cpp │ │ ├── GeneralConfigurationWidget.cpp │ │ ├── ModFilesWidget.cpp │ │ ├── ScoresWidget.cpp │ │ ├── StatisticsWidget.cpp │ │ ├── SurveyAnswersWidget.cpp │ │ ├── SurveyEditWidget.cpp │ │ ├── SurveyEntryWidget.cpp │ │ ├── SurveyWidget.cpp │ │ └── UserManagementWidget.cpp │ │ └── systempackIniPages │ │ ├── GamePage.cpp │ │ └── SystemPage.cpp ├── common │ ├── CMakeLists.txt │ ├── Encryption.cpp │ ├── MessageStructs.cpp │ └── TranslationModel.cpp ├── databaseAdder │ ├── CMakeLists.txt │ └── main.cpp ├── discord │ ├── CMakeLists.txt │ └── DiscordManager.cpp ├── g2oChecker │ ├── CMakeLists.txt │ └── main.cpp ├── gui │ ├── CMakeLists.txt │ ├── DontShowAgainDialog.cpp │ ├── DownloadEntryWidget.cpp │ ├── DownloadQueueWidget.cpp │ ├── FullscreenPreview.cpp │ ├── OverlayMessageHandler.cpp │ ├── ReportContentDialog.cpp │ ├── Spoiler.cpp │ └── WaitSpinner.cpp ├── hashEvaluator │ ├── CMakeLists.txt │ └── main.cpp ├── https │ ├── CMakeLists.txt │ └── Https.cpp ├── imageResizer │ ├── CMakeLists.txt │ └── main.cpp ├── input │ ├── CMakeLists.txt │ └── KeyMapping.cpp ├── keyWrapper │ ├── CMakeLists.txt │ └── main.cpp ├── modChecker │ ├── CMakeLists.txt │ └── main.cpp ├── modCheckerListCreator │ ├── CMakeLists.txt │ └── main.cpp ├── multiHasher │ ├── CMakeLists.txt │ └── main.cpp ├── referenceFinder │ ├── CMakeLists.txt │ └── main.cpp ├── security │ ├── CMakeLists.txt │ └── Hash.cpp ├── server │ ├── CMakeLists.txt │ ├── Cleanup.cpp │ ├── DatabaseCreator.cpp │ ├── DatabaseMigrator.cpp │ ├── DatabaseServer.cpp │ ├── DownloadSizeChecker.cpp │ ├── FileSynchronizer.cpp │ ├── GMPServer.cpp │ ├── LanguageConverter.cpp │ ├── ManagementServer.cpp │ ├── MariaDBWrapper.cpp │ ├── MatchmakingServer.cpp │ ├── RamChecker.cpp │ ├── Server.cpp │ ├── ServerCommon.cpp │ ├── Smtp.cpp │ ├── SpineLevel.cpp │ ├── StatsCollector.cpp │ ├── TranslatorServer.cpp │ ├── UploadServer.cpp │ └── main.cpp ├── takeFinder │ ├── CMakeLists.txt │ └── main.cpp ├── tests │ ├── CMakeLists.txt │ ├── main.cpp │ ├── resources │ │ ├── SpineTest.mod │ │ ├── test1 │ │ │ ├── dialogs.txt │ │ │ ├── names.txt │ │ │ ├── test.d │ │ │ └── texts.txt │ │ ├── test2 │ │ │ ├── dialogs.txt │ │ │ ├── names.txt │ │ │ ├── test.d │ │ │ └── texts.txt │ │ ├── test3 │ │ │ ├── dialogs.txt │ │ │ ├── names.txt │ │ │ ├── test.d │ │ │ └── texts.txt │ │ ├── test4 │ │ │ ├── dialogs.txt │ │ │ ├── names.txt │ │ │ ├── test.d │ │ │ └── texts.txt │ │ └── test5 │ │ │ ├── dialogs.txt │ │ │ ├── names.txt │ │ │ ├── test.d │ │ │ └── texts.txt │ ├── test_GothicParser.cpp │ └── test_GothicVdf.cpp ├── translator │ ├── AccessRightsDialog.cpp │ ├── ApplyTranslationDialog.cpp │ ├── CMakeLists.txt │ ├── GothicParser.cpp │ ├── TranslationApplier.cpp │ ├── TranslationRequestDialog.cpp │ ├── TranslationWidget.cpp │ ├── TranslatorAPI.cpp │ └── TranslatorDialog.cpp ├── ttsCreator │ ├── CMakeLists.txt │ └── main.cpp ├── unusedIDFinder │ ├── CMakeLists.txt │ └── main.cpp ├── utils │ ├── CMakeLists.txt │ ├── Compression.cpp │ ├── Config.cpp │ ├── Database.cpp │ ├── DownloadQueue.cpp │ ├── ErrorReporting.cpp │ ├── FileDownloader.cpp │ ├── FileLogger.cpp │ ├── GothicVdf.cpp │ ├── Hashing.cpp │ ├── ImageMerger.cpp │ ├── LanguageConverter.cpp │ ├── MultiFileDownloader.cpp │ ├── WindowsExtensions.cpp │ ├── g1.txt │ ├── g2.txt │ └── resources.qrc ├── variableChecker │ ├── CMakeLists.txt │ └── main.cpp └── zipper │ ├── CMakeLists.txt │ └── main.cpp └── tutorials ├── CMakeLists.txt ├── Erfolge.tex ├── Friends.tex ├── Gamepad.tex ├── Initialization.tex ├── Multiplayer.tex ├── OverallSave.tex ├── Scores.tex ├── header.tex └── tutorial_template.tex /.gitignore: -------------------------------------------------------------------------------- 1 | dependencies/msvc* 2 | dependencies/tmp 3 | ext/RSAKey.h 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | os: 2 | - linux 3 | language: cpp 4 | matrix: 5 | include: 6 | - os: linux 7 | compiler: 8 | - gcc 9 | - clang 10 | addons: 11 | apt: 12 | update: true 13 | sources: 14 | - ubuntu-toolchain-r-test 15 | - ppa:ubuntu-sdk-team/ppa 16 | packages: 17 | - qt*5-dev 18 | - libqt5svg5* 19 | - unrar 20 | - g++-6 21 | - gcc-6 22 | script: ./build-unix.sh 23 | -------------------------------------------------------------------------------- /build-unix.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | g++ --version 4 | clang --version 5 | qmake --version 6 | 7 | mkdir build 8 | cd build 9 | cmake -DWITH_CLIENT=ON -DWITH_SERVER=ON -DWITH_TOOLS=ON -DWITH_CONSOLE=OFF -DWITH_TRANSLATOR=ON -DTEST_CONFIG=ON -DCMAKE_BUILD_TYPE=Release .. 10 | make 11 | cd bin 12 | ./UnitTester 13 | -------------------------------------------------------------------------------- /cmake/common.cmake: -------------------------------------------------------------------------------- 1 | function(LINK_TO_FILE sourceFile destinationFile) 2 | FILE(TO_NATIVE_PATH "${sourceFile}" sourceFileNative) 3 | FILE(TO_NATIVE_PATH "${destinationFile}" destinationFileNative) 4 | 5 | IF(NOT EXISTS "${destinationFileNative}") 6 | IF(WIN32) 7 | execute_process(COMMAND cmd /C mklink "${destinationFileNative}" "${sourceFileNative}") 8 | ELSE() 9 | execute_process(COMMAND ln -sfn "${sourceFileNative}" "${destinationFileNative}") 10 | ENDIF() 11 | ENDIF() 12 | endfunction() 13 | 14 | function(LINK_TO_FOLDER sourceFolder destinationFolder) 15 | FILE(TO_NATIVE_PATH "${sourceFolder}" sourceFolderNative) 16 | FILE(TO_NATIVE_PATH "${destinationFolder}" destinationFolderNative) 17 | 18 | IF(NOT EXISTS "${destinationFolderNative}") 19 | IF(WIN32) 20 | execute_process(COMMAND cmd /C mklink /d "${destinationFolderNative}" "${sourceFolderNative}") 21 | ELSE() 22 | execute_process(COMMAND ln -sfn "${sourceFolderNative}" "${destinationFolderNative}") 23 | ENDIF() 24 | ENDIF() 25 | endfunction() 26 | -------------------------------------------------------------------------------- /config/Achievement_Locked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/config/Achievement_Locked.png -------------------------------------------------------------------------------- /config/Achievement_Unlocked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/config/Achievement_Unlocked.png -------------------------------------------------------------------------------- /config/ServerConfig.h.in: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | const uint16_t SERVER_PORT = @SERVER_PORT@; 7 | const uint16_t MPSERVER_PORT = 19185; 8 | const uint16_t LOCAL_PORT = 19181; 9 | const uint16_t SPINE_ROOT_PORT = 19182; 10 | const uint16_t SPINE_LOCAL_PORT = 19183; 11 | const uint16_t SPINE_MP_PORT = 19186; 12 | const uint16_t GAMEPAD_PORT = 19187; 13 | const uint16_t UPLOADSERVER_PORT = @UPLOADSERVER_PORT@; 14 | const uint16_t DATABASESERVER_PORT = @DATABASESERVER_PORT@; 15 | const uint16_t MANAGEMENTSERVER_PORT = @MANAGEMENTSERVER_PORT@; 16 | const uint16_t TRANSLATORSERVER_PORT = 19190; 17 | 18 | const uint8_t VERSION_MAJOR = @VERSION_MAJOR@; 19 | const uint8_t VERSION_MINOR = @VERSION_MINOR@; 20 | const uint8_t VERSION_PATCH = @VERSION_PATCH@; 21 | const std::string VERSION_STRING = "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@"; 22 | 23 | const std::string DATABASEUSER = "@DATABASEUSER@"; 24 | const std::string DATABASEPASSWORD = "@DATABASEPASSWORD@"; 25 | const std::string ACCOUNTSDATABASE = "@ACCOUNTSDATABASE@"; 26 | const std::string SPINEDATABASE = "@SPINEDATABASE@"; 27 | const std::string EWDATABASE = "@EWDATABASE@"; 28 | const std::string EW2DATABASE = "@EW2DATABASE@"; 29 | const std::string TRI6DATABASE = "@TRI6DATABASE@"; 30 | 31 | const std::string SSLCHAINPATH = "@SSLCHAINPATH@"; 32 | const std::string SSLPRIVKEYNPATH = "@SSLPRIVKEYNPATH@"; 33 | 34 | const std::string DEEPLKEY = "@DEEPLKEY@"; 35 | 36 | const std::string DISCORDWEBAPIURL = "@DISCORDWEBAPIURL@"; 37 | -------------------------------------------------------------------------------- /config/Spine.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/config/Spine.ico -------------------------------------------------------------------------------- /config/icon.rc: -------------------------------------------------------------------------------- 1 | IDI_ICON1 ICON DISCARDABLE "Spine.ico" -------------------------------------------------------------------------------- /config/qt.conf: -------------------------------------------------------------------------------- 1 | [Paths] 2 | Plugins=plugins -------------------------------------------------------------------------------- /config/setup.nsi.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/config/setup.nsi.in -------------------------------------------------------------------------------- /copyright/Qt LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/copyright/Qt LICENSE -------------------------------------------------------------------------------- /copyright/boost LICENSE: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /copyright/gtest LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2008, Google Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following disclaimer 12 | in the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /dependencies/build-boost.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(readlink "$(dirname "${0}")")" 4 | 5 | . ./build-common.sh ${1} 6 | 7 | ARCHIVE="boost_1_62_0.tar.bz2" 8 | BUILD_DIR="${BUILD_ROOT}/boost_1_62_0" 9 | PREFIX="${DEP_OUT_DIR}/boost/" 10 | PREFIX=$(printf %q "$PREFIX") 11 | 12 | if [ -d "${PREFIX}" ]; then 13 | exit 0 14 | fi 15 | 16 | title "Compile Boost" 17 | 18 | status "Extracting Boost" 19 | 20 | downloadAndUnpack ${ARCHIVE} 21 | 22 | status "Configuring Boost" 23 | 24 | cd "${BUILD_DIR}" 25 | ./bootstrap.sh --prefix="${PREFIX}" --with-libraries=date_time,filesystem,iostreams,regex,serialization,system,thread 26 | 27 | status "Building & Installing Boost" 28 | 29 | ./bjam -d2 \ 30 | --toolset=${C_COMPILER} \ 31 | cxxflags=-fPIC \ 32 | -j ${CPU_CORES} \ 33 | variant=release \ 34 | --layout=system \ 35 | threading=multi \ 36 | link=static \ 37 | install >/dev/null 38 | 39 | status "Cleaning up" 40 | 41 | cd "${DEP_DIR}" 42 | rm -rf "${BUILD_ROOT}" 43 | 44 | -------------------------------------------------------------------------------- /dependencies/build-clockUtils.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | 3 | IF "%1" == "build" (goto build) 4 | 5 | call build-common.bat %1 %2 6 | 7 | echo "Extracting clockUtils" 8 | 9 | Set ARCHIVE=clockutils-1.2.1-src.zip 10 | Set BUILD_DIR=%TMP_DIR%/clockutils-1.2.1-src 11 | 12 | call build-common.bat downloadAndUnpack %ARCHIVE% %BUILD_DIR% http://clockwork-origins.de/clockUtils/downloads/ 13 | 14 | cd %DEP_DIR% 15 | 16 | call build-clockUtils.bat build Debug 17 | call build-clockUtils.bat build Release 18 | 19 | cd %DEP_DIR% 20 | RD /S /Q "%TMP_DIR%" 21 | 22 | EXIT /B 23 | 24 | :build 25 | 26 | Set PREFIX=%DEP_DIR%/%ARCH_DIR%/clockUtils/%2 27 | 28 | IF EXIST %PREFIX% EXIT /B 29 | 30 | echo "Compile clockUtils" 31 | 32 | echo "Configuring clockUtils" 33 | 34 | IF EXIST "%BUILD_DIR%\spineBuild" RD /S / Q "%BUILD_DIR%\spineBuild" 35 | 36 | mkdir "%BUILD_DIR%\spineBuild" 37 | 38 | pushd "%BUILD_DIR%\spineBuild" 39 | 40 | cmake -DWITH_TESTING=OFF -DWITH_LIBRARY_ARGPARSER=OFF -DWITH_LIBRARY_COMPRESSION=ON -DWITH_LIBRARY_CONTAINER=OFF -DWITH_LIBRARY_INIPARSER=OFF -DWITH_LIBRARY_LOG=ON -DWITH_LIBRARY_SOCKETS=ON -DCLOCKUTILS_BUILD_SHARED=OFF -DCMAKE_INSTALL_PREFIX=%PREFIX% -G "%VSCOMPILER%" -A "%VSARCH%" .. 41 | 42 | echo "Building clockUtils" 43 | 44 | cmake --build . --config %2 45 | 46 | echo "Installing clockUtils" 47 | 48 | cmake --build . --config %2 --target install 49 | 50 | echo "Cleaning up" 51 | 52 | popd 53 | -------------------------------------------------------------------------------- /dependencies/build-clockUtils.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(readlink "$(dirname "${0}")")" 4 | 5 | . ./build-common.sh ${1} 6 | 7 | ARCHIVE="clockutils-1.2.0-src.zip" 8 | BUILD_DIR="${BUILD_ROOT}/clockutils-1.2.0-src" 9 | PREFIX="${DEP_OUT_DIR}/clockUtils/" 10 | 11 | if [ -d "${PREFIX}" ]; then 12 | exit 0 13 | fi 14 | 15 | title "Compile clockUtils" 16 | 17 | status "Extracting clockUtils" 18 | 19 | downloadAndUnpack ${ARCHIVE} http://clockwork-origins.de/clockUtils/downloads/ 20 | 21 | status "Configuring clockUtils" 22 | 23 | cd "${BUILD_DIR}" 24 | cmake \ 25 | -DWITH_TESTING=OFF \ 26 | -DWITH_LIBRARY_ARGPARSER=OFF \ 27 | -DWITH_LIBRARY_COMPRESSION=ON \ 28 | -DWITH_LIBRARY_CONTAINER=OFF \ 29 | -DWITH_LIBRARY_INIPARSER=OFF \ 30 | -DWITH_LIBRARY_LOG=ON \ 31 | -DWITH_LIBRARY_SOCKETS=ON \ 32 | -DCLOCKUTILS_BUILD_SHARED=OFF \ 33 | -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ 34 | -DCMAKE_BUILD_TYPE=Release \ 35 | -DCMAKE_C_COMPILER=${C_COMPILER} \ 36 | -DCMAKE_CXX_COMPILER=${CXX_COMPILER} \ 37 | . 38 | 39 | status "Building clockUtils" 40 | 41 | make -j ${CPU_CORES} 42 | 43 | status "Installing clockUtils" 44 | 45 | make install 46 | 47 | status "Cleaning up" 48 | 49 | cd "${DEP_DIR}" 50 | rm -rf "${BUILD_ROOT}" 51 | 52 | -------------------------------------------------------------------------------- /dependencies/build-dependencies.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | 3 | call build-clockUtils.bat %1 %2 4 | call build-gmock.bat %1 %2 5 | call build-mariadb.bat %1 %2 6 | call build-openSSL.bat %1 %2 7 | call build-sqlite.bat %1 %2 8 | call build-tinyxml.bat %1 %2 9 | call build-zlib.bat %1 %2 10 | call build-boost.bat %1 %2 11 | call build-simplewebserver.bat %1 %2 12 | -------------------------------------------------------------------------------- /dependencies/build-dependencies.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | . ./build-clockUtils.sh ${1} 6 | . ./build-gmock.sh ${1} 7 | . ./build-mariadb.sh ${1} 8 | . ./build-sqlite.sh ${1} 9 | . ./build-tinyxml.sh ${1} 10 | . ./build-zlib.sh ${1} 11 | . ./build-boost.sh ${1} 12 | . ./build-simplewebserver.sh ${1} 13 | -------------------------------------------------------------------------------- /dependencies/build-discord.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | 3 | call build-common.bat %1 %2 4 | 5 | Set ARCHIVE=discord_game_sdk.zip 6 | Set BUILD_DIR=%TMP_DIR%/ 7 | Set PREFIX=%DEP_DIR%/%ARCH_DIR%/Discord 8 | 9 | IF EXIST %PREFIX% EXIT /B 10 | 11 | echo "Compile Discord" 12 | 13 | echo "Extracting Discord" 14 | 15 | call build-common.bat downloadAndUnpack %ARCHIVE% %BUILD_DIR% https://dl-game-sdk.discordapp.net/3.2.1/ 16 | 17 | echo "Configuring Discord" 18 | 19 | mkdir "%PREFIX%" 20 | mkdir "%PREFIX%\include" 21 | mkdir "%PREFIX%\lib" 22 | mkdir "%PREFIX%\src" 23 | 24 | IF [%VSSOLUTIONARCH%] == [Win32] ( 25 | SET ARCHFOLDER=x86 26 | ) 27 | 28 | IF [%VSSOLUTIONARCH%] == [x64] ( 29 | SET ARCHFOLDER=x86_64 30 | ) 31 | 32 | xcopy /S /Y "%BUILD_DIR%\cpp\*.h" "%PREFIX%\include\" 33 | xcopy /S /Y "%BUILD_DIR%\cpp\*.cpp" "%PREFIX%\src\" 34 | xcopy /F "%BUILD_DIR%/lib/%ARCHFOLDER%/discord_game_sdk.dll" "%PREFIX%/lib/discord_game_sdk.dll*" 35 | xcopy /F "%BUILD_DIR%/lib/%ARCHFOLDER%/discord_game_sdk.dll.lib" "%PREFIX%/lib/discord_game_sdk.dll.lib*" 36 | 37 | echo "Cleaning up" 38 | 39 | cd %DEP_DIR% 40 | RD /S /Q "%TMP_DIR%" 41 | -------------------------------------------------------------------------------- /dependencies/build-discord.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(readlink "$(dirname "${0}")")" 4 | 5 | . ./build-common.sh ${1} 6 | 7 | ARCHIVE="discord_game_sdk.zip" 8 | BUILD_DIR="${BUILD_ROOT}/" 9 | PREFIX="${DEP_OUT_DIR}/Discord/" 10 | 11 | if [ -d "${PREFIX}" ]; then 12 | exit 0 13 | fi 14 | 15 | title "Compile Discord" 16 | 17 | status "Extracting Discord" 18 | 19 | rm -rf "${BUILD_DIR}" 20 | 21 | downloadAndUnpack ${ARCHIVE} https://dl-game-sdk.discordapp.net/latest 22 | 23 | mkdir -p "${PREFIX}" 24 | mkdir -p "${PREFIX}include" 25 | mkdir -p "${PREFIX}lib" 26 | mkdir -p "${PREFIX}src" 27 | 28 | cp ${BUILD_DIR}cpp/*.h "${PREFIX}include/" 29 | cp ${BUILD_DIR}cpp/*.cpp "${PREFIX}src/" 30 | cp ${BUILD_DIR}lib/x86_64/discord_game_sdk.so "${PREFIX}lib/" 31 | 32 | chmod 755 "${PREFIX}lib/*.so" 33 | 34 | status "Cleaning up" 35 | 36 | cd "${DEP_DIR}" 37 | #rm -rf "${BUILD_ROOT}" 38 | 39 | -------------------------------------------------------------------------------- /dependencies/build-gmock.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | 3 | IF "%1" == "build" (goto build) 4 | 5 | call build-common.bat %1 %2 6 | 7 | echo "Extracting GoogleMock with GoogleTest" 8 | 9 | Set ARCHIVE=release-1.10.0.zip 10 | Set BUILD_DIR=%TMP_DIR%/googletest-release-1.10.0 11 | 12 | call build-common.bat downloadAndUnpack %ARCHIVE% %BUILD_DIR% https://github.com/google/googletest/archive/ 13 | 14 | cd %DEP_DIR% 15 | 16 | call build-gmock.bat build Debug 17 | call build-gmock.bat build Release 18 | 19 | cd %DEP_DIR% 20 | RD /S /Q "%TMP_DIR%" 21 | 22 | EXIT /B 23 | 24 | :build 25 | 26 | Set PREFIX=%DEP_DIR%/%ARCH_DIR%/gmock/%2 27 | 28 | IF EXIST %PREFIX% EXIT /B 29 | 30 | echo "Compile GoogleMock with GoogleTest" 31 | 32 | echo "Configuring GoogleMock with GoogleTest" 33 | 34 | IF EXIST "%BUILD_DIR%\spineBuild" RD /S / Q "%BUILD_DIR%\spineBuild" 35 | 36 | mkdir "%BUILD_DIR%\spineBuild" 37 | 38 | pushd "%BUILD_DIR%\spineBuild" 39 | 40 | cmake -DCMAKE_INSTALL_PREFIX=%PREFIX% -DBUILD_SHARED_LIBS=ON -G "%VSCOMPILER%" -A "%VSARCH%" .. 41 | 42 | echo "Building GoogleMock with GoogleTest" 43 | 44 | cmake --build . --config %2 45 | 46 | echo "Installing GoogleMock with GoogleTest" 47 | 48 | cmake --build . --config %2 --target install 49 | 50 | echo "Cleaning up" 51 | 52 | popd 53 | -------------------------------------------------------------------------------- /dependencies/build-gmock.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(readlink "$(dirname "${0}")")" 4 | 5 | . ./build-common.sh ${1} 6 | 7 | ARCHIVE="gmock-1.7.0.zip" 8 | BUILD_DIR="${BUILD_ROOT}/gmock-1.7.0" 9 | PREFIX="${DEP_OUT_DIR}/gmock/" 10 | 11 | if [ -d "${PREFIX}" ]; then 12 | exit 0 13 | fi 14 | 15 | title "Compile GoogleMock with GoogleTest" 16 | 17 | status "Extracting GoogleMock with GoogleTest" 18 | 19 | downloadAndUnpack ${ARCHIVE} 20 | 21 | status "Configuring GoogleMock with GoogleTest" 22 | 23 | cd "${BUILD_DIR}" 24 | cmake \ 25 | -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ 26 | -DCMAKE_BUILD_TYPE=Release \ 27 | -DCMAKE_C_COMPILER=${C_COMPILER} \ 28 | -DCMAKE_CXX_COMPILER=${CXX_COMPILER} \ 29 | . 30 | 31 | status "Building GoogleMock with GoogleTest" 32 | 33 | make -j ${CPU_CORES} 34 | 35 | status "Installing GoogleMock with GoogleTest" 36 | 37 | mkdir -p "${PREFIX}/lib" 38 | cp libgmock.a "${PREFIX}/lib" 39 | cp gtest/libgtest.a "${PREFIX}/lib" 40 | cp libgmock_main.a "${PREFIX}/lib" 41 | cp gtest/libgtest_main.a "${PREFIX}/lib" 42 | cp -R include "${PREFIX}" 43 | cp -R gtest/include "${PREFIX}" 44 | 45 | status "Cleaning up" 46 | 47 | cd "${DEP_DIR}" 48 | rm -rf "${BUILD_ROOT}" 49 | 50 | -------------------------------------------------------------------------------- /dependencies/build-mariadb.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | 3 | call build-common.bat %1 %2 4 | 5 | Set ARCHIVE=v3.2.5.zip 6 | Set BUILD_DIR=%TMP_DIR%/mariadb-connector-c-3.2.5 7 | Set PREFIX=%DEP_DIR%/%ARCH_DIR%/mariadb 8 | 9 | IF EXIST %PREFIX% EXIT /B 10 | 11 | echo "Compile MariaDB" 12 | 13 | echo "Extracting MariaDB" 14 | 15 | call build-common.bat downloadAndUnpack %ARCHIVE% %BUILD_DIR% https://github.com/mariadb-corporation/mariadb-connector-c/archive/refs/tags/ 16 | 17 | echo "Configuring MariaDB" 18 | 19 | cd %BUILD_DIR% 20 | cmake -DCMAKE_INSTALL_PREFIX=%PREFIX% -G "%VSCOMPILER%" -A "%VSARCH%" . 21 | 22 | echo "Building MariaDB" 23 | 24 | MSBuild.exe mariadb-connector-c.sln /m:%NUMBER_OF_PROCESSORS% /p:Configuration=Release /p:Platform=%VSSOLUTIONARCH% 25 | 26 | echo "Installing MariaDB" 27 | 28 | MSBuild.exe INSTALL.vcxproj /p:Configuration=Release /p:Platform=%VSSOLUTIONARCH% 29 | mkdir "%PREFIX%/include" 30 | mkdir "%PREFIX%/include/mariadb" 31 | mkdir "%PREFIX%/lib" 32 | xcopy /S /Y "%BUILD_DIR%\include" "%PREFIX%\include\mariadb" 33 | xcopy /S /Y "%BUILD_DIR%\libmariadb\Release" "%PREFIX%\lib" 34 | 35 | echo "Cleaning up" 36 | 37 | cd %DEP_DIR% 38 | RD /S /Q "%TMP_DIR%" 39 | -------------------------------------------------------------------------------- /dependencies/build-mariadb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(readlink "$(dirname "${0}")")" 4 | 5 | . ./build-common.sh ${1} 6 | 7 | ARCHIVE="mariadb-connector-c-2.3.1.tar.gz" 8 | BUILD_DIR="${BUILD_ROOT}/mariadb-connector-c-2.3.1" 9 | PREFIX="${DEP_OUT_DIR}/mariadb" 10 | 11 | if [ -d "${PREFIX}" ]; then 12 | exit 0 13 | fi 14 | 15 | title "Compile MariaDB" 16 | 17 | status "Extracting MariaDB" 18 | 19 | downloadAndUnpack ${ARCHIVE} 20 | 21 | status "Configuring MariaDB" 22 | 23 | cd "${BUILD_DIR}" 24 | cmake \ 25 | -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ 26 | -DCMAKE_BUILD_TYPE=Release \ 27 | -DCMAKE_C_COMPILER=${C_COMPILER} \ 28 | -DCMAKE_CXX_COMPILER=${CXX_COMPILER} \ 29 | . 30 | 31 | status "Building MariaDB" 32 | 33 | make -j ${CPU_CORES} 34 | 35 | status "Installing MariaDB" 36 | 37 | make install 38 | 39 | status "Cleaning up" 40 | 41 | cd "${DEP_DIR}" 42 | rm -rf "${BUILD_ROOT}" 43 | cd "${PREFIX}" 44 | cp lib/mariadb/* lib/ 45 | cd "${DEP_DIR}" 46 | 47 | -------------------------------------------------------------------------------- /dependencies/build-openSSL.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | 3 | call build-common.bat %1 %2 4 | 5 | Set ARCHIVE=openssl-1.1.1g.tar.gz 6 | Set BUILD_DIR=%TMP_DIR%\openssl-1.1.1g 7 | Set PREFIX=%DEP_DIR%\%ARCH_DIR%\openSSL\ 8 | 9 | IF EXIST %PREFIX% EXIT /B 10 | 11 | echo "Compile OpenSSL" 12 | 13 | echo "Extracting OpenSSL" 14 | 15 | call build-common.bat downloadAndUnpack %ARCHIVE% %BUILD_DIR% https://www.openssl.org/source/ 16 | 17 | echo "Configuring OpenSSL" 18 | 19 | pushd %BUILD_DIR% 20 | 21 | IF [%BOOSTARCH%] == [32] ( 22 | perl Configure VC-WIN32 no-asm shared --prefix=%PREFIX% 23 | ) 24 | IF [%BOOSTARCH%] == [64] ( 25 | perl Configure VC-WIN64A no-asm shared --prefix=%PREFIX% 26 | ) 27 | 28 | echo "Building OpenSSL" 29 | 30 | nmake 31 | nmake install 32 | 33 | echo "Installing OpenSSL" 34 | 35 | echo "Cleaning up" 36 | 37 | popd 38 | 39 | cd %DEP_DIR% 40 | RD /S /Q "%TMP_DIR%" 41 | 42 | -------------------------------------------------------------------------------- /dependencies/build-simplewebserver.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | 3 | call build-common.bat %1 %2 4 | 5 | Set ARCHIVE=Simple-Web-Server-3.0.0-rc2.zip 6 | Set BUILD_DIR=%TMP_DIR%/Simple-Web-Server-3.0.0-rc2 7 | Set PREFIX=%DEP_DIR%/%ARCH_DIR%/SimpleWebServer 8 | 9 | IF EXIST %PREFIX% EXIT /B 10 | 11 | echo "Compile SimpleWebServer" 12 | 13 | echo "Extracting SimpleWebServer" 14 | 15 | call build-common.bat downloadAndUnpack %ARCHIVE% %BUILD_DIR% 16 | 17 | echo "Configuring SimpleWebServer" 18 | 19 | cd %BUILD_DIR% 20 | cmake -DBOOST_ROOT=%DEP_DIR%/%ARCH_DIR%/boost/Release -DOPENSSL_ROOT_DIR=%DEP_DIR%/%ARCH_DIR%/openssl -DCMAKE_INSTALL_PREFIX=%PREFIX% -G "%VSCOMPILER%" -A "%VSARCH%" . 21 | 22 | echo "Building SimpleWebServer" 23 | 24 | MSBuild.exe Simple-Web-Server.sln /m:%NUMBER_OF_PROCESSORS% /p:Configuration=Release /p:Platform=%VSSOLUTIONARCH% 25 | 26 | echo "Installing SimpleWebServer" 27 | 28 | MSBuild.exe INSTALL.vcxproj /p:Configuration=Release /p:Platform=%VSSOLUTIONARCH% 29 | 30 | echo "Cleaning up" 31 | 32 | cd %DEP_DIR% 33 | RD /S /Q "%TMP_DIR%" 34 | 35 | patch.exe -u %PREFIX%/include/simple-web-server/client_http.hpp %DEP_DIR%/../ext/patches/SimpleWebServer/client_http.patch 36 | patch.exe -u %PREFIX%/include/simple-web-server/server_http.hpp %DEP_DIR%/../ext/patches/SimpleWebServer/server_http.patch 37 | -------------------------------------------------------------------------------- /dependencies/build-simplewebserver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(readlink "$(dirname "${0}")")" 4 | 5 | . ./build-common.sh ${1} 6 | 7 | ARCHIVE="Simple-Web-Server-3.0.0-rc2.zip" 8 | BUILD_DIR="${BUILD_ROOT}/Simple-Web-Server-3.0.0-rc2" 9 | PREFIX="${DEP_OUT_DIR}/SimpleWebServer/" 10 | 11 | if [ -d "${PREFIX}" ]; then 12 | exit 0 13 | fi 14 | 15 | title "Compile SimpleWebServer" 16 | 17 | status "Extracting SimpleWebServer" 18 | 19 | downloadAndUnpack ${ARCHIVE} 20 | 21 | status "Configuring SimpleWebServer" 22 | 23 | cd "${BUILD_DIR}" 24 | cmake \ 25 | -DBoost_DIR="${DEP_OUT_DIR}/boost" \ 26 | -DBoost_INCLUDE_DIR="${DEP_OUT_DIR}/boost/include" \ 27 | -DOPENSSL_ROOT_DIR="${DEP_OUT_DIR}/openssl" \ 28 | -DOPENSSL_INCLUDE_DIR="${DEP_OUT_DIR}/openssl/include" \ 29 | -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ 30 | -DCMAKE_BUILD_TYPE=Release \ 31 | -DCMAKE_C_COMPILER=${C_COMPILER} \ 32 | -DCMAKE_CXX_COMPILER=${CXX_COMPILER} \ 33 | . 34 | 35 | status "Building SimpleWebServer" 36 | 37 | make -j ${CPU_CORES} 38 | 39 | status "Installing SimpleWebServer" 40 | 41 | make install 42 | 43 | status "Cleaning up" 44 | 45 | cd "${DEP_DIR}" 46 | rm -rf "${BUILD_ROOT}" 47 | 48 | -------------------------------------------------------------------------------- /dependencies/build-sqlite.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | 3 | call build-common.bat %1 %2 4 | 5 | Set ARCHIVE=sqlite-amalgamation-3240000.zip 6 | Set BUILD_DIR=%TMP_DIR%/sqlite-amalgamation-3240000 7 | Set PREFIX=%DEP_DIR%/%ARCH_DIR%/sqlite 8 | 9 | IF EXIST %PREFIX% EXIT /B 10 | 11 | echo "Compile SQLite" 12 | 13 | echo "Extracting SQLite" 14 | 15 | call build-common.bat downloadAndUnpack %ARCHIVE% %BUILD_DIR% 16 | 17 | echo "Building SQLite" 18 | 19 | cd %BUILD_DIR% 20 | cl /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "SQLITE_EXPORTS" /DSQLITE_API=__declspec(dllexport) /D "_WINDLL" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /EHsc /nologo /D_USRDLL sqlite3.c /link /DLL /OUT:sqlite3.dll /IMPLIB:sqlite3.lib 21 | if %errorlevel% gtr 0 exit /b 22 | 23 | echo "Installing SQLite" 24 | 25 | mkdir "%PREFIX%" 26 | mkdir "%PREFIX%/bin" 27 | mkdir "%PREFIX%/lib" 28 | mkdir "%PREFIX%/include" 29 | 30 | move sqlite3.h %PREFIX%/include/sqlite3.h 31 | move sqlite3ext.h %PREFIX%/include/sqlite3ext.h 32 | move sqlite3.dll %PREFIX%/bin/sqlite3.dll 33 | move sqlite3.lib %PREFIX%/lib/sqlite3.lib 34 | 35 | echo "Cleaning up" 36 | 37 | cd %DEP_DIR% 38 | RD /S /Q "%TMP_DIR%" 39 | 40 | -------------------------------------------------------------------------------- /dependencies/build-sqlite.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(readlink "$(dirname "${0}")")" 4 | 5 | . ./build-common.sh ${1} 6 | 7 | ARCHIVE="sqlite-amalgamation-3240000.zip" 8 | BUILD_DIR="${BUILD_ROOT}/sqlite-amalgamation-3240000" 9 | PREFIX="${DEP_OUT_DIR}/sqlite/" 10 | 11 | if [ -d "${PREFIX}" ]; then 12 | exit 0 13 | fi 14 | 15 | title "Compile SQLite" 16 | 17 | status "Extracting SQLite" 18 | 19 | downloadAndUnpack ${ARCHIVE} 20 | 21 | status "Building SQLite" 22 | 23 | cd "${BUILD_DIR}" 24 | ${C_COMPILER} -O3 -DNDEBUG -o libsqlite3.so sqlite3.c -shared -lpthread -ldl -fPIC 25 | ${C_COMPILER} -O3 -DNDEBUG -o sqlite3 sqlite3.c shell.c -lpthread -ldl 26 | 27 | status "Installing SQLite" 28 | 29 | mkdir -p "${PREFIX}/include" 30 | mkdir -p "${PREFIX}/bin" 31 | mkdir -p "${PREFIX}/lib" 32 | 33 | cp ${BUILD_DIR}/*.h "${PREFIX}/include" 34 | cp ${BUILD_DIR}/*.so "${PREFIX}/lib" 35 | cp sqlite3 "${PREFIX}/bin" 36 | 37 | status "Cleaning up" 38 | 39 | cd "${DEP_DIR}" 40 | rm -rf "${BUILD_ROOT}" 41 | 42 | -------------------------------------------------------------------------------- /dependencies/build-tinyxml.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | 3 | IF "%1" == "build" (goto build) 4 | 5 | call build-common.bat %1 %2 6 | 7 | echo "Extracting tinyxml2" 8 | 9 | Set ARCHIVE=tinyxml2-4.0.1.zip 10 | Set BUILD_DIR=%TMP_DIR%/tinyxml2-4.0.1 11 | 12 | call build-common.bat downloadAndUnpack %ARCHIVE% %BUILD_DIR% 13 | 14 | cd %DEP_DIR% 15 | 16 | call build-tinyxml.bat build Debug 17 | call build-tinyxml.bat build Release 18 | 19 | cd %DEP_DIR% 20 | RD /S /Q "%TMP_DIR%" 21 | 22 | EXIT /B 23 | 24 | :build 25 | 26 | Set PREFIX=%DEP_DIR%/%ARCH_DIR%/tinyxml2/%2 27 | 28 | IF EXIST %PREFIX% EXIT /B 29 | 30 | echo "Compile tinyxml2" 31 | 32 | echo "Configuring tinyxml2" 33 | 34 | IF EXIST "%BUILD_DIR%\spineBuild" RD /S / Q "%BUILD_DIR%\spineBuild" 35 | 36 | mkdir "%BUILD_DIR%\spineBuild" 37 | 38 | pushd "%BUILD_DIR%\spineBuild" 39 | 40 | cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DCMAKE_INSTALL_PREFIX=%PREFIX% -G "%VSCOMPILER%" -A "%VSARCH%" .. 41 | 42 | echo "Building tinyxml2" 43 | 44 | cmake --build . --config %2 45 | 46 | echo "Installing tinyxml2" 47 | 48 | cmake --build . --config %2 --target install 49 | 50 | echo "Cleaning up" 51 | 52 | popd 53 | 54 | -------------------------------------------------------------------------------- /dependencies/build-tinyxml.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(readlink "$(dirname "${0}")")" 4 | 5 | . ./build-common.sh ${1} 6 | 7 | ARCHIVE="tinyxml2-4.0.1.zip" 8 | BUILD_DIR="${BUILD_ROOT}/tinyxml2-4.0.1" 9 | PREFIX="${DEP_OUT_DIR}/tinyxml2/" 10 | 11 | if [ -d "${PREFIX}" ]; then 12 | exit 0 13 | fi 14 | 15 | title "Compile tinyxml2" 16 | 17 | status "Extracting tinyxml2" 18 | 19 | downloadAndUnpack ${ARCHIVE} 20 | 21 | status "Configuring tinyxml2" 22 | 23 | cd "${BUILD_DIR}" 24 | cmake \ 25 | -DBUILD_SHARED_LIBS=ON \ 26 | -DBUILD_STATIC_LIBS=OFF \ 27 | -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ 28 | -DCMAKE_BUILD_TYPE=Release \ 29 | -DCMAKE_C_COMPILER=${C_COMPILER} \ 30 | -DCMAKE_CXX_COMPILER=${CXX_COMPILER} \ 31 | . 32 | 33 | status "Building tinyxml2" 34 | 35 | make -j ${CPU_CORES} 36 | 37 | status "Installing tinyxml2" 38 | 39 | make install 40 | 41 | status "Cleaning up" 42 | 43 | cd "${DEP_DIR}" 44 | rm -rf "${BUILD_ROOT}" 45 | 46 | -------------------------------------------------------------------------------- /dependencies/build-translator.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | 3 | IF "%1" == "build" (goto build) 4 | 5 | call build-common.bat %1 %2 6 | 7 | echo "Extracting GoogleMock with GoogleTest" 8 | 9 | Set ARCHIVE=translator.zip 10 | Set BUILD_DIR=%TMP_DIR%/translator 11 | 12 | call build-common.bat downloadAndUnpack %ARCHIVE% %BUILD_DIR% 13 | 14 | xcopy /F "%DEP_DIR%/../ext/RSAKey.h" "%BUILD_DIR%/include/translator/common/RSAKey.h*" 15 | 16 | cd %DEP_DIR% 17 | 18 | call build-translator.bat build Debug 19 | call build-translator.bat build Release 20 | 21 | cd %DEP_DIR% 22 | RD /S /Q "%TMP_DIR%" 23 | 24 | EXIT /B 25 | 26 | :build 27 | 28 | Set PREFIX=%DEP_DIR%/%ARCH_DIR%/translator/%2 29 | 30 | IF EXIST %PREFIX% EXIT /B 31 | 32 | echo "Compile translator" 33 | 34 | echo "Configuring translator" 35 | 36 | IF EXIST "%BUILD_DIR%\spineBuild" RD /S / Q "%BUILD_DIR%\spineBuild" 37 | 38 | mkdir "%BUILD_DIR%\spineBuild" 39 | 40 | pushd "%BUILD_DIR%\spineBuild" 41 | 42 | cmake -DWITH_SERVER=OFF -DWITH_CLIENT=OFF -DTRANSLATOR_DEP_DIR=%DEP_DIR%\%ARCH_DIR% -DCMAKE_INSTALL_PREFIX=%PREFIX% -G "%VSCOMPILER%" -A "%VSARCH%" .. 43 | 44 | echo "Building translator" 45 | 46 | cmake --build . --config %2 47 | 48 | echo "Installing translator" 49 | 50 | cmake --build . --config %2 --target install 51 | 52 | echo "Cleaning up" 53 | 54 | popd 55 | 56 | -------------------------------------------------------------------------------- /dependencies/build-translator.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(readlink "$(dirname "${0}")")" 4 | 5 | . ./build-common.sh ${1} 6 | 7 | ARCHIVE="translator.rar" 8 | BUILD_DIR="${BUILD_ROOT}/translator" 9 | PREFIX="${DEP_OUT_DIR}/translator/" 10 | 11 | if [ -d ${PREFIX} ]; then 12 | exit 0 13 | fi 14 | 15 | title "Compile Translator" 16 | 17 | status "Extracting Translator" 18 | 19 | downloadAndUnpack ${ARCHIVE} 20 | 21 | status "Configuring Translator" 22 | 23 | cd "${BUILD_DIR}" 24 | 25 | cp "${DEP_DIR}/../ext/RSAKey.h" include/translator/common/ 26 | 27 | cmake \ 28 | -DWITH_CLIENT=OFF \ 29 | -DWITH_SERVER=OFF \ 30 | -DTRANSLATOR_DEP_DIR="${DEP_OUT_DIR}" \ 31 | -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ 32 | -DCMAKE_BUILD_TYPE=Release \ 33 | -DCMAKE_C_COMPILER=${C_COMPILER} \ 34 | -DCMAKE_CXX_COMPILER=${CXX_COMPILER} \ 35 | . 36 | 37 | status "Building Translator" 38 | 39 | make -j ${CPU_CORES} 40 | 41 | status "Installing Translator" 42 | 43 | make install 44 | 45 | status "Cleaning up" 46 | 47 | cd "${DEP_DIR}" 48 | rm -rf "${BUILD_ROOT}" 49 | 50 | -------------------------------------------------------------------------------- /dependencies/build-zipper.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | 3 | IF "%1" == "build" (goto build) 4 | 5 | call build-common.bat %1 %2 6 | 7 | echo "Extracting zipper" 8 | 9 | Set BUILD_DIR=%TMP_DIR%/zipper 10 | 11 | IF NOT EXIST %TMP_DIR% MKDIR %TMP_DIR% 12 | 13 | pushd %TMP_DIR% 14 | 15 | git clone --branch v1.0.1 --recursive https://github.com/sebastiandev/zipper.git zipper 16 | 17 | popd 18 | 19 | cd %DEP_DIR% 20 | 21 | call build-zipper.bat build Debug d 22 | call build-zipper.bat build Release 23 | 24 | cd %DEP_DIR% 25 | RD /S /Q "%TMP_DIR%" 26 | 27 | EXIT /B 28 | 29 | :build 30 | 31 | Set PREFIX=%DEP_DIR%/%ARCH_DIR%/zipper/%2 32 | 33 | IF EXIST %PREFIX% EXIT /B 34 | 35 | echo "Compile zipper" 36 | 37 | echo "Configuring zipper" 38 | 39 | IF EXIST "%BUILD_DIR%\spineBuild" RD /S / Q "%BUILD_DIR%\spineBuild" 40 | 41 | mkdir "%BUILD_DIR%\spineBuild" 42 | 43 | pushd "%BUILD_DIR%\spineBuild" 44 | 45 | cmake -DBUILD_SHARED_VERSION=OFF -DBUILD_STATIC_VERSION=ON -DBUILD_TEST=OFF -DLIBZ_INCLUDE_DIR=%DEP_DIR%/%ARCH_DIR%/zlib/%2/include -DLIBZ_LIBRARY=%DEP_DIR%/%ARCH_DIR%/zlib/lib/%2/zlibstatic%3.lib -DCMAKE_INSTALL_PREFIX=%PREFIX% -G "%VSCOMPILER%" -A "%VSARCH%" .. 46 | 47 | echo "Building zipper" 48 | 49 | cmake --build . --config %2 50 | 51 | echo "Installing zipper" 52 | 53 | cmake --build . --config %2 --target install 54 | 55 | echo "Cleaning up" 56 | 57 | popd 58 | -------------------------------------------------------------------------------- /dependencies/build-zipper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(readlink "$(dirname "${0}")")" 4 | 5 | . ./build-common.sh ${1} 6 | 7 | BUILD_DIR="${BUILD_ROOT}/zipper" 8 | PREFIX="${DEP_OUT_DIR}/zipper/" 9 | 10 | if [ -d "${PREFIX}" ]; then 11 | exit 0 12 | fi 13 | 14 | title "Compile zipper" 15 | 16 | status "Cloning zipper" 17 | 18 | if [ ! -d "${BUILD_ROOT}" ]; then 19 | mkdir ${BUILD_ROOT} 20 | fi 21 | 22 | pushd ${BUILD_ROOT} 23 | 24 | git clone --recursive https://github.com/sebastiandev/zipper.git zipper 25 | 26 | popd 27 | 28 | status "Configuring zipper" 29 | 30 | cd "${BUILD_DIR}" 31 | cmake \ 32 | -DBUILD_SHARED_VERSION=OFF \ 33 | -DBUILD_STATIC_VERSION=ON \ 34 | -DBUILD_TEST=OFF \ 35 | -DBUILD_TESTING=OFF \ 36 | -DLIBZ_INCLUDE_DIR="${DEP_OUT_DIR}/zlib/include" \ 37 | -DLIBZ_LIBRARY="${DEP_OUT_DIR}/zlib/lib/libz.so" \ 38 | -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ 39 | -DCMAKE_BUILD_TYPE=Release \ 40 | -DCMAKE_C_COMPILER=${C_COMPILER} \ 41 | -DCMAKE_CXX_COMPILER=${CXX_COMPILER} \ 42 | . 43 | 44 | status "Building zipper" 45 | 46 | cmake --build . --config Release -- -j 47 | 48 | status "Installing zipper" 49 | 50 | cmake --build . --config Release --target install 51 | 52 | status "Cleaning up" 53 | 54 | cd "${DEP_DIR}" 55 | rm -rf "${BUILD_ROOT}" 56 | 57 | -------------------------------------------------------------------------------- /dependencies/build-zlib.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | 3 | IF "%1" == "build" (goto build) 4 | 5 | call build-common.bat %1 %2 6 | 7 | echo "Extracting zlib" 8 | 9 | Set ARCHIVE=zlib1213.zip 10 | Set BUILD_DIR=%TMP_DIR%/zlib-1.2.13 11 | 12 | call build-common.bat downloadAndUnpack %ARCHIVE% %BUILD_DIR% https://zlib.net/ 13 | 14 | cd %DEP_DIR% 15 | 16 | call build-zlib.bat build Debug 17 | call build-zlib.bat build Release 18 | 19 | cd %DEP_DIR% 20 | RD /S /Q "%TMP_DIR%" 21 | 22 | EXIT /B 23 | 24 | :build 25 | 26 | Set PREFIX=%DEP_DIR%/%ARCH_DIR%/zlib/%2 27 | 28 | IF EXIST %PREFIX% EXIT /B 29 | 30 | echo "Compile zlib" 31 | 32 | echo "Configuring zlib" 33 | 34 | IF EXIST "%BUILD_DIR%\spineBuild" RD /S / Q "%BUILD_DIR%\spineBuild" 35 | 36 | mkdir "%BUILD_DIR%\spineBuild" 37 | 38 | pushd "%BUILD_DIR%\spineBuild" 39 | 40 | cmake -DCMAKE_INSTALL_PREFIX=%PREFIX% -G "%VSCOMPILER%" -A "%VSARCH%" .. 41 | 42 | echo "Building zlib" 43 | 44 | cmake --build . --config %2 45 | 46 | echo "Installing zlib" 47 | 48 | cmake --build . --config %2 --target install 49 | 50 | echo "Cleaning up" 51 | 52 | popd 53 | 54 | -------------------------------------------------------------------------------- /dependencies/build-zlib.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(readlink "$(dirname "${0}")")" 4 | 5 | . ./build-common.sh ${1} 6 | 7 | ARCHIVE="zlib-1.2.10.tar.xz" 8 | BUILD_DIR="${BUILD_ROOT}/zlib-1.2.10" 9 | PREFIX="${DEP_OUT_DIR}/zlib/" 10 | 11 | if [ -d "${PREFIX}" ]; then 12 | exit 0 13 | fi 14 | 15 | title "Compile zlib" 16 | 17 | status "Extracting zlib" 18 | 19 | downloadAndUnpack ${ARCHIVE} 20 | 21 | status "Configuring zlib" 22 | 23 | cd "${BUILD_DIR}" 24 | cmake \ 25 | -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ 26 | -DCMAKE_BUILD_TYPE=Release \ 27 | -DCMAKE_C_COMPILER=${C_COMPILER} \ 28 | -DCMAKE_CXX_COMPILER=${CXX_COMPILER} \ 29 | . 30 | 31 | status "Building zlib" 32 | 33 | make -j ${CPU_CORES} 34 | 35 | status "Installing zlib" 36 | 37 | make install 38 | 39 | status "Cleaning up" 40 | 41 | cd "${DEP_DIR}" 42 | rm -rf "${BUILD_ROOT}" 43 | 44 | -------------------------------------------------------------------------------- /ext/patches/SimpleWebServer/client_http.patch: -------------------------------------------------------------------------------- 1 | --- "SimpleWebServer - Kopie/include/simple-web-server/client_http.hpp" 2018-08-04 09:55:20.383171000 +0200 2 | +++ SimpleWebServer/include/simple-web-server/client_http.hpp 2022-01-09 12:21:28.713487000 +0100 3 | @@ -120,7 +120,7 @@ 4 | timer = nullptr; 5 | return; 6 | } 7 | - timer = std::unique_ptr(new asio::steady_timer(socket->get_io_service())); 8 | + timer = std::unique_ptr(new asio::steady_timer(socket->get_executor())); 9 | timer->expires_from_now(std::chrono::seconds(seconds)); 10 | auto self = this->shared_from_this(); 11 | timer->async_wait([self](const error_code &ec) { 12 | -------------------------------------------------------------------------------- /ext/patches/boost/user-config-AndroidLinux.jam: -------------------------------------------------------------------------------- 1 | import os ; 2 | local androidNDKRoot = [ os.environ ANDROID_NDK ] ; 3 | echo "Android NDK path: $(androidNDKRoot)" ; 4 | using gcc : android : 5 | $(androidNDKRoot)/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ : 6 | --sysroot=$(androidNDKRoot)/platforms/android-9/arch-arm 7 | -mthumb 8 | -Os 9 | -fno-strict-aliasing 10 | -O2 11 | -DNDEBUG 12 | -g 13 | -lstdc++ 14 | -I$(androidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.9/include 15 | -I$(androidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include 16 | -D__GLIBC__ 17 | -D_GLIBCXX__PTHREADS 18 | -D__arm__ 19 | -D_REENTRANT 20 | $(androidNDKRoot)/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ar 21 | $(androidNDKRoot)/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ranlib ; 22 | -------------------------------------------------------------------------------- /ext/patches/boost/user-config-AndroidWindows.jam: -------------------------------------------------------------------------------- 1 | import os ; 2 | androidNDKRoot = [ os.environ ANDROID_NDK ] ; # put the relevant path 3 | using gcc : android : 4 | $(androidNDKRoot)/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++ : 5 | --sysroot=$(androidNDKRoot)/platforms/android-9/arch-arm 6 | -mthumb 7 | -Os 8 | -fno-strict-aliasing 9 | -O2 10 | -DNDEBUG 11 | -g 12 | -lstdc++ 13 | -I$(androidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.9/include 14 | -I$(androidNDKRoot)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include 15 | -D__GLIBC__ 16 | -D_GLIBCXX__PTHREADS 17 | -D__arm__ 18 | -D_REENTRANT 19 | -L$(androidNDKRoot)/platforms/android-9/arch-arm/usr/lib/ 20 | -Wl,-rpath-link=$(androidNDKRoot)/platforms/android-9/arch-arm/usr/lib/ 21 | $(androidNDKRoot)/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-ar 22 | $(androidNDKRoot)/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-ranlib 23 | ; -------------------------------------------------------------------------------- /ext/patches/sqlite3/Android.mk: -------------------------------------------------------------------------------- 1 | LOG_TO_ANDROID_LOGCAT := true 2 | 3 | LOCAL_PATH:= $(call my-dir) 4 | include $(CLEAR_VARS) 5 | 6 | LOCAL_SRC_FILES:= sqlite3.c 7 | 8 | LOCAL_MODULE:=sqlite3 9 | LOCAL_MODULE_TAGS := optional 10 | 11 | ifeq ($(LOG_TO_ANDROID_LOGCAT),true) 12 | LOCAL_CFLAGS+= -DDEBUG -DANDROID_NDK 13 | LOCAL_SHARED_LIBRARIES+= libcutils 14 | endif 15 | 16 | include $(BUILD_SHARED_LIBRARY) 17 | -------------------------------------------------------------------------------- /ext/patches/sqlite3/Application.mk: -------------------------------------------------------------------------------- 1 | APP_PROJECT_PATH=. 2 | APP_BUILD_SCRIPT=Android.mk 3 | -------------------------------------------------------------------------------- /include/api/Friends.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | #include "api/API.h" 24 | 25 | namespace spine { 26 | namespace api { 27 | 28 | bool initializeFriends(); 29 | 30 | /** 31 | * \brief return the amount of friends 32 | */ 33 | SPINEAPI_EXPORTS int32_t getFriendCount(); 34 | 35 | /** 36 | * \brief returns the name of the friend at position index 37 | */ 38 | SPINEAPI_EXPORTS void getFriendName(int32_t index, char * str); 39 | 40 | } /* namespace api */ 41 | } /* namespace spine */ 42 | -------------------------------------------------------------------------------- /include/api/Statistics.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | #include "api/API.h" 24 | 25 | namespace spine { 26 | namespace api { 27 | 28 | bool initializeStatistics(); 29 | 30 | /** 31 | * \brief updates a statistic 32 | */ 33 | SPINEAPI_EXPORTS void updateStatistic(int32_t identifier, int32_t guild, const char * statName, int32_t statValue); 34 | 35 | } /* namespace api */ 36 | } /* namespace spine */ 37 | -------------------------------------------------------------------------------- /include/api/zString.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/include/api/zString.h -------------------------------------------------------------------------------- /include/client/DirValidator.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | 25 | class DirValidator : public QValidator { 26 | public: 27 | DirValidator(); 28 | 29 | State validate(QString & input, int & pos) const override; 30 | 31 | bool isValid(QString string) const { 32 | int pos = string.length(); 33 | return validate(string, pos) == State::Acceptable; 34 | } 35 | }; 36 | 37 | } /* namespace spine */ 38 | -------------------------------------------------------------------------------- /include/client/FontAwesome.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | namespace spine { 22 | 23 | enum class FontAwesome { 24 | trasho = 0xf014, 25 | downloado = 0xf019, 26 | angledoubledown = 0xf103 27 | }; 28 | 29 | } /* namespace spine */ 30 | -------------------------------------------------------------------------------- /include/client/IconCache.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | namespace spine { 28 | namespace client { 29 | 30 | class IconCache { 31 | public: 32 | static IconCache * getInstance(); 33 | 34 | QPixmap getIcon(int32_t projectID) const; 35 | bool hasIcon(int32_t projectID) const; 36 | 37 | void cacheIcon(int32_t projectID, const QString & icon); 38 | 39 | QIcon getOrLoadIcon(const QString & path); 40 | QImage getOrLoadIconAsImage(const QString & path); 41 | 42 | private: 43 | struct Icon { 44 | QPixmap icon; 45 | QString hash; 46 | }; 47 | 48 | QMap _iconCache; 49 | QMap _pathIconCache; 50 | 51 | IconCache(); 52 | 53 | void loadCache(); 54 | }; 55 | 56 | } /* namespace client */ 57 | } /* namespace spine */ 58 | -------------------------------------------------------------------------------- /include/client/InstallMode.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | namespace spine { 22 | namespace client { 23 | 24 | enum class InstallMode { 25 | None, 26 | UI, 27 | Silent 28 | }; 29 | 30 | } /* namespace client */ 31 | } /* namespace spine */ 32 | -------------------------------------------------------------------------------- /include/client/MissingMetadataChecker.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2021 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | namespace spine { 25 | namespace client { 26 | 27 | class MissingMetadataChecker : public QObject { 28 | Q_OBJECT 29 | 30 | public: 31 | MissingMetadataChecker(); 32 | 33 | void check(); 34 | 35 | signals: 36 | void install(int modID); 37 | void finished(); 38 | }; 39 | 40 | } /* namespace client */ 41 | } /* namespace spine */ 42 | -------------------------------------------------------------------------------- /include/client/ReportGenerator.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | namespace spine { 25 | 26 | class ReportGenerator : public QObject { 27 | Q_OBJECT 28 | 29 | public: 30 | void generateReport(QString folder, QString filename); 31 | 32 | signals: 33 | void updateProgress(int); 34 | }; 35 | 36 | } /* namespace spine */ 37 | -------------------------------------------------------------------------------- /include/client/RtfToHtmlConverter.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | 25 | class RtfToHtmlConverter { 26 | public: 27 | static QString convert(QString rtfText); 28 | }; 29 | 30 | } /* namespace spine */ 31 | -------------------------------------------------------------------------------- /include/client/SavegameManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | 25 | struct Variable { 26 | std::string name; 27 | int value; 28 | int diffValue; 29 | bool changed; 30 | int pos; 31 | 32 | Variable(std::string n, int v, int p) : name(n), value(v), diffValue(0), changed(false), pos(p) { 33 | } 34 | }; 35 | 36 | class SavegameManager : public QObject { 37 | public: 38 | SavegameManager(QObject * par); 39 | 40 | void load(const QString & saveFile); 41 | static void save(const QString & saveFile, const QList & variables); 42 | 43 | QList getVariables() const { 44 | return _variables; 45 | } 46 | 47 | private: 48 | QList _variables; 49 | }; 50 | 51 | } /* namespace spine */ 52 | -------------------------------------------------------------------------------- /include/client/ScreenshotManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | namespace std { 28 | class thread; 29 | } /* namespace std */ 30 | 31 | namespace spine { 32 | 33 | class ScreenshotManager : public QObject { 34 | Q_OBJECT 35 | 36 | public: 37 | ScreenshotManager(QObject * par); 38 | ~ScreenshotManager(); 39 | 40 | void start(int32_t modID); 41 | void stop(); 42 | 43 | private slots: 44 | void setScreenshotDirectory(QString screenshotDirectory); 45 | 46 | private: 47 | bool _running; 48 | QFuture _workerThread; 49 | QString _screenshotDirectory; 50 | int32_t _modID; 51 | 52 | void execute(); 53 | void takeScreenshot(); 54 | }; 55 | 56 | } /* namespace spine */ 57 | -------------------------------------------------------------------------------- /include/client/SteamProcess.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | #ifdef Q_OS_WIN 28 | 29 | namespace spine { 30 | namespace client { 31 | 32 | class SteamProcess : public QObject { 33 | Q_OBJECT 34 | 35 | public: 36 | SteamProcess(int32_t steamID, QString executable, QStringList arguments); 37 | 38 | void start(int timeoutInSecs); 39 | 40 | signals: 41 | void finished(int, QProcess::ExitStatus); 42 | 43 | private: 44 | int32_t _steamID; 45 | QString _executable; 46 | QStringList _arguments; 47 | 48 | void checkIfProcessRunning(int timeoutInSecs); 49 | }; 50 | 51 | } /* namespace client */ 52 | } /* namespace spine */ 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /include/client/Uninstaller.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | #include 24 | 25 | namespace spine { 26 | namespace client { 27 | 28 | class Uninstaller { 29 | public: 30 | static bool uninstall(uint32_t modID, QString modName, QString directory); 31 | static bool uninstall(uint32_t modID); 32 | }; 33 | 34 | } /* namespace client */ 35 | } /* namespace spine */ 36 | -------------------------------------------------------------------------------- /include/client/UrlProtocolHandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2021 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QLocalServer; 24 | 25 | namespace spine { 26 | namespace client { 27 | 28 | class UrlProtocolHandler : public QObject { 29 | Q_OBJECT 30 | 31 | public: 32 | void listen(); 33 | void send(const QString & command); 34 | void handle(const QString & command); 35 | 36 | signals: 37 | void start(int projectID); 38 | void install(int projectID); 39 | 40 | private: 41 | QLocalServer * _server; 42 | 43 | void handleConnection(); 44 | }; 45 | 46 | } /* namespace client */ 47 | } /* namespace spine */ 48 | -------------------------------------------------------------------------------- /include/client/widgets/AboutDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace widgets { 25 | 26 | class AboutDialog : public QDialog { 27 | Q_OBJECT 28 | 29 | public: 30 | AboutDialog(QWidget * parent); 31 | }; 32 | 33 | } /* namespace widgets */ 34 | } /* namespace spine */ 35 | -------------------------------------------------------------------------------- /include/client/widgets/AchievementInfoView.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include "common/MessageStructs.h" 22 | 23 | #include 24 | 25 | namespace spine { 26 | namespace widgets { 27 | 28 | class AchievementInfoView : public QWidget { 29 | Q_OBJECT 30 | 31 | public: 32 | AchievementInfoView(const common::AchievementStats & as, QWidget * par); 33 | 34 | private: 35 | QString _name; 36 | QString _description; 37 | double _progress; 38 | int _currentProgress; 39 | int _maxProgress; 40 | bool _unlocked; 41 | 42 | QSize sizeHint() const override; 43 | void paintEvent(QPaintEvent * evt) override; 44 | }; 45 | 46 | } /* namespace widgets */ 47 | } /* namespace spine */ 48 | -------------------------------------------------------------------------------- /include/client/widgets/AchievementOrientationPreview.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace widgets { 25 | 26 | class AchievementOrientationPreview : public QDialog { 27 | public: 28 | AchievementOrientationPreview(int type, QWidget * parent); 29 | 30 | private: 31 | int _type; 32 | 33 | void paintEvent(QPaintEvent * evt) override; 34 | void mouseDoubleClickEvent(QMouseEvent * evt) override; 35 | void mousePressEvent(QMouseEvent * evt) override; 36 | }; 37 | 38 | } /* namespace widgets */ 39 | } /* namespace spine */ 40 | -------------------------------------------------------------------------------- /include/client/widgets/AchievementView.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include "common/MessageStructs.h" 22 | 23 | #include 24 | 25 | class QLabel; 26 | 27 | namespace spine { 28 | namespace widgets { 29 | 30 | class AchievementView : public QWidget { 31 | Q_OBJECT 32 | 33 | public: 34 | AchievementView(int32_t modID, common::AchievementStats as, QWidget * par); 35 | 36 | void updateIcons(); 37 | 38 | private: 39 | int32_t _modID; 40 | common::AchievementStats _achievement; 41 | QLabel * _lockedIcon; 42 | QLabel * _unlockedIcon; 43 | 44 | QSize sizeHint() const override; 45 | void paintEvent(QPaintEvent * evt) override; 46 | }; 47 | 48 | } /* namespace widgets */ 49 | } /* namespace spine */ 50 | -------------------------------------------------------------------------------- /include/client/widgets/AddFriendDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QComboBox; 24 | class QStandardItemModel; 25 | 26 | namespace spine { 27 | namespace widgets { 28 | 29 | class AddFriendDialog : public QDialog { 30 | Q_OBJECT 31 | 32 | public: 33 | AddFriendDialog(QStringList users, QWidget * par); 34 | 35 | private slots: 36 | void sendRequest(); 37 | 38 | private: 39 | QComboBox * _comboBox; 40 | QStandardItemModel * _sourceModel; 41 | }; 42 | 43 | } /* namespace widgets */ 44 | } /* namespace spine */ 45 | -------------------------------------------------------------------------------- /include/client/widgets/AutoUpdateDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QMainWindow; 24 | 25 | namespace spine { 26 | namespace widgets { 27 | 28 | class AutoUpdateDialog : public QDialog { 29 | Q_OBJECT 30 | 31 | public: 32 | AutoUpdateDialog(QMainWindow * mainWindow); 33 | 34 | signals: 35 | void upToDate(); 36 | 37 | public slots: 38 | int exec() override; 39 | void checkForUpdate(); 40 | 41 | private: 42 | QMainWindow * _mainWindow; 43 | bool _manuallyChecking; 44 | 45 | void cleanup() const; 46 | }; 47 | 48 | } /* namespace widgets */ 49 | } /* namespace spine */ 50 | -------------------------------------------------------------------------------- /include/client/widgets/CenteredIconDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace widgets { 25 | 26 | class CenteredIconDelegate : public QStyledItemDelegate { 27 | Q_OBJECT 28 | 29 | public: 30 | CenteredIconDelegate(QWidget * par); 31 | 32 | private: 33 | void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; 34 | QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; 35 | void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override; 36 | }; 37 | 38 | } /* namespace widgets */ 39 | } /* namespace spine */ 40 | -------------------------------------------------------------------------------- /include/client/widgets/ChangelogDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QTextBrowser; 24 | 25 | namespace spine { 26 | namespace widgets { 27 | 28 | class ChangelogDialog : public QDialog { 29 | Q_OBJECT 30 | 31 | public: 32 | ChangelogDialog(QWidget * par); 33 | ~ChangelogDialog(); 34 | 35 | public slots: 36 | int execStartup(); 37 | int exec() override; 38 | 39 | private slots: 40 | void changedShowState(int state); 41 | 42 | private: 43 | QTextBrowser * _changelogBrowser; 44 | 45 | void restoreSettings(); 46 | void saveSettings(); 47 | }; 48 | 49 | } /* namespace widgets */ 50 | } /* namespace spine */ 51 | -------------------------------------------------------------------------------- /include/client/widgets/ExportDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QLineEdit; 24 | class QPushButton; 25 | 26 | namespace spine { 27 | namespace widgets { 28 | 29 | class ExportDialog : public QDialog { 30 | Q_OBJECT 31 | 32 | public: 33 | ExportDialog(QWidget * par); 34 | 35 | signals: 36 | void updateProgress(int); 37 | void updateFile(QString); 38 | 39 | private slots: 40 | void openExportPathDialog(); 41 | void exportMods(); 42 | 43 | private: 44 | QLineEdit * _exportPathLineEdit; 45 | QPushButton * _exportPushButton; 46 | }; 47 | 48 | } /* namespace widgets */ 49 | } /* namespace spine */ 50 | -------------------------------------------------------------------------------- /include/client/widgets/FAQDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace widgets { 25 | 26 | class FAQDialog : public QDialog { 27 | public: 28 | FAQDialog(QWidget * par); 29 | ~FAQDialog(); 30 | 31 | private: 32 | static void initEntries(QWidget * par, QLayout * l); 33 | 34 | void restoreSettings(); 35 | void saveSettings(); 36 | }; 37 | 38 | } /* namespace widgets */ 39 | } /* namespace spine */ 40 | -------------------------------------------------------------------------------- /include/client/widgets/FAQEntry.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace widgets { 25 | 26 | class FAQEntry : public QWidget { 27 | public: 28 | FAQEntry(QString question, QString answer, QWidget * par); 29 | }; 30 | 31 | } /* namespace widgets */ 32 | } /* namespace spine */ 33 | -------------------------------------------------------------------------------- /include/client/widgets/FriendRequestView.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace widgets { 25 | 26 | class FriendRequestView : public QWidget { 27 | Q_OBJECT 28 | 29 | public: 30 | FriendRequestView(QString friendname, uint32_t level, QWidget * par); 31 | 32 | signals: 33 | void accepted(); 34 | 35 | private slots: 36 | void accept(); 37 | void decline(); 38 | 39 | private: 40 | QString _friendname; 41 | uint32_t _level; 42 | }; 43 | 44 | } /* namespace widgets */ 45 | } /* namespace spine */ 46 | -------------------------------------------------------------------------------- /include/client/widgets/FriendsListView.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2021 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace widgets { 25 | 26 | class FriendsListView : public QListView { 27 | Q_OBJECT 28 | 29 | public: 30 | explicit FriendsListView(QWidget * par); 31 | 32 | signals: 33 | void removeFriend(const QString & friendName); 34 | 35 | private: 36 | void contextMenuEvent(QContextMenuEvent * evt) override; 37 | }; 38 | 39 | } /* namespace widgets */ 40 | } /* namespace spine */ 41 | -------------------------------------------------------------------------------- /include/client/widgets/GameSettingsWidget.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QCheckBox; 24 | 25 | namespace spine { 26 | namespace widgets { 27 | 28 | class GameSettingsWidget : public QWidget { 29 | Q_OBJECT 30 | 31 | public: 32 | static int downloadRate; 33 | 34 | GameSettingsWidget(QWidget * par); 35 | 36 | void saveSettings(); 37 | void rejectSettings(); 38 | 39 | bool getShowAchievements() const; 40 | 41 | signals: 42 | void showAchievementsChanged(bool); 43 | 44 | private: 45 | QCheckBox * _showAchievementsCheckBox; 46 | }; 47 | 48 | } /* namespace widgets */ 49 | } /* namespace spine */ 50 | -------------------------------------------------------------------------------- /include/client/widgets/GamepadSpineSettingsWidget.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QCheckBox; 24 | class QLabel; 25 | class QVBoxLayout; 26 | 27 | namespace spine { 28 | namespace models { 29 | class SpineEditorModel; 30 | } /* namespace models */ 31 | namespace widgets { 32 | 33 | class GamepadSpineSettingsWidget : public QWidget { 34 | Q_OBJECT 35 | 36 | public: 37 | GamepadSpineSettingsWidget(models::SpineEditorModel * model, QWidget * par); 38 | 39 | void save(); 40 | 41 | public slots: 42 | void updateFromModel(); 43 | 44 | private: 45 | models::SpineEditorModel * _model; 46 | QLabel * _earthquakeVibrationLabel; 47 | QCheckBox * _earthquakeVibrationCheckBox; 48 | }; 49 | 50 | } /* namespace widgets */ 51 | } /* namespace spine */ 52 | -------------------------------------------------------------------------------- /include/client/widgets/HiddenAchievementsView.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | #include 24 | 25 | namespace spine { 26 | namespace widgets { 27 | 28 | class HiddenAchievementsView : public QWidget { 29 | public: 30 | HiddenAchievementsView(int32_t count, QWidget * par); 31 | 32 | private: 33 | QSize sizeHint() const override; 34 | void paintEvent(QPaintEvent * evt) override; 35 | }; 36 | 37 | } /* namespace widgets */ 38 | } /* namespace spine */ 39 | -------------------------------------------------------------------------------- /include/client/widgets/ImportDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QLineEdit; 24 | class QPushButton; 25 | 26 | namespace spine { 27 | namespace widgets { 28 | 29 | class ImportDialog : public QDialog { 30 | Q_OBJECT 31 | 32 | public: 33 | ImportDialog(QWidget * par); 34 | 35 | signals: 36 | void updateProgress(int); 37 | void updateFile(QString); 38 | void error(); 39 | 40 | private slots: 41 | void openImportPathDialog(); 42 | void importMods(); 43 | 44 | private: 45 | QLineEdit * _importPathLineEdit; 46 | QPushButton * _importPushButton; 47 | }; 48 | 49 | } /* namespace widgets */ 50 | } /* namespace spine */ 51 | -------------------------------------------------------------------------------- /include/client/widgets/LeGoSpineSettingsWidget.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include "models/SpineEditorModel.h" 22 | 23 | #include 24 | #include 25 | 26 | class QCheckBox; 27 | 28 | namespace spine { 29 | namespace widgets { 30 | 31 | class LeGoSpineSettingsWidget : public QWidget { 32 | Q_OBJECT 33 | 34 | public: 35 | LeGoSpineSettingsWidget(models::SpineEditorModel * model, QWidget * par); 36 | 37 | void save(); 38 | 39 | public slots: 40 | void achievementStateChanged(int state); 41 | void gamepadStateChanged(int state); 42 | 43 | public slots: 44 | void updateFromModel(); 45 | 46 | private: 47 | models::SpineEditorModel * _model; 48 | QMap _legoModuleCheckBoxes; 49 | bool _achievementsEnabled; 50 | bool _gamepadEnabled; 51 | }; 52 | 53 | } /* namespace widgets */ 54 | } /* namespace spine */ 55 | -------------------------------------------------------------------------------- /include/client/widgets/LibraryListView.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace widgets { 25 | 26 | class LibraryListView : public QListView { 27 | Q_OBJECT 28 | 29 | public: 30 | LibraryListView(QWidget * par); 31 | 32 | signals: 33 | void hideModTriggered(); 34 | void showModTriggered(); 35 | void uninstallModTriggered(); 36 | void forceUpdate(int projectID, bool forceAccept); 37 | void checkIntegrity(int projectID); 38 | 39 | private slots: 40 | void changeLanguage(int projectID, int language); 41 | 42 | private: 43 | void contextMenuEvent(QContextMenuEvent * evt) override; 44 | 45 | void createDesktopShortcut(int projectID, const QString & projectName); 46 | }; 47 | 48 | } /* namespace widgets */ 49 | } /* namespace spine */ 50 | -------------------------------------------------------------------------------- /include/client/widgets/ProjectInfoBoxWidget.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QLabel; 24 | 25 | namespace spine { 26 | namespace widgets { 27 | 28 | class ProjectInfoBoxWidget : public QWidget { 29 | Q_OBJECT 30 | 31 | public: 32 | explicit ProjectInfoBoxWidget(QWidget * par); 33 | 34 | void update(const QJsonObject & json); 35 | 36 | private: 37 | QLabel * _releaseDateLabel; 38 | QLabel * _updateDateLabel; 39 | }; 40 | 41 | } /* namespace widgets */ 42 | } /* namespace spine */ 43 | -------------------------------------------------------------------------------- /include/client/widgets/ReviewWidget.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | #include 25 | 26 | class QSvgWidget; 27 | class QTextBrowser; 28 | 29 | namespace spine { 30 | namespace widgets { 31 | 32 | class ReviewWidget : public QWidget { 33 | Q_OBJECT 34 | 35 | public: 36 | ReviewWidget(const QString & reviewer, const QString & review, uint64_t playTime, uint64_t playTimeAtReview, uint64_t date, int rating, int32_t projectID, QWidget * par); 37 | 38 | void setText(const QString & text); 39 | 40 | private: 41 | std::array _svgs; 42 | 43 | QTextBrowser * _textBrowser; 44 | }; 45 | 46 | } /* namespace widgets */ 47 | } /* namespace spine */ 48 | -------------------------------------------------------------------------------- /include/client/widgets/SurveyDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QTextEdit; 24 | 25 | namespace spine { 26 | namespace widgets { 27 | 28 | typedef struct { 29 | int questionID; 30 | QString question; 31 | QString answer; 32 | } SurveyQuestion; 33 | 34 | typedef struct { 35 | int surveyID; 36 | QList questions; 37 | } Survey; 38 | 39 | class SurveyDialog : public QDialog { 40 | Q_OBJECT 41 | 42 | public: 43 | SurveyDialog(const Survey & survey, int majorVersion, int minorVersion, int patchVersion, QWidget * par); 44 | 45 | private: 46 | Survey _survey; 47 | int _majorVersion; 48 | int _minorVersion; 49 | int _patchVersion; 50 | QList _editList; 51 | }; 52 | 53 | } /* namespace widgets */ 54 | } /* namespace spine */ 55 | -------------------------------------------------------------------------------- /include/client/widgets/SystempackIniWidget.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QSettings; 24 | class QTabWidget; 25 | 26 | namespace spine { 27 | namespace widgets { 28 | namespace sp { 29 | class GamePage; 30 | class SystemPage; 31 | } /* namespace g1 */ 32 | 33 | class SystempackIniWidget : public QWidget { 34 | Q_OBJECT 35 | 36 | public: 37 | SystempackIniWidget(QString directory, QWidget * par); 38 | ~SystempackIniWidget(); 39 | 40 | void accept(); 41 | void reject(); 42 | 43 | private slots: 44 | void backup(); 45 | void restore(); 46 | 47 | private: 48 | QSettings * _iniParser; 49 | QString _directory; 50 | QTabWidget * _tabWidget; 51 | sp::GamePage * _gamePage; 52 | sp::SystemPage * _systemPage; 53 | }; 54 | 55 | } /* namespace widgets */ 56 | } /* namespace spine */ 57 | -------------------------------------------------------------------------------- /include/client/widgets/UninstallDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QCheckBox; 24 | 25 | namespace spine { 26 | namespace widgets { 27 | 28 | class UninstallDialog : public QDialog { 29 | Q_OBJECT 30 | 31 | public: 32 | UninstallDialog(QString title, QString text, QString path); 33 | 34 | bool keepSavegame() const; 35 | 36 | private: 37 | QCheckBox * _savegameCheckbox; 38 | }; 39 | 40 | } /* namespace widgets */ 41 | } /* namespace spine */ 42 | -------------------------------------------------------------------------------- /include/client/widgets/gothicIniPages/ControlsPage.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QComboBox; 24 | class QDoubleSpinBox; 25 | class QSettings; 26 | class QSpinBox; 27 | 28 | namespace spine { 29 | namespace widgets { 30 | namespace g1 { 31 | 32 | class ControlsPage : public QWidget { 33 | Q_OBJECT 34 | 35 | public: 36 | ControlsPage(QSettings * iniParser, QWidget * par); 37 | ~ControlsPage(); 38 | 39 | void reject(); 40 | void accept(); 41 | 42 | void updateSettings(QSettings * iniParser); 43 | 44 | private: 45 | QSettings * _iniParser; 46 | QComboBox * _enableMouse; 47 | QDoubleSpinBox * _mouseSensitivity; 48 | }; 49 | 50 | } /* namespace g1 */ 51 | } /* namespace widgets */ 52 | } /* namespace spine */ 53 | -------------------------------------------------------------------------------- /include/client/widgets/gothicIniPages/EnginePage.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QComboBox; 24 | class QDoubleSpinBox; 25 | class QLineEdit; 26 | class QSettings; 27 | class QSpinBox; 28 | 29 | namespace spine { 30 | namespace widgets { 31 | namespace g1 { 32 | 33 | class EnginePage : public QWidget { 34 | Q_OBJECT 35 | 36 | public: 37 | EnginePage(QSettings * iniParser, QWidget * par); 38 | ~EnginePage(); 39 | 40 | void reject(); 41 | void accept(); 42 | 43 | void updateSettings(QSettings * iniParser); 44 | 45 | private: 46 | QSettings * _iniParser; 47 | QSpinBox * _zTexCacheOutTimeMSec; 48 | QSpinBox * _zTexCacheSizeMaxByte; 49 | }; 50 | 51 | } /* namespace g1 */ 52 | } /* namespace widgets */ 53 | } /* namespace spine */ 54 | -------------------------------------------------------------------------------- /include/client/widgets/gothicIniPages/GamePage.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QComboBox; 24 | class QDoubleSpinBox; 25 | class QSettings; 26 | class QSpinBox; 27 | 28 | namespace spine { 29 | namespace widgets { 30 | namespace g1 { 31 | 32 | class GamePage : public QWidget { 33 | Q_OBJECT 34 | 35 | public: 36 | GamePage(QSettings * iniParser, QWidget * par); 37 | ~GamePage(); 38 | 39 | void reject(); 40 | void accept(); 41 | 42 | void updateSettings(QSettings * iniParser); 43 | 44 | private: 45 | QSettings * _iniParser; 46 | QComboBox * _subtitleComboBox; 47 | 48 | QComboBox * _camLookaroundInverse; 49 | QSpinBox * _cameraLightRange; 50 | 51 | QComboBox * _invShowArrows; 52 | QComboBox * _invSwitchToFirstCategory; 53 | }; 54 | 55 | } /* namespace g1 */ 56 | } /* namespace widgets */ 57 | } /* namespace spine */ 58 | -------------------------------------------------------------------------------- /include/client/widgets/gothicIniPages/SoundPage.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QComboBox; 24 | class QDoubleSpinBox; 25 | class QSettings; 26 | class QSpinBox; 27 | 28 | namespace spine { 29 | namespace widgets { 30 | namespace g1 { 31 | 32 | class SoundPage : public QWidget { 33 | Q_OBJECT 34 | 35 | public: 36 | SoundPage(QSettings * iniParser, QWidget * par); 37 | ~SoundPage(); 38 | 39 | void reject(); 40 | void accept(); 41 | 42 | void updateSettings(QSettings * iniParser); 43 | 44 | private: 45 | QSettings * _iniParser; 46 | QComboBox * _soundEnabled; 47 | QComboBox * _musicEnabled; 48 | 49 | QDoubleSpinBox * _soundVolume; 50 | QDoubleSpinBox * _musicVolume; 51 | 52 | QComboBox * _soundUseReverb; 53 | }; 54 | 55 | } /* namespace g1 */ 56 | } /* namespace widgets */ 57 | } /* namespace spine */ 58 | -------------------------------------------------------------------------------- /include/client/widgets/gothicIniPages/VisualizationPage.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QLineEdit; 24 | class QSettings; 25 | 26 | namespace spine { 27 | namespace widgets { 28 | namespace g1 { 29 | 30 | class VisualizationPage : public QWidget { 31 | Q_OBJECT 32 | 33 | public: 34 | VisualizationPage(QSettings * iniParser, QWidget * par); 35 | ~VisualizationPage(); 36 | 37 | void reject(); 38 | void accept(); 39 | 40 | void updateSettings(QSettings * iniParser); 41 | 42 | private: 43 | QSettings * _iniParser; 44 | QLineEdit * _zDayColor0; 45 | QLineEdit * _zDayColor1; 46 | QLineEdit * _zDayColor2; 47 | QLineEdit * _zDayColor3; 48 | }; 49 | 50 | } /* namespace g1 */ 51 | } /* namespace widgets */ 52 | } /* namespace spine */ 53 | -------------------------------------------------------------------------------- /include/client/widgets/management/EnterChangelogDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | class QCheckBox; 25 | class QComboBox; 26 | class QTextEdit; 27 | 28 | namespace spine { 29 | namespace client { 30 | namespace widgets { 31 | 32 | class EnterChangelogDialog : public QDialog { 33 | public: 34 | EnterChangelogDialog(QWidget * par); 35 | 36 | bool isSavegameCompatible() const; 37 | QMap getChangelogs() const; 38 | 39 | private: 40 | QCheckBox * _savegameCompatibleBox; 41 | QComboBox * _languageBox; 42 | QTextEdit * _textEdit; 43 | 44 | QString _currentLanguage; 45 | QMap _changelogs; 46 | }; 47 | 48 | } /* namespace widgets */ 49 | } /* namespace client */ 50 | } /* namespace spine */ 51 | -------------------------------------------------------------------------------- /include/client/widgets/management/IManagementWidget.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2019 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | namespace spine { 22 | namespace client { 23 | namespace widgets { 24 | 25 | class IManagementWidget { 26 | public: 27 | virtual ~IManagementWidget() {} 28 | 29 | virtual void updateView() = 0; 30 | }; 31 | 32 | } /* namespace widgets */ 33 | } /* namespace client */ 34 | } /* namespace spine */ 35 | -------------------------------------------------------------------------------- /include/common/Encryption.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace common { 25 | 26 | class Encryption { 27 | public: 28 | static bool encryptPublic(const std::string & in, std::string & out); 29 | 30 | static bool encryptPrivate(const std::string & in, std::string & out); 31 | 32 | static bool decryptPublic(const std::string & in, std::string & out); 33 | 34 | static bool decryptPrivate(const std::string & in, std::string & out); 35 | }; 36 | 37 | } /* namespace common */ 38 | } /* namespace spine */ 39 | -------------------------------------------------------------------------------- /include/common/GameType.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | namespace spine { 22 | namespace common { 23 | 24 | enum class GameType { 25 | Gothic, 26 | Gothic2, 27 | GothicInGothic2, // never used 28 | Gothic1And2, 29 | Game, 30 | Gothic3 31 | }; 32 | 33 | } /* namespace common */ 34 | } /* namespace spine */ 35 | -------------------------------------------------------------------------------- /include/common/Language.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | namespace spine { 22 | namespace common { 23 | 24 | enum Language { 25 | None, 26 | 27 | German = 1 << 0, 28 | English = 1 << 1, 29 | Polish = 1 << 2, 30 | Russian = 1 << 3, 31 | 32 | Count = 1 << 4 33 | }; 34 | 35 | } /* namespace common */ 36 | } /* namespace spine */ 37 | -------------------------------------------------------------------------------- /include/common/ModType.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | namespace spine { 22 | namespace common { 23 | 24 | enum class ModType { 25 | TOTALCONVERSION, 26 | ENHANCEMENT, 27 | PATCH, 28 | TOOL, 29 | ORIGINAL, 30 | GMP, 31 | FULLVERSION, 32 | DEMO, 33 | PLAYTESTING 34 | }; 35 | 36 | } /* namespace common */ 37 | } /* namespace spine */ 38 | -------------------------------------------------------------------------------- /include/common/NewsTickerTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | namespace spine { 22 | namespace common { 23 | 24 | enum class NewsTickerType { 25 | Update, 26 | Release 27 | }; 28 | 29 | } /* namespace common */ 30 | } /* namespace spine */ 31 | -------------------------------------------------------------------------------- /include/common/ProjectPrivileges.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace common { 25 | 26 | enum class ProjectPrivilege : int64_t { 27 | EditInfoPage = 1 << 0, 28 | Manage = 1 << 1 29 | }; 30 | 31 | } /* namespace common */ 32 | } /* namespace spine */ 33 | -------------------------------------------------------------------------------- /include/common/ScoreOrder.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | namespace spine { 22 | namespace common { 23 | 24 | enum class ScoreOrder { 25 | Descending, 26 | Ascending 27 | }; 28 | 29 | } /* namespace common */ 30 | } /* namespace spine */ 31 | -------------------------------------------------------------------------------- /include/common/SpineModules.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | namespace spine { 22 | namespace common { 23 | 24 | enum SpineModules { 25 | GetCurrentUsername = 1 << 0, 26 | Achievements = 1 << 1, 27 | Scores = 1 << 2, 28 | Multiplayer = 1 << 3, 29 | OverallSave = 1 << 4, 30 | Gamepad = 1 << 5, 31 | Friends = 1 << 6, 32 | Statistics = 1 << 7, 33 | 34 | All = (1 << 8) - 1 35 | }; 36 | 37 | } /* namespace common */ 38 | } /* namespace spine */ 39 | -------------------------------------------------------------------------------- /include/common/TeamPrivileges.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace common { 25 | 26 | enum class TeamPrivilege : int64_t { 27 | AddMember = 1 << 0 28 | }; 29 | 30 | } /* namespace common */ 31 | } /* namespace spine */ 32 | -------------------------------------------------------------------------------- /include/common/UserPrivileges.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace common { 25 | 26 | enum class UserPrivilege : int64_t { 27 | WriteNews = 1 << 0, 28 | EditInfoPage = 1 << 1 29 | }; 30 | 31 | } /* namespace common */ 32 | } /* namespace spine */ 33 | -------------------------------------------------------------------------------- /include/gui/DontShowAgainDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2022 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QCheckBox; 24 | 25 | namespace spine { 26 | namespace gui { 27 | 28 | class DontShowAgainDialog : public QDialog { 29 | Q_OBJECT 30 | 31 | public: 32 | DontShowAgainDialog(QString title, QString text, const QString & settingsKey, QWidget * par); 33 | ~DontShowAgainDialog(); 34 | 35 | bool canShow() const; 36 | 37 | private: 38 | QString _settingsKey; 39 | QCheckBox * _dontShowAgainBox; 40 | }; 41 | 42 | } /* namespace gui */ 43 | } /* namespace spine */ 44 | -------------------------------------------------------------------------------- /include/gui/FullscreenPreview.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace gui { 25 | 26 | class FullscreenPreview : public QDialog { 27 | public: 28 | FullscreenPreview(QString imagePath, QWidget * parent); 29 | 30 | private: 31 | QPixmap _pixmap; 32 | 33 | void paintEvent(QPaintEvent * evt) override; 34 | void mouseDoubleClickEvent(QMouseEvent * evt) override; 35 | void mousePressEvent(QMouseEvent * evt) override; 36 | }; 37 | 38 | } /* namespace gui */ 39 | } /* namespace spine */ 40 | -------------------------------------------------------------------------------- /include/gui/OverlayMessageHandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | class QImage; 22 | class QString; 23 | 24 | namespace spine { 25 | namespace gui { 26 | 27 | class OverlayMessageHandler { 28 | public: 29 | static OverlayMessageHandler * getInstance(); 30 | 31 | void showMessage(const QImage & img, const QString & message); 32 | }; 33 | 34 | } /* namespace gui */ 35 | } /* namespace spine */ 36 | -------------------------------------------------------------------------------- /include/gui/ReportContentDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QTextEdit; 24 | 25 | namespace spine { 26 | namespace gui { 27 | 28 | class ReportContentDialog : public QDialog { 29 | Q_OBJECT 30 | 31 | public: 32 | ReportContentDialog(QString context, QWidget * par); 33 | 34 | signals: 35 | void error(); 36 | void success(); 37 | 38 | private slots: 39 | void submit(); 40 | void showError(); 41 | void showSuccess(); 42 | 43 | private: 44 | QString _context; 45 | 46 | QTextEdit * _textEdit; 47 | }; 48 | 49 | } /* namespace gui */ 50 | } /* namespace spine */ 51 | -------------------------------------------------------------------------------- /include/gui/Spoiler.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QFrame; 24 | class QGridLayout; 25 | class QParallelAnimationGroup; 26 | class QScrollArea; 27 | class QToolButton; 28 | 29 | namespace spine { 30 | namespace gui { 31 | 32 | class Spoiler : public QWidget { 33 | Q_OBJECT 34 | 35 | public: 36 | Spoiler(const QString & title, QWidget * par); 37 | 38 | void setAnimationDuration(int animationDuration); 39 | 40 | void setContentLayout(QLayout * contentLayout); 41 | 42 | private: 43 | int _animationDuration; 44 | QGridLayout * _mainLayout; 45 | QToolButton * _toggleButton; 46 | QFrame * _headerLine; 47 | QParallelAnimationGroup * _toggleAnimation; 48 | QScrollArea * _contentArea; 49 | }; 50 | 51 | } /* namespace gui */ 52 | } /* namespace spine */ 53 | -------------------------------------------------------------------------------- /include/gui/WaitSpinner.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace gui { 25 | 26 | class WaitSpinner : public QWidget { 27 | Q_OBJECT 28 | 29 | public: 30 | WaitSpinner(QString text, QWidget * par); 31 | ~WaitSpinner(); 32 | 33 | signals: 34 | void setText(QString); 35 | 36 | private: 37 | int _textWidth; 38 | 39 | QSize sizeHint() const override; 40 | }; 41 | 42 | } /* namespace gui */ 43 | } /* namespace spine */ 44 | -------------------------------------------------------------------------------- /include/security/Hash.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace security { 25 | 26 | class Hash { 27 | public: 28 | static QString calculateSystemHash(); 29 | static QString getMAC(); 30 | 31 | private: 32 | static QString getProductID(); 33 | static QString getHarddriveNumber(); 34 | static QString getProcessorID(); 35 | }; 36 | 37 | } /* namespace security */ 38 | } /* namespace spine */ 39 | -------------------------------------------------------------------------------- /include/server/Cleanup.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2021 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | #include 23 | 24 | namespace spine { 25 | namespace server { 26 | 27 | class Cleanup { 28 | public: 29 | static void init(); 30 | 31 | private: 32 | static void cleanup(); 33 | static void cleanupTable(const std::string & tableName, const std::vector & userList); 34 | }; 35 | 36 | } /* namespace server */ 37 | } /* namespace spine */ 38 | -------------------------------------------------------------------------------- /include/server/DatabaseCreator.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | namespace spine { 22 | namespace server { 23 | 24 | class DatabaseCreator { 25 | public: 26 | static void createTables(); 27 | 28 | private: 29 | static void createFileserverTables(); 30 | static void createTranslatorTables(); 31 | }; 32 | 33 | } /* namespace server */ 34 | } /* namespace spine */ 35 | -------------------------------------------------------------------------------- /include/server/DatabaseMigrator.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | namespace spine { 22 | namespace server { 23 | 24 | class DatabaseMigrator { 25 | public: 26 | static void migrate(); 27 | }; 28 | 29 | } /* namespace server */ 30 | } /* namespace spine */ 31 | -------------------------------------------------------------------------------- /include/server/GMPServer.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | namespace clockUtils { 22 | enum class ClockError; 23 | namespace sockets { 24 | class TcpSocket; 25 | } /* namespace sockets */ 26 | } /* namespace clockUtils */ 27 | 28 | namespace spine { 29 | namespace server { 30 | 31 | // TODO: remove in 1.37 32 | class GMPServer { 33 | public: 34 | GMPServer(); 35 | ~GMPServer(); 36 | 37 | int run(); 38 | 39 | private: 40 | clockUtils::sockets::TcpSocket * _listenGMPServer; 41 | 42 | // MP stuff, communication with external server 43 | void handleRequestUserInfosMP(clockUtils::sockets::TcpSocket * sock) const; 44 | }; 45 | 46 | } /* namespace server */ 47 | } /* namespace spine */ 48 | -------------------------------------------------------------------------------- /include/server/LanguageConverter.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | #include "common/Language.h" 24 | 25 | namespace spine { 26 | namespace server { 27 | 28 | class LanguageConverter { 29 | public: 30 | static std::string convert(common::Language language); 31 | static common::Language convert(const std::string & language); 32 | }; 33 | 34 | } /* namespace server */ 35 | } /* namespace spine */ 36 | -------------------------------------------------------------------------------- /include/server/RamChecker.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2022 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace server { 25 | 26 | class RamChecker { 27 | public: 28 | RamChecker(const std::string & label); 29 | ~RamChecker(); 30 | 31 | private: 32 | static std::mutex _lock; 33 | std::string _label; 34 | int64_t _lastRamUsage; 35 | bool _enabled; 36 | 37 | int64_t getRamUsage() const; 38 | }; 39 | 40 | } /* namespace server */ 41 | } /* namespace spine */ 42 | -------------------------------------------------------------------------------- /include/server/StatsCollector.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2021 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | namespace spine { 22 | namespace server { 23 | 24 | class StatsCollector { 25 | public: 26 | static void init(); 27 | 28 | private: 29 | static void exec(); 30 | }; 31 | 32 | } /* namespace server */ 33 | } /* namespace spine */ 34 | -------------------------------------------------------------------------------- /include/server/UploadServer.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | namespace clockUtils { 22 | enum class ClockError; 23 | namespace sockets { 24 | class TcpSocket; 25 | } /* namespace sockets */ 26 | } /* namespace clockUtils */ 27 | 28 | namespace spine { 29 | namespace server { 30 | 31 | class UploadServer { 32 | public: 33 | UploadServer(); 34 | ~UploadServer(); 35 | 36 | int run(); 37 | 38 | private: 39 | clockUtils::sockets::TcpSocket * _listenUploadServer; 40 | 41 | void handleUploadFiles(clockUtils::sockets::TcpSocket * sock) const; 42 | }; 43 | 44 | } /* namespace server */ 45 | } /* namespace spine */ 46 | -------------------------------------------------------------------------------- /include/translator/ApplyTranslationDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include "common/MessageStructs.h" 22 | 23 | #include 24 | 25 | class QLineEdit; 26 | class QPushButton; 27 | class QSettings; 28 | 29 | namespace spine { 30 | namespace translation { 31 | 32 | class ApplyTranslationDialog : public QDialog { 33 | Q_OBJECT 34 | 35 | public: 36 | ApplyTranslationDialog(uint32_t requestID, QString title, QWidget * par); 37 | ~ApplyTranslationDialog(); 38 | 39 | private slots : 40 | void openFileDialog(); 41 | void applyTranslation(); 42 | 43 | private: 44 | uint32_t _requestID; 45 | QLineEdit * _pathEdit; 46 | QPushButton * _applyButton; 47 | 48 | void restoreSettings(); 49 | void saveSettings(); 50 | }; 51 | 52 | } /* namespace translation */ 53 | } /* namespace spine */ 54 | -------------------------------------------------------------------------------- /include/translator/GothicParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2019 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | #include 24 | 25 | namespace spine { 26 | namespace common { 27 | class TranslationModel; 28 | } /* namespace common */ 29 | namespace translation { 30 | 31 | class GothicParser : public QObject { 32 | Q_OBJECT 33 | 34 | public: 35 | GothicParser(QObject * par); 36 | 37 | void parseTexts(QString path, common::TranslationModel * model); 38 | void parseFile(QString filePath, common::TranslationModel * model); 39 | 40 | signals: 41 | void updatedProgress(int current, int max); 42 | void finished(); 43 | 44 | private: 45 | std::atomic _currentProgress; 46 | int _maxProgress; 47 | 48 | void parseName(QString line, common::TranslationModel * model); 49 | }; 50 | 51 | } /* namespace translation */ 52 | } /* namespace spine */ 53 | -------------------------------------------------------------------------------- /include/translator/TranslationWidget.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QLineEdit; 24 | 25 | namespace spine { 26 | namespace translation { 27 | 28 | class TranslationWidget : public QWidget { 29 | Q_OBJECT 30 | 31 | public: 32 | TranslationWidget(QString sourceText, QString targetText, QWidget * par); 33 | 34 | QString getTranslation() const; 35 | void setFocusToTranslation(); 36 | 37 | signals: 38 | void selectedSource(QString); 39 | void selectedDestination(QString); 40 | 41 | private slots: 42 | void focusChanged(); 43 | 44 | private: 45 | QLineEdit * _sourceEdit; 46 | QLineEdit * _translationEdit; 47 | }; 48 | 49 | } /* namespace translation */ 50 | } /* namespace spine */ 51 | -------------------------------------------------------------------------------- /include/utils/Compression.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2019 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace utils { 25 | 26 | class Compression { 27 | public: 28 | static bool compress(const QString & file, bool deleteSourceAfterCompression); 29 | static bool compress(const QString & file, const QString & targetFile, bool deleteSourceAfterCompression); 30 | static bool uncompress(const QString & file, bool deleteSourceAfterUncompression); 31 | static bool uncompress(const QString & file, const QString & targetFile, bool deleteSourceAfterUncompression); 32 | }; 33 | 34 | } /* namespace utils */ 35 | } /* namespace spine */ 36 | -------------------------------------------------------------------------------- /include/utils/Config.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | class QSettings; 24 | 25 | namespace spine { 26 | namespace utils { 27 | 28 | class Config { 29 | public: 30 | /** 31 | * \brief always call after creation of QApplication in main and before creating MainWindow 32 | */ 33 | static int Init(); 34 | 35 | static QString BASEDIR; 36 | static QString DOWNLOADDIR; 37 | static QString NEWSIMAGEDIR; 38 | static QString STYLESDIR; 39 | static QSettings * IniParser; 40 | 41 | static bool OnlineMode; 42 | static QString Username; 43 | static QString Password; 44 | static QString Language; 45 | static int UserID; 46 | 47 | static bool extendedLogging; 48 | static bool betaMode; 49 | 50 | static const int ProjectID = 0; 51 | 52 | private: 53 | static void initUrlProtocl(); 54 | }; 55 | 56 | } /* namespace utils */ 57 | } /* namespace spine */ 58 | -------------------------------------------------------------------------------- /include/utils/ErrorReporting.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2019 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace utils { 25 | 26 | class ErrorReporting { 27 | public: 28 | static void report(const QString & message); 29 | }; 30 | 31 | } /* namespace utils */ 32 | } /* namespace spine */ 33 | -------------------------------------------------------------------------------- /include/utils/FileLogger.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | #include "clockUtils/log/SinkWrapper.h" 24 | 25 | namespace spine { 26 | namespace utils { 27 | 28 | class FileLogger : public clockUtils::log::SinkWrapper { 29 | public: 30 | FileLogger(const std::string & path); 31 | 32 | SinkWrapper & operator<<(const std::string &) override; 33 | bool isSame(void * sink) const override; 34 | 35 | private: 36 | std::ofstream _fileStream; 37 | }; 38 | 39 | } /* namespace utils */ 40 | } /* namespace spine */ 41 | -------------------------------------------------------------------------------- /include/utils/Hashing.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2019 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace spine { 24 | namespace utils { 25 | 26 | class Hashing { 27 | public: 28 | static bool hash(const QString & file, QString & hash); 29 | static bool hash(const QString & file, qint64 offset, QString & hash); 30 | static bool hash(const QByteArray & bytes, QString & hash); 31 | static bool checkHash(const QString & file, const QString & referenceHash); 32 | }; 33 | 34 | } /* namespace utils */ 35 | } /* namespace spine */ 36 | -------------------------------------------------------------------------------- /include/utils/ImageMerger.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2019 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | class QPixmap; 22 | 23 | namespace spine { 24 | namespace utils { 25 | 26 | class ImageMerger { 27 | public: 28 | static QPixmap merge(const QPixmap & a, const QPixmap & b); 29 | static QPixmap merge(const QPixmap & a, const QPixmap & b, const QPixmap & c); 30 | static QPixmap merge(const QPixmap & a, const QPixmap & b, const QPixmap & c, const QPixmap & d); 31 | }; 32 | 33 | } /* namespace utils */ 34 | } /* namespace spine */ 35 | -------------------------------------------------------------------------------- /include/utils/LanguageConverter.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | #include "common/Language.h" 24 | 25 | namespace spine { 26 | namespace utils { 27 | 28 | class LanguageConverter { 29 | public: 30 | static QString convert(common::Language language); 31 | static common::Language convert(const QString & language); 32 | 33 | static QStringList getLanguages(); 34 | }; 35 | 36 | } /* namespace utils */ 37 | } /* namespace spine */ 38 | -------------------------------------------------------------------------------- /include/utils/WindowsExtensions.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | #ifdef Q_OS_WIN 24 | 25 | typedef void * HANDLE; 26 | 27 | namespace spine { 28 | namespace utils { 29 | 30 | bool IsRunAsAdmin(); 31 | bool makeSymlink(QString sourceFile, QString targetFile); 32 | bool makeSymlinkFolder(QString sourceDir, QString targetDir); 33 | void removeSymlink(QString symLink); 34 | int GetProcId(const char * ProcName); 35 | HANDLE GetProcHandle(const char * ProcName); 36 | HANDLE GetProcHandle(int procID); 37 | uint32_t getPRAMValue(); 38 | 39 | } /* namespace utils */ 40 | } /* namespace spine */ 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /installer/Windows/German.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/installer/Windows/German.nsh -------------------------------------------------------------------------------- /installer/Windows/Gothic2-Addon-Setup.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/installer/Windows/Gothic2-Addon-Setup.bat -------------------------------------------------------------------------------- /installer/Windows/Gothic2-Setup.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/installer/Windows/Gothic2-Setup.bat -------------------------------------------------------------------------------- /installer/Windows/Polish.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/installer/Windows/Polish.nsh -------------------------------------------------------------------------------- /installer/Windows/makeSymlink.bat: -------------------------------------------------------------------------------- 1 | IF "%SPINE_TYPE%" == "1" SET PARAM=/D 2 | 3 | mklink %PARAM% "%SPINE_TARGET%" "%SPINE_SOURCE%" 4 | exit %errorlevel% 5 | -------------------------------------------------------------------------------- /installer/Windows/removeSymlink.bat: -------------------------------------------------------------------------------- 1 | RMDIR "%SPINE_TARGET%" 2 | exit %errorlevel% 3 | -------------------------------------------------------------------------------- /installer/Windows/setup.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | NumFields=3 3 | [Field 1] 4 | Type=Label 5 | Left=0 6 | Right=-1 7 | Top=0 8 | Bottom=24 9 | [Field 2] 10 | Type=RadioButton 11 | Left=30 12 | Right=-1 13 | Top=50 14 | Bottom=58 15 | State=1 16 | [Field 3] 17 | Type=RadioButton 18 | Left=30 19 | Right=-1 20 | Top=70 21 | Bottom=78 -------------------------------------------------------------------------------- /media/Spine.vdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/media/Spine.vdf -------------------------------------------------------------------------------- /scriptApi/Spine.src: -------------------------------------------------------------------------------- 1 | Spine_Constants.d 2 | Spine_UserConstants.d 3 | Spine_Message.d 4 | Spine_Utils.d 5 | Spine_TestMode.d 6 | Spine_Achievements.d 7 | Spine_Friends.d 8 | Spine_Gamepad.d 9 | Spine_OverallSave.d 10 | Spine_Scores.d 11 | Spine_Statistics.d 12 | Spine_Multiplayer.d 13 | Spine_API.d 14 | 15 | Spine_Statistics_UserDefined.d 16 | -------------------------------------------------------------------------------- /scriptApi/Spine_Friends.d: -------------------------------------------------------------------------------- 1 | var int Spine_GetFriendCountFunc; 2 | var int Spine_GetFriendNameFunc; 3 | 4 | // returns the amount of friends the current player has 5 | // will be 0 when offline, no account or no friends are found 6 | func int Spine_GetFriendCount() { 7 | if (Spine_Initialized && Spine_GetFriendCountFunc) { 8 | CALL__cdecl(Spine_GetFriendCountFunc); 9 | return CALL_RetValAsInt(); 10 | }; 11 | return 0; 12 | }; 13 | 14 | // returns the name of a friend 15 | // index specifies the index in the friend list which will be ordered alphabetically 16 | // index has to be in range [0;Spine_GetFriendCount() - 1] 17 | func string Spine_GetFriendName(var int index) { 18 | if (Spine_Initialized && Spine_GetFriendNameFunc) { 19 | const string STR_BUFFER = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; 20 | 21 | CALL_cStringPtrParam(STR_BUFFER); 22 | CALL_IntParam(index); 23 | CALL__cdecl(Spine_GetFriendNameFunc); 24 | return STR_BUFFER; 25 | }; 26 | return ""; 27 | }; 28 | -------------------------------------------------------------------------------- /scriptApi/Spine_Statistics.d: -------------------------------------------------------------------------------- 1 | var int Spine_UpdateStatisticFunc; 2 | 3 | // updates a statistic value with given identifier, guild, name and value 4 | // general usage case for this is to create statistics that will help to balance the mod 5 | // that's why identifier is intended to be the chapter 6 | func void Spine_UpdateStatistic(var int identifier, var int guild, var string name, var int value) { 7 | if (Spine_Initialized && Spine_UpdateStatisticFunc) { 8 | CALL_IntParam(value); 9 | CALL_cStringPtrParam(name); 10 | CALL_IntParam(guild); 11 | CALL_IntParam(identifier); 12 | CALL__cdecl(Spine_UpdateStatisticFunc); 13 | }; 14 | }; 15 | -------------------------------------------------------------------------------- /scriptApi/Spine_TestMode.d: -------------------------------------------------------------------------------- 1 | var int Spine_GetTestModeFunc; 2 | 3 | // returns TRUE if mod is started in testmode, otherwise FALSE 4 | func int Spine_GetTestMode() { 5 | if (Spine_Initialized && Spine_GetTestModeFunc) { 6 | CALL__cdecl(Spine_GetTestModeFunc); 7 | return CALL_RetValAsInt(); 8 | }; 9 | return FALSE; 10 | }; 11 | -------------------------------------------------------------------------------- /scriptApi/Spine_Utils.d: -------------------------------------------------------------------------------- 1 | // returns the minimum of the two values a and b 2 | func int min(var int a, var int b) { 3 | if (a < b) { 4 | return a; 5 | } else { 6 | return b; 7 | }; 8 | }; 9 | 10 | // returns the maximum of the two values a and b 11 | func int max(var int a, var int b) { 12 | if (a > b) { 13 | return a; 14 | } else { 15 | return b; 16 | }; 17 | }; 18 | 19 | // sets value within the range of lo and hi 20 | // if value < lo => value = lo 21 | // if value > hi => value = hi 22 | func int clamp(var int value, var int lo, var int hi) { 23 | value = max(value, lo); 24 | value = min(value, hi); 25 | return value; 26 | }; 27 | 28 | // frees a library 29 | func void FreeLibrary (var int ptr) { 30 | var int freelib; 31 | freelib = FindKernelDllFunction("FreeLibrary"); 32 | 33 | if (!freelib) { 34 | return; 35 | }; 36 | 37 | CALL_PtrParam(ptr); 38 | CALL__stdcall(freelib); 39 | }; 40 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY(common) 2 | IF(WITH_TOOLS) 3 | IF(WITH_CLIENT) 4 | ADD_SUBDIRECTORY(argumentPrinter) 5 | ADD_SUBDIRECTORY(hashEvaluator) 6 | ADD_SUBDIRECTORY(imageResizer) 7 | ADD_SUBDIRECTORY(keyWrapper) 8 | ADD_SUBDIRECTORY(modChecker) 9 | ADD_SUBDIRECTORY(modCheckerListCreator) 10 | ADD_SUBDIRECTORY(multiHasher) 11 | ADD_SUBDIRECTORY(referenceFinder) 12 | ADD_SUBDIRECTORY(takeFinder) 13 | ADD_SUBDIRECTORY(ttsCreator) 14 | ADD_SUBDIRECTORY(unusedIDFinder) 15 | ADD_SUBDIRECTORY(variableChecker) 16 | ADD_SUBDIRECTORY(zipper) 17 | ENDIF(WITH_CLIENT) 18 | IF(WITH_SERVER) 19 | ADD_SUBDIRECTORY(databaseAdder) 20 | ENDIF(WITH_SERVER) 21 | IF(WITH_G2OCHECKER AND WIN32 AND "${VS_ARCH}" STREQUAL "32") 22 | ADD_SUBDIRECTORY(g2oChecker) 23 | ENDIF(WITH_G2OCHECKER AND WIN32 AND "${VS_ARCH}" STREQUAL "32") 24 | ENDIF(WITH_TOOLS) 25 | IF(WITH_API) 26 | ADD_SUBDIRECTORY(api) 27 | ADD_SUBDIRECTORY(input) 28 | ENDIF(WITH_API) 29 | IF(WITH_CLIENT) 30 | ADD_SUBDIRECTORY(cleanup) 31 | ADD_SUBDIRECTORY(client) 32 | ADD_SUBDIRECTORY(discord) 33 | ADD_SUBDIRECTORY(gui) 34 | ADD_SUBDIRECTORY(https) 35 | ADD_SUBDIRECTORY(security) 36 | ADD_SUBDIRECTORY(tests) # requires Qt 37 | ADD_SUBDIRECTORY(translator) 38 | ADD_SUBDIRECTORY(utils) 39 | ELSEIF(WITH_G2OCHECKER) 40 | ADD_SUBDIRECTORY(https) 41 | ENDIF(WITH_CLIENT) 42 | IF(WITH_SERVER) 43 | ADD_SUBDIRECTORY(server) 44 | ENDIF(WITH_SERVER) 45 | 46 | -------------------------------------------------------------------------------- /src/api/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | SET(includedir ${CMAKE_SOURCE_DIR}/include/api) 3 | 4 | INCLUDE_DIRECTORIES(${includedir}) 5 | 6 | SET(CommonSrc 7 | ${srcdir}/API.cpp 8 | ${srcdir}/APIMessage.cpp 9 | ${srcdir}/Friends.cpp 10 | ${srcdir}/Gamepad.cpp 11 | ${srcdir}/Multiplayer.cpp 12 | ${srcdir}/Statistics.cpp 13 | ${srcdir}/zString.cpp 14 | ) 15 | 16 | FILE(GLOB APIHeader ${includedir}/*.h) 17 | 18 | configure_file(${CMAKE_SOURCE_DIR}/media/Spine.vdf ${CMAKE_BINARY_DIR}/media/Spine.vdf COPYONLY) 19 | 20 | ADD_LIBRARY(SpineAPI${ARCH_POSTFIX} SHARED ${CommonSrc} ${APIHeader}) 21 | set_target_properties(SpineAPI${ARCH_POSTFIX} PROPERTIES POSITION_INDEPENDENT_CODE ON) 22 | 23 | target_link_libraries(SpineAPI${ARCH_POSTFIX} SpineCommon) 24 | target_link_libraries(SpineAPI${ARCH_POSTFIX} debug ${CLOCKUTILS_DEBUG_CLOCK_SOCKETS_LIBRARY} optimized ${CLOCKUTILS_RELEASE_CLOCK_SOCKETS_LIBRARY}) 25 | 26 | IF(WIN32) 27 | target_link_libraries(SpineAPI${ARCH_POSTFIX} ws2_32) 28 | ENDIF(WIN32) 29 | 30 | set_target_properties( 31 | SpineAPI${ARCH_POSTFIX} PROPERTIES FOLDER Client 32 | ) 33 | -------------------------------------------------------------------------------- /src/api/zString.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #include "api/zString.h" 20 | 21 | using namespace spine::api; 22 | 23 | zString::zString() : _vtbl(nullptr), _allocater(0), _ptr(new char[256]), _len(256), _res(256) { 24 | } 25 | 26 | zString::zString(const zString & other) : _vtbl(other._vtbl), _allocater(other._allocater), _ptr(other._ptr), _len(other._len), _res(other._res) { 27 | } 28 | 29 | zString::zString(const std::string & other) : _vtbl(nullptr), _allocater(0), _ptr(new char[256]), _len(static_cast(other.size())), _res(static_cast(other.size())) { 30 | strcpy(_ptr, other.data()); 31 | } 32 | 33 | zString::~zString() { 34 | delete[] _ptr; 35 | } 36 | -------------------------------------------------------------------------------- /src/argumentPrinter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | SET(ArgumentPrinterSrc 4 | ${srcdir}/main.cpp 5 | ) 6 | 7 | ADD_EXECUTABLE(ArgumentPrinter ${ArgumentPrinterSrc}) 8 | 9 | IF(UNIX) 10 | target_link_libraries(ArgumentPrinter pthread) 11 | ENDIF(UNIX) 12 | 13 | set_target_properties( 14 | ArgumentPrinter PROPERTIES FOLDER Tools 15 | ) 16 | -------------------------------------------------------------------------------- /src/argumentPrinter/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #include 20 | 21 | int main(const int argc, char ** argv) { 22 | std::ofstream out("log.txt"); 23 | for (int i = 1; i < argc; i++) { 24 | out << argv[i] << std::endl; 25 | } 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /src/cleanup/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include/client) 2 | 3 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 4 | 5 | FILE(GLOB CleanupSrc ${srcdir}/*.cpp) 6 | 7 | SET(ResourceFile ${srcdir}/resources/resources.qrc) 8 | 9 | SOURCE_GROUP(resources /resources/*) 10 | 11 | # add resources ... 12 | QT5_ADD_RESOURCES(QT_RESOURCE_FILES ${ResourceFile}) 13 | 14 | ADD_EXECUTABLE(cleanup ${CleanupSrc} ${QT_RESOURCE_FILES}) 15 | 16 | target_link_libraries(cleanup SpineUtils ${CLOCKUTILS_LIBRARIES} ${QT_LIBRARIES}) 17 | 18 | IF(UNIX) 19 | target_link_libraries(cleanup pthread) 20 | ENDIF(UNIX) 21 | 22 | set_target_properties( 23 | cleanup PROPERTIES FOLDER Client 24 | ) 25 | -------------------------------------------------------------------------------- /src/cleanup/resources/Lato-Semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/cleanup/resources/Lato-Semibold.ttf -------------------------------------------------------------------------------- /src/cleanup/resources/resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | ../../../css/styles.css 4 | Lato-Semibold.ttf 5 | 6 | -------------------------------------------------------------------------------- /src/client/DirValidator.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #include "DirValidator.h" 20 | 21 | #include 22 | 23 | using namespace spine; 24 | 25 | DirValidator::DirValidator() { 26 | } 27 | 28 | QValidator::State DirValidator::validate(QString & input, int &) const { 29 | return QDir(input).exists() ? QValidator::State::Acceptable : QValidator::State::Intermediate; 30 | } 31 | -------------------------------------------------------------------------------- /src/client/SavegameManager.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/client/SavegameManager.cpp -------------------------------------------------------------------------------- /src/client/resources/ClockworkOrigins_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/client/resources/ClockworkOrigins_Logo.png -------------------------------------------------------------------------------- /src/client/resources/Gothic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/client/resources/Gothic.ico -------------------------------------------------------------------------------- /src/client/resources/Gothic2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/client/resources/Gothic2.ico -------------------------------------------------------------------------------- /src/client/resources/Lato-Semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/client/resources/Lato-Semibold.ttf -------------------------------------------------------------------------------- /src/client/resources/Patreon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/client/resources/Patreon.jpg -------------------------------------------------------------------------------- /src/client/resources/Patreon_hover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/client/resources/Patreon_hover.jpg -------------------------------------------------------------------------------- /src/client/resources/SpineSplash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/client/resources/SpineSplash.png -------------------------------------------------------------------------------- /src/client/resources/donate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/client/resources/donate.png -------------------------------------------------------------------------------- /src/client/resources/donate_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/client/resources/donate_hover.png -------------------------------------------------------------------------------- /src/client/resources/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/client/resources/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/client/resources/invalidFileChars.txt: -------------------------------------------------------------------------------- 1 | äöüß#[] -------------------------------------------------------------------------------- /src/client/resources/languages/de-DE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/client/resources/languages/de-DE.png -------------------------------------------------------------------------------- /src/client/resources/languages/en-US.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/client/resources/languages/en-US.png -------------------------------------------------------------------------------- /src/client/resources/languages/pl-PL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/client/resources/languages/pl-PL.png -------------------------------------------------------------------------------- /src/client/resources/languages/ru-RU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/client/resources/languages/ru-RU.png -------------------------------------------------------------------------------- /src/client/resources/stylesheet-branch-closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/client/resources/stylesheet-branch-closed.png -------------------------------------------------------------------------------- /src/client/resources/stylesheet-branch-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/client/resources/stylesheet-branch-open.png -------------------------------------------------------------------------------- /src/client/resources/svg/add.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/client/resources/svg/check.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/client/resources/svg/close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/client/resources/svg/download.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/client/resources/svg/edit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/client/resources/svg/flag.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/client/resources/svg/loading.svg: -------------------------------------------------------------------------------- 1 | 3 | 6 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /src/client/resources/svg/remove.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/client/resources/svg/star-edit-full.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/client/resources/svg/star-edit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/client/resources/svg/star-full.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/client/resources/svg/star-half.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/client/resources/svg/star.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/client/widgets/FAQEntry.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #include "widgets/FAQEntry.h" 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | using namespace spine; 26 | using namespace spine::widgets; 27 | 28 | FAQEntry::FAQEntry(QString question, QString answer, QWidget * par) : QWidget(par) { 29 | QVBoxLayout * l = new QVBoxLayout(); 30 | l->setAlignment(Qt::AlignTop); 31 | 32 | QLabel * questionLabel = new QLabel(question, this); 33 | questionLabel->setWordWrap(true); 34 | questionLabel->setProperty("FAQQuestion", true); 35 | questionLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); 36 | QLabel * answerLabel = new QLabel(answer, this); 37 | answerLabel->setWordWrap(true); 38 | 39 | l->addWidget(questionLabel); 40 | l->addWidget(answerLabel); 41 | 42 | setLayout(l); 43 | 44 | setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); 45 | } 46 | -------------------------------------------------------------------------------- /src/common/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | SET(includedir ${CMAKE_SOURCE_DIR}/include/common) 3 | 4 | INCLUDE_DIRECTORIES(${includedir}) 5 | 6 | FILE(GLOB_RECURSE CommonSrc ${srcdir}/*.cpp) 7 | FILE(GLOB_RECURSE CommonHeader ${includedir}/*.h) 8 | 9 | ADD_LIBRARY(SpineCommon STATIC ${CommonSrc} ${CommonHeader}) 10 | 11 | target_link_libraries(SpineCommon ${OPENSSL_LIBRARIES}) 12 | 13 | IF(WIN32) 14 | target_link_libraries(SpineCommon debug ${BOOST_DEBUG_BOOST_SERIALIZATION_LIBRARY} optimized ${BOOST_RELEASE_BOOST_SERIALIZATION_LIBRARY}) 15 | target_link_libraries(SpineCommon debug ${CLOCKUTILS_DEBUG_CLOCK_SOCKETS_LIBRARY} optimized ${CLOCKUTILS_RELEASE_CLOCK_SOCKETS_LIBRARY}) 16 | ELSE(UNIX) 17 | target_link_libraries(SpineCommon ${BOOST_LIBRARIES}) 18 | ENDIF(WIN32) 19 | 20 | set_target_properties( 21 | SpineCommon PROPERTIES FOLDER Libraries 22 | ) 23 | -------------------------------------------------------------------------------- /src/databaseAdder/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include/server) 4 | 5 | SET(DatabaseAdderSrc 6 | ${srcdir}/main.cpp 7 | ${srcdir}/../server/MariaDBWrapper.cpp 8 | ) 9 | 10 | ADD_EXECUTABLE(DatabaseAdder ${DatabaseAdderSrc}) 11 | 12 | target_link_libraries(DatabaseAdder ${CLOCKWORK_LIBRARIES} ${MARIADB_LIBRARIES}) 13 | 14 | IF(UNIX) 15 | target_link_libraries(DatabaseAdder pthread) 16 | ENDIF(UNIX) 17 | 18 | set_target_properties( 19 | DatabaseAdder PROPERTIES FOLDER Tools 20 | ) 21 | -------------------------------------------------------------------------------- /src/databaseAdder/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #include 20 | 21 | #include "MariaDBWrapper.h" 22 | #include "SpineServerConfig.h" 23 | 24 | int main(int, char ** argv) { 25 | spine::server::MariaDBWrapper database; 26 | if (!database.connect("localhost", DATABASEUSER, DATABASEPASSWORD, SPINEDATABASE, 0)) { 27 | return 1; 28 | } 29 | std::fstream fs; 30 | fs.open(argv[1], std::fstream::in); 31 | while (fs.good()) { 32 | std::string line; 33 | std::getline(fs, line); 34 | if (!line.empty()) { 35 | bool b = database.query(line); 36 | static_cast(b); 37 | } 38 | } 39 | return 0; 40 | } 41 | -------------------------------------------------------------------------------- /src/discord/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | SET(includedir ${CMAKE_SOURCE_DIR}/include/discord) 3 | 4 | INCLUDE_DIRECTORIES(${includedir}) 5 | 6 | FILE(GLOB DiscordHeader ${includedir}/*.h) 7 | FILE(GLOB DiscordSrc ${srcdir}/*.cpp) 8 | FILE(GLOB DiscordDepSrc ${DISCORD_ROOT}/src/*.cpp) 9 | 10 | ADD_LIBRARY(SpineDiscord STATIC ${DiscordSrc} ${DiscordDepSrc} ${DiscordHeader}) 11 | 12 | target_link_libraries(SpineDiscord ${DISCORD_LIBRARIES}) 13 | 14 | set_target_properties( 15 | SpineDiscord PROPERTIES FOLDER Libraries 16 | ) 17 | -------------------------------------------------------------------------------- /src/g2oChecker/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | SET(G2OCheckerSrc 4 | ${srcdir}/main.cpp 5 | ) 6 | 7 | ADD_EXECUTABLE(G2OChecker ${G2OCheckerSrc}) 8 | 9 | target_link_libraries(G2OChecker SpineHttps ${QT_LIBRARIES}) 10 | target_link_libraries(G2OChecker debug ${BOOST_DEBUG_BOOST_SYSTEM_LIBRARY} optimized ${BOOST_RELEASE_BOOST_SYSTEM_LIBRARY}) 11 | target_link_libraries(G2OChecker debug ${ZIPPER_DEBUG_LIBRARIES} optimized ${ZIPPER_RELEASE_LIBRARIES}) 12 | target_link_libraries(G2OChecker debug ${ZLIB_DEBUG_LIBRARIES} optimized ${ZLIB_RELEASE_LIBRARIES}) 13 | 14 | IF(UNIX) 15 | target_link_libraries(G2OChecker pthread) 16 | ENDIF(UNIX) 17 | 18 | set_target_properties( 19 | G2OChecker PROPERTIES FOLDER Tools 20 | ) 21 | -------------------------------------------------------------------------------- /src/gui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | SET(includedir ${CMAKE_SOURCE_DIR}/include/gui) 3 | 4 | INCLUDE_DIRECTORIES(${includedir}) 5 | 6 | FILE(GLOB SpineGuiSrc ${srcdir}/*.cpp) 7 | FILE(GLOB SpineGuiHeader ${includedir}/*.h) 8 | 9 | ADD_LIBRARY(SpineGui STATIC ${SpineGuiSrc} ${SpineGuiHeader}) 10 | 11 | target_link_libraries(SpineGui SpineHttps SpineUtils ${QT_LIBRARIES}) 12 | 13 | set_target_properties( 14 | SpineGui PROPERTIES FOLDER Libraries 15 | ) 16 | -------------------------------------------------------------------------------- /src/gui/OverlayMessageHandler.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #include "gui/OverlayMessageHandler.h" 20 | 21 | using namespace spine::gui; 22 | 23 | OverlayMessageHandler * OverlayMessageHandler::getInstance() { 24 | static OverlayMessageHandler instance; 25 | return &instance; 26 | } 27 | 28 | void OverlayMessageHandler::showMessage(const QImage &, const QString &) { 29 | // TODO: as soon as we have some overlay, display this message/queue it in case another one is displayed at the moment 30 | } 31 | -------------------------------------------------------------------------------- /src/hashEvaluator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | SET(HashEvaluatorSrc 4 | ${srcdir}/main.cpp 5 | ) 6 | 7 | ADD_EXECUTABLE(HashEvaluator ${HashEvaluatorSrc}) 8 | 9 | target_link_libraries(HashEvaluator SpineUtils ${QT_LIBRARIES}) 10 | target_link_libraries(HashEvaluator debug ${BOOST_DEBUG_BOOST_IOSTREAMS_LIBRARY} optimized ${BOOST_RELEASE_BOOST_IOSTREAMS_LIBRARY}) 11 | target_link_libraries(HashEvaluator debug ${ZLIB_DEBUG_LIBRARIES} optimized ${ZLIB_RELEASE_LIBRARIES}) 12 | 13 | IF(UNIX) 14 | target_link_libraries(HashEvaluator pthread) 15 | ENDIF(UNIX) 16 | 17 | set_target_properties( 18 | HashEvaluator PROPERTIES FOLDER Tools 19 | ) 20 | -------------------------------------------------------------------------------- /src/hashEvaluator/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #include 20 | 21 | #include "utils/Compression.h" 22 | #include "utils/Hashing.h" 23 | 24 | #include 25 | 26 | int main(const int argc, char ** argv) { 27 | if (argc != 2) { 28 | return 1; 29 | } 30 | const QString fileName(argv[1]); 31 | if (QFileInfo(fileName).suffix() == "z") { 32 | spine::utils::Compression::uncompress(fileName, false); 33 | } else { 34 | QString hash; 35 | const bool b = spine::utils::Hashing::hash(fileName, hash); 36 | 37 | if (!b) return 1; 38 | 39 | std::cout << hash.toStdString() << std::endl; 40 | 41 | spine::utils::Compression::compress(fileName, false); 42 | } 43 | return 0; 44 | } 45 | -------------------------------------------------------------------------------- /src/https/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | SET(includedir ${CMAKE_SOURCE_DIR}/include/https) 3 | 4 | INCLUDE_DIRECTORIES(${includedir}) 5 | 6 | FILE(GLOB SpineHttpsSrc ${srcdir}/*.cpp) 7 | FILE(GLOB SpineHttpsHeader ${includedir}/*.h) 8 | 9 | ADD_LIBRARY(SpineHttps STATIC ${SpineHttpsSrc} ${SpineHttpsHeader}) 10 | 11 | target_link_libraries(SpineHttps ${OPENSSL_LIBRARIES}) 12 | target_link_libraries(SpineHttps SpineUtils) 13 | 14 | set_target_properties( 15 | SpineHttps PROPERTIES FOLDER Libraries 16 | ) 17 | -------------------------------------------------------------------------------- /src/imageResizer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | SET(ImageResizerSrc 4 | ${srcdir}/main.cpp 5 | ) 6 | 7 | ADD_EXECUTABLE(ImageResizer ${ImageResizerSrc}) 8 | 9 | target_link_libraries(ImageResizer ${QT_LIBRARIES}) 10 | 11 | IF(UNIX) 12 | target_link_libraries(ImageResizer pthread) 13 | ENDIF(UNIX) 14 | 15 | set_target_properties( 16 | ImageResizer PROPERTIES FOLDER Tools 17 | ) 18 | -------------------------------------------------------------------------------- /src/imageResizer/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | int main(int argc, char ** argv) { 24 | QGuiApplication app(argc, argv); 25 | argc--; 26 | argv++; 27 | while (argc) { 28 | QPixmap pixmap(argv[0]); 29 | QImage img = pixmap.scaled(QSize(64, 64), Qt::KeepAspectRatio, Qt::SmoothTransformation).toImage(); 30 | QFileInfo fi(argv[0]); 31 | img.save(QString(argv[0]).replace(fi.suffix(), "png")); 32 | argc--; 33 | argv++; 34 | } 35 | return 0; 36 | } 37 | -------------------------------------------------------------------------------- /src/input/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | SET(includedir ${CMAKE_SOURCE_DIR}/include/input) 3 | 4 | INCLUDE_DIRECTORIES(${includedir}) 5 | 6 | FILE(GLOB SpineInputSrc ${srcdir}/*.cpp) 7 | FILE(GLOB SpineInputHeader ${includedir}/*.h) 8 | 9 | ADD_LIBRARY(SpineInput SHARED ${SpineInputSrc} ${SpineInputHeader}) 10 | 11 | target_link_libraries(SpineInput ${QT_LIBRARIES}) 12 | 13 | set_target_properties( 14 | SpineInput PROPERTIES FOLDER Libraries 15 | ) 16 | -------------------------------------------------------------------------------- /src/keyWrapper/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | SET(KeyWrapperSrc 4 | ${srcdir}/main.cpp 5 | ) 6 | 7 | ADD_EXECUTABLE(KeyWrapper ${KeyWrapperSrc}) 8 | 9 | IF(UNIX) 10 | target_link_libraries(KeyWrapper pthread) 11 | ENDIF(UNIX) 12 | 13 | set_target_properties( 14 | KeyWrapper PROPERTIES FOLDER Tools 15 | ) 16 | -------------------------------------------------------------------------------- /src/keyWrapper/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #include 20 | #include 21 | 22 | int main(int, char ** argv) { 23 | std::ofstream out("RSAKey.h"); 24 | std::ifstream in(argv[1]); 25 | out << "#pragma once\n"; 26 | out << "\n"; 27 | out << "namespace spine {\n"; 28 | out << "namespace common {\n"; 29 | out << "\n"; 30 | out << "\tstatic char RSA_PUB_KEY[] = { "; 31 | while (in.good()) { 32 | const int i = in.get(); 33 | std::cout << i << std::endl; 34 | out << "0x" << std::hex << i; 35 | if (in.good()) { 36 | out << ", "; 37 | } 38 | } 39 | out << " };\n"; 40 | out << "\n"; 41 | out << "} /* namespace common */\n"; 42 | out << "} /* namespace spine */\n"; 43 | out << "\n"; 44 | return 0; 45 | } 46 | -------------------------------------------------------------------------------- /src/modChecker/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | SET(ModCheckerSrc 4 | ${srcdir}/main.cpp 5 | ) 6 | 7 | ADD_EXECUTABLE(ModChecker ${ModCheckerSrc}) 8 | 9 | target_link_libraries(ModChecker SpineUtils ${BOOST_LIBRARIES} ${QT_LIBRARIES} ${ZLIB_LIBRARIES}) 10 | 11 | IF(UNIX) 12 | target_link_libraries(ModChecker pthread) 13 | ENDIF(UNIX) 14 | 15 | set_target_properties( 16 | ModChecker PROPERTIES FOLDER Tools 17 | ) 18 | -------------------------------------------------------------------------------- /src/modCheckerListCreator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | SET(ModCheckerListCreatorSrc 4 | ${srcdir}/main.cpp 5 | ) 6 | 7 | ADD_EXECUTABLE(ModCheckerListCreator ${ModCheckerListCreatorSrc}) 8 | 9 | target_link_libraries(ModCheckerListCreator SpineUtils ${BOOST_LIBRARIES} ${QT_LIBRARIES} ${ZLIB_LIBRARIES}) 10 | 11 | IF(UNIX) 12 | target_link_libraries(ModCheckerListCreator pthread) 13 | ENDIF(UNIX) 14 | 15 | set_target_properties( 16 | ModCheckerListCreator PROPERTIES FOLDER Tools 17 | ) 18 | -------------------------------------------------------------------------------- /src/multiHasher/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | SET(MultiHasherSrc 4 | ${srcdir}/main.cpp 5 | ) 6 | 7 | ADD_EXECUTABLE(MultiHasher ${MultiHasherSrc}) 8 | 9 | target_link_libraries(MultiHasher SpineUtils ${QT_LIBRARIES}) 10 | target_link_libraries(MultiHasher debug ${BOOST_DEBUG_BOOST_IOSTREAMS_LIBRARY} optimized ${BOOST_RELEASE_BOOST_IOSTREAMS_LIBRARY}) 11 | target_link_libraries(MultiHasher debug ${ZLIB_DEBUG_LIBRARIES} optimized ${ZLIB_RELEASE_LIBRARIES}) 12 | 13 | IF(UNIX) 14 | target_link_libraries(MultiHasher pthread) 15 | ENDIF(UNIX) 16 | 17 | set_target_properties( 18 | MultiHasher PROPERTIES FOLDER Tools 19 | ) 20 | -------------------------------------------------------------------------------- /src/referenceFinder/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | SET(ReferenceFinderSrc 4 | ${srcdir}/main.cpp 5 | ) 6 | 7 | ADD_EXECUTABLE(ReferenceFinder ${ReferenceFinderSrc}) 8 | 9 | target_link_libraries(ReferenceFinder ${QT_LIBRARIES}) 10 | 11 | IF(UNIX) 12 | target_link_libraries(ReferenceFinder pthread) 13 | ENDIF(UNIX) 14 | 15 | set_target_properties( 16 | ReferenceFinder PROPERTIES FOLDER Tools 17 | ) 18 | -------------------------------------------------------------------------------- /src/security/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | SET(includedir ${CMAKE_SOURCE_DIR}/include/security) 3 | 4 | INCLUDE_DIRECTORIES(${includedir}) 5 | 6 | FILE(GLOB SpineSecuritySrc ${srcdir}/*.cpp) 7 | FILE(GLOB SpineSecurityHeader ${includedir}/*.h) 8 | 9 | ADD_LIBRARY(SpineSecurity STATIC ${SpineSecuritySrc} ${SpineSecurityHeader}) 10 | 11 | set_target_properties( 12 | SpineSecurity PROPERTIES FOLDER Libraries 13 | ) 14 | -------------------------------------------------------------------------------- /src/server/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | SET(includedir ${CMAKE_SOURCE_DIR}/include/server) 3 | 4 | INCLUDE_DIRECTORIES(${includedir}) 5 | 6 | FILE(GLOB SpineServerSrc ${srcdir}/*.cpp) 7 | FILE(GLOB ServerHeader ${includedir}/*.h) 8 | 9 | ADD_EXECUTABLE(SpineServer ${SpineServerSrc} ${ServerHeader}) 10 | 11 | target_link_libraries(SpineServer SpineCommon ${MARIADB_LIBRARIES} ${OPENSSL_LIBRARIES}) 12 | 13 | IF(WIN32) 14 | target_link_libraries(SpineServer debug ${BOOST_DEBUG_BOOST_FILESYSTEM_LIBRARY} optimized ${BOOST_RELEASE_BOOST_FILESYSTEM_LIBRARY}) 15 | target_link_libraries(SpineServer debug ${BOOST_DEBUG_BOOST_SERIALIZATION_LIBRARY} optimized ${BOOST_RELEASE_BOOST_SERIALIZATION_LIBRARY}) 16 | target_link_libraries(SpineServer debug ${BOOST_DEBUG_BOOST_SYSTEM_LIBRARY} optimized ${BOOST_RELEASE_BOOST_SYSTEM_LIBRARY}) 17 | target_link_libraries(SpineServer debug ${CLOCKUTILS_DEBUG_CLOCK_SOCKETS_LIBRARY} optimized ${CLOCKUTILS_RELEASE_CLOCK_SOCKETS_LIBRARY}) 18 | target_link_libraries(SpineServer debug ${TINYXML_DEBUG_LIBRARIES} optimized ${TINYXML_RELEASE_LIBRARIES}) 19 | ELSE(UNIX) 20 | target_link_libraries(SpineServer ${BOOST_LIBRARIES}) 21 | target_link_libraries(SpineServer ${CLOCKUTILS_LIBRARIES}) 22 | target_link_libraries(SpineServer ${TINYXML_LIBRARIES}) 23 | ENDIF(WIN32) 24 | 25 | IF(UNIX) 26 | target_link_libraries(SpineServer pthread) 27 | ENDIF(UNIX) 28 | 29 | IF(WIN32) 30 | target_link_libraries(SpineServer ws2_32) 31 | ENDIF(WIN32) 32 | 33 | set_target_properties( 34 | SpineServer PROPERTIES FOLDER Server 35 | ) 36 | -------------------------------------------------------------------------------- /src/server/TranslatorServer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/server/TranslatorServer.cpp -------------------------------------------------------------------------------- /src/server/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #include "Server.h" 20 | 21 | using namespace spine::server; 22 | 23 | int main(int, char **) { 24 | Server server; 25 | return server.run(); 26 | } 27 | -------------------------------------------------------------------------------- /src/takeFinder/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | SET(TakeFinderSrc 4 | ${srcdir}/main.cpp 5 | ) 6 | 7 | ADD_EXECUTABLE(TakeFinder ${TakeFinderSrc}) 8 | 9 | target_link_libraries(TakeFinder ${QT_LIBRARIES}) 10 | 11 | IF(UNIX) 12 | target_link_libraries(TakeFinder pthread) 13 | ENDIF(UNIX) 14 | 15 | set_target_properties( 16 | TakeFinder PROPERTIES FOLDER Tools 17 | ) 18 | -------------------------------------------------------------------------------- /src/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | SET(includedir ${CMAKE_SOURCE_DIR}/include/client) 3 | 4 | INCLUDE_DIRECTORIES(${includedir}) 5 | 6 | SET(UnitTesterSrc 7 | ${srcdir}/main.cpp 8 | 9 | ${srcdir}/test_GothicParser.cpp 10 | ${srcdir}/test_GothicVdf.cpp 11 | ) 12 | 13 | ADD_EXECUTABLE(UnitTester ${UnitTesterSrc} ${UnitTesterGuiHeader}) 14 | 15 | target_link_libraries(UnitTester debug ${GTEST_DEBUG_LIBRARIES} optimized ${GTEST_RELEASE_LIBRARIES}) 16 | target_link_libraries(UnitTester debug ${BOOST_DEBUG_BOOST_IOSTREAMS_LIBRARY} optimized ${BOOST_RELEASE_BOOST_IOSTREAMS_LIBRARY}) 17 | target_link_libraries(UnitTester ${QT_LIBRARIES}) 18 | target_link_libraries(UnitTester SpineUtils) 19 | target_link_libraries(UnitTester SpineTranslator) 20 | 21 | IF(UNIX) 22 | target_link_libraries(UnitTester pthread) 23 | ENDIF(UNIX) 24 | 25 | IF(WIN32) 26 | target_link_libraries(UnitTester ws2_32) 27 | ENDIF(WIN32) 28 | 29 | ADD_DEFINITIONS(-DVDF_PATH="${CMAKE_SOURCE_DIR}/media/Spine.vdf") 30 | ADD_DEFINITIONS(-DTEST_RESOURCES_PATH="${CMAKE_CURRENT_SOURCE_DIR}/resources") 31 | 32 | LINK_TO_FOLDER("${CMAKE_CURRENT_SOURCE_DIR}/resources" "${CMAKE_BINARY_DIR}/bin/Debug/tests") 33 | LINK_TO_FOLDER("${CMAKE_CURRENT_SOURCE_DIR}/resources" "${CMAKE_BINARY_DIR}/bin/RelWithDebInfo/tests") 34 | LINK_TO_FOLDER("${CMAKE_CURRENT_SOURCE_DIR}/resources" "${CMAKE_BINARY_DIR}/bin/Release/tests") 35 | 36 | set_target_properties( 37 | UnitTester PROPERTIES FOLDER Tests 38 | ) 39 | 40 | ADD_TEST(NAME TestUnitTests COMMAND $ WORKING_DIRECTORY $/..) 41 | -------------------------------------------------------------------------------- /src/tests/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2018 Clockwork Origins 18 | 19 | #include "gtest/gtest.h" 20 | 21 | int main(int argc, char ** argv) { 22 | testing::InitGoogleTest(&argc, argv); 23 | return RUN_ALL_TESTS(); 24 | } 25 | -------------------------------------------------------------------------------- /src/tests/resources/SpineTest.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/SpineTest.mod -------------------------------------------------------------------------------- /src/tests/resources/test1/dialogs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test1/dialogs.txt -------------------------------------------------------------------------------- /src/tests/resources/test1/names.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test1/names.txt -------------------------------------------------------------------------------- /src/tests/resources/test1/test.d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test1/test.d -------------------------------------------------------------------------------- /src/tests/resources/test1/texts.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test1/texts.txt -------------------------------------------------------------------------------- /src/tests/resources/test2/dialogs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test2/dialogs.txt -------------------------------------------------------------------------------- /src/tests/resources/test2/names.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test2/names.txt -------------------------------------------------------------------------------- /src/tests/resources/test2/test.d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test2/test.d -------------------------------------------------------------------------------- /src/tests/resources/test2/texts.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test2/texts.txt -------------------------------------------------------------------------------- /src/tests/resources/test3/dialogs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test3/dialogs.txt -------------------------------------------------------------------------------- /src/tests/resources/test3/names.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test3/names.txt -------------------------------------------------------------------------------- /src/tests/resources/test3/test.d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test3/test.d -------------------------------------------------------------------------------- /src/tests/resources/test3/texts.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test3/texts.txt -------------------------------------------------------------------------------- /src/tests/resources/test4/dialogs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test4/dialogs.txt -------------------------------------------------------------------------------- /src/tests/resources/test4/names.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test4/names.txt -------------------------------------------------------------------------------- /src/tests/resources/test4/test.d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test4/test.d -------------------------------------------------------------------------------- /src/tests/resources/test4/texts.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test4/texts.txt -------------------------------------------------------------------------------- /src/tests/resources/test5/dialogs.txt: -------------------------------------------------------------------------------- 1 | Von hier aus sehe ich nur den Zaun. 2 | Ich sollte mir einen anderen Weg suchen. -------------------------------------------------------------------------------- /src/tests/resources/test5/names.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test5/names.txt -------------------------------------------------------------------------------- /src/tests/resources/test5/test.d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test5/test.d -------------------------------------------------------------------------------- /src/tests/resources/test5/texts.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/tests/resources/test5/texts.txt -------------------------------------------------------------------------------- /src/translator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | SET(includedir ${CMAKE_SOURCE_DIR}/include/translator) 3 | 4 | INCLUDE_DIRECTORIES(${includedir}) 5 | 6 | FILE(GLOB SpineTranslatorSrc ${srcdir}/*.cpp) 7 | FILE(GLOB SpineTranslatorHeader ${includedir}/*.h) 8 | 9 | ADD_LIBRARY(SpineTranslator STATIC ${SpineTranslatorSrc} ${SpineTranslatorHeader}) 10 | 11 | TARGET_LINK_LIBRARIES(SpineTranslator SpineCommon SpineGui SpineUtils) 12 | 13 | set_target_properties( 14 | SpineTranslator PROPERTIES FOLDER Libraries 15 | ) 16 | -------------------------------------------------------------------------------- /src/ttsCreator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | SET(TTSCreatorSrc 4 | ${srcdir}/main.cpp 5 | ) 6 | 7 | ADD_EXECUTABLE(TTSCreator ${TTSCreatorSrc}) 8 | 9 | target_link_libraries(TTSCreator ${QT_LIBRARIES} ${TINYXML_LIBRARIES}) 10 | 11 | IF(UNIX) 12 | target_link_libraries(TTSCreator pthread) 13 | ENDIF(UNIX) 14 | 15 | set_target_properties( 16 | TTSCreator PROPERTIES FOLDER Tools 17 | ) 18 | -------------------------------------------------------------------------------- /src/unusedIDFinder/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | SET(UnusedIDFinderSrc 4 | ${srcdir}/main.cpp 5 | ) 6 | 7 | ADD_EXECUTABLE(UnusedIDFinder ${UnusedIDFinderSrc}) 8 | 9 | target_link_libraries(UnusedIDFinder ${QT_LIBRARIES}) 10 | 11 | IF(UNIX) 12 | target_link_libraries(UnusedIDFinder pthread) 13 | ENDIF(UNIX) 14 | 15 | set_target_properties( 16 | UnusedIDFinder PROPERTIES FOLDER Tools 17 | ) 18 | -------------------------------------------------------------------------------- /src/utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | SET(includedir ${CMAKE_SOURCE_DIR}/include/utils) 3 | 4 | SET(ResourceFile ${srcdir}/resources.qrc) 5 | 6 | INCLUDE_DIRECTORIES(${includedir}) 7 | 8 | FILE(GLOB SpineUtilsSrc ${srcdir}/*.cpp) 9 | FILE(GLOB SpineUtilsHeader ${includedir}/*.h) 10 | 11 | ADD_LIBRARY(SpineUtils STATIC ${SpineUtilsSrc} ${SpineUtilsHeader} ${ResourceFile}) 12 | 13 | target_link_libraries(SpineUtils ${SQLITE3_LIBRARIES}) 14 | 15 | IF(WIN32) 16 | target_link_libraries(SpineUtils debug ${BOOST_DEBUG_BOOST_SYSTEM_LIBRARY} optimized ${BOOST_RELEASE_BOOST_SYSTEM_LIBRARY}) 17 | target_link_libraries(SpineUtils debug ${CLOCKUTILS_DEBUG_CLOCK_LOG_LIBRARY} optimized ${CLOCKUTILS_RELEASE_CLOCK_LOG_LIBRARY}) 18 | target_link_libraries(SpineUtils debug ${ZIPPER_DEBUG_LIBRARIES} optimized ${ZIPPER_RELEASE_LIBRARIES}) 19 | target_link_libraries(SpineUtils debug ${ZLIB_DEBUG_LIBRARIES} optimized ${ZLIB_RELEASE_LIBRARIES}) 20 | ELSE(UNIX) 21 | target_link_libraries(SpineUtils ${BOOST_LIBRARIES}) 22 | target_link_libraries(SpineUtils ${CLOCKUTILS_LIBRARIES}) 23 | target_link_libraries(SpineUtils ${ZIPPER_LIBRARIES}) 24 | target_link_libraries(SpineUtils ${ZLIB_LIBRARIES}) 25 | ENDIF(WIN32) 26 | 27 | set_target_properties( 28 | SpineUtils PROPERTIES FOLDER Libraries 29 | ) 30 | -------------------------------------------------------------------------------- /src/utils/FileLogger.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This file is part of Spine. 3 | 4 | Spine is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | Spine is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with Spine. If not, see . 16 | */ 17 | // Copyright 2020 Clockwork Origins 18 | 19 | #include "FileLogger.h" 20 | 21 | using namespace spine::utils; 22 | 23 | FileLogger::FileLogger(const std::string & path) : _fileStream(path) { 24 | } 25 | 26 | clockUtils::log::SinkWrapper & FileLogger::operator<<(const std::string & str) { 27 | _fileStream << str; 28 | _fileStream.flush(); 29 | return *this; 30 | } 31 | 32 | bool FileLogger::isSame(void * sink) const { 33 | return sink == this; 34 | } 35 | -------------------------------------------------------------------------------- /src/utils/g1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClockworkOrigins/Spine/cc401fb0e6863e1e691435aaf85d65d980ca8894/src/utils/g1.txt -------------------------------------------------------------------------------- /src/utils/resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | g1.txt 4 | g2.txt 5 | 6 | -------------------------------------------------------------------------------- /src/variableChecker/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | SET(VariableCheckerSrc 4 | ${srcdir}/main.cpp 5 | ) 6 | 7 | ADD_EXECUTABLE(VariableChecker ${VariableCheckerSrc}) 8 | 9 | target_link_libraries(VariableChecker SpineUtils ${BOOST_LIBRARIES} ${QT_LIBRARIES} ${ZLIB_LIBRARIES}) 10 | 11 | IF(UNIX) 12 | target_link_libraries(VariableChecker pthread) 13 | ENDIF(UNIX) 14 | 15 | set_target_properties( 16 | VariableChecker PROPERTIES FOLDER Tools 17 | ) 18 | -------------------------------------------------------------------------------- /src/zipper/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) 2 | 3 | SET(ZipperSrc 4 | ${srcdir}/main.cpp 5 | ) 6 | 7 | ADD_EXECUTABLE(Zipper ${ZipperSrc}) 8 | 9 | target_link_libraries(Zipper SpineUtils ${BOOST_LIBRARIES} ${QT_LIBRARIES} ${ZIPPER_LIBRARIES} ${ZLIB_LIBRARIES}) 10 | 11 | IF(UNIX) 12 | target_link_libraries(Zipper pthread) 13 | ENDIF(UNIX) 14 | 15 | set_target_properties( 16 | Zipper PROPERTIES FOLDER Tools 17 | ) 18 | -------------------------------------------------------------------------------- /tutorials/Friends.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \input{header.tex} 3 | 4 | \title{Spine Tutorial 7 \\ Freunde} 5 | 6 | \begin{document} 7 | 8 | \section{Voraussetzungen} 9 | 10 | \begin{enumerate} 11 | \item Ikarus Scriptpaket 12 | \item LeGo Scriptpaket 13 | \item Spine Scriptpaket Version 1.10.0+ 14 | \item Tutorial 1 - Initialisierung 15 | \end{enumerate} 16 | 17 | \section{Einleitung} 18 | 19 | Dieses Tutorial befasst sich mit dem Abfragen der Freunde eines Spielers. Benötigt wird das Modul \textit{SPINE\_MODULE\_FRIENDS}. Nützlich sind Freunde z.B. für gezieltes Matchmaking mit Freunden. 20 | 21 | \section{Freunde} 22 | 23 | Freunde kann man auf Spine einfach anfragen. Wenn der angefragte die Freundschaft annimmt, wird die Freundschaft auf der Freundeseite in Spine angezeigt und kann ebenfalls über die Scripts abgefragt werden. 24 | 25 | \section{Die Funktionen} 26 | 27 | Die verschiedenen Funktionen des Freunde-Modul sollen hier kurz vorgestellt werden. 28 | 29 | \subsection{Spine\_GetFriendCount} 30 | 31 | Mit Spine\_GetFriendCount lässt sich abfragen, wie viele Freunde der User hat. Das ist nötig, um zu wissen, auf wie viele Freunde man zugreifen kann. 32 | 33 | \subsection{Spine\_GetFriendName} 34 | 35 | Mit Spine\_GetFriendName lässt sich der Names eines Freundes abfragen. Die Freunde sind alphabetisch sortiert und es gibt Spine\_GetFriendCount viele. Angesprochen werden sie über ihren Index, beginnend bei 0, d.h. der höchste Index ist Spine\_GetFriendCount - 1. Das bedeutet, dass man mit 36 | 37 | \begin{lstlisting} 38 | Spine_GetFriendName(0); 39 | \end{lstlisting} 40 | 41 | den Namen des ersten Freundes abfragen kann. 42 | 43 | \end{document} 44 | -------------------------------------------------------------------------------- /tutorials/header.tex: -------------------------------------------------------------------------------- 1 | \usepackage{color} 2 | \usepackage{accsupp} 3 | \usepackage{hyperref} 4 | \usepackage[ngerman]{babel} 5 | \usepackage[utf8]{inputenc} 6 | \usepackage[T1]{fontenc} 7 | \definecolor{bisque}{rgb}{0.8,0.8,0.92} 8 | \definecolor{green}{rgb}{0.1,0.6,0.2} 9 | \definecolor{brown}{rgb}{0.8,0.4,0.3} 10 | 11 | \usepackage{listings} 12 | \lstdefinestyle{basic} 13 | { 14 | basicstyle=\ttfamily, % tiny,scriptsize,footnotesize,small,normalsize,large,Large,LARGE,huge,Huge 15 | stringstyle=\color{green}\ttfamily, 16 | frame=lines, % single none 17 | captionpos=b, 18 | columns=fullflexible, % to prevent spaces between characters on copying 19 | resetmargins=true, 20 | showspaces=false, % display special space character 21 | showstringspaces=false, % display special space character in strings 22 | keepspaces=true, % to copy spaces (not for leading spaces) 23 | backgroundcolor=\color{bisque}, % background color 24 | numbers=left, % linenumbers 25 | numberstyle=\noncopynumber, % line numbers are not copyable 26 | keywordstyle=\color{blue}, % keyword color 27 | breaklines=true, 28 | tabsize=2, 29 | commentstyle=\color{brown} 30 | } 31 | \newcommand{\noncopynumber}[1]{% 32 | \BeginAccSupp{method=escape,ActualText={}}% 33 | #1% 34 | \EndAccSupp{}% 35 | } 36 | 37 | 38 | -------------------------------------------------------------------------------- /tutorials/tutorial_template.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | 3 | \input{../header.tex} 4 | 5 | \title{insert catchy title} 6 | 7 | \begin{document} 8 | 9 | \section{Requirements} 10 | 11 | Basic knowledge required to understand this tutorial, e.g. other tutorial this one is based on. 12 | 13 | \section{Introduction} 14 | 15 | Basic overview about the topic and the goal of this tutorial. 16 | 17 | \section{Tutorial} 18 | 19 | The complete tutorial\\ 20 | 21 | Use Listings \begin{lstlisting}[language=C++, style=basic, caption={register objects}, label=code:registerGO] 22 | api::ObjectFacade * of = api::EngineController::getObjectFacade(); 23 | of->registerGOTemplate("myTemp", TemplateObj::createGO); 24 | \end{lstlisting} or images \includegraphics[scale=1.0\textwidth]{blafoo.png} like in this example. 25 | 26 | \end{document} 27 | --------------------------------------------------------------------------------