rhodes 3.3.2.beta.1 → 3.3.2.beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. data/Manifest.txt +5 -5
  2. data/Rakefile +1 -1
  3. data/doc/build.txt +27 -1
  4. data/doc/device-caps.txt +65 -18
  5. data/doc/install.txt +5 -3
  6. data/lib/extensions/barcode/ext/barcode/platform/wm/Barcode.sln +30 -0
  7. data/lib/extensions/barcode/ext/barcode/platform/wm/Barcode.vcproj +159 -5
  8. data/lib/extensions/barcode/ext/barcode/platform/wm/Rakefile +1 -1
  9. data/lib/extensions/digest-md5/ext/Rakefile +2 -2
  10. data/lib/extensions/digest-md5/ext/digest-md5.sln +44 -0
  11. data/lib/extensions/digest-sha1/ext/Rakefile +2 -2
  12. data/lib/extensions/digest-sha1/ext/digest-sha1.sln +44 -0
  13. data/lib/framework/rho/rhofsconnector.rb +9 -6
  14. data/lib/framework/rhom/rhom_db_adapter.rb +10 -0
  15. data/platform/android/Rhodes/jni/src/logconf.cpp +5 -0
  16. data/platform/android/Rhodes/jni/src/rhodesapp.cpp +7 -3
  17. data/platform/android/Rhodes/src/com/rhomobile/rhodes/BaseActivity.java +82 -37
  18. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoLogConf.java +2 -0
  19. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +8 -9
  20. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +87 -2
  21. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +77 -159
  22. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SplashScreen.java +4 -5
  23. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/GoogleMapView.java +6 -31
  24. data/platform/iphone/Classes/AppManager/AppManager.m +106 -29
  25. data/platform/iphone/Classes/Rhodes.m +27 -0
  26. data/platform/iphone/rbuild/iphone.rake +1 -1
  27. data/platform/shared/common/RhodesApp.cpp +10 -2
  28. data/platform/shared/common/RhodesAppBase.cpp +20 -4
  29. data/platform/shared/common/RhodesAppBase.h +4 -0
  30. data/platform/shared/db/DBAdapter.cpp +4 -6
  31. data/platform/shared/logging/RhoLogConf.cpp +2 -7
  32. data/platform/shared/logging/RhoLogConf.h +4 -0
  33. data/platform/shared/net/HttpServer.cpp +2 -2
  34. data/platform/shared/net/RawSocket.cpp +3 -0
  35. data/platform/shared/ruby/ext/rho/rhoruby.c +7 -3
  36. data/platform/shared/ruby/ext/rho/rhoruby.h +2 -1
  37. data/platform/shared/ruby/ext/rho/rhosupport.c +9 -3
  38. data/platform/shared/ruby/ext/system/system.i +4 -0
  39. data/platform/shared/ruby/ext/system/system_wrap.c +40 -1
  40. data/platform/wm/build/wm.rake +15 -5
  41. data/platform/wm/rhodes/LogView.cpp +25 -1
  42. data/platform/wm/rhodes/LogView.h +13 -0
  43. data/platform/wm/rhodes/MainWindow.cpp +4 -0
  44. data/platform/wm/rhodes/Rhodes.cpp +1 -1
  45. data/platform/wm/rhodes/rho/rubyext/RhoSignature.cpp +240 -145
  46. data/platform/wm/rhodes/rho/rubyext/RhoSignature.h +24 -5
  47. data/platform/wm/rhodes/rho/rubyext/calendar.cpp +8 -1
  48. data/platform/wm/tools/detool/detool.cpp +88 -7
  49. data/platform/wm/tools/detool/detool.vcproj +2 -2
  50. data/platform/wm/tools/detool/stdafx.h +1 -0
  51. data/platform/wp7/RhoRubyExtGen/RhoSyncEngine.cs +2 -2
  52. data/platform/wp7/RhoRubyLib/Initializers.Generated.cs +4 -4
  53. data/platform/wp7/RhoRubyLib/common/RhodesApp.cs +8 -3
  54. data/platform/wp7/RhoRubyLib/net/HttpServer.cs +25 -6
  55. data/platform/wp7/RhoRubyLib/net/NetRequest.cs +1 -1
  56. data/platform/wp7/RhoRubyLib/rubyext/RhoSyncEngine.cs +23 -13
  57. data/platform/wp7/RhoRubyLib/sync/SyncProtocol_3.cs +6 -1
  58. data/platform/wp7/RhoRubyLib/views/RhoView.xaml.cs +33 -2
  59. data/platform/wp7/build/wp.rake +52 -0
  60. data/rakefile.rb +1 -1
  61. data/res/build-tools/detool.exe +0 -0
  62. data/res/generators/rhogen.rb +5 -0
  63. data/res/generators/templates/application/app/Settings/controller.rb +1 -1
  64. data/res/generators/templates/application/app/Settings/err_sync.erb +11 -0
  65. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/wm/Montana.sln +22 -0
  66. data/res/generators/templates/extension/extensions/montana/ext/montana/platform/wm/Rakefile +2 -2
  67. data/spec/phone_spec/app/SpecRunner/index.erb +0 -1
  68. data/spec/phone_spec/app/spec/asynchttp_spec.rb +1 -11
  69. data/spec/phone_spec/app/spec/blobsync_spec.rb +7 -2
  70. data/spec/phone_spec/app/spec/date_spec.rb +1 -1
  71. data/spec/phone_spec/app/spec/json_spec.rb +0 -3
  72. data/spec/phone_spec/app/spec/syncengine_spec.rb +6 -2
  73. data/spec/phone_spec/app/spec_runner.rb +10 -7
  74. data/version +1 -1
  75. metadata +9 -9
  76. data/platform/wm/tools/wmdc_connect/stdafx.cpp +0 -27
  77. data/platform/wm/tools/wmdc_connect/stdafx.h +0 -35
  78. data/platform/wm/tools/wmdc_connect/wmdc_connect.cpp +0 -119
  79. data/platform/wm/tools/wmdc_connect/wmdc_connect.vcproj +0 -205
  80. data/platform/wm/tools/wmdc_connect.sln +0 -20
@@ -0,0 +1,11 @@
1
+ <div data-role="page">
2
+
3
+ <div data-role="header" data-position="inline">
4
+ <h1>Sync error</h1>
5
+ </div>
6
+
7
+ <div data-role="content">
8
+ <div class="error-message"><%= @params['msg'] %></div>
9
+ </div>
10
+
11
+ </div>
@@ -0,0 +1,22 @@
1
+ 
2
+ Microsoft Visual Studio Solution File, Format Version 9.00
3
+ # Visual Studio 2005
4
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "<%= name.camel_case() %>", "<%= name.camel_case() + ".vcproj" %>", "{93453E27-E84A-40C4-BD6A-51A8373D7044}"
5
+ EndProject
6
+ Global
7
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
8
+ Debug|Windows Mobile 6 Professional SDK (ARMV4I) = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
9
+ Release|Windows Mobile 6 Professional SDK (ARMV4I) = Release|Windows Mobile 6 Professional SDK (ARMV4I)
10
+ EndGlobalSection
11
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
12
+ {93453E27-E84A-40C4-BD6A-51A8373D7044}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
13
+ {93453E27-E84A-40C4-BD6A-51A8373D7044}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
14
+ {93453E27-E84A-40C4-BD6A-51A8373D7044}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
15
+ {93453E27-E84A-40C4-BD6A-51A8373D7044}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I)
16
+ {93453E27-E84A-40C4-BD6A-51A8373D7044}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
17
+ {93453E27-E84A-40C4-BD6A-51A8373D7044}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
18
+ EndGlobalSection
19
+ GlobalSection(SolutionProperties) = preSolution
20
+ HideSolutionNode = FALSE
21
+ EndGlobalSection
22
+ EndGlobal
@@ -12,7 +12,7 @@ def build_extension(name, arch)
12
12
  if ENV['RHO_PLATFORM'] == 'wm'
13
13
  args = []
14
14
  args << "/M4"
15
- args << name + ".vcproj"
15
+ args << name + ".sln"
16
16
  args << "\"Release|#{$sdk}\""
17
17
  cmdline = "\"" + $vcbuild + "\"" + ' ' + args.join(' ')
18
18
  puts cmdline
@@ -24,7 +24,7 @@ def build_extension(name, arch)
24
24
  elsif ENV['RHO_PLATFORM'] == 'win32'
25
25
  args = []
26
26
  args << "/M4"
27
- args << name + ".vcproj"
27
+ args << name + ".sln"
28
28
  args << "\"Debug|Win32\""
29
29
  cmdline = "\"" + $vcbuild + "\"" + ' ' + args.join(' ')
30
30
  puts cmdline
@@ -5,7 +5,6 @@
5
5
  </div>
6
6
 
7
7
  <%@color = @code == 0 ? "#00ff00" : "#ff0000"%>
8
- <% unless @is_network_available %>Network is not available, only offline tests are processed!<% end %>
9
8
 
10
9
  <ul id="specrunner" title="SpecRunner" selected="true">
11
10
  <% if @msg %><li style="color:<%=@color%>" align="center"><%=@msg%></li><% end %>
@@ -8,11 +8,10 @@ describe "AsyncHttp" do
8
8
 
9
9
  file_name = File.join(Rho::RhoApplication::get_app_path('DataTemp'), 'test_log.txt')
10
10
  File.delete(file_name) if File.exists?(file_name)
11
+
11
12
  end
12
13
 
13
14
  it "should http get" do
14
- return unless $is_network_available
15
-
16
15
  res = Rho::AsyncHttp.get(
17
16
  :url => 'http://www.apache.org/licenses/LICENSE-2.0' )
18
17
 
@@ -33,13 +32,11 @@ describe "AsyncHttp" do
33
32
  end
34
33
 
35
34
  it "should http post" do
36
- return unless $is_network_available
37
35
 
38
36
  #TODO: post_test
39
37
  end
40
38
 
41
39
  it "should http download" do
42
- return unless $is_network_available
43
40
 
44
41
  file_name = File.join(Rho::RhoApplication::get_base_app_path(), 'test.jpg')
45
42
  File.delete(file_name) if File.exists?(file_name)
@@ -84,7 +81,6 @@ describe "AsyncHttp" do
84
81
  end
85
82
 
86
83
  it "should http upload" do
87
- return unless $is_network_available
88
84
 
89
85
  server = 'http://rhologs.heroku.com'
90
86
 
@@ -101,7 +97,6 @@ describe "AsyncHttp" do
101
97
  end
102
98
 
103
99
  it "should http upload" do
104
- return unless $is_network_available
105
100
 
106
101
  server = 'http://rhologs.heroku.com'
107
102
  dir_name = Rho::RhoApplication::get_app_path('DataTemp')
@@ -123,7 +118,6 @@ describe "AsyncHttp" do
123
118
  end
124
119
 
125
120
  it "should decode chunked body" do
126
- return unless $is_network_available
127
121
 
128
122
  host = SPEC_LOCAL_SERVER_HOST
129
123
  port = SPEC_LOCAL_SERVER_PORT
@@ -135,7 +129,6 @@ describe "AsyncHttp" do
135
129
  end
136
130
 
137
131
  it "should send custom command" do
138
- return unless $is_network_available
139
132
 
140
133
  res = Rho::AsyncHttp.get(
141
134
  :url => 'http://www.apache.org/licenses/LICENSE-2.0',
@@ -156,7 +149,6 @@ describe "AsyncHttp" do
156
149
  end
157
150
 
158
151
  it "should upload with body" do
159
- return unless $is_network_available
160
152
 
161
153
  server = 'http://rhologs.heroku.com'
162
154
 
@@ -180,7 +172,6 @@ describe "AsyncHttp" do
180
172
  end
181
173
 
182
174
  it "should upload miltiple" do
183
- return unless $is_network_available
184
175
 
185
176
  server = 'http://rhologs.heroku.com'
186
177
 
@@ -210,7 +201,6 @@ describe "AsyncHttp" do
210
201
  end
211
202
 
212
203
  it "should send https request" do
213
- return unless $is_network_available
214
204
 
215
205
  res = Rho::AsyncHttp.get(
216
206
  :url => 'https://rhologs.heroku.com' )
@@ -45,11 +45,14 @@ describe "BlobSync_test" do
45
45
  end
46
46
 
47
47
  it "should login" do
48
-
49
- res = ::Rho::RhoSupport::parse_query_parameters SyncEngine.login('lars', 'b', "/app/Settings/login_callback")
48
+
49
+ login_name = System.get_property('platform') + System.get_property('device_name')
50
+ res = ::Rho::RhoSupport::parse_query_parameters SyncEngine.login('login_name', '', "/app/Settings/login_callback")
50
51
  res['error_code'].to_i.should == ::Rho::RhoError::ERR_NONE
51
52
 
52
53
  SyncEngine.logged_in.should == 1
54
+
55
+ Rho::RhoConfig.bulksync_state='1'
53
56
  end
54
57
 
55
58
  it "should sync BlobTest" do
@@ -89,6 +92,7 @@ describe "BlobSync_test" do
89
92
  File.open(File.join( dst_dir, File.basename(src) ), "wb"){|f| f.write(content) }
90
93
  end
91
94
 
95
+ if !defined?(RHO_WP7)
92
96
  it "should create new BlobTest" do
93
97
  SyncEngine.logged_in.should == 1
94
98
 
@@ -158,6 +162,7 @@ describe "BlobSync_test" do
158
162
  # content_new.should == file_content
159
163
 
160
164
  end
165
+ end
161
166
 
162
167
  it "should logout" do
163
168
  SyncEngine.logout()
@@ -13,7 +13,7 @@ end
13
13
  res.year.should == 2040
14
14
  res.month.should == 8
15
15
  res.day.should == 4
16
-
16
+
17
17
  res1 = Time.parse("08/04/2040")
18
18
  res1.year.should == 2040
19
19
  res1.month.should == 4
@@ -81,7 +81,6 @@ describe "Json" do
81
81
  end
82
82
 
83
83
  it "should webservice" do
84
- return unless $is_network_available
85
84
 
86
85
  res = Rho::AsyncHttp.get( :url => 'http://rhostore.heroku.com/products.json' )
87
86
  #puts "res : #{res}"
@@ -117,7 +116,6 @@ describe "Json" do
117
116
 
118
117
  =begin
119
118
  def webservice2_test
120
- return unless $is_network_available
121
119
 
122
120
  res = Rho::AsyncHttp.get( :url => 'http://www.glutenfreechecklist.com/Mob_API/GetCat_MnfsList.aspx?checkListId=17&CategoryID=0&ManfName=&startindex=1&endindex=10' )
123
121
  puts "res : #{res}"
@@ -143,7 +141,6 @@ describe "Json" do
143
141
  end
144
142
 
145
143
  def webservice3_test
146
- return unless $is_network_available
147
144
 
148
145
  res = Rho::AsyncHttp.get( :url => 'http://api.foursquare.com/v1/venues.json?geolat=37.331689&geolong=-122.030731' )
149
146
  puts "res : #{res}"
@@ -58,7 +58,7 @@ def syncserver_url
58
58
  when /blackberry/i then 'bb'
59
59
  when /apple/i then 'iphone'
60
60
  when /symbian/i then 'symbian'
61
- when /windows/i then 'wm'
61
+ when /wp7/i then 'wp'
62
62
  end
63
63
  platform = 'win32' if System.get_property('device_name') == 'Win32'
64
64
 
@@ -97,9 +97,12 @@ describe "SyncEngine_test" do
97
97
 
98
98
  SyncEngine.set_source_property(getProduct().get_source_id.to_i(), "rho_server_response", "" )
99
99
  ::Rho::RHO.get_user_db().delete_all_from_table('changed_values')
100
+
101
+ Rho::RhoConfig.bulksync_state='1'
100
102
 
101
103
  end
102
-
104
+
105
+ if !defined?(RHO_WP7)
103
106
  it "should database_full_reset_ex raise an exception" do
104
107
  exc = false
105
108
  begin
@@ -110,6 +113,7 @@ describe "SyncEngine_test" do
110
113
 
111
114
  exc.should be_true
112
115
  end
116
+ end
113
117
 
114
118
  it "should database_full_reset_ex support different parameters" do
115
119
  Rhom::Rhom.database_full_reset_ex()
@@ -15,13 +15,17 @@ class SpecRunner < MSpecScript
15
15
  config[:files] << "spec/array/pack_spec"
16
16
 
17
17
  config[:files] << "spec/rho_spec"
18
+
19
+
18
20
  if !defined?(RHO_WP7)
19
- config[:files] << "spec/asynchttp_spec"
20
21
  config[:files] << "spec/crypt_spec"
21
22
  config[:files] << "spec/json_spec"
22
23
  config[:files] << "spec/xml_spec"
23
- config[:files] << "spec/rhofile_spec"
24
+ config[:files] << "spec/rhofile_spec"
25
+
26
+ config[:files] << "spec/asynchttp_spec"
24
27
  end
28
+
25
29
  config[:files] << "spec/date_spec"
26
30
  config[:files] << "spec/bsearch_spec"
27
31
 
@@ -45,14 +49,13 @@ end
45
49
 
46
50
  config[:files] << "spec/xruby_spec" if defined? RHO_ME
47
51
 
48
- if !defined?(RHO_WP7)
49
- config[:files] << [ "spec/syncengine_spec", [ {:schema_model=>true }, {:schema_model=>false } ] ]
50
-
51
- config[:files] << [ "spec/blobsync_spec", [ {:schema_model=>true }, {:schema_model=>false } ] ]
52
+ config[:files] << [ "spec/syncengine_spec", [ {:schema_model=>true }, {:schema_model=>false } ] ]
53
+ config[:files] << [ "spec/blobsync_spec", [ {:schema_model=>true }, {:schema_model=>false } ] ]
52
54
 
55
+ if !defined?(RHO_WP7)
53
56
  config[:files] << "spec/bulksync_spec"
54
57
  end
55
-
58
+
56
59
  if !defined?(RHO_WP7) && !(System.get_property('platform') == 'Blackberry' && (System::get_property('os_version') =~ /^6\.0/))
57
60
  config[:files] << "spec/uri_spec"
58
61
  end
data/version CHANGED
@@ -1 +1 @@
1
- 3.3.2.beta.1
1
+ 3.3.2.beta.2
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhodes
3
3
  version: !ruby/object:Gem::Version
4
- hash: 62196449
4
+ hash: 62196455
5
5
  prerelease: true
6
6
  segments:
7
7
  - 3
8
8
  - 3
9
9
  - 2
10
10
  - beta
11
- - 1
12
- version: 3.3.2.beta.1
11
+ - 2
12
+ version: 3.3.2.beta.2
13
13
  platform: ruby
14
14
  authors:
15
15
  - Rhomobile
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2012-01-24 00:00:00 -08:00
20
+ date: 2012-01-27 00:00:00 -08:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -593,6 +593,7 @@ files:
593
593
  - lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Resources/zbar-help.html
594
594
  - lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Resources/zbar-helpicons.png
595
595
  - lib/extensions/barcode/ext/barcode/platform/iphone/ZBarSDK/Resources/zbar-samples.png
596
+ - lib/extensions/barcode/ext/barcode/platform/wm/Barcode.sln
596
597
  - lib/extensions/barcode/ext/barcode/platform/wm/Barcode.vcproj
597
598
  - lib/extensions/barcode/ext/barcode/platform/wm/Rakefile
598
599
  - lib/extensions/barcode/ext/barcode/platform/wm/src/wm_imageprovider.cpp
@@ -640,6 +641,7 @@ files:
640
641
  - lib/extensions/digest-md5/ext/build
641
642
  - lib/extensions/digest-md5/ext/build.bat
642
643
  - lib/extensions/digest-md5/ext/defs.h
644
+ - lib/extensions/digest-md5/ext/digest-md5.sln
643
645
  - lib/extensions/digest-md5/ext/digest-md5.vcproj
644
646
  - lib/extensions/digest-md5/ext/iphone/Dmd5.xcodeproj/project.pbxproj
645
647
  - lib/extensions/digest-md5/ext/iphone/Dmd5_Prefix.pch
@@ -652,6 +654,7 @@ files:
652
654
  - lib/extensions/digest-sha1/ext/build
653
655
  - lib/extensions/digest-sha1/ext/build.bat
654
656
  - lib/extensions/digest-sha1/ext/defs.h
657
+ - lib/extensions/digest-sha1/ext/digest-sha1.sln
655
658
  - lib/extensions/digest-sha1/ext/digest-sha1.vcproj
656
659
  - lib/extensions/digest-sha1/ext/iphone/Dsha1.xcodeproj/project.pbxproj
657
660
  - lib/extensions/digest-sha1/ext/iphone/Dsha1_Prefix.pch
@@ -4556,11 +4559,6 @@ files:
4556
4559
  - platform/wm/tools/rhosetup/rhosetup.vcproj
4557
4560
  - platform/wm/tools/rhosetup/stdafx.cpp
4558
4561
  - platform/wm/tools/rhosetup/stdafx.h
4559
- - platform/wm/tools/wmdc_connect/stdafx.cpp
4560
- - platform/wm/tools/wmdc_connect/stdafx.h
4561
- - platform/wm/tools/wmdc_connect/wmdc_connect.cpp
4562
- - platform/wm/tools/wmdc_connect/wmdc_connect.vcproj
4563
- - platform/wm/tools/wmdc_connect.sln
4564
4562
  - platform/wp7/build/wp.rake
4565
4563
  - platform/wp7/IronRuby/bin/Silverlight3Release/IronRuby.dll
4566
4564
  - platform/wp7/IronRuby/bin/Silverlight3Release/IronRuby.Libraries.dll
@@ -4815,6 +4813,7 @@ files:
4815
4813
  - res/generators/templates/application/app/loading.html
4816
4814
  - res/generators/templates/application/app/loading.png
4817
4815
  - res/generators/templates/application/app/Settings/controller.rb
4816
+ - res/generators/templates/application/app/Settings/err_sync.erb
4818
4817
  - res/generators/templates/application/app/Settings/home.bb.erb
4819
4818
  - res/generators/templates/application/app/Settings/home.erb
4820
4819
  - res/generators/templates/application/app/Settings/index.bb.erb
@@ -4927,6 +4926,7 @@ files:
4927
4926
  - res/generators/templates/extension/extensions/montana/ext/montana/platform/iphone/Montana.xcodeproj/project.pbxproj
4928
4927
  - res/generators/templates/extension/extensions/montana/ext/montana/platform/iphone/Montana_Prefix.pch
4929
4928
  - res/generators/templates/extension/extensions/montana/ext/montana/platform/iphone/Rakefile
4929
+ - res/generators/templates/extension/extensions/montana/ext/montana/platform/wm/Montana.sln
4930
4930
  - res/generators/templates/extension/extensions/montana/ext/montana/platform/wm/Montana.vcproj
4931
4931
  - res/generators/templates/extension/extensions/montana/ext/montana/platform/wm/Rakefile
4932
4932
  - res/generators/templates/extension/extensions/montana/ext/montana/platform/wm/src/montana_wm.cpp
@@ -1,27 +0,0 @@
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"
@@ -1,35 +0,0 @@
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>
@@ -1,119 +0,0 @@
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
- }