rhodes 2.2.4.beta.1 → 2.2.5.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +10 -0
- data/Rakefile +119 -3
- data/lib/build/jake.rb +15 -1
- data/lib/framework/dateME.rb +6 -1
- data/lib/framework/rho/render.rb +18 -15
- data/lib/framework/rho/rho.rb +105 -43
- data/lib/framework/rho/rhoapplication.rb +1 -1
- data/lib/framework/rho/rhocontact.rb +41 -13
- data/lib/framework/rho/rhocontroller.rb +10 -1
- data/lib/framework/rho/rhoevent_c.rb +6 -1
- data/lib/framework/rho/rhosupport.rb +1 -1
- data/lib/framework/rhodes.rb +1 -1
- data/lib/framework/rholang/rhomsg_de.rb +1 -1
- data/lib/framework/rholang/rhomsg_es.rb +1 -1
- data/lib/framework/rholang/rhomsg_it.rb +28 -0
- data/lib/framework/rhom/rhom.rb +6 -0
- data/lib/framework/rhom/rhom_model.rb +14 -7
- data/lib/framework/rhom/rhom_object_factory.rb +121 -56
- data/lib/framework/version.rb +1 -1
- data/lib/rhodes.rb +1 -1
- data/platform/android/Rhodes/AndroidManifest.full.xml +62 -0
- data/platform/android/Rhodes/AndroidManifest.xml +3 -34
- data/platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h +17 -2
- data/platform/android/Rhodes/jni/src/alert.cpp +16 -0
- data/platform/android/Rhodes/jni/src/callbacks.cpp +27 -3
- data/platform/android/Rhodes/jni/src/nativebar.cpp +3 -0
- data/platform/android/Rhodes/jni/src/nativeview.cpp +131 -1
- data/platform/android/Rhodes/jni/src/phonebook.cpp +102 -41
- data/platform/android/Rhodes/jni/src/rhodes.cpp +113 -32
- data/platform/android/Rhodes/jni/src/ringtones.cpp +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Capabilities.java +1 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Rhodes.java +9 -8
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +184 -49
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/SplashScreen.java +49 -25
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/Alert.java +104 -57
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/EventStore.java +36 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocation.java +24 -14
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocationImpl.java +7 -8
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +185 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/nativeview/RhoNativeViewManager.java +54 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/Contact.java +107 -14
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessorNew.java +72 -24
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/ContactAccessorOld.java +22 -21
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/Phonebook.java +91 -11
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/util/PerformOnUiThread.java +10 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientNew.java +11 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsNew.java +10 -0
- data/platform/android/build/android.rake +50 -9
- data/platform/android/build/librhocommon_build.files +1 -0
- data/platform/bb/Hsqldb/src/org/hsqldb/Parser.java +3 -2
- data/platform/bb/Hsqldb/src/org/hsqldb/SchemaManager.java +3 -1
- data/platform/bb/Hsqldb/src/org/hsqldb/Session.java +7 -0
- data/platform/bb/Hsqldb/src/org/hsqldb/Tokenizer.java +2 -2
- data/platform/bb/RubyVM/RubyVM.jdp +1 -0
- data/platform/bb/RubyVM/src/com/rho/AppBuildConfig.java +22 -0
- data/platform/bb/RubyVM/src/com/rho/RhoRuby.java +5 -0
- data/platform/bb/RubyVM/src/com/rho/net/RhoConnection.java +1 -1
- data/platform/bb/RubyVM/src/com/rho/sync/SyncEngine.java +51 -4
- data/platform/bb/RubyVM/src/com/rho/sync/SyncNotify.java +21 -10
- data/platform/bb/RubyVM/src/com/rho/sync/SyncSource.java +82 -33
- data/platform/bb/RubyVM/src/com/rho/sync/SyncThread.java +59 -6
- data/platform/bb/RubyVM/src/com/xruby/GeneratedMethods/RubyFloat_Methods.java +5 -0
- data/platform/bb/RubyVM/src/com/xruby/GeneratedMethods/RubyString_Methods.java +19 -7
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/ArrayPacker.java +1 -1
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyFloat.java +5 -0
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyString.java +55 -11
- data/platform/bb/RubyVM/src/com/xruby/runtime/builtin/RubyTime.java +18 -2
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyKernelModule.java +8 -5
- data/platform/bb/RubyVM/src/j2me/lang/CharacterMe.java +1 -1
- data/platform/bb/RubyVM/src/j2me/util/StringParser.java +2 -0
- data/platform/bb/build/RubyVM_build.files +1 -0
- data/platform/bb/build/bb.rake +21 -2
- data/platform/bb/rhodes/platform/4.7/com/rho/RhoMainScreen.java +3 -3
- data/platform/bb/rhodes/platform/common/com/rho/RhoMainScreen.java +1 -1
- data/platform/bb/rhodes/src/com/rho/RhoRubyHelper.java +1 -2
- data/platform/bb/rhodes/src/com/rho/net/NetworkAccess.java +15 -16
- data/platform/bb/rhodes/src/com/rho/rubyext/RhoCalendar.java +4 -0
- data/platform/bb/rhodes/src/com/rho/rubyext/System.java +58 -0
- data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +90 -4
- data/platform/iphone/Classes/AppManager/AppManager.m +43 -5
- data/platform/iphone/Classes/Event/Event.h +2 -0
- data/platform/iphone/Classes/Event/Event.m +12 -1
- data/platform/iphone/Classes/GeoLocation/LocationController.m +9 -3
- data/platform/iphone/Classes/MapView/MapViewController.m +20 -9
- data/platform/iphone/Classes/NativeBar.m +27 -0
- data/platform/iphone/Classes/Phonebook/phonebook.m +17 -0
- data/platform/iphone/Classes/RhoAlert.m +61 -1
- data/platform/iphone/Classes/RhoMainView.h +1 -0
- data/platform/iphone/Classes/Rhodes.h +2 -0
- data/platform/iphone/Classes/Rhodes.m +108 -1
- data/platform/iphone/Classes/SimpleMainView.h +4 -0
- data/platform/iphone/Classes/SimpleMainView.m +30 -3
- data/platform/iphone/Classes/SplashViewController.m +3 -1
- data/platform/iphone/Classes/TabbedMainView.h +2 -0
- data/platform/iphone/Classes/TabbedMainView.m +63 -11
- data/platform/iphone/Classes/rho/net/NetRequestImpl.m +26 -0
- data/platform/iphone/Info.plist +12 -1
- data/platform/iphone/RhoLib/RhoLib.xcodeproj/project.pbxproj +8 -0
- data/platform/iphone/rbuild/iphone.rake +181 -25
- data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +5 -5
- data/platform/shared/common/IRhoThreadImpl.h +1 -1
- data/platform/shared/common/PosixThreadImpl.cpp +5 -3
- data/platform/shared/common/PosixThreadImpl.h +1 -1
- data/platform/shared/common/RhoFilePath.h +11 -0
- data/platform/shared/common/RhoNativeViewManager.h +17 -0
- data/platform/shared/common/RhoThread.h +1 -1
- data/platform/shared/common/RhodesApp.cpp +29 -8
- data/platform/shared/common/ThreadQueue.cpp +5 -3
- data/platform/shared/common/ThreadQueue.h +2 -1
- data/platform/shared/common/app_build_configs.c +25 -0
- data/platform/shared/common/app_build_configs.h +11 -0
- data/platform/shared/net/AsyncHttp.cpp +5 -5
- data/platform/shared/net/CURLNetRequest.cpp +25 -7
- data/platform/shared/net/CURLNetRequest.h +2 -1
- data/platform/shared/net/HttpServer.cpp +28 -0
- data/platform/shared/ruby/ext/nativebar/nativebar.i +3 -0
- data/platform/shared/ruby/ext/nativebar/nativebar_wrap.c +26 -1
- data/platform/shared/ruby/ext/rho/rhoruby.c +6 -0
- data/platform/shared/ruby/ext/rho/rhoruby.h +1 -0
- data/platform/shared/ruby/ext/rho/rhosupport.c +15 -2
- data/platform/shared/ruby/ext/syncengine/syncengine.i +14 -2
- data/platform/shared/ruby/ext/syncengine/syncengine_wrap.c +97 -2
- data/platform/shared/ruby/ext/system/system.i +13 -0
- data/platform/shared/ruby/ext/system/system_wrap.c +104 -1
- data/platform/shared/rubyext/RhoAppAdapter.cpp +7 -0
- data/platform/shared/sync/SyncEngine.cpp +43 -3
- data/platform/shared/sync/SyncEngine.h +13 -0
- data/platform/shared/sync/SyncNotify.cpp +41 -23
- data/platform/shared/sync/SyncNotify.h +18 -4
- data/platform/shared/sync/SyncSource.cpp +52 -14
- data/platform/shared/sync/SyncSource.h +1 -0
- data/platform/shared/sync/SyncThread.cpp +29 -9
- data/platform/shared/sync/SyncThread.h +4 -2
- data/platform/wm/RhoLib/RhoLib.vcproj +8 -0
- data/platform/wm/build/build_inf.js +15 -9
- data/platform/wm/build/wm.rake +10 -5
- data/platform/wm/rhodes/Alert.cpp +10 -0
- data/platform/wm/rhodes/Alert.h +3 -3
- data/platform/wm/rhodes/MainWindow.cpp +171 -26
- data/platform/wm/rhodes/MainWindow.h +23 -1
- data/platform/wm/rhodes/MetaHandler.cpp +192 -0
- data/platform/wm/rhodes/MetaHandler.h +31 -0
- data/platform/wm/rhodes/RhoNativeViewManager.cpp +126 -0
- data/platform/wm/rhodes/RhoNativeViewManagerWM.h +20 -0
- data/platform/wm/rhodes/Rhodes.cpp +91 -2
- data/platform/wm/rhodes/Rhodes.rc +15 -6
- data/platform/wm/rhodes/SyncStatusDlg.cpp +32 -0
- data/platform/wm/rhodes/SyncStatusDlg.h +29 -0
- data/platform/wm/rhodes/resource.h +5 -2
- data/platform/wm/rhodes/rho/common/RhoThreadImpl.cpp +3 -1
- data/platform/wm/rhodes/rho/common/RhoThreadImpl.h +1 -1
- data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +146 -14
- data/platform/wm/rhodes/rhodes.vcproj +28 -0
- data/rakefile.rb +119 -3
- data/res/build-tools/iphonesim/README +58 -0
- data/res/build-tools/iphonesim/Source/iPhoneSimulator.h +43 -0
- data/res/build-tools/iphonesim/Source/iPhoneSimulator.m +224 -0
- data/res/build-tools/iphonesim/Source/main.m +52 -0
- data/res/build-tools/iphonesim/Source/nsprintf.h +3 -0
- data/res/build-tools/iphonesim/Source/nsprintf.m +42 -0
- data/res/build-tools/iphonesim/build/Release/iphonesim +0 -0
- data/res/build-tools/iphonesim/iPhoneSimulatorRemoteClient/iPhoneSimulatorRemoteClient.h +124 -0
- data/res/build-tools/iphonesim/iphonesim.xcodeproj/project.pbxproj +261 -0
- data/res/build-tools/iphonesim/iphonesim_Prefix.pch +7 -0
- data/res/generators/rhogen.rb +5 -0
- data/res/generators/templates/application/app/layout.erb +7 -13
- data/res/generators/templates/application/app/loading.png +0 -0
- data/res/generators/templates/application/build.yml +3 -0
- data/res/generators/templates/application/icon/icon114.png +0 -0
- data/res/generators/templates/application/icon/icon57.png +0 -0
- data/res/generators/templates/application/icon/icon72.png +0 -0
- data/res/generators/templates/application/public/css/iphone.css +96 -0
- data/res/generators/templates/application/public/images/backButton.png +0 -0
- data/res/generators/templates/application/public/jqtouch/jqtouch.js +2 -1
- data/res/generators/templates/application/rhoconfig.txt +2 -0
- data/rhodes.gemspec +1 -1
- data/spec/phone_spec/app/spec/array_pack_spec.rb +108 -0
- data/spec/phone_spec/app/spec/bulksync_spec.rb +1 -0
- data/spec/phone_spec/app/spec/date_spec.rb +27 -0
- data/spec/phone_spec/app/spec/fixtures/classes.rb +91 -0
- data/spec/phone_spec/app/spec/lstrip_spec.rb +57 -0
- data/spec/phone_spec/app/spec/rho_spec.rb +50 -19
- data/spec/phone_spec/app/spec/rhom_object_spec.rb +78 -0
- data/spec/phone_spec/app/spec/rstrip_spec.rb +51 -0
- data/spec/phone_spec/app/spec/strip_spec.rb +50 -0
- data/spec/phone_spec/app/spec/syncengine_spec.rb +46 -3
- data/spec/phone_spec/app/spec_runner.rb +6 -0
- metadata +34 -4
@@ -22,6 +22,7 @@ IMPLEMENT_LOGCLASS(CSyncEngine,"Sync");
|
|
22
22
|
using namespace rho::net;
|
23
23
|
using namespace rho::common;
|
24
24
|
using namespace rho::json;
|
25
|
+
CSyncEngine::CSourceOptions CSyncEngine::m_oSourceOptions;
|
25
26
|
|
26
27
|
CSyncEngine::CSyncEngine():m_NetRequest(0), m_syncState(esNone), m_oSyncNotify(*this)
|
27
28
|
{
|
@@ -37,6 +38,45 @@ void CSyncEngine::initProtocol()
|
|
37
38
|
m_SyncProtocol = new CSyncProtocol_3();
|
38
39
|
}
|
39
40
|
|
41
|
+
void CSyncEngine::CSourceOptions::setProperty(int nSrcID, const char* szPropName, const char* szPropValue)
|
42
|
+
{
|
43
|
+
synchronized(m_mxSrcOptions)
|
44
|
+
{
|
45
|
+
Hashtable<String,String>* phashOptions = m_hashSrcOptions.get(nSrcID);
|
46
|
+
if ( phashOptions == null )
|
47
|
+
{
|
48
|
+
phashOptions = new Hashtable<String,String>();
|
49
|
+
m_hashSrcOptions.put( nSrcID, phashOptions );
|
50
|
+
}
|
51
|
+
|
52
|
+
Hashtable<String,String>& hashOptions = *phashOptions;
|
53
|
+
hashOptions.put(szPropName,szPropValue!=null?szPropValue:"");
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
String CSyncEngine::CSourceOptions::getProperty(int nSrcID, const char* szPropName)
|
58
|
+
{
|
59
|
+
String res = "";
|
60
|
+
synchronized(m_mxSrcOptions)
|
61
|
+
{
|
62
|
+
Hashtable<String,String>* phashOptions = m_hashSrcOptions.get(nSrcID);
|
63
|
+
if ( phashOptions != null )
|
64
|
+
{
|
65
|
+
Hashtable<String,String>& hashOptions = *phashOptions;
|
66
|
+
res = hashOptions.get(szPropName);
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
return res;
|
71
|
+
}
|
72
|
+
|
73
|
+
boolean CSyncEngine::CSourceOptions::getBoolProperty(int nSrcID, const char* szPropName)
|
74
|
+
{
|
75
|
+
String strValue = getProperty(nSrcID, szPropName);
|
76
|
+
|
77
|
+
return strValue.compare("1") == 0 || strValue.compare("true") == 0 ? true : false;
|
78
|
+
}
|
79
|
+
|
40
80
|
void CSyncEngine::prepareSync(ESyncState eState, const CSourceID* oSrcID)
|
41
81
|
{
|
42
82
|
setState(eState);
|
@@ -581,7 +621,7 @@ void CSyncEngine::loadBulkPartition(const String& strPartition )
|
|
581
621
|
{
|
582
622
|
LOG(ERROR) + "Bulk sync failed: server return an error.";
|
583
623
|
stopSync();
|
584
|
-
getNotify().fireBulkSyncNotification(true, "", strPartition, RhoAppAdapter.
|
624
|
+
getNotify().fireBulkSyncNotification(true, "", strPartition, RhoAppAdapter.getErrorFromResponse(resp));
|
585
625
|
return;
|
586
626
|
}
|
587
627
|
|
@@ -626,7 +666,7 @@ void CSyncEngine::loadBulkPartition(const String& strPartition )
|
|
626
666
|
{
|
627
667
|
LOG(ERROR) + "Bulk sync failed: cannot download database file.";
|
628
668
|
stopSync();
|
629
|
-
getNotify().fireBulkSyncNotification(true, "", strPartition, RhoAppAdapter.
|
669
|
+
getNotify().fireBulkSyncNotification(true, "", strPartition, RhoAppAdapter.getErrorFromResponse(resp1));
|
630
670
|
return;
|
631
671
|
}
|
632
672
|
}
|
@@ -718,7 +758,7 @@ void CSyncEngine::syncAllSources()
|
|
718
758
|
bError = !syncOneSource(i);
|
719
759
|
}
|
720
760
|
|
721
|
-
if ( !bError)
|
761
|
+
if ( !bError && !isSchemaChanged() )
|
722
762
|
getNotify().fireSyncNotification(null, true, RhoAppAdapter.ERR_NONE, RhoAppAdapter.getMessageText("sync_completed"));
|
723
763
|
}
|
724
764
|
|
@@ -32,6 +32,16 @@ public:
|
|
32
32
|
boolean isEqual(CSyncSource& src)const;
|
33
33
|
};
|
34
34
|
|
35
|
+
class CSourceOptions
|
36
|
+
{
|
37
|
+
common::CMutex m_mxSrcOptions;
|
38
|
+
HashtablePtr<int, Hashtable<String,String>* > m_hashSrcOptions;
|
39
|
+
public:
|
40
|
+
void setProperty(int nSrcID, const char* szPropName, const char* szPropValue);
|
41
|
+
String getProperty(int nSrcID, const char* szPropName);
|
42
|
+
boolean getBoolProperty(int nSrcID, const char* szPropName);
|
43
|
+
};
|
44
|
+
|
35
45
|
private:
|
36
46
|
VectorPtr<CSyncSource*> m_sources;
|
37
47
|
Vector<String> m_arPartitions;
|
@@ -48,6 +58,7 @@ private:
|
|
48
58
|
int m_nErrCode;
|
49
59
|
String m_strError;
|
50
60
|
boolean m_bIsSearch, m_bIsSchemaChanged;
|
61
|
+
static CSourceOptions m_oSourceOptions;
|
51
62
|
|
52
63
|
public:
|
53
64
|
CSyncEngine();
|
@@ -55,7 +66,9 @@ public:
|
|
55
66
|
|
56
67
|
void setFactory(common::IRhoClassFactory* factory){
|
57
68
|
m_NetRequest = factory->createNetRequest();
|
69
|
+
m_oSyncNotify.setFactory(factory);
|
58
70
|
}
|
71
|
+
static CSourceOptions& getSourceOptions(){ return m_oSourceOptions; }
|
59
72
|
|
60
73
|
void doSyncAllSources();
|
61
74
|
void doSyncSource(const CSourceID& oSrcID);
|
@@ -15,8 +15,6 @@ using namespace rho::db;
|
|
15
15
|
String CSyncNotify::m_strObjectNotifyUrl;
|
16
16
|
common::CMutex CSyncNotify::m_mxObjectNotify;
|
17
17
|
|
18
|
-
INetRequest& CSyncNotify::getNet(){ return getSync().getNet(); }
|
19
|
-
|
20
18
|
void CSyncNotify::addObjectNotify(int nSrcID, const String& strObject)
|
21
19
|
{
|
22
20
|
synchronized(m_mxObjectNotify)
|
@@ -215,8 +213,11 @@ void CSyncNotify::onSyncSourceEnd( int nSrc, VectorPtr<CSyncSource*>& sources )
|
|
215
213
|
|
216
214
|
if ( getSync().getState() == CSyncEngine::esStop && src.m_nErrCode != RhoAppAdapter.ERR_NONE )
|
217
215
|
{
|
218
|
-
|
219
|
-
|
216
|
+
CSyncNotification* pSN = getSyncNotifyBySrc(&src);
|
217
|
+
if ( pSN != null )
|
218
|
+
fireSyncNotification(&src, true, src.m_nErrCode, "");
|
219
|
+
else
|
220
|
+
fireAllSyncNotifications(true, src.m_nErrCode, src.m_strError );
|
220
221
|
}
|
221
222
|
else
|
222
223
|
fireSyncNotification(&src, true, src.m_nErrCode, "");
|
@@ -278,22 +279,38 @@ void CSyncNotify::setSearchNotification(CSyncNotification* pNotify )
|
|
278
279
|
}
|
279
280
|
}
|
280
281
|
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
282
|
+
void CSyncNotify::showStatusPopup(const String& status)
|
283
|
+
{
|
284
|
+
LOG(INFO) + "Status: "+status;
|
285
|
+
|
286
|
+
if ( m_strStatusHide.length() == 0 )
|
287
|
+
m_strStatusHide = RhoAppAdapter.getMessageText("hide");
|
288
|
+
|
289
|
+
alert_show_status(status.c_str(), m_strStatusHide.c_str());
|
290
|
+
}
|
291
|
+
|
292
|
+
void CSyncNotify::reportSyncStatus(String status, int error, String strDetails)
|
293
|
+
{
|
294
|
+
synchronized(m_mxSyncNotifications)
|
295
|
+
{
|
296
|
+
if (/*m_syncStatusListener != null && */(isReportingEnabled() || error == RhoAppAdapter.ERR_SYNCVERSION) ) {
|
297
|
+
|
298
|
+
if ( error == RhoAppAdapter.ERR_SYNCVERSION )
|
299
|
+
{
|
300
|
+
status = RhoAppAdapter.getErrorText(error);
|
301
|
+
showStatusPopup(status);
|
302
|
+
}
|
303
|
+
else if ( isReportingEnabled() )
|
304
|
+
{
|
305
|
+
if ( strDetails.length() == 0 && error != RhoAppAdapter.ERR_NONE)
|
306
|
+
strDetails = RhoAppAdapter.getErrorText(error);
|
307
|
+
status += (strDetails.length() > 0 ? RhoAppAdapter.getMessageText("details") + strDetails: "");
|
308
|
+
|
309
|
+
//m_syncStatusListener.reportStatus( status, error);
|
310
|
+
showStatusPopup(status);
|
311
|
+
}
|
312
|
+
}
|
313
|
+
}
|
297
314
|
}
|
298
315
|
|
299
316
|
void CSyncNotify::fireBulkSyncNotification( boolean bFinish, String status, String partition, int nErrCode )
|
@@ -337,8 +354,8 @@ void CSyncNotify::fireSyncNotification( CSyncSource* src, boolean bFinish, int n
|
|
337
354
|
{
|
338
355
|
if ( !getSync().isSearch() )
|
339
356
|
{
|
340
|
-
|
341
|
-
|
357
|
+
if ( src != null && strMessage.length() == 0 )
|
358
|
+
strMessage = RhoAppAdapter.getMessageText("sync_failed_for") + (*src).getName() + ".";
|
342
359
|
|
343
360
|
reportSyncStatus(strMessage,nErrCode, (src != null ? (*src).m_strError : "") );
|
344
361
|
}
|
@@ -415,6 +432,7 @@ void CSyncNotify::doFireSyncNotification( CSyncSource* src, boolean bFinish, int
|
|
415
432
|
|
416
433
|
strBody += "error";
|
417
434
|
strBody += "&error_code=" + convertToStringA(nErrCode);
|
435
|
+
strBody += "&error_type=" + (src != null ? (*src).m_strErrorType : String());
|
418
436
|
strBody += "&error_message=";
|
419
437
|
|
420
438
|
if ( strError.length() > 0 )
|
@@ -442,7 +460,7 @@ void CSyncNotify::doFireSyncNotification( CSyncSource* src, boolean bFinish, int
|
|
442
460
|
clearNotification(src);
|
443
461
|
}
|
444
462
|
|
445
|
-
boolean CSyncNotify::callNotify(
|
463
|
+
boolean CSyncNotify::callNotify(CSyncNotification oNotify, const String& strBody )
|
446
464
|
{
|
447
465
|
if ( getSync().isNoThreadedMode() )
|
448
466
|
{
|
@@ -3,6 +3,7 @@
|
|
3
3
|
#include "common/RhoStd.h"
|
4
4
|
#include "logging/RhoLog.h"
|
5
5
|
#include "common/AutoPointer.h"
|
6
|
+
#include "common/IRhoClassFactory.h"
|
6
7
|
|
7
8
|
typedef int (*RHOC_CALLBACK)(const char* szNotify, void* callback_data);
|
8
9
|
|
@@ -54,6 +55,7 @@ private:
|
|
54
55
|
String m_strSingleObjectSrcName, m_strSingleObjectID;
|
55
56
|
Hashtable<int,int> m_hashSrcObjectCount;
|
56
57
|
boolean m_bEnableReporting;
|
58
|
+
boolean m_bEnableReportingGlobal;
|
57
59
|
|
58
60
|
static common::CMutex m_mxObjectNotify;
|
59
61
|
|
@@ -63,11 +65,19 @@ private:
|
|
63
65
|
CSyncNotification m_emptyNotify;
|
64
66
|
common::CMutex m_mxSyncNotifications;
|
65
67
|
String m_strNotifyBody;
|
68
|
+
String m_strStatusHide;
|
66
69
|
|
67
|
-
|
70
|
+
common::CAutoPtr<net::INetRequest> m_NetRequest;
|
71
|
+
|
72
|
+
net::INetRequest& getNet(){ return *m_NetRequest; }
|
68
73
|
CSyncEngine& getSync(){ return m_syncEngine; }
|
69
74
|
public:
|
70
|
-
CSyncNotify( CSyncEngine& syncEngine ) : m_syncEngine(syncEngine), m_bEnableReporting(false)
|
75
|
+
CSyncNotify( CSyncEngine& syncEngine ) : m_syncEngine(syncEngine), m_bEnableReporting(false),
|
76
|
+
m_bEnableReportingGlobal(false){}
|
77
|
+
|
78
|
+
void setFactory(common::IRhoClassFactory* factory){
|
79
|
+
m_NetRequest = factory->createNetRequest();
|
80
|
+
}
|
71
81
|
|
72
82
|
//Object notifications
|
73
83
|
void fireObjectsNotification();
|
@@ -98,14 +108,16 @@ public:
|
|
98
108
|
|
99
109
|
void callLoginCallback(const CSyncNotification& oNotify, int nErrCode, String strMessage);
|
100
110
|
|
111
|
+
boolean isReportingEnabled(){return m_bEnableReporting&&m_bEnableReportingGlobal;}
|
101
112
|
void enableReporting(boolean bEnable){m_bEnableReporting = bEnable;}
|
113
|
+
void enableStatusPopup(boolean bEnable){m_bEnableReportingGlobal = bEnable;}
|
102
114
|
|
103
115
|
const String& getNotifyBody(){ return m_strNotifyBody; }
|
104
116
|
void cleanNotifyBody(){ m_strNotifyBody = ""; }
|
105
117
|
|
106
118
|
void fireAllSyncNotifications( boolean bFinish, int nErrCode, String strError );
|
107
119
|
void reportSyncStatus(String status, int error, String strDetails);
|
108
|
-
|
120
|
+
void showStatusPopup(const String& status);
|
109
121
|
private:
|
110
122
|
CSyncNotification* getSyncNotifyBySrc(CSyncSource* src);
|
111
123
|
|
@@ -114,7 +126,7 @@ private:
|
|
114
126
|
|
115
127
|
void doFireSyncNotification( CSyncSource* src, boolean bFinish, int nErrCode, String strError, String strParams);
|
116
128
|
|
117
|
-
boolean callNotify(
|
129
|
+
boolean callNotify(CSyncNotification oNotify, const String& strBody );
|
118
130
|
|
119
131
|
void clearNotification(CSyncSource* src);
|
120
132
|
|
@@ -122,3 +134,5 @@ private:
|
|
122
134
|
|
123
135
|
}
|
124
136
|
}
|
137
|
+
|
138
|
+
extern "C" void alert_show_status(const char* message, const char* szHide);
|
@@ -116,7 +116,7 @@ void CSyncSource::sync()
|
|
116
116
|
CTimeInterval startTime = CTimeInterval::getCurrentTime();
|
117
117
|
//m_bIsSearch = false;
|
118
118
|
|
119
|
-
if ( isTokenFromDB() &&
|
119
|
+
if ( isTokenFromDB() && getToken() > 1 )
|
120
120
|
syncServerChanges(); //sync only server changes, which was paused before
|
121
121
|
else
|
122
122
|
{
|
@@ -229,7 +229,7 @@ void CSyncSource::doSyncClientChanges()
|
|
229
229
|
if ( !resp.isOK() )
|
230
230
|
{
|
231
231
|
getSync().setState(CSyncEngine::esStop);
|
232
|
-
m_nErrCode = RhoAppAdapter.
|
232
|
+
m_nErrCode = RhoAppAdapter.getErrorFromResponse(resp);
|
233
233
|
}
|
234
234
|
}else
|
235
235
|
{
|
@@ -237,7 +237,7 @@ void CSyncSource::doSyncClientChanges()
|
|
237
237
|
if ( !resp.isOK() )
|
238
238
|
{
|
239
239
|
getSync().setState(CSyncEngine::esStop);
|
240
|
-
m_nErrCode = RhoAppAdapter.
|
240
|
+
m_nErrCode = RhoAppAdapter.getErrorFromResponse(resp);
|
241
241
|
}
|
242
242
|
}
|
243
243
|
}
|
@@ -413,7 +413,8 @@ void CSyncSource::syncServerChanges()
|
|
413
413
|
}
|
414
414
|
|
415
415
|
const char* szData = resp.getCharData();
|
416
|
-
|
416
|
+
//const char* szData = "[{\"version\":3},{\"token\":\"\"},{\"count\":0},{\"progress_count\":28},{\"total_count\":28},{\"source-error\":{\"login-error\":{\"message\":\"s currently connected from another machine\"}}}]";
|
417
|
+
//const char* szData = "[{\"version\":3},{\"token\":\"\"},{\"count\":0},{\"progress_count\":0},{\"total_count\":0},{\"create-error\":{\"0_broken_object_id\":{\"name\":\"wrongname\",\"an_attribute\":\"error create\"},\"0_broken_object_id-error\":{\"message\":\"error create\"}}}]";
|
417
418
|
//const char* szData = "[{\"version\":3},{\"token\":\"35639160294387\"},{\"count\":3},{\"progress_count\":0},{\"total_count\":3},{\"metadata\":\"{\\\"foo\\\":\\\"bar\\\"}\",\"insert\":{\"1\":{\"price\":\"199.99\",\"brand\":\"Apple\",\"name\":\"iPhone\"}}}]";
|
418
419
|
|
419
420
|
//LOG(INFO) + szData;
|
@@ -423,9 +424,15 @@ void CSyncSource::syncServerChanges()
|
|
423
424
|
|
424
425
|
processServerResponse_ver3(oJsonArr);
|
425
426
|
|
427
|
+
if (getSync().getSourceOptions().getBoolProperty(getID(), "pass_through"))
|
428
|
+
processToken(0);
|
429
|
+
|
426
430
|
if ( getToken() == 0 )
|
427
431
|
break;
|
428
432
|
}
|
433
|
+
|
434
|
+
if ( getSync().isSchemaChanged() )
|
435
|
+
getSync().stopSync();
|
429
436
|
}
|
430
437
|
|
431
438
|
void CSyncSource::processServerResponse_ver3(CJSONArrayIterator& oJsonArr)
|
@@ -485,15 +492,6 @@ void CSyncSource::processServerResponse_ver3(CJSONArrayIterator& oJsonArr)
|
|
485
492
|
oJsonArr.next();
|
486
493
|
}
|
487
494
|
|
488
|
-
/* if ( !oJsonArr.isEnd() && oJsonArr.getCurItem().hasName("source-error") )
|
489
|
-
{
|
490
|
-
CJSONEntry oJsonErr = oJsonArr.getCurItem().getEntry("source-error");
|
491
|
-
m_strError = oJsonErr.getString("message");
|
492
|
-
m_nErrCode = RhoAppAdapter.ERR_CUSTOMSYNCSERVER;
|
493
|
-
getSync().stopSync();
|
494
|
-
return;
|
495
|
-
}*/
|
496
|
-
|
497
495
|
//if ( getServerObjectsCount() == 0 )
|
498
496
|
// getNotify().fireSyncNotification(this, false, RhoAppAdapter.ERR_NONE, "");
|
499
497
|
|
@@ -523,11 +521,51 @@ void CSyncSource::processServerResponse_ver3(CJSONArrayIterator& oJsonArr)
|
|
523
521
|
|
524
522
|
if ( oCmds.hasName("schema-changed") )
|
525
523
|
{
|
526
|
-
getSync().stopSync();
|
527
524
|
getSync().setSchemaChanged(true);
|
525
|
+
}else if ( oCmds.hasName("source-error") )
|
526
|
+
{
|
527
|
+
CJSONEntry errSrc = oCmds.getEntry("source-error");
|
528
|
+
CJSONStructIterator errIter(errSrc);
|
529
|
+
for( ; !errIter.isEnd(); errIter.next() )
|
530
|
+
{
|
531
|
+
m_nErrCode = RhoAppAdapter.ERR_CUSTOMSYNCSERVER;
|
532
|
+
m_strError = errIter.getCurValue().getString("message");
|
533
|
+
m_strErrorType = errIter.getCurKey();
|
534
|
+
}
|
535
|
+
}else if ( oCmds.hasName("search-error") )
|
536
|
+
{
|
537
|
+
CJSONEntry errSrc = oCmds.getEntry("search-error");
|
538
|
+
CJSONStructIterator errIter(errSrc);
|
539
|
+
for( ; !errIter.isEnd(); errIter.next() )
|
540
|
+
{
|
541
|
+
m_nErrCode = RhoAppAdapter.ERR_CUSTOMSYNCSERVER;
|
542
|
+
m_strError = errIter.getCurValue().getString("message");
|
543
|
+
m_strErrorType = errIter.getCurKey();
|
544
|
+
}
|
545
|
+
}else if ( oCmds.hasName("create-error") )
|
546
|
+
{
|
547
|
+
m_nErrCode = RhoAppAdapter.ERR_CUSTOMSYNCSERVER;
|
548
|
+
m_strErrorType = "create-error";
|
549
|
+
}else if ( oCmds.hasName("update-error") )
|
550
|
+
{
|
551
|
+
m_nErrCode = RhoAppAdapter.ERR_CUSTOMSYNCSERVER;
|
552
|
+
m_strErrorType = "update-error";
|
553
|
+
}else if ( oCmds.hasName("delete-error") )
|
554
|
+
{
|
555
|
+
m_nErrCode = RhoAppAdapter.ERR_CUSTOMSYNCSERVER;
|
556
|
+
m_strErrorType = "delete-error";
|
528
557
|
}else
|
529
558
|
{
|
530
559
|
getDB().startTransaction();
|
560
|
+
|
561
|
+
if (getSync().getSourceOptions().getBoolProperty(getID(), "pass_through"))
|
562
|
+
{
|
563
|
+
if ( m_bSchemaSource )
|
564
|
+
getDB().executeSQL( (String("DELETE FROM ") + getName()).c_str() );
|
565
|
+
else
|
566
|
+
getDB().executeSQL("DELETE FROM object_values WHERE source_id=?", getID() );
|
567
|
+
}
|
568
|
+
|
531
569
|
if ( oCmds.hasName("metadata") && getSync().isContinueSync() )
|
532
570
|
{
|
533
571
|
String strMetadata = oCmds.getString("metadata");
|
@@ -7,6 +7,7 @@
|
|
7
7
|
#include "ruby/ext/rho/rhoruby.h"
|
8
8
|
#endif //RHO_NO_RUBY
|
9
9
|
#include "sync/ClientRegister.h"
|
10
|
+
#include "common/RhoAppAdapter.h"
|
10
11
|
|
11
12
|
namespace rho {
|
12
13
|
namespace sync {
|
@@ -97,20 +98,19 @@ int CSyncThread::getLastPollInterval()
|
|
97
98
|
return latestTimeUpdated > 0 ? (int)(nowTime-latestTimeUpdated) : 0;
|
98
99
|
}
|
99
100
|
|
100
|
-
void CSyncThread::
|
101
|
+
void CSyncThread::onTimeout()//throws Exception
|
101
102
|
{
|
102
103
|
if ( isNoCommands() && getPollInterval()>0 )
|
103
104
|
addQueueCommandInt(new CSyncCommand(scSyncAll,false));
|
104
|
-
|
105
|
-
CThreadQueue::processCommands();
|
106
105
|
}
|
107
106
|
|
108
107
|
void CSyncThread::checkShowStatus(CSyncCommand& oSyncCmd)
|
109
108
|
{
|
110
109
|
boolean bShowStatus = oSyncCmd.m_bShowStatus;
|
111
110
|
m_oSyncEngine.getNotify().enableReporting(bShowStatus);
|
112
|
-
|
113
|
-
|
111
|
+
if (m_oSyncEngine.getNotify().isReportingEnabled())
|
112
|
+
m_oSyncEngine.getNotify().showStatusPopup(RhoAppAdapter.getMessageText("syncronizing_data"));
|
113
|
+
//m_statusListener.createStatusPopup(RhoRuby.getMessageText("syncronizing_data"));
|
114
114
|
}
|
115
115
|
|
116
116
|
void CSyncThread::processCommand(IQueueCommand* pCmd)
|
@@ -149,8 +149,8 @@ void CSyncThread::processCommand(IQueueCommand* pCmd)
|
|
149
149
|
|
150
150
|
void CSyncThread::setPollInterval(int nInterval)
|
151
151
|
{
|
152
|
-
if ( nInterval == 0 )
|
153
|
-
m_oSyncEngine.stopSync();
|
152
|
+
// if ( nInterval == 0 )
|
153
|
+
// m_oSyncEngine.stopSync();
|
154
154
|
|
155
155
|
CThreadQueue::setPollInterval(nInterval);
|
156
156
|
}
|
@@ -214,6 +214,8 @@ unsigned long rho_sync_doSyncSource(unsigned long nSrcID,int show_status_popup)
|
|
214
214
|
|
215
215
|
void rho_sync_stop()
|
216
216
|
{
|
217
|
+
LOG(INFO)+"STOP sync";
|
218
|
+
|
217
219
|
if (CSyncThread::getSyncEngine().isSyncing() )
|
218
220
|
{
|
219
221
|
CSyncThread::getSyncEngine().stopSyncByUser();
|
@@ -262,11 +264,19 @@ unsigned long rho_sync_doSearchByNames(unsigned long ar_sources, const char *fro
|
|
262
264
|
return CSyncThread::getInstance()->getRetValue();
|
263
265
|
}
|
264
266
|
|
265
|
-
|
267
|
+
int rho_sync_set_pollinterval(int nInterval)
|
266
268
|
{
|
269
|
+
int nOldInterval = CSyncThread::getInstance()->getPollInterval();
|
267
270
|
CSyncThread::getInstance()->setPollInterval(nInterval);
|
271
|
+
|
272
|
+
return nOldInterval;
|
268
273
|
}
|
269
|
-
|
274
|
+
|
275
|
+
int rho_sync_get_pollinterval()
|
276
|
+
{
|
277
|
+
return CSyncThread::getInstance()->getPollInterval();
|
278
|
+
}
|
279
|
+
|
270
280
|
void rho_sync_set_syncserver(const char* syncserver)
|
271
281
|
{
|
272
282
|
rho_sync_stop();
|
@@ -398,4 +408,14 @@ void rho_sync_free_string(char* szStr)
|
|
398
408
|
return free(szStr);
|
399
409
|
}
|
400
410
|
|
411
|
+
void rho_sync_enable_status_popup(int b)
|
412
|
+
{
|
413
|
+
return CSyncThread::getSyncEngine().getNotify().enableStatusPopup(b == 0 ? false : true);
|
414
|
+
}
|
415
|
+
|
416
|
+
void rho_sync_set_source_property(int nSrcID, const char* szPropName, const char* szPropValue)
|
417
|
+
{
|
418
|
+
CSyncEngine::getSourceOptions().setProperty(nSrcID, szPropName, szPropValue);
|
419
|
+
}
|
420
|
+
|
401
421
|
}
|
@@ -119,7 +119,7 @@ private:
|
|
119
119
|
virtual void processCommand(IQueueCommand* pCmd);
|
120
120
|
virtual boolean isSkipDuplicateCmd() { return true; }
|
121
121
|
|
122
|
-
virtual void
|
122
|
+
virtual void onTimeout();
|
123
123
|
|
124
124
|
void checkShowStatus(CSyncCommand& oSyncCmd);
|
125
125
|
};
|
@@ -144,7 +144,7 @@ int rho_sync_logged_in();
|
|
144
144
|
void rho_sync_logout();
|
145
145
|
void rho_sync_set_notification(int source_id, const char *url, char* params);
|
146
146
|
void rho_sync_clear_notification(int source_id);
|
147
|
-
|
147
|
+
int rho_sync_set_pollinterval(int nInterval);
|
148
148
|
void rho_sync_set_syncserver(const char* syncserver);
|
149
149
|
void rho_sync_setobjectnotify_url(const char* szUrl);
|
150
150
|
void rho_sync_addobjectnotify(int nSrcID, const char* szObject);
|
@@ -164,6 +164,8 @@ unsigned long rho_sync_login_c(const char *name, const char *password, /*RHOC_CA
|
|
164
164
|
unsigned long rho_sync_doSearchByNames(unsigned long ar_sources, const char *from, const char *params, bool sync_changes, int nProgressStep, /*RHOC_CALLBACK*/void* callback, void* callback_data);
|
165
165
|
void rho_sync_set_notification_c(int source_id, /*RHOC_CALLBACK*/void* callback, void* callback_data);
|
166
166
|
|
167
|
+
void rho_sync_stop();
|
168
|
+
|
167
169
|
#ifdef __cplusplus
|
168
170
|
};
|
169
171
|
#endif //__cplusplus
|
@@ -893,6 +893,14 @@
|
|
893
893
|
RelativePath="..\..\shared\common\Tokenizer.h"
|
894
894
|
>
|
895
895
|
</File>
|
896
|
+
<File
|
897
|
+
RelativePath="..\..\shared\common\app_build_configs.c"
|
898
|
+
>
|
899
|
+
</File>
|
900
|
+
<File
|
901
|
+
RelativePath="..\..\shared\common\app_build_configs.h"
|
902
|
+
>
|
903
|
+
</File>
|
896
904
|
</Filter>
|
897
905
|
<Filter
|
898
906
|
Name="logging"
|
@@ -184,7 +184,7 @@ function fill_extensions_files(exts) {
|
|
184
184
|
}
|
185
185
|
}
|
186
186
|
|
187
|
-
function pinf(platform,es,exts,name,vendor) {
|
187
|
+
function pinf(platform,es,exts,name,vendor,show_shortcat) {
|
188
188
|
|
189
189
|
p("[Version]");
|
190
190
|
p("Signature=\"$Windows NT$\"");
|
@@ -204,7 +204,9 @@ function pinf(platform,es,exts,name,vendor) {
|
|
204
204
|
p("BuildMax=0xE0000000");
|
205
205
|
p("");
|
206
206
|
p("[DefaultInstall]");
|
207
|
-
|
207
|
+
if (show_shortcat){
|
208
|
+
p("CEShortcuts=Shortcuts");
|
209
|
+
}
|
208
210
|
p("AddReg=RegKeys");
|
209
211
|
p("CopyFiles=CopyToInstallDir"+get_copyfiles_sections(es));
|
210
212
|
p("");
|
@@ -213,23 +215,27 @@ function pinf(platform,es,exts,name,vendor) {
|
|
213
215
|
get_source_disks_names(es);
|
214
216
|
p("");
|
215
217
|
p("[SourceDisksFiles]");
|
216
|
-
p("\"
|
218
|
+
p("\"" + name + ".exe\"=1");
|
217
219
|
fill_extensions_source_disk_files(exts);
|
218
220
|
var f = get_source_disks_files(es);
|
219
221
|
p("");
|
220
222
|
p("[DestinationDirs]");
|
221
|
-
|
223
|
+
if (show_shortcat){
|
224
|
+
p("Shortcuts=0,%CE2%\Start Menu");
|
225
|
+
}
|
222
226
|
p("CopyToInstallDir=0,\"%InstallDir%\"");
|
223
227
|
get_destination_dirs(es);
|
224
228
|
p("");
|
225
229
|
p("[CopyToInstallDir]");
|
226
|
-
p("\"
|
230
|
+
p("\"" + name + ".exe\",\"" + name + ".exe\",,0");
|
227
231
|
fill_extensions_files(exts);
|
228
232
|
p("");
|
229
233
|
fill_copyfiles_sections(es,f);
|
230
|
-
|
231
|
-
|
232
|
-
|
234
|
+
if (show_shortcat){
|
235
|
+
p("");
|
236
|
+
p("[Shortcuts]");
|
237
|
+
p("\""+name+"\",0,\"" + name + ".exe\",%CE11%");
|
238
|
+
}
|
233
239
|
p("");
|
234
240
|
p("[RegKeys]");
|
235
241
|
p("");
|
@@ -248,7 +254,7 @@ function main() {
|
|
248
254
|
|
249
255
|
var es = expand_sources(sources);
|
250
256
|
var exts = expand_extensions(args(1));
|
251
|
-
pinf(args(1),es,exts,args(2),args(3));
|
257
|
+
pinf(args(1),es,exts,args(2),args(3), args(5) == "0");
|
252
258
|
|
253
259
|
output_file.Close();
|
254
260
|
}
|
data/platform/wm/build/wm.rake
CHANGED
@@ -178,11 +178,14 @@ namespace "device" do
|
|
178
178
|
desc "Build production for device or emulator"
|
179
179
|
task :production => ["config:wm","build:wm:rhobundle","build:wm:rhodes"] do
|
180
180
|
|
181
|
+
out_dir = $startdir + "/" + $vcbindir + "/#{$sdk}" + "/rhodes/Release/"
|
182
|
+
cp out_dir + "rhodes.exe", out_dir + $appname + ".exe"
|
183
|
+
|
181
184
|
chdir $builddir
|
182
185
|
|
183
186
|
cp $app_path + "/icon/icon.ico", "../rhodes/resources" if File.exists? $app_path + "/icon/icon.ico"
|
184
187
|
|
185
|
-
args = ['build_inf.js', $appname + ".inf", 'wm6', '"' + $app_config["name"] +'"', $app_config["vendor"], '"' + $srcdir + '"']
|
188
|
+
args = ['build_inf.js', $appname + ".inf", 'wm6', '"' + $app_config["name"] +'"', $app_config["vendor"], '"' + $srcdir + '"', $hidden_app]
|
186
189
|
puts Jake.run('cscript',args)
|
187
190
|
unless $? == 0
|
188
191
|
puts "Error running build_inf"
|
@@ -208,8 +211,10 @@ namespace "device" do
|
|
208
211
|
mv $appname + ".inf", $targetdir
|
209
212
|
mv $appname + ".cab", $targetdir
|
210
213
|
|
211
|
-
|
212
|
-
|
214
|
+
File.open(File.join($targetdir,"app_info.txt"), "w") { |f| f.write( $app_config["vendor"] + " " + $appname + "/" + $appname + ".exe") }
|
215
|
+
|
216
|
+
if (not $config["build"]["wmsign"].nil?) and $config["build"]["wmsign"] != ""
|
217
|
+
sign $targetdir + '/' + $appname + ".cab";
|
213
218
|
end
|
214
219
|
|
215
220
|
rm_f "cleanup.js"
|
@@ -247,7 +252,7 @@ namespace "run" do
|
|
247
252
|
task :dev => ["device:wm:production"] do
|
248
253
|
cd $startdir + "/res/build-tools"
|
249
254
|
detool = "detool.exe"
|
250
|
-
args = [ 'dev', $appname, $srcdir, $startdir + "/" + $vcbindir + "/#{$sdk}" + "/rhodes/Release/
|
255
|
+
args = [ 'dev', $appname, $srcdir, $startdir + "/" + $vcbindir + "/#{$sdk}" + "/rhodes/Release/" + $appname + ".exe" ]
|
251
256
|
puts "\nStarting application on the device"
|
252
257
|
puts "Please, connect you device via ActiveSync.\n\n"
|
253
258
|
Jake.run(detool,args)
|
@@ -257,7 +262,7 @@ namespace "run" do
|
|
257
262
|
task :emu => ["device:wm:production"] do
|
258
263
|
cd $startdir + "/res/build-tools"
|
259
264
|
detool = "detool.exe"
|
260
|
-
args = [ 'emu', '"Windows Mobile 6 Professional Emulator"', $appname, $srcdir, $startdir + "/" + $vcbindir + "/#{$sdk}" + "/rhodes/Release/
|
265
|
+
args = [ 'emu', '"Windows Mobile 6 Professional Emulator"', $appname, $srcdir, $startdir + "/" + $vcbindir + "/#{$sdk}" + "/rhodes/Release/" + $appname + ".exe" ]
|
261
266
|
puts "\nStarting application on the WM6 emulator\n\n"
|
262
267
|
Jake.run(detool,args)
|
263
268
|
end
|