six-updater-web 0.21.5 → 0.21.6
Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile
CHANGED
@@ -72,7 +72,8 @@ class Appsetting < ActiveRecord::Base
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def get_exe
|
75
|
-
edition = self.detect_edition
|
75
|
+
edition = self.class::SPECIFIC ? self.class : self.detect_edition
|
76
|
+
return nil unless edition
|
76
77
|
if self.server
|
77
78
|
if self.beta
|
78
79
|
edition::DEFAULT_BETA_EXE_PATH.size == 0 ? edition::DEFAULT_SERVER_EXE : "#{edition::DEFAULT_BETA_EXE_PATH}/#{edition::DEFAULT_SERVER_EXE}"
|
@@ -209,9 +210,13 @@ class Appsetting < ActiveRecord::Base
|
|
209
210
|
|
210
211
|
def detect_edition
|
211
212
|
# TODO: Read the appsetting.exe to figure out an edition, as a static setting by the user?
|
212
|
-
|
213
|
-
return nil
|
214
|
-
|
213
|
+
|
214
|
+
return nil if self.real_path.nil?
|
215
|
+
return nil unless File.directory?(self.real_path)
|
216
|
+
if self.class::SPECIFIC
|
217
|
+
return self.class if File.exists?(File.join(self.real_path, self.real_exe))
|
218
|
+
end
|
219
|
+
#return self.class if self.class::SPECIFIC
|
215
220
|
game = nil
|
216
221
|
cond = nil
|
217
222
|
ed = nil
|
@@ -1,7 +1,8 @@
|
|
1
1
|
%table{ :border => 1, :cellpadding => "5", :width => "100%"}
|
2
2
|
%tr
|
3
3
|
%td
|
4
|
-
|
4
|
+
- t = @current_setting.nice_found_type
|
5
|
+
Edition: #{link_to t ? t : "ERROR: None detected", nil, :title => "Supports mods for: #{@current_setting.found_types.map{|e| e.label}.join(", ")}" }
|
5
6
|
%br
|
6
7
|
Last sync #{@system_setting.synchronized_at ? time_ago_in_words(@system_setting.synchronized_at) + " ago" : "never"}
|
7
8
|
Gamespy #{@system_setting.gamespied_at ? time_ago_in_words(@system_setting.gamespied_at) + " ago" : "never"}
|