在 18.04 上构建 Vala Gnome3 扩展(indicator-diskman)项目?

在 18.04 上构建 Vala Gnome3 扩展(indicator-diskman)项目?

我想indicator-diskman在 Ubuntu 18.04 上构建 Gnome3 扩展,但遇到了问题。这是我尝试做的:

git clone https://github.com/teejee2008/diskman.git indicator-diskman_git
cd indicator-diskman_git/

这里有几个脚本和一个 makefile。这些似乎是运行脚本的依赖项:

sudo apt install bzr-builddeb
sudo apt install valac

这样,运行脚本的结果是:

$ ./build-source.sh 
bzr: ERROR: Not a branch: "/path/to/indicator-diskman_git/".
Failed

$ ./build-deb-for-dist.sh bionic amd64
bzr: ERROR: Not a branch: "/path/to/indicator-diskman_git/".
Failed
./build-deb-for-dist.sh: line 37: cd: ../builds: No such file or directory
sudo: pbuilder: command not found
Failed

...这确实有道理,因为这是一个 git repo,而不是 bzr repo。

所以我读了build.sh,它基本上是调用make,所以我尝试了make

$ make
cd src; make all
make[1]: Entering directory '/path/to/indicator-diskman_git/src'
#build binaries
valac -X -D'GETTEXT_PACKAGE="indicator-diskman"' --Xcc="-lm" -X -Wl,-rpath,/usr/share/indicator-diskman/libs  --thread DiskIndicator.vala Main.vala MainWindow.vala SettingsWindow.vala Utility/*.vala App/*.vala -o indicator-diskman --pkg glib-2.0 --pkg gio-unix-2.0 --pkg posix --pkg gtk+-3.0 --pkg gee-0.8 --pkg json-glib-1.0 --pkg libxml-2.0 --pkg appindicator3-0.1
error: Package `gee-0.8' not found in specified Vala API directories or GObject-Introspection GIR directories
error: Package `appindicator3-0.1' not found in specified Vala API directories or GObject-Introspection GIR directories
Compilation failed: 2 error(s), 0 warning(s)
makefile:13: recipe for target 'all' failed
make[1]: *** [all] Error 1
make[1]: Leaving directory '/path/to/indicator-diskman_git/src'
makefile:2: recipe for target 'all' failed
make: *** [all] Error 2

...这很奇怪,因为我确实gir1.2-appindicator3-0.1安装了:

$ apt-show-versions -R appindicator3-0.1
gir1.2-appindicator3-0.1:amd64/bionic 12.10.1+18.04.20180322.1-0ubuntu1 uptodate
gir1.2-appindicator3-0.1:i386 not installed
gir1.2-ayatanaappindicator3-0.1:amd64 not installed
gir1.2-ayatanaappindicator3-0.1:i386 not installed
libappindicator3-0.1-cil:amd64 not installed
libappindicator3-0.1-cil:i386 not installed
libappindicator3-0.1-cil-dev:amd64 not installed
libappindicator3-0.1-cil-dev:i386 not installed
monodoc-appindicator3-0.1-manual:all not installed

我想也许我还需要安装:

sudo apt install libappindicator3-0.1-cil  ## installs libappindicator3-0.1-cil libatk3.0-cil libcairo1.10-cil libgdk3.0-cil libgio3.0-cil libglib3.0-cil libgtk3.0-cil libpango3.0-cil

...但即使这样,我仍然会得到error: Packageappindicator3-0.1'未在指定的 Vala API 目录或 GObject-Introspection GIR 目录中找到'(这可能并不奇怪,因为这些 -cil 包似乎与 Mono 语言相关)。

有人能指导我如何在 18.04 上构建此扩展吗?

相关内容