rhodes 3.3.1 → 3.3.2.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. data/CHANGELOG +9 -2
  2. data/Manifest.txt +20 -0
  3. data/Rakefile +2 -1
  4. data/doc/build.txt +9 -3
  5. data/doc/configuration.txt +5 -1
  6. data/doc/device-caps.txt +112 -27
  7. data/doc/extensions.txt +0 -51
  8. data/doc/generator.txt +6 -0
  9. data/doc/rhom.txt +3 -0
  10. data/doc/simulator.txt +57 -17
  11. data/doc/ui.txt +24 -27
  12. data/installer/RHOELEMENTS-EULA.txt +295 -0
  13. data/installer/Rakefile +75 -49
  14. data/installer/rhostudio-moto.nsi +534 -0
  15. data/installer/rhostudio.nsi +13 -4
  16. data/lib/extensions/barcode/ext/barcode/platform/iphone/Classes/barcode.m +3 -0
  17. data/lib/framework/rho/rhoapplication.rb +4 -0
  18. data/lib/framework/rho/rhoevent.rb +2 -3
  19. data/lib/framework/rho/rhoevent_c.rb +2 -2
  20. data/lib/framework/rho/rhofsconnector.rb +24 -2
  21. data/lib/framework/rhodes.rb +1 -1
  22. data/lib/framework/version.rb +1 -1
  23. data/lib/rhodes.rb +1 -1
  24. data/platform/android/Rhodes/AndroidManifest.xml +3 -3
  25. data/platform/android/Rhodes/gen/com/rhomobile/rhodes/R.java +164 -90
  26. data/platform/android/Rhodes/jni/src/signature.cpp +13 -3
  27. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoCryptImpl.java +76 -34
  28. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +3 -4
  29. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +1 -1
  30. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SplashScreen.java +10 -2
  31. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/AnnotationsOverlay.java +0 -3
  32. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/Callout.java +6 -5
  33. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/GoogleMapView.java +0 -1
  34. data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/ImageCapture.java +7 -1
  35. data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/Signature.java +46 -6
  36. data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/SignatureView.java +29 -1
  37. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientOld.java +2 -0
  38. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java +4 -0
  39. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsOld.java +10 -2
  40. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebViewClient.java +3 -2
  41. data/platform/android/build/android.rake +6 -27
  42. data/platform/android/build/androidcommon.rb +1 -1
  43. data/platform/bb/rhodes/src/com/rho/rubyext/GeoLocation.java +26 -0
  44. data/platform/iphone/Classes/AppManager/AppManager.h +1 -0
  45. data/platform/iphone/Classes/AppManager/AppManager.m +70 -12
  46. data/platform/iphone/Classes/Camera/PickImageDelegate.m +1 -1
  47. data/platform/iphone/Classes/Event/Event.m +38 -3
  48. data/platform/iphone/Classes/Rhodes.m +3 -2
  49. data/platform/iphone/Classes/Signature/SignatureDelegate.m +1 -1
  50. data/platform/iphone/Info.plist +1 -1
  51. data/platform/iphone/rbuild/iphone.rake +8 -8
  52. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore +0 -0
  53. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui +0 -0
  54. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtNetwork.framework/Versions/4/QtNetwork +0 -0
  55. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/QtWebKit.framework/Versions/4/QtWebKit +0 -0
  56. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Frameworks/phonon.framework/Versions/4/phonon +0 -0
  57. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/Info.plist +1 -1
  58. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/MacOS/RhoSimulator +0 -0
  59. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/accessible/libqtaccessiblewidgets.dylib +0 -0
  60. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/bearer/libqcorewlanbearer.dylib +0 -0
  61. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/bearer/libqgenericbearer.dylib +0 -0
  62. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqcncodecs.dylib +0 -0
  63. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqjpcodecs.dylib +0 -0
  64. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqkrcodecs.dylib +0 -0
  65. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/codecs/libqtwcodecs.dylib +0 -0
  66. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/graphicssystems/libqtracegraphicssystem.dylib +0 -0
  67. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqgif.dylib +0 -0
  68. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqico.dylib +0 -0
  69. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqjpeg.dylib +0 -0
  70. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqmng.dylib +0 -0
  71. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/imageformats/libqtiff.dylib +0 -0
  72. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/phonon_backend/libphonon_qt7.dylib +0 -0
  73. data/platform/osx/bin/RhoSimulator/RhoSimulator.app/Contents/PlugIns/qmltooling/libqmldbg_tcp.dylib +0 -0
  74. data/platform/osx/bin/RhoSimulator/RhoSimulatorMac.zip +0 -0
  75. data/platform/osx/build/osx.rake +1 -1
  76. data/platform/shared/RhoConnectClient/RhoConnectClient.cpp +1 -1
  77. data/platform/shared/common/RhoConf.cpp +15 -6
  78. data/platform/shared/common/RhoConf.h +6 -1
  79. data/platform/shared/common/RhodesApp.cpp +19 -6
  80. data/platform/shared/common/RhodesApp.h +4 -2
  81. data/platform/shared/common/RhodesAppBase.cpp +18 -10
  82. data/platform/shared/common/RhodesAppBase.h +6 -3
  83. data/platform/shared/common/map/GeocodingMapEngine.h +2 -2
  84. data/platform/shared/logging/RhoLogConf.cpp +14 -8
  85. data/platform/shared/logging/RhoLogConf.h +1 -0
  86. data/platform/shared/net/HttpServer.cpp +15 -3
  87. data/platform/shared/net/HttpServer.h +2 -1
  88. data/platform/shared/qt/curl/curl.pro +1 -1
  89. data/platform/shared/qt/rhodes/QtMainWindow.h +1 -1
  90. data/platform/shared/qt/rhodes/impl/MainWindowImpl.cpp +2 -2
  91. data/platform/shared/qt/rhodes/main.cpp +2 -1
  92. data/platform/shared/ruby/ext/rho/rhoruby.c +1 -0
  93. data/platform/shared/ruby/ext/rho/rhosupport.c +11 -1
  94. data/platform/shared/sync/SyncNotify.cpp +1 -2
  95. data/platform/shared/sync/SyncNotify.h +2 -2
  96. data/platform/shared/sync/SyncThread.cpp +27 -12
  97. data/platform/shared/sync/SyncThread.h +2 -0
  98. data/platform/shared/unzip/unzip.cpp +3 -2
  99. data/platform/win32/RhoSimulator/Microsoft.VC80.CRT.manifest +8 -0
  100. data/platform/win32/RhoSimulator/Microsoft.VC80.OpenMP.manifest +7 -0
  101. data/platform/win32/RhoSimulator/QtCore4.dll +0 -0
  102. data/platform/win32/RhoSimulator/QtGui4.dll +0 -0
  103. data/platform/win32/RhoSimulator/QtNetwork4.dll +0 -0
  104. data/platform/win32/RhoSimulator/QtWebKit4.dll +0 -0
  105. data/platform/win32/RhoSimulator/RhoSimulator.exe +0 -0
  106. data/platform/win32/RhoSimulator/imageformats/qgif4.dll +0 -0
  107. data/platform/win32/RhoSimulator/imageformats/qico4.dll +0 -0
  108. data/platform/win32/RhoSimulator/imageformats/qjpeg4.dll +0 -0
  109. data/platform/win32/RhoSimulator/imageformats/qmng4.dll +0 -0
  110. data/platform/win32/RhoSimulator/imageformats/qsvg4.dll +0 -0
  111. data/platform/win32/RhoSimulator/imageformats/qtiff4.dll +0 -0
  112. data/platform/win32/RhoSimulator/libeay32.dll +0 -0
  113. data/platform/win32/RhoSimulator/msvcm80.dll +0 -0
  114. data/platform/win32/RhoSimulator/msvcp80.dll +0 -0
  115. data/platform/win32/RhoSimulator/msvcr80.dll +0 -0
  116. data/platform/win32/RhoSimulator/ssleay32.dll +0 -0
  117. data/platform/win32/RhoSimulator/vcomp.dll +0 -0
  118. data/platform/wm/build/rhodes.nsi +316 -0
  119. data/platform/wm/build/wm.rake +57 -10
  120. data/platform/wm/rhodes/Rhodes.cpp +2 -1
  121. data/platform/wm/rhodes/rhodes.vcproj +2 -0
  122. data/platform/wm/tools/wmdc_connect.sln +20 -0
  123. data/platform/wm/tools/wmdc_connect/stdafx.cpp +27 -0
  124. data/platform/wm/tools/wmdc_connect/stdafx.h +35 -0
  125. data/platform/wm/tools/wmdc_connect/wmdc_connect.cpp +119 -0
  126. data/platform/wm/tools/wmdc_connect/wmdc_connect.vcproj +205 -0
  127. data/platform/wp7/RhoRubyExtGen/RhoAlert.cs +73 -0
  128. data/platform/wp7/RhoRubyExtGen/RhoRubyExtGen.csproj +1 -0
  129. data/platform/wp7/RhoRubyExtGen/RhoSyncEngine.cs +8 -8
  130. data/platform/wp7/RhoRubyLib/Initializers.Generated.cs +47 -6
  131. data/platform/wp7/RhoRubyLib/RhoRuby.cs +8 -0
  132. data/platform/wp7/RhoRubyLib/RhoRubyLib.csproj +5 -0
  133. data/platform/wp7/RhoRubyLib/WP_PlatformAdaptationLayer.cs +5 -0
  134. data/platform/wp7/RhoRubyLib/common/RhoParams.cs +2 -1
  135. data/platform/wp7/RhoRubyLib/common/RhodesApp.cs +58 -37
  136. data/platform/wp7/RhoRubyLib/db/DBAdapter.cs +37 -0
  137. data/platform/wp7/RhoRubyLib/db/DBAttrManager.cs +63 -1
  138. data/platform/wp7/RhoRubyLib/db/IDBStorage.cs +2 -0
  139. data/platform/wp7/RhoRubyLib/db/SqliteStorage.cs +27 -0
  140. data/platform/wp7/RhoRubyLib/logging/RhoLogServerSink.cs +2 -2
  141. data/platform/wp7/RhoRubyLib/net/NetRequest.cs +4 -3
  142. data/platform/wp7/RhoRubyLib/rubyext/RhoAlert.cs +160 -0
  143. data/platform/wp7/RhoRubyLib/rubyext/RhoSyncEngine.cs +44 -12
  144. data/platform/wp7/RhoRubyLib/sync/ClientRegister.cs +4 -3
  145. data/platform/wp7/RhoRubyLib/sync/SyncEngine.cs +27 -32
  146. data/platform/wp7/RhoRubyLib/sync/SyncNotify.cs +31 -11
  147. data/platform/wp7/RhoRubyLib/sync/SyncProtocol_3.cs +6 -1
  148. data/platform/wp7/RhoRubyLib/sync/SyncSource.cs +4 -0
  149. data/platform/wp7/RhoRubyLib/sync/SyncThread.cs +21 -15
  150. data/platform/wp7/build/wp.rake +6 -0
  151. data/rakefile.rb +2 -1
  152. data/res/build-tools/Coding4Fun.Phone.Controls.dll +0 -0
  153. data/res/build-tools/wmdc_connect.exe +0 -0
  154. data/res/generators/templates/spec/app/SpecRunner/index.erb +14 -13
  155. data/spec/phone_spec/app/spec/rhom_object_spec.rb +10 -1
  156. data/version +1 -1
  157. metadata +26 -4
@@ -51,9 +51,9 @@ class GoogleGeoCoding : public IGeoCoding, public CThreadQueue
51
51
  private:
52
52
  struct Command : public IQueueCommand
53
53
  {
54
- String address;
55
- float latitude;
56
54
  float longitude;
55
+ float latitude;
56
+ String address;
57
57
  bool is_inverse;
58
58
  std::auto_ptr<GeoCodingCallback> callback;
59
59
 
@@ -233,9 +233,9 @@ extern "C" {
233
233
  using namespace rho;
234
234
  using namespace rho::common;
235
235
 
236
+ void rho_logconf_Init_with_separate_user_path(const char* szRootPath, const char* szLogPort, const char* szUserPath)
237
+ {
236
238
 
237
- void rho_logconf_Init(const char* szRootPath, const char* szLogPort){
238
-
239
239
  #ifdef RHODES_EMULATOR
240
240
  String strRootPath = szRootPath;
241
241
  strRootPath += RHO_EMULATOR_DIR"/";
@@ -243,7 +243,7 @@ void rho_logconf_Init(const char* szRootPath, const char* szLogPort){
243
243
  #else
244
244
  rho::common::CFilePath oLogPath( szRootPath );
245
245
  #endif
246
-
246
+
247
247
  //Set defaults
248
248
  #ifdef RHO_DEBUG
249
249
  LOGCONF().setMinSeverity( L_TRACE );
@@ -255,16 +255,16 @@ void rho_logconf_Init(const char* szRootPath, const char* szLogPort){
255
255
  LOGCONF().setLogToOutput(false);
256
256
  LOGCONF().setEnabledCategories("");
257
257
  #endif//!RHO_DEBUG
258
-
258
+
259
259
  LOGCONF().setLogPrefix(true);
260
-
260
+
261
261
  rho::String logPath = oLogPath.makeFullPath("rholog.txt");
262
262
  LOGCONF().setLogToFile(true);
263
263
  LOGCONF().setLogFilePath( logPath.c_str() );
264
264
  LOGCONF().setMaxLogFileSize(1024*50);
265
-
266
- rho_conf_Init(szRootPath);
267
-
265
+
266
+ rho_conf_Init_with_separate_user_path(szRootPath, szUserPath);
267
+
268
268
  LOGCONF().loadFromConf(RHOCONF());
269
269
  if (szLogPort != NULL) {
270
270
  LOGCONF().setLogPort(szLogPort);
@@ -272,6 +272,12 @@ void rho_logconf_Init(const char* szRootPath, const char* szLogPort){
272
272
  else {
273
273
  LOGCONF().setLogPort("");
274
274
  }
275
+
276
+ }
277
+
278
+
279
+ void rho_logconf_Init(const char* szRootPath, const char* szLogPort){
280
+ rho_logconf_Init_with_separate_user_path(szRootPath, szLogPort, szRootPath);
275
281
  }
276
282
 
277
283
  char* rho_logconf_getText() {
@@ -145,6 +145,7 @@ extern "C"{
145
145
  #endif //__cplusplus
146
146
 
147
147
  void rho_logconf_Init(const char* szRootPath, const char* szLogPort);
148
+ void rho_logconf_Init_with_separate_user_path(const char* szRootPath, const char* szLogPort, const char* szUserPath);
148
149
 
149
150
  char* rho_logconf_getText();
150
151
  int rho_logconf_getTextPos();
@@ -275,11 +275,23 @@ static VALUE create_request_hash(String const &application, String const &model,
275
275
  return hash;
276
276
  }
277
277
 
278
+ CHttpServer::CHttpServer(int port, String const &root, String const &user_root)
279
+ :m_active(false), m_port(port), verbose(true)
280
+ {
281
+ m_root = CFilePath::normalizePath(root);
282
+ m_strRhoRoot = m_root.substr(0, m_root.length()-5);
283
+ m_userroot = CFilePath::normalizePath(user_root);
284
+ m_strRhoUserRoot = m_userroot;
285
+ }
286
+
278
287
  CHttpServer::CHttpServer(int port, String const &root)
279
288
  :m_active(false), m_port(port), verbose(true)
280
289
  {
281
290
  m_root = CFilePath::normalizePath(root);
282
291
  m_strRhoRoot = m_root.substr(0, m_root.length()-5);
292
+ m_userroot = CFilePath::normalizePath(root);
293
+ m_strRhoUserRoot = m_root.substr(0, m_root.length()-5);
294
+
283
295
  }
284
296
 
285
297
  CHttpServer::~CHttpServer()
@@ -959,8 +971,8 @@ bool CHttpServer::send_file(String const &path, HeaderList const &hdrs)
959
971
  String fullPath = CFilePath::normalizePath(path);
960
972
 
961
973
  if (String_startsWith(fullPath,"/app/db/db-files") )
962
- fullPath = CFilePath::join( RHODESAPP().getRhoRootPath(), path.substr(4) );
963
- else if (fullPath.find(m_root) != 0 && fullPath.find(m_strRhoRoot) != 0)
974
+ fullPath = CFilePath::join( RHODESAPP().getRhoUserPath(), path.substr(4) );
975
+ else if (fullPath.find(m_root) != 0 && fullPath.find(m_strRhoRoot) != 0 && fullPath.find(m_strRhoUserRoot) != 0)
964
976
  fullPath = CFilePath::join( m_root, path );
965
977
 
966
978
  if (verbose) RAWTRACE1("Sending file %s...", fullPath.c_str());
@@ -987,7 +999,7 @@ bool CHttpServer::send_file(String const &path, HeaderList const &hdrs)
987
999
 
988
1000
  #endif
989
1001
 
990
- if ( bCheckExist && (stat(fullPath.c_str(), &st) != 0 || !S_ISREG(st.st_mode))) {
1002
+ if ( bCheckExist && (stat(fullPath.c_str(), &st) != 0 || !S_ISREG(st.st_mode))) {
991
1003
  RAWLOG_ERROR1("The file %s was not found", path.c_str());
992
1004
  String error = "<html><font size=\"+4\"><h2>404 Not Found.</h2> The file " + path + " was not found.</font></html>";
993
1005
  send_response(create_response("404 Not Found",error));
@@ -94,6 +94,7 @@ public:
94
94
 
95
95
  public:
96
96
  CHttpServer(int port, String const &root);
97
+ CHttpServer(int port, String const &root, String const &user_root);
97
98
  ~CHttpServer();
98
99
 
99
100
  void register_uri(String const &uri, callback_t const &callback);
@@ -139,7 +140,7 @@ private:
139
140
  private:
140
141
  bool m_active;
141
142
  int m_port;
142
- String m_root, m_strRhoRoot;
143
+ String m_root, m_userroot, m_strRhoRoot, m_strRhoUserRoot;
143
144
  SOCKET m_listener;
144
145
  SOCKET m_sock;
145
146
  std::map<String, callback_t> m_registered;
@@ -11,7 +11,7 @@ INCLUDEPATH += ../..\
11
11
  macx {
12
12
  DESTDIR = ../../../osx/bin/curl
13
13
  OBJECTS_DIR = ../../../osx/bin/curl/tmp
14
- DEFINES += USE_RHOSSL
14
+ DEFINES += USE_SSLEAY USE_OPENSSL # USE_RHOSSL
15
15
  HEADERS += ../../curl/lib/config-mac.h
16
16
  SOURCES += ../../curl/lib/http_ntlm.c\
17
17
  ../../curl/lib/qssl.c\
@@ -101,13 +101,13 @@ private:
101
101
  private:
102
102
  Ui::QtMainWindow *ui;
103
103
  QWebInspector *main_webInspector;
104
+ QtWebInspector* webInspectorWindow;
104
105
  IMainWindowCallback* cb;
105
106
  std::vector<QWebView*> tabViews;
106
107
  std::vector<QWebInspector*> tabInspect;
107
108
  QWebView* main_webView;
108
109
  QWebInspector* cur_webInspector;
109
110
  QTabBarRuntimeParams* cur_tbrp;
110
- QtWebInspector* webInspectorWindow;
111
111
  QMessageBox *m_alertDialog;
112
112
  //TODO: CSyncStatusDlg *m_SyncStatusDlg;
113
113
  int m_LogicalDpiX;
@@ -53,8 +53,8 @@ bool CMainWindow::mainWindowClosed = false;
53
53
  CMainWindow::CMainWindow():
54
54
  QObject(),
55
55
  m_started(true),
56
- qtApplication(NULL),
57
- qtMainWindow(NULL)
56
+ qtMainWindow(NULL),
57
+ qtApplication(NULL)
58
58
  //TODO: m_logView
59
59
  {
60
60
  }
@@ -149,6 +149,7 @@ int main(int argc, char *argv[])
149
149
  if ( m_strRhodesPath.length() > 0 )
150
150
  RHOSIMCONF().setString("rhodes_path", m_strRhodesPath, false );
151
151
  RHOCONF().setString( "rhosim_platform", RHOSIMCONF().getString( "platform"), false);
152
+ RHOCONF().setString( "app_version", RHOSIMCONF().getString( "app_version"), false);
152
153
  RHOSIMCONF().setString( "ext_path", RHOSIMCONF().getString( "ext_path") + CFilePath::join( m_strRhodesPath, "/lib/extensions/debugger;"), false);
153
154
  RHOSIMCONF().setString( "ext_path", RHOSIMCONF().getString( "ext_path") + CFilePath::join( m_strRhodesPath, "/lib/extensions/uri;"), false);
154
155
  RHOSIMCONF().setString( "ext_path", RHOSIMCONF().getString( "ext_path") + CFilePath::join( m_strRhodesPath, "/lib/extensions/timeout;"), false);
@@ -184,7 +185,7 @@ int main(int argc, char *argv[])
184
185
  setenv("rho_debug_port", RHOSIMCONF().getString("debug_port").c_str(), 1 );
185
186
  #endif // OS_WINDOWS
186
187
  #endif // RHODES_EMULATOR
187
- rho::common::CRhodesApp::Create(m_strRootPath);
188
+ rho::common::CRhodesApp::Create(m_strRootPath, m_strRootPath);
188
189
 
189
190
  // Create the main application window
190
191
  #ifdef RHODES_EMULATOR
@@ -76,6 +76,7 @@ extern void Init_RhoSupport(void);
76
76
  extern VALUE require_compiled(VALUE fname, VALUE* result);
77
77
  extern VALUE RhoPreparePath(VALUE path);
78
78
  extern const char* rho_native_rhopath();
79
+ extern const char* rho_native_rhouserpath();
79
80
  //extern void RhoSetCurAppPath(char* path);
80
81
 
81
82
  static VALUE framework;
@@ -60,6 +60,14 @@ VALUE __rhoGetCurrentDir(void)
60
60
  return rb_str_new2(rho_native_rhopath());
61
61
  }
62
62
 
63
+ VALUE __rhoGetUserDir(void)
64
+ {
65
+ return rb_str_new2(rho_native_rhouserpath());
66
+ }
67
+
68
+
69
+
70
+
63
71
  #ifdef RHODES_EMULATOR
64
72
  VALUE __rhoGetRhodesDir(void)
65
73
  {
@@ -570,6 +578,7 @@ void Init_RhoSupport()
570
578
  rb_define_global_function("__rhoGetRhodesDir", __rhoGetRhodesDir, 0);
571
579
  #endif
572
580
  rb_define_global_function("__rhoGetCurrentDir", __rhoGetCurrentDir, 0);
581
+ rb_define_global_function("__rhoGetUserDir", __rhoGetUserDir, 0);
573
582
  rb_define_global_function("load", rb_load_compiled, 1);
574
583
  rb_define_global_function("__rhoGetCallbackObject", __rhoGetCallbackObject, 1);
575
584
 
@@ -583,9 +592,10 @@ void Init_RhoSupport()
583
592
  static void Init_RhoBlobs()
584
593
  {
585
594
  const char* szBlobPath = rho_rhodesapp_getblobsdirpath();
595
+ const char* szUserPath = rho_rhodesapp_getuserrootpath();
586
596
  RAWLOG_INFO1("Init_RhoBlobs: %s", szBlobPath );
587
597
 
588
- rho_file_recursive_createdir(szBlobPath, rho_native_rhopath());
598
+ rho_file_recursive_createdir(szBlobPath, szUserPath);
589
599
  }
590
600
 
591
601
  void rhoRubyLogWithSeverity(int severity, VALUE category, VALUE str) {
@@ -277,8 +277,7 @@ void CSyncNotify::setSyncNotification(int source_id, CSyncNotification* pNotify
277
277
  }
278
278
 
279
279
  CSyncNotification::CSyncNotification(String strUrl, String strParams, boolean bRemoveAfterFire) :
280
- m_strParams(strParams), m_bRemoveAfterFire(bRemoveAfterFire),
281
- m_cCallback(null), m_cCallbackData(null)
280
+ m_strParams(strParams), m_cCallback(null), m_cCallbackData(null), m_bRemoveAfterFire(bRemoveAfterFire)
282
281
  {
283
282
  if ( strUrl.length() > 0 )
284
283
  m_strUrl = RHODESAPPBASE().canonicalizeRhoUrl(strUrl);
@@ -50,7 +50,7 @@ struct CSyncNotification
50
50
  void* m_cCallbackData;
51
51
 
52
52
  boolean m_bRemoveAfterFire;
53
- CSyncNotification(): m_cCallback(0), m_cCallbackData(0){m_bRemoveAfterFire = false;}
53
+ CSyncNotification(): m_cCallback(0), m_cCallbackData(0), m_bRemoveAfterFire(false){}
54
54
 
55
55
  CSyncNotification(String strUrl, String strParams, boolean bRemoveAfterFire);
56
56
  CSyncNotification(RHOC_CALLBACK callback, void* callback_data, boolean bRemoveAfterFire) :
@@ -171,4 +171,4 @@ private:
171
171
  }
172
172
  }
173
173
 
174
- extern "C" void alert_show_status(const char* title, const char* message, const char* szHide);
174
+ extern "C" void alert_show_status(const char* title, const char* message, const char* szHide);
@@ -191,6 +191,32 @@ void CSyncThread::setPollInterval(int nInterval)
191
191
 
192
192
  CThreadQueue::setPollInterval(nInterval);
193
193
  }
194
+
195
+ void CSyncThread::stopAll() {
196
+ LOG(INFO)+"STOP sync";
197
+
198
+ if (CSyncThread::getSyncEngine().isSyncing() )
199
+ {
200
+ LOG(INFO)+"STOP sync in progress.";
201
+
202
+ {
203
+ synchronized(getCommandLock());
204
+
205
+ getCommands().clear();
206
+ }
207
+
208
+ CSyncThread::getSyncEngine().stopSyncByUser();
209
+ CSyncThread::getInstance()->stopWait();
210
+
211
+ while (!CSyncThread::getInstance()->isWaiting()) {
212
+ CSyncThread::getInstance()->sleep(100);
213
+ }
214
+
215
+ while( CDBAdapter::isAnyInsideTransaction() )
216
+ CSyncThread::getInstance()->sleep(100);
217
+ }
218
+ }
219
+
194
220
 
195
221
  String CSyncThread::CSyncCommand::toString()
196
222
  {
@@ -251,18 +277,7 @@ unsigned long rho_sync_doSyncSource(unsigned long nSrcID,int show_status_popup,
251
277
 
252
278
  void rho_sync_stop()
253
279
  {
254
- LOG(INFO)+"STOP sync";
255
-
256
- if (CSyncThread::getSyncEngine().isSyncing() )
257
- {
258
- LOG(INFO)+"STOP sync in progress.";
259
-
260
- CSyncThread::getSyncEngine().stopSyncByUser();
261
- CSyncThread::getInstance()->stopWait();
262
-
263
- while( CDBAdapter::isAnyInsideTransaction() )
264
- CSyncThread::getInstance()->sleep(100);
265
- }
280
+ CSyncThread::getInstance()->stopAll();
266
281
  }
267
282
 
268
283
  int rho_sync_issyncing()
@@ -141,6 +141,8 @@ public:
141
141
  static CSyncEngine& getSyncEngine(){ return m_pInstance->m_oSyncEngine; }
142
142
 
143
143
  void setPollInterval(int nInterval);
144
+
145
+ void stopAll();
144
146
 
145
147
  unsigned long getRetValue();
146
148
  private:
@@ -3894,9 +3894,10 @@ class TUnzip
3894
3894
  TUnzip(const char *pwd) : uf(0), unzbuf(0), currentfile(-1), czei(-1), password(0) {if (pwd!=0) {password=new char[strlen(pwd)+1]; strcpy(password,pwd);}}
3895
3895
  ~TUnzip() {if (password!=0) delete[] password; password=0; if (unzbuf!=0) delete[] unzbuf; unzbuf=0;}
3896
3896
 
3897
- unzFile uf; int currentfile; ZIPENTRY cze; int czei;
3898
- char *password;
3897
+ unzFile uf;
3899
3898
  char *unzbuf; // lazily created and destroyed, used by Unzip
3899
+ int currentfile; ZIPENTRY cze; int czei;
3900
+ char *password;
3900
3901
  TCHAR rootdir[MAX_PATH]; // includes a trailing slash
3901
3902
 
3902
3903
  ZRESULT Open(void *z,unsigned int len,DWORD flags);
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+ <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3
+ <noInheritable></noInheritable>
4
+ <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.6195" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
5
+ <file name="msvcr80.dll" hash="4be3fcf046c4941d7b439da6eb642431b5ff497a" hashalg="SHA1"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>Q4Uf5GRMCh6zH+gPQnd38fABXvo=</dsig:DigestValue></asmv2:hash></file>
6
+ <file name="msvcp80.dll" hash="f96d6d587819a28ad84cd32783968c7f75169a49" hashalg="SHA1"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>lzYUrJYi1eqc3Wj+vOMljRlkCLY=</dsig:DigestValue></asmv2:hash></file>
7
+ <file name="msvcm80.dll" hash="b8f788f913a88543f10e1b400e9ae3896676c903" hashalg="SHA1"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms><dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></dsig:DigestMethod><dsig:DigestValue>BMaQ6zIuI2qb7Sk3oEQwxv2jsT0=</dsig:DigestValue></asmv2:hash></file>
8
+ </assembly>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+ <!-- Copyright © 1981-2001 Microsoft Corporation -->
3
+ <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
4
+ <noInheritable/>
5
+ <assemblyIdentity type="win32" name="Microsoft.VC80.OpenMP" version="8.0.50727.6195" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"/>
6
+ <file name="vcomp.dll" hash="278ed8d9109deaf37b7430b928f9b0aa956b3d4d" hashalg="SHA1"/>
7
+ </assembly>
Binary file
@@ -0,0 +1,316 @@
1
+ ;======================================================
2
+ ; Include
3
+
4
+ !include "MUI.nsh"
5
+ !include "LogicLib.nsh"
6
+
7
+ ;======================================================
8
+ ; Installer Information
9
+
10
+ Name %APPNAME% #"Rhodes Installer"
11
+ OutFile "RhodesBundle.exe"
12
+ InstallDir %APPINSTALLDIR% #C:\Rhodes
13
+ BrandingText " "
14
+
15
+ ;======================================================
16
+ ; Modern Interface Configuration
17
+
18
+ !define MUI_ICON %APPICON% #"icon.ico"
19
+ !define MUI_UNICON %APPICON% #"icon.ico"
20
+ !define MUI_HEADERIMAGE
21
+ !define MUI_ABORTWARNING
22
+ !define MUI_COMPONENTSPAGE_SMALLDESC
23
+ !define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
24
+ !define MUI_FINISHPAGE_SHOWREADME $INSTDIR\README.html
25
+ !define MUI_FINISHPAGE
26
+ !define MUI_FINISHPAGE_TEXT %FINISHPAGE_TEXT% #"Thank you for installing Rhodes, Rhoconnect and RhoStudio. \r\n\n\n"
27
+
28
+ ;======================================================
29
+ ; Pages
30
+
31
+ !insertmacro MUI_PAGE_WELCOME
32
+ !insertmacro MUI_PAGE_COMPONENTS
33
+ !insertmacro MUI_PAGE_DIRECTORY
34
+ !insertmacro MUI_PAGE_INSTFILES
35
+ #Page custom customerConfig
36
+ !insertmacro MUI_PAGE_FINISH
37
+
38
+ ;======================================================
39
+ ; Languages
40
+
41
+ !insertmacro MUI_LANGUAGE "English"
42
+
43
+ ;======================================================
44
+ ; Reserve Files
45
+
46
+ ;======================================================
47
+ ; Sections
48
+
49
+ # start default section
50
+ section
51
+
52
+ # set the installation directory as the destination for the following actions
53
+ setOutPath $INSTDIR
54
+
55
+ # create the uninstaller
56
+ writeUninstaller "$INSTDIR\uninstall.exe"
57
+
58
+ SetOutPath %SMPROGDIR% #"$SMPROGRAMS\RhoStudio"
59
+
60
+ # create a shortcut named "new shortcut" in the start menu programs directory
61
+ # point the new shortcut at the program uninstaller
62
+ createShortCut %SCAPPPATH% %APPEXEPATH% #"$INSTDIR\app.exe"
63
+ createShortCut %SCUNISTALLPATH% "$INSTDIR\uninstall.exe" #"$SMPROGRAMS\RhoStudio\Uninstall RhoStudio.lnk" "$INSTDIR\uninstall.exe"
64
+
65
+ # added information in 'unistall programs' in contorol panel
66
+ #WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\RhoStudio" \
67
+ # "DisplayName" "RhoStudio - RAD tool for develop and debug rhodes/rhoconnect applications"
68
+ #WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\RhoStudio" \
69
+ # "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
70
+ #WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\RhoStudio" \
71
+ # "DisplayIcon" "$\"$INSTDIR\uninstall.exe$\""
72
+
73
+ sectionEnd
74
+
75
+ # uninstaller section start
76
+ section "uninstall"
77
+
78
+ # first, delete the uninstaller
79
+ delete "$INSTDIR\uninstall.exe"
80
+
81
+ # second, remove the link from the start menu
82
+ delete %SCUNISTALLPATH% #"$SMPROGRAMS\RhoStudio\Uninstall RhoStudio.lnk"
83
+ delete %SCAPPPATH% #"$SMPROGRAMS\RhoStudio\RhoStudio.lnk"
84
+ delete %SMPROGDIR% #"$SMPROGRAMS\RhoStudio"
85
+
86
+ # remove $INSTDIR
87
+ RMDir /r /REBOOTOK $INSTDIR
88
+
89
+ # uninstaller section end
90
+ sectionEnd
91
+
92
+
93
+ Section %SECTION_NAME% appSection #"Rhodes" appSection
94
+
95
+ SetOutPath $INSTDIR
96
+
97
+ File /r "rho"
98
+ File %APP_EXECUTABLE% #"rhodes-system-api-samples.exe"
99
+
100
+ SectionEnd
101
+
102
+ ;======================================================
103
+ ;Descriptions
104
+
105
+ ;Language strings
106
+ LangString DESC_InstallApp ${LANG_ENGLISH} %SECTOIN_TITLE% #"This installs Eclipse with RhoStudio."
107
+
108
+ ;Assign language strings to sections
109
+
110
+ !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
111
+ !insertmacro MUI_DESCRIPTION_TEXT ${appSection} $(DESC_InstallApp)
112
+ !insertmacro MUI_FUNCTION_DESCRIPTION_END
113
+
114
+ ;======================================================
115
+ ;Functions
116
+
117
+
118
+ Function FixScriptFilesInDir
119
+ Exch $R0 #path
120
+ Exch
121
+ Exch $R1 #filter
122
+ Exch
123
+ Exch 2
124
+ Exch $R2 #output file
125
+ Exch 2
126
+ Push $R3
127
+ Push $R4
128
+ Push $R5
129
+ Push $R6
130
+ ClearErrors
131
+ FindFirst $R3 $R4 "$R0\$R1"
132
+ FileOpen $R5 $R2 w
133
+
134
+ Push $INSTDIR
135
+ Push "\"
136
+ Call StrSlash
137
+ Pop $R6
138
+
139
+ Loop:
140
+ IfErrors Done
141
+ StrCmp $R4 "." gotoNextFile
142
+ StrCmp $R4 ".." gotoNextFile
143
+
144
+ ;replace package folder with INSTDIR
145
+ Push C:/dev/rhodesinstaller
146
+ Push $R6
147
+ Push all
148
+ Push all
149
+ Push "$R0\$R4"
150
+ Call AdvReplaceInFile
151
+ FileWrite $R5 "$R0\$R4$\r$\n"
152
+ FindNext $R3 $R4
153
+ Goto Loop
154
+
155
+ gotoNextFile:
156
+ FindNext $R3 $R4
157
+ Goto Loop
158
+
159
+ Done:
160
+ FileClose $R5
161
+ FindClose $R3
162
+ Pop $R6
163
+ Pop $R5
164
+ Pop $R4
165
+ Pop $R3
166
+ Pop $R2
167
+ Pop $R1
168
+ Pop $R0
169
+ FunctionEnd
170
+
171
+
172
+
173
+ Function AdvReplaceInFile
174
+ Exch $0 ;file to replace in
175
+ Exch
176
+ Exch $1 ;number to replace after
177
+ Exch
178
+ Exch 2
179
+ Exch $2 ;replace and onwards
180
+ Exch 2
181
+ Exch 3
182
+ Exch $3 ;replace with
183
+ Exch 3
184
+ Exch 4
185
+ Exch $4 ;to replace
186
+ Exch 4
187
+ Push $5 ;minus count
188
+ Push $6 ;universal
189
+ Push $7 ;end string
190
+ Push $8 ;left string
191
+ Push $9 ;right string
192
+ Push $R0 ;file1
193
+ Push $R1 ;file2
194
+ Push $R2 ;read
195
+ Push $R3 ;universal
196
+ Push $R4 ;count (onwards)
197
+ Push $R5 ;count (after)
198
+ Push $R6 ;temp file name
199
+
200
+ GetTempFileName $R6
201
+ FileOpen $R1 $0 r ;file to search in
202
+ FileOpen $R0 $R6 w ;temp file
203
+ StrLen $R3 $4
204
+ StrCpy $R4 -1
205
+ StrCpy $R5 -1
206
+
207
+ loop_read:
208
+ ClearErrors
209
+ FileRead $R1 $R2 ;read line
210
+ IfErrors exit
211
+
212
+ StrCpy $5 0
213
+ StrCpy $7 $R2
214
+
215
+ loop_filter:
216
+ IntOp $5 $5 - 1
217
+ StrCpy $6 $7 $R3 $5 ;search
218
+ StrCmp $6 "" file_write2
219
+ StrCmp $6 $4 0 loop_filter
220
+
221
+ StrCpy $8 $7 $5 ;left part
222
+ IntOp $6 $5 + $R3
223
+ IntCmp $6 0 is0 not0
224
+ is0:
225
+ StrCpy $9 ""
226
+ Goto done
227
+ not0:
228
+ StrCpy $9 $7 "" $6 ;right part
229
+ done:
230
+ StrCpy $7 $8$3$9 ;re-join
231
+
232
+ IntOp $R4 $R4 + 1
233
+ StrCmp $2 all file_write1
234
+ StrCmp $R4 $2 0 file_write2
235
+ IntOp $R4 $R4 - 1
236
+
237
+ IntOp $R5 $R5 + 1
238
+ StrCmp $1 all file_write1
239
+ StrCmp $R5 $1 0 file_write1
240
+ IntOp $R5 $R5 - 1
241
+ Goto file_write2
242
+
243
+ file_write1:
244
+ FileWrite $R0 $7 ;write modified line
245
+ Goto loop_read
246
+
247
+ file_write2:
248
+ FileWrite $R0 $R2 ;write unmodified line
249
+ Goto loop_read
250
+
251
+ exit:
252
+ FileClose $R0
253
+ FileClose $R1
254
+
255
+ SetDetailsPrint none
256
+ Delete $0
257
+ Rename $R6 $0
258
+ Delete $R6
259
+ SetDetailsPrint both
260
+
261
+ Pop $R6
262
+ Pop $R5
263
+ Pop $R4
264
+ Pop $R3
265
+ Pop $R2
266
+ Pop $R1
267
+ Pop $R0
268
+ Pop $9
269
+ Pop $8
270
+ Pop $7
271
+ Pop $6
272
+ Pop $5
273
+ Pop $0
274
+ Pop $1
275
+ Pop $2
276
+ Pop $3
277
+ Pop $4
278
+ FunctionEnd
279
+
280
+
281
+ ; Push $filenamestring (e.g. 'c:\this\and\that\filename.htm')
282
+ ; Push "\"
283
+ ; Call StrSlash
284
+ ; Pop $R0
285
+ ; ;Now $R0 contains 'c:/this/and/that/filename.htm'
286
+ Function StrSlash
287
+ Exch $R3 ; $R3 = needle ("\" or "/")
288
+ Exch
289
+ Exch $R1 ; $R1 = String to replacement in (haystack)
290
+ Push $R2 ; Replaced haystack
291
+ Push $R4 ; $R4 = not $R3 ("/" or "\")
292
+ Push $R6
293
+ Push $R7 ; Scratch reg
294
+ StrCpy $R2 ""
295
+ StrLen $R6 $R1
296
+ StrCpy $R4 "\"
297
+ StrCmp $R3 "/" loop
298
+ StrCpy $R4 "/"
299
+ loop:
300
+ StrCpy $R7 $R1 1
301
+ StrCpy $R1 $R1 $R6 1
302
+ StrCmp $R7 $R3 found
303
+ StrCpy $R2 "$R2$R7"
304
+ StrCmp $R1 "" done loop
305
+ found:
306
+ StrCpy $R2 "$R2$R4"
307
+ StrCmp $R1 "" done loop
308
+ done:
309
+ StrCpy $R3 $R2
310
+ Pop $R7
311
+ Pop $R6
312
+ Pop $R4
313
+ Pop $R2
314
+ Pop $R1
315
+ Exch $R3
316
+ FunctionEnd