diff --git a/PKGBUILD b/PKGBUILD index effc884..28d08dc 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,18 +1,17 @@ # Maintainer: Nils Pukropp 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}" < { // --- 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) {