AppImage: Difference between revisions

From FreeCAD Documentation
(new title Automatic updating)
(Marked this version for translation)
Line 29: Line 29:
* Manually browsing https://github.com/FreeCAD/FreeCAD/releases/ and downloading the latest build
* Manually browsing https://github.com/FreeCAD/FreeCAD/releases/ and downloading the latest build


<!--T:20-->
'''Note:''' At the time of this wiki edit there are 2 appimages being generated, one is a python3/Qt5 build and the other is a python2/Qt4 build. We recommend at this time to use the former and help the team weed out any py3/Qt5 bugs before the upcoming release of 0.18
'''Note:''' At the time of this wiki edit there are 2 appimages being generated, one is a python3/Qt5 build and the other is a python2/Qt4 build. We recommend at this time to use the former and help the team weed out any py3/Qt5 bugs before the upcoming release of 0.18


== Automatic updating == <!--T:8-->
== Automatic updating == <!--T:8-->


<!--T:21-->
AppImage has a smart and economical way of updating. It calculates the difference between the new AppImage and the old one, and will only download the changes between their versions. In theory the user ends up downloading around 15% each time instead of an entirely new AppImage.
AppImage has a smart and economical way of updating. It calculates the difference between the new AppImage and the old one, and will only download the changes between their versions. In theory the user ends up downloading around 15% each time instead of an entirely new AppImage.


<!--T:22-->
Updating is done through the [https://github.com/AppImage/AppImageUpdate AppImageUpdate] application. There are two methods, through the graphical interface (GUI), and the command line (CLI).
Updating is done through the [https://github.com/AppImage/AppImageUpdate AppImageUpdate] application. There are two methods, through the graphical interface (GUI), and the command line (CLI).


=== Graphical method === <!--T:9-->
=== Graphical method === <!--T:9-->


<!--T:23-->
# Download [https://github.com/AppImage/AppImageUpdate/releases/download/continuous/AppImageUpdate-x86_64.AppImage AppImageUpdate-x86_64.AppImage].
# Download [https://github.com/AppImage/AppImageUpdate/releases/download/continuous/AppImageUpdate-x86_64.AppImage AppImageUpdate-x86_64.AppImage].
# Make it executable by right clicking on the file, going in to properties and "Run as an executable".
# Make it executable by right clicking on the file, going in to properties and "Run as an executable".
Line 47: Line 51:
=== Command line === <!--T:10-->
=== Command line === <!--T:10-->


<!--T:24-->
Run the following instructions in your terminal
Run the following instructions in your terminal
</translate>
</translate>
Line 58: Line 63:
<translate>
<translate>


<!--T:25-->
Notes:
Notes:
* The file names will be unique because of the version info is embedded in them. The above instructions are simplified for convenience.
* The file names will be unique because of the version info is embedded in them. The above instructions are simplified for convenience.
Line 68: Line 74:
== Using AppImages in your development workflow == <!--T:12-->
== Using AppImages in your development workflow == <!--T:12-->


<!--T:26-->
{{Emphasis|Note:}} this section is intended for developers.
{{Emphasis|Note:}} this section is intended for developers.


Line 75: Line 82:
=== Modifying AppImages === <!--T:14-->
=== Modifying AppImages === <!--T:14-->


<!--T:27-->
An AppImage embeds a file system in it with everything that is required to run the application. In order to modify it, the file system needs to be extracted.
An AppImage embeds a file system in it with everything that is required to run the application. In order to modify it, the file system needs to be extracted.



Revision as of 15:46, 29 September 2019

As of 7 July 2019, the FreeCAD community has been observing that downloading AppImages from Github seem to timeout before completion. We aren't sure why this is occurring. If this is occurring for you please try downloading again. It make take a few tries. A recommended practice is to use the AppImage auto-updating feature, which will restore the download from the place it failed.

What is an AppImage

Package once and run everywhere. Reach users on all major Linux desktop distributions.

AppImage is a format similar to a binary that allow to quickly distribute an application to almost any Linux distro. Read more about it on the Appimage homepage and Wikipedia.

FreeCAD AppImages

Stable version

Current stable version is FreeCAD_0.20.2.29603

Development version

Many users on the forum utilize the development version. It can be run on the same system in parallel with another version of FreeCAD. Users use the dev version to take advantage of the latest features and bug fixes (since FreeCAD has a long release cycle). They also use it to help test and find bugs to spur development and improvement of FreeCAD. For the most part the development version is stable but of course it's important to add the obligatory statement to use it at your own risk. Though most people 'save often' and are fine.

Current development version is FreeCAD_28810

  • Development happens daily and rapidly, the link for the most up-to-date AppImage is a moving target.
  • The development link above should be up-to-date because it is updated via a script.

Some methods to follow new developments:

Note: At the time of this wiki edit there are 2 appimages being generated, one is a python3/Qt5 build and the other is a python2/Qt4 build. We recommend at this time to use the former and help the team weed out any py3/Qt5 bugs before the upcoming release of 0.18

Automatic updating

AppImage has a smart and economical way of updating. It calculates the difference between the new AppImage and the old one, and will only download the changes between their versions. In theory the user ends up downloading around 15% each time instead of an entirely new AppImage.

Updating is done through the AppImageUpdate application. There are two methods, through the graphical interface (GUI), and the command line (CLI).

Graphical method

  1. Download AppImageUpdate-x86_64.AppImage.
  2. Make it executable by right clicking on the file, going in to properties and "Run as an executable".
  3. Double click on the AppImage icon, a dialog box will appear and you'll be prompted to specify what AppImage you want to update.
  4. Specify the path to your existing AppImage.
  5. Once the AppImage is updated, press the button Run updated AppImage.

Command line

Run the following instructions in your terminal

wget https://github.com/AppImage/AppImageUpdate/releases/download/continuous/appimageupdatetool-x86_64.AppImage
chmod +x ./appimageupdatetool-x86_64.AppImage
./appimageupdatetool.AppImage path/to/old/FreeCAD.AppImage
chmod +x path/to/updated/FreeCAD.AppImage
./path/to/updated/FreeCAD.AppImage

Notes:

  • The file names will be unique because of the version info is embedded in them. The above instructions are simplified for convenience.
  • Run ./appimageupdatetool-x86_64.AppImage --help to learn about functionality like -r and --self-update.
  • There is also an i386 version; see the AppImageUpdate release page.

Todo: share a script that can be added as an alias or cron job.

Using AppImages in your development workflow

Note: this section is intended for developers.

A very convenient aspect of FreeCAD is that a majority of it is built in Python, which doesn't need to be manually compiled like C++. Essentially, a Python file can be modified, and upon restarting FreeCAD those changes will be integrated into the application. A developer can quickly work on the latest FreeCAD release using this technique and an AppImage. Moreover, using an AppImage doesn't modify your system's environment in any way, that is, nothing is installed and no environmental variables are modified.

Modifying AppImages

An AppImage embeds a file system in it with everything that is required to run the application. In order to modify it, the file system needs to be extracted.

FreeCAD.AppImage --appimage-extract
cd squashfs-root/

Now open the required Python source files in your preferred code editor, modify them, and save them. Then run the application.

./AppRun

Repackaging AppImages

If you've modified the code, and now want to re-package the AppImage with your latest changes, use the appimagetool-x86_64 tool on the extracted file system.

cd ..
wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x appimagetool-x86_64.AppImage
./appimagetool-x86_64.AppImage squashfs-root