Class: Sprout::FlashPlayerConfig
- Inherits:
-
Object
- Object
- Sprout::FlashPlayerConfig
- Defined in:
- lib/sprout/flash_player_task.rb
Overview
FlashPlayerConfig Class
Constant Summary collapse
- @@file_name =
'mm.cfg'
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize ⇒ FlashPlayerConfig
constructor
A new instance of FlashPlayerConfig.
- #log ⇒ Object
Constructor Details
#initialize ⇒ FlashPlayerConfig
Returns a new instance of FlashPlayerConfig.
222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/sprout/flash_player_task.rb', line 222 def initialize osx_fp9 = File.join(User.library, 'Application Support', 'Macromedia') if(FlashPlayerTask.home == osx_fp9) @config = File.join(osx_fp9, @@file_name) else @config = File.join(User.home, @@file_name) end if(!File.exists?(@config)) write_config(@config, content) end end |
Instance Method Details
#content ⇒ Object
252 253 254 255 256 257 258 259 |
# File 'lib/sprout/flash_player_task.rb', line 252 def content return <<EOF ErrorReportingEnable=1 MaxWarnings=0 TraceOutputEnable=1 TraceOutputFileName=#{log} EOF end |
#log ⇒ Object
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/sprout/flash_player_task.rb', line 235 def log path = File.join(FlashPlayerTask.home, 'Logs', 'flashlog.txt') if(User.new().is_a?(CygwinUser)) parts = path.split("/") parts.shift() part = parts.shift() # shift cygdrive if(part != 'cygdrive') Log.puts "[WARNING] There may have been a problem writing mm.cfg, please check the path in #{@config} and make sure it's a windows path..." return path end drive = parts.shift() parts.unshift(drive.upcase + ":") path = parts.join("/") end return path end |