Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS bug fix #5

Merged
merged 2 commits into from
Mar 3, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions brulib/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,15 @@ def cmd_make_macos(gyp_filename, config, verbose):
gyp_filename = os.path.basename(gyp_filename)
gyp_cmdline = 'gyp --depth=. -f xcode {} --generator-output=./xcode-macos'.format(gyp_filename)
run_gyp(gyp_cmdline)
filepattern = './xcode-macos/*.xcodeproj'
xcodeprj = './xcode-macos/{}xcodeproj'.format(gyp_filename[:-3])
filepattern = xcodeprj
files = glob.glob(filepattern)
print(filepattern)
print(files)
if len(files) == 0:
raise Exception('gyp did not generate {}, no idea how to '
'build with your toolchain, please build manually').format(filepattern)
xcode_cmdline = 'xCodeBuild -alltargets -project {} -configuration {}'.format(files[0],config)
xcode_cmdline = 'xCodeBuild -alltargets -project {} -configuration {}'.format(xcodeprj,config)
print("running '{}'".format(xcode_cmdline))
returncode = os.system(xcode_cmdline)
if returncode != 0:
Expand All @@ -224,18 +225,18 @@ def cmd_make_ios(gyp_filename, config, verbose):
gyp_filename = os.path.basename(gyp_filename)
gyp_cmdline = 'gyp --depth=. -f xcode -DOS=iOS {} --generator-output=./xcode-ios'.format(gyp_filename)
run_gyp(gyp_cmdline)

filepattern = './xcode-ios/*.xcodeproj'
xcodeprj = './xcode-ios/{}xcodeproj'.format(gyp_filename[:-3])
filepattern = xcodeprj
files = glob.glob(filepattern)
if len(files) == 0:
raise Exception('gyp did not generate {}, no idea how to '
'build with your toolchain, please build manually').format(filepattern)
xcode_cmdline = 'xCodeBuild -alltargets -project {} -configuration {} -sdk iphonesimulator'.format(files[0],config)
xcode_cmdline = 'xCodeBuild -alltargets -project {} -configuration {} -sdk iphonesimulator'.format(xcodeprj,config)
print("running '{}'".format(xcode_cmdline))
returncode = os.system(xcode_cmdline)
if returncode != 0:
raise Exception('Build failed: make for device returned', returncode)
xcode_cmdline = 'xCodeBuild -alltargets -project {} -configuration {} -sdk iphoneos'.format(files[0],config)
xcode_cmdline = 'xCodeBuild -alltargets -project {} -configuration {} -sdk iphoneos'.format(xcodeprj,config)
print("running '{}'".format(xcode_cmdline))
returncode = os.system(xcode_cmdline)
if returncode != 0:
Expand Down