Module: Six::Appmanager::Appsetting
- Included in:
- Appsetting
- Defined in:
- lib/six-updater-web/vendor/plugins/six-app_manager/lib/six/appmanager.rb
Instance Method Summary collapse
- #kill! ⇒ Object
- #logfile ⇒ Object
-
#path_by_registry ⇒ Object
TODO: More generic? Instead of arma specific?.
- #process_name ⇒ Object
- #processes ⇒ Object
- #read_logfile ⇒ Object
- #real_exe ⇒ Object
- #real_logpath ⇒ Object
- #real_modpath ⇒ Object
- #real_params ⇒ Object
- #real_path ⇒ Object
- #rpt ⇒ Object
Instance Method Details
#kill! ⇒ Object
211 212 213 |
# File 'lib/six-updater-web/vendor/plugins/six-app_manager/lib/six/appmanager.rb', line 211 def kill! Six::Appmanager.kill_by_name(process_name) end |
#logfile ⇒ Object
220 221 222 223 224 225 226 |
# File 'lib/six-updater-web/vendor/plugins/six-app_manager/lib/six/appmanager.rb', line 220 def logfile if FileTest.directory? real_logpath File.join(real_logpath, rpt) if FileTest.exist?(File.join(real_logpath, rpt)) else nil end end |
#path_by_registry ⇒ Object
TODO: More generic? Instead of arma specific?
142 143 144 |
# File 'lib/six-updater-web/vendor/plugins/six-app_manager/lib/six/appmanager.rb', line 142 def path_by_registry SixUpdaterWeb::ARMA_PATH end |
#process_name ⇒ Object
191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/six-updater-web/vendor/plugins/six-app_manager/lib/six/appmanager.rb', line 191 def process_name if exe if exe[FOLDER] $2 else exe end else 'arma2.exe' end end |
#processes ⇒ Object
203 204 205 |
# File 'lib/six-updater-web/vendor/plugins/six-app_manager/lib/six/appmanager.rb', line 203 def processes Six::Appmanager.find_process(process_name) end |
#read_logfile ⇒ Object
207 208 209 |
# File 'lib/six-updater-web/vendor/plugins/six-app_manager/lib/six/appmanager.rb', line 207 def read_logfile Six::Appmanager.read_logfile logfile unless logfile.nil? end |
#real_exe ⇒ Object
146 147 148 149 150 151 152 |
# File 'lib/six-updater-web/vendor/plugins/six-app_manager/lib/six/appmanager.rb', line 146 def real_exe if exe.nil? "arma2.exe" else exe end end |
#real_logpath ⇒ Object
162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/six-updater-web/vendor/plugins/six-app_manager/lib/six/appmanager.rb', line 162 def real_logpath if logpath.nil? case RUBY_PLATFORM when /-mingw32$/, /-mswin32$/ "#{File.join(ENV['USERPROFILE'], 'appdata', 'local', 'arma 2')}" else nil end else logpath end end |
#real_modpath ⇒ Object
183 184 185 186 187 188 189 |
# File 'lib/six-updater-web/vendor/plugins/six-app_manager/lib/six/appmanager.rb', line 183 def real_modpath if self.modpath.nil? self.real_path else self.modpath end end |
#real_params ⇒ Object
154 155 156 157 158 159 160 |
# File 'lib/six-updater-web/vendor/plugins/six-app_manager/lib/six/appmanager.rb', line 154 def real_params if params.nil? "-noSplash -noFilePatching -showScriptErrors" else params end end |
#real_path ⇒ Object
175 176 177 178 179 180 181 |
# File 'lib/six-updater-web/vendor/plugins/six-app_manager/lib/six/appmanager.rb', line 175 def real_path if path.nil? path_by_registry else self.path end end |
#rpt ⇒ Object
215 216 217 218 |
# File 'lib/six-updater-web/vendor/plugins/six-app_manager/lib/six/appmanager.rb', line 215 def rpt process_name[/(.*)\./] "#{$1}.rpt" end |