Skip to content

Commit

Permalink
x64 Ruby can now build an installer package
Browse files Browse the repository at this point in the history
* ENV["ProgramFiles"] is affected by 64-bit File Redirection
  • Loading branch information
Azolo committed Feb 20, 2015
1 parent 9d8e5fd commit 637ddb2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions recipes/packager/inno.rake
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,14 @@ end
task :innosetup do
unless InnoSetup.present?
# if not found, add InnoSetup to the PATH
path = File.join(ENV['ProgramFiles'], 'Inno Setup 5')
path.gsub!(File::SEPARATOR, File::ALT_SEPARATOR)
path = []
[ ENV['ProgramFiles'], ENV['ProgramFiles(x86)'] ].compact.uniq.each do |env_var|
path << File.join(env_var, 'Inno Setup 5')
end
path = path.join(File::PATH_SEPARATOR).gsub(File::SEPARATOR, File::ALT_SEPARATOR)
ENV['PATH'] = "#{ENV['PATH']}#{File::PATH_SEPARATOR}#{path}"
puts ENV['PATH']
exit
end

fail "You need InnoSetup installed" unless InnoSetup.present?
Expand Down

0 comments on commit 637ddb2

Please sign in to comment.