six-updater 0.20.0-x86-mswin32 → 0.21.0-x86-mswin32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +5 -3
- data/lib/six/updater.rb +38 -21
- data/lib/six/updater/mod.rb +2 -0
- metadata +21 -4
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.
|
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.
|
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.
|
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'
|
data/lib/six/updater.rb
CHANGED
@@ -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.
|
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
|
-
|
250
|
-
|
251
|
-
|
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
|
-
|
256
|
-
|
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
|
-
|
260
|
-
|
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
|
-
|
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
|
-
|
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
|
data/lib/six/updater/mod.rb
CHANGED
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
|
-
-
|
8
|
+
- 21
|
8
9
|
- 0
|
9
|
-
version: 0.
|
10
|
+
version: 0.21.0
|
10
11
|
platform: x86-mswin32
|
11
12
|
authors:
|
12
13
|
- Sickboy
|
@@ -14,16 +15,18 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-
|
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: win32-api
|
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: 11
|
27
30
|
segments:
|
28
31
|
- 1
|
29
32
|
- 4
|
@@ -35,9 +38,11 @@ dependencies:
|
|
35
38
|
name: win32-process
|
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: 7
|
41
46
|
segments:
|
42
47
|
- 0
|
43
48
|
- 6
|
@@ -49,9 +54,11 @@ dependencies:
|
|
49
54
|
name: win32-shortcut
|
50
55
|
prerelease: false
|
51
56
|
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
52
58
|
requirements:
|
53
59
|
- - ">="
|
54
60
|
- !ruby/object:Gem::Version
|
61
|
+
hash: 17
|
55
62
|
segments:
|
56
63
|
- 0
|
57
64
|
- 2
|
@@ -63,9 +70,11 @@ dependencies:
|
|
63
70
|
name: log4r
|
64
71
|
prerelease: false
|
65
72
|
requirement: &id004 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
66
74
|
requirements:
|
67
75
|
- - ">="
|
68
76
|
- !ruby/object:Gem::Version
|
77
|
+
hash: 23
|
69
78
|
segments:
|
70
79
|
- 1
|
71
80
|
- 1
|
@@ -77,9 +86,11 @@ dependencies:
|
|
77
86
|
name: six-uac
|
78
87
|
prerelease: false
|
79
88
|
requirement: &id005 !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
80
90
|
requirements:
|
81
91
|
- - ">="
|
82
92
|
- !ruby/object:Gem::Version
|
93
|
+
hash: 27
|
83
94
|
segments:
|
84
95
|
- 0
|
85
96
|
- 1
|
@@ -91,9 +102,11 @@ dependencies:
|
|
91
102
|
name: six-rsync
|
92
103
|
prerelease: false
|
93
104
|
requirement: &id006 !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
94
106
|
requirements:
|
95
107
|
- - ">="
|
96
108
|
- !ruby/object:Gem::Version
|
109
|
+
hash: 27
|
97
110
|
segments:
|
98
111
|
- 0
|
99
112
|
- 3
|
@@ -132,23 +145,27 @@ rdoc_options: []
|
|
132
145
|
require_paths:
|
133
146
|
- lib
|
134
147
|
required_ruby_version: !ruby/object:Gem::Requirement
|
148
|
+
none: false
|
135
149
|
requirements:
|
136
150
|
- - ">="
|
137
151
|
- !ruby/object:Gem::Version
|
152
|
+
hash: 3
|
138
153
|
segments:
|
139
154
|
- 0
|
140
155
|
version: "0"
|
141
156
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
|
+
none: false
|
142
158
|
requirements:
|
143
159
|
- - ">="
|
144
160
|
- !ruby/object:Gem::Version
|
161
|
+
hash: 3
|
145
162
|
segments:
|
146
163
|
- 0
|
147
164
|
version: "0"
|
148
165
|
requirements: []
|
149
166
|
|
150
167
|
rubyforge_project:
|
151
|
-
rubygems_version: 1.3.
|
168
|
+
rubygems_version: 1.3.7
|
152
169
|
signing_key:
|
153
170
|
specification_version: 3
|
154
171
|
summary: Your summary here
|