Merge pull request #31 from Speak2Erase2/master

Patch conanfile and update compilation instructions
This commit is contained in:
Eliza 2021-11-18 06:38:51 +00:00 committed by GitHub
commit f7cf5850d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 19 deletions

View file

@ -17,8 +17,10 @@ Preface: This only supports Visual Studio on Windows and Xcode on macOS. Ubuntu
With Python 3 and pip installed, install Conan via `pip3 install conan`. Afterwards, add the necessary package repositories by adding running the following commands:
```sh
conan remote add eliza "https://api.bintray.com/conan/eliza/conan"
conan remote add bincrafters "https://api.bintray.com/conan/bincrafters/public-conan"
conan remote add eliza https://rkevin.jfrog.io/artifactory/api/conan/eliza
conan remote add bincrafters https://bincrafters.jfrog.io/artifactory/api/conan/public-conan
conan config set general.revisions_enabled=1
setx CONAN_USE_ALWAYS_SHORT_PATHS 1 (windows only)
```
Prepare to build *OneShot* by installing the necessary dependencies with Conan.

View file

@ -40,9 +40,9 @@ class MkxpConan(ConanFile):
"cygwin_installer:with_pear=False",
)
def build_requirements(self):
if tools.os_info.is_windows:
self.build_requires("cygwin_installer/2.9.0@bincrafters/stable")
#def build_requirements(self):
# if tools.os_info.is_windows:
# self.build_requires("cygwin_installer/2.9.0@bincrafters/stable")
def requirements(self):
if self.options.platform == "steam":
@ -58,28 +58,29 @@ class MkxpConan(ConanFile):
def configure(self):
if tools.os_info.is_windows:
# ???
self.options.openal.shared = True
self.options["openal"].shared = True
# Fix linker error in SDL_sound fork with SDL2
self.options.sdl2.shared = True
self.options["sdl2"].shared = True
def build_configure(self):
cmake = CMake(self)
cmake = CMake(self, msbuild_verbosity='minimal')
if self.options.platform == "steam":
cmake.definitions["STEAM"] = "ON"
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()
#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()
self.build_configure()
def package(self):
self.copy("*", dst="bin", src="bin")
@ -106,4 +107,4 @@ class MkxpConan(ConanFile):
root_package=dep,
keep_path=True)
if self.settings.build_type == "Debug":
copy("*.pdb", dst="bin", root_package=dep, keep_path=False)
copy("*.pdb", dst="bin", root_package=dep, keep_path=False)