Comments (11)
Excellent debugging, thank you! I'll take a look when I have a chance, potentially this week if I can find time after work.
from electron-builder.
Hmmm the post install script never changed, the only change was adding BundlePostInstallScriptPath
and BundlePreInstallScriptPath
keys and script names to the Info.plist. I'm not familiar with pkg
and was only provided guidance on the expected behavior, it shouldn't have changed the $2 arg though AFAICT. What is the impact of the $2 argument not working as it previously was?
If a postinstall script was open -a $2
to autolauch the app, wouldn't /Applications/electron-builder-test.app
be the correct arg?
from electron-builder.
What is the impact of the $2 argument not working as it previously was?
I am trying to access files that are placed inside the installed app folder. For that I access "${2}/electron-builder-test.app/resources/"
. It used to evaluate to "/Applications/electron-builder-test.app/resources/"
, but now it evaluates to "/Applications/electron-builder-test.app/electron-builder-test.app/resources/"
which does not exist.
If a postinstall script was open -a $2 to autolauch the app, wouldn't /Applications/electron-builder-test.app be the correct arg?
The thing is, it used to be open -a "${2}/electron-builder-test.app"
.
from electron-builder.
I still think it's expected behavior from my quick research
https://stackoverflow.com/a/11636246/3498974
$0 - Script path
$1 - Package path
$2 - Target location
$3 - Target volume`
My guess is that adding BundlePostInstallScriptPath
added the proper configuration for the postinstall script to properly run
from electron-builder.
I still think it's expected behavior from my quick research
Does it mean that all the previous versions were working incorrectly, passing /Applications
as a second argument?
from electron-builder.
That's my current hypothesis. If you look through the PR code diff, there's nothing setting the path or changing the executable script itself. Rather, it's simply scanning the install scripts directory, identifying any that are preinstall/postinstall and adding that file entry into the Info.plist. It doesn't modify the pkg scripts' arguments itself.
from electron-builder.
What is the manual step for generating .pkg file? If I try pkgbuild --root --scripts --component-plist
I will get the expected /Applications
as a second argument.
If you look through the PR code diff, there's nothing setting the path or changing the executable script itself.
The bug is not necessarily introduced by this PR, it could just be revealed now.
from electron-builder.
Ok, I think I found the real issue. It actually runs the postinstall script twice. Once for the application and once for the component specified in plist file. This seems like a bug to me.
from electron-builder.
Related Issues (20)
- NSIS ERROR HOT 1
- Failed to create dylib symbolic link on Windows HOT 5
- Setting USE_SYSTEM_7ZA environment variable breaks the build
- A JavaScript error occurred in the main process HOT 1
- Splitting nsis-web packages into chunks
- "install-app-deps" Error HOT 1
- Using MAC self signature problem
- `FlatpakOptions.files` has inconsistent type HOT 1
- Confirmation of package safty regarding to recent xz vulnerability HOT 2
- Certificates with special characters are not accepted anymore since electron-updater v1.6.9 HOT 3
- Can't build for Windows under a Windows environment using electron-builder `24.13.3` HOT 3
- Changing default install location is not respected
- productName in the electron builder is not applied.
- Building for Linux Arm64 snap will fail HOT 6
- /home/jenkins' is not owned by you, refusing to create a configuration directory there
- Build with mac M1
- nsis help HOT 5
- electron-updater and github provider doesn't work when files have spaces in them HOT 4
- help: how to change the image? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-builder.