2021-06-11 19:24:52 +02:00
|
|
|
# MassBuilderSaveTool
|
2024-03-08 20:25:32 +01:00
|
|
|
# Copyright (C) 2021-2024 Guillaume Jacquemin
|
2021-06-11 19:24:52 +02:00
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
|
2022-12-05 14:39:06 +01:00
|
|
|
set(SAVETOOL_PROJECT_VERSION 1.5.0-pre)
|
2021-07-13 19:00:45 +02:00
|
|
|
|
2023-10-29 10:36:46 +01:00
|
|
|
find_package(Corrade REQUIRED Containers Utility)
|
|
|
|
if(CORRADE_TARGET_WINDOWS)
|
|
|
|
find_package(Corrade REQUIRED Main)
|
|
|
|
endif()
|
2021-06-20 23:56:46 +02:00
|
|
|
find_package(Magnum REQUIRED GL Sdl2Application)
|
2021-06-11 19:24:52 +02:00
|
|
|
find_package(MagnumIntegration REQUIRED ImGui)
|
2024-04-07 15:40:45 +02:00
|
|
|
|
|
|
|
if(SAVETOOL_USE_SYSTEM_LIBZIP)
|
2023-10-29 15:25:34 +01:00
|
|
|
find_package(libzip REQUIRED)
|
2024-04-07 15:40:45 +02:00
|
|
|
endif(SAVETOOL_USE_SYSTEM_LIBZIP)
|
|
|
|
|
|
|
|
if(SAVETOOL_USE_SYSTEM_EFSW)
|
2023-10-29 15:25:34 +01:00
|
|
|
find_package(efsw REQUIRED)
|
2024-04-07 15:40:45 +02:00
|
|
|
endif(SAVETOOL_USE_SYSTEM_EFSW)
|
|
|
|
|
|
|
|
if(SAVETOOL_USE_SYSTEM_LIBCURL)
|
2024-04-07 15:20:47 +02:00
|
|
|
find_package(CURL REQUIRED HTTPS)
|
2024-04-07 15:40:45 +02:00
|
|
|
endif(SAVETOOL_USE_SYSTEM_LIBCURL)
|
2021-06-11 19:24:52 +02:00
|
|
|
|
|
|
|
set_directory_properties(PROPERTIES CORRADE_USE_PEDANTIC_FLAGS ON)
|
|
|
|
|
|
|
|
corrade_add_resource(Assets assets.conf)
|
|
|
|
|
2024-03-08 20:55:05 +01:00
|
|
|
set(Logger_SOURCES
|
|
|
|
Logger/Logger.h
|
|
|
|
Logger/Logger.cpp
|
|
|
|
Logger/EntryType.h
|
|
|
|
Logger/MagnumLogBuffer.h
|
|
|
|
Logger/MagnumLogBuffer.cpp
|
|
|
|
)
|
|
|
|
|
2024-03-08 21:18:17 +01:00
|
|
|
set(BinaryIo_SOURCES
|
|
|
|
BinaryIo/BinaryIo.h
|
|
|
|
BinaryIo/Reader.h
|
|
|
|
BinaryIo/Reader.cpp
|
|
|
|
BinaryIo/Writer.h
|
|
|
|
BinaryIo/Writer.cpp
|
|
|
|
)
|
|
|
|
|
2024-03-08 20:55:05 +01:00
|
|
|
set(Gvas_SOURCES
|
|
|
|
Gvas/Serialisers/Serialisers.h
|
|
|
|
Gvas/Serialisers/AbstractUnrealCollectionProperty.h
|
|
|
|
Gvas/Serialisers/AbstractUnrealProperty.h
|
|
|
|
Gvas/Serialisers/AbstractUnrealStruct.h
|
|
|
|
Gvas/Serialisers/ArrayProperty.h
|
|
|
|
Gvas/Serialisers/ArrayProperty.cpp
|
|
|
|
Gvas/Serialisers/BoolProperty.h
|
|
|
|
Gvas/Serialisers/BoolProperty.cpp
|
|
|
|
Gvas/Serialisers/ByteProperty.h
|
|
|
|
Gvas/Serialisers/ByteProperty.cpp
|
|
|
|
Gvas/Serialisers/ColourProperty.h
|
|
|
|
Gvas/Serialisers/ColourProperty.cpp
|
|
|
|
Gvas/Serialisers/DateTimeProperty.h
|
|
|
|
Gvas/Serialisers/DateTimeProperty.cpp
|
|
|
|
Gvas/Serialisers/EnumProperty.h
|
|
|
|
Gvas/Serialisers/EnumProperty.cpp
|
|
|
|
Gvas/Serialisers/FloatProperty.h
|
|
|
|
Gvas/Serialisers/FloatProperty.cpp
|
|
|
|
Gvas/Serialisers/GuidProperty.h
|
|
|
|
Gvas/Serialisers/GuidProperty.cpp
|
|
|
|
Gvas/Serialisers/IntProperty.h
|
|
|
|
Gvas/Serialisers/IntProperty.cpp
|
|
|
|
Gvas/Serialisers/MapProperty.h
|
|
|
|
Gvas/Serialisers/MapProperty.cpp
|
|
|
|
Gvas/Serialisers/ResourceProperty.h
|
|
|
|
Gvas/Serialisers/ResourceProperty.cpp
|
|
|
|
Gvas/Serialisers/RotatorProperty.h
|
|
|
|
Gvas/Serialisers/RotatorProperty.cpp
|
|
|
|
Gvas/Serialisers/StringProperty.h
|
|
|
|
Gvas/Serialisers/StringProperty.cpp
|
|
|
|
Gvas/Serialisers/SetProperty.h
|
|
|
|
Gvas/Serialisers/SetProperty.cpp
|
|
|
|
Gvas/Serialisers/Struct.h
|
|
|
|
Gvas/Serialisers/Struct.cpp
|
|
|
|
Gvas/Serialisers/TextProperty.h
|
|
|
|
Gvas/Serialisers/TextProperty.cpp
|
|
|
|
Gvas/Serialisers/UnrealProperty.h
|
|
|
|
Gvas/Serialisers/VectorProperty.h
|
|
|
|
Gvas/Serialisers/VectorProperty.cpp
|
|
|
|
Gvas/Serialisers/Vector2DProperty.h
|
|
|
|
Gvas/Serialisers/Vector2DProperty.cpp
|
|
|
|
|
|
|
|
Gvas/Types/Types.h
|
|
|
|
Gvas/Types/ArrayProperty.h
|
|
|
|
Gvas/Types/BoolProperty.h
|
|
|
|
Gvas/Types/ByteProperty.h
|
|
|
|
Gvas/Types/ColourStructProperty.h
|
|
|
|
Gvas/Types/DateTimeStructProperty.h
|
|
|
|
Gvas/Types/EnumProperty.h
|
|
|
|
Gvas/Types/FloatProperty.h
|
|
|
|
Gvas/Types/GenericStructProperty.h
|
|
|
|
Gvas/Types/GuidStructProperty.h
|
|
|
|
Gvas/Types/IntProperty.h
|
|
|
|
Gvas/Types/MapProperty.h
|
|
|
|
Gvas/Types/NoneProperty.h
|
|
|
|
Gvas/Types/RotatorStructProperty.h
|
|
|
|
Gvas/Types/SetProperty.h
|
|
|
|
Gvas/Types/StringProperty.h
|
|
|
|
Gvas/Types/StructProperty.h
|
|
|
|
Gvas/Types/ResourceItemValue.h
|
|
|
|
Gvas/Types/TextProperty.h
|
|
|
|
Gvas/Types/UnrealProperty.h
|
|
|
|
Gvas/Types/UnrealPropertyBase.h
|
|
|
|
Gvas/Types/Vector2DStructProperty.h
|
|
|
|
Gvas/Types/VectorStructProperty.h
|
|
|
|
|
|
|
|
Gvas/Gvas.h
|
|
|
|
Gvas/Debug.h
|
|
|
|
Gvas/Debug.cpp
|
|
|
|
Gvas/File.h
|
|
|
|
Gvas/File.cpp
|
|
|
|
Gvas/PropertySerialiser.h
|
|
|
|
Gvas/PropertySerialiser.cpp
|
|
|
|
)
|
2021-09-22 17:37:50 +02:00
|
|
|
|
2024-03-25 12:08:35 +01:00
|
|
|
set(ImportExport_SOURCES
|
|
|
|
ImportExport/Import.h
|
|
|
|
ImportExport/Import.cpp
|
|
|
|
ImportExport/Export.h
|
|
|
|
ImportExport/Export.cpp
|
|
|
|
ImportExport/Keys.h
|
|
|
|
)
|
|
|
|
|
2023-10-29 10:36:46 +01:00
|
|
|
if(CORRADE_TARGET_WINDOWS)
|
|
|
|
set(SAVETOOL_RC_FILE resource.rc)
|
|
|
|
endif()
|
|
|
|
|
2023-10-29 15:45:22 +01:00
|
|
|
add_executable(MassBuilderSaveTool
|
2021-06-11 19:24:52 +02:00
|
|
|
main.cpp
|
2023-11-29 12:33:26 +01:00
|
|
|
Application/Application.h
|
|
|
|
Application/Application.cpp
|
|
|
|
Application/Application_drawAbout.cpp
|
|
|
|
Application/Application_drawMainMenu.cpp
|
|
|
|
Application/Application_FileWatcher.cpp
|
|
|
|
Application/Application_Initialisation.cpp
|
|
|
|
Application/Application_MainManager.cpp
|
|
|
|
Application/Application_MassViewer.cpp
|
|
|
|
Application/Application_MassViewer_Frame.cpp
|
|
|
|
Application/Application_MassViewer_Armour.cpp
|
|
|
|
Application/Application_MassViewer_Weapons.cpp
|
|
|
|
Application/Application_ProfileManager.cpp
|
|
|
|
Application/Application_UpdateChecker.cpp
|
2022-12-01 23:42:39 +01:00
|
|
|
Configuration/Configuration.h
|
|
|
|
Configuration/Configuration.cpp
|
2024-03-28 17:42:56 +01:00
|
|
|
FontAwesome/IconsFontAwesome5.h
|
|
|
|
FontAwesome/IconsFontAwesome5Brands.h
|
2024-03-28 12:50:15 +01:00
|
|
|
GameData/Accessories.h
|
|
|
|
GameData/ArmourSets.h
|
|
|
|
GameData/LastMissionId.h
|
2024-03-28 13:15:47 +01:00
|
|
|
GameData/ResourceIDs.h
|
2024-03-28 12:50:15 +01:00
|
|
|
GameData/StoryProgress.h
|
|
|
|
GameData/StyleNames.h
|
|
|
|
GameData/WeaponParts.h
|
2024-03-28 13:15:47 +01:00
|
|
|
GameObjects/Accessory.h
|
|
|
|
GameObjects/ArmourPart.h
|
|
|
|
GameObjects/BulletLauncherAttachment.h
|
|
|
|
GameObjects/CustomStyle.h
|
|
|
|
GameObjects/Decal.h
|
|
|
|
GameObjects/Joints.h
|
|
|
|
GameObjects/Mass.h
|
|
|
|
GameObjects/Mass.cpp
|
|
|
|
GameObjects/Mass_Frame.cpp
|
|
|
|
GameObjects/Mass_Armour.cpp
|
|
|
|
GameObjects/Mass_Weapons.cpp
|
|
|
|
GameObjects/Mass_Styles.cpp
|
|
|
|
GameObjects/Mass_DecalsAccessories.cpp
|
|
|
|
GameObjects/Profile.h
|
|
|
|
GameObjects/Profile.cpp
|
2024-03-28 17:42:56 +01:00
|
|
|
GameObjects/PropertyNames.h
|
2024-03-28 13:15:47 +01:00
|
|
|
GameObjects/Weapon.h
|
|
|
|
GameObjects/Weapon.cpp
|
|
|
|
GameObjects/WeaponPart.h
|
2024-03-30 16:03:11 +01:00
|
|
|
Managers/MassManager.h
|
|
|
|
Managers/MassManager.cpp
|
|
|
|
Managers/ProfileManager.h
|
|
|
|
Managers/ProfileManager.cpp
|
2022-02-13 10:31:55 +01:00
|
|
|
Maps/ArmourSlots.hpp
|
2022-03-12 09:34:19 +01:00
|
|
|
Maps/BulletLauncherAttachmentStyles.hpp
|
|
|
|
Maps/BulletLauncherSockets.hpp
|
2022-02-09 14:17:05 +01:00
|
|
|
Maps/DamageTypes.hpp
|
2022-02-17 20:22:33 +01:00
|
|
|
Maps/EffectColourModes.hpp
|
2022-02-09 13:36:33 +01:00
|
|
|
Maps/WeaponTypes.hpp
|
2021-07-25 10:52:01 +02:00
|
|
|
ToastQueue/ToastQueue.h
|
|
|
|
ToastQueue/ToastQueue.cpp
|
2023-10-29 11:32:17 +01:00
|
|
|
UpdateChecker/UpdateChecker.h
|
|
|
|
UpdateChecker/UpdateChecker.cpp
|
2022-02-13 15:02:08 +01:00
|
|
|
Utilities/Crc32.h
|
2023-11-29 12:33:26 +01:00
|
|
|
Utilities/Crc32.cpp
|
2024-03-30 23:47:04 +01:00
|
|
|
Utilities/Temp.h
|
|
|
|
Utilities/Temp.cpp
|
2023-10-29 11:32:17 +01:00
|
|
|
Version/Version.h
|
2023-11-29 12:33:26 +01:00
|
|
|
Version/Version.cpp
|
2024-03-08 20:55:05 +01:00
|
|
|
${Logger_SOURCES}
|
2024-03-08 21:18:17 +01:00
|
|
|
${BinaryIo_SOURCES}
|
2024-03-08 20:55:05 +01:00
|
|
|
${Gvas_SOURCES}
|
2024-03-25 12:08:35 +01:00
|
|
|
${ImportExport_SOURCES}
|
2023-10-29 10:36:46 +01:00
|
|
|
${SAVETOOL_RC_FILE}
|
2022-11-21 09:18:42 +01:00
|
|
|
${Assets}
|
|
|
|
)
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2023-10-29 15:45:22 +01:00
|
|
|
if(CORRADE_TARGET_WINDOWS)
|
|
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE $<CONFIG:Release>)
|
|
|
|
endif()
|
|
|
|
|
2022-12-05 14:38:50 +01:00
|
|
|
target_compile_definitions(MassBuilderSaveTool PRIVATE
|
2023-10-29 10:40:02 +01:00
|
|
|
SAVETOOL_VERSION_STRING="${SAVETOOL_PROJECT_VERSION}"
|
|
|
|
SAVETOOL_VERSION_MAJOR=1
|
|
|
|
SAVETOOL_VERSION_MINOR=5
|
|
|
|
SAVETOOL_VERSION_PATCH=0
|
|
|
|
SAVETOOL_VERSION_PRERELEASE=true
|
2022-12-05 14:39:06 +01:00
|
|
|
SAVETOOL_CODENAME="Friendly Valkyrie"
|
2023-10-29 10:40:02 +01:00
|
|
|
SAVETOOL_SUPPORTED_GAME_VERSION="0.10.x"
|
2022-11-21 09:18:42 +01:00
|
|
|
)
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-07-13 19:00:45 +02:00
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
|
|
set_target_properties(MassBuilderSaveTool PROPERTIES OUTPUT_NAME MassBuilderSaveTool-${SAVETOOL_PROJECT_VERSION})
|
|
|
|
endif()
|
|
|
|
|
2021-06-11 19:24:52 +02:00
|
|
|
target_link_options(MassBuilderSaveTool PRIVATE -static -static-libgcc -static-libstdc++)
|
|
|
|
|
2021-12-03 00:14:22 +01:00
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
|
|
target_link_options(MassBuilderSaveTool PRIVATE -Wl,-S)
|
|
|
|
endif()
|
|
|
|
|
2021-06-11 19:24:52 +02:00
|
|
|
target_link_libraries(MassBuilderSaveTool PRIVATE
|
|
|
|
Corrade::Containers
|
|
|
|
Corrade::Utility
|
|
|
|
Magnum::Magnum
|
|
|
|
Magnum::GL
|
|
|
|
Magnum::Sdl2Application
|
|
|
|
MagnumIntegration::ImGui
|
2023-08-28 13:17:54 +02:00
|
|
|
CURL::libcurl_static
|
2022-11-21 09:18:42 +01:00
|
|
|
)
|
2023-10-29 10:36:46 +01:00
|
|
|
|
2024-04-07 15:40:45 +02:00
|
|
|
if(SAVETOOL_USE_SYSTEM_LIBZIP)
|
|
|
|
target_link_libraries(MassBuilderSaveTool PRIVATE libzip::zip)
|
|
|
|
else()
|
|
|
|
target_link_libraries(MassBuilderSaveTool PRIVATE zip)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(SAVETOOL_USE_SYSTEM_EFSW)
|
|
|
|
target_link_libraries(MassBuilderSaveTool PRIVATE efsw::efsw)
|
2023-10-29 15:25:34 +01:00
|
|
|
else()
|
2024-04-07 15:40:45 +02:00
|
|
|
target_link_libraries(MassBuilderSaveTool PRIVATE efsw)
|
2023-10-29 15:25:34 +01:00
|
|
|
endif()
|
|
|
|
|
2023-10-29 10:36:46 +01:00
|
|
|
if(CORRADE_TARGET_WINDOWS)
|
|
|
|
target_link_libraries(MassBuilderSaveTool PRIVATE
|
|
|
|
Corrade::Main
|
|
|
|
imm32
|
|
|
|
wtsapi32
|
|
|
|
)
|
|
|
|
endif()
|