New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS - PKG build - scripts
option can't work.
#8063
Comments
I've never built a |
@mmaietta
Suppose you have a folder structure like this.
It's correct plist file sample. <!-- setting.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>BundleHasStrictIdentifier</key>
<true/>
<key>BundleIsRelocatable</key>
<false/>
<key>BundleIsVersionChecked</key>
<true/>
<key>BundleOverwriteAction</key>
<string>upgrade</string>
<!-- here! -->
<key>BundlePostInstallScriptPath</key>
<string>postinstall.sh</string>
<!-- here! -->
<key>RootRelativeBundlePath</key>
<string>example.app</string>
</dict>
</array>
</plist> |
Is it possible to have multiple post-install scripts? In order to not break previous functionality/API, I'm wondering if we need to allow an array with different type, like below, in order for electron-builder to pick up whether to add
Or maybe we can always assume the files will be named Looking at the man page: https://www.manpagez.com/man/1/pkgbuild/
It does seem that the files will need to be named as such, but wanted to confirm with you first since I'm currently not familiar with |
Sorry, I don't really understand the detailed behavior beyond the explanation.
I'm sure the file names were fixed to
You certainly need to think about It is impossible to call another file directly from pkg file (Just a guess!), so I think that if necessary, call another file from postinstall/preinstall.sh. If you want to make it simpler, you can check the existence of the file (and check whether it is executable or not) assuming that the pre/postinstall file is located in the root of the file path specified in |
Would you be willing to test a patch via |
@mmaietta |
Nice! Already released the fix in v24.13.2 Really appreciated your detailed report and example |
electron-builder's document
It's not working as the title suggests. An issue(#7299) was created a year ago, but it is still unresolved.
As already pointed out, the cause
I am also in the same situation and came to the same conclusion after reading /app-builder-lib/src/targets/pkg.ts
The text was updated successfully, but these errors were encountered: