-
Notifications
You must be signed in to change notification settings - Fork 4
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
Why is the compilation so heavy? 🎸 #77
Comments
Ways to package your NW.js app.
If you use You should ask yourself why you care if the If you do not want your code to be readable in plain text, either use source protection (see NW.js docs) or store the files on a remote server. My guess at what is happening:
|
@TheJaredWilcurt Hi!
No problem with my source files are visible, the problem is my app will be in a USB memory stick and the .html init file icon has the system navigator icon and curious people can simply open it and then see the entire page distorted. Maybe there are a way to load into app.exe the "main" as other file that chromium recognizes but not chrome , edge, firefox ..? |
Put this in your HTML file. Then if people open it, they are redirected to the correct place and don't see anything. <!DOCTYPE html>
<html>
<head>
<script>
if (!window.nw) {
document.body.innerHTML = '<h1>To open this app, run AppName.exe</h1>';
}
</script> You can create an
This only works on Windows, but it will show the correct icon and label when you plug it in, and depending on the users settings it will either auto launch your EXE, pop open a window for the user to decide if they want to launch the EXE, or do nothing. Usually the second one. You can put all your files in a You can store all your app files in a hidden folder on the drive and just create a desktop shortcut to point to the |
On Windows.:
Compiling with "nwjs-packager" result a 504mb directory for a "hellow world" project with only a index.html 1kb file.
Also the .exe takes a long time to open.
Why?
Compiling with "nwjs-builder-phoenix" result a 146mb for the same project and the .exe open fast. Unfortunately the index.html is visible in the compilation directory ...
Any idea how to reduce the weight and slow opening ? Thanks
The text was updated successfully, but these errors were encountered: