Nw.js in Appimage, App created but not launching


#1

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


#2

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


#3

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


#4

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


#5

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: ) :


#6

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 

#7

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


#8

Cool. Let me know how it goes.


#9

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

#10

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


#11

here the full terminal report :
terminal.rtf


#12

Please try with the -n switch.


#13

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


#14

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


#15

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


#16

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


#17

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.


#18

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