mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-07 12:50:38 +08:00
Restore iOS build support (#2352)
* initial commit * initial commit * add port files * ios: Changes to allow creating app bundle without xcode projects * ios: Added mic perms request * ios: Very basic app bundle creation script * ios: Fix -log parameter * ios: Sdk no longer hardcoded and option to compile for simulator * general: Update gitignore * ios: Enable game mode for the app * ios: Compile instructions and updated ipa creation script * ios: Code cleanup * ios: Remove dylibs * general: Remove extra submodules * ios: Remove dylibs again * ios: Implement suggested changes * ios: Fix building as dylib instead of binary * ios: Scripts for building mods * ios: Move 'ios' contents to engine/platform/ios/bundle and modify scripts * ios: Update createipa.sh to use waf install * ios: Clean script and updated README * general: Fix spelling mistake and outdated instructions * ios: Clean up in xcompile.py * ios: Fix createipa.sh generating an invalid ipa * ios: Temporary fix for launch dialog textfield colors in dark mode
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# encoding: utf-8
|
||||
# mittorn, 2018
|
||||
|
||||
from waflib import Logs
|
||||
from waflib import Logs, TaskGen
|
||||
from waflib.extras import pthread
|
||||
import os
|
||||
from copy import copy
|
||||
@@ -42,6 +42,12 @@ int main(int argc, char **argv)
|
||||
}
|
||||
'''
|
||||
|
||||
frameworks = ['Foundation', 'UIKit', 'QuartzCore', 'GameController', 'SystemConfiguration', 'CFNetwork', 'AVFoundation', 'CoreGraphics']
|
||||
|
||||
@TaskGen.extension('.m')
|
||||
def m_hook(self, node):
|
||||
return self.create_compiled_task('c', node)
|
||||
|
||||
def options(opt):
|
||||
grp = opt.add_option_group('Engine options')
|
||||
|
||||
@@ -141,6 +147,10 @@ def configure(conf):
|
||||
|
||||
if not conf.env.DEST_OS in ['win32', 'android']:
|
||||
conf.check_pthreads(mode='c')
|
||||
|
||||
if conf.env.IOS:
|
||||
for i in frameworks :
|
||||
conf.check(features='c cprogram', framework=i, uselib_store=i, msg='Checking for %s framework' % i)
|
||||
|
||||
conf.check_cc(fragment=EXECINFO_TEST, msg='Checking for glibc backtrace()', mandatory=False, define_name='HAVE_EXECINFO')
|
||||
|
||||
@@ -205,7 +215,11 @@ def build(bld):
|
||||
# include common POSIX conformant code
|
||||
if bld.env.DEST_OS not in ['win32', 'dos']:
|
||||
source += bld.path.ant_glob('platform/posix/*.c')
|
||||
|
||||
if bld.env.IOS:
|
||||
source += bld.path.ant_glob('platform/ios/*.c')
|
||||
source += bld.path.ant_glob('platform/ios/*.m')
|
||||
includes += bld.path.ant_glob('platform/ios')
|
||||
|
||||
# include sources for optional features
|
||||
if bld.get_define('XASH_CUSTOM_SWAP'):
|
||||
source += ['platform/misc/kmalloc.c', 'platform/misc/sbrk.c']
|
||||
@@ -284,6 +298,10 @@ def build(bld):
|
||||
f = bld.shlib
|
||||
install_path = bld.env.LIBDIR
|
||||
|
||||
if bld.env.IOS:
|
||||
libs += frameworks
|
||||
defines += ['XASH_SDLMAIN=1']
|
||||
|
||||
if bld.env.DEST_OS in ['nswitch', 'psvita', 'emscripten']:
|
||||
install_path = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user