Created
February 7, 2009 21:10
-
-
Save luislavena/60049 to your computer and use it in GitHub Desktop.
New RubyInstaller 7zip Bootstrap Recipe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 7zip Recipe | |
# | |
# To avoid dependency on advanced extraction tools, this recipe grabs | |
# 7zip binaries for Windows and replace the built-in extract mechanism | |
# to allow unpacking of other formats beyond Zip files. | |
# SevenZip module contains the methods that replace buit-in functionality | |
# moved into it's own file for readability. | |
require File.join(File.dirname(__FILE__), 'seven_zip') | |
OneClick::Package.new('7zip', '4.64') do | |
# download task uses OneClick::Utils.extract helper | |
download 'http://downloads.sourceforge.net/sevenzip/7za464.zip' | |
after :extract do |pkg| | |
# Supply the new executable (found inside package/version/source) | |
SevenZip.executable = File.join(pkg.source_dir, '7za.exe') | |
module OneClick::Utils | |
def self.extract(*args) | |
SevenZip.extract(*args) | |
end | |
end | |
end | |
end | |
# make '7zip' default to the version defined above | |
task '7zip' => ['7zip:4.64'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment