Skip to content

[Bug]: nativephp:publish duplicates the resources/** directory in both app.asar and app.asar.unpacked #122

@LukeTowers

Description

@LukeTowers

What happened?

Running php artisan nativephp:publish results in packages that are slightly larger than they should be because both MyApp.app/Contents/Resources/app.asar.unpacked and MyApp.app/Contents/Resources/app.asar contain the resources directory.

Additionally it would be nice to be able to hook into the build process to perform further project specific tweaks to improve package size, i.e. removing unused locales.

How to reproduce the bug

  1. Run php artisan native:publish
  2. Check the contents of MyApp.app/Contents/Resources/app.asar.unpacked and you'll see the resources directory that contains the app icons and the Laravel project folder in its entirety.
  3. Check the contents of MyApp.app/Contents/Resources/app.asar (you can use the asar utility for this, npm install -g asar, and then asar extract dist/mac-arm64/MyApp.app/Contents/Resources/app.asar dist/mac-arm64/MyApp.app/Contents/Resources/asar-unpacked-manual` and you'll see that the resources directory is also present here.

Package Version

1.0.0

PHP Version

8.2.0

Laravel Version

10.15.0

Which operating systems does with happen with?

macOS

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions