six-updater-web 0.21.1 → 0.21.2
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 +1 -1
- data/lib/six-updater-web/app/controllers/main_controller.rb +1 -1
- data/lib/six-updater-web/app/models/appsetting.rb +1 -1
- data/lib/six-updater-web/app/models/arma2_oa_appsetting.rb +1 -1
- data/lib/six-updater-web/app/models/sixconfig.rb +10 -3
- data/lib/six-updater-web/config/six-updater-web.rb +1 -1
- metadata +2 -2
data/Rakefile
CHANGED
@@ -264,7 +264,7 @@ class MainController < ApplicationController
|
|
264
264
|
@msg << "<br /><b>WARNING:</b> There seem to be open arma processes: #{setting.real_exe}<br />Pids: #{procs}"
|
265
265
|
end
|
266
266
|
|
267
|
-
preset.all_mods(server).each do |mod|
|
267
|
+
preset.all_mods(server, setting).each do |mod|
|
268
268
|
mod.update_version(setting.real_path) # TODO: this already runs in updater_yml, but there doesn't run if autoskip is disabled
|
269
269
|
if reset && !@autoskip
|
270
270
|
mod.skip = false
|
@@ -49,7 +49,7 @@ class Appsetting < ActiveRecord::Base
|
|
49
49
|
hash[:app_path] = self.real_path unless hash[:app_path]
|
50
50
|
hash[:app_exe] = self.real_exe unless hash[:app_exe]
|
51
51
|
if self.beta
|
52
|
-
hash[:mods] = self.found_type::DEFAULT_BETA_MODS.join(";")
|
52
|
+
hash[:mods] = self.found_type::DEFAULT_BETA_MODS.map{|e| e.gsub("/", "\\")}.join(";")
|
53
53
|
end
|
54
54
|
hash
|
55
55
|
end
|
@@ -7,7 +7,7 @@ class Arma2OaAppsetting < Arma2Appsetting
|
|
7
7
|
DEFAULT_BETA_EXE_PATH = "expansion/beta"
|
8
8
|
DEFAULT_SERVER_EXE = "arma2oaserver.exe"
|
9
9
|
DEFAULT_SERVER_EXE_PATH = DEFAULT_EXE_PATH
|
10
|
-
DEFAULT_BETA_MODS = ["expansion
|
10
|
+
DEFAULT_BETA_MODS = ["expansion/beta", "expansion/beta/expansion"]
|
11
11
|
|
12
12
|
REGKEYS = {"Arma2Oa" => ['SOFTWARE\\Bohemia Interactive Studio\\ArmA 2 OA', 'MAIN']}
|
13
13
|
|
@@ -14,10 +14,17 @@ class Sixconfig < ActiveRecord::Base
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
def all_mods(srv = self.get_server)
|
17
|
+
def all_mods(srv = self.get_server, setting = Appsetting.new)
|
18
18
|
m = []
|
19
19
|
m += srv.mods if srv
|
20
20
|
self.mods.each { |mod| m << mod unless m.include?(mod) }
|
21
|
+
if setting.beta
|
22
|
+
setting.found_type::DEFAULT_BETA_MODS.each do |mf|
|
23
|
+
mod = Mod.find_by_name(mf)
|
24
|
+
next unless mod
|
25
|
+
m << mod unless m.include?(mod)
|
26
|
+
end
|
27
|
+
end
|
21
28
|
m.each {|mod| if (mod.new_record? && !mod.exists?(self.appsetting)); mod.disabled = true; end }
|
22
29
|
ms = []
|
23
30
|
m.each {|mod| ms += mod.all_dependentmods; ms << mod }
|
@@ -94,7 +101,7 @@ class Sixconfig < ActiveRecord::Base
|
|
94
101
|
|
95
102
|
setting = Appsetting.new unless setting
|
96
103
|
|
97
|
-
self.all_mods(srv).each do |mod|
|
104
|
+
self.all_mods(srv, setting).each do |mod|
|
98
105
|
if force
|
99
106
|
mod.skip = false
|
100
107
|
else
|
@@ -130,7 +137,7 @@ class Sixconfig < ActiveRecord::Base
|
|
130
137
|
hash = setting.to_updater_yml
|
131
138
|
hash[:folders] = []
|
132
139
|
|
133
|
-
self.all_mods(srv).each do |mod|
|
140
|
+
self.all_mods(srv, setting).each do |mod|
|
134
141
|
y = mod.to_updater_yml
|
135
142
|
hash[:folders] << y unless hash[:folders].include?(y)
|
136
143
|
end
|