Sha256: 65eb9a9b268ac54705c6ac230338959eaa9557d7f16a5f85ce1b9efbd3f9818d
Contents?: true
Size: 1.17 KB
Versions: 2
Compression:
Stored size: 1.17 KB
Contents
require 'furoshiki/base_app' require 'zip' module Furoshiki class WindowsApp < BaseApp private def app_name "#{config.name}-windows" end def archive_name "#{app_name}.zip" end def template_basename 'windows-app-template' end def latest_template_version '0.0.1' end def remote_template_url "https://github.com/shoes/windows-app-templates/releases/download/v#{latest_template_version}/windows-app-template-#{latest_template_version}.zip" end def inject_jar jar_path = ensure_jar_exists cp Pathname.new(jar_path), File.join(tmp_app_path, "app.jar") end def after_built mv File.join(tmp_app_path, "app.bat"), File.join(tmp_app_path, "#{config.name}.bat") end def tmp_app_path tmp.join "#{template_basename}" end def create_archive(source_path) dest = package_dir.join(archive_name) rm_f dest ::Zip::File.open(dest, ::Zip::File::CREATE) do |zipfile| tmp_files.each do |source_item| dest_item = source_item.sub(source_path.to_s, app_name) zipfile.add(dest_item, source_item) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
furoshiki-0.6.1 | lib/furoshiki/windows_app.rb |
furoshiki-0.6.0 | lib/furoshiki/windows_app.rb |