Create Portable AppImage (or selfextracting script)
Posted: Sat 01 Dec 2018, 19:46
*** Create Portable AppImage (or selfextracting script) ***
Update: 2020-04-21, v2.1 download links below replaced, more info:
http://murga-linux.com/puppy/viewtopic. ... 89#1056089
Update: 2019-04-02, v2.0 download links below replaced, more info and tips:
http://murga-linux.com/puppy/viewtopic. ... 16#1011816
Options:
- 'PortableAppsLinux Mode' or 'Chroot mode' choice
The 'Chroot Mode' gives a better chance that the app will run (specially with complex apps)
But for simple apps, I'd recommend 'PortableAppsLinux Mode' (runs faster)
(see more info below)
- Create appimage from selected directory "AppDir", or
- Create appimage from selected .sfs or .squashfs (Chroot Mode only)
- Create selfextracting script instead of appimage (using makeself https://makeself.io/)
Contents of Info (click Info button at the GUI):
--------------------------------------------------------------------------
*** About preparing a directory for creating an Appimage, or self-extracting script ***
Check the box: 'Create self-extracting script instead of appimage' for the latter
Advantage of an AppImage is that it is mounted in /tmp, this way it does not take any space
In contrary to self-extracting script, which extracts the files in /tmp
This program will create a script AppRun (+ other requirements) in the chosen directory (<appdir-root>)
- The directory should contain the executable, e.g abiword, and it must be in one of the directories in PATH
(e.g. <appdir-root>/usr/bin, <appdir-root>/usr/sbin)
- Also it should contain all required dependencies, e.g. libs, place them in <appdir-root>/usr/lib or <appdir-root>/usr/lib/i386-linux-gnu
Place an icon e.g. <programname>.png in <appdir-root>/ or in <appdir-root>/usr/share/pixmaps/ EDIT This is not required
For creating self-extracting script this is not needed
Info only for DebianDog or XenialDog (has included apt2sfs):
Besides creating the directory manually, you can also use a directory created by apt2sfs,
just run apt2sfs, (cancel creating .squashfs) and choose 'No' when prompted for removing the directory
Or: unsquash an existing .sfs or .squashfs or .pet and use the extracted directory as base <appdir-root>
Or: Select a .sfs or .squashfs instead of an AppDir
*** Chroot Mode: About how it works ***
The way of portablizing is different from the method that is used by portablelinuxapps
(http://portablelinuxapps.org/)
Running the appimage will create a mountpoint (in /mnt/unionfs-xxxxxx) and by using unionfs-fuse the AppDir will be merged with the (also mounted) filesystem
Then the command will be executed inside a chroot environment (jail)
The advantage is that there is more chance that the application will run properly, but the application start time is a little slower than when using the "Portablelinuxapps Mode"
Part of this program has been taken from "AppImageAssistant" by Simon Peter (probono), known from (earlier) http://portablelinuxapps.org and https://github.com/AppImage/AppImageKit
--------------------------------------------------------------------------
Download: Updated: 2020-04-21 to v2.1
32-bit, extract and run create-portable32 (appimage)
https://dl.dropboxusercontent.com/s/npi ... ar.gz?dl=1 (size: 261K)
64-bit, extract and run create-portable64 (appimage)
https://dl.dropboxusercontent.com/s/6go ... ar.gz?dl=1 (size: 248K)
Two examples (appdir and sfs 32-bit) for to try out attached (with screenshots accordingly)
These are from Mike Walsh's ScreenControl-v1.3-i686.pet (ScreenControl v1.3 - SCT-based 32-bit) from here:
http://murga-linux.com/puppy/viewtopic.php?t=114277
The .sfs is created from the extracted .pet, and only added yad in usr/bin/
The appdir is a bit more modified (changed absolute paths to just <command> in scripts, absolute paths won't work for setting up as portable)
The resulting appimage will be: ScreenControl.sh-portable
Fred
Update: 2020-04-21, v2.1 download links below replaced, more info:
http://murga-linux.com/puppy/viewtopic. ... 89#1056089
Update: 2019-04-02, v2.0 download links below replaced, more info and tips:
http://murga-linux.com/puppy/viewtopic. ... 16#1011816
Options:
- 'PortableAppsLinux Mode' or 'Chroot mode' choice
The 'Chroot Mode' gives a better chance that the app will run (specially with complex apps)
But for simple apps, I'd recommend 'PortableAppsLinux Mode' (runs faster)
(see more info below)
- Create appimage from selected directory "AppDir", or
- Create appimage from selected .sfs or .squashfs (Chroot Mode only)
- Create selfextracting script instead of appimage (using makeself https://makeself.io/)
Contents of Info (click Info button at the GUI):
--------------------------------------------------------------------------
*** About preparing a directory for creating an Appimage, or self-extracting script ***
Check the box: 'Create self-extracting script instead of appimage' for the latter
Advantage of an AppImage is that it is mounted in /tmp, this way it does not take any space
In contrary to self-extracting script, which extracts the files in /tmp
This program will create a script AppRun (+ other requirements) in the chosen directory (<appdir-root>)
- The directory should contain the executable, e.g abiword, and it must be in one of the directories in PATH
(e.g. <appdir-root>/usr/bin, <appdir-root>/usr/sbin)
- Also it should contain all required dependencies, e.g. libs, place them in <appdir-root>/usr/lib or <appdir-root>/usr/lib/i386-linux-gnu
Place an icon e.g. <programname>.png in <appdir-root>/ or in <appdir-root>/usr/share/pixmaps/ EDIT This is not required
For creating self-extracting script this is not needed
Info only for DebianDog or XenialDog (has included apt2sfs):
Besides creating the directory manually, you can also use a directory created by apt2sfs,
just run apt2sfs, (cancel creating .squashfs) and choose 'No' when prompted for removing the directory
Or: unsquash an existing .sfs or .squashfs or .pet and use the extracted directory as base <appdir-root>
Or: Select a .sfs or .squashfs instead of an AppDir
*** Chroot Mode: About how it works ***
The way of portablizing is different from the method that is used by portablelinuxapps
(http://portablelinuxapps.org/)
Running the appimage will create a mountpoint (in /mnt/unionfs-xxxxxx) and by using unionfs-fuse the AppDir will be merged with the (also mounted) filesystem
Then the command will be executed inside a chroot environment (jail)
The advantage is that there is more chance that the application will run properly, but the application start time is a little slower than when using the "Portablelinuxapps Mode"
Part of this program has been taken from "AppImageAssistant" by Simon Peter (probono), known from (earlier) http://portablelinuxapps.org and https://github.com/AppImage/AppImageKit
--------------------------------------------------------------------------
Download: Updated: 2020-04-21 to v2.1
32-bit, extract and run create-portable32 (appimage)
https://dl.dropboxusercontent.com/s/npi ... ar.gz?dl=1 (size: 261K)
64-bit, extract and run create-portable64 (appimage)
https://dl.dropboxusercontent.com/s/6go ... ar.gz?dl=1 (size: 248K)
Two examples (appdir and sfs 32-bit) for to try out attached (with screenshots accordingly)
These are from Mike Walsh's ScreenControl-v1.3-i686.pet (ScreenControl v1.3 - SCT-based 32-bit) from here:
http://murga-linux.com/puppy/viewtopic.php?t=114277
The .sfs is created from the extracted .pet, and only added yad in usr/bin/
The appdir is a bit more modified (changed absolute paths to just <command> in scripts, absolute paths won't work for setting up as portable)
The resulting appimage will be: ScreenControl.sh-portable
Fred