Skip to content

Compressing .app MacOS application into a ZIP #111

@Ancez

Description

@Ancez

Hi, I tried using zipline to zip up a MacOS .app application, but, it's treating it as a folder and is failing to produce a ZIP with a valid app.

When I extract the .app from the zip, the Icon? filesize is 0 and the app can't be opened.

I tried zipping it up using the code below but it produces a corrupted application:

  def all_files_and_dirs(base)
    Dir.glob("#{base}/**/*", File::FNM_DOTMATCH).reject { |f| f =~ /\/\.\.?$/ }
  end

*all_files_and_dirs(ndf_base_path.join('myapp.app')).collect do |file|
   if File.file?(file)
     [
       StringIO.new(File.binread(file)),
       file.sub(ndf_base_path.join('Stornaway NDF Player v1.app').to_s, ''),
     ]
   elsif File.directory?(file)
     [StringIO.new, file.sub(ndf_base_path.join('Stornaway NDF Player v1.app').to_s, '') + '/.keep']
  end
end,

Is this doable using zipline or zip_kit?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions