Converting react web app to desktop app using nw-builder's latest version

91 views Asked by At

my folder structure is as follow:

nwbuilder- package.json build.js etc. app- build public-all files including package.json src package.json etc

my build.js file consist code:

import nwbuild from "nw-builder";
 nwbuild({
  srcDir: '../app2/build/**/*', // use the glob format,
    mode: "build",
    // platforms: ['osx64', 'win32', 'linux32','linux64'],
    platform: "linux",
    version: '0.80.0',
    outDir: "./build",
    flavor: 'normal',
    appName: 'SchoolCinema',
    appVersion: '1.0',
    icon: './icons/sc.icns',
    winIco: './icons/sc.ico',
    
     app: {
           company: "SchoolCinema",
           fileDescription: "Process Name",
           productName: "Some Product",
           legalCopyright: "Copyright (c) 2023",
         }, production: true,
});

All version details

  1. nw.js - v0.80.0
  2. Node - v20.5.1
  3. "nw-builder": "^4.4.1"

Commands i followed

  1. node build.js

In result:

it generated one build folder which includes several files like local,app/build, lib ,myapp,myapp.desktop etc.

NOW WHEN I AM TRYING TO RUN THE DESKTOP APP BY FOLLOWING PROCESS:

I opened the terminal inside build folder run commands chmod +x myapp chmod +x myapp.desktop ./myapp

in output i am getting nw's screen not my app's screens, i have also uploaded screenshot of the output.

I followed the documentation to convert my react app to desktop app. But only getting nw.js default screen not my apps view.

0

There are 0 answers