rhodes 3.2.0.beta.5 → 3.2.0.beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +3 -0
- data/Manifest.txt +10 -1
- data/Rakefile +6 -0
- data/bin/get-rhodes-info +4 -27
- data/bin/set-rhodes-sdk +4 -1
- data/doc/build.txt +12 -3
- data/doc/extensions.txt +26 -0
- data/installer/Rakefile +156 -0
- data/installer/ServiceLib.nsh +369 -0
- data/installer/jake.rb +478 -0
- data/installer/rhostudio.nsi +76 -143
- data/lib/extensions/digest-sha1/ext/Rakefile +58 -40
- data/lib/extensions/fileutils/fileutils.rb +3 -2
- data/lib/extensions/hmac/hmac-md5.rb +11 -0
- data/lib/extensions/hmac/hmac-rmd160.rb +11 -0
- data/lib/extensions/hmac/hmac-sha1.rb +11 -0
- data/lib/extensions/hmac/hmac-sha2.rb +25 -0
- data/lib/extensions/hmac/hmac.rb +118 -0
- data/lib/extensions/hmac/ruby_hmac.rb +2 -0
- data/lib/extensions/net-http/net/http.rb +1 -1
- data/lib/framework/rho/render.rb +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +1 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +52 -8
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +8 -15
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/util/PerformOnUiThread.java +4 -5
- data/platform/android/build/android.rake +3 -1
- data/platform/iphone/rbuild/iphone.rake +7 -7
- data/platform/shared/common/RhodesApp.cpp +18 -14
- data/platform/shared/common/RhodesApp.h +1 -0
- data/platform/shared/rubyext/System.cpp +3 -0
- data/platform/symbian/build/symbian.rake +13 -5
- data/platform/wp7/RhoRubyLib/net/NetRequest.cs +9 -1
- data/rakefile.rb +6 -0
- data/res/generators/templates/application/Rakefile +10 -1
- data/res/generators/templates/application/app/layout.erb +1 -1
- data/res/generators/templates/application/build.yml +2 -2
- data/res/generators/templates/application/public/jqmobile/{jquery.mobile.iphone.css → jquery-mobile-iphone.css} +0 -0
- data/res/generators/templates/application/public/js/jqmobile-patch.js +23 -20
- data/spec/framework_spec/app/spec/library/digest/sha1/file_spec.rb +3 -3
- data/spec/framework_spec/app/spec/library/net/http/http/Proxy_spec.rb +3 -2
- data/spec/framework_spec/app/spec/library/net/http/http/copy_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/delete_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/finish_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/fixtures/http_server.rb +18 -12
- data/spec/framework_spec/app/spec/library/net/http/http/get_print_spec.rb +2 -2
- data/spec/framework_spec/app/spec/library/net/http/http/get_response_spec.rb +2 -2
- data/spec/framework_spec/app/spec/library/net/http/http/get_spec.rb +3 -3
- data/spec/framework_spec/app/spec/library/net/http/http/head_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/initialize_spec.rb +2 -2
- data/spec/framework_spec/app/spec/library/net/http/http/inspect_spec.rb +4 -4
- data/spec/framework_spec/app/spec/library/net/http/http/lock_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/mkcol_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/move_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/new_spec.rb +7 -7
- data/spec/framework_spec/app/spec/library/net/http/http/newobj_spec.rb +2 -2
- data/spec/framework_spec/app/spec/library/net/http/http/options_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/port_spec.rb +2 -2
- data/spec/framework_spec/app/spec/library/net/http/http/post_form_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/post_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/propfind_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/proppatch_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/proxy_address_spec.rb +2 -2
- data/spec/framework_spec/app/spec/library/net/http/http/proxy_pass_spec.rb +3 -3
- data/spec/framework_spec/app/spec/library/net/http/http/proxy_port_spec.rb +3 -3
- data/spec/framework_spec/app/spec/library/net/http/http/proxy_user_spec.rb +3 -3
- data/spec/framework_spec/app/spec/library/net/http/http/put_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/request_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/send_request_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/set_debug_output_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/shared/request_get.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/shared/request_head.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/shared/request_post.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/shared/request_put.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/shared/started.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/start_spec.rb +8 -8
- data/spec/framework_spec/app/spec/library/net/http/http/trace_spec.rb +1 -1
- data/spec/framework_spec/app/spec/library/net/http/http/unlock_spec.rb +1 -1
- data/spec/framework_spec/app/spec_runner.rb +1 -1
- data/spec/framework_spec/build.yml +2 -2
- data/spec/phone_spec/app/spec/rhom_object_spec.rb +43 -2
- data/version +1 -1
- metadata +14 -5
data/installer/rhostudio.nsi
CHANGED
@@ -36,7 +36,7 @@
|
|
36
36
|
!insertmacro MUI_PAGE_COMPONENTS
|
37
37
|
!insertmacro MUI_PAGE_DIRECTORY
|
38
38
|
!insertmacro MUI_PAGE_INSTFILES
|
39
|
-
Page custom customerConfig
|
39
|
+
#Page custom customerConfig
|
40
40
|
!insertmacro MUI_PAGE_FINISH
|
41
41
|
|
42
42
|
;======================================================
|
@@ -52,8 +52,8 @@
|
|
52
52
|
|
53
53
|
;======================================================
|
54
54
|
; Variables
|
55
|
-
|
56
|
-
|
55
|
+
# var varApacheEmail
|
56
|
+
# var varApachePort
|
57
57
|
var varDbPass
|
58
58
|
|
59
59
|
;======================================================
|
@@ -64,7 +64,7 @@ section
|
|
64
64
|
|
65
65
|
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\javaws.exe" "Path"
|
66
66
|
|
67
|
-
StrCmp $0 ""
|
67
|
+
StrCmp $0 "" jreInstallFail
|
68
68
|
|
69
69
|
# set the installation directory as the destination for the following actions
|
70
70
|
setOutPath $INSTDIR
|
@@ -78,15 +78,14 @@ section
|
|
78
78
|
# point the new shortcut at the program uninstaller
|
79
79
|
createShortCut "$SMPROGRAMS\RhoStudio\Uninstall RhoStudio.lnk" "$INSTDIR\uninstall.exe"
|
80
80
|
createShortCut "$SMPROGRAMS\RhoStudio\RhoStudio.lnk" "$INSTDIR\eclipse\RhoStudio.exe"
|
81
|
-
createShortCut "$SMPROGRAMS\RhoStudio\Samples.lnk" "$INSTDIR\sas\"
|
82
81
|
|
83
|
-
Goto
|
82
|
+
Goto okFinishSection
|
84
83
|
|
85
|
-
|
86
|
-
MessageBox MB_OK|MB_ICONINFORMATION|MB_DEFBUTTON1 "Java Runtime Environment could be found on your computer. Please install Java Runtime Environment before RhoStudio."
|
84
|
+
jreInstallFail:
|
85
|
+
MessageBox MB_OK|MB_ICONINFORMATION|MB_DEFBUTTON1 "Java Runtime Environment could not be found on your computer. Please install Java Runtime Environment before RhoStudio."
|
87
86
|
Quit
|
88
87
|
|
89
|
-
|
88
|
+
okFinishSection:
|
90
89
|
sectionEnd
|
91
90
|
|
92
91
|
# uninstaller section start
|
@@ -100,16 +99,8 @@ section "uninstall"
|
|
100
99
|
delete "$SMPROGRAMS\RhoStudio\RhoStudio.lnk"
|
101
100
|
delete "$SMPROGRAMS\RhoStudio"
|
102
101
|
|
103
|
-
ExecWait 'net stop apache2.2'
|
104
102
|
ExecWait 'net stop redis'
|
105
|
-
#ExecWait 'net stop rhosync-1'
|
106
|
-
#ExecWait 'net stop rhosync-2'
|
107
|
-
#ExecWait 'net stop rhosync-3'
|
108
|
-
ExecWait 'sc delete apache2.2'
|
109
103
|
ExecWait 'sc delete redis'
|
110
|
-
#ExecWait 'sc delete rhosync-1'
|
111
|
-
#ExecWait 'sc delete rhosync-2'
|
112
|
-
#ExecWait 'sc delete rhosync-3'
|
113
104
|
|
114
105
|
# remove env vars
|
115
106
|
Push "PATH"
|
@@ -141,46 +132,66 @@ section "uninstall"
|
|
141
132
|
# uninstaller section end
|
142
133
|
sectionEnd
|
143
134
|
|
144
|
-
Section "
|
145
|
-
|
135
|
+
Section "GNU Make" gnumakeSection
|
136
|
+
|
146
137
|
SetOutPath $INSTDIR
|
147
138
|
|
148
|
-
File /r "
|
139
|
+
File /r "make-3.81"
|
149
140
|
|
150
|
-
Push
|
151
|
-
Push "
|
152
|
-
|
141
|
+
Push "PATH"
|
142
|
+
Push "P"
|
143
|
+
Push "HKLM"
|
144
|
+
Push "$INSTDIR\make-3.81\bin"
|
145
|
+
Call EnvVarUpdate
|
153
146
|
Pop $R0
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
Push all
|
159
|
-
Push $INSTDIR\apache2\conf\httpd.conf
|
160
|
-
Call AdvReplaceInFile
|
147
|
+
|
148
|
+
SectionEnd
|
149
|
+
|
150
|
+
Section "RhoStudio" studioSection
|
161
151
|
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
Push all
|
166
|
-
Push $INSTDIR\apache2\conf\httpd.conf
|
167
|
-
Call AdvReplaceInFile
|
152
|
+
SetOutPath $INSTDIR
|
153
|
+
|
154
|
+
File /r "eclipse"
|
168
155
|
|
169
|
-
Push CGIBIN
|
170
|
-
Push $R0/apache2/cgi-bin
|
171
|
-
Push all
|
172
|
-
Push all
|
173
|
-
Push $INSTDIR\apache2\conf\httpd.conf
|
174
|
-
Call AdvReplaceInFile
|
175
156
|
SectionEnd
|
176
157
|
|
177
|
-
Section "
|
158
|
+
Section "Samples" samplesSection
|
159
|
+
|
160
|
+
SetOutPath $INSTDIR
|
161
|
+
|
162
|
+
File /r "samples"
|
163
|
+
|
164
|
+
SectionEnd
|
165
|
+
|
166
|
+
Section "DevKit" devkitSection
|
167
|
+
|
168
|
+
SetOutPath $INSTDIR
|
169
|
+
|
170
|
+
File /r "devkit"
|
171
|
+
|
172
|
+
Push "PATH"
|
173
|
+
Push "P"
|
174
|
+
Push "HKLM"
|
175
|
+
Push "$INSTDIR\devkit\mingw\bin"
|
176
|
+
Call EnvVarUpdate
|
177
|
+
Pop $R0
|
178
|
+
|
179
|
+
Push "PATH"
|
180
|
+
Push "P"
|
181
|
+
Push "HKLM"
|
182
|
+
Push "$INSTDIR\devkit\bin"
|
183
|
+
Call EnvVarUpdate
|
184
|
+
Pop $R0
|
185
|
+
|
186
|
+
SectionEnd
|
187
|
+
|
188
|
+
Section "Ruby, Rubygems, Rhodes, Rhoconnect and adapters" rubySection
|
178
189
|
|
179
190
|
SetOutPath $INSTDIR
|
180
191
|
|
181
192
|
File /r "ruby"
|
182
193
|
File /r "make-3.81"
|
183
|
-
File /r "rhosync"
|
194
|
+
#File /r "rhosync"
|
184
195
|
File "README.html"
|
185
196
|
File "RHOSTUDIO-LICENSE.txt"
|
186
197
|
|
@@ -192,38 +203,8 @@ Section "Ruby, Rubygems, Rhodes, and RhoSync" rubySection
|
|
192
203
|
Push "$INSTDIR\ruby\bin"
|
193
204
|
Call EnvVarUpdate
|
194
205
|
Pop $R0
|
195
|
-
|
196
|
-
|
197
|
-
Push "*." # filter
|
198
|
-
Push "$INSTDIR\ruby\bin" # folder to search in
|
199
|
-
Call FixScriptFilesInDir
|
200
|
-
Pop $R0
|
201
|
-
|
202
|
-
Push "$INSTDIR\binfileoutput1.txt" # output file - unused paramter
|
203
|
-
Push "*.bat" # filter
|
204
|
-
Push "$INSTDIR\ruby\bin" # folder to search in
|
205
|
-
Call FixScriptFilesInDir
|
206
|
-
Pop $R0
|
207
|
-
|
208
|
-
Push "$INSTDIR\binfileoutput2.txt" # output file - unused paramter
|
209
|
-
Push "*.rb" # filter
|
210
|
-
Push "$INSTDIR\ruby\bin" # folder to search in
|
211
|
-
Call FixScriptFilesInDir
|
212
|
-
Pop $R0
|
213
|
-
|
214
|
-
|
215
|
-
#ExecWait '$INSTDIR\rhosync\services\rhosync-service1.exe install' $0
|
216
|
-
#ExecWait '$INSTDIR\rhosync\services\rhosync-service2.exe install' $0
|
217
|
-
#ExecWait '$INSTDIR\rhosync\services\rhosync-service3.exe install' $0
|
218
|
-
|
219
|
-
#ExecWait 'net start rhosync-1'
|
220
|
-
#ExecWait 'net start rhosync-2'
|
221
|
-
#ExecWait 'net start rhosync-3'
|
222
|
-
|
223
|
-
#delete "$INSTDIR\binfileoutput.txt"
|
224
|
-
#delete "$INSTDIR\binfileoutput1.txt"
|
225
|
-
#delete "$INSTDIR\binfileoutput2.txt"
|
226
|
-
|
206
|
+
|
207
|
+
ExecWait "$INSTDIR\ruby\bin\rake.bat dtach:install"
|
227
208
|
|
228
209
|
SectionEnd
|
229
210
|
|
@@ -249,20 +230,23 @@ Section "Redis" redisSection
|
|
249
230
|
Call EnvVarUpdate
|
250
231
|
Pop $R0
|
251
232
|
|
233
|
+
ExecWait "$INSTDIR\ruby\bin\rake.bat redis:install"
|
234
|
+
|
252
235
|
SectionEnd
|
253
236
|
|
254
|
-
Section "Git 1.7.
|
237
|
+
Section "Git 1.7.6" gitSection
|
255
238
|
|
256
239
|
SetOutPath $INSTDIR
|
257
240
|
|
258
|
-
File "Git-1.7.
|
241
|
+
File "Git-1.7.6-preview20110708.exe"
|
259
242
|
|
260
|
-
ExecWait "$INSTDIR\Git-1.7.
|
243
|
+
ExecWait "$INSTDIR\Git-1.7.6-preview20110708.exe"
|
261
244
|
|
262
|
-
delete "$INSTDIR\Git-1.7.
|
245
|
+
delete "$INSTDIR\Git-1.7.6-preview20110708.exe"
|
263
246
|
|
264
247
|
SectionEnd
|
265
248
|
|
249
|
+
|
266
250
|
#Section "Java SE Runtime Environment 6 Update 26" javaSection
|
267
251
|
|
268
252
|
# SetOutPath $INSTDIR
|
@@ -275,84 +259,32 @@ SectionEnd
|
|
275
259
|
|
276
260
|
#SectionEnd
|
277
261
|
|
278
|
-
Section "GNU Make" gnumakeSection
|
279
|
-
|
280
|
-
SetOutPath $INSTDIR
|
281
|
-
|
282
|
-
File /r "make-3.81"
|
283
|
-
|
284
|
-
Push "PATH"
|
285
|
-
Push "P"
|
286
|
-
Push "HKLM"
|
287
|
-
Push "$INSTDIR\make-3.81\bin"
|
288
|
-
Call EnvVarUpdate
|
289
|
-
Pop $R0
|
290
|
-
|
291
|
-
SectionEnd
|
292
|
-
|
293
|
-
Section "RhoStudio" studioSection
|
294
|
-
|
295
|
-
SetOutPath $INSTDIR
|
296
|
-
|
297
|
-
File /r "eclipse"
|
298
|
-
|
299
|
-
SectionEnd
|
300
|
-
|
301
|
-
Section "Samples" samplesSection
|
302
|
-
|
303
|
-
SetOutPath $INSTDIR
|
304
|
-
|
305
|
-
File /r "sas"
|
306
|
-
|
307
|
-
SectionEnd
|
308
|
-
|
309
|
-
Section "DevKit" devkitSection
|
310
|
-
|
311
|
-
SetOutPath $INSTDIR
|
312
|
-
|
313
|
-
File /r "devkit"
|
314
|
-
|
315
|
-
Push "PATH"
|
316
|
-
Push "P"
|
317
|
-
Push "HKLM"
|
318
|
-
Push "$INSTDIR\devkit\mingw\bin"
|
319
|
-
Call EnvVarUpdate
|
320
|
-
Pop $R0
|
321
|
-
|
322
|
-
Push "PATH"
|
323
|
-
Push "P"
|
324
|
-
Push "HKLM"
|
325
|
-
Push "$INSTDIR\devkit\bin"
|
326
|
-
Call EnvVarUpdate
|
327
|
-
Pop $R0
|
328
|
-
|
329
|
-
SectionEnd
|
330
262
|
;======================================================
|
331
263
|
;Descriptions
|
332
264
|
|
333
265
|
;Language strings
|
334
266
|
LangString DESC_InstallRhostudio ${LANG_ENGLISH} "This installs Eclipse with RhoStudio."
|
335
|
-
LangString DESC_InstallApache ${LANG_ENGLISH} "This installs the Apache 2.2 webserver"
|
336
|
-
LangString DESC_InstallRuby ${LANG_ENGLISH} "This installs ruby 1.8.7, rubygems 1.3.7, Rhodes and
|
337
|
-
LangString DESC_InstallRedis ${LANG_ENGLISH} "This installs redis 2.2.2 (required to run
|
267
|
+
#LangString DESC_InstallApache ${LANG_ENGLISH} "This installs the Apache 2.2 webserver"
|
268
|
+
LangString DESC_InstallRuby ${LANG_ENGLISH} "This installs ruby 1.8.7, rubygems 1.3.7, Rhodes, Rhoconnect and adapters"
|
269
|
+
LangString DESC_InstallRedis ${LANG_ENGLISH} "This installs redis 2.2.2 (required to run Rhoconnect)."
|
338
270
|
LangString DESC_InstallGit ${LANG_ENGLISH} "This installs Git (which includes the Git Bash)."
|
339
271
|
LangString DESC_InstallGnuMake ${LANG_ENGLISH} "This installs GNU Make (sometimes required to update gems)."
|
340
272
|
LangString DESC_InstallSamples ${LANG_ENGLISH} "This installs samples for rhodes."
|
341
|
-
LangString DESC_InstallDevKit ${LANG_ENGLISH} "This installs samples for rhodes."
|
342
|
-
#
|
343
|
-
|
273
|
+
LangString DESC_InstallDevKit ${LANG_ENGLISH} "This installs samples for rhodes."
|
274
|
+
#LangString DESC_InstallJava ${LANG_ENGLISH} "This installs Java SE Runtime Environment."
|
344
275
|
|
345
276
|
;Assign language strings to sections
|
277
|
+
|
346
278
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
347
279
|
!insertmacro MUI_DESCRIPTION_TEXT ${studioSection} $(DESC_InstallRhostudio)
|
348
|
-
|
280
|
+
#!insertmacro MUI_DESCRIPTION_TEXT ${apache2Section} $(DESC_InstallApache)
|
281
|
+
!insertmacro MUI_DESCRIPTION_TEXT ${gnumakeSection} $(DESC_InstallGnuMake)
|
282
|
+
!insertmacro MUI_DESCRIPTION_TEXT ${devkitSection} $(DESC_InstallDevKit)
|
349
283
|
!insertmacro MUI_DESCRIPTION_TEXT ${rubySection} $(DESC_InstallRuby)
|
350
284
|
!insertmacro MUI_DESCRIPTION_TEXT ${redisSection} $(DESC_InstallRedis)
|
351
285
|
!insertmacro MUI_DESCRIPTION_TEXT ${gitSection} $(DESC_InstallGit)
|
352
|
-
!insertmacro MUI_DESCRIPTION_TEXT ${gnumakeSection} $(DESC_InstallGnuMake)
|
353
|
-
!insertmacro MUI_DESCRIPTION_TEXT ${devkitSection} $(DESC_InstallDevKit)
|
354
286
|
!insertmacro MUI_DESCRIPTION_TEXT ${samplesSection} $(DESC_InstallSamples)
|
355
|
-
|
287
|
+
#!insertmacro MUI_DESCRIPTION_TEXT ${javaSection} $(DESC_InstallJava)
|
356
288
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
357
289
|
|
358
290
|
;======================================================
|
@@ -365,6 +297,7 @@ FunctionEnd
|
|
365
297
|
LangString TEXT_IO_TITLE ${LANG_ENGLISH} "Configuration page"
|
366
298
|
LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "This page will update application files based on your system configuration."
|
367
299
|
|
300
|
+
/*
|
368
301
|
Function customerConfig
|
369
302
|
!insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
|
370
303
|
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "configUi.ini"
|
@@ -387,8 +320,8 @@ Function customerConfig
|
|
387
320
|
|
388
321
|
ExecWait '"$INSTDIR\apache2\bin\httpd.exe" -k install'
|
389
322
|
ExecWait 'net start Apache2.2'
|
390
|
-
|
391
323
|
FunctionEnd
|
324
|
+
*/
|
392
325
|
|
393
326
|
Function FixScriptFilesInDir
|
394
327
|
Exch $R0 #path
|
@@ -2,25 +2,25 @@ require 'fileutils'
|
|
2
2
|
|
3
3
|
def build_extension(name, arch)
|
4
4
|
objects = []
|
5
|
-
mkdir_p $tempdir unless File.
|
5
|
+
mkdir_p $tempdir unless File.exists? $tempdir
|
6
|
+
|
6
7
|
Dir.glob("*.c").each do |f|
|
7
8
|
objname = File.join( $tempdir, File.basename( f.gsub(/\.c$/, '.o') ) )
|
8
9
|
objects << objname
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
args << "-I
|
19
|
-
args << "-I../../../../platform/shared/ruby/generated"
|
11
|
+
args = []
|
12
|
+
args << "-I."
|
13
|
+
args << "-I#{$rhoroot}/lib/extensions/digest/ext"
|
14
|
+
args << "-I#{$rhoroot}/platform/shared/ruby/include"
|
15
|
+
args << "-I#{$rhoroot}/platform/shared"
|
16
|
+
|
17
|
+
if ENV['RHO_PLATFORM'] == 'android'
|
18
|
+
args << "-I#{$rhoroot}/platform/shared/ruby/android"
|
19
|
+
args << "-I#{$rhoroot}/platform/shared/ruby/generated"
|
20
20
|
cc_compile f, $tempdir, args or exit 1
|
21
21
|
|
22
|
-
|
23
|
-
args << "-I
|
22
|
+
elsif ENV['RHO_PLATFORM'] == 'iphone'
|
23
|
+
args << "-I#{$rhoroot}/platform/shared/ruby/iphone"
|
24
24
|
args << "-D_XOPEN_SOURCE"
|
25
25
|
args << "-D_DARWIN_C_SOURCE"
|
26
26
|
args << "-isysroot #{$sdkroot}"
|
@@ -40,10 +40,10 @@ def build_extension(name, arch)
|
|
40
40
|
|
41
41
|
mkdir_p $targetdir unless File.exist? $targetdir
|
42
42
|
|
43
|
-
if
|
43
|
+
if ENV['RHO_PLATFORM'] == 'android'
|
44
44
|
cc_ar File.join( $targetdir, 'lib' + name + '.a' ), Dir.glob($tempdir + "/**/*.o") or exit 1
|
45
45
|
|
46
|
-
|
46
|
+
elsif ENV['RHO_PLATFORM'] == 'iphone'
|
47
47
|
args = []
|
48
48
|
args << 'rcs'
|
49
49
|
args << File.join( $targetdir, 'lib' + name + '.a' )
|
@@ -53,49 +53,67 @@ def build_extension(name, arch)
|
|
53
53
|
puts `#{cmdline}`
|
54
54
|
exit unless $? == 0
|
55
55
|
|
56
|
-
|
57
|
-
|
56
|
+
elsif ENV['RHO_PLATFORM'] == 'wm'
|
57
|
+
args = []
|
58
|
+
args << "/M4"
|
59
|
+
args << name + ".vcproj"
|
60
|
+
args << "\"Release|#{$sdk}\""
|
61
|
+
cmdline = "\"" + $vcbuild + "\"" + ' ' + args.join(' ')
|
62
|
+
puts cmdline
|
63
|
+
puts `#{cmdline}`
|
64
|
+
exit unless $? == 0
|
58
65
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
66
|
+
cp_r File.join($tempdir, "Release", name + ".lib"), $targetdir
|
67
|
+
|
68
|
+
elsif ENV['RHO_PLATFORM'] == 'win32'
|
69
|
+
args = []
|
70
|
+
args << "/M4"
|
71
|
+
args << name + ".vcproj"
|
72
|
+
args << "\"Debug|Win32\""
|
73
|
+
cmdline = "\"" + $vcbuild + "\"" + ' ' + args.join(' ')
|
74
|
+
puts cmdline
|
75
|
+
puts `#{cmdline}`
|
76
|
+
exit unless $? == 0
|
77
|
+
|
78
|
+
cp_r File.join($tempdir, "Debug", name + ".lib"), $targetdir
|
69
79
|
end
|
70
|
-
cmdline = $lipobin + ' ' + args.join(' ')
|
71
|
-
puts `#{cmdline}`
|
72
|
-
exit unless $? == 0
|
73
80
|
end
|
74
81
|
|
75
82
|
namespace "build" do
|
76
83
|
task :config do
|
77
|
-
|
78
|
-
|
79
|
-
|
84
|
+
$rhoroot = ENV['RHO_ROOT']
|
85
|
+
|
86
|
+
$targetdir = ENV['TARGET_TEMP_DIR']
|
87
|
+
raise "TARGET_TEMP_DIR is not set" if $targetdir.nil?
|
88
|
+
$tempdir = ENV['TEMP_FILES_DIR']
|
89
|
+
raise "TEMP_FILES_DIR is not set" if $tempdir.nil?
|
90
|
+
|
91
|
+
if ENV['RHO_PLATFORM'] == 'android'
|
80
92
|
require File.dirname(__FILE__) + '/../../../../platform/android/build/androidcommon.rb'
|
81
93
|
|
82
94
|
setup_ndk(ENV['ANDROID_NDK'],ENV['ANDROID_API_LEVEL'])
|
83
95
|
|
84
|
-
|
85
|
-
else
|
96
|
+
elsif ENV['RHO_PLATFORM'] == 'iphone'
|
86
97
|
$bindir = ENV['PLATFORM_DEVELOPER_BIN_DIR']
|
87
98
|
raise "PLATFORM_DEVELOPER_BIN_DIR is not set" if $bindir.nil?
|
88
99
|
$sdkroot = ENV['SDKROOT']
|
89
100
|
raise "SDKROOT is not set" if $sdkroot.nil?
|
90
|
-
$targetdir = ENV['TARGET_TEMP_DIR']
|
91
|
-
raise "TARGET_TEMP_DIR is not set" if $targetdir.nil?
|
92
|
-
$tempdir = ENV['TEMP_FILES_DIR']
|
93
|
-
raise "TEMP_FILES_DIR is not set" if $tempdir.nil?
|
94
101
|
$arch = ENV['ARCHS']
|
95
102
|
raise "ARCHS is not set" if $arch.nil?
|
96
103
|
$gccbin = $bindir + '/gcc'
|
97
104
|
$arbin = $bindir + '/ar'
|
98
|
-
|
105
|
+
|
106
|
+
elsif ENV['RHO_PLATFORM'] == 'wm'
|
107
|
+
$vcbuild = ENV['VCBUILD']
|
108
|
+
raise "VCBUILD is not set" if $vcbuild.nil?
|
109
|
+
$sdk = ENV['SDK']
|
110
|
+
raise "SDK is not set" if $sdk.nil?
|
111
|
+
|
112
|
+
elsif ENV['RHO_PLATFORM'] == 'win32'
|
113
|
+
$vcbuild = ENV['VCBUILD']
|
114
|
+
raise "VCBUILD is not set" if $vcbuild.nil?
|
115
|
+
$sdk = ENV['SDK']
|
116
|
+
raise "SDK is not set" if $sdk.nil?
|
99
117
|
|
100
118
|
end
|
101
119
|
end
|