rhodes 7.5.1 → 7.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +319 -0
  3. data/README.md +3 -15
  4. data/Rakefile +3 -0
  5. data/appveyor.yml +37 -32
  6. data/azure-pipelines.yml +1 -1
  7. data/bin/rhodes-setup +22 -8
  8. data/extensions/emdk3-manager/ext/platform/android/src/com/rho/emdk3/EMDK3Extension.java +14 -5
  9. data/extensions/instrumentation/ext/platform/android/src/com/rho/instrumentation/Instrumentation.java +29 -15
  10. data/extensions/rhoconnect-push/ext/rhoconnect-push/platform/android/src/com/rhomobile/rhoelements/ans/ANSManager.java +1 -1
  11. data/extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/ElementsCore.java +12 -9
  12. data/extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/graphics/BatteryIndicator.java +2 -2
  13. data/lib/commonAPI/barcode/ext/platform/qt/Barcode.pro +1 -1
  14. data/lib/commonAPI/barcode/ext/platform/qt/Barcode.pro.erb +2 -2
  15. data/lib/commonAPI/barcode/ext/platform/qt/src/qzxing/QZXing.pri +9 -21
  16. data/lib/commonAPI/barcode/ext.yml +1 -0
  17. data/lib/commonAPI/bluetooth/ext/platform/qt/Bluetooth.pro +1 -1
  18. data/lib/commonAPI/bluetooth/ext/platform/qt/Bluetooth.pro.erb +1 -1
  19. data/lib/commonAPI/bluetooth/ext/platform/qt/src/bluetooth/bluetoothhelper.h +1 -1
  20. data/lib/commonAPI/coreapi/RhoSystemApi.rb +6 -0
  21. data/lib/commonAPI/coreapi/ext/Intent.xml +4 -0
  22. data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/intent/IntentSingleton.java +6 -0
  23. data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/Notification.java +2 -1
  24. data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/notification/NotificationScheduler.java +1 -1
  25. data/lib/commonAPI/coreapi/ext/platform/android/src/com/rho/webview/WebViewSingleton.java +40 -27
  26. data/lib/commonAPI/coreapi/ext/platform/iphone/cpp_based_impl/SystemImpl.mm +5 -6
  27. data/lib/commonAPI/coreapi/ext/platform/iphone/impl/Intent.h +1 -1
  28. data/lib/commonAPI/coreapi/ext/platform/iphone/impl/Intent.m +3 -1
  29. data/lib/commonAPI/coreapi/ext/platform/iphone/impl/NotificationSingleton.h +2 -1
  30. data/lib/commonAPI/coreapi/ext/platform/iphone/impl/NotificationSingleton.m +10 -0
  31. data/lib/commonAPI/coreapi/ext/platform/wm/src/IntentImpl.cpp +3 -0
  32. data/lib/commonAPI/coreapi/ext/shared/SystemImplBase.cpp +13 -0
  33. data/lib/commonAPI/coreapi/ext/shared/SystemImplBase.h +2 -0
  34. data/lib/commonAPI/coreapi/ext/system.xml +3 -0
  35. data/lib/commonAPI/mediacapture/ext/platform/android/ApplicationCameraActivity.erb +2 -2
  36. data/lib/commonAPI/mediacapture/ext/platform/android/ApplicationFileProvider.erb +1 -1
  37. data/lib/commonAPI/mediacapture/ext/platform/android/ext_java.files +1 -0
  38. data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraObject.java +8 -4
  39. data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraRhoListener.java +8 -0
  40. data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/mediacapture/RhoCameraFileProvider.java +6 -0
  41. data/lib/commonAPI/mediacapture/ext/platform/qt/MediaCapture.pro.erb +1 -1
  42. data/lib/commonAPI/mediacapture/ext/platform/qt/Mediacapture.pro +1 -1
  43. data/lib/commonAPI/signature/ext/platform/iphone/impl/readme.txt +7 -0
  44. data/lib/commonAPI/signature/ext/platform/qt/Signature.pro +3 -10
  45. data/lib/commonAPI/signature/ext/platform/qt/Signature.pro.erb +2 -2
  46. data/lib/extensions/fcm-push/ext/iphone/Podfile +15 -2
  47. data/lib/extensions/fcm-push/ext/iphone/fcm-push.xcodeproj/project.pbxproj +6 -7
  48. data/lib/extensions/nfc/ext/platform/android/src/com/rhomobile/nfc/Nfc.java +2 -1
  49. data/lib/extensions/serialport/ext/serialport.pro +1 -1
  50. data/platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h +1 -0
  51. data/platform/android/Rhodes/jni/src/fileapi.cpp +4 -0
  52. data/platform/android/Rhodes/res/drawable/baseline_check_24.xml +5 -0
  53. data/platform/android/Rhodes/res/drawable/baseline_check_240.xml +5 -0
  54. data/platform/android/Rhodes/res/drawable/baseline_close_24.xml +5 -0
  55. data/platform/android/Rhodes/res/drawable/baseline_close_240.xml +5 -0
  56. data/platform/android/Rhodes/res/layout/overlay_layout.xml +39 -0
  57. data/platform/android/Rhodes/res/layout/perrmission_alert_dialog.xml +267 -0
  58. data/platform/android/Rhodes/src/com/rhomobile/rhodes/BaseActivity.java +183 -66
  59. data/platform/android/Rhodes/src/com/rhomobile/rhodes/LocalFileProvider.java +38 -6
  60. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoFileProvider.java +32 -0
  61. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +529 -89
  62. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +26 -4
  63. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +256 -160
  64. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/AbstractRhoExtension.java +14 -3
  65. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtManager.java +4 -0
  66. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtension.java +5 -4
  67. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManagerImpl.java +79 -38
  68. data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocation.java +6 -1
  69. data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/CallReceiver.java +22 -0
  70. data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/IKioskMode.java +11 -0
  71. data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/KioskManager.java +18 -0
  72. data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/MyAccessibilityService.java +230 -0
  73. data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/MyNotificationListenerService.java +16 -0
  74. data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/MyOverlayService.java +197 -0
  75. data/platform/android/Rhodes/src/com/rhomobile/rhodes/kioskservices/PermissionManager.java +232 -0
  76. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +34 -8
  77. data/platform/android/Rhodes/src/com/rhomobile/rhodes/permissioncheck/CheckDrawable.java +53 -0
  78. data/platform/android/Rhodes/src/com/rhomobile/rhodes/permissioncheck/PermissionListGenerate.java +366 -0
  79. data/platform/android/Rhodes/src/com/rhomobile/rhodes/rhodes.iml +11 -0
  80. data/platform/android/Rhodes/src/com/rhomobile/rhodes/socket/SSLImpl.java +1 -0
  81. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java +782 -41
  82. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoInputConnectionWrapper.java +146 -0
  83. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoInputListener.java +21 -0
  84. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebViewClient.java +92 -32
  85. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/TauWebViewOptions.java +118 -0
  86. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/WebSettingsProviderBase.java +18 -17
  87. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/WebSettingsProviderEclairMR1.java +4 -4
  88. data/platform/android/build/RhodesSRC_build.files +13 -0
  89. data/platform/android/build/android-repack.rake +8 -1
  90. data/platform/android/build/android.rake +118 -51
  91. data/platform/android/build/android_tools.rb +1 -1
  92. data/platform/android/build/androidcommon.rb +13 -7
  93. data/platform/android/build/config.yml +4 -1
  94. data/platform/android/build/manifest_generator.rb +14 -10
  95. data/platform/android/build/maven_deps_extractor.rb +7 -1
  96. data/platform/android/build/ndkwrapper.rb +12 -0
  97. data/platform/android/proguard/proguard-base-rules.pro +5 -0
  98. data/platform/android/proguard/proguard.jar +0 -0
  99. data/platform/iphone/Classes/RhoAppBaseLib-Bridging-Header.h +4 -0
  100. data/platform/iphone/Classes/RhoAppBaseStandaloneLib-Bridging-Header.h +4 -0
  101. data/platform/iphone/Classes/RhoCryptAESGCM.swift +105 -0
  102. data/platform/iphone/Classes/RhoUIWebView.h +1 -1
  103. data/platform/iphone/Classes/RhoUIWebView.m +1 -1
  104. data/platform/iphone/Classes/RhoWKWebView.h +1 -1
  105. data/platform/iphone/Classes/RhoWKWebView.mm +32 -4
  106. data/platform/iphone/Classes/RhoWebView.h +1 -1
  107. data/platform/iphone/Classes/RhoWebViewFabrique.m +7 -1
  108. data/platform/iphone/Classes/SimpleMainView.m +5 -5
  109. data/platform/iphone/Classes/URLProtocol/CRhoURLProtocol.m +21 -10
  110. data/platform/iphone/Classes/rho/net/IPhoneNetRequest.mm +4 -0
  111. data/platform/iphone/Framework/RhoApplication/RhoApplication.xcodeproj/project.pbxproj +1 -1
  112. data/platform/iphone/Framework/Rhodes/Rhodes.xcodeproj/project.pbxproj +1 -1
  113. data/platform/iphone/RhoAppBaseLib/RhoAppBaseLib.xcodeproj/project.pbxproj +46 -1
  114. data/platform/iphone/RhoLib/RhoLib.xcodeproj/project.pbxproj +1 -1
  115. data/platform/iphone/curl/curl.xcodeproj/project.pbxproj +4 -1
  116. data/platform/iphone/rbuild/iphone.rake +9 -8
  117. data/platform/iphone/rhoextlib/rhoextlib.xcodeproj/project.pbxproj +4 -1
  118. data/platform/iphone/rhorubylib/rhorubylib.xcodeproj/project.pbxproj +1 -1
  119. data/platform/iphone/rhosynclib/rhosynclib.xcodeproj/project.pbxproj +1 -1
  120. data/platform/osx/bin/RhoSimulator/RhoSimulator.app.zip +0 -0
  121. data/platform/sailfish/build/{harbour-SailfishRhodes.pro.erb → SailfishRhodes.pro.erb} +10 -17
  122. data/platform/sailfish/build/rhodes.pro.erb +7 -17
  123. data/platform/sailfish/build/rpm/SailfishRhodes.desktop.erb +12 -0
  124. data/platform/sailfish/build/rpm/SailfishRhodes.erb +2 -0
  125. data/platform/sailfish/build/rpm/SailfishRhodes.spec.erb +43 -0
  126. data/platform/sailfish/build/rubylib.pro.erb +29 -29
  127. data/platform/sailfish/build/sailfish.rake +188 -180
  128. data/platform/sailfish/keys/regular_cert.pem +14 -0
  129. data/platform/sailfish/keys/regular_key.pem +4 -0
  130. data/platform/shared/common/RhodesApp.cpp +33 -9
  131. data/platform/shared/common/iphone/RhoCryptImpl.mm +130 -54
  132. data/platform/shared/qt/RhoSimulator.pro +1 -1
  133. data/platform/shared/qt/rhodes/rhodes.pro +4 -11
  134. data/platform/shared/qt/sailfish/SailfishRhodes.desktop +3 -4
  135. data/platform/shared/qt/sailfish/SailfishRhodes.pro +9 -10
  136. data/platform/shared/qt/sailfish/icons/108x108/108x108.png +0 -0
  137. data/platform/shared/qt/sailfish/privileges/sailfishrhodes +2 -0
  138. data/platform/shared/qt/sailfish/qml/pages/FirstPageWK.qml +7 -11
  139. data/platform/shared/qt/sailfish/qml/{harbour-sailfishrhodes.qml → sailfishrhodes.qml} +1 -1
  140. data/platform/shared/qt/sailfish/rpm/sailfishrhodes.spec +80 -0
  141. data/platform/shared/qt/sailfish/rpm/{harbour-sailfishrhodes.yaml → sailfishrhodes.yaml} +2 -2
  142. data/platform/shared/qt/sailfish/src/QtMainWindow.cpp +1 -1
  143. data/platform/shared/qt/sailfish/src/QtMainWindow.h +1 -1
  144. data/platform/shared/qt/sailfish/src/main.cpp +6 -38
  145. data/platform/shared/qt/sailfish/src/rootdelegate.h +2 -14
  146. data/platform/shared/ruby/aurora/ruby/config.h +386 -0
  147. data/platform/shared/ruby/aurora/ruby/constdefs.c +5866 -0
  148. data/platform/shared/ruby/aurora/ruby/constdefs.h +1788 -0
  149. data/platform/shared/sqlite/crypto.c +14 -0
  150. data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
  151. data/platform/win32/build/rhodes.nsi +3 -3
  152. data/platform/win32/build/win32.rake +1 -1
  153. data/rakefile.rb +3 -0
  154. data/res/build-tools/iphonesim/build/Release/iphonesim_8 +4 -4
  155. data/res/generators/templates/application/AndroidManifest.erb +26 -5
  156. data/res/generators/templates/application/build.yml +14 -10
  157. data/res/generators/templates/application/resources/android/res/xml/provider_paths.xml +4 -0
  158. data/res/generators/templates/application/rhoconfig.txt +10 -1
  159. data/res/generators/templates/iphone_project/Bremen8.xcodeproj/project.pbxproj +24 -1
  160. data/res/generators/templates/iphone_project/Classes/SimpleSwiftClass.swift +20 -0
  161. data/res/generators/templates/iphone_project/Classes/rhorunner-Bridging-Header.h +4 -0
  162. data/rhobuild.yml.example +3 -3
  163. data/rhodes.gemspec +4 -2
  164. data/version +1 -1
  165. metadata +81 -26
  166. data/platform/sailfish/build/rho_build.cmd.erb +0 -14
  167. data/platform/sailfish/build/rho_clean.cmd.erb +0 -14
  168. data/platform/sailfish/build/rho_deploy.cmd.erb +0 -15
  169. data/platform/sailfish/build/rho_rpm.cmd.erb +0 -14
  170. data/platform/sailfish/build/rho_rpmvalidation.cmd.erb +0 -14
  171. data/platform/sailfish/build/rpm/harbour-SailfishRhodes.desktop.erb +0 -7
  172. data/platform/sailfish/build/rpm/harbour-SailfishRhodes.erb +0 -2
  173. data/platform/sailfish/build/rpm/harbour-SailfishRhodes.yaml.erb +0 -37
  174. data/platform/shared/qt/sailfish/harbour-sailfishrhodes.desktop +0 -6
  175. data/platform/shared/qt/sailfish/icons/108x108/harbour-sailfishrhodes.png +0 -0
  176. data/platform/shared/qt/sailfish/privileges/harbour-sailfishrhodes +0 -2
  177. data/platform/shared/qt/sailfish/qml/pages/FirstPageWE.qml +0 -236
  178. /data/platform/shared/qt/sailfish/icons/128x128/{harbour-sailfishrhodes.png → sailfishrhodes.png} +0 -0
  179. /data/platform/shared/qt/sailfish/icons/172x172/{harbour-sailfishrhodes.png → sailfishrhodes.png} +0 -0
  180. /data/platform/shared/qt/sailfish/icons/86x86/{harbour-sailfishrhodes.png → sailfishrhodes.png} +0 -0
@@ -40,6 +40,7 @@ class QtProjectGenerator
40
40
  attr_accessor :rhoRoot
41
41
  attr_accessor :extRoot
42
42
  attr_accessor :nameApp
43
+ attr_accessor :organization
43
44
  attr_accessor :desktopAppName
44
45
  attr_accessor :enableQWebEngine
45
46
  attr_accessor :versionApp
@@ -82,10 +83,101 @@ class BuildScriptGenerator < ScriptGenerator
82
83
  attr_accessor :buildMode
83
84
  attr_accessor :qmlMode
84
85
  attr_accessor :makePath
85
- attr_accessor :rpmPath
86
+ attr_accessor :makeFile
87
+ attr_accessor :sfdkExe
86
88
  attr_accessor :rpmvalPath
87
89
  attr_accessor :deployPath
88
90
  attr_accessor :nThreads
91
+
92
+
93
+ def build()
94
+ Dir.chdir(projectPath) do
95
+ qmakeCommand = "\"#{qmakePath}\" #{proPath} -spec linux-g++ \"CONFIG+=release\""
96
+ if system(qmakeCommand) != true
97
+ puts qmakeCommand
98
+ raise "Error: qmake command failed: #{qmakeCommand}"
99
+ end
100
+
101
+ makeCommand = "\"#{makePath}\" -f #{makeFile} qmake_all"
102
+ if system(makeCommand) != true
103
+ raise "Error: make command failed: #{makeCommand}"
104
+ end
105
+
106
+ if system("\"#{makePath}\"") != true
107
+ raise "Error: make command failed: \"#{makePath}\""
108
+ end
109
+
110
+ end
111
+ end
112
+
113
+ def clear()
114
+ FileUtils.rm_rf(File.join($app_path, "bin"))
115
+ FileUtils.rm_rf(File.join($app_path, "project"))
116
+
117
+ cleanTarget = "\"#{sfdkExe}\" engine exec sdk-manage target refresh #{$origin_target}"
118
+ if system(cleanTarget) != true
119
+ puts "Error: clean command failed: #{cleanTarget}"
120
+ end
121
+ end
122
+
123
+ def rpm()
124
+ #build()
125
+
126
+ Dir.chdir(projectPath) do
127
+ sfdkPackage = "\"#{sfdkExe}\" package"
128
+ if system(sfdkPackage) != true
129
+ raise "Error: build rpm command failed: #{sfdkPackage}"
130
+ end
131
+ end
132
+
133
+ #arm
134
+ #«C:\AuroraOS\bin\sfdk.exe» package
135
+ #«C:\AuroraOS\bin\sfdk.exe» tools exec AuroraOS-4.0.2.209-base-armv7hl.default.default rpm-validator --profile regular C:\Users\User\build-ru.orgtemplate.rhotemplate-AuroraOS_4_0_2_209_base_armv7hl_default_in_Aurora_Build_Engine-Release\RPMS\ru.orgtemplate.rhotemplate-0.1-1.armv7hl.rpm
136
+
137
+ #i486
138
+ #«C:\AuroraOS\bin\sfdk.exe» -c "device=Aurora OS эмулятор 4.0.2.209-base" package
139
+ #«C:\AuroraOS\bin\sfdk.exe» -c "device=Aurora OS эмулятор 4.0.2.209-base" tools exec AuroraOS-4.0.2.209-base-i486.default rpm-validator --profile regular C:\Users\User\build-ru.orgtemplate.rhotemplate-AuroraOS_4_0_2_209_base_i486_in_Aurora_Build_Engine-Release\RPMS\ru.orgtemplate.rhotemplate-0.1-1.i486.rpm
140
+ end
141
+
142
+ def validateRpm(rpmPath)
143
+ Dir.chdir(projectPath) do
144
+ sfdkValidate = "\"#{sfdkExe}\" tools exec #{$current_target} rpm-validator --profile regular \"#{rpmPath}\""
145
+ if system(sfdkValidate) != true
146
+ raise "Error: validate command failed: #{sfdkValidate}"
147
+ end
148
+ end
149
+ end
150
+
151
+ def signRpm(rpmPath)
152
+ Dir.chdir(projectPath) do
153
+ sfdkSign = "\"#{sfdkExe}\" engine exec -tt sb2 -t #{$origin_target} rpmsign-external sign -k \"#{$key}\" -c \"#{$certificate}\" \"#{rpmPath}\""
154
+ if system(sfdkSign) != true
155
+ raise "Error: sign command failed: #{sfdkSign}"
156
+ end
157
+
158
+ checkSign = "\"#{sfdkExe}\" engine exec -tt sb2 -t #{$origin_target} rpmsign-external verify \"#{rpmPath}\""
159
+ if system(checkSign) != true
160
+ raise "Error: sign verify command failed: #{checkSign}"
161
+ end
162
+ end
163
+ end
164
+
165
+ def deployToEmulator()
166
+ #ENV["PWD"] = "C:\\Users\\User\\build-ru.auroraos.test_app-AuroraOS_4_0_2_249_base_i486_in_Aurora_Build_Engine-Release"#$target_path
167
+ if $dev_name.nil?
168
+ puts "Device name is nil"
169
+ exit 1
170
+ end
171
+
172
+ Dir.chdir(projectPath) do
173
+ deploy_command = "\"#{sfdkExe}\" -c \"device=#{$dev_name}\" deploy --sdk --all"
174
+ puts ENV["PWD"]
175
+ puts deploy_command
176
+ system(deploy_command)
177
+ end
178
+ end
179
+
180
+
89
181
  end
90
182
 
91
183
  def isWindows?
@@ -114,9 +206,20 @@ def clrfTOlf(path)
114
206
  File.open(path, "w") { |f| f.write(text) }
115
207
  end
116
208
 
209
+ def getAuroraEnginePath()
210
+ return File.join($sailfishdir, "settings", "AuroraOS-SDK", "libsfdk", "build-target-tools", "Aurora Build Engine")
211
+ end
212
+
213
+ def getTargetPath(target)
214
+ sdkDir = File.join(getAuroraEnginePath(), target)
215
+ return sdkDir.gsub("\\", "/")
216
+ end
217
+
117
218
  namespace "config" do
118
219
  task :set_sailfish_platform do
119
220
  $current_platform = "sailfish"
221
+ puts `#{"chcp 65001"}`
222
+
120
223
  end
121
224
 
122
225
  task :early_init do
@@ -125,6 +228,10 @@ namespace "config" do
125
228
  end
126
229
 
127
230
  task :sailfish => [:set_sailfish_platform, "switch_app"] do
231
+ $homeDir = Dir.home.gsub(":", "").gsub("\\", "/")
232
+ $homeDir[0] = $homeDir[0].downcase
233
+ $homeDir = '/' + $homeDir
234
+
128
235
  print_timestamp('config:sailfish START')
129
236
  Rake::Task["config:common"].invoke()
130
237
 
@@ -133,6 +240,8 @@ namespace "config" do
133
240
  end
134
241
  $sailfishdir = $config["env"]["paths"]["sailfish"]
135
242
 
243
+ $certificate = File.join($startdir, "platform", "sailfish", "keys", "regular_cert.pem")
244
+ $key = File.join($startdir, "platform", "sailfish", "keys", "regular_key.pem")
136
245
 
137
246
  if !$app_config.nil? && !$app_config["sailfish"].nil?
138
247
  $connf_build = "Release"
@@ -145,6 +254,14 @@ namespace "config" do
145
254
  $target_arch = $app_config["sailfish"]["target"]
146
255
  end
147
256
 
257
+ if !$app_config["sailfish"]["certificate"].nil?
258
+ $certificate = $app_config["sailfish"]["certificate"]
259
+ end
260
+
261
+ if !$app_config["sailfish"]["key"].nil?
262
+ $key = $app_config["sailfish"]["key"]
263
+ end
264
+
148
265
  puts "Target arch: " + $target_arch
149
266
  puts "Target configuration: " + $connf_build
150
267
  else
@@ -157,7 +274,7 @@ namespace "config" do
157
274
 
158
275
  if !$app_config["name"].nil?
159
276
  $appname = $app_config["name"]
160
- $final_name_app = "harbour-" + "#{$appname.downcase}"
277
+ $final_name_app = "" + "#{$appname.downcase}"
161
278
  else
162
279
  raise "Name application is not found in build.yaml!"
163
280
  end
@@ -178,8 +295,11 @@ namespace "config" do
178
295
  $current_build_sdk_dir = ""
179
296
  doc.xpath("//target").each do |t|
180
297
  target = t.attr("name")
181
- if target.include? $target_arch
298
+ origin = t.attr("origin")
299
+ puts target
300
+ if target.include? $target_arch and Dir.exist?(getTargetPath(target))
182
301
  $current_target = target
302
+ $origin_target = origin
183
303
  break
184
304
  end
185
305
  end
@@ -187,42 +307,14 @@ namespace "config" do
187
307
  $current_target = $app_config["sailfish"]["target_sdk"]
188
308
  end
189
309
 
190
- if isWindows?
191
- if Dir.exist?(File.join($sailfishdir, "settings", "AuroraOS-SDK"))
192
- $auroraSDK = true
193
- $current_build_sdk_dir = File.join($sailfishdir, "settings", "AuroraOS-SDK", "libsfdk", "build-target-tools", "Aurora OS Build Engine", $current_target)
194
- elsif Dir.exist?(File.join($sailfishdir, "settings", "SailfishSDK"))
195
- $auroraSDK = false
196
- $current_build_sdk_dir = File.join($sailfishdir, "settings", "SailfishSDK", "libsfdk", "build-target-tools", "Sailfish OS Build Engine", $current_target)
197
- elsif Dir.exist?(File.join($sailfishdir, "settings", "SailfishOS-SDK"))
198
- $auroraSDK = false
199
- $current_build_sdk_dir = File.join($sailfishdir, "settings", "SailfishOS-SDK", "mer-sdk-tools", "Sailfish OS Build Engine", $current_target)
200
- else
201
- puts "Can't recognize build SDK!"
202
- exit 1
203
- end
204
- $current_build_sdk_dir = $current_build_sdk_dir.gsub("\\", "/")
310
+ if Dir.exist?(getAuroraEnginePath())
311
+ $current_build_sdk_dir = getTargetPath($current_target)
205
312
  else
206
- if Dir.exist?(File.join(File.expand_path('~'), ".config", "AuroraOS-SDK"))
207
- $auroraSDK = true
208
- $current_build_sdk_dir = File.join(File.expand_path('~'), ".config", "AuroraOS-SDK", "libsfdk", "build-target-tools", "Aurora OS Build Engine", $current_target)
209
- elsif Dir.exist?(File.join(File.expand_path('~'), ".config", "SailfishSDK"))
210
- $auroraSDK = false
211
- $current_build_sdk_dir = File.join(File.expand_path('~'), ".config", "SailfishSDK", "libsfdk", "build-target-tools", "Sailfish OS Build Engine", $current_target)
212
- elsif Dir.exist?(File.join(File.expand_path('~'), ".config", "SailfishOS-SDK"))
213
- $auroraSDK = false
214
- $current_build_sdk_dir = File.join(File.expand_path('~'), ".config", "SailfishOS-SDK", "mer-sdk-tools", "Sailfish OS Build Engine", $current_target)
215
- else
216
- puts "Can't recognize build SDK!"
217
- exit 1
218
- end
219
- end
220
-
221
- if $auroraSDK
222
- $sysName = "Aurora OS"
223
- else
224
- $sysName = "Sailfish OS"
313
+ puts "Can't recognize build SDK!"
314
+ exit 1
225
315
  end
316
+
317
+ $sysName = "Aurora"
226
318
 
227
319
  if !File.exists?($current_build_sdk_dir)
228
320
  puts "No such target (" + $current_target + ") exists"
@@ -259,12 +351,6 @@ namespace "config" do
259
351
 
260
352
  if !$app_config["sailfish"]["device"].nil? && !$app_config["sailfish"]["device"]["device_name"].nil?
261
353
  $dev_name = $app_config["sailfish"]["device"]["device_name"]
262
- elsif $dev_type == "real"
263
- raise "Please set device name for real device in device section!\n" +
264
- "Add device if required (sailfish:device:add_device) and set 'device_name' field in build.yml.\n" +
265
- "For list device use: sailfish:device:list\n"
266
- elsif $dev_type == "vbox"
267
- $dev_name = "#{$sysName} Emulator"
268
354
  end
269
355
 
270
356
  if !$app_config["sailfish"]["device"].nil? && !$app_config["sailfish"]["device"]["host"].nil?
@@ -319,11 +405,8 @@ namespace "config" do
319
405
  $build_threads = 1
320
406
  end
321
407
 
322
- $enableQWebEngine = ""
323
- if !$app_config["sailfish"]["enable_web_engine"].nil?
324
- if (($app_config["sailfish"]["enable_web_engine"] == true) || ($app_config["sailfish"]["enable_web_engine"] == "true"))
325
- $enableQWebEngine = "ENABLE_Q_WEB_ENGINE"
326
- end
408
+ if !$app_config["sailfish"]["organization"].nil?
409
+ $organization = $app_config["sailfish"]["organization"]
327
410
  end
328
411
 
329
412
  $enableDBUS = ""
@@ -335,8 +418,38 @@ namespace "config" do
335
418
  $ymlSpdscanner = "- qt5-qtconnectivity-qtsdpscanner"
336
419
  end
337
420
 
338
-
421
+ $buildEnv = BuildScriptGenerator.new
422
+
423
+ $buildEnv.isNixSystem = !isWindows?
424
+ $buildEnv.merAddress = "127.0.0.1"
425
+ $buildEnv.merPort = 2222
426
+ $buildEnv.merPkey = File.join $sailfishdir, "vmshare/ssh/private_keys/engine/mersdk"
427
+ $buildEnv.projectPath = QuotedStrNixWay(File.join($project_path, $final_name_app))
428
+ $buildEnv.merSdkTools = QuotedStrNixWay(PathToWindowsWay($current_build_sdk_dir))
429
+ $buildEnv.merSharedHome = QuotedStrNixWay(File.expand_path('~'))
430
+ $buildEnv.merSharedSrc = QuotedStrNixWay(File.expand_path('~'))
431
+ $buildEnv.merShTgtName = QuotedStrNixWay(File.join($sailfishdir, "mersdk", "targets"))
432
+ $buildEnv.merTgtName = QuotedStrNixWay($current_target)
433
+ $buildEnv.merUserName = "mersdk"
434
+ $buildEnv.merDevName = QuotedStrNixWay($dev_name)
435
+
436
+ cmd_suffix = isWindows? ? '.cmd' : ''
437
+ $buildEnv.qmakePath = PathToWindowsWay(File.join($current_build_sdk_dir, "qmake" + cmd_suffix))
438
+ $buildEnv.proPath = PathToWindowsWay(File.join($project_path, $final_name_app, "#{$final_name_app}.pro"))
439
+ $buildEnv.makeFile = PathToWindowsWay(File.join($project_path, $final_name_app, "Makefile"))
440
+ $buildEnv.buildMode = $connf_build.downcase
441
+ $buildEnv.qmlMode = "qml_#{$connf_build.downcase}"
442
+ $buildEnv.makePath = PathToWindowsWay(File.join($current_build_sdk_dir, "make" + cmd_suffix))
443
+ $buildEnv.rpmvalPath = PathToWindowsWay(File.join($current_build_sdk_dir, "rpmvalidation" + cmd_suffix))
444
+ $buildEnv.deployPath = PathToWindowsWay(File.join($current_build_sdk_dir, "deploy" + cmd_suffix))
445
+ $buildEnv.nThreads = $build_threads
446
+ $buildEnv.sfdkExe = QuotedStrNixWay(File.join($sailfishdir, "bin", "sfdk.exe"))
339
447
 
448
+ ENV["Path"] = $current_build_sdk_dir + ";" + ENV["Path"]
449
+ ENV["QTDIR"] = File.join($buildEnv.merShTgtName, $buildEnv.merTgtName, "usr", "share", "qt5")
450
+ ENV["SFDK_OPTIONS"] = "-c target=#{$origin_target}"
451
+ ENV["SFDK_NO_SESSION"] = "1"
452
+
340
453
 
341
454
  Rake::Task["build:sailfish:startvm"].invoke()
342
455
  end
@@ -374,8 +487,8 @@ end
374
487
  namespace "run" do
375
488
  task :sailfish => ["config:sailfish"] do
376
489
 
377
- require 'net/ssh'
378
- require 'net/scp'
490
+ require 'net/ssh'
491
+ require 'net/scp'
379
492
 
380
493
  session_ssh = nil
381
494
  puts $ssh_key
@@ -464,12 +577,12 @@ namespace "device" do
464
577
 
465
578
  puts "Enter password from device, to generate the ssh key: "
466
579
  $pwd_host = STDIN.noecho(&:gets).chomp
467
- $user_name = "nemo"
580
+ $user_name = "defaultuser"
468
581
 
469
582
  mkdir_p File.join(ssh_dir, $dev_name)
470
583
 
471
584
  yes = true
472
- if(File.exists? File.join(ssh_dir, $dev_name, "nemo"))
585
+ if(File.exists? File.join(ssh_dir, $dev_name, "defaultuser"))
473
586
  puts "Key for this device exists, do you want to replace it? (yes/no)"
474
587
  yes = STDIN.gets == "yes\n"
475
588
  end
@@ -527,26 +640,8 @@ namespace "device" do
527
640
  end
528
641
 
529
642
  namespace "clean" do
530
- task :sailfish => "clean:sailfish:files"
531
- namespace "sailfish" do
532
- task :files => "config:sailfish" do
533
- clean_path = File.join($app_path, "project", "qt", "clean.cmd")
534
- system(clean_path)
535
- if File.exists?($project_path)
536
- Dir.glob(File.join($project_path, "*.*")) { |f| rm f, :force => true }
537
- Dir.entries(File.join($project_path)).each do |d|
538
- rm_rf File.join($project_path, d)
539
- end
540
- end
541
- rm_rf $srcdir if File.exists?($srcdir)
542
- #rm_rf $targetdir
543
- #rm_rf $app_builddir
544
- #rm_rf $tmpdir
545
- end
546
- task :build => "config:sailfish" do
547
- clean_path = File.join($app_path, "project", "qt", "clean.cmd")
548
- system(clean_path)
549
- end
643
+ task :sailfish => ["project:sailfish:qt"] do
644
+ $buildEnv.clear()
550
645
  end
551
646
  end
552
647
 
@@ -681,8 +776,7 @@ namespace "build" do
681
776
  end
682
777
 
683
778
  task :deploy => ['config:sailfish'] do
684
- deploy_path = File.join($app_path, "project", "qt", "deploy.cmd")
685
- system(deploy_path)
779
+ $buildEnv.deployToEmulator()
686
780
  end
687
781
 
688
782
  task :deploy_bundle => ['config:sailfish'] do
@@ -729,17 +823,12 @@ namespace "build" do
729
823
  end
730
824
  end
731
825
 
732
-
733
-
734
826
  task :rhodes => ["project:sailfish:qt"] do
735
827
  print_timestamp('build:sailfish:rhodes START')
736
- build_path = File.join($app_path, "project", "qt", "build.cmd")
737
- rpm_path = File.join($app_path, "project", "qt", "rpm.cmd")
738
828
 
739
- if system(build_path) != true
740
- raise "Error: build failed"
741
- end
742
- system(rpm_path)
829
+ $buildEnv.build()
830
+ $buildEnv.rpm()
831
+ #exit 0
743
832
 
744
833
  $target_rpm = ""
745
834
  Dir[File.join($project_path, $final_name_app, "RPMS/**/*")].each do |file_name|
@@ -749,11 +838,10 @@ namespace "build" do
749
838
  end
750
839
  end
751
840
 
752
- rpmval_path = File.join($project_path, "rpmvalidation.cmd")
753
- system("\"#{rpmval_path}\" \"#{$target_rpm}\"")
754
- cp_r $target_rpm, $target_path
755
-
841
+ $buildEnv.signRpm($target_rpm)
842
+ $buildEnv.validateRpm($target_rpm)
756
843
 
844
+ cp_r $target_rpm, $target_path
757
845
  end
758
846
 
759
847
  task :extensions => ['project:sailfish:qt'] do
@@ -780,7 +868,7 @@ namespace "build" do
780
868
 
781
869
  generator = QtProjectGenerator.new
782
870
  generator.rhoRoot = $rhodes_path_build_engine
783
- generator.extRoot = ext_path.gsub(File.expand_path('~'), "/home/mersdk/share")
871
+ generator.extRoot = ext_path.gsub(File.expand_path('~'), $homeDir)
784
872
  generator.desktopAppName = $appname
785
873
  generator.nameApp = $final_name_app
786
874
  generator.buildMode = $connf_build
@@ -808,7 +896,7 @@ namespace 'project' do
808
896
  namespace 'sailfish' do
809
897
  task :qt => ['config:sailfish'] do
810
898
  $rhodes_path = File.absolute_path '.'
811
- $rhodes_path_build_engine = $rhodes_path.gsub(File.expand_path('~'), "/home/mersdk/share")
899
+ $rhodes_path_build_engine = $rhodes_path.gsub(File.expand_path('~'), $homeDir)
812
900
 
813
901
  curl_erb_path = $rhodes_path + "/platform/sailfish/build/curl.pro.erb"
814
902
  rubylib_erb_path = $rhodes_path + "/platform/sailfish/build/rubylib.pro.erb"
@@ -818,17 +906,10 @@ namespace 'project' do
818
906
  sqlite3_erb_path = $rhodes_path + "/platform/sailfish/build/sqlite3.pro.erb"
819
907
  syncengine_erb_path = $rhodes_path + "/platform/sailfish/build/syncengine.pro.erb"
820
908
  rhodes_erb_path = $rhodes_path + "/platform/sailfish/build/rhodes.pro.erb"
821
- app_erb_path = $rhodes_path + "/platform/sailfish/build/harbour-SailfishRhodes.pro.erb"
909
+ app_erb_path = $rhodes_path + "/platform/sailfish/build/SailfishRhodes.pro.erb"
822
910
 
823
- desktop_erb_path = $rhodes_path + "/platform/sailfish/build/rpm/harbour-SailfishRhodes.desktop.erb"
824
- yaml_erb_path = $rhodes_path + "/platform/sailfish/build/rpm/harbour-SailfishRhodes.yaml.erb"
825
- priv_erb_path = $rhodes_path + "/platform/sailfish/build/rpm/harbour-SailfishRhodes.erb"
826
-
827
- build_erb_path = $rhodes_path + "/platform/sailfish/build/rho_build.cmd.erb"
828
- clean_erb_path = $rhodes_path + "/platform/sailfish/build/rho_clean.cmd.erb"
829
- rpm_erb_path = $rhodes_path + "/platform/sailfish/build/rho_rpm.cmd.erb"
830
- rpmval_erb_path = $rhodes_path + "/platform/sailfish/build/rho_rpmvalidation.cmd.erb"
831
- deploy_erb_path = $rhodes_path + "/platform/sailfish/build/rho_deploy.cmd.erb"
911
+ desktop_erb_path = $rhodes_path + "/platform/sailfish/build/rpm/SailfishRhodes.desktop.erb"
912
+ spec_erb_path = $rhodes_path + "/platform/sailfish/build/rpm/SailfishRhodes.spec.erb"
832
913
 
833
914
  mkdir_p $project_path
834
915
  mkdir_p File.join($project_path, "curl")
@@ -841,19 +922,18 @@ namespace 'project' do
841
922
  mkdir_p File.join($project_path, "rhodes")
842
923
  mkdir_p File.join($project_path, $final_name_app)
843
924
  mkdir_p File.join($project_path, $final_name_app, "rpm")
844
- mkdir_p File.join($project_path, $final_name_app, "privileges")
845
925
 
846
926
  #if !File.exists?(File.join($project_path, $final_name_app, "qml"))
847
927
  cp_r File.join($rhodes_path, "platform/shared/qt/sailfish/qml"), File.join($project_path, $final_name_app)
848
928
  File.rename(
849
- File.join($project_path, $final_name_app, "qml", "harbour-sailfishrhodes.qml"),
850
- File.join($project_path, $final_name_app, "qml", "#{$final_name_app}.qml"))
929
+ File.join($project_path, $final_name_app, "qml", "sailfishrhodes.qml"),
930
+ File.join($project_path, $final_name_app, "qml", "#{$organization}.#{$final_name_app}.qml"))
851
931
  #end
852
932
 
853
933
  if !File.exists?(File.join($project_path, $final_name_app, "icons"))
854
934
  cp_r File.join($rhodes_path, "platform/shared/qt/sailfish/icons"), File.join($project_path, $final_name_app)
855
935
  Dir[File.join($project_path, $final_name_app, "icons/**/*")].each do |file_name|
856
- File.rename(file_name, File.join(File.dirname(file_name), "#{$final_name_app}.png")) if File.file? file_name
936
+ File.rename(file_name, File.join(File.dirname(file_name), "#{$organization}.#{$final_name_app}.png")) if File.file? file_name
857
937
  end
858
938
  end
859
939
 
@@ -861,6 +941,7 @@ namespace 'project' do
861
941
  generator.rhoRoot = $rhodes_path_build_engine
862
942
  generator.desktopAppName = $appname
863
943
  generator.nameApp = $final_name_app
944
+ generator.organization = $organization
864
945
  generator.enableQWebEngine = $enableQWebEngine
865
946
  generator.versionApp = $version_app
866
947
  generator.buildMode = $connf_build
@@ -887,9 +968,9 @@ namespace 'project' do
887
968
  end
888
969
 
889
970
 
890
- File.open(File.join($project_path, $final_name_app, "#{$final_name_app}.desktop"), 'w' ) { |f| f.write generator.render_profile( desktop_erb_path ) }
891
- File.open(File.join($project_path, $final_name_app, "rpm", "#{$final_name_app}.yaml"), 'w' ) { |f| f.write generator.render_profile( yaml_erb_path ) }
892
- File.open(File.join($project_path, $final_name_app, "privileges", "#{$final_name_app}"), 'w' ) { |f| f.write generator.render_profile( priv_erb_path ) }
971
+ File.open(File.join($project_path, $final_name_app, "#{$organization}.#{$final_name_app}.desktop"), 'w' ) { |f| f.write generator.render_profile( desktop_erb_path ) }
972
+ File.open(File.join($project_path, $final_name_app, "rpm", "#{$final_name_app}.spec"), 'w' ) { |f| f.write generator.render_profile( spec_erb_path ) }
973
+ #File.open(File.join($project_path, $final_name_app, "privileges", "#{$final_name_app}"), 'w' ) { |f| f.write generator.render_profile( priv_erb_path ) }
893
974
 
894
975
  rho_name_project = File.join($project_path, "rhodes", "rhodes.pro")
895
976
  if !File.exists?(rho_name_project)
@@ -901,82 +982,9 @@ namespace 'project' do
901
982
  File.open(app_name_project, 'w' ) { |f| f.write generator.render_profile( app_erb_path ) }
902
983
  end
903
984
 
904
- build_script_generator = BuildScriptGenerator.new
905
-
906
- #if isWindows?
907
- # build_script_generator.scriptHeader = "ECHO OFF"
908
- # build_script_generator.platformExport = "set"
909
- #else
910
- # build_script_generator.scriptHeader = "#!/bin/sh"
911
- # build_script_generator.platformExport = "export"
912
- #end
913
-
914
- build_script_generator.isNixSystem = !isWindows?
915
- build_script_generator.merAddress = "127.0.0.1"
916
- build_script_generator.merPort = 2222
917
- build_script_generator.merPkey = File.join $sailfishdir, "vmshare/ssh/private_keys/engine/mersdk"
918
- build_script_generator.projectPath = QuotedStrNixWay(File.join($project_path, $final_name_app))
919
- build_script_generator.merSdkTools = QuotedStrNixWay(PathToWindowsWay($current_build_sdk_dir))
920
- build_script_generator.merSharedHome = QuotedStrNixWay(File.expand_path('~'))
921
- build_script_generator.merSharedSrc = QuotedStrNixWay(File.expand_path('~'))
922
- build_script_generator.merShTgtName = QuotedStrNixWay(File.join($sailfishdir, "mersdk", "targets"))
923
- build_script_generator.merTgtName = QuotedStrNixWay($current_target)
924
- build_script_generator.merUserName = "mersdk"
925
- build_script_generator.merDevName = QuotedStrNixWay($dev_name)
926
-
927
- #TODO: windows paths way - temporary
928
- cmd_suffix = isWindows? ? '.cmd' : ''
929
- build_script_generator.qmakePath = PathToWindowsWay(File.join($current_build_sdk_dir, "qmake" + cmd_suffix))
930
- build_script_generator.proPath = PathToWindowsWay(File.join($project_path, $final_name_app, "#{$final_name_app}.pro"))
931
- build_script_generator.buildMode = $connf_build.downcase
932
- build_script_generator.qmlMode = "qml_#{$connf_build.downcase}"
933
- build_script_generator.makePath = PathToWindowsWay(File.join($current_build_sdk_dir, "make" + cmd_suffix))
934
- build_script_generator.rpmPath = PathToWindowsWay(File.join($current_build_sdk_dir, "rpm" + cmd_suffix))
935
- build_script_generator.rpmvalPath = PathToWindowsWay(File.join($current_build_sdk_dir, "rpmvalidation" + cmd_suffix))
936
- build_script_generator.deployPath = PathToWindowsWay(File.join($current_build_sdk_dir, "deploy" + cmd_suffix))
937
- build_script_generator.nThreads = $build_threads
938
-
939
- File.open(File.join($project_path, "build.cmd"), 'w' ) { |f| f.write build_script_generator.render_script( build_erb_path ) }
940
- File.open(File.join($project_path, "clean.cmd"), 'w' ) { |f| f.write build_script_generator.render_script( clean_erb_path ) }
941
- File.open(File.join($project_path, "rpm.cmd"), 'w' ) { |f| f.write build_script_generator.render_script( rpm_erb_path ) }
942
- File.open(File.join($project_path, "rpmvalidation.cmd"), 'w' ) { |f| f.write build_script_generator.render_script( rpmval_erb_path ) }
943
- File.open(File.join($project_path, "deploy.cmd"), 'w' ) { |f| f.write build_script_generator.render_script( deploy_erb_path ) }
944
985
 
945
- if !isWindows?
946
- FileUtils.chmod('+x', File.join($project_path, "build.cmd"))
947
- FileUtils.chmod('+x', File.join($project_path, "clean.cmd"))
948
- FileUtils.chmod('+x', File.join($project_path, "rpm.cmd"))
949
- FileUtils.chmod('+x', File.join($project_path, "rpmvalidation.cmd"))
950
- FileUtils.chmod('+x', File.join($project_path, "deploy.cmd"))
951
- clrfTOlf(File.join($project_path, "build.cmd"))
952
- clrfTOlf(File.join($project_path, "clean.cmd"))
953
- clrfTOlf(File.join($project_path, "rpm.cmd"))
954
- clrfTOlf(File.join($project_path, "rpmvalidation.cmd"))
955
- clrfTOlf(File.join($project_path, "deploy.cmd"))
956
- end
957
986
  end
958
987
  end
959
988
  end
960
- #http://doc.qt.io/qt-5/qmake-variable-reference.html#qmakespec
961
- #MER_SSH_HOST, 127.0.0.1
962
- #MER_SSH_PORT, 2222
963
- #MER_SSH_PRIVATE_KEY, C:/SailfishOS/vmshare/ssh/private_keys/engine/mersdk
964
- #MER_SSH_PROJECT_PATH, C:/Users/n0men/Desktop/tau/testapp/project/qt/curl
965
- #MER_SSH_SDK_TOOLS, C:\SailfishOS\settings\SailfishOS-SDK\mer-sdk-tools\Sailfish OS Build Engine\SailfishOS-2.1.3.7-armv7hl
966
- #MER_SSH_SHARED_HOME, C:/Users/n0men
967
- #MER_SSH_SHARED_SRC, C:/Users/n0men/
968
- #MER_SSH_SHARED_TARGET, C:/SailfishOS/mersdk/targets
969
- #MER_SSH_TARGET_NAME, SailfishOS-2.1.3.7-armv7hl
970
- #MER_SSH_USERNAME, mersdk
971
-
972
- #MER_SSH_USERNAME, mersdk
973
- #MER_SSH_TARGET_NAME, SailfishOS-2.1.3.7-i486
974
- #MER_SSH_SHARED_TARGET, C:/SailfishOS/mersdk/targets
975
- #MER_SSH_SHARED_SRC, C:/Users/n0men/
976
- #MER_SSH_SHARED_HOME, C:/Users/n0men
977
- #MER_SSH_SDK_TOOLS, C:\SailfishOS\settings\SailfishOS-SDK\mer-sdk-tools\Sailfish OS Build Engine\SailfishOS-2.1.3.7-i486
978
- #MER_SSH_PROJECT_PATH, C:/Users/n0men/Desktop/tau/kitchensinkRuby/project/qt/harbour-kitchensinkRuby
979
- #MER_SSH_PRIVATE_KEY, C:/SailfishOS/vmshare/ssh/private_keys/engine/mersdk
980
- #MER_SSH_PORT, 2222
981
- #MER_SSH_DEVICE_NAME, INOI R7 (ARM)
989
+
982
990
 
@@ -0,0 +1,14 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIICOTCCAeSgAwIBAgIUSpo5D97wLRZQs2Qi6bdM1hUDoRYwDAYIKoUDBwEBAwIF
3
+ ADA9MTswOQYDVQQDDDJPcGVuIE1vYmlsZSBQbGF0Zm9ybSBMTEMgUm9vdCBQYWNr
4
+ YWdlcyBDZXJ0aWZpY2F0ZTAeFw0yMTA5MDIxMzA1MzJaFw00NTA4MjcxMzA1MzJa
5
+ MEkxRzBFBgNVBAMMPk5vbmFtZSBkZXZlbG9wZXIgKGZvciB0ZXN0aW5nIG9ubHks
6
+ IGRvIG5vdCB1c2UgZm9yIHByb2R1Y3Rpb24pMGYwHwYIKoUDBwEBAQEwEwYHKoUD
7
+ AgIjAQYIKoUDBwEBAgIDQwAEQD7kJVoxNQMuCO3CtkC0L+0qnwkk7rnviRP/3k1A
8
+ 17my58fs9yV4gLQ4I9zaR2xYyZLDx4XraJt4ujzsgC8YXaSjgaYwgaMwDgYDVR0P
9
+ AQH/BAQDAgeAMCkGA1UdDgQiBCAdhSHQtDMV4QTjDtKcSmaDQ9azQhQ44hoydROW
10
+ RLYeEDArBgNVHSMEJDAigCBMTzTvcJiRcOEK57IDKmKpiDMGNHn+r0gxKjswQANd
11
+ /jAgBgNVHSUBAf8EFjAUBggrBgEFBQcDBAYIKoUDAlEBAQEwFwYIKoUDAlEBAgEE
12
+ CxYJZGV2ZWxvcGVyMAwGCCqFAwcBAQMCBQADQQDTDD3PzUu8QIqnKNbwn8/M3IUV
13
+ 4W+cAZ5Qj8PlvN5wjx6HmD69Gj3zIhM7Pw1TFRNZco4teApgvWePdOmuYzz/
14
+ -----END CERTIFICATE-----
@@ -0,0 +1,4 @@
1
+ -----BEGIN PRIVATE KEY-----
2
+ MEYCAQAwHwYIKoUDBwEBAQEwEwYHKoUDAgIjAQYIKoUDBwEBAgIEINynnp5Lz0MB
3
+ NBjdEWkcMkeCq/zhgLHVhkBtvDIG2Vrs
4
+ -----END PRIVATE KEY-----
@@ -203,10 +203,14 @@ void CAppCallbacksQueue::callCallback(const String& strCallback)
203
203
  strUrl += strCallback;
204
204
 
205
205
  boolean force_https = false;
206
+ boolean force_custom_protocol = false;
206
207
  #ifdef OS_MACOSX
207
208
  if (rho_conf_is_property_exists("ios_https_local_server")!=0) {
208
209
  force_https = rho_conf_getBool("ios_https_local_server")!=0;
209
210
  }
211
+ if (rho_conf_is_property_exists("ios_direct_local_requests_with_custom_protocol")!=0) {
212
+ force_custom_protocol = rho_conf_getBool("ios_direct_local_requests_with_custom_protocol")!=0;
213
+ }
210
214
  #endif
211
215
 
212
216
  NetResponse resp = getNetRequest().pullData( strUrl, NULL );
@@ -222,13 +226,19 @@ void CAppCallbacksQueue::callCallback(const String& strCallback)
222
226
  #else
223
227
  String addr_number;
224
228
  String addr_local;
225
- if (force_https) {
226
- addr_number = "https";
227
- addr_local = "https";
229
+ if (force_custom_protocol) {
230
+ addr_number = "rhoctp";
231
+ addr_local = "rhoctp";
228
232
  }
229
233
  else {
230
- addr_number = "http";
231
- addr_local = "http";
234
+ if (force_https) {
235
+ addr_number = "https";
236
+ addr_local = "https";
237
+ }
238
+ else {
239
+ addr_number = "http";
240
+ addr_local = "http";
241
+ }
232
242
  }
233
243
  addr_number = addr_number + "://127.0.0.1:";
234
244
  addr_local = addr_local + "://localhost:";
@@ -575,6 +585,10 @@ void CRhodesApp::run()
575
585
  if (RHOCONF().isExist("ios_direct_local_requests")) {
576
586
  shouldRunDirectQueue = RHOCONF().getBool("ios_direct_local_requests");
577
587
  }
588
+ if (RHOCONF().isExist("ios_direct_local_requests_with_custom_protocol")) {
589
+ shouldRunDirectQueue = shouldRunDirectQueue || RHOCONF().getBool("ios_direct_local_requests_with_custom_protocol");
590
+
591
+ }
578
592
  if (RHOCONF().isExist("ios_use_old_legacy_socket")) {
579
593
  shouldUseCocoaServer = !RHOCONF().getBool("ios_use_old_legacy_socket");
580
594
  }
@@ -1832,10 +1846,14 @@ void CRhodesApp::initAppUrls()
1832
1846
  #endif
1833
1847
 
1834
1848
  boolean force_https = false;
1849
+ boolean force_custom_protocol = false;
1835
1850
  #ifdef OS_MACOSX
1836
1851
  if (rho_conf_is_property_exists("ios_https_local_server")!=0) {
1837
1852
  force_https = rho_conf_getBool("ios_https_local_server")!=0;
1838
1853
  }
1854
+ if (rho_conf_is_property_exists("ios_direct_local_requests_with_custom_protocol")!=0) {
1855
+ force_custom_protocol = rho_conf_getBool("ios_direct_local_requests_with_custom_protocol")!=0;
1856
+ }
1839
1857
  #endif
1840
1858
 
1841
1859
  #ifdef OS_ANDROID
@@ -1843,12 +1861,18 @@ void CRhodesApp::initAppUrls()
1843
1861
  force_https = value && strcmp(value, "1") == 0;
1844
1862
  #endif
1845
1863
 
1846
- if (force_https) {
1847
- m_strHomeUrl = "https://127.0.0.1:";
1864
+ if (force_custom_protocol) {
1865
+ m_strHomeUrl = "rhoctp://127.0.0.1:";
1848
1866
  }
1849
1867
  else {
1850
- m_strHomeUrl = "http";
1851
- m_strHomeUrl = m_strHomeUrl + "://127.0.0.1:";
1868
+
1869
+ if (force_https) {
1870
+ m_strHomeUrl = "https://127.0.0.1:";
1871
+ }
1872
+ else {
1873
+ m_strHomeUrl = "http";
1874
+ m_strHomeUrl = m_strHomeUrl + "://127.0.0.1:";
1875
+ }
1852
1876
  }
1853
1877
 
1854
1878
  m_strRubyServerHomeURL = m_strHomeUrl+getFreeListeningPort();