NativePHP / laravel

Laravel wrapper for the NativePHP framework
https://nativephp.com
MIT License
2.96k stars 153 forks source link

Building for Windows on arm64 Mac fails #318

Open EPuigdemont opened 1 month ago

EPuigdemont commented 1 month ago

What were you trying to do?

Building the application using php artisan native:build win on an M2 based Mac system.

What happened?

The build fails when/after trying to copy the app to the dist folder. With the following output:

Copied app to resources /myapp/dist /bin/sh: /myapp/vendor/nativephp/electron/resources/js/resources/php/php: No such file or directory Error copying app to resources

How to reproduce the bug

Attempt the build command for windows on an M2 Mac.

Package Versions

0.6.3

PHP Version

8.3.7

Laravel Version

10.48.12

Node Version

21.7.3

Which operating systems have you seen this occur on?

macOS

OS version

macOS 14.4.1

Notes

I was previously able to compile targeting x64 specifically on this same machine in a previous (but unsupported for windows) version of NativePHP.

I suspect this is because it's attempting to use the php binary for mac but instead only finds the php.exe binary for windows.

Rudeisnice commented 1 month ago

Pretty sure its that change: https://github.com/NativePHP/electron/compare/0.6.1...0.6.2#diff-44e629e5c59051ad5d2a6af165861442bc6bd32288729ba6c622393718b0e0acR111