Nw.js in Appimage, App created but not launching

Hi,
so i get a nwjs project i successfully converted in MAC and WINDOW native app format,
then it’s turn on LINUX :slight_smile:

i got the output .appimage file on dektop but nothing happen on double-clicking it,
the permission are ok and allow executable,
so i guess there may be problem(s) elsewhere…

my nwjs folder contains a .desktop file to launch a script making nwjs app running :
double-clicking the .desktop launch app successfully.

.desktop file is :

[Desktop Entry]
Name=sumatra360
Exec=sh -c "dirname %k/nwScript.sh dirname %k"
Icon=myapp
Terminal=false
Type=Application

script nwScript.sh is :

cd $1 && ./nw 2>>$1/error.log

so is there anything to change there to make it works ??
may be something path related ?? :confused:
when i drop my appimage created in terminal , and Enter key it return :
execv error: No such file or directory
if i drop SubSurface app into terminal, the App launch correctly yet.

Thankx in advance

Your Exec= line looks suspect. Why not Exec=nwScript.sh? And Put nwScript.sh in usr/bin

hi,
that’s not works,
using Exec=nwScript.sh and create folder usr/bin/ in my nwjs folder

Can you upload your app so that I can have a look?

Sure,
as it was over 300 Mo, i removed the web app, now it’s about 54 Mo
(.desktop file launch correctly window app with default NWJS splash screen
but when the fix come up i would be glad to show you the full app :slight_smile: ) :

Do not use nwScript.sh, but set Exec=nw. Like so:

mkdir workdir
cd workdir/
unzip /home/me/Downloads/nwjsapp.zip
wget -c "https://github.com/probonopd/AppImages/raw/master/functions.sh"
. ./functions.sh
cd nwjsapp/
rm nwScript.sh
mv * usr/bin/
mv usr/bin/sumatra360.desktop .
sed -i -e 's|^Exec=.*|Exec=nw|g' sumatra360.desktop
echo "Icon=myapp" >> sumatra360.desktop
mv usr/bin/myapp.png .
get_apprun
cd ..
mv nwjsapp/ sumatra360.AppDir
VERSION=1.0 APP=sumatra360 generate_type2_appimage 
../out/sumatra360-1.0-x86_64.AppImage # Runs 

Thanks :slight_smile:
i will have some spare time this week-end to try it and let you know :+1:

Cool. Let me know how it goes.

it doesn’t works, there no output file in out/ folder :sweat:

Terminal :

  • mkdir -p …/out/
  • mv ‘.AppImage’ …/out/
    mv: cannot stat ‘.AppImage’: No such file or directory
    david-virtual-machine workdir # …/out/sumatra360-1.0-x86_64.AppImage

What is this then? Please post a fuller log for debugging. For me it worked.

here the full terminal report :
terminal.rtf

Please try with the -n switch.

where i am supposed to place the -n in the code you provided me ? ::confused:

Instead of VERSION=1.0 APP=sumatra360 generate_type2_appimage you could run ./appimagetool-x86_64.AppImage -n ./sumatra360.

https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage

if i use :
./appimagetool-x86_64.AppImage -n ./sumatra360.
the appimage i get not launch and in terminal return :
could not cd into usr

well, i give up :frowning: (not enough spare time to investigate why that’s not working on my side).
may be in the future you should build an online tool to convert nwjs into appimage format (upload the app, download the appimage once created)

Thanks anyways

Not sure what the issue is, since it is working for me with the steps I posted above. I have no xlue about nwjs really. Is there a standard tool along the lines of electron-builder but for nwjs?

If you have a GitHub/Travis CI continuous build system, then I could send a Pull Request implementing the required changes to produce continuous AppImage builds. Let me know if you are interested.

Alternatively, you could provide a ppa or deb which we could then easily convert to an AppImage.

Does ./sumatra360/usr/bin/sumatra360 exist and is it the main executable of your AppDir?

I know I am late but check my app if you are still intereted! It converts your apps to appimage really easy.