bin/nixenvironment in nixenvironment-0.0.55 vs bin/nixenvironment in nixenvironment-0.0.56
- old
+ new
@@ -43,13 +43,16 @@
global_option ('--code_coverage_output_directory VALUE') { |value| $code_coverage_output_directory = value }
global_option ('--env_var_prefix VALUE') { |value| $env_var_prefix = value }
global_option ('--bundle_id VALUE') { |value| $bundle_id = value }
-global_option ('--resigned_bundle_id VALUE') { |value| $resigned_bundle_id= value }
+global_option ('--resigned_bundle_id VALUE') { |value| $resigned_bundle_id = value }
+global_option ('--resigned_watchkit_app_bundle_id VALUE') { |value| $resigned_watchkit_app_bundle_id = value }
+global_option ('--resigned_watchkit_extension_bundle_id VALUE') { |value| $resigned_watchkit_extension_bundle_id = value }
global_option ('--resigned_bundle_name VALUE') { |value| $resigned_bundle_name = value }
global_option ('--resigned_entitlements_path VALUE') { |value| $resigned_entitlements_path = value }
+global_option ('--resigned_watchkit_extension_entitlements_path VALUE') { |value| $resigned_watchkit_extension_entitlements_path = value }
command :update do |c|
c.syntax = 'nixenvironment update'
c.description = 'Install or update ninbas and other environment stuff'
c.option '--ninbas NAME', String, 'Select ninbas branch, tag or revision to clone'
@@ -274,12 +277,15 @@
update_config_settings('CODE_COVERAGE_CONFIGURATION', $code_coverage_configuration)
update_config_settings('CODE_COVERAGE_OUTPUT_DIRECTORY', $code_coverage_output_directory)
update_config_settings('ENV_VAR_PREFIX', $env_var_prefix)
update_config_settings('BUNDLE_ID', $bundle_id)
update_config_settings('RESIGNED_BUNDLE_ID', $resigned_bundle_id)
+ update_config_settings('RESIGNED_WATCHKIT_APP_BUNDLE_ID', $resigned_watchkit_app_bundle_id)
+ update_config_settings('RESIGNED_WATCHKIT_EXTENSION_BUNDLE_ID', $resigned_watchkit_extension_bundle_id)
update_config_settings('RESIGNED_BUNDLE_NAME', $resigned_bundle_name)
update_config_settings('RESIGNED_ENTITLEMENTS_PATH', $resigned_entitlements_path)
+ update_config_settings('RESIGNED_WATCHKIT_EXTENSION_ENTITLEMENTS_PATH', $resigned_watchkit_extension_entitlements_path)
end
def update_config_settings(key, value)
if value
@config_settings[key] = value
@@ -447,28 +453,41 @@
info
end
def save_build_env_vars
- app_product = File.join(@config_settings['BUILT_PRODUCTS_DIR'], @config_settings['EXECUTABLE_NAME']) + '.app'
+ executable_name = @config_settings['EXECUTABLE_NAME']
+ watchkit_app_executable = executable_name + ' WatchKit App.app'
+ watchkit_extension_executable = executable_name + ' WatchKit Extension.appex'
- system("
+ app_product = File.join(@config_settings['BUILT_PRODUCTS_DIR'], executable_name) + '.app'
+ watchkit_extension_relative_product = @config_settings['RESIGNED_WATCHKIT_EXTENSION_BUNDLE_ID'].nil? ? nil : File.join('PlugIns', watchkit_extension_executable).shellescape
+ watchkit_app_relative_product = @config_settings['RESIGNED_WATCHKIT_APP_BUNDLE_ID'].nil? ? nil : File.join(watchkit_extension_relative_product, watchkit_app_executable).shellescape
+
+ resigned_watchkit_extension_entitlements_path = @config_settings['RESIGNED_WATCHKIT_EXTENSION_ENTITLEMENTS_PATH'].nil? ? nil : @config_settings['RESIGNED_WATCHKIT_EXTENSION_ENTITLEMENTS_PATH'].shellescape
+
+ system("
echo \"#!/bin/sh\
### AUTOGENERATED BY Nixenvironment; DO NOT EDIT ###
PROJECT=#{@config_settings['PROJECT']}
BUILT_PRODUCTS_DIR=#{@config_settings['BUILT_PRODUCTS_DIR']}
OBJECTS_NORMAL_DIR=#{@config_settings['OBJECT_FILE_DIR_normal']}
EXECUTABLE_NAME=#{@config_settings['EXECUTABLE_NAME']}
APP_PRODUCT=#{app_product}
+WATCHKIT_APP_RELATIVE_PRODUCT=#{watchkit_app_relative_product}
+WATCHKIT_EXTENSION_RELATIVE_PRODUCT=#{watchkit_extension_relative_product}
APP_DSYM=#{app_product}.dSYM
APP_INFOPLIST_FILE=#{@config_settings['PRODUCT_SETTINGS_PATH']}
EMBEDDED_PROFILE=#{app_product}/#{@config_settings['EMBEDDED_PROFILE_NAME']}
TARGET_NAME=#{@config_settings['TARGET_NAME']}
CONFIGURATION=#{@config_settings['CONFIGURATION']}
SDK_NAME=#{@config_settings['SDK_NAME']}
RESIGNED_BUNDLE_ID=#{@config_settings['RESIGNED_BUNDLE_ID']}
+RESIGNED_WATCHKIT_APP_BUNDLE_ID=#{@config_settings['RESIGNED_WATCHKIT_APP_BUNDLE_ID']}
+RESIGNED_WATCHKIT_EXTENSION_BUNDLE_ID=#{@config_settings['RESIGNED_WATCHKIT_EXTENSION_BUNDLE_ID']}
RESIGNED_BUNDLE_NAME=#{@config_settings['RESIGNED_BUNDLE_NAME']}
-RESIGNED_ENTITLEMENTS_PATH=#{@config_settings['RESIGNED_ENTITLEMENTS_PATH']}\" > _last_build_vars.sh
+RESIGNED_ENTITLEMENTS_PATH=#{@config_settings['RESIGNED_ENTITLEMENTS_PATH']}
+RESIGNED_WATCHKIT_EXTENSION_ENTITLEMENTS_PATH=#{resigned_watchkit_extension_entitlements_path}\" > _last_build_vars.sh
")
end
def prebuild(config)
save_revision = File.join(BUILD_SCRIPTS_PATH, 'SaveRevision.sh')