Skip to content
Merged

Test #16

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
652e059
build: cible uniquement linux-unpacked (dir) pour electron-builder
Shikakiben Dec 29, 2025
4968b80
chore: ajoute package-lock.json pour CI
Shikakiben Dec 29, 2025
5a41968
chore: ajoute eslint en devDependency pour CI lint
Shikakiben Dec 29, 2025
41c2562
chore: sync local manual changes
Shikakiben Dec 29, 2025
6ac9993
chore: shallow clone (--depth 1) branche test dans script d'installation
Shikakiben Dec 29, 2025
32e6120
chore: sync local manual changes
Shikakiben Dec 29, 2025
91699de
chore: move start-am-gui.sh to repo root and keep user changes
Shikakiben Dec 29, 2025
ff7dcbb
chore: sync manual changes
Shikakiben Dec 29, 2025
a59523e
chore: sync recent manual changes
Shikakiben Dec 29, 2025
97bef8d
chore: sync manual changes
Shikakiben Dec 30, 2025
ce9b618
Mise à jour scripts et dépendances
Shikakiben Dec 30, 2025
9e953af
Prise en compte des derniers changements (make-appimage)
Shikakiben Dec 30, 2025
2811409
ci: fix AppImage workflow (artifact upload/download) and update get-d…
Shikakiben Dec 30, 2025
348671e
wip: modifications locales workflow et scripts
Shikakiben Dec 30, 2025
0b490ca
ci: upgrade GitHub Actions artifacts actions to v4
Shikakiben Dec 30, 2025
431fe0c
wip: update workflow
Shikakiben Dec 30, 2025
348308f
chore: update appimage workflow
Shikakiben Dec 30, 2025
688cc3f
ci: ensure build waits for linux-unpacked artifact (add needs)
Shikakiben Dec 31, 2025
60669e1
chore: save local changes
Shikakiben Dec 31, 2025
bcd079f
chore: persist local changes
Shikakiben Dec 31, 2025
7701259
chore: save local script changes
Shikakiben Dec 31, 2025
55dcef9
chore: save local changes
Shikakiben Dec 31, 2025
e427f86
ci: add patch-package for custom @homebridge/node-pty-prebuilt-multia…
Shikakiben Dec 31, 2025
688a2d2
ci: consolidate workflow with prebuilds for glibc/musl compatibility
Shikakiben Dec 31, 2025
9b7fba7
fix: skip electron-builder install-app-deps in CI to avoid issues wit…
Shikakiben Dec 31, 2025
dd2dd00
chore: update package-lock.json after adding patch-package
Shikakiben Dec 31, 2025
a1888cd
fix: correct postinstall script to avoid exit code 1 in CI
Shikakiben Dec 31, 2025
036adf2
fix: change glibc prebuild container to ubuntu:20.04 for Node 22 comp…
Shikakiben Dec 31, 2025
d26a9df
fix: add curl and bash to Alpine build tools for nvm
Shikakiben Dec 31, 2025
74101bc
fix: add curl to Ubuntu build tools for nvm
Shikakiben Dec 31, 2025
da2e9c3
fix: install curl in Setup Node for glibc to ensure availability
Shikakiben Dec 31, 2025
462d165
ci: fix nvm usage, always source nvm for node/npm in each step
Shikakiben Dec 31, 2025
b552fc5
ci: simplifie les jobs de build en fusionnant nvm, install et rebuild…
Shikakiben Dec 31, 2025
806a96a
ci: confirm electron-rebuild in prebuild jobs
Shikakiben Dec 31, 2025
2d6a056
ci: use node:22-alpine for musl job and remove nvm install
Shikakiben Dec 31, 2025
9d38ee1
ci: clear all prebuilds before placing new ones
Shikakiben Dec 31, 2025
6ecce9a
ci: fail early if placed prebuilds missing (no fallback rebuild) and …
Shikakiben Dec 31, 2025
c7c6f72
ci: run electron-rebuild inside module dir (glibc/musl) with --force …
Shikakiben Dec 31, 2025
24001c8
ci: run electron-rebuild in-module (no silent fail) and copy built pt…
Shikakiben Dec 31, 2025
c18e4fc
ci: simplify prebuild steps — run rebuild in-module and validate by f…
Shikakiben Dec 31, 2025
c8659fb
fix: separate patch application from prebuild compilation
Shikakiben Jan 2, 2026
dc2baba
ci: use ubuntu:18.04 for better glibc compatibility
Shikakiben Jan 2, 2026
9e73947
ci: revert to ubuntu:20.04 and simplify action references
Shikakiben Jan 2, 2026
c5ef774
ci: simplify gcc setup with gcc-10 from ubuntu repos
Shikakiben Jan 2, 2026
bc1bec1
fix: simplify npx patch-package execution
Shikakiben Jan 2, 2026
264f760
refactor: optimize AppImage build process
Shikakiben Jan 2, 2026
e91c5cd
fix: configure quick-sharun with main binary analysis
Shikakiben Jan 2, 2026
7e0d34a
refactor: restructure quick-sharun workflow
Shikakiben Jan 2, 2026
89cbf66
fix: correct file paths for AppImage assets
Shikakiben Jan 2, 2026
4208bed
refactor: reorganize AppDir structure with bin subfolder
Shikakiben Jan 2, 2026
fd49636
test: simplify AppImage creation without dependency deployment
Shikakiben Jan 2, 2026
2d3ccc4
fix: enable dependency scanning to create AppRun properly
Shikakiben Jan 2, 2026
3287310
fix: update AppDir structure to use bin/ subdirectory
Shikakiben Jan 2, 2026
b2e7b67
fix: gestion GPU AppImage, restart réel, support --disable-gpu, debug…
Shikakiben Jan 2, 2026
9b4bee0
chore: update make-appimage.sh
Shikakiben Jan 2, 2026
cfaa26d
fix: harmonisation structure AppDir, desktop et workflow
Shikakiben Jan 3, 2026
b4ac399
feat: ajoute AppRun généré pour référence ou debug
Shikakiben Jan 3, 2026
99a3d46
fix: mise à jour scripts - copie AppRun dans AppDir et désactivation …
Shikakiben Jan 3, 2026
9409d91
fix: ajustements structure AppDir et quick-sharun
Shikakiben Jan 3, 2026
9680571
fix: test quick-sharun sur .DirIcon pour debug AppRun/AppImage
Shikakiben Jan 3, 2026
eff9eee
chore: nettoyage du repo (suppression AM-INSTALLER et AppRun inutiles)
Shikakiben Jan 3, 2026
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
85 changes: 83 additions & 2 deletions .github/workflows/appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Anylinux-AppImage
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true

env:
VERSION: beta-0.${{ github.run_number }}

on:
push:
branches:
Expand All @@ -10,10 +14,57 @@ on:
- cron: "0 7 1/21 * *" # We default to rebuilding every 21 days, change this to your liking
workflow_dispatch: {}


jobs:
build-prebuild-glibc:
name: Build prebuild glibc
runs-on: ubuntu-latest
container: ubuntu:20.04
steps:
- uses: actions/checkout@v5
- name: Install build tools
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update && apt-get install -y build-essential python3 gcc-10 g++-10 curl
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100
- name: build AM-GUI
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
. "$HOME/.nvm/nvm.sh"
nvm install 22
node -v
npm -v
npm install --ignore-scripts
npx electron-rebuild --force
- name: Upload prebuild
uses: actions/upload-artifact@v5
with:
name: prebuild-glibc
path: node_modules/@homebridge/node-pty-prebuilt-multiarch/build/Release/pty.node

build-prebuild-musl:
name: Build prebuild musl
runs-on: ubuntu-latest
container: node:22-alpine
steps:
- uses: actions/checkout@v5
- name: Install build tools
run: apk add --no-cache python3 make g++ linux-headers
- name: build AM-GUI
run: |
npm install --ignore-scripts
npx electron-rebuild --force
- name: Upload prebuild
uses: actions/upload-artifact@v5
with:
name: prebuild-musl
path: node_modules/@homebridge/node-pty-prebuilt-multiarch/build/Release/pty.node

build:
name: "${{ matrix.name }} (${{ matrix.arch }})"
runs-on: ${{ matrix.runs-on }}
needs: [build-prebuild-glibc, build-prebuild-musl]
strategy:
matrix:
include:
Expand All @@ -23,12 +74,42 @@ jobs:
# comment out these 3 lines if aarch64 is not wanted
# - runs-on: ubuntu-24.04-arm
# name: Build AppImage
# arch: aarch64
# arch: aarch64

container: ghcr.io/pkgforge-dev/archlinux:latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@v5
- name: Preparing Container
uses: pkgforge-dev/anylinux-setup-action@8872fabe63f9a00b35e25b2f46da62a05afc9a7d # v1
- name: Setup Node
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
. "$HOME/.nvm/nvm.sh"
nvm install 22
node -v
npm -v
npm install
npx patch-package
- name: Download prebuilds glibc
uses: actions/download-artifact@v5
with:
name: prebuild-glibc
path: temp-glibc
- name: Download prebuilds musl
uses: actions/download-artifact@v5
with:
name: prebuild-musl
path: temp-musl
- name: Place prebuilds
run: |
rm -rf node_modules/@homebridge/node-pty-prebuilt-multiarch/prebuilds
mkdir -p node_modules/@homebridge/node-pty-prebuilt-multiarch/prebuilds/linux-x64
cp temp-glibc/pty.node node_modules/@homebridge/node-pty-prebuilt-multiarch/prebuilds/linux-x64/pty.node
cp temp-musl/pty.node node_modules/@homebridge/node-pty-prebuilt-multiarch/prebuilds/linux-x64/pty-musl.node
- name: Run dist
run: |
. "$HOME/.nvm/nvm.sh"
npm run dist
- name: Install Dependencies
run: /bin/sh ./scripts/get-dependencies.sh
- name: Make AppImage
Expand Down
2 changes: 1 addition & 1 deletion AM-GUI.desktop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Name=AM-GUI
Exec=bin/start-am-gui.sh
Exec=am-gui %U
Icon=AM-GUI.png
StartupWMClass=AM-GUI
Terminal=false
Expand Down
106 changes: 0 additions & 106 deletions AM-INSTALLER

This file was deleted.

5 changes: 0 additions & 5 deletions bin/start-am-gui.sh

This file was deleted.

38 changes: 32 additions & 6 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Fixe les variables d'environnement terminal si absentes (utile pour AppImage)
if (!process.env.TERM) process.env.TERM = 'xterm-256color';
if (!process.env.COLORTERM) process.env.COLORTERM = 'truecolor';

const { app, BrowserWindow, ipcMain, Menu, protocol, shell } = require('electron');
const path = require('path');
const fs = require('fs');
Expand Down Expand Up @@ -37,16 +41,32 @@ if (!gotTheLock) {
}

// --- Gestion accélération GPU (doit être AVANT app.whenReady) ---
// Vérifier d'abord les arguments de ligne de commande
const hasDisableGpuFlag = process.argv.includes('--disable-gpu');

let disableGpuPref = false;
try {
const prefPath = path.join(app.getPath('userData'), 'gpu-pref.json');
console.log('[GPU DEBUG] Checking GPU pref file at:', prefPath);
if (fs.existsSync(prefPath)) {
const raw = fs.readFileSync(prefPath, 'utf8');
console.log('[GPU DEBUG] File content:', raw);
disableGpuPref = JSON.parse(raw).disableGpu === true;
console.log('[GPU DEBUG] disableGpuPref parsed to:', disableGpuPref);
} else {
console.log('[GPU DEBUG] File does not exist');
}
} catch(_){ }
if (disableGpuPref && typeof app.disableHardwareAcceleration === 'function') {
} catch(e){
console.log('[GPU DEBUG] Error reading GPU pref:', e);
}

// Désactiver GPU si demandé par flag CLI ou par préférence
const shouldDisableGpu = hasDisableGpuFlag || disableGpuPref;
if (shouldDisableGpu && typeof app.disableHardwareAcceleration === 'function') {
console.log('[GPU DEBUG] Calling app.disableHardwareAcceleration() - reason:', hasDisableGpuFlag ? 'CLI flag' : 'user preference');
app.disableHardwareAcceleration();
} else {
console.log('[GPU DEBUG] NOT calling app.disableHardwareAcceleration(), shouldDisable:', shouldDisableGpu, 'function exists:', typeof app.disableHardwareAcceleration === 'function');
}

const errorLogPath = path.join(app.getPath('userData'), 'error.log');
Expand Down Expand Up @@ -209,7 +229,7 @@ function buildSandboxAnswerScript(shouldConfigure, dirSelections, customPath) {

function runSandboxTask(sender, { pm, action, args, stdinScript, appName }) {
return new Promise((resolve) => {
const pty = require('node-pty');
const pty = require('@homebridge/node-pty-prebuilt-multiarch');
const id = `${action}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 7)}`;
const env = Object.assign({}, process.env, {
TERM: 'xterm',
Expand Down Expand Up @@ -309,6 +329,12 @@ ipcMain.handle('set-gpu-pref', async (_event, val) => {
} catch(e){ return { ok:false, error: e.message||String(e) }; }
});

// IPC pour redémarrer l'application (utilisé après changement GPU)
ipcMain.handle('restart-app', async () => {
app.relaunch();
app.quit();
});

function createWindow () {
// Détection simple de l'environnement de bureau pour stylage léger
function detectDesktopEnv() {
Expand Down Expand Up @@ -463,7 +489,7 @@ ipcMain.handle('am-action', async (event, action, software) => {

return new Promise((resolve) => {
try {
const pty = require('node-pty');
const pty = require('@homebridge/node-pty-prebuilt-multiarch');
const env = Object.assign({}, process.env, {
TERM: 'xterm',
COLS: '80',
Expand Down Expand Up @@ -543,7 +569,7 @@ ipcMain.handle('install-start', async (event, name) => {
const startedAt = Date.now();
let stdoutRemainder = '';
let stderrRemainder = '';
const pty = require('node-pty');
const pty = require('@homebridge/node-pty-prebuilt-multiarch');
const env = Object.assign({}, process.env, {
TERM: 'xterm',
COLS: '80',
Expand Down Expand Up @@ -695,7 +721,7 @@ ipcMain.handle('updates-start', async (event) => {
const id = Date.now().toString(36) + '-' + Math.random().toString(36).slice(2,8);
let child;
let output = '';
const pty = require('node-pty');
const pty = require('@homebridge/node-pty-prebuilt-multiarch');
const env = Object.assign({}, process.env, {
TERM: 'xterm',
COLS: '80',
Expand Down
Loading
Loading