AppImage

From FreeCAD Documentation
Revision as of 20:18, 20 November 2020 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
По состоянию на 7 июля 2019 года сообщество FreeCAD отмечает, что загрузка AppImages из Github, похоже, истекает по таймауту до завершения. Мы не уверены, почему это происходит. Если это произойдет с вами, попробуйте загрузить еще раз. Это займет несколько попыток. Рекомендуется использовать функцию автоматического обновления AppImage, которая восстановит загрузку с того места, где произошла ошибка.

Что такое AppImage?

Упакуй раз и запускай везде. Дойдите до пользователей всех основных дистрибутивов рабочих столов Linux.

AppImage это "универсальный двоичный пакет", предназначенный для распространения приложений на любой дистрибутив Linux. Читайте дальше о нём на домашней странице Appimage и в Wikipedia.

Для запуска сделайте его исполняемым, и введите относительный или полный путь к файлу.

chmod +x FreeCAD_x86_64.AppImage
./FreeCAD_x86_64.AppImage

Для других типов установки смотрите Download.

AppImages FreeCADа

If the download links below do not work, please manually download the files from the "Assets" section in the FreeCAD Github Releases
Available FreeCAD AppImages
Stable Development
0.20.2.29603 (SHA256) 28810 (SHA256)

Important Notes:

  • 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.
  • 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.

Obligatory Word of Caution

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 that utilize backups and 'save often' do quite well.

Автообновление

AppImage имеет умный и экономичный способ обновления. Он вычисляет разницу между новым AppImage и старым и загружает только изменения между их версиями. Теоретически пользователь каждый раз загружает около 15% вместо совершенно нового AppImage.

Автоматическое обновление выполняется несколькими возможными методами. В настоящее время существует 4 метода: 2 - через графический интерфейс (GUI) и 2 - через интерфейс командной строки/терминала (CLI).

Экспериментальное обновление в приложении

Thanks to the efforts of several key devs, there is an ongoing effort to integrate a feature that allows self-updating the AppImage within FreeCAD itself. Starting from FC 0.19.21514 there now exists an AppImage section found via Edit → Preferences → AppImage. Please test this capability and report your experience to the forum discussion.

Метод через GUI №1 (официальный)

Это официальное приложение с графическим интерфейсом AppImageUpdate.

  1. Загрузить AppImageUpdate-x86_64.AppImage.
  2. Сделайте его исполняемым, щелкнув правой кнопкой мыши по файлу, войдя в свойства и установив «Запускать как исполняемый файл».
  3. Дважды щелкните значок AppImage, появится диалоговое окно, в котором вам будет предложено указать, какой AppImage вы хотите обновить.
  4. Укажите путь к существующему AppImage.
  5. После обновления AppImage нажмите кнопку Run updated AppImage.

GUI method 2 (unofficial)

This is a sleeker 3rd-party unofficial version of AppImageUpdate named: AppImageUpdater. It is still in development (at the time of this wiki edit) but nevertheless, quite nice to use.

  1. Download AppImageUpdater-*-x86_64.AppImage
  2. Make it executable:
    chmod +x AppImageUpdater*-x86_64.AppImage
    
  3. Run it:
    source AppImageUpdater*-x86_64.AppImage
    
  4. Find your current FreeCAD AppImage and drag-drop it on to the AppImageUpdater

Result: Follow the AppImageUpdater prompts

Метод через командную строку №1 (официальный)

Выполните следующие инструкции в своем терминале

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

Примечания:

  • Имена файлов будут уникальными, поскольку в них встроена информация о версии. Приведенные выше инструкции упрощены для удобства.
  • Запустите ./appimageupdatetool-x86_64.AppImage --help, чтобы узнать о таких функциях, как -r и --self-update.
  • Также есть версия i386; см. страницу AppImageUpdate release.

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

CLI method 2 (unofficial)

Similarly to the Graphical methods having an official and unofficial approaches to downloading AppImages, the same applies to the command line. This is a sleeker 3rd-party command line option to download AppImages

  1. Download appimageupdater-*-x86_64.AppImage
  2. Make it executable:
    chmod +x appimageupdater*-x86_64.AppImage
    
  3. Run it:
    source appimageupdater*-x86_64.AppImage /path/to/old/FreeCAD-AppImage.AppImage
    

Result: Updates specified AppImage file if update exists

Developer Section

Note: the following sections are intended for developers

Unpacking AppImages

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_xxx.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

Personalized AppImages

Thanks to the work of realthunder, author of App Link and Assembly3 Workbench, it is possible to build custom AppImages using a set of scripts.

This makes it very convenient to release images for a specific branch of the source code for others to test. Although AppImages only work on Linux, realthunder's scripts make it possible to generate AppImages also on Windows and MacOS.

The repository for these scripts is at realthunder/FreeCADMakeImage. Please read the Readme.md for more details.