Sha256: cd462d4fc61670a69fdaf69e92086ed9ef16051cdbe83787185e30edc19ddcbe

Contents?: true

Size: 1.4 KB

Versions: 24

Compression:

Stored size: 1.4 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('vendor/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

    zip_files(project_root_path('pkg/td-update-exe.zip'), 'td')

    # 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("pkg/td-#{version}.exe")
  FileUtils.rm_rf project_root_path("pkg/td-update-exe.zip")
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
td-0.11.1 dist/exe.rake
td-0.10.99 dist/exe.rake
td-0.10.98 dist/exe.rake
td-0.10.97 dist/exe.rake
td-0.10.96 dist/exe.rake
td-0.10.95 dist/exe.rake
td-0.10.94 dist/exe.rake
td-0.10.93 dist/exe.rake
td-0.10.92 dist/exe.rake
td-0.10.91 dist/exe.rake
td-0.10.90 dist/exe.rake
td-0.10.89 dist/exe.rake
td-0.10.88 dist/exe.rake
td-0.10.87 dist/exe.rake
td-0.10.86 dist/exe.rake
td-0.10.85 dist/exe.rake
td-0.10.84 dist/exe.rake
td-0.10.83 dist/exe.rake
td-0.10.82 dist/exe.rake
td-0.10.81 dist/exe.rake