Class: Sprout::FlashPlayerConfig
- Inherits:
-
Object
- Object
- Sprout::FlashPlayerConfig
- Defined in:
- lib/sprout/tasks/flashplayer_task.rb
Overview
FlashPlayerConfig Class
Constant Summary collapse
- @@file_name =
:nodoc:
'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.
369 370 371 372 373 374 375 376 377 378 379 380 |
# File 'lib/sprout/tasks/flashplayer_task.rb', line 369 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
399 400 401 402 403 404 405 406 |
# File 'lib/sprout/tasks/flashplayer_task.rb', line 399 def content return <<EOF ErrorReportingEnable=1 MaxWarnings=0 TraceOutputEnable=1 TraceOutputFileName=#{log} EOF end |
#log ⇒ Object
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/sprout/tasks/flashplayer_task.rb', line 382 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 |