Sha256: eabfa0ece2d35fc3a89999723ac5f9d37bbaf2881444dae6c76d4f31048122f0

Contents?: true

Size: 1.27 KB

Versions: 24

Compression:

Stored size: 1.27 KB

Contents

desc "build Windows exe package"
task 'exe:build' => :build do
  create_build_dir('exe') do |dir|
    # create ./installers/
    FileUtils.mkdir_p "installers"
    installer_path = download_resource('http://rubyforge.org/frs/download.php/76054/rubyinstaller-1.9.3-p194.exe')
    FileUtils.cp installer_path, "installers/rubyinstaller.exe"

    variables = {
      :version => version,
      :basename => "td-#{version}",
      :outdir => ".",
    }

    # create ./td/
    mkchdir("td") do
      mkchdir('gems') do
        install_use_gems(Dir.pwd)
      end
      install_resource 'exe/td', 'bin/td', 0755
      install_resource 'exe/td.bat', 'bin/td.bat', 0755
      install_resource 'exe/td-cmd.bat', 'td-cmd.bat', 0755
    end

    # create td.iss and run Inno Setup
    install_erb_resource 'exe/td.iss', 'td.iss', 0644, variables

    inno_dir = ENV["INNO_DIR"] || 'C:/Program Files (x86)/Inno Setup 5'
    inno_bin = ENV["INNO_BIN"] || "#{inno_dir}/Compil32.exe"
    puts "INNO_BIN: #{inno_bin}"

    sh "\"#{inno_bin}\" /cc \"td.iss\""
    FileUtils.cp "td-#{version}.exe", project_root_path("pkg/td-#{version}.exe")
  end
end

desc "clean Windows exe package"
task "exe:clean" do
  FileUtils.rm_rf build_dir_path('exe')
  FileUtils.rm_rf project_root_path("exe/td-#{version}.exe")
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
td-0.10.74 dist/exe.rake
td-0.10.73 dist/exe.rake
td-0.10.72 dist/exe.rake
td-0.10.71 dist/exe.rake
td-0.10.70 dist/exe.rake
td-0.10.69 dist/exe.rake
td-0.10.68 dist/exe.rake
td-0.10.67 dist/exe.rake
td-0.10.66 dist/exe.rake
td-0.10.65 dist/exe.rake
td-0.10.64 dist/exe.rake
td-0.10.63 dist/exe.rake
td-0.10.62 dist/exe.rake
td-0.10.61 dist/exe.rake
td-0.10.60 dist/exe.rake
td-0.10.59 dist/exe.rake
td-0.10.58 dist/exe.rake
td-0.10.57 dist/exe.rake
td-0.10.56 dist/exe.rake
td-0.10.55 dist/exe.rake