bin/nixenvironment in nixenvironment-0.0.104 vs bin/nixenvironment in nixenvironment-0.0.105
- old
+ new
@@ -89,10 +89,11 @@
c.option '--app_version VERSION', String, 'Specify the version of the app (not implemented for unity-android)' # TODO: implement for unity-android
c.option '--build_number BUILD_NUMBER', String, 'Specify the build number of the app (not implemented for unity-android)' # TODO: implement for unity-android
c.option '--requires_fullscreen', 'Set UIRequiresFullScreen to YES in Info.plist (ios)'
c.option '--skip_working_copy_check', 'Skip working copy cleaning check'
c.option '--share_schemes', 'Share schemes for xcode project'
+ c.option '--xc_args ARGS', String, 'Pass arguments to xcodebuild'
c.action do |_args, options|
options.default :config => 'Debug', :ipa => 'device', :icon_tagger => 'full', :unity_path => 'UNITY'
unity_platform = options.unity_platform
is_unity_platform = unity_platform.present?
need_to_build_ios = true
@@ -175,11 +176,11 @@
@config_settings.merge!(Xcodebuild.config_settings) { |_key, v1, v2| v1 || v2 }
begin
prebuild(options.config, options.app_version, options.requires_fullscreen, options.skip_working_copy_check)
- build(options.config, options.xcconfig, options.ipa, options.ndsym, options.icon_tagger)
+ build(options.config, options.xcconfig, options.ipa, options.ndsym, options.icon_tagger, options.xc_args)
ensure
restore_info_plists
end
elsif need_to_process_webgl_build
Archiver.make_webgl_zip(UNITY_WEBGL_PROJECT_PATH)
@@ -506,11 +507,11 @@
backup_info_plists
BuildEnvVarsLoader.save_last_build_vars(@config_settings)
update_info_plists(config, app_version, requires_fullscreen)
end
-def build(config, xcconfig, ipa, ndsym, icon_tagger)
+def build(config, xcconfig, ipa, ndsym, icon_tagger, xc_args)
project_to_build = @config_settings[PROJECT_TO_BUILD_KEY]
project_target_to_build = @config_settings[PROJECT_TARGET_TO_BUILD_KEY]
workspace_to_build = @config_settings[WORKSPACE_TO_BUILD_KEY]
workspace_scheme_to_build = @config_settings[WORKSPACE_SCHEME_TO_BUILD_KEY]
sdk = @config_settings[SDK_KEY]
@@ -519,13 +520,24 @@
built_products_dir = @config_settings[BUILT_PRODUCTS_DIR_KEY]
env_var_prefix = @config_settings[ENV_VAR_PREFIX_KEY]
debug_information_format = ndsym ? 'dwarf' : 'dwarf-with-dsym'
- other_args = { 'DEBUG_INFORMATION_FORMAT' => debug_information_format, 'DWARF_DSYM_FOLDER_PATH' => dwarf_dsym_folder_path,
- 'CONFIGURATION_BUILD_DIR' => configuration_build_dir, 'BUILT_PRODUCTS_DIR' => built_products_dir }
+ other_args = { 'DEBUG_INFORMATION_FORMAT' => debug_information_format,
+ 'DWARF_DSYM_FOLDER_PATH' => dwarf_dsym_folder_path,
+ 'CONFIGURATION_BUILD_DIR' => configuration_build_dir,
+ 'BUILT_PRODUCTS_DIR' => built_products_dir,
+ 'GCC_PRECOMPILE_PREFIX_HEADER' => 'NO', # set "Precompile Prefix Header" flag to "NO"; otherwise it can throw error ".pch.pch has been modified since the precompiled header"
+ 'ENABLE_BITCODE' => 'NO'} # need this in order to build unity <= 5.2.0 generated projects. TODO: remove me!
+ other_args_str = other_args.map { |key, value| "#{key}='#{value}'" }.join(' ')
- Xcodebuild.build(sdk, config, xcconfig, project_to_build, project_target_to_build, workspace_to_build, workspace_scheme_to_build, env_var_prefix, other_args)
+ if xc_args.present?
+ xc_args.concat(" #{other_args_str}")
+ else
+ xc_args = other_args_str
+ end
+
+ Xcodebuild.build(sdk, config, xcconfig, project_to_build, project_target_to_build, workspace_to_build, workspace_scheme_to_build, env_var_prefix, xc_args)
error('Build error!') unless Xcodebuild.last_cmd_success?
if sdk.include?('macos')
begin
\ No newline at end of file