Skip to content

Commit 24cdcb9

Browse files
author
peng jun
committed
bundleR update
1 parent 53174c7 commit 24cdcb9

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

R-OC/R-OC/BundleR.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/usr/bin/ruby
2-
#exec 'export LANG="en_US.UTF-8"'
3-
#exec 'export LC_ALL="en_US.UTF-8"'
4-
#exec 'export LANGUAGE="en_US.UTF-8'
5-
#if RUBY_VERSION =~ /1.9/
6-
# Encoding.default_external = Encoding::UTF_8
7-
# Encoding.default_internal = Encoding::UTF_8
8-
#end
2+
exec 'export LANG="en_US.UTF-8"'
3+
exec 'export LC_ALL="en_US.UTF-8"'
4+
exec 'export LANGUAGE="en_US.UTF-8'
5+
if RUBY_VERSION =~ /1.9/
6+
Encoding.default_external = Encoding::UTF_8
7+
Encoding.default_internal = Encoding::UTF_8
8+
end
99

1010
require 'pathname'
1111
require 'xcodeproj'
@@ -63,7 +63,7 @@ def file (name)
6363
txtM = "-(NSString*)"+name+" { return @\""+name+"\"; }
6464
-(NSString*)"+name+" { return [[NSBundle "+@CURRENT_BUNDLE+"] pathForResource:@\""+name+"\" ofType:@\""+suffix+"\"]; }
6565
"
66-
66+
6767
writeOCFile(fph,txtH,fpm,txtM)
6868
end
6969
def storyboard (name)
@@ -166,7 +166,7 @@ def newRFileFile ()
166166
fpm = File.dirname(__FILE__) + "/RFile.m"
167167
txtH = "#import <Foundation/Foundation.h>
168168
#import <UIKit/UIKit.h>
169-
169+
170170
@interface RFile : NSObject
171171
"+@NORMAN_XCODE_TAG+"
172172
@end"
@@ -256,14 +256,14 @@ def traverse_xcasssets_dir(file_path)
256256
else
257257
end
258258
end
259-
259+
260260
end
261261
#写文件
262262
@AllResource.each do |path|
263-
263+
264264
rs_name = File::basename(path)
265265
rs_name = rs_name.gsub(/@2x|@3x/, '@2x'=>'','@3x'=>'')
266-
266+
267267
if rs_name.end_with?(".xib") then
268268
xib(rs_name)
269269
elsif rs_name.end_with?(".png",".tiff",".jpg") then

0 commit comments

Comments
 (0)