mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-06-12 17:19:01 +08:00
[Config] Don't use @name variable directly and add API to get bundle filename.
This commit is contained in:
@@ -324,8 +324,14 @@ module Motion; module Project;
|
||||
end
|
||||
end
|
||||
|
||||
# @param [String] platform
|
||||
# The platform identifier that's being build for, such as
|
||||
# `iPhoneSimulator` or `iPhoneOS`.
|
||||
#
|
||||
# @return [String] The path to the app bundle in the build directory.
|
||||
#
|
||||
def app_bundle(platform)
|
||||
File.join(versionized_build_dir(platform), bundle_name + '.app')
|
||||
File.join(versionized_build_dir(platform), bundle_filename)
|
||||
end
|
||||
|
||||
def app_bundle_executable(platform)
|
||||
@@ -459,7 +465,7 @@ module Motion; module Project;
|
||||
'bundle-identifier' => identifier,
|
||||
'bundle-version' => @version,
|
||||
'kind' => 'software',
|
||||
'title' => @name
|
||||
'title' => name
|
||||
} }
|
||||
]
|
||||
})
|
||||
|
||||
@@ -122,7 +122,7 @@ module Motion; module Project;
|
||||
end
|
||||
|
||||
def app_bundle_raw(platform)
|
||||
File.join(versionized_build_dir(platform), bundle_name + '.app')
|
||||
File.join(versionized_build_dir(platform), bundle_filename)
|
||||
end
|
||||
|
||||
def app_bundle(platform)
|
||||
|
||||
@@ -289,8 +289,16 @@ EOS
|
||||
common_flags(platform) + ' -Wl,-no_pie'
|
||||
end
|
||||
|
||||
# @return [String] The application bundle name, excluding extname.
|
||||
#
|
||||
def bundle_name
|
||||
@name + (spec_mode ? '_spec' : '')
|
||||
name + (spec_mode ? '_spec' : '')
|
||||
end
|
||||
|
||||
# @return [String] The application bundle filename, including extname.
|
||||
#
|
||||
def bundle_filename
|
||||
bundle_name + '.app'
|
||||
end
|
||||
|
||||
def versionized_build_dir(platform)
|
||||
@@ -298,7 +306,7 @@ EOS
|
||||
end
|
||||
|
||||
def app_bundle_dsym(platform)
|
||||
File.join(versionized_build_dir(platform), bundle_name + '.app.dSYM')
|
||||
File.join(versionized_build_dir(platform), bundle_filename + '.dSYM')
|
||||
end
|
||||
|
||||
def archive_extension
|
||||
@@ -310,7 +318,7 @@ EOS
|
||||
end
|
||||
|
||||
def identifier
|
||||
@identifier ||= "com.yourcompany.#{@name.gsub(/\s/, '')}"
|
||||
@identifier ||= "com.yourcompany.#{name.gsub(/\s/, '')}"
|
||||
spec_mode ? @identifier + '_spec' : @identifier
|
||||
end
|
||||
|
||||
@@ -326,10 +334,10 @@ EOS
|
||||
{
|
||||
'BuildMachineOSBuild' => `sw_vers -buildVersion`.strip,
|
||||
'CFBundleDevelopmentRegion' => 'en',
|
||||
'CFBundleName' => @name,
|
||||
'CFBundleDisplayName' => @name,
|
||||
'CFBundleName' => name,
|
||||
'CFBundleDisplayName' => name,
|
||||
'CFBundleIdentifier' => identifier,
|
||||
'CFBundleExecutable' => @name,
|
||||
'CFBundleExecutable' => name,
|
||||
'CFBundleInfoDictionaryVersion' => '6.0',
|
||||
'CFBundlePackageType' => 'APPL',
|
||||
'CFBundleShortVersionString' => (@short_version || @version),
|
||||
|
||||
Reference in New Issue
Block a user