We're building a node-webkit/NW.js application for OS X and want to create a updater for the application so that it will be kept up-to-date automatically.
Because we deploy the nodeJS, css and html in a App.nw package. It's quite easy to download a new package and just replace the old one and restart the application. After searching somewhat on Google we couldn't find any way of getting the location of the App.nw package on OS X.
We deploy a node-webkit redist on OS X but we use our own CEF client for Windows. On Windows it's quite simple, you just get the NW.exe path and work your way to the App.nw from there. Is there some way of doing that on OS X?
Also it might be good to state that we're working on an older version of node-webkit, version 0.8.6. This is because a lot of native modules don't work on 0.9+ of node-webkit because they need NodeJS 0.10.
While you are running your app your can do:
var path = window.location.pathname;
path = path.substr(0, path.lastIndexOf('/'));
That will give your the full path to the app.nw.
The answer is different depending upon whether you are working in a Terminal (command line) window or from Finder.
In OS X, the nw application is called nwjs. You can look around inside the application bundle by right clicking on the application and selecting the Show Package Contents menu item. Navigate to Contents -> Resources and you will see your App.nw file or directory there.
From the command line, go to the directory containing the nwjs app. It should have the name, nwjs.app. From that directory the file (or directory) that you want is nwjs.app/Contents/Resources/App.nw
When customizing your packaged application it is perfectly ok to rename nwjs.app to your_app_name.app. So the name of the app might be something different from nwjs.app.
Related
I launched an appimage using appimagelauncher. Then, I modified some settings of that app.
I know that appimages are not installed, so it can't be uninstalled. So, I deleted the appimage file.
But, when I downlaoded the appimage again, I observed that the user's previously modified settings were still there.
Now, how can I completely remove those user modified settings and launch that software as if it were newly installed?
The AppImage format doesn't define an explicit place where the applications configuration should be installed. Which means that the application can write such file wherever they please (as a regular installed application does).
Applications usually write their configurations to "$HOME/.config", you can look there for a file or folder with the application name. You can also ask the application author or check the documentation.
I am using create react app and have an image tag that was inadvertently capitalized (tony.JPG). I did a build and successfully pushed the app to production on Heroku. However, I realized the capitalization issue and change the extension to its proper lower case (tony.jpg). However, the build file still showed with the capitalized extension. I deleted the build file and did a new build but got the same issue again. I resolved the issue by changing the img tag src but I have a lingering question. Why would react keep capitalizing the image extension even though the image file was changed to lower case and there was a new build?
I am using Node, Express, & Create React App. I've tried changed the file path in explorer directly and in my client > public > images > tony.JPG. It may be related but the build > images folder not only has the capitalized extension but has two other files (one that is tony.JPG~e5463541ef50286886de13e03dea670ef69c85c6 and another file called tony.JPG~HEAD).
Images name in public folder (tony.jpg):
Image in build folder (tony.JPG):
As #Matt-holland mentioned the type of OS matters, OSX is type insensitive if you're using it
If you run git mv tony.JPG tony.jpg it will rename it in git
So the issue was resolved when I did a hard reset on my PC. I am using Windows 10. I believe the issue is a bug as the issue resolved itself (i.e. the file name changed) after I ended up doing a hard reset on the PC. It could be an issue with my machine and/or VS. Hopefully this will help someone else that comes across the same issue.
maybe I am blind or I don't understand something right. I have created some HelloWorld-App and now I would like to test in on my device directly. (not via Visual Studios' Remote Tools)
So created my app package in VS but selected "No" for "Uploading to Windows Store" since I want to try it out localy.
The build an verification is successful and all but at the end I got a folder ("HelloWorld_1.0.1.0_Test") in the "AppPackages"-Folder. There are a couple of files. .appxbundle, .appxsym (for each architectiure one)
But if I want to install an app via the device manager it requires an .appx file. Where do I get this one?
I googled a lot, but I only found the descriptions for using the Windows Store.
Isn't it possible without it or am I missing something?
Kind Regards
Pavel
I don't know which device manager you install it through, but an appxbundle should be the fine. It's a ZIP file which includes several appx files (for several display scales, languages, ...).
But generally, inside the AppPackages folder there should be a folder like "AppName_1.0.0.0_Test". VS creates not only the appxbundle there, but also a Powershell script Add-AppDevPackage.ps1. Run it as admin and it installs the app if sideloading is enabled. This should be the easiest option to test apps on other machines without Store submissions.
I want to set auto-updates up for my apps before I release. I'm a budding programmer, so when I looked into node-webkit-updater I was pretty confused. It seems under-documented to me. Can someone explain the overall update mechanism that it helps implement?
As an alternative to node-webkit-updater, I was thinking of creating my own update system. I kinda like how Apple handles extension updates and I was thinking about replicating it. This would involve putting a JSON/XML manifest file on Amazon S3 along with the latest versions of the app for all platforms. The app checks the file at startup and replaces itself with the new version.
Is the latter sound plausible? Am I better off going with node-webkit-updater? If so, can someone explain it to me please? My app is a Mac + Windows project.
This is what we did:
The first script of the page checks a custom "manifest" (.txt file) on the server, which contains some arbitrary text, e.g. version number.
If this value differs from a local version of the manifest, then download a .zip file from server. (The zip contains the latest nwjs website. You could have a separate one for each platform).
Unzip into a local directory (we use 7za command line util).
Set window.location.href to above local directory (index.html).
I know this is a old question, but here is the answer :)
https://www.npmjs.org/package/node-webkit-updater
I am trying to create a standalone app with a resources folder that is writable. I would like to include this in the exe, similar as to how it is done on OSX with an .app. Is this possible?
Thanks!
Assuming that you're talking about a modern Windows OS you're probably going to have problems with this even if you could come up with a solution. Most apps gets put under the Program Files directory and by default only Admins have write permissions there so it's generally seen as a bad thing to store anything the app needs to write to next to the executable in Windows.