[Solved] Package as Appimage
Posted
#1
(In Topic #377)
Regular

Please, could tell me where to find a guide to how to package my applications (developed in Gambas) as Appimage.
The following guide from Appimage don't help me to package a Gambas application as Appimage package.
Packaging Guide - AppImage documentation
Any help will be much appreciate.
Solved: https://appimage-build…est/examples/gambas3.html
Linux & Android enthusiast - France
Posted
Guru

I had a quick look at Appimage as I had not seen it before. I'll be honest and say I have no idea how to solve your problem but if you could explain your intentions we may be able to offer another solution, for example if you are looking for an easy way to update your program on a remote computer or…..
Posted
Regular

Linux & Android enthusiast - France
Posted
Regular

AppImage, makes it possible to share an App without the need to install other dependencies.
Problem is that you need to know way too many things in order to make it run.
Most frequent issues here, are DE incompatibilities.
On some distros, the same installation work flawlessly while on some others, installing Gambas might fail. It happened already many times.
If there were a packager capable to build a package as AppImage, this would make the Gambas Apps, distro agnostic which, I guess, is exactly the point of the topic.
So, is there any available choice?
Can we get to some result with this?
It would be beneficial for many Apps and for Gambas, as programming environnement.
For instance:
I packed DirLister and installed on the same computer I developped it. Worked flawlessly.
My DE is XFCE, on Linux Lite 4.8.
I moved to the other computer, where I have Linux Mint 19.3, also XFCE.
I had trouble installing the same package… Why did it happen, difficult to guess…
Maybe, Gambas installation somewhere was flawed, because later, after deleting everything and reinstalling Gambas, it worked.
The idea is that it would be far better without forcing the user to install Gambas, just to run an application. Makes sense to me.
As for me, it's of less interest if some MBs are occupied by Gambas. For some others though, might look like a great trrouble.
“The only thing necessary for the triumph of evil is for good men to do nothing.”― Edmund Burke;
It's easy to die for an idea. It is way harder to LIVE for your idea! (Me)
It's easy to die for an idea. It is way harder to LIVE for your idea! (Me)
Posted
Regular

Posted
Enthusiast

Posted
Regular

Posted
Regular

Appimage: Can we give it a try?
While my knowledge might be way behind the requirements of making it possible, the "<COLOR color="#0000BF">Fail - Learn - Succeed</COLOR>" approach, looks far better to me than "I'm too small for this big war" paradigm.Assuming we'll fail. So, what? Will that be deadly?
Here is the start point:
Packaging Guide - AppImage documentation
Question is:
<COLOR color="#0000BF">What if it works?</COLOR>
“The only thing necessary for the triumph of evil is for good men to do nothing.”― Edmund Burke;
It's easy to die for an idea. It is way harder to LIVE for your idea! (Me)
It's easy to die for an idea. It is way harder to LIVE for your idea! (Me)
Posted
Guru

The gambas application says we compile a stand-alone app but it's not really.
Still gonna need the gambas-runtime installed to run it and the components like gb.form and gb.image as well.
Like a Windows .net app , it's not going to run without the .net runtime stuff installed in the system.
I'm currently making a project called GambasMan.
I select one of my project folders and it gives some options like compiling the exe into a different dir as any name (without .gambas extension if you want)
Another more relevant function it has is a "minimum requirement installer"
This makes a simple bash script that'll run apt-get install (or yumi) and install just the gambas-runtime for the user plus the components required by the app.
Simple i should think for most users to use okay.
(i just need to figure out how to add the gambas filetype to the system to negate the need to use the gbr3 prefix)
Just the runtime and the components is a relatively small/quick install too.
As for the look on different machines i've also noticed this and think all it needs is a bit more coding/thinking when it comes to object sizing, Ie. setting object dimensions at runtime before the form loads using the object.Font.TextWidth and TextHeight functions. I think it's safe to consider making an object that's size looks okay on your machine may not look the same on another machine. Various objects have an .AutoResize switch that helps (shame they don't all have it)
Only OS's i got to try it on though at mo are Debian, Mint (both MATE), and Raspbian (not sure what it is, lxde or xfce4), , might set up some more.
I'll have a look at AppImage though and see what i can figure out
Posted
Guru

I'll have a look at AppImage though and see what i can figure out
I had a look and found if i went to the appImage website and downloaded their AppImage maker , that was an AppImage , it didn't work lol.
It's not looking promising lol.
I've made this…
(attachment removed)
It's some code i've ripped out of one of my other apps.
it asks for your gambas project directory and reads the .project file in it and gets your apps required gambas components.
It then makes a simple bash script to ask to install the minimum required stuff in the project folder or another of your choosing.
searches for apt-get yum and dnf
the script is set up in a way that it passes the components required through the GetFormat() routine (this is in case we need to change the '-' separator to a '.' or something ie. gambas3-gb-form or gambas3.gb.form as i think some distros use a different way)
the app uses the gambas3-gb-form syntax for apt yum and dnf
PS, it's compiled on Gambas 3.15 , if your gambas is older you can just load it up and recompile.
Posted
Trainee
Posted
Guru

search the gambas m/l for appimage.
http://lists.gambas-basic.org/pipermail/user/
Posted
Trainee
-the SH installed 3.15.2,
-deb needed 3.16 (stable PPA)
, so my app couldn't run. I will investigate AppMain or other options.
Thanks anyway.
Posted
Guru

if you need the ppa stable version you have to add the ppa to your apt and run apt-get update
not just use the default version your distro has on it's repo.
That's down to you not my installer.
the installer installs your apps dependencies (gambas components) gambas components your app needs.
Posted
Guru

sudo add-apt-repository ppa:gambas-team/gambas3
sudo apt-get update
sudo apt-get purge gambas3*
sudo at-get install gambas3*
Posted
Regular

I successfully package my gambas apps as AppImage with the following guide: https://appimage-build…est/examples/gambas3.html
Note: the full path of the gambas project must to be without space.
The AppImage compiled for Ubuntu 20.04 works better than 22.04 on Ubuntu 18.04 and Ubuntu 22.04.
To package a Gambas app as AppImage, use the builder:
Code
appimage-builder --recipe MyRecipeGambas.ymlHere is two examples of recipe YML for build with AppImage builder:
From the demo:
Code
# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
version: 1
script:
- rm -rf AppDir || true
- mkdir -p AppDir/usr/bin AppDir/usr/share/icons/hicolor/32x32/apps/
- cp project/mapview.png AppDir/usr/share/icons/hicolor/32x32/apps/
- cp project/project.gambas AppDir/usr/bin/appimage-demo-gambas3.gambas
AppDir:
path: ./AppDir
app_info:
id: org.appimagecrafters.appimage-demo-gambas3
name: appimage-demo-gambas3
icon: mapview
version: latest
exec: usr/bin/gbr3
exec_args: $APPDIR/usr/bin/appimage-demo-gambas3.gambas -- $@
apt:
arch: amd64
allow_unauthenticated: true
sources:
- sourceline: deb http://mx.archive.ubuntu.com/ubuntu/ bionic main restricted
- sourceline: deb http://mx.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
- sourceline: deb http://mx.archive.ubuntu.com/ubuntu/ bionic universe
- sourceline: deb http://mx.archive.ubuntu.com/ubuntu/ bionic-updates universe
- sourceline: deb http://mx.archive.ubuntu.com/ubuntu/ bionic multiverse
- sourceline: deb http://mx.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
- sourceline: deb http://mx.archive.ubuntu.com/ubuntu/ bionic-backports main restricted
universe multiverse
- sourceline: deb http://security.ubuntu.com/ubuntu bionic-security main restricted
- sourceline: deb http://security.ubuntu.com/ubuntu bionic-security universe
- sourceline: deb http://security.ubuntu.com/ubuntu bionic-security multiverse
- sourceline: deb http://archive.neon.kde.org/user bionic main
- sourceline: deb http://ppa.launchpad.net/gambas-team/gambas3/ubuntu bionic main
include:
- gambas3-gb-form
- gambas3-gb-qt5
- gambas3-gb-gtk3
- gambas3-runtime
- gtk2-engines-pixbuf
- libaudio2
- libexpat1
- libgcrypt20
- libgtk2.0-0
- liblz4-1
- liblzma5
- libpcre3
- libsm6
- libsystemd0
- libxau6
- libxdmcp6
- libxext6
- libxfixes-dev
- libxinerama1
- libxrender1
- libxt6
- libfontconfig1
- libfreetype6
exclude:
- adwaita-icon-theme
- adwaita-icon-theme-full
- humanity-icon-theme
files:
exclude:
- usr/share/man
- usr/share/doc/*/README.*
- usr/share/doc/*/changelog.*
- usr/share/doc/*/NEWS.*
- usr/share/doc/*/TODO.*
- usr/include
runtime:
env:
GB_PATH: $APPDIR/usr/bin/gbr3
test:
fedora:
image: appimagecrafters/tests-env:fedora-30
command: ./AppRun
use_host_x: true
debian:
image: appimagecrafters/tests-env:debian-stable
command: ./AppRun
use_host_x: true
arch:
image: appimagecrafters/tests-env:archlinux-latest
command: ./AppRun
use_host_x: true
centos:
image: appimagecrafters/tests-env:centos-7
command: ./AppRun
use_host_x: true
ubuntu:
image: appimagecrafters/tests-env:ubuntu-xenial
command: ./AppRun
use_host_x: true
AppImage:
arch: x86_64
update-information: guess
sign-key: None
The recipe for my gambas application Simple NFS GUI
https://github.com/Phi…4/Simple.NFS.GUI/releases
Code
# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
version: 1
script:
- rm -rf AppDir || true
- mkdir -p AppDir/usr/bin
- cp simple-nfs-gui.gambas AppDir/usr/bin/
- mkdir -p AppDir/usr/share/icons/hicolor/32x32/apps/
- cp mapview.png AppDir/usr/share/icons/hicolor/32x32/apps/
AppDir:
path: ./AppDir
app_info:
id: org.appimagecrafters.simple-nfs-gui-gambas
name: simple-nfs-gui-gambas
icon: mapview
version: latest
exec: usr/bin/gbr3
exec_args: $APPDIR/usr/bin/simple-nfs-gui.gambas -- $@
apt:
arch: amd64
allow_unauthenticated: true
sources:
- sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ focal main restricted
- sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ focal-updates main restricted
- sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ focal universe
- sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ focal-updates universe
- sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ focal multiverse
- sourceline: deb http://fr.archive.ubuntu.com/ubuntu/ focal-updates multiverse
- sourceline: deb http://security.ubuntu.com/ubuntu focal-security main restricted
- sourceline: deb http://security.ubuntu.com/ubuntu focal-security universe
- sourceline: deb http://security.ubuntu.com/ubuntu focal-security multiverse
- sourceline: deb http://archive.neon.kde.org/user focal main
- sourceline: deb http://ppa.launchpad.net/gambas-team/gambas3/ubuntu focal main
include:
- gambas3-gb-form
- gambas3-gb-qt5
- gambas3-gb-gtk3
- gambas3-runtime
- fping
- hostname
- nfs-common
- nfs-kernel-server
- gtk2-engines-pixbuf
- libaudio2
- libexpat1
- libgcrypt20
- libgtk2.0-0
- liblz4-1
- liblzma5
- libpcre3
- libsm6
- libsystemd0
- libxau6
- libxdmcp6
- libxext6
- libxfixes-dev
- libxinerama1
- libxrender1
- libxt6
- libfontconfig1
- libfreetype6
exclude:
- adwaita-icon-theme
- adwaita-icon-theme-full
- humanity-icon-theme
files:
exclude:
- usr/share/man
- usr/share/doc/*/README.*
- usr/share/doc/*/changelog.*
- usr/share/doc/*/NEWS.*
- usr/share/doc/*/TODO.*
- usr/include
runtime:
env:
GB_PATH: $APPDIR/usr/bin/gbr3
test:
fedora:
image: appimagecrafters/tests-env:fedora-30
command: ./AppRun
use_host_x: true
debian:
image: appimagecrafters/tests-env:debian-stable
command: ./AppRun
use_host_x: true
arch:
image: appimagecrafters/tests-env:archlinux-latest
command: ./AppRun
use_host_x: true
centos:
image: appimagecrafters/tests-env:centos-7
command: ./AppRun
use_host_x: true
ubuntu:
image: appimagecrafters/tests-env:ubuntu-xenial
command: ./AppRun
use_host_x: true
AppImage:
arch: x86_64
update-information: guess
sign-key: None
Linux & Android enthusiast - France
1 guest and 0 members have just viewed this.


