Skip to content

Commit 6281304

Browse files
committed
ci: Add GitHub Actions workflow for build and release
1 parent 2e3913b commit 6281304

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

main.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,36 @@
1+
const { app } = require('electron');
12

2-
const { app, BrowserWindow, ipcMain, Menu, clipboard, dialog, shell, protocol } = require('electron');
3+
// Решает проблему с песочницей на Linux для AppImage.
4+
// Мы добавляем флаг до того, как Electron успеет полностью инициализироваться.
5+
if (process.platform === 'linux') {
6+
app.commandLine.appendSwitch('--no-sandbox');
7+
}
8+
9+
// Теперь идут все остальные require
10+
const { BrowserWindow, ipcMain, Menu, clipboard, dialog, shell, protocol } = require('electron');
311
const path = require('path');
412
const fs = require('fs');
513
const fsPromises = require('fs').promises;
614
const net = require('net');
715
const os = require('os');
816
const { spawn, exec } = require('child_process');
9-
const axios =require('axios');
17+
const axios = require('axios');
1018
const { Client } = require('ssh2');
1119
const WebSocket = require('ws');
1220
const crypto = require('crypto');
1321
const ffmpeg = require('@ffmpeg-installer/ffmpeg');
1422
const keytar = require('keytar');
1523
const { autoUpdater } = require('electron-updater');
1624

17-
if (process.platform === 'linux') {
18-
app.commandLine.appendSwitch('--no-sandbox');
19-
}
20-
21-
25+
// Мы уже добавили флаг --no-sandbox выше, поэтому этот блок больше не нужен.
26+
// app.commandLine.appendSwitch('--no-sandbox'); // УДАЛЕНО
2227

2328
app.commandLine.appendSwitch('force_high_performance_gpu');
2429

25-
if (process.platform === 'linux') {
26-
app.commandLine.appendSwitch('--no-sandbox');
27-
}
30+
// Второй дублирующий блок тоже удален.
31+
// if (process.platform === 'linux') {
32+
// app.commandLine.appendSwitch('--no-sandbox');
33+
// }
2834

2935
const ffmpegPath = ffmpeg.path.replace('app.asar', 'app.asar.unpacked');
3036

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openipc-dashboard",
3-
"version": "2.4.5",
3+
"version": "2.4.6",
44
"description": "App for managing OpenIPC cameras",
55
"main": "main.js",
66
"scripts": {

0 commit comments

Comments
 (0)