-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Weird MacOS binary behavior #231
Comments
Yeah, terminal window is expected for a typical binary in macOS. To Run as an app, you need to wrap your app as an app bundle. You can make a minimal app bundle by renaming |
Yeah that works. Maybe this could be added as an option to neu build? |
Yeah ideally the CLI needs to generate MSI (or another installation package), DMG, and Linux app image/Debian installer. But still, it's not implemented yet. I think we can check it after other pending stuff because there are tools to make such packages. |
Btw. @hypherionmc I saw you are contributing Neutralinojs a lot with ideas and commits. Would you like to get your name (and Github link) displayed in https://neutralino.js.org/docs/community/committers/ ? We maintain that list with top active contributors. |
I think for now, having the binaries as .app will be a good idea, because not everyone has the technical knowledge to make the binary executable |
Um yeah sure. I would to get more involved in NeutralinoJS development, but I need to spend a bit of time studying the code first to understand better how everything works. If you want, you are also welcome to include my Simple RPC editor app as a "made with neutralino" app |
Hey.. @hypherionmc I've added your Github name and link to the above page and thanks for the support. If you have some free time could you add your app to https://neutralino.js.org/apps/ by making a PR. |
Is the app supposed to show up blank on Mac OS? |
Just in case other folk are having hassles with MacOS (been trying to work out all the neutralino repos) - I tried the Neutralino CLI release download (2.7.0) but the binaries were no use to me since the mac binary is built for MacOS 11 or later and I still use MacOS 10.13 and 10.14. To rebuild the binary I needed the source download (neutralinojs repo) which has the build scripts. Using 'bash build_macos.sh' the new binary for 10.13 was built and placed in the bin folder however the executable permissions are not applied. Can be done with 'sudo chmod 755 binaryname'. Logically the permissions should be applied by the script at the point of build. I tried the NeutralinoCLI install and it appears to be used to build app binaries for release and depends on copying pre-built binaries from the bin folder (these of course are built for later MacOS). I found that placing my newly built 10.13 binary into the bin folder of the CLI install that release builds were built OK. The only hassle I have now is that the resulting binary isn't really MacOS ready. I found that a .app bundle can be manually built (normally done with a build tool of course) using - example.app Contents (root folder) MacOS Info.plist Resources (Contents folder) MacOS folder --> neutralino (binary from neutralinoCLI dist renamed) So far I can get simple web sites encapsulted as apps but having trouble getting the app structure sorted. The only real issue I have is the window won't close with the close button (quit on dock icon works great) but I'm hoping it is to do with the change in 2.7.0 and it needs to be written into js code somewhere (as per main.js in the sample). There is also a file called neu.res which I don't seem to need if the app resources are bundled in the .app package. So - looks like it is coming together and the small bundle size is a real bonus! UPDATE: there is a workround for the Resources folder issue that will allow a correct app bundle to be built. Issue neutralinojs/neutralinojs#577 outlines the workround - essentially the parameterized file is an executable that steers the app binary to the Resources folder specified. The app package will start with the parameterized executable as specified in the Info.plist file, the parameterized file will then call the app binary and designate the folder that the app resources are contained in. The res.neu file is not necessary in the mac bundle so if it is not present neutralino will then check the folder for app files eg: index.html |
still after run if this is problem for someone - would be great add this option in |
Expected Behavior
When running neu build --release and copying the dist folder to a mac machine, I expect to be able to run the app as is
Actual Behavior
The binary opens with Text Editor. To get it to run, you have to run the following command through the terminal
chmod +x appnamehere
Along with this, opening the binary also opens a terminal window that stays open, even after the app is closed. I had another mac user confirm this behavior and they've been able to replicate it
Steps to Reproduce the Problem
neu build --release
chmod +x binaryname
from a terminal inside the dist folderSpecifications
The text was updated successfully, but these errors were encountered: