mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2025-01-31 20:10:32 +00:00
aedi: add target's ability to validate minimum os versions
This commit is contained in:
parent
88dade9121
commit
2e58efc866
1 changed files with 10 additions and 1 deletions
|
@ -17,6 +17,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
from distutils.version import StrictVersion
|
||||||
import os
|
import os
|
||||||
from platform import machine
|
from platform import machine
|
||||||
import re
|
import re
|
||||||
|
@ -24,7 +25,7 @@ import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import typing
|
import typing
|
||||||
|
|
||||||
from ..utility import CommandLineOptions, symlink_directory
|
from ..utility import CommandLineOptions, symlink_directory, OS_VERSION_X86_64, OS_VERSION_ARM64
|
||||||
from ..state import BuildState
|
from ..state import BuildState
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,7 +68,15 @@ class BuildTarget(Target):
|
||||||
self.options = CommandLineOptions()
|
self.options = CommandLineOptions()
|
||||||
self.multi_platform = True
|
self.multi_platform = True
|
||||||
|
|
||||||
|
self.os_version = dict()
|
||||||
|
self.os_version['x86_64'] = OS_VERSION_X86_64
|
||||||
|
self.os_version['arm64'] = OS_VERSION_ARM64
|
||||||
|
|
||||||
def configure(self, state: BuildState):
|
def configure(self, state: BuildState):
|
||||||
|
os_version = state.os_version()
|
||||||
|
if os_version and os_version < self.os_version[state.architecture()]:
|
||||||
|
raise RuntimeError('Minimum OS version requirement is not met')
|
||||||
|
|
||||||
os.makedirs(state.build_path, exist_ok=True)
|
os.makedirs(state.build_path, exist_ok=True)
|
||||||
|
|
||||||
env = self.environment
|
env = self.environment
|
||||||
|
|
Loading…
Reference in a new issue