-
Notifications
You must be signed in to change notification settings - Fork 11
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
New way to require app #2
base: master
Are you sure you want to change the base?
Conversation
Also extra logging around the unlinking and renaming of the asar
But the AppPathFolder doesn't - even though it's a UNIX /, Windows normalises it to its own \
This is so ugly it hurts. You even see the DOS window, and the `> nul` redirect has no effect, so you see the "Press a key" prompt from the `timeout` command
This is to get around the fact that the prompt text from the timeout command was always being shown, even when redirecting to NUL The updater.exe is a really simple C# console app, compiled with [Mono](http://www.mono-project.com). ```` // updater.cs // // compile to updater.exe using: mcs updater.cs // // Takes two arguments; a source file and a destination file // Waits 5 seconds, then will move source to destination, as long as source exists using System; public class CommandLine { public static void Main(string[] args) { string updateAsar = ""; string appAsar = ""; // wait for the Electron app to close (5 secs) System.Threading.Thread.Sleep(5000); if (args.Length == 2) { updateAsar = args[0]; appAsar = args[1]; System.IO.FileInfo fileInfoSrc = new System.IO.FileInfo(updateAsar); System.IO.FileInfo fileInfoDest = new System.IO.FileInfo(appAsar); // the update asar doesn't exist if(!fileInfoSrc.Exists) Environment.Exit(1); if(fileInfoDest.Exists) { System.IO.File.Copy(updateAsar,appAsar, true); System.IO.File.Delete(updateAsar); } else { System.IO.File.Move(updateAsar,appAsar); } } // we need two filepaths - the update.asar and the app.asar else { Environment.Exit(1); } } } ````
@whitesmith Please merge this request :) |
@vanekj you can get updater.exe from here: jaygooby@7c56ea5 you'll need to install mono to compile it |
@AgentWS I am getting error while using electron-asar-updater as "core.require" is not a function. Any idea how to resolve it? |
No description provided.