marcandre / swf_fu

Rails plugin: treat your Adobe Flash swf files like any other asset (images, javascripts, etc...) and embed them using SWFObject 2.2

This URL has Read+Write access

marcandre (author)
Sat Jun 20 15:10:36 -0700 2009
commit  8401a39f90bc3e767c1279be7c5a60a9eb9841e1
tree    99e2ab0a6756d67964b6ba93a6b689a7b53c9a9a
parent  cf5a589756e964d1368cdf185dcdf13e8f3fe167
swf_fu / install.rb
100644 25 lines (19 sloc) 0.661 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require "fileutils"
 
# Some paths
src = File.dirname(__FILE__)+"/assets"
dest = File.dirname(__FILE__)+"/../../../public"
 
filename = "#{dest}/javascripts/swfobject.js"
unless File.exist?(filename)
  FileUtils.cp "#{src}/javascripts/swfobject.js", filename
  puts "Copying 'swfobject.js'"
end
 
unless File.exist?("#{dest}/swfs/")
  FileUtils.mkdir "#{dest}/swfs/"
  puts "Creating new 'swfs' directory for swf assets"
end
 
filename = "#{dest}/swfs/expressInstall.swf"
unless File.exist?(filename)
  FileUtils.cp "#{src}/swfs/expressInstall.swf", filename
  puts "Copying 'expressInstall.swf', the default flash auto-installer."
end
 
puts "Installation done."