Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fpm
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
--url "https://www.zerotier.com"
--maintainer "ZeroTier, Inc <contact@zerotier.com>"

target/release/zerotier_desktop_ui=/usr/bin/zerotier_desktop_ui ZeroTierIcon.png=/usr/share/zerotier/ZeroTierIcon.png zerotier-ui.desktop=/usr/share/applications/zerotier-ui.desktop
target/release/zerotier_desktop_ui=/usr/bin/zerotier_desktop_ui zerotier.png=/usr/share/icons/hicolor/512x512/apps/zerotier.png zerotier-ui.desktop=/usr/share/applications/zerotier-ui.desktop

48 changes: 48 additions & 0 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build Arch Package & AppImage (Git)

on:
workflow_dispatch:

jobs:
build:
name: Build with makepkg
runs-on: ubuntu-latest

container:
image: archlinux:latest

steps:
- name: Install base dependencies
run: |
pacman -Syu --noconfirm archlinux-keyring
pacman -Syu --noconfirm base-devel git sudo wget zsync

- name: Create build user
run: |
useradd -m builder
echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

- name: Checkout repository
uses: actions/checkout@v4

- name: Fix permissions
run: chown -R builder:builder .

- name: Build package (makepkg -si)
run: |
sudo -u builder bash <<'EOF'
set -e
cd pkg/git
makepkg -si --noconfirm
cd ../AppImage/
chmod +x AppImage.sh
./AppImage.sh
EOF

- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: arch-package
path: |
pkg/git/*.pkg.tar.zst
pkg/AppImage/dist/*.AppImage
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,23 @@
*.exe
*.deb
.vscode/
*.kate-swp

# git dir
pkg/git/*.tar.zst
pkg/git/pkg
pkg/git/src
pkg/git/cargo-home
pkg/git/DesktopUI

# AppImage dir
pkg/AppImage/*.tar.zst
pkg/AppImage/.MTREE
pkg/AppImage/.PKGINFO
pkg/AppImage/.BUILDINFO
pkg/AppImage/usr/
pkg/AppImage/AppDir/
pkg/AppImage/quick-sharun

# dist dir
pkg/AppImage/dist
Binary file removed ZeroTierIcon.png
Binary file not shown.
31 changes: 31 additions & 0 deletions pkg/AppImage/AppImage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

# You might need to restart your pc if sharun doesn't create `AppDir` in this directory (It should create dirs on its own)

# Run git.yml and extract the pkg.tar.zst generated from that to the folder this .sh file is in. As a result a folder named `usr` should be in the same folder as this script.
set -eu

ARCH="$(uname -m)"
SHARUN="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/main/useful-tools/quick-sharun.sh"

export ADD_HOOKS="self-updater.bg.hook"
#export UPINFO="gh-releases-zsync|${GITHUB_REPOSITORY%/*}|${GITHUB_REPOSITORY#*/}|latest|*$ARCH.AppImage.zsync"
export OUTNAME=zerotier-desktop-ui-anylinux-"$ARCH".AppImage
export DESKTOP=/usr/share/applications/zerotier-ui.desktop
export ICON=/usr/share/icons/hicolor/512x512/apps/zerotier.png
export OUTPATH=./dist

#Remove leftovers
rm -rf AppDir dist appinfo

# ADD LIBRARIES
wget --retry-connrefused --tries=30 "$SHARUN" -O ./quick-sharun
chmod +x ./quick-sharun

# Point to binaries
./quick-sharun /usr/bin/zerotier_desktop_ui

# Make AppImage
./quick-sharun --make-appimage

echo "All Done!"
37 changes: 37 additions & 0 deletions pkg/git/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Maintainer: twig <fatihbakal7@protonmail.com>

: ${CARGO_HOME:=$SRCDEST/cargo-home}
: ${CARGO_TARGET_DIR:=target}
: ${RUSTUP_TOOLCHAIN:=stable}
export CARGO_HOME CARGO_TARGET_DIR RUSTUP_TOOLCHAIN

pkgname=zerotier-desktop-ui-git
pkgver=1.8.4.r103.gb2a7a30
pkgrel=1
pkgdesc='Official ZeroTier Desktop Tray Application and UI'
url='https://github.com/zerotier/DesktopUI'
source=('git+https://github.com/zerotier/DesktopUI.git')
arch=('any')
license=('MPL2')
makedepends=('rust' 'meson' 'git' 'perl' 'nasm')
depends=('zerotier-one' 'webkit2gtk' 'libappindicator-gtk3' 'libayatana-appindicator' 'gtk3' 'glib2')
conflicts=('zerotier-desktop-ui')
options=('!lto')
sha256sums=(SKIP)

build () {
cd DesktopUI
make official
}

package() {
cd DesktopUI
install -Dm755 release/release/zerotier_desktop_ui "${pkgdir}/usr/bin/zerotier_desktop_ui"
install -Dm644 zerotier-ui.desktop "${pkgdir}/usr/share/applications/zerotier-ui.desktop"
install -Dm644 zerotier.png "${pkgdir}/usr/share/icons/hicolor/512x512/apps/zerotier.png"
}

pkgver() {
cd DesktopUI
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
9 changes: 6 additions & 3 deletions zerotier-ui.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Type=Application
Encoding=UTF-8
Name=ZeroTier UI
Exec=/usr/bin/zerotier_desktop_ui
Icon=/usr/share/zerotier/ZeroTierIcon.png
Categories=System;
Exec=zerotier_desktop_ui
StartupNotify=false
StartupWMClass=zerotier_desktop_ui
Terminal=false
Icon=zerotier
Categories=Network;System;
Binary file added zerotier.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.