six-updater 0.20.0 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -13,13 +13,14 @@ require 'rake/testtask'
13
13
  spec = Gem::Specification.new do |s|
14
14
  s.platform = "x86-mingw32"
15
15
  s.name = 'six-updater'
16
- s.version = '0.20.0'
16
+ s.version = '0.21.0'
17
17
  s.has_rdoc = true
18
18
  s.extra_rdoc_files = ['README', 'LICENSE']
19
19
  s.summary = 'Your summary here'
20
20
  s.description = s.summary
21
21
  s.author = 'Sickboy'
22
22
  s.email = 'sb@dev-heaven.net'
23
+ #s.add_dependency('faster_require', '>= 0.5.2')
23
24
  s.add_dependency('win32-api', '= 1.4.6')
24
25
  s.add_dependency('win32-process', '>= 0.6.0')
25
26
  s.add_dependency('win32-shortcut', '>= 0.2.3')
@@ -35,13 +36,14 @@ end
35
36
  spec3 = Gem::Specification.new do |s|
36
37
  s.platform = "x86-mswin32"
37
38
  s.name = 'six-updater'
38
- s.version = '0.20.0'
39
+ s.version = '0.21.0'
39
40
  s.has_rdoc = true
40
41
  s.extra_rdoc_files = ['README', 'LICENSE']
41
42
  s.summary = 'Your summary here'
42
43
  s.description = s.summary
43
44
  s.author = 'Sickboy'
44
45
  s.email = 'sb@dev-heaven.net'
46
+ #s.add_dependency('faster_require', '>= 0.5.2')
45
47
  s.add_dependency('win32-api', '= 1.4.6')
46
48
  s.add_dependency('win32-process', '>= 0.6.0')
47
49
  s.add_dependency('win32-shortcut', '>= 0.2.3')
@@ -56,7 +58,7 @@ end
56
58
 
57
59
  spec2 = Gem::Specification.new do |s|
58
60
  s.name = 'six-updater'
59
- s.version = '0.20.0'
61
+ s.version = '0.21.0'
60
62
  s.has_rdoc = true
61
63
  s.extra_rdoc_files = ['README', 'LICENSE']
62
64
  s.summary = 'Your summary here'
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
-
2
+ #begin; require 'faster_require'; rescue LoadError; end if RUBY_PLATFORM =~ /cygwin|mingw|win32/
3
3
  require 'yaml'
4
4
  require 'fileutils'
5
5
 
@@ -39,7 +39,7 @@ end
39
39
  module Six
40
40
  # TODO: Evaluate if this module should be a class instead?
41
41
  module Updater
42
- VERSION = '0.20.0'
42
+ VERSION = '0.21.0'
43
43
  COMPONENT = 'six-updater'
44
44
  LOG_LIMIT = 9999
45
45
 
@@ -135,7 +135,6 @@ module Six
135
135
  # Create config hash with default settings
136
136
  @config = Hash.new
137
137
  @config[:app_params] = '-noSplash -noFilePatching -showScriptErrors'
138
- @config[:app_exe] = 'arma2.exe'
139
138
  @config[:depth] = 1
140
139
  @config[:folders] = []
141
140
  @config[:server] = Hash.new
@@ -236,34 +235,52 @@ module Six
236
235
  # Parses CLI Parameters, merges configuration and gets todo list
237
236
  parse_options
238
237
 
239
- # Backwards compatibility
240
- @config[:app_path] = @config[:armapath] if @config[:armapath]
241
- @config[:app_exe] = @config[:armaexe] if @config[:armaexe]
242
- @config[:app_params] = @config[:armaparams] if @config[:armaparams]
243
- #@config[:git_path] = @config[:gitpath] if @config[:gitpath]
244
-
245
238
  # Determine arma distribution and location
246
239
  case RUBY_PLATFORM
247
240
  when /-mingw32$/, /-mswin32$/
248
-
249
- unless @config[:app_path]
250
- begin
251
- @config[:app_path] = Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, ARMA2_STEAM[0])[ARMA2_STEAM[1]]
252
- log.info "ArmA 2 Steam Distribution detected"
253
- rescue
241
+ rpath = nil
242
+ distro = "UNKNOWN"
243
+ ex = "arma2oa.exe"
244
+ unless @config[:app_path]
254
245
  begin
255
- @config[:app_path] = Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, ARMA2_ALT[0])[ARMA2_ALT[1]]
256
- log.info "ArmA 2 Alt Distribution detected"
246
+ rpath = Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, ARMA2_STEAM[0] + " OA")[ARMA2_STEAM[1]]
247
+ distro = "OA STEAM"
257
248
  rescue
258
249
  begin
259
- @config[:app_path] = Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, ARMA2[0])[ARMA2[1]]
260
- log.info "ArmA 2 Standard Distribution detected"
250
+ rpath = Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, ARMA2_ALT[0] + " OA")[ARMA2_ALT[1]]
251
+ distro = "OA ALT"
261
252
  rescue
262
- log.warn "No (known) ArmA 2 Distribution detected"
253
+ begin
254
+ rpath = Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, ARMA2[0] + " OA")[ARMA2[1]]
255
+ distro = "OA STANDARD"
256
+ rescue
257
+ begin
258
+ rpath = Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, ARMA2_STEAM[0])[ARMA2_STEAM[1]]
259
+ distro = "A2 STEAM"
260
+ ex = "arma2.exe"
261
+ rescue
262
+ begin
263
+ rpath = Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, ARMA2_ALT[0])[ARMA2_ALT[1]]
264
+ distro = "A2 ALT"
265
+ ex = "arma2.exe"
266
+ rescue
267
+ begin
268
+ rpath = Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, ARMA2[0])[ARMA2[1]]
269
+ distro = "A2 STANDARD"
270
+ ex = "arma2.exe"
271
+ rescue
272
+ end
273
+ end
274
+ end
275
+ end
263
276
  end
264
277
  end
278
+ @config[:app_path] = rpath if rpath
279
+ log.info "#{distro} Distribution detected"
265
280
  end
266
- end
281
+ @config[:app_exe] = ex unless @config[:app_exe]
282
+ else
283
+ @config[:app_exe] = "arma2oa.exe" unless @config[:app_exe]
267
284
  end
268
285
 
269
286
  # Verify installation folder
@@ -109,6 +109,8 @@ module Six
109
109
 
110
110
  # Convert process
111
111
  def convert
112
+ return if self.disabled?
113
+ return if self.skip?
112
114
  if @installed
113
115
  log.warn "Already a six-updater repository, not converting."
114
116
  else
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: six-updater
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 75
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
- - 20
8
+ - 21
8
9
  - 0
9
- version: 0.20.0
10
+ version: 0.21.0
10
11
  platform: ruby
11
12
  authors:
12
13
  - Sickboy
@@ -14,16 +15,18 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-05-23 00:00:00 +02:00
18
+ date: 2010-07-11 00:00:00 +02:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
22
  name: log4r
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - ">="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 23
27
30
  segments:
28
31
  - 1
29
32
  - 1
@@ -35,9 +38,11 @@ dependencies:
35
38
  name: six-rsync
36
39
  prerelease: false
37
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
38
42
  requirements:
39
43
  - - ">="
40
44
  - !ruby/object:Gem::Version
45
+ hash: 15
41
46
  segments:
42
47
  - 0
43
48
  - 4
@@ -76,23 +81,27 @@ rdoc_options: []
76
81
  require_paths:
77
82
  - lib
78
83
  required_ruby_version: !ruby/object:Gem::Requirement
84
+ none: false
79
85
  requirements:
80
86
  - - ">="
81
87
  - !ruby/object:Gem::Version
88
+ hash: 3
82
89
  segments:
83
90
  - 0
84
91
  version: "0"
85
92
  required_rubygems_version: !ruby/object:Gem::Requirement
93
+ none: false
86
94
  requirements:
87
95
  - - ">="
88
96
  - !ruby/object:Gem::Version
97
+ hash: 3
89
98
  segments:
90
99
  - 0
91
100
  version: "0"
92
101
  requirements: []
93
102
 
94
103
  rubyforge_project:
95
- rubygems_version: 1.3.6
104
+ rubygems_version: 1.3.7
96
105
  signing_key:
97
106
  specification_version: 3
98
107
  summary: Your summary here