mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
Merge remote-tracking branch 'elizagamedev/master'
This commit is contained in:
commit
b19153a6d3
8 changed files with 75 additions and 39 deletions
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
#include <ruby.h>
|
||||
#include <ruby/encoding.h>
|
||||
#undef inline
|
||||
|
||||
#include <assert.h>
|
||||
#include <string>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#define BINDING_UTIL_H
|
||||
|
||||
#include <ruby.h>
|
||||
#undef inline
|
||||
|
||||
#include "exception.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
if(APPLE)
|
||||
function(PostBuildMacBundle target framework_list lib_list)
|
||||
INCLUDE(BundleUtilities)
|
||||
GET_TARGET_PROPERTY(_BIN_NAME ${target} LOCATION)
|
||||
GET_DOTAPP_DIR(${_BIN_NAME} _BUNDLE_DIR)
|
||||
|
||||
set(_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/${target}_prep.cmake")
|
||||
file(WRITE ${_SCRIPT_FILE}
|
||||
"# Generated Script file\n"
|
||||
"include(BundleUtilities)\n"
|
||||
"get_bundle_and_executable(\"\${BUNDLE_APP}\" bundle executable valid)\n"
|
||||
"if(valid)\n"
|
||||
" set(framework_dest \"\${bundle}/Contents/Frameworks\")\n"
|
||||
" foreach(framework_path ${framework_list})\n"
|
||||
" get_filename_component(framework_name \${framework_path} NAME_WE)\n"
|
||||
" file(MAKE_DIRECTORY \"\${framework_dest}/\${framework_name}.framework/Versions/A/\")\n"
|
||||
" copy_resolved_framework_into_bundle(\${framework_path}/Versions/A/\${framework_name} \${framework_dest}/\${framework_name}.framework/Versions/A/\${framework_name})\n"
|
||||
" endforeach()\n"
|
||||
" foreach(lib ${lib_list})\n"
|
||||
" get_filename_component(lib_file \${lib} NAME)\n"
|
||||
" copy_resolved_item_into_bundle(\${lib} \${framework_dest}/\${lib_file})\n"
|
||||
" endforeach()\n"
|
||||
"else()\n"
|
||||
" message(ERROR \"App Not found? \${BUNDLE_APP}\")\n"
|
||||
"endif()\n"
|
||||
"#fixup_bundle(\"\${BUNDLE_APP}\" \"\" \"\${DEP_LIB_DIR}\")\n"
|
||||
)
|
||||
|
||||
ADD_CUSTOM_COMMAND(TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -DBUNDLE_APP="${_BUNDLE_DIR}" -P "${_SCRIPT_FILE}"
|
||||
)
|
||||
endfunction()
|
||||
else()
|
||||
function(PostBuildMacBundle target framework_list lib_list)
|
||||
# noop
|
||||
endfunction()
|
||||
endif()
|
||||
63
conanfile.py
Normal file
63
conanfile.py
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
from conans import ConanFile, CMake, tools
|
||||
import os.path
|
||||
|
||||
|
||||
class MkxpConan(ConanFile):
|
||||
name = "mkxp"
|
||||
version = "0.0.0"
|
||||
license = "GPLv2"
|
||||
url = "https://github.com/elizagamedev/mkxp-oneshot"
|
||||
description = "OneShot game runtime"
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
generators = "cmake"
|
||||
exports_sources = "*"
|
||||
requires = (
|
||||
"boost/1.68.0@conan/stable",
|
||||
"openal/1.18.2@bincrafters/stable",
|
||||
"physfs/3.0.1@eliza/stable",
|
||||
"pixman/0.34.0@eliza/stable",
|
||||
"ruby-mkxp/2.5.1@eliza/stable",
|
||||
"sdl2/2.0.8@bincrafters/stable",
|
||||
"sdl2_image/2.0.3@bincrafters/stable",
|
||||
"sdl2_ttf/2.0.14@eliza/stable",
|
||||
"sdl_sound-mkxp/1.0.1@eliza/stable",
|
||||
"sigc++/2.10.0@eliza/stable",
|
||||
)
|
||||
default_options = (
|
||||
"boost:without_test=True",
|
||||
"cygwin_installer:packages=xxd",
|
||||
)
|
||||
|
||||
def build_requirements(self):
|
||||
if tools.os_info.is_windows:
|
||||
self.build_requires("cygwin_installer/2.9.0@bincrafters/stable")
|
||||
|
||||
def build_configure(self):
|
||||
cmake = CMake(self)
|
||||
cmake.configure()
|
||||
cmake.build()
|
||||
|
||||
def build(self):
|
||||
if tools.os_info.is_windows:
|
||||
cygwin_bin = self.deps_env_info["cygwin_installer"].CYGWIN_BIN
|
||||
with tools.environment_append({"PATH": [cygwin_bin],
|
||||
"CONAN_BASH_PATH": os.path.join(cygwin_bin, "bash.exe")}):
|
||||
self.build_configure()
|
||||
else:
|
||||
self.build_configure()
|
||||
|
||||
def package(self):
|
||||
self.copy("*", dst="bin", src="bin")
|
||||
|
||||
def imports(self):
|
||||
self.do_copy_deps(self.copy)
|
||||
|
||||
def deploy(self):
|
||||
self.copy("*")
|
||||
self.do_copy_deps(self.copy_deps)
|
||||
|
||||
def do_copy_deps(self, copy):
|
||||
deps = set(self.deps_cpp_info.deps)
|
||||
deps.discard("cygwin_installer")
|
||||
for dep in deps:
|
||||
copy("*.dll", dst="bin", src="bin", root_package=dep, keep_path=False)
|
||||
|
|
@ -527,7 +527,7 @@ void FileSystem::initFontSets(SharedFontState &sfs)
|
|||
{
|
||||
FontSetsCBData d = { p, &sfs };
|
||||
|
||||
PHYSFS_enumerate("Fonts", fontSetEnumCB, &d);
|
||||
PHYSFS_enumerate(".", findFontsFolderCB, &d);
|
||||
}
|
||||
|
||||
struct OpenReadEnumData
|
||||
|
|
|
|||
|
|
@ -44,7 +44,9 @@
|
|||
#include <SDL_image.h>
|
||||
|
||||
#include <time.h>
|
||||
#ifndef _MSC_VER
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#include <algorithm>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,12 @@
|
|||
#include <SDL_ttf.h>
|
||||
#include <SDL_sound.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <direct.h>
|
||||
#define _chdir chdir
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <string>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,9 @@
|
|||
#include "binding.h"
|
||||
#include "exception.h"
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue