I have created the app using node-webkit . But when i click on gte.exe it giving nw.js empty scree.
my JSON file is:
{
"main": "index.html",
"name": "app",
"description": "app",
"version": "0.2.3",
"nodejs": true,
"window": {
"title": "app",
"icon": "favicon.ico",
"toolbar": false,
"frame": true,
"width": 1200,
"height": 768,
"min_width": 1024,
"min_height": 768,
"resizable": true
},
"webkit" :{
"plugin":true
},
"chromium-args": "--disable-web-security --experimental-location-features --enable-geolocation --allow-file-access-from-files --allow-file-access --enable-device-policy"
}
I changed my folder into zip and changed to .nw extension. After that i ran D:\nw>copy /b nw.exe+app.nw gte.exe .
Please any one help me out
Related
Ive tried 64, 32px, 24px, 16px FAVICON.png in the same DIR as the manifest file. No luck. I also tried and ICO with ever 32bit size.
package.json
{
"main": "INDEX.html",
"name": "cacluclator",
"description": "NWJS SMART CALCULATOR",
"version": "00.00.00",
"keywords": [ "SMART CALCULATOR", "INSECURITY" ],
"window": {
"title": "SMART CALCULATOR",
"icon": "FAVICON 32.png",
"frame": false,
"toolbar": true,
"transparent": true,
"position": "center",
"height": 500,
"min_height": 500,
"max_height": 500,
"width": 400,
"min_width": 400,
"max_width": 400
},
"webkit": {
"plugin": true
}
}
I have a very peculiar issue, I have a Neutralino app built with Preact that runs perfectly fine when run with neu run, however, once I build the project (with enableServer on or off), the built application will not load anything.
With enableServer on, it will complain that it cannot connect to localhost:
"This localhost page cannot be found"
and with it off it gives me a completely white screen/DOM.
The GitHub repository is here: https://github.com/SpikeHD/XeniaLauncher
I suspect it may be the way I am building the project, but I find it weird that neu run works completely fine.
Below is my configuration:
{
"applicationId": "js.xenia_launcher.app",
"version": "1.0.0",
"defaultMode": "window",
"port": 0,
"documentRoot": "/build/",
"url": "/",
"enableServer": true,
"enableNativeAPI": true,
"tokenSecurity": "one-time",
"logging": {
"enabled": true,
"writeToLogFile": true
},
"nativeAllowList": [
"app.*",
"os.*",
"filesystem.*",
"storage.*",
"window.*",
"debug.log"
],
"modes": {
"window": {
"title": "XeniaLauncher",
"width": 1000,
"height": 800,
"minWidth": 400,
"minHeight": 200,
"fullScreen": false,
"alwaysOnTop": false,
"icon": "/resources/icons/appIcon.png",
"enableInspector": true,
"borderless": false,
"maximize": false,
"hidden": false,
"resizable": true,
"exitProcessOnClose": true
},
"browser": {},
"cloud": {
"url": "/resources/#cloud",
"nativeAllowList": [
"app.*"
]
},
"chrome": {
"width": 1000,
"height": 800,
"args": "--user-agent=\"Neutralinojs chrome mode\""
}
},
"cli": {
"binaryName": "XeniaLauncher",
"resourcesPath": "/resources/",
"extensionsPath": "/extensions/",
"clientLibrary": "/resources/js/neutralino.js",
"binaryVersion": "4.4.0",
"clientVersion": "3.3.0"
}
}
Fixed it! I ended up just setting up some scripts that will put all the built Preact code into the resources folder and re-setup my config to only use the resources folder, like the original Neutralino template. I am sure there could have been a more elegant way, but I am still just learning Neutralino and Preact so this works perfectly well enough for me.
It looks like the resourcesPath needs to be set to the directory where your index.html is found. I have a public dir, and moved the icons over there, then set resourcesPath to /public/ and I was able to neu build --release and run.
When publishing my app with expo using expo publish or pushing the app to App Store and Play Store, I get a crash on launch of the production app on both iOS and Android plateform with the error :
Unhandled JS Exception: manifest must specify logUrl
As this error doesn't happened on Development app, I don't know how to debug this. Does anyone encounter the same issue ? Do you have any idea on what's going on or do you have any idea on a method to find the error ?
Just for more context, I did publish my app to both stores months ago without any issue. I did not change anything in my manifest except changing the Expo SDK from version 38 to 40. Here is my current manifest :
{
"expo": {
"name": "My App",
"slug": "myApp",
"privacy": "public",
"platforms": ["ios", "android"],
"version": "1.0.2",
"orientation": "portrait",
"backgroundColor": "#ffffff",
"primaryColor": "#7198FF",
"icon": "./assets/android-icon.png",
"splash": {
"image": "./assets/Launch_Screen.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": false,
"bundleIdentifier": "com.company.app",
"buildNumber": "1"
},
"android": {
"package": "com.company.app",
"googleServicesFile": "./google-services.json",
"permissions": [
"CAMERA",
"MANAGE_DOCUMENTS",
"READ_CONTACTS",
"READ_CALENDAR",
"WRITE_CALENDAR",
"READ_EXTERNAL_STORAGE",
"READ_PHONE_STATE",
"RECORD_AUDIO",
"USE_FINGERPRINT",
"VIBRATE"
],
"versionCode": 21
},
"androidNavigationBar": {
"visible": "sticky-immersive",
"barStyle": "dark-content",
"backgroundColor": "#FFFFFF"
},
"androidStatusBar": {
"hidden": false,
"translucent": true,
"barStyle": "dark-content",
"backgroundColor": "#FFFFFF"
},
"extra": {
"firebase": {
"apiKey": "FIREBASE_KEY",
"authDomain": "app.firebaseapp.com",
"databaseURL": "https://app.firebaseio.com",
"projectId": "app",
"storageBucket": "app.appspot.com",
"messagingSenderId": "SENDER_ID",
"appId": "1:appID",
"measurementId": "G-ID"
}
},
"web": {
"config": {
"firebase": {
"apiKey": "FIREBASE_KEY",
"authDomain": "app.firebaseapp.com",
"databaseURL": "https://app.firebaseio.com",
"projectId": "app",
"storageBucket": "app.appspot.com",
"messagingSenderId": "MESSEGING_ID",
"appId": "1:APP_ID:web:WEB_ID",
"measurementId": "G-ID"
}
}
},
"hooks": {
"postPublish": [
{
"file": "sentry-expo/upload-sourcemaps",
"config": {
"organization": "app",
"project": "app",
"authToken": "SENTRY_TOKEN"
}
}
]
}
}
}
Seems like the issue was with expo trying to put logs to non-existent route on production.
According to expo docs,
the Expo SDK intercepts calls to console.log, console.warn, etc. and posts them to the logUrl specified in the manifest.
Check if you have Logs.enableExpoCliLogging(); enabled? Or if not, try manually importing logs at entry point
import { Logs } from 'expo';
and manually disabling them
Logs.disableExpoCliLogging();
According to the OP comment, the issue was as i mentioned. This stack helped me tho.
After reading #Oleksii comment about checking if the Expo CLI logging where enabled with Logs.enableExpoCliLogging();, it seems that this was causing the issue.
Just disable those by importing import { Logs } from 'expo'; and then calling Logs.disableExpoCliLogging(); in the app entry point file make it works again in production environment !
Thanks again #Oleksii !
I'm developping a desktop app using NWJS. I have a problem when I try to maximize the window. The button appears disabled, so I can`t maximize the window, only let me closing and minimizing the window.
Thats my package.json:
{
"name": "APP",
"main": "index.html",
"icon": "icon.png",
"version": "0.0.1",
"window": {
"title": "APP",
"icon": "icon.png",
"toolbar": false,
"resizable": true,
"frame": true,
"fullscreen": false,
"width": 1280,
"height": 1024,
"min_width": 360,
"min_height": 640,
"max_width": 1920,
"max_height": 1080,
"position": "center"
}
}
Anyone could help me? It was grateful. Thanks!
When your app starts do something like this...
var MaxWin=require('nw.gui').Window.get();
MaxWin.setMaximumSize(0,screen.availHeight);
And later use a couple of icons or buttons to maximize/minimize like this...
<input type="button" onclick="MaxWin.minimize();" value="Minimize">
<input type="button" onclick="MaxWin.maximize();" value="Maximize">
Before minimizing the node-webkit window it looked like this:
After restoring the node-webkit window it looked like this:
package.json
{
"name": "Gallay",
"description": "Simplified Billing",
"version": "0.1",
"main": "index.html",
"window": {
"icon": "icons/16.png",
"show": true,
"toolbar": false,
"frame": true,
"position": "center",
"width": 507,
"height": 570,
"min_width": 507,
"min_height": 570,
"max_width": 507,
"max_height": 570
}
}
I need fixed width while minimizing and restoring the node-webkit window. How can I solve the above problem?
After including jQuery and the following JavaScript, the problem can be solved.
$(document).ready(function(){
$(window).resize(function(){
window.resizeTo(507,570);
window.focus();
});
});
Add to package.json: "resizable": false and remove min_width, min_height, max_width, max_height.