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
@@ -88,7 +88,9 @@ namespace "config" do
88
88
  $rhobundledir = $app_path + "/RhoBundle"
89
89
  $log_file = $app_config["applog"].nil? ? "applog.txt" : $app_config["applog"]
90
90
  $srcdir = $bindir + "/RhoBundle"
91
-
91
+ $buildcfg = $app_config["buildcfg"]
92
+ $buildcfg = "Release" if $buildcfg.nil?
93
+
92
94
  if $sdk == "Windows Mobile 6 Professional SDK (ARMV4I)"
93
95
  $targetdir = $bindir + "/target/wm6p"
94
96
  else
@@ -98,6 +100,8 @@ namespace "config" do
98
100
  $tmpdir = $bindir +"/tmp"
99
101
  $vcbuild = $config["env"]["paths"]["vcbuild"]
100
102
  $vcbuild = "vcbuild" if $vcbuild.nil?
103
+ $nsis = $config["env"]["paths"]["nsis"]
104
+ $nsis = "makensis.exe" if $nsis.nil?
101
105
  $cabwiz = File.join($config["env"]["paths"]["cabwiz"], "cabwiz.exe") if $config["env"]["paths"]["cabwiz"]
102
106
  $cabwiz = "cabwiz" if $cabwiz.nil?
103
107
  $webkit_capability = !($app_config["capabilities"].nil? or $app_config["capabilities"].index("webkit_browser").nil?)
@@ -150,7 +154,7 @@ namespace "build" do
150
154
  ENV['PWD'] = $startdir
151
155
  ENV['RHO_ROOT'] = ENV['PWD']
152
156
 
153
- ENV['TARGET_TEMP_DIR'] = File.join(ENV['PWD'], "platform", 'wm', "bin", $sdk, "rhodes", $current_platform == 'wm' ? "Release" : "Debug")
157
+ ENV['TARGET_TEMP_DIR'] = File.join(ENV['PWD'], "platform", 'wm', "bin", $sdk, "rhodes", $current_platform == 'wm' ? "Release" : $buildcfg)
154
158
  ENV['TEMP_FILES_DIR'] = File.join(ENV['PWD'], "platform", 'wm', "bin", $sdk, "extensions", ext)
155
159
  ENV['VCBUILD'] = $vcbuild
156
160
  ENV['SDK'] = $sdk
@@ -203,10 +207,10 @@ namespace "build" do
203
207
  next unless File.exists? File.join(extpath, "build.bat")
204
208
 
205
209
  ENV['RHO_PLATFORM'] = 'win32'
206
- ENV['RHO_BUILD_CONFIG'] = $rhosimulator_build ? 'Release' : 'Debug'
210
+ ENV['RHO_BUILD_CONFIG'] = $rhosimulator_build ? 'Release' : $buildcfg
207
211
  ENV['PWD'] = $startdir
208
212
  ENV['RHO_ROOT'] = ENV['PWD']
209
- ENV['TARGET_TEMP_DIR'] = File.join(ENV['PWD'], "platform", "wm", "bin", "win32", "rhodes", $rhosimulator_build ? "SimulatorRelease" : "Debug")
213
+ ENV['TARGET_TEMP_DIR'] = File.join(ENV['PWD'], "platform", "wm", "bin", "win32", "rhodes", $rhosimulator_build ? "SimulatorRelease" : $buildcfg)
210
214
  ENV['TEMP_FILES_DIR'] = File.join(ENV['PWD'], "platform", "wm", "bin", "win32", "extensions", ext)
211
215
  ENV['VCBUILD'] = $vcbuild
212
216
  ENV['SDK'] = $sdk
@@ -225,7 +229,7 @@ namespace "build" do
225
229
  end
226
230
 
227
231
  task :after_bundle do
228
- win32rhopath = 'platform/wm/bin/win32/rhodes/Debug/rho/'
232
+ win32rhopath = 'platform/wm/bin/win32/rhodes/'+ $buildcfg + '/rho/'
229
233
  mkdir_p win32rhopath
230
234
  namepath = File.join(win32rhopath,"name.txt")
231
235
  old_appname = File.read(namepath) if File.exists?(namepath)
@@ -300,7 +304,7 @@ namespace "build" do
300
304
  task :win32 => ["build:win32:devrhobundle"] do
301
305
  chdir $config["build"]["wmpath"]
302
306
 
303
- args = ['/M4', $build_solution, '"debug|win32"']
307
+ args = ['/M4', $build_solution, "\"" + $buildcfg + '|win32"']
304
308
  puts "\nThe following step may take several minutes or more to complete depending on your processor speed\n\n"
305
309
  puts Jake.run($vcbuild,args)
306
310
 
@@ -600,7 +604,7 @@ namespace "run" do
600
604
  args = [' ']
601
605
  # chdir $config["build"]["wmpath"]
602
606
  # Thread.new { Jake.run("bin\\win32\\rhodes\\Debug\\rhodes", args) }
603
- Jake.run2 "bin\\win32\\rhodes\\Debug\\rhodes.exe", args, {:directory => $config["build"]["wmpath"], :nowait => true}
607
+ Jake.run2 "bin\\win32\\rhodes\\" + $buildcfg + "\\rhodes.exe", args, {:directory => $config["build"]["wmpath"], :nowait => true}
604
608
 
605
609
  $stdout.flush
606
610
  chdir $startdir
@@ -620,13 +624,13 @@ namespace "run" do
620
624
 
621
625
  namespace "win32" do
622
626
  task :delete_db do
623
- db_path = 'platform/wm/bin/win32/rhodes/Debug/rho/db'
627
+ db_path = 'platform/wm/bin/win32/rhodes/' + $buildcfg + '/rho/db'
624
628
  rm_rf db_path if File.exists?(db_path)
625
629
  end
626
630
 
627
631
  task :spec => [:delete_db, "build:win32"] do
628
632
  #remove log file
629
- win32rhopath = 'platform/wm/bin/win32/rhodes/Debug/rho/'
633
+ win32rhopath = 'platform/wm/bin/win32/rhodes/' + $buildcfg + '/rho/'
630
634
  win32logpath = File.join(win32rhopath,"RhoLog.txt")
631
635
  win32logpospath = File.join(win32rhopath,"RhoLog.txt_pos")
632
636
  win32configpath = File.join(win32rhopath,"apps/rhoconfig.txt.changes")
@@ -638,7 +642,7 @@ namespace "run" do
638
642
  start = Time.now
639
643
 
640
644
  args = [' ']
641
- Jake.run2( "bin\\win32\\rhodes\\Debug\\rhodes.exe", args, {:directory => $config["build"]["wmpath"], :nowait => false}) do |line|
645
+ Jake.run2( "bin\\win32\\rhodes\\" + $buildcfg + "\\rhodes.exe", args, {:directory => $config["build"]["wmpath"], :nowait => false}) do |line|
642
646
  Jake.process_spec_output(line)
643
647
  end
644
648
  Jake.process_spec_results(start)
@@ -659,6 +663,49 @@ namespace "run" do
659
663
  exit $failed.to_i
660
664
  end
661
665
 
666
+ desc "Build production for Motorola device"
667
+ task :production => ["build:win32"] do
668
+
669
+ out_dir = $startdir + "/" + $vcbindir + "/#{$sdk}" + "/rhodes/" + $buildcfg + "/"
670
+ puts "out_dir - " + out_dir
671
+ cp out_dir + "rhodes.exe", out_dir + $appname + ".exe"
672
+ cp out_dir + $appname + ".exe", $bindir + "/" + $appname + ".exe"
673
+
674
+ script_name = File.join($startdir, "platform", "wm", "build", "rhodes.nsi")
675
+ app_script_name = File.join($startdir, "platform", "wm", "build")
676
+ app_script_name += "/" + $appname + ".nsi"
677
+
678
+ # custumize install script for application
679
+ install_script = File.read(script_name)
680
+ install_script = install_script.gsub(/%APPNAME%/, $appname)
681
+ install_script = install_script.gsub(/%APP_EXECUTABLE%/, $appname + ".exe")
682
+ install_script = install_script.gsub(/%SECTOIN_TITLE%/, "\"This installs " + $appname + "\"")
683
+ install_script = install_script.gsub(/%SMPROGDIR%/, $appname)
684
+ install_script = install_script.gsub(/%FINISHPAGE_TEXT%/, "\"Thank you for installing " + $appname + " \\r\\n\\n\\n\"")
685
+ install_script = install_script.gsub(/%APPINSTALLDIR%/, "C:\\" + $appname)
686
+ install_script = install_script.gsub(/%APPICON%/, "rhodes.ico")
687
+ install_script = install_script.gsub(/%SCUNISTALLPATH%/, "\"$SMPROGRAMS\\" + $appname + "\\Uninstall " + $appname + ".lnk\"")
688
+ install_script = install_script.gsub(/%SCAPPPATH%/, "\"$SMPROGRAMS\\" + $appname + "\\" + $appname + ".lnk\"")
689
+ install_script = install_script.gsub(/%APPEXEPATH%/, "\"C:\\" + $appname + "\\" + $appname + ".exe\"")
690
+ install_script = install_script.gsub(/%SECTION_NAME%/, "\"" + $appname + "\"")
691
+ File.open(app_script_name, "w") { |file| file.puts install_script }
692
+
693
+ cp app_script_name, $bindir
694
+ puts "$appname - " + $appname
695
+ cp out_dir + "/" + $appname + ".exe", $bindir
696
+ cp $startdir + "/res/icons/rhodes.ico", $bindir
697
+ rm app_script_name
698
+
699
+ chdir $bindir
700
+
701
+ cp_r $srcdir, $bindir + "/rho"
702
+ puts "$nsis - " + $nsis
703
+ args = [$bindir + "/" + $appname + ".nsi"]
704
+ puts "arg = " + args.to_s
705
+ puts Jake.run2($nsis, args, {:nowait => false} )
706
+
707
+ end
708
+
662
709
  end
663
710
 
664
711
  end
@@ -327,6 +327,7 @@ HRESULT CRhodesModule::PreMessageLoop(int nShowCmd) throw()
327
327
  if ( m_strRhodesPath.length() > 0 )
328
328
  RHOSIMCONF().setString("rhodes_path", m_strRhodesPath, false );
329
329
  RHOCONF().setString( "rhosim_platform", RHOSIMCONF().getString( "platform"), false);
330
+ RHOCONF().setString( "app_version", RHOSIMCONF().getString( "app_version"), false);
330
331
  RHOSIMCONF().setString( "ext_path", RHOSIMCONF().getString( "ext_path") + CFilePath::join( m_strRhodesPath, "/lib/extensions/debugger;"), false);
331
332
  RHOSIMCONF().setString( "ext_path", RHOSIMCONF().getString( "ext_path") + CFilePath::join( m_strRhodesPath, "/lib/extensions/uri;"), false);
332
333
  RHOSIMCONF().setString( "ext_path", RHOSIMCONF().getString( "ext_path") + CFilePath::join( m_strRhodesPath, "/lib/extensions/timeout;"), false);
@@ -395,7 +396,7 @@ HRESULT CRhodesModule::PreMessageLoop(int nShowCmd) throw()
395
396
  return S_FALSE;
396
397
  }
397
398
 
398
- rho::common::CRhodesApp::Create(m_strRootPath );
399
+ rho::common::CRhodesApp::Create(m_strRootPath, m_strRootPath);
399
400
 
400
401
  DWORD dwStyle = WS_VISIBLE;
401
402
 
@@ -1305,6 +1305,7 @@
1305
1305
  OutputFile="$(OutDir)/rhosimulator.exe"
1306
1306
  LinkIncremental="2"
1307
1307
  AdditionalLibraryDirectories=""$(OutDir)";"$(QTDIR)\lib""
1308
+ AdditionalManifestDependencies="type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*';type='win32' name='Microsoft.VC80.DebugCRT' version='8.0.50727.6195' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'"
1308
1309
  GenerateDebugInformation="true"
1309
1310
  SubSystem="0"
1310
1311
  StackReserveSize="196608"
@@ -1911,6 +1912,7 @@
1911
1912
  OutputFile="$(OutDir)/rhosimulator.exe"
1912
1913
  LinkIncremental="1"
1913
1914
  AdditionalLibraryDirectories=""$(OutDir)";"$(QTDIR)\lib""
1915
+ AdditionalManifestDependencies="type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*';type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.6195' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'"
1914
1916
  GenerateDebugInformation="false"
1915
1917
  SubSystem="0"
1916
1918
  StackReserveSize="196608"
@@ -0,0 +1,20 @@
1
+ 
2
+ Microsoft Visual Studio Solution File, Format Version 9.00
3
+ # Visual Studio 2005
4
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wmdc_connect", "wmdc_connect\wmdc_connect.vcproj", "{F9AF046F-0954-4D33-9570-78F894146D1B}"
5
+ EndProject
6
+ Global
7
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
8
+ Debug|Win32 = Debug|Win32
9
+ Release|Win32 = Release|Win32
10
+ EndGlobalSection
11
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
12
+ {F9AF046F-0954-4D33-9570-78F894146D1B}.Debug|Win32.ActiveCfg = Debug|Win32
13
+ {F9AF046F-0954-4D33-9570-78F894146D1B}.Debug|Win32.Build.0 = Debug|Win32
14
+ {F9AF046F-0954-4D33-9570-78F894146D1B}.Release|Win32.ActiveCfg = Release|Win32
15
+ {F9AF046F-0954-4D33-9570-78F894146D1B}.Release|Win32.Build.0 = Release|Win32
16
+ EndGlobalSection
17
+ GlobalSection(SolutionProperties) = preSolution
18
+ HideSolutionNode = FALSE
19
+ EndGlobalSection
20
+ EndGlobal
@@ -0,0 +1,27 @@
1
+ /*------------------------------------------------------------------------
2
+ * (The MIT License)
3
+ *
4
+ * Copyright (c) 2008-2011 Rhomobile, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ *
24
+ * http://rhomobile.com
25
+ *------------------------------------------------------------------------*/
26
+
27
+ #include "stdafx.h"
@@ -0,0 +1,35 @@
1
+ /*------------------------------------------------------------------------
2
+ * (The MIT License)
3
+ *
4
+ * Copyright (c) 2008-2011 Rhomobile, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ *
24
+ * http://rhomobile.com
25
+ *------------------------------------------------------------------------*/
26
+
27
+ #pragma once
28
+
29
+ #ifndef _WIN32_WINNT
30
+ #define _WIN32_WINNT 0x0501
31
+ #endif
32
+
33
+ #include <stdio.h>
34
+ #include <tchar.h>
35
+ #include <windows.h>
@@ -0,0 +1,119 @@
1
+ /*------------------------------------------------------------------------
2
+ * (The MIT License)
3
+ *
4
+ * Copyright (c) 2008-2011 Rhomobile, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ *
24
+ * http://rhomobile.com
25
+ *------------------------------------------------------------------------*/
26
+
27
+ #include "stdafx.h"
28
+
29
+ void GenerateKey (int vk, BOOL bExtended, BOOL doDown, BOOL doUp)
30
+ {
31
+ KEYBDINPUT kb = {0};
32
+ INPUT Input = {0};
33
+
34
+ if (doDown) {
35
+ // generate down
36
+ if (bExtended)
37
+ kb.dwFlags = KEYEVENTF_EXTENDEDKEY;
38
+ kb.wVk = vk;
39
+ Input.type = INPUT_KEYBOARD;
40
+
41
+ Input.ki = kb;
42
+ ::SendInput(1,&Input,sizeof(Input));
43
+ }
44
+
45
+ if (doUp) {
46
+ // generate up
47
+ ::ZeroMemory(&kb,sizeof(KEYBDINPUT));
48
+ ::ZeroMemory(&Input,sizeof(INPUT));
49
+ kb.dwFlags = KEYEVENTF_KEYUP;
50
+ if (bExtended)
51
+ kb.dwFlags |= KEYEVENTF_EXTENDEDKEY;
52
+
53
+ kb.wVk = vk;
54
+ Input.type = INPUT_KEYBOARD;
55
+ Input.ki = kb;
56
+ ::SendInput(1,&Input,sizeof(Input));
57
+ }
58
+ }
59
+
60
+ HWND FindWMDCWindow() {
61
+ return FindWindow(NULL, L"Windows Mobile Device Center");
62
+ }
63
+
64
+ int _tmain(int argc, _TCHAR* argv[])
65
+ {
66
+ bool launched = false;
67
+ HWND hwnd;
68
+
69
+ printf("WMDC_connect v1.0 (c) 2012 Rhomobile, Inc.\n");
70
+
71
+ OSVERSIONINFOW os_version;
72
+ GetVersionEx(&os_version);
73
+ if (os_version.dwMajorVersion < 6) {
74
+ printf("This version of Windows does not use WMDC. Nothing to do.");
75
+ return 0;
76
+ }
77
+
78
+ int pass = 0;
79
+ do {
80
+ hwnd = FindWMDCWindow();
81
+ if (hwnd == 0) {
82
+ if (pass == 0) {
83
+ printf("WMDC is not running. Starting WMDC...\n");
84
+ system("start %WINDIR%\\WindowsMobile\\wmdc.exe /show");
85
+ launched = true;
86
+ } else {
87
+ printf("Waiting for WMDC...\n");
88
+ Sleep(1000);
89
+ }
90
+ }
91
+ pass++;
92
+ } while ((hwnd == 0) && (pass < 12));
93
+
94
+ if (hwnd != 0) {
95
+ printf("WMDC window found.\n");
96
+ if (launched) {
97
+ printf("Waiting for WMDC to connect to Device Emulator...\n");
98
+ Sleep(25000);
99
+ } else {
100
+ Sleep(200);
101
+ }
102
+ hwnd = FindWMDCWindow();
103
+ }
104
+ if (hwnd == 0) {
105
+ printf("ERROR: Cannot find WMDC window.\n");
106
+ return 1;
107
+ }
108
+ printf("Pushing Connect button...\n");
109
+ SetForegroundWindow(hwnd);
110
+ SetFocus(hwnd);
111
+ LockSetForegroundWindow(LSFW_LOCK);
112
+ Sleep(100);
113
+ GenerateKey(VK_MENU, TRUE, TRUE, FALSE);
114
+ GenerateKey('C', FALSE, TRUE, TRUE);
115
+ GenerateKey(VK_MENU, TRUE, FALSE, TRUE);
116
+ LockSetForegroundWindow(LSFW_UNLOCK);
117
+
118
+ return 0;
119
+ }
@@ -0,0 +1,205 @@
1
+ <?xml version="1.0" encoding="windows-1251"?>
2
+ <VisualStudioProject
3
+ ProjectType="Visual C++"
4
+ Version="8.00"
5
+ Name="wmdc_connect"
6
+ ProjectGUID="{F9AF046F-0954-4D33-9570-78F894146D1B}"
7
+ RootNamespace="wmdc_connect"
8
+ Keyword="Win32Proj"
9
+ >
10
+ <Platforms>
11
+ <Platform
12
+ Name="Win32"
13
+ />
14
+ </Platforms>
15
+ <ToolFiles>
16
+ </ToolFiles>
17
+ <Configurations>
18
+ <Configuration
19
+ Name="Debug|Win32"
20
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21
+ IntermediateDirectory="$(ConfigurationName)"
22
+ ConfigurationType="1"
23
+ CharacterSet="1"
24
+ >
25
+ <Tool
26
+ Name="VCPreBuildEventTool"
27
+ />
28
+ <Tool
29
+ Name="VCCustomBuildTool"
30
+ />
31
+ <Tool
32
+ Name="VCXMLDataGeneratorTool"
33
+ />
34
+ <Tool
35
+ Name="VCWebServiceProxyGeneratorTool"
36
+ />
37
+ <Tool
38
+ Name="VCMIDLTool"
39
+ />
40
+ <Tool
41
+ Name="VCCLCompilerTool"
42
+ Optimization="0"
43
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
44
+ MinimalRebuild="true"
45
+ BasicRuntimeChecks="3"
46
+ RuntimeLibrary="3"
47
+ UsePrecompiledHeader="0"
48
+ WarningLevel="3"
49
+ Detect64BitPortabilityProblems="true"
50
+ DebugInformationFormat="4"
51
+ />
52
+ <Tool
53
+ Name="VCManagedResourceCompilerTool"
54
+ />
55
+ <Tool
56
+ Name="VCResourceCompilerTool"
57
+ />
58
+ <Tool
59
+ Name="VCPreLinkEventTool"
60
+ />
61
+ <Tool
62
+ Name="VCLinkerTool"
63
+ LinkIncremental="2"
64
+ GenerateDebugInformation="true"
65
+ SubSystem="1"
66
+ TargetMachine="1"
67
+ />
68
+ <Tool
69
+ Name="VCALinkTool"
70
+ />
71
+ <Tool
72
+ Name="VCManifestTool"
73
+ />
74
+ <Tool
75
+ Name="VCXDCMakeTool"
76
+ />
77
+ <Tool
78
+ Name="VCBscMakeTool"
79
+ />
80
+ <Tool
81
+ Name="VCFxCopTool"
82
+ />
83
+ <Tool
84
+ Name="VCAppVerifierTool"
85
+ />
86
+ <Tool
87
+ Name="VCWebDeploymentTool"
88
+ />
89
+ <Tool
90
+ Name="VCPostBuildEventTool"
91
+ />
92
+ </Configuration>
93
+ <Configuration
94
+ Name="Release|Win32"
95
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
96
+ IntermediateDirectory="$(ConfigurationName)"
97
+ ConfigurationType="1"
98
+ CharacterSet="1"
99
+ WholeProgramOptimization="1"
100
+ >
101
+ <Tool
102
+ Name="VCPreBuildEventTool"
103
+ />
104
+ <Tool
105
+ Name="VCCustomBuildTool"
106
+ />
107
+ <Tool
108
+ Name="VCXMLDataGeneratorTool"
109
+ />
110
+ <Tool
111
+ Name="VCWebServiceProxyGeneratorTool"
112
+ />
113
+ <Tool
114
+ Name="VCMIDLTool"
115
+ />
116
+ <Tool
117
+ Name="VCCLCompilerTool"
118
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
119
+ RuntimeLibrary="2"
120
+ UsePrecompiledHeader="0"
121
+ WarningLevel="3"
122
+ Detect64BitPortabilityProblems="true"
123
+ DebugInformationFormat="3"
124
+ />
125
+ <Tool
126
+ Name="VCManagedResourceCompilerTool"
127
+ />
128
+ <Tool
129
+ Name="VCResourceCompilerTool"
130
+ />
131
+ <Tool
132
+ Name="VCPreLinkEventTool"
133
+ />
134
+ <Tool
135
+ Name="VCLinkerTool"
136
+ LinkIncremental="1"
137
+ GenerateDebugInformation="true"
138
+ SubSystem="1"
139
+ OptimizeReferences="2"
140
+ EnableCOMDATFolding="2"
141
+ TargetMachine="1"
142
+ />
143
+ <Tool
144
+ Name="VCALinkTool"
145
+ />
146
+ <Tool
147
+ Name="VCManifestTool"
148
+ />
149
+ <Tool
150
+ Name="VCXDCMakeTool"
151
+ />
152
+ <Tool
153
+ Name="VCBscMakeTool"
154
+ />
155
+ <Tool
156
+ Name="VCFxCopTool"
157
+ />
158
+ <Tool
159
+ Name="VCAppVerifierTool"
160
+ />
161
+ <Tool
162
+ Name="VCWebDeploymentTool"
163
+ />
164
+ <Tool
165
+ Name="VCPostBuildEventTool"
166
+ />
167
+ </Configuration>
168
+ </Configurations>
169
+ <References>
170
+ </References>
171
+ <Files>
172
+ <Filter
173
+ Name="Source Files"
174
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176
+ >
177
+ <File
178
+ RelativePath=".\stdafx.cpp"
179
+ >
180
+ </File>
181
+ <File
182
+ RelativePath=".\wmdc_connect.cpp"
183
+ >
184
+ </File>
185
+ </Filter>
186
+ <Filter
187
+ Name="Header Files"
188
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
189
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190
+ >
191
+ <File
192
+ RelativePath=".\stdafx.h"
193
+ >
194
+ </File>
195
+ </Filter>
196
+ <Filter
197
+ Name="Resource Files"
198
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
199
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
200
+ >
201
+ </Filter>
202
+ </Files>
203
+ <Globals>
204
+ </Globals>
205
+ </VisualStudioProject>