例如。
$ mkdir ~/AppImage
$ cd ~/AppImage
$ wget -O celestia-1.7.0-git-x86_64.AppImage https://download.opensuse.org/repositories/home:/munix9:/unstable/AppImage/celestia-latest-x86_64.AppImage
$ chmod 755 *.AppImage
在与 AppImage 文件相同的文件夹中创建一个可移植的、与主要版本相关的 $HOME 目录
$ mkdir celestia-1.7.home
启动 Celestia / 获取帮助(更新后文件名可能会更改)
$ ./celestia-1.7.0-git-x86_64.AppImage
$ ./celestia-1.7.0-git-x86_64.AppImage -h
$ wget -O celestia-1.6.2-x86_64.AppImage https://download.opensuse.org/repositories/home:/munix9/AppImage/celestia-latest-x86_64.AppImage
$ chmod 755 *.AppImage
在与 AppImage 文件相同的文件夹中创建一个可移植的、与主要版本相关的 $HOME 目录
$ mkdir celestia-1.6.home
启动 Celestia / 获取帮助(更新后文件名可能会更改)
$ ./celestia-1.6.2-x86_64.AppImage
$ ./celestia-1.6.2-x86_64.AppImage -h
$ wget https://github.com/AppImage/AppImageUpdate/releases/download/continuous/AppImageUpdate-x86_64.AppImage
$ chmod 755 *.AppImage
可选择在与 AppImage 文件相同的文件夹中创建一个可移植的 $HOME 目录
$ mkdir AppImageUpdate-x86_64.AppImage.home
$ wget -O obs-munix9.pub https://build.opensuse.org/projects/home:munix9/public_key
全局(没有用于 AppImageUpdate 的便携式 $HOME)
$ gpg2 --import obs-munix9.pub
仅适用于 AppImageUpdate (便携式 $HOME,见上文)
$ HOME=~/AppImage/AppImageUpdate-x86_64.AppImage.home gpg2 --import obs-munix9.pub
老东西
构建系统:
测试系统:
版本:celestia-qt,git master(启用额外的hacks/patches和spice)
AppImage 测试环境现已从 OBS 移至 github/travis-ci
https://github.com/munix9/Celestia (分支 appimage_build)
现在应该可以通过https://github.com/AppImage/AppImageUpdate进行更新
创建一个工作目录(是任意的,以后可以移动或重命名)
$ mkdir ~/celestia-app
$ cd ~/celestia-app
从https://github.com/munix9/Celestia/releases下载 AppImage 文件(持续构建)
$ wget https://github.com/munix9/Celestia/releases/download/continuous/celestia-qt-continuous-x86_64.AppImage
并使其可执行
$ chmod 755 celestia-qt-continuous-x86_64.AppImage
创建一个便携式主文件夹以用作 $HOME
$ ./celestia-qt-continuous-x86_64.AppImage --appimage-portable-home
提示:现在有一个可移植 $HOME 目录的替代方法。 如果 AppImage 所在的文件夹中存在名为celestia-qt.home
的可写目录,则该目录被定义为可移植的 $HOME。
这应该可以更轻松地在更新后处理不同的 AppImage 名称。
冒险第一次开始
$ ./celestia-qt-continuous-x86_64.AppImage
退出时“保存书签时出错”“只读文件系统” - 已解决(#335)
$ mkdir -m 700 ~/celestia-app/celestia-qt-continuous-x86_64.AppImage.home/.config
(celestia-qt:...): Gtk-WARNING **: ...: Unable to locate the theme engine in module_path: "murrine", - 已解决,不应再次出现
首先安装gtk2-engines-murrine
$ sudo apt-get install gtk2-engines-murrine
通过在 AppImage 启动时添加 GTK_PATH64 env var 来解决
$ GTK_PATH64=$GTK_PATH64:/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/ ./celestia-qt-continuous-x86_64.AppImage
或通过创建符号链接
$ mkdir -p ~/celestia-app/celestia-qt-continuous-x86_64.AppImage.home/.gtk-2.0/engines
$ ln -s /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/libmurrine.so ~/celestia-app/celestia-qt-continuous-x86_64.AppImage.home/.gtk-2.0/engines/
塞拉斯蒂娅之路
$ ./celestia-qt-continuous-x86_64.AppImage --celestia-extract-data
done: celestia data extracted to '/home/test/celestia-app/celestia-qt-continuous-x86_64.AppImage.data'
start celestia e.g. with
CELESTIA_DATA_DIR=/home/test/celestia-app/celestia-qt-continuous-x86_64.AppImage.data/ /home/test/celestia-app/celestia-qt-continuous-x86_64.AppImage
AppImage方式
$ ./celestia-qt-continuous-x86_64.AppImage --appimage-extract
$ mv squashfs-root/usr/share/celestia/ my-data
$ rm -r squashfs-root
现在可以使用替代数据路径启动 celestia
$ CELESTIA_DATA_DIR=~/celestia-app/my-data/ ./celestia-qt-continuous-x86_64.AppImage
执行更新的程序仍在审查中。 在澄清之前,可以使用 AppImageUpdate 更新 AppImage。
提示:
暂时就这样了。
听起来像是自定义 AppRun 脚本的案例?
听起来像是自定义 AppRun 脚本的案例?
对不起,我不明白。 你能解释一下吗?
随着#335 的合并,这个:
创建一个便携式主文件夹以用作 $HOME
$ ./celestia-qt-latest-x86_64.AppImage --appimage-portable-home
创建一个便携式配置文件夹以用作 $XDG_CONFIG_HOME
$ ./celestia-qt-latest-x86_64.AppImage --appimage-portable-config
和这个:
退出时“保存书签时出错”“只读文件系统”
$ mkdir -m 700 ~/celestia-app/celestia-qt-latest-x86_64.AppImage.home/.config
不再需要(交叉我的手指:))
对不起,我不明白。 你能解释一下吗?
从你写的内容来看,用户似乎必须导出某些环境变量才能完成这项工作。 我想指出的是AppRun
,这是 AppImage 中的一个文件,您可以用它来编写自己的脚本,它将导出所需的环境变量。
如果您遇到困难并需要具体帮助,请告诉我。
随着#335 的合并,这个:
创建一个便携式主文件夹以用作 $HOME
$ ./celestia-qt-latest-x86_64.AppImage --appimage-portable-home
创建一个便携式配置文件夹以用作 $XDG_CONFIG_HOME
$ ./celestia-qt-latest-x86_64.AppImage --appimage-portable-config和这个:
退出时“保存书签时出错”“只读文件系统”
$ mkdir -m 700 ~/celestia-app/celestia-qt-latest-x86_64.AppImage.home/.config不再需要(交叉我的手指:))
请注意:
$ ./celestia-qt-latest-x86_64.AppImage --appimage-portable-home
$ ./celestia-qt-latest-x86_64.AppImage --appimage-portable-config
与问题或错误无关,相反,它们提供了将配置等存储在不在 $HOME/、$HOME/.config、$HOME/.local 下,而是在上述便携式目录下的可能性。
对不起,那是我误会了。 事实上,它真的就像这3个步骤一样简单:
wget -c https://download.opensuse.org/repositories/home:/munix9:/unstable/AppImage/celestia-qt-latest-x86_64.AppImage # Download
chmod +x celestia-qt-latest-x86_64.AppImage # Make executable
./celestia-qt-latest-x86_64.AppImage # Run
它在Xubuntu 18.04上运行:
__太棒了!__:+1:
对不起,我不明白。 你能解释一下吗?
从你写的内容来看,用户似乎必须导出某些环境变量才能完成这项工作。 我想指出的是
AppRun
,这是 AppImage 中的一个文件,您可以用它来编写自己的脚本,它将导出所需的环境变量。如果您遇到困难并需要具体帮助,请告诉我。
清理https://build.opensuse.org/project/show/OBS :AppImage、安装新版本并修复现有的无法解析/失败/损坏的构建肯定是一个优势。
但还有其他人负责,我可能会做一个错误条目。
我还注意到 AppImageUpdate 不能与 OBS 生成的 AppImages 一起正常工作 - 但我需要仔细研究一下。
libmurrine.so 的事情很烦人,是的,但我们应该等待在尽可能多的平台上对用户进行进一步测试。
与问题或错误无关,相反,它们提供了将配置等存储在不在 $HOME/、$HOME/.config、$HOME/.local 下,而是在上述便携式目录下的可能性。
似乎您是对的,因为正如我所见,如果您没有明确创建那些目录 appimage 使用默认的 $HOME 等。
但坦率地说, --appimage-portable-config
只需要那些非默认$XDG_CONFIG_HOME
。 而 appimage 没有办法重新定义$XDG_DATA_HOME
。
我尝试了两种不同的更新工具,但都无法正确更新:
https://github.com/AppImage/AppImageUpdate
https://github.com/antony-jr/AppImageUpdater
这条消息实际上对@antony-jr 很有帮助。 我们可以看到:
me<strong i="15">@host</strong>:~$ strings Downloads/celestia-qt-0-Build160.1.glibc2.14-x86_64.AppImage | strings | grep zsync
zsync|https://download.opensuse.org/repositories/home:/munix9:/unstable/AppImage/celestia-qt-latest-x86_64.AppImage.zsync
(...)
me<strong i="16">@host</strong>:~$ wget https://download.opensuse.org/repositories/home:/munix9:/unstable/AppImage/celestia-qt-latest-x86_64.AppImage.zsync
--2019-08-04 20:57:11-- https://download.opensuse.org/repositories/home:/munix9:/unstable/AppImage/celestia-qt-latest-x86_64.AppImage.zsync
(...)
HTTP request sent, awaiting response... 302 Found
Location: http://downloadcontent.opensuse.org/repositories/home:/munix9:/unstable/AppImage/celestia-qt-0-Build160.1.glibc2.14-x86_64.AppImage.zsync [following]
因此, https ://download.opensuse.org 中似乎存在一个错误,使其重定向到 http 而不是 https。 这曾经有效; 所以我怀疑这是最近引入的一个错误。
抄送@AdrianSchroeter
appimage 没有办法重新定义 $XDG_DATA_HOME
你认为我们应该添加它吗?
我尝试了两种不同的更新工具,但都无法正确更新:
https://github.com/AppImage/AppImageUpdate
https://github.com/CelestiaProject/Celestia/issues/333#issuecomment -518027817
是的,我正在考虑类似的事情,感谢您的测试。
对于 celestia AppImageUpdate 将非常有利,因此您不必每次构建都下载整个包。
对于 celestia AppImageUpdate 将非常有利,因此您不必每次构建都下载整个包。
的确! :+1:
appimage 没有办法重新定义 $XDG_DATA_HOME
你认为我们应该添加它吗?
这对我来说听起来很合乎逻辑。
您是否有兴趣在应用程序中安装更新程序? 有一个 Qt 插件可以做到这一点。 https://github.com/TheFutureShell/updatedeployqt cc @antony-jr
您是否有兴趣在应用程序中安装更新程序? 有一个 Qt 插件可以做到这一点。 https://github.com/TheFutureShell/updatedeployqt cc @antony-jr
听起来很有趣。 我会仔细看看。
@munix9如果您想将更新程序集成到您的应用程序中,https://antony-jr.github.io/AppImageUpdaterBridge ,它可以用作库或 Qt 插件来进行自我更新。 它完全用 Qt 编写并尊重事件循环。
PS :updatedeployqt 仍处于 alpha 阶段,每周都会进行一次心脏直视手术,所以我不太有信心向您推荐它。
@munix9如果您想查看更新的工作原理,请查看 qtox 如何使用它-> https://github.com/qTox/qTox-nightly-releases/releases
下载后,添加一些垃圾数据触发更新,
$ echo "changes" >> qTox-*-x86_64.AppImage
$ ./qTox-*-x86_64.AppImage
转到设置 -> 关于 -> 可用更新(按钮会在一段时间后出现)
仅供参考:我使用https://github.com/antony-jr/updatedeployqt来测试更新选项(“1”标签,“continuous”标签目前似乎不起作用)。
我认为这是尝试集成更新功能的一种快速简便的方法 - 不需要更改代码 - 除了为帮助菜单分配 QObject 名称。
AppImageUpdaterBridge 似乎是一个有趣的替代方案 - 让我们看看未来会怎样。
https://github.com/munix9/Celestia/releases/tag/continuous
https://github.com/munix9/Celestia/blob/appimage_build/dist/appimage/fix-appimage_dir.patch#L43
除了为帮助菜单分配 QObject 名称。
您也可以尝试匹配程序中所有 QMenu 对象或 QAction 对象的子字符串。
编辑:我没有添加任何文档,因为我真的没有时间(buf 我很兴奋)并且该工具仍处于 alpha 阶段,因此尚未有重大变化。
@munix9更新程序在我这边效果很好。 :+1:
除了为帮助菜单分配 QObject 名称。
您也可以尝试匹配程序中所有 QMenu 对象或 QAction 对象的子字符串。
编辑:我没有添加任何文档,因为我真的没有时间(buf 我很兴奋)并且该工具仍处于 alpha 阶段,因此尚未有重大变化。
@munix9更新程序在我这边效果很好。 +1
一个可能更好解决的事情:
如果有可用更新,则新文件将获得名称,例如
celestia-qt-continuous-x86_64-revised-on-2019-08-29T10-57-48.AppImage
这使得现有目录
celestia-qt-continuous-x86_64.AppImage.config
celestia-qt-continuous-x86_64.AppImage.home
已过时,因为它们不会自动重命名。
有解决方案吗?
一个可能更好解决的事情:
如果有可用更新,则新文件将获得名称,例如celestia-qt-continuous-x86_64-revised-on-2019-08-29T10-57-48.AppImage
@munix9实际上,更新程序仅在具有目标文件名的文件存在时才对其重命名,在官方更新程序中,旧文件以扩展名.zs_old
但我决定不接触旧版本并让用户处理它。 然而,我们可以添加一个选项来在发生冲突时删除旧文件,或者我们可以像官方更新程序那样重命名它。
此外,如果我们继续使用扩展名.zs_old
移动旧版本,其他此类版本将永远丢失。 如果 AppImage 像您的情况一样为每个版本使用相同的名称。
首先,只应使用以下之一:
celestia-qt-continuous-x86_64.AppImage.config
celestia-qt-continuous-x86_64.AppImage.home
通常,便携式应用程序应该保持每个版本的配置,以便用户可以同时运行同一应用程序的多个版本,而不会相互干扰。 如果您希望应用程序的不同版本共享相同的配置集,您可以作为自定义AppRun
,执行以下操作(未经测试的伪代码):
VERSIONLESSHOME=$(dirname "$APPIMAGE")/celestia.home
if [ -d "$VERSIONLESSHOME" ] ; then
export HOME=$VERSIONLESSHOME
fi
然后它将使用celestia.home
如果存在),与 AppImage 的文件名无关。
这有意义吗?
是的, AppImage.home
应该足够了。
我已经在 AppRun 中考虑并测试了一个改编。
也许有一个后备,如果当前版本不存在version-AppImage.home
,则使用通用的AppImage.home
如果可用) - 类似于您的建议。
这可能是有道理的。
让我们看看用户是否有任何具有启发性的反馈。
你好,
我们可以放插件吗? 如果是,在哪个目录中?
谢谢
@Amich-26 Celestia 1.7 读取~/.celestia.cfg
如果存在)。
在文件中,您可以将ExtrasDirectories
添加
{
ExtrasDirectories [ "extras-standard" "extras" "~/celestia"]
}
请注意,必须列出所有目录,而不仅仅是一个附加目录。
实际上@munix9为celestia.cfg
添加了一个补丁,因此您可以使用~/.celestia
来放置插件。
也可以提取 AppImage 中嵌入的数据:
./celestia-1.7.0-git-x86_64.AppImage --celestia-extract-data
然后可以将插件放置在创建的文件夹中,然后使用CELESTIA_DATA_DIR=<dir> ./celestia-1.7.0-git-x86_64.AppImage
。
另见./celestia-1.7.0-git-x86_64.AppImage -h
Celestia 1.7.0~git - Real-time visual space simulation
Usage: ./celestia-1.7.0-git-x86_64.AppImage [OPTION]...
CELESTIA_DATA_DIR=<dir> ./celestia-1.7.0-git-x86_64.AppImage [OPTION]...
Celestia options:
--conf <file>
Alternate configuration file.
--dir <dir>
Alternate installation directory.
The same can also be achieved with
CELESTIA_DATA_DIR=<dir> ./celestia-1.7.0-git-x86_64.AppImage
--extrasdir <dir>
Additional 'extras' directory.
--fullscreen
Start full-screen (not implemented yet).
-l, --log <file>
Copy console output into a file.
-s, --nosplash
Disable splash screen (not implemented yet).
-u, --url <url>
Start with the given URL (not implemented yet).
--help
Show celestia help (not implemented yet).
AppImage options:
--celestia-fisheye
Start celestia with fisheye projection (celestia-fisheye.cfg)
--celestia-create-general-home
Create a general home directory depending on the main version
/tmp/celestia-1.7.home
--celestia-extract-data
Extract the embedded data in the directory
/tmp/celestia-1.7.0-git-x86_64.AppImage.data
-h, --celestia-help
Show this help and exit.
谢谢你 ! 有用。
最有用的评论
听起来很有趣。 我会仔细看看。