Skip to content

Commit

Permalink
Enhanced SFX packaging task.
Browse files Browse the repository at this point in the history
It now reuses the generated 7-zip package.
  • Loading branch information
jonforums authored and luislavena committed Jul 24, 2010
1 parent 337e0ec commit 1fa05f0
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions recipes/devkit/devkit.rake
Expand Up @@ -13,20 +13,21 @@ task :devkit => ['devkit:msys', 'devkit:mingw', 'pkg'] do

# build a 7-Zip archive and/or a self-extracting archive
Dir.chdir('sandbox/devkit') do
seven_zip_build(
'*',
File.join(RubyInstaller::ROOT,
'pkg',
"DevKit-#{ENV['DKVER']}-#{Time.now.strftime('%Y%m%d')}.7z"
)
) if sevenz_archive
archive_base = "DevKit-#{ENV['DKVER']}-#{Time.now.strftime('%Y%m%d-%H%M')}"

seven_zip_build(
'*',
File.join(RubyInstaller::ROOT, 'pkg',
"DevKit-#{ENV['DKVER']}-#{Time.now.strftime('%Y%m%d')}-sfx.exe"),
:sfx => true
) if sevenz_sfx
seven_zip_build('*',
File.join(RubyInstaller::ROOT, 'pkg', "#{archive_base}.7z"))

if sevenz_sfx
Dir.chdir(RubyInstaller::ROOT) do
cmd = 'copy /b %s + %s %s' % [
'sandbox\extract_utils\7z.sfx',
"pkg\\#{archive_base}.7z",
"pkg\\#{archive_base}-sfx.exe"
]
sh "#{cmd} > NUL"
end
end

end if sevenz_archive || sevenz_sfx
end

0 comments on commit 1fa05f0

Please sign in to comment.