1. Portable interpreters using AppImage

An AppImage lets us create a portable interpreter.

  • single file
  • compressed
  • only 0.02 seconds extra startup time

Worked for both OpenEuphoria and Phix

For example using Phix:

You need:

Create a directory (anywhere) like /CREATE
in this /CREATE directory:

  • copy the appimagetool here
  • make a /phix.AppDir directory
    in this directory:

    • create AppDir (a bash script)
    • create phix.Desktop (a txt file)
    • copy Phix256.png (an icon file)
    • make a /phix.AppDir/usr directory

      in this directory make another directory

      • make a /phix.AppDir/usr/bin directory

        duplicate a phix install

        • copy /builtins (from a phix install)
        • copy p (the interpreter)
  1. ensure p and AppRun are executable
  2. from /CREATE execute the apptool
    ./apptool.AppImage phix.AppDir
  3. get

You now have a portable app:

  • ./phix-x86_64.AppImage (will launch the interpreter)
  • rename to pp (any name is ok, no extension needed, pp suggests phix portable)
  • run as ./pp

A portable app may be installed as a regular executable:

  • copy the AppImage file to /home/bin
    • check that .profile has this in the users path
    • now pp will run from anywhere

The installation details:

The AppRun file looks like:

HERE="$(dirname "$(readlink -f "${0}")")"  
exec "${EXEC}" "$@" 
# change p to eui for OE 
# "$@" allows arguments be passed to interpreter 

The phix.desktop file looks like:

[Desktop Entry] 

There was some protesting about the arguments of this file.

To create the OpenEuphoria version the apptool wanted an "ARCH" argument:

$ ARCH=x86_64 ./apptool.AppImage euphoria.AppDir

be well

new topic     » topic index » view message » categorize

2. Re: Portable interpreters using AppImage

Wot no IUP?

new topic     » goto parent     » topic index » view message » categorize

3. Re: Portable interpreters using AppImage

petelomax said...

Wot no IUP?

It looks like an AppImage is its own, secure, bubble.

I don't think an external program can "look into" this bubble. It is possible to mount an appimage so someone can examine its contents--that is not a solution for using an appimage.

That means I can not "include" anything from inside the bubble into a program; for example "include builtins/regex.e" does not work. Because phix has lots of autoincludes, the initial impression of phix as an appimage is great.

To get iup to work you would have to make iup an autoinclude; dito for regex.e

Creating an all-inclusive autoinclude would be interesting--I am looking forward to it.

be well

new topic     » goto parent     » topic index » view message » categorize


Quick Links

User menu

Not signed in.

Misc Menu