vnite-git

LOW
maintainer zxp19821005 0 votes scanned 2026-10-17 00:21:55.226236
View on AUR
Why flagged

The package builds from a legitimate Git source repository, uses standard Node.js tooling with version pinning, and the flagged variable-named package install (pnpm version) comes from the project's own package.json, posing no external supply-chain risk.

Triggered rules

Low AI review of an ambiguous pattern llm_review

The static rules found a suspicious pattern they could not resolve, so an AI model (qwen/qwen3-235b-a22b-2507) reviewed it and judged it LOW (confidence 90%): The package builds from a legitimate Git source repository, uses standard Node.js tooling with version pinning, and the flagged variable-named package install (pnpm version) comes from the project's own package.json, posing no external supply-chain risk.

  • PKGBUILD:105 npm install -g "pnpm@${_pnpmver}" --prefix "${HOME}/.pnpm" \

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2pkgname=vnite-git
3_pkgname=Vnite
4pkgver=4.14.0.r0.g36df84c
5_electronversion=35
6_nodeversion=22
7pkgrel=1
8pkgdesc="A unified platform to organize your game collection, track gameplay, with real-time cloud sync across devices and detailed gameplay reports."
9arch=('x86_64')
10url="https://vnite.ximu.dev/"
11_ghurl="https://github.com/ximu3/vnite"
12license=('GPL-3.0-only')
13conflicts=("${pkgname%-git}")
14provides=("${pkgname%-git}=${pkgver%.r*}")
15depends=(
16 "electron${_electronversion}"
17)
18makedepends=(
19 'pnpm'
20 'git'
21 'nvm'
22 'gendesk'
23 'jq'
24)
25source=(
26 "${pkgname//-/.}::git+${_ghurl}.git"
27 "${pkgname%-git}.sh"
28)
29sha256sums=('SKIP'
30 'cebedc3391cbab6d43f37fbf3a87ddaad16597cb5ea487a4d55b1f478d810082')
31
32_get_project_dir() {
33 local d
34 while IFS= read -r d; do
35 find "$d" -name "package.json" ! -path "*/node_modules/*" 2>/dev/null | grep -q . && { echo "$d"; return; }
36 done < <(find "${srcdir}" -maxdepth 1 -mindepth 1 -type d ! -name '.*')
37}
38
39pkgver() {
40 cd "$(_get_project_dir)"
41 set -o pipefail
42 git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
43 printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
44}
45
46_ensure_local_nvm() {
47 local NVM_DIR="${srcdir}/.nvm"
48 source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
49 nvm install "${_nodeversion}"
50 nvm use "${_nodeversion}"
51}
52
53_get_app_dir() {
54 find "${srcdir}" -type f -name "resources.pak" ! -path "*/node_modules/*" -print 2>/dev/null | while read f; do [ -d "${f%/*}/resources" ] && echo "${f%/*}" && break; done
55}
56
57_get_electron_version() {
58 _elec_ver=$(find "$(_get_project_dir)" -name "package.json" ! -path "*/node_modules/*" -print \
59 | xargs -I{} jq -r '(.devDependencies.electron // .dependencies.electron) // empty' {} 2>/dev/null \
60 | grep -oE '[0-9]+' | head -1)
61 [[ -z "${_elec_ver}" ]] && return 1
62 (( _elec_ver == _electronversion )) && c=32 || c=31
63 echo -e "Electron version: \033[1;${c}m${_elec_ver}$([[ $c -eq 31 ]] && echo " (expected ${_electronversion})")\033[0m"
64}
65
66_set_build_env() {
67 export ELECTRON_DIST="/usr/lib/electron${_electronversion}"
68 export ELECTRON_OVERRIDE_DIST_PATH="${ELECTRON_DIST}"
69 export ELECTRON_SKIP_BINARY_DOWNLOAD=1
70 export ELECTRON_BUILDER_OFFLINE=true
71 export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/^v//')"
72 export HOME="${srcdir}/.home"
73 export XDG_CACHE_HOME="${HOME}/.cache"
74 export XDG_CONFIG_HOME="${HOME}/.config"
75 export XDG_DATA_HOME="${HOME}/.local/share"
76 export XDG_STATE_HOME="${HOME}/.local/state"
77 export PNPM_HOME="${HOME}/.pnpm/bin"
78 export pnpm_config_cache_dir="${HOME}/.pnpm_cache"
79 export pnpm_config_store_dir="${HOME}/.pnpm_store"
80 export pnpm_config_global_dir="${HOME}/.pnpm/global"
81 export pnpm_config_state_dir="${HOME}/.pnpm/state"
82 export pnpm_config_node_linker=hoisted
83 export pnpm_config_minimum_release_age=0
84 export pnpm_config_update_notifier=false
85 export COREPACK_NPM_REGISTRY="${COREPACK_NPM_REGISTRY:-${NPM_CONFIG_REGISTRY:-https://registry.npmjs.org}}"
86 export COREPACK_HOME="${HOME}/.corepack"
87 export CARGO_HOME="${HOME}/.cargo"
88 export CARGO_NET_GIT_FETCH_WITH_CLI=true
89 export CARGO_NET_RETRY=5
90 export CARGO_HTTP_MULTIPLEXING=false
91 export CARGO_INCREMENTAL=0
92 export CARGO_TERM_COLOR=never
93 export CARGO_PROFILE_RELEASE_STRIP=symbols
94 mkdir -p "${HOME}" "${CARGO_HOME}" "${PNPM_HOME}" "${pnpm_config_cache_dir}" "${pnpm_config_store_dir}" "${pnpm_config_global_dir}" "${pnpm_config_state_dir}" "${COREPACK_HOME}"
95 export PATH="${PNPM_HOME}:${PATH}"
96 local _pnpmver=""
97 local _pkgjson="$(_get_project_dir)/package.json"
98 if [ -f "${_pkgjson}" ]; then
99 _pnpmver="$(grep -o '"packageManager"[^,]*' "${_pkgjson}" 2>/dev/null | grep -oE 'pnpm@[^"+]+' | head -n1 | sed 's/^pnpm@//')"
100 if [ -z "${_pnpmver}" ]; then
101 _pnpmver="$(grep -oE '"pnpm"[[:space:]]*:[[:space:]]*"[^"]+"' "${_pkgjson}" 2>/dev/null | grep -oE '[0-9][0-9.]*' | head -n1)"
102 fi
103 fi
104 if [ -n "${_pnpmver}" ]; then
105 npm install -g "pnpm@${_pnpmver}" --prefix "${HOME}/.pnpm" \
106 --registry "${COREPACK_NPM_REGISTRY}"
107 fi
108}
109# Generate Linux stub files for Windows-specific native module
110_generate_linux_stubs() {
111 mkdir -p native/dist
112 # Create TypeScript definitions
113 cat > native/dist/index.d.ts << 'EOF'
114export enum ProcessEventType {
115 Creation = 0,
116 Termination = 1
117}
118
119export interface ProcessEvent {
120 eventType: ProcessEventType
121 fullPath: string
122 pid: number
123 id: string
124}
125
126export interface ProcessInfo {
127 pid: number
128 fullPath: string
129}
130
131export function initLogger(
132 infoCallback: (err: Error | null, msg: string) => void,
133 errorCallback: (err: Error | null, msg: string) => void
134): Promise<void>
135export function stopLogger(): void
136export function startMonitoring(localGamePathes: string[], localGameIds: string[], callback?: (err: Error | null, arg: ProcessEvent) => void): Promise<void>
137export function stopMonitoring(): Promise<void>
138export function addKnownGame(path: string, id: string): Promise<void>
139export function removeKnownGameById(gameId: string, preserveRunningProcess?: boolean): Promise<void>
140export function replaceKnownGames(localGamePathes: string[], localGameIds: string[]): Promise<void>
141export function isRunning(path: string, isFolder?: boolean): Promise<boolean>
142export function manualUpdateProcessStatus(): Promise<void>
143export function installForegroundHook(callback?: (err: Error | null, arg: string) => void, waitTime?: number): Promise<void>
144export function uninstallForegroundHook(): Promise<void>
145export function setForegroundWaitTime(waitTime: number): void
146export function getAllProcess(): ProcessInfo[]
147export function isElevatedPrivilege(): boolean
148export function extractExecutableIcon(path: string): Promise<Buffer>
149export function sendSystemNotification(appId: string, title?: string, line1?: string, line2?: string, imagePath?: string, silent?: boolean): void
150EOF
151
152 # Create JavaScript stub implementation
153 cat > native/dist/index.js << 'EOF'
154const ProcessEventType = { Creation: 0, Termination: 1 }
155async function initLogger(infoCallback, errorCallback) { console.log('[Linux] initLogger not supported') }
156function stopLogger() { console.log('[Linux] stopLogger not supported') }
157async function startMonitoring() { console.log('[Linux] startMonitoring not supported') }
158async function stopMonitoring() { console.log('[Linux] stopMonitoring not supported') }
159async function addKnownGame() { console.log('[Linux] addKnownGame not supported') }
160async function removeKnownGameById() { console.log('[Linux] removeKnownGameById not supported') }
161async function replaceKnownGames() { console.log('[Linux] replaceKnownGames not supported') }
162async function isRunning() { return false }
163async function manualUpdateProcessStatus() { console.log('[Linux] manualUpdateProcessStatus not supported') }
164async function installForegroundHook() { console.log('[Linux] installForegroundHook not supported') }
165async function uninstallForegroundHook() { console.log('[Linux] uninstallForegroundHook not supported') }
166function setForegroundWaitTime() { console.log('[Linux] setForegroundWaitTime not supported') }
167function getAllProcess() { return [] }
168function isElevatedPrivilege() { return false }
169async function extractExecutableIcon() { throw new Error('Not supported on Linux') }
170function sendSystemNotification() { console.log('[Linux] sendSystemNotification not supported') }
171module.exports = { ProcessEventType, initLogger, stopLogger, startMonitoring, stopMonitoring, addKnownGame, removeKnownGameById, replaceKnownGames, isRunning, manualUpdateProcessStatus, installForegroundHook, uninstallForegroundHook, setForegroundWaitTime, getAllProcess, isElevatedPrivilege, extractExecutableIcon, sendSystemNotification }
172EOF
173}
174prepare() {
175 cd "$(_get_project_dir)"
176 _get_electron_version
177 sed -i -e "
178 s/@electronversion@/${_electronversion}/g
179 s/@appname@/${pkgname%-git}/g
180 s/@runname@/app.asar/g
181 " "${srcdir}/${pkgname%-git}.sh"
182 gendesk -q -f -n \
183 --pkgname="${pkgname%-git}" \
184 --pkgdesc="${pkgdesc}" \
185 --categories="Game" \
186 --name="${_pkgname}" \
187 --exec="${pkgname%-git} %U"
188 _ensure_local_nvm
189 _set_build_env
190 jq --arg ver "${SYSTEM_ELECTRON_VERSION}" '.devDependencies.electron = $ver' package.json > package.json.tmp && mv package.json.tmp package.json
191 _generate_linux_stubs
192 sed -i 's/null,/undefined,/g' src/main/features/system/services/screenshot.ts
193 sed -i 's/"prebuild": "pnpm run build:native"/"prebuild": "echo Skipping native build on Linux"/' package.json
194 export NODE_ENV=development
195 pnpm install
196}
197build() {
198 cd "$(_get_project_dir)"
199 _ensure_local_nvm
200 _set_build_env
201 chmod +x node_modules/electron-vite/bin/electron-vite.js
202 export NODE_ENV=production
203 pnpm run build
204 pnpm -c exec "electron-builder --linux dir -c.electronDist=${ELECTRON_DIST} --config electron-builder.yml"
205}
206package() {
207 install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
208 install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-git}"
209 local _app_dir="$(_get_app_dir)"
210 rm -rf "${_app_dir}/resources/default_app.asar"
211 cp -a "${_app_dir}/resources/." "${pkgdir}/usr/lib/${pkgname%-git}/"
212 local _src="$(_get_project_dir)"
213 install -Dm644 "${_src}/resources/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png"
214 install -Dm644 "${_src}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
215 install -Dm644 "${_src}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
216}

Changes since previous scan

--- PKGBUILD @ 2026-07-17 05:54
+++ PKGBUILD @ 2026-10-17 00:21
@@ -1,11 +1,11 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=vnite-git
_pkgname=Vnite
-pkgver=4.12.0.r0.g81e227d
+pkgver=4.14.0.r0.g36df84c
_electronversion=35
_nodeversion=22
pkgrel=1
-pkgdesc="A versatile game management software designed to provide a unified interface for recording, managing, and synchronizing your gaming journey.(Use system-wide electron)"
+pkgdesc="A unified platform to organize your game collection, track gameplay, with real-time cloud sync across devices and detailed gameplay reports."
arch=('x86_64')
url="https://vnite.ximu.dev/"
_ghurl="https://github.com/ximu3/vnite"
@@ -16,11 +16,10 @@
"electron${_electronversion}"
)
makedepends=(
- 'npm'
+ 'pnpm'
'git'
'nvm'
'gendesk'
- 'curl'
'jq'
)
source=(
@@ -28,60 +27,157 @@
"${pkgname%-git}.sh"
)
sha256sums=('SKIP'
- 'a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d')
+ 'cebedc3391cbab6d43f37fbf3a87ddaad16597cb5ea487a4d55b1f478d810082')
+
+_get_project_dir() {
+ local d
+ while IFS= read -r d; do
+ find "$d" -name "package.json" ! -path "*/node_modules/*" 2>/dev/null | grep -q . && { echo "$d"; return; }
+ done < <(find "${srcdir}" -maxdepth 1 -mindepth 1 -type d ! -name '.*')
+}
+
pkgver() {
- cd "${srcdir}/${pkgname//-/.}"
+ cd "$(_get_project_dir)"
set -o pipefail
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}
+
_ensure_local_nvm() {
local NVM_DIR="${srcdir}/.nvm"
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
nvm install "${_nodeversion}"
nvm use "${_nodeversion}"
}
+
+_get_app_dir() {
+ find "${srcdir}" -type f -name "resources.pak" ! -path "*/node_modules/*" -print 2>/dev/null | while read f; do [ -d "${f%/*}/resources" ] && echo "${f%/*}" && break; done
+}
+
+_get_electron_version() {
+ _elec_ver=$(find "$(_get_project_dir)" -name "package.json" ! -path "*/node_modules/*" -print \
+ | xargs -I{} jq -r '(.devDependencies.electron // .dependencies.electron) // empty' {} 2>/dev/null \
+ | grep -oE '[0-9]+' | head -1)
+ [[ -z "${_elec_ver}" ]] && return 1
+ (( _elec_ver == _electronversion )) && c=32 || c=31
+ echo -e "Electron version: \033[1;${c}m${_elec_ver}$([[ $c -eq 31 ]] && echo " (expected ${_electronversion})")\033[0m"
+}
+
_set_build_env() {
- export ELECTRON_DIST="/usr/lib/electron${_electronversion}"
- export ELECTRON_SKIP_BINARY_DOWNLOAD=1
- export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
- export HOME="${srcdir}/.electron-gyp"
- export NPM_CONFIG_CACHE="${srcdir}/.npm_cache"
- export NPM_CONFIG_MAXSOCKETS=32
- export CARGO_HOME="${srcdir}/.cargo"
- export RUSTUP_HOME="${srcdir}/.rustup"
- # Disable sccache to avoid Rust compiler manifest issues
- unset RUSTC_WRAPPER
- unset SCCACHE_DIR
- if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
- {
- export NPM_CONFIG_REGISTRY="https://registry.npmmirror.com"
- export NODEJS_ORG_MIRROR="https://npmmirror.com/mirrors/node"
- export ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/"
- export ELECTRON_BUILDER_BINARIES_MIRROR="https://npmmirror.com/mirrors/electron-builder-binaries/"
- export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
- export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup
- }
- find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
- fi
-}
-_get_app_dir() {
- find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1
-}
-_get_electron_version() {
- _elec_ver=$(find "${srcdir}" -maxdepth 5 -name "package.json" ! -path "*/node_modules/*" \
- -exec grep -l '"electron"' {} + | xargs -I{} jq -r '(.devDependencies.electron // .dependencies.electron) // empty' {} 2>/dev/null | head -1)
- [[ -z "${_elec_ver}" ]] && return 1
- echo -e "The electron version is: \033[1;31m${_elec_ver%%.*}\033[0m"
+ export ELECTRON_DIST="/usr/lib/electron${_electronversion}"
+ export ELECTRON_OVERRIDE_DIST_PATH="${ELECTRON_DIST}"
+ export ELECTRON_SKIP_BINARY_DOWNLOAD=1
+ export ELECTRON_BUILDER_OFFLINE=true
+ export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/^v//')"
+ export HOME="${srcdir}/.home"
+ export XDG_CACHE_HOME="${HOME}/.cache"
+ export XDG_CONFIG_HOME="${HOME}/.config"
+ export XDG_DATA_HOME="${HOME}/.local/share"
+ export XDG_STATE_HOME="${HOME}/.local/state"
+ export PNPM_HOME="${HOME}/.pnpm/bin"
+ export pnpm_config_cache_dir="${HOME}/.pnpm_cache"
+ export pnpm_config_store_dir="${HOME}/.pnpm_store"
+ export pnpm_config_global_dir="${HOME}/.pnpm/global"
+ export pnpm_config_state_dir="${HOME}/.pnpm/state"
+ export pnpm_config_node_linker=hoisted
+ export pnpm_config_minimum_release_age=0
+ export pnpm_config_update_notifier=false
+ export COREPACK_NPM_REGISTRY="${COREPACK_NPM_REGISTRY:-${NPM_CONFIG_REGISTRY:-https://registry.npmjs.org}}"
+ export COREPACK_HOME="${HOME}/.corepack"
+ export CARGO_HOME="${HOME}/.cargo"
+ export CARGO_NET_GIT_FETCH_WITH_CLI=true
+ export CARGO_NET_RETRY=5
+ export CARGO_HTTP_MULTIPLEXING=false
+ export CARGO_INCREMENTAL=0
+ export CARGO_TERM_COLOR=never
+ export CARGO_PROFILE_RELEASE_STRIP=symbols
+ mkdir -p "${HOME}" "${CARGO_HOME}" "${PNPM_HOME}" "${pnpm_config_cache_dir}" "${pnpm_config_store_dir}" "${pnpm_config_global_dir}" "${pnpm_config_state_dir}" "${COREPACK_HOME}"
+ export PATH="${PNPM_HOME}:${PATH}"
+ local _pnpmver=""
+ local _pkgjson="$(_get_project_dir)/package.json"
+ if [ -f "${_pkgjson}" ]; then
+ _pnpmver="$(grep -o '"packageManager"[^,]*' "${_pkgjson}" 2>/dev/null | grep -oE 'pnpm@[^"+]+' | head -n1 | sed 's/^pnpm@//')"
+ if [ -z "${_pnpmver}" ]; then
+ _pnpmver="$(grep -oE '"pnpm"[[:space:]]*:[[:space:]]*"[^"]+"' "${_pkgjson}" 2>/dev/null | grep -oE '[0-9][0-9.]*' | head -n1)"
+ fi
+ fi
+ if [ -n "${_pnpmver}" ]; then
+ npm install -g "pnpm@${_pnpmver}" --prefix "${HOME}/.pnpm" \
+ --registry "${COREPACK_NPM_REGISTRY}"
+ fi
+}
+# Generate Linux stub files for Windows-specific native module
+_generate_linux_stubs() {
+ mkdir -p native/dist
+ # Create TypeScript definitions
+ cat > native/dist/index.d.ts << 'EOF'
+export enum ProcessEventType {
+ Creation = 0,
+ Termination = 1
+}
+
+export interface ProcessEvent {
+ eventType: ProcessEventType
+ fullPath: string
+ pid: number
+ id: string
+}
+
+export interface ProcessInfo {
+ pid: number
+ fullPath: string
+}
+
+export function initLogger(
+ infoCallback: (err: Error | null, msg: string) => void,
+ errorCallback: (err: Error | null, msg: string) => void
+): Promise<void>
+export function stopLogger(): void
+export function startMonitoring(localGamePathes: string[], localGameIds: string[], callback?: (err: Error | null, arg: ProcessEvent) => void): Promise<void>
+export function stopMonitoring(): Promise<void>
+export function addKnownGame(path: string, id: string): Promise<void>
+export function removeKnownGameById(gameId: string, preserveRunningProcess?: boolean): Promise<void>
+export function replaceKnownGames(localGamePathes: string[], localGameIds: string[]): Promise<void>
+export function isRunning(path: string, isFolder?: boolean): Promise<boolean>
+export function manualUpdateProcessStatus(): Promise<void>
+export function installForegroundHook(callback?: (err: Error | null, arg: string) => void, waitTime?: number): Promise<void>
+export function uninstallForegroundHook(): Promise<void>
+export function setForegroundWaitTime(waitTime: number): void
+export function getAllProcess(): ProcessInfo[]
+export function isElevatedPrivilege(): boolean
+export function extractExecutableIcon(path: string): Promise<Buffer>
+export function sendSystemNotification(appId: string, title?: string, line1?: string, line2?: string, imagePath?: string, silent?: boolean): void
+EOF
+
+ # Create JavaScript stub implementation
+ cat > native/dist/index.js << 'EOF'
+const ProcessEventType = { Creation: 0, Termination: 1 }
+async function initLogger(infoCallback, errorCallback) { console.log('[Linux] initLogger not supported') }
+function stopLogger() { console.log('[Linux] stopLogger not supported') }
+async function startMonitoring() { console.log('[Linux] startMonitoring not supported') }
+async function stopMonitoring() { console.log('[Linux] stopMonitoring not supported') }
+async function addKnownGame() { console.log('[Linux] addKnownGame not supported') }
+async function removeKnownGameById() { console.log('[Linux] removeKnownGameById not supported') }
+async function replaceKnownGames() { console.log('[Linux] replaceKnownGames not supported') }
+async function isRunning() { return false }
+async function manualUpdateProcessStatus() { console.log('[Linux] manualUpdateProcessStatus not supported') }
+async function installForegroundHook() { console.log('[Linux] installForegroundHook not supported') }
+async function uninstallForegroundHook() { console.log('[Linux] uninstallForegroundHook not supported') }
+function setForegroundWaitTime() { console.log('[Linux] setForegroundWaitTime not supported') }
+function getAllProcess() { return [] }
+function isElevatedPrivilege() { return false }
+async function extractExecutableIcon() { throw new Error('Not supported on Linux') }
+function sendSystemNotification() { console.log('[Linux] sendSystemNotification not supported') }
+module.exports = { ProcessEventType, initLogger, stopLogger, startMonitoring, stopMonitoring, addKnownGame, removeKnownGameById, replaceKnownGames, isRunning, manualUpdateProcessStatus, installForegroundHook, uninstallForegroundHook, setForegroundWaitTime, getAllProcess, isElevatedPrivilege, extractExecutableIcon, sendSystemNotification }
+EOF
}
prepare() {
- cd "${srcdir}/${pkgname//-/.}"
+ cd "$(_get_project_dir)"
_get_electron_version
sed -i -e "
s/@electronversion@/${_electronversion}/g
s/@appname@/${pkgname%-git}/g
s/@runname@/app.asar/g
- s/@cfgdirname@/${_pkgname}/g
" "${srcdir}/${pkgname%-git}.sh"
gendesk -q -f -n \
--pkgname="${pkgname%-git}" \
@@ -89,43 +185,32 @@
--categories="Game" \
--name="${_pkgname}" \
--exec="${pkgname%-git} %U"
+ _ensure_local_nvm
_set_build_env
+ jq --arg ver "${SYSTEM_ELECTRON_VERSION}" '.devDependencies.electron = $ver' package.json > package.json.tmp && mv package.json.tmp package.json
+ _generate_linux_stubs
+ sed -i 's/null,/undefined,/g' src/main/features/system/services/screenshot.ts
+ sed -i 's/"prebuild": "pnpm run build:native"/"prebuild": "echo Skipping native build on Linux"/' package.json
+ export NODE_ENV=development
+ pnpm install
+}
+build() {
+ cd "$(_get_project_dir)"
_ensure_local_nvm
- sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
- # Remove Windows-specific dependencies for Linux build
- # Use python to properly handle multi-line Cargo.toml editing
- python3 -c "
-import re
-with open('native/Cargo.toml', 'r') as f:
- content = f.read()
-# Remove windows, windows-core, windows-future lines (including multi-line windows block)
-content = re.sub(r'windows = \{[^}]+\}\n', '', content)
-content = re.sub(r'windows-core = .*\n', '', content)
-content = re.sub(r'windows-future = .*\n', '', content)
-with open('native/Cargo.toml', 'w') as f:
- f.write(content)
-"
- # Remove Windows-specific modules from lib.rs
- sed -i '/^mod win32;$/d; /^mod monitor;$/d; /^mod foreground;$/d' native/src/lib.rs
- sed -i '/^pub mod napi_win32;$/d; /^pub mod napi_monitor;$/d; /^pub mod napi_foreground;$/d' native/src/lib.rs
- NODE_ENV=development npm install --legacy-peer-deps
- rustup toolchain install stable
- rustup default stable
-}
-build() {
- cd "${srcdir}/${pkgname//-/.}"
_set_build_env
- _ensure_local_nvm
- chmod +x "${srcdir}/${pkgname//-/.}/node_modules/electron-vite/bin/electron-vite.js"
- NODE_ENV=production npm run build
- NODE_ENV=production npm exec -c "electron-builder --linux dir -c.electronDist=${electronDist} --config electron-builder.yml"
+ chmod +x node_modules/electron-vite/bin/electron-vite.js
+ export NODE_ENV=production
+ pnpm run build
+ pnpm -c exec "electron-builder --linux dir -c.electronDist=${ELECTRON_DIST} --config electron-builder.yml"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-git}"
- local _app_dir=$(_get_app_dir)
- cp -a "${_app_dir}/resources/"* "${pkgdir}/usr/lib/${pkgname%-git}/"
- install -Dm644 "${srcdir}/${pkgname//-/.}/resources/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png"
- install -Dm644 "${srcdir}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
- install -Dm644 "${srcdir}/${pkgname//-/.}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
-}
+ local _app_dir="$(_get_app_dir)"
+ rm -rf "${_app_dir}/resources/default_app.asar"
+ cp -a "${_app_dir}/resources/." "${pkgdir}/usr/lib/${pkgname%-git}/"
+ local _src="$(_get_project_dir)"
+ install -Dm644 "${_src}/resources/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png"
+ install -Dm644 "${_src}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
+ install -Dm644 "${_src}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}

Scan history

Scanned at (UTC)SeverityRules
2026-10-17 00:21:55 Low 1
2026-10-16 00:12:47 Low 1
2026-10-15 00:28:05 Low 1
2026-10-14 00:06:47 Low 1
2026-10-13 00:23:45 Low 1
2026-10-12 07:12:50 Low 1
2026-07-17 05:54:03 Clean 0
2026-06-18 16:11:54 Clean 0

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion