feat/makepkg + project structure #12

Open
nvrl wants to merge 15 commits from feat/makepkg into main
2 changed files with 22 additions and 16 deletions
Showing only changes of commit c1fd7cee49 - Show all commits

View File

@@ -1,18 +1,17 @@
# Maintainer: Nils Pukropp <nils@narl.io>
pkgname=ultimate-ban-tracker
pkgver=1.3.3
pkgrel=3
pkgrel=4
pkgdesc="Professional Steam Account Manager & Ban Tracker"
arch=('x86_64')
url="https://narl.io"
license=('custom:Personal Use and Non-Commercial')
depends=('electron' 'nodejs' 'npm' 'libxss' 'nss' 'libxtst' 'libappindicator-gtk3')
depends=('electron' 'nodejs' 'npm' 'libxss' 'nss' 'libxtst' 'libappindicator-gtk3' 'libsecret')
makedepends=('imagemagick')
source=("ultimate-ban-tracker-${pkgver}.tar.gz::https://git.narl.io/nvrl/ultimate-ban-tracker/archive/v${pkgver}.tar.gz")
sha256sums=('SKIP')
build() {
# The Gitea archive extracts to a folder named 'ultimate-ban-tracker'
cd "${srcdir}/ultimate-ban-tracker"
cd frontend
@@ -37,10 +36,15 @@ package() {
# Copy the unpacked linux build
cp -r release/linux-unpacked/* "${pkgdir}/usr/lib/${pkgname}/"
# Create a wrapper script instead of a direct symlink
# The actual binary produced by electron-builder is 'ultimate-ban-tracker-desktop'
# Fix permissions for chrome-sandbox (Crucial for Arch)
chmod 4755 "${pkgdir}/usr/lib/${pkgname}/chrome-sandbox"
# Create a more robust wrapper script
cat > "${pkgdir}/usr/bin/${pkgname}" <<EOF
#!/bin/bash
# Electron apps on Wayland sometimes need specific flags for the tray
export ELECTRON_OZONE_PLATFORM_HINT=auto
export XDG_CURRENT_DESKTOP=Unity
exec /usr/lib/${pkgname}/${pkgname}-desktop "\$@"
EOF
chmod +x "${pkgdir}/usr/bin/${pkgname}"
@@ -58,7 +62,7 @@ Comment=Professional Steam Account Manager & Ban Tracker
StartupWMClass=${pkgname}-desktop
EOF
# Install Icon
# Install Icons
install -m644 "assets-build/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
# Install License

View File

@@ -94,22 +94,25 @@ const initBackend = () => {
// --- System Tray ---
const createTray = () => {
const possiblePaths = [
'/usr/share/pixmaps/ultimate-ban-tracker.png', // System installed (highest priority)
path.join(__dirname, '..', 'assets-build', 'icon.png'),
path.join(__dirname, '..', 'assets-build', 'icon.svg'),
'/usr/share/pixmaps/ultimate-ban-tracker.png', // System installed
path.join(process.resourcesPath, 'assets-build', 'icon.png'),
path.join(app.getAppPath(), 'assets-build', 'icon.png')
path.join(app.getAppPath(), 'assets-build', 'icon.png'),
path.join(__dirname, '..', 'assets-build', 'icon.png')
];
let iconPath = '';
for (const p of possiblePaths) {
if (fs.existsSync(p)) { iconPath = p; break; }
if (p && fs.existsSync(p)) { iconPath = p; break; }
}
console.log(`[Tray] Resolved icon path: ${iconPath || 'NONE FOUND'}`);
console.log(`[Tray] Attempting to initialize with icon: ${iconPath || 'NONE FOUND'}`);
if (!iconPath) {
console.warn(`[Tray] FAILED: No valid icon found.`);
// Fallback to a native empty icon just to avoid crashing if possible
try {
tray = new Tray(nativeImage.createEmpty());
} catch (e) {}
return;
}
@@ -118,19 +121,18 @@ const createTray = () => {
tray = new Tray(icon);
tray.setToolTip('Ultimate Ban Tracker');
// Linux Fix: Some DEs need this to show the menu correctly
if (process.platform === 'linux') {
tray.setIgnoreMouseEvents(false);
}
tray.on('click', () => { if (mainWindow) { mainWindow.show(); mainWindow.focus(); } });
// Load initial themed icon if possible
// Force initial menu build
updateTrayMenu();
const config = store.get('serverConfig');
if (config?.theme) {
setAppIcon(config.theme);
} else {
updateTrayMenu();
}
console.log(`[Tray] Successfully initialized`);
} catch (e: any) {