diff --git a/lib/motion/project/builder.rb b/lib/motion/project/builder.rb index 2cdf2175..5c708217 100644 --- a/lib/motion/project/builder.rb +++ b/lib/motion/project/builder.rb @@ -456,6 +456,7 @@ EOS # Delete old resource files. Dir.chdir(bundle_path) do Dir.glob('**/*').each do |bundle_res| + bundle_res = convert_filesystem_encoding(bundle_res) next if File.directory?(bundle_res) next if reserved_app_bundle_files.include?(bundle_res) next if resources_files.include?(bundle_res) @@ -478,6 +479,16 @@ EOS end end + def convert_filesystem_encoding(string) + begin + string.encode("UTF-8", "UTF8-MAC") + rescue + # for Ruby 1.8 + require 'iconv' + Iconv.conv("UTF-8", "UTF8-MAC", string) + end + end + def codesign(config, platform) bundle_path = config.app_bundle(platform) raise unless File.exist?(bundle_path)