Compare commits

..

No commits in common. "39d71a7a0998027104faa40264c7cc75b8e76e66" and "245b7415906af732e123ee6dcdf16ee38880280f" have entirely different histories.

4 changed files with 174 additions and 99 deletions

View File

@ -14,19 +14,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
cmake_minimum_required(VERSION 3.24)
cmake_minimum_required(VERSION 3.5)
project(MassBuilderSaveTool)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/modules/" ${CMAKE_MODULE_PATH})
set(ZLIB_USE_STATIC_LIBS ON CACHE BOOL "" FORCE) # Required on setups where zlib is available as both dynamic and static libs. Which is pretty much everywhere, actually.
option(SAVETOOL_USE_SYSTEM_LIBS "Use system-wide versions of the dependencies instead of the versions provided by submodules." OFF)
if(NOT SAVETOOL_USE_SYSTEM_LIBS)
# Generic variables shared by multiple libs that don't provide their own.
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CORRADE_BUILD_DEPRECATED OFF CACHE BOOL "" FORCE)
set(CORRADE_BUILD_STATIC ON CACHE BOOL "" FORCE)
@ -40,6 +33,7 @@ if(NOT SAVETOOL_USE_SYSTEM_LIBS)
set(CORRADE_UTILITY_USE_ANSI_COLORS ON CACHE BOOL "" FORCE)
add_subdirectory(third-party/corrade EXCLUDE_FROM_ALL)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(DIRECTX OFF CACHE BOOL "" FORCE) # We use OpenGL.
set(SDL_ATOMIC OFF CACHE BOOL "" FORCE)
set(SDL_CPUINFO OFF CACHE BOOL "" FORCE)
@ -105,6 +99,7 @@ if(NOT SAVETOOL_USE_SYSTEM_LIBS)
set(EFSW_INSTALL OFF CACHE BOOL "" FORCE)
add_subdirectory(third-party/efsw EXCLUDE_FROM_ALL)
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
set(BUILD_CURL_EXE OFF CACHE BOOL "" FORCE)
set(ENABLE_UNICODE ON CACHE BOOL "" FORCE)
set(ENABLE_INET_PTON OFF CACHE BOOL "" FORCE)
@ -118,6 +113,5 @@ if(NOT SAVETOOL_USE_SYSTEM_LIBS)
set(CURL_USE_SCHANNEL ON CACHE BOOL "" FORCE)
set(CURL_USE_LIBSSH2 OFF CACHE BOOL "" FORCE) # For some reason, even when HTTP_ONLY is set to ON, libcurl will try to link to libssh2.
add_subdirectory(third-party/curl EXCLUDE_FROM_ALL)
endif(NOT SAVETOOL_USE_SYSTEM_LIBS)
add_subdirectory(src)

View File

@ -23,9 +23,6 @@ set(SAVETOOL_PROJECT_VERSION 1.5.0-pre)
find_package(Corrade REQUIRED Main Containers Utility)
find_package(Magnum REQUIRED GL Sdl2Application)
find_package(MagnumIntegration REQUIRED ImGui)
find_package(CURL REQUIRED HTTPS)
find_package(libzip REQUIRED)
find_package(efsw REQUIRED)
set_directory_properties(PROPERTIES CORRADE_USE_PEDANTIC_FLAGS ON)
@ -127,9 +124,9 @@ target_link_libraries(MassBuilderSaveTool PRIVATE
MagnumIntegration::ImGui
Logger
UESaveFile
efsw::efsw
libzip::zip
CURL::libcurl_static
efsw
zip
libcurl
imm32
wtsapi32
)

View File

@ -115,6 +115,14 @@ SaveTool::drawAbout() {
ImGui::TextUnformatted("Licence: MIT");
static auto corrade_licence = _rs.getRaw("COPYING.Corrade");
if(ImGui::BeginChild("##CorradeLicence", {0.0f, float(windowSize().y()) * 0.3f}, true)) {
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
ImGui::TextUnformatted(corrade_licence.begin(), corrade_licence.end());
ImGui::PopFont();
}
ImGui::EndChild();
ImGui::TreePop();
}
@ -135,6 +143,14 @@ SaveTool::drawAbout() {
ImGui::TextUnformatted("Licence: MIT");
static auto magnum_licence = _rs.getRaw("COPYING.Magnum");
if(ImGui::BeginChild("##MagnumLicence", {0.0f, float(windowSize().y()) * 0.3f}, true)) {
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
ImGui::TextUnformatted(magnum_licence.begin(), magnum_licence.end());
ImGui::PopFont();
}
ImGui::EndChild();
ImGui::TreePop();
}
@ -153,6 +169,14 @@ SaveTool::drawAbout() {
ImGui::TextUnformatted("Licence: MIT");
static auto imgui_licence = _rs.getRaw("LICENSE.ImGui");
if(ImGui::BeginChild("##ImGuiLicence", {0.0f, float(windowSize().y()) * 0.3f}, true)) {
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
ImGui::TextUnformatted(imgui_licence.begin(), imgui_licence.end());
ImGui::PopFont();
}
ImGui::EndChild();
ImGui::TreePop();
}
@ -171,6 +195,14 @@ SaveTool::drawAbout() {
ImGui::TextUnformatted("Licence: zlib");
static auto sdl_licence = _rs.getRaw("LICENSE.SDL");
if(ImGui::BeginChild("##SDLLicence", {0.0f, float(windowSize().y()) * 0.3f}, true)) {
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
ImGui::TextUnformatted(sdl_licence.begin(), sdl_licence.end());
ImGui::PopFont();
}
ImGui::EndChild();
ImGui::TreePop();
}
@ -189,6 +221,14 @@ SaveTool::drawAbout() {
ImGui::TextUnformatted("Licence: 3-clause BSD");
static auto libzip_licence = _rs.getRaw("LICENSE.libzip");
if(ImGui::BeginChild("##libzipLicence", {0.0f, float(windowSize().y()) * 0.3f}, true)) {
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
ImGui::TextUnformatted(libzip_licence.begin(), libzip_licence.end());
ImGui::PopFont();
}
ImGui::EndChild();
ImGui::TreePop();
}
@ -206,6 +246,14 @@ SaveTool::drawAbout() {
ImGui::TextUnformatted("Licence: MIT");
static auto efsw_licence = _rs.getRaw("LICENSE.efsw");
if(ImGui::BeginChild("##efswLicence", {0.0f, float(windowSize().y()) * 0.3f}, true)) {
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
ImGui::TextUnformatted(efsw_licence.begin(), efsw_licence.end());
ImGui::PopFont();
}
ImGui::EndChild();
ImGui::TreePop();
}
@ -224,6 +272,14 @@ SaveTool::drawAbout() {
ImGui::TextUnformatted("Licence: MIT/X derivative");
static auto curl_licence = _rs.getRaw("LICENSE.curl");
if(ImGui::BeginChild("##libcurlLicence", {0.0f, float(windowSize().y()) * 0.3f}, true)) {
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
ImGui::TextUnformatted(curl_licence.begin(), curl_licence.end());
ImGui::PopFont();
}
ImGui::EndChild();
ImGui::TreePop();
}

View File

@ -19,3 +19,31 @@ alias=fa-brands-400.ttf
[file]
filename=../COPYING
alias=COPYING
[file]
filename=../third-party/corrade/COPYING
alias=COPYING.Corrade
[file]
filename=../third-party/magnum/COPYING
alias=COPYING.Magnum
[file]
filename=../third-party/imgui/LICENSE.txt
alias=LICENSE.ImGui
[file]
filename=../third-party/SDL/LICENSE.txt
alias=LICENSE.SDL
[file]
filename=../third-party/libzip/LICENSE
alias=LICENSE.libzip
[file]
filename=../third-party/efsw/LICENSE
alias=LICENSE.efsw
[file]
filename=../third-party/curl/COPYING
alias=LICENSE.curl