From 8c3ffd303d3c743b8dceb979001515f6fc281ded Mon Sep 17 00:00:00 2001 From: Eliza Velasquez <4576666+elizagamedev@users.noreply.github.com> Date: Mon, 15 Jun 2020 23:55:18 -0700 Subject: [PATCH] Fix Linux bitrot --- CMakeLists.txt | 8 +++++ conanfile.py | 28 +++++++++++++---- scripts/CMakeLists.txt | 31 ++++++++++--------- .../{Game_Battler 1.rb => Game_Battler_1.rb} | 0 .../{Game_Battler 2.rb => Game_Battler_2.rb} | 0 .../{Game_Battler 3.rb => Game_Battler_3.rb} | 0 ...ame_Character 1.rb => Game_Character_1.rb} | 0 ...ame_Character 2.rb => Game_Character_2.rb} | 0 ...ame_Character 3.rb => Game_Character_3.rb} | 0 .../{Interpreter 1.rb => Interpreter_1.rb} | 0 .../{Interpreter 2.rb => Interpreter_2.rb} | 0 .../{Interpreter 3.rb => Interpreter_3.rb} | 0 .../{Interpreter 4.rb => Interpreter_4.rb} | 0 .../{Interpreter 5.rb => Interpreter_5.rb} | 0 .../{Interpreter 6.rb => Interpreter_6.rb} | 0 .../{Interpreter 7.rb => Interpreter_7.rb} | 0 scripts/_scripts.txt | 26 ++++++++-------- 17 files changed, 60 insertions(+), 33 deletions(-) rename scripts/{Game_Battler 1.rb => Game_Battler_1.rb} (100%) rename scripts/{Game_Battler 2.rb => Game_Battler_2.rb} (100%) rename scripts/{Game_Battler 3.rb => Game_Battler_3.rb} (100%) rename scripts/{Game_Character 1.rb => Game_Character_1.rb} (100%) rename scripts/{Game_Character 2.rb => Game_Character_2.rb} (100%) rename scripts/{Game_Character 3.rb => Game_Character_3.rb} (100%) rename scripts/{Interpreter 1.rb => Interpreter_1.rb} (100%) rename scripts/{Interpreter 2.rb => Interpreter_2.rb} (100%) rename scripts/{Interpreter 3.rb => Interpreter_3.rb} (100%) rename scripts/{Interpreter 4.rb => Interpreter_4.rb} (100%) rename scripts/{Interpreter 5.rb => Interpreter_5.rb} (100%) rename scripts/{Interpreter 6.rb => Interpreter_6.rb} (100%) rename scripts/{Interpreter 7.rb => Interpreter_7.rb} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index d735c06..52e470f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -131,6 +131,14 @@ if(WIN32) elseif(APPLE) list(APPEND MAIN_HEADERS src/mac-desktop.h) list(APPEND MAIN_SOURCE src/mac-desktop.mm) +else() + find_package(PkgConfig REQUIRED) + pkg_check_modules(LINUXPKGS REQUIRED gtk+-2.0 libxfconf-0) + include_directories(${LINUXPKGS_INCLUDE_DIRS}) + add_compile_options(${LINUXPKGS_CFLAGS_OTHER}) + list(APPEND PLATFORM_LIBRARIES ${LINUXPKGS_LDFLAGS}) + list(APPEND MAIN_SOURCE src/xdg-user-dir-lookup.c) + list(APPEND MAIN_HEADERS src/xdg-user-dir-lookup.h) endif() if (STEAM) diff --git a/conanfile.py b/conanfile.py index d033cbc..53ea5f9 100644 --- a/conanfile.py +++ b/conanfile.py @@ -9,7 +9,7 @@ class MkxpConan(ConanFile): license = "GPLv2" url = "https://github.com/elizagamedev/mkxp-oneshot" description = "OneShot game runtime" - settings = "os", "compiler", "build_type", "arch", "cppstd" + settings = "os", "compiler", "build_type", "arch" generators = "cmake" exports_sources = "*" requires = ( @@ -18,7 +18,7 @@ class MkxpConan(ConanFile): "physfs/3.0.1@bincrafters/stable", "pixman/0.34.0@bincrafters/stable", "ruby/2.5.3@eliza/testing", - "sdl2/2.0.10@bincrafters/stable", + "sdl2/2.0.9@bincrafters/stable", "sdl2_image/2.0.5@bincrafters/stable", "sdl2_ttf/2.0.15@bincrafters/stable", "sdl_sound-mkxp/1.0.1@eliza/stable", @@ -28,7 +28,7 @@ class MkxpConan(ConanFile): "zlib/1.2.11", "bzip2/1.0.8", ) - build_requires = ("ruby_installer/2.3.3@bincrafters/stable", ) + build_requires = ("ruby_installer/2.5.5@bincrafters/stable", ) options = { "platform": ["standalone", "steam"], } @@ -38,9 +38,6 @@ class MkxpConan(ConanFile): "cygwin_installer:packages=xxd", # Avoid dead url bitrot in cygwin_installer "cygwin_installer:with_pear=False", - "openal:shared=True", - # Fix linker error in SDL_sound fork with SDL2 - "sdl2:shared=True", ) def build_requirements(self): @@ -50,6 +47,20 @@ class MkxpConan(ConanFile): def requirements(self): if self.options.platform == "steam": self.requires("steamworks/1.42@eliza/stable") + if tools.os_info.is_linux: + # Overrides + self.requires("sqlite3/3.29.0") + self.requires("flac/1.3.3") + self.requires("ogg/1.3.4") + self.requires("vorbis/1.3.6") + self.requires("libalsa/1.1.9") + + def configure(self): + if tools.os_info.is_windows: + # ??? + self.options.openal.shared = True + # Fix linker error in SDL_sound fork with SDL2 + self.options.sdl2.shared = True def build_configure(self): cmake = CMake(self) @@ -89,5 +100,10 @@ class MkxpConan(ConanFile): src="bin", root_package=dep, keep_path=False) + copy("*.so*", + dst="lib", + src="lib", + root_package=dep, + keep_path=True) if self.settings.build_type == "Debug": copy("*.pdb", dst="bin", root_package=dep, keep_path=False) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 717c6c1..3f8b60d 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -14,12 +14,12 @@ set(scripts Game_Actor.rb Game_Actors.rb Game_BattleAction.rb - Game_Battler 1.rb - Game_Battler 2.rb - Game_Battler 3.rb - Game_Character 1.rb - Game_Character 2.rb - Game_Character 3.rb + Game_Battler_1.rb + Game_Battler_2.rb + Game_Battler_3.rb + Game_Character_1.rb + Game_Character_2.rb + Game_Character_3.rb Game_CommonEvent.rb Game_Enemy.rb Game_Event.rb @@ -37,13 +37,13 @@ set(scripts Game_System.rb Game_Temp.rb Game_Variables.rb - Interpreter 1.rb - Interpreter 2.rb - Interpreter 3.rb - Interpreter 4.rb - Interpreter 5.rb - Interpreter 6.rb - Interpreter 7.rb + Interpreter_1.rb + Interpreter_2.rb + Interpreter_3.rb + Interpreter_4.rb + Interpreter_5.rb + Interpreter_6.rb + Interpreter_7.rb Main.rb Particles.rb Persistent.rb @@ -116,7 +116,10 @@ set(scripts find_program(RUBY_EXE ruby DOC "Location of the Ruby executable") set(game_dir "${CMAKE_BINARY_DIR}/bin") -set(xscripts "${game_dir}/Data/xScripts.rxdata") +set(data_dir "${game_dir}/Data") +set(xscripts "${data_dir}/xScripts.rxdata") +add_custom_target(build-time-make-directory ALL + COMMAND ${CMAKE_COMMAND} -E make_directory "${data_dir}") add_custom_command( OUTPUT "${xscripts}" COMMAND "${RUBY_EXE}" "${CMAKE_SOURCE_DIR}/rpgscript.rb" "${CMAKE_CURRENT_LIST_DIR}" "${game_dir}" diff --git a/scripts/Game_Battler 1.rb b/scripts/Game_Battler_1.rb similarity index 100% rename from scripts/Game_Battler 1.rb rename to scripts/Game_Battler_1.rb diff --git a/scripts/Game_Battler 2.rb b/scripts/Game_Battler_2.rb similarity index 100% rename from scripts/Game_Battler 2.rb rename to scripts/Game_Battler_2.rb diff --git a/scripts/Game_Battler 3.rb b/scripts/Game_Battler_3.rb similarity index 100% rename from scripts/Game_Battler 3.rb rename to scripts/Game_Battler_3.rb diff --git a/scripts/Game_Character 1.rb b/scripts/Game_Character_1.rb similarity index 100% rename from scripts/Game_Character 1.rb rename to scripts/Game_Character_1.rb diff --git a/scripts/Game_Character 2.rb b/scripts/Game_Character_2.rb similarity index 100% rename from scripts/Game_Character 2.rb rename to scripts/Game_Character_2.rb diff --git a/scripts/Game_Character 3.rb b/scripts/Game_Character_3.rb similarity index 100% rename from scripts/Game_Character 3.rb rename to scripts/Game_Character_3.rb diff --git a/scripts/Interpreter 1.rb b/scripts/Interpreter_1.rb similarity index 100% rename from scripts/Interpreter 1.rb rename to scripts/Interpreter_1.rb diff --git a/scripts/Interpreter 2.rb b/scripts/Interpreter_2.rb similarity index 100% rename from scripts/Interpreter 2.rb rename to scripts/Interpreter_2.rb diff --git a/scripts/Interpreter 3.rb b/scripts/Interpreter_3.rb similarity index 100% rename from scripts/Interpreter 3.rb rename to scripts/Interpreter_3.rb diff --git a/scripts/Interpreter 4.rb b/scripts/Interpreter_4.rb similarity index 100% rename from scripts/Interpreter 4.rb rename to scripts/Interpreter_4.rb diff --git a/scripts/Interpreter 5.rb b/scripts/Interpreter_5.rb similarity index 100% rename from scripts/Interpreter 5.rb rename to scripts/Interpreter_5.rb diff --git a/scripts/Interpreter 6.rb b/scripts/Interpreter_6.rb similarity index 100% rename from scripts/Interpreter 6.rb rename to scripts/Interpreter_6.rb diff --git a/scripts/Interpreter 7.rb b/scripts/Interpreter_7.rb similarity index 100% rename from scripts/Interpreter 7.rb rename to scripts/Interpreter_7.rb diff --git a/scripts/_scripts.txt b/scripts/_scripts.txt index cfe6b28..f92148a 100644 --- a/scripts/_scripts.txt +++ b/scripts/_scripts.txt @@ -8,9 +8,9 @@ Game_Variables Game_SelfSwitches Game_Screen Game_Picture -Game_Battler 1 -Game_Battler 2 -Game_Battler 3 +Game_Battler_1 +Game_Battler_2 +Game_Battler_3 Game_BattleAction Game_Actor Game_Enemy @@ -18,9 +18,9 @@ Game_Actors Game_Party Game_Map Game_CommonEvent -Game_Character 1 -Game_Character 2 -Game_Character 3 +Game_Character_1 +Game_Character_2 +Game_Character_3 Game_Event Game_Player Game_Oneshot @@ -74,13 +74,13 @@ Window_DebugLeft Window_DebugRight Window_MainMenu -Interpreter 1 -Interpreter 2 -Interpreter 3 -Interpreter 4 -Interpreter 5 -Interpreter 6 -Interpreter 7 +Interpreter_1 +Interpreter_2 +Interpreter_3 +Interpreter_4 +Interpreter_5 +Interpreter_6 +Interpreter_7 Scene_Title Scene_Map