diff --git a/aedi/target/__init__.py b/aedi/target/__init__.py index 22a8001c..0d63938a 100644 --- a/aedi/target/__init__.py +++ b/aedi/target/__init__.py @@ -31,6 +31,7 @@ def targets(): LZDoom3Target(), RazeTarget(), AccTarget(), + SladeTarget(), PrBoomPlusTarget(), DsdaDoom(), ChocolateDoomTarget(), diff --git a/aedi/target/main.py b/aedi/target/main.py index a890ad67..97c9ee2a 100644 --- a/aedi/target/main.py +++ b/aedi/target/main.py @@ -16,6 +16,7 @@ # along with this program. If not, see . # +from distutils.version import StrictVersion import os from platform import machine import shutil @@ -169,6 +170,33 @@ class AccTarget(CMakeMainTarget): state.checkout_git('https://github.com/rheit/acc.git') +class SladeTarget(CMakeMainTarget): + def __init__(self, name='slade'): + super().__init__(name) + + # This should match the actual version of WxWidgets + self.os_version['x86_64'] = StrictVersion('10.10') + self.sdk_version['x86_64'] = StrictVersion('10.11') + + def prepare_source(self, state: BuildState): + # TODO: support both stable and master branches + state.checkout_git('https://github.com/sirjuddington/SLADE.git', branch='stable') + + def detect(self, state: BuildState) -> bool: + return os.path.exists(state.source + 'SLADE-osx.icns') + + def configure(self, state: BuildState): + opts = self.options + opts['CMAKE_C_FLAGS'] = opts['CMAKE_CXX_FLAGS'] = '-DNOCURL -I' + state.include_path + opts['CMAKE_EXE_LINKER_FLAGS'] = \ + state.run_pkg_config('--libs', 'fluidsynth', 'libtiff-4', 'openal', 'vorbisfile') + opts['wxWidgets_USE_STATIC'] = 'YES' + opts['WX_GTK3'] = 'NO' + opts['SFML_STATIC'] = 'YES' + + super().configure(state) + + class PrBoomPlusTarget(CMakeMainTarget): def __init__(self, name='prboom-plus'): super().__init__(name)