[Solved] Package as Appimage

Post your Gambas programming questions here.
tercoIDE
Posts: 9
Joined: Monday 27th April 2020 2:32pm

Re: Package as Appimage

Post by tercoIDE »

Testing it, Bruce, thanks for sharing. Will post feedback afterwards.
User avatar
BruceSteers
Posts: 1505
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Package as Appimage

Post by BruceSteers »

somebody HAS made an app image.
search the gambas m/l for appimage.
http://lists.gambas-basic.org/pipermail/user/
If at first you don't succeed , try doing something differently.
BruceS
tercoIDE
Posts: 9
Joined: Monday 27th April 2020 2:32pm

Re: Package as Appimage

Post by tercoIDE »

Maybe I am doing something wrong, but the GambasAppInstallMaker did not solved the problem. It gathered the depdndencies, and created the .sh witch I run via sudo at a terminal with no errors. Then the Software manager installed the deb, but there was a conflict between gb versions:
-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.
User avatar
BruceSteers
Posts: 1505
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Package as Appimage

Post by BruceSteers »

the installer does not install any particular version, the version it installs depends on how you have apt set up.

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.
If at first you don't succeed , try doing something differently.
BruceS
User avatar
BruceSteers
Posts: 1505
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Package as Appimage

Post by BruceSteers »

try this to add the gambas stable ppa and re-install the newer gambas version...

sudo add-apt-repository ppa:gambas-team/gambas3
sudo apt-get update
sudo apt-get purge gambas3*
sudo at-get install gambas3*
If at first you don't succeed , try doing something differently.
BruceS
User avatar
Philippe734
Posts: 20
Joined: Sunday 16th February 2020 7:37pm
Contact:

Re: Package as Appimage

Post by Philippe734 »

Topic solved after some years!

I successfully package my gambas apps as AppImage with the following guide: https://appimage-builder.readthedocs.io ... mbas3.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: Select all

appimage-builder --recipe MyRecipeGambas.yml
Here is two examples of recipe YML for build with AppImage builder:

From the demo:

Code: Select all

# 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/Philippe734/Simple.NFS.GUI/releases

Code: Select all

# 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
Post Reply