Update readme and conafile to make everything compilable

This commit is contained in:
Speak2Erase2 2021-11-15 11:39:56 -08:00
parent 868b874505
commit 64ad8dee19
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: 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 ```sh
conan remote add eliza "https://api.bintray.com/conan/eliza/conan" conan remote add eliza https://rkevin.jfrog.io/artifactory/api/conan/eliza
conan remote add bincrafters "https://api.bintray.com/conan/bincrafters/public-conan" 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. 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", "cygwin_installer:with_pear=False",
) )
def build_requirements(self): #def build_requirements(self):
if tools.os_info.is_windows: # if tools.os_info.is_windows:
self.build_requires("cygwin_installer/2.9.0@bincrafters/stable") # self.build_requires("cygwin_installer/2.9.0@bincrafters/stable")
def requirements(self): def requirements(self):
if self.options.platform == "steam": if self.options.platform == "steam":
@ -58,28 +58,29 @@ class MkxpConan(ConanFile):
def configure(self): def configure(self):
if tools.os_info.is_windows: 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 # Fix linker error in SDL_sound fork with SDL2
self.options.sdl2.shared = True self.options["sdl2"].shared = True
def build_configure(self): def build_configure(self):
cmake = CMake(self) cmake = CMake(self, msbuild_verbosity='minimal')
if self.options.platform == "steam": if self.options.platform == "steam":
cmake.definitions["STEAM"] = "ON" cmake.definitions["STEAM"] = "ON"
cmake.configure() cmake.configure()
cmake.build() cmake.build()
def build(self): def build(self):
if tools.os_info.is_windows: #if tools.os_info.is_windows:
cygwin_bin = self.deps_env_info["cygwin_installer"].CYGWIN_BIN # cygwin_bin = self.deps_env_info["cygwin_installer"].CYGWIN_BIN
with tools.environment_append({ # with tools.environment_append({
"PATH": [cygwin_bin], # "PATH": [cygwin_bin],
"CONAN_BASH_PATH": # "CONAN_BASH_PATH":
os.path.join(cygwin_bin, "bash.exe") # os.path.join(cygwin_bin, "bash.exe")
}): # }):
self.build_configure() # self.build_configure()
else: #else:
self.build_configure() # self.build_configure()
self.build_configure()
def package(self): def package(self):
self.copy("*", dst="bin", src="bin") self.copy("*", dst="bin", src="bin")
@ -106,4 +107,4 @@ class MkxpConan(ConanFile):
root_package=dep, root_package=dep,
keep_path=True) keep_path=True)
if self.settings.build_type == "Debug": 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)