Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions .github/workflows/build-rust-parser-musl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
binary_name: rust-parser-linux-arm-musl

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
chmod +x "staging/${{ matrix.binary_name }}"

- name: Upload binary
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.binary_name }}
path: staging/${{ matrix.binary_name }}
Expand All @@ -71,10 +71,10 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Download all binaries
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: bin/rust-parser
merge-multiple: true
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-rust-parser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
use_cross: true

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
shell: bash

- name: Upload binary
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.binary_name }}
path: staging/${{ matrix.binary_name }}
Expand All @@ -97,10 +97,10 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Download all binaries
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: bin/rust-parser
merge-multiple: true
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-rust-server-audio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
use_cross: true

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
shell: bash

- name: Upload binary
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.binary_name }}
path: staging/${{ matrix.binary_name }}
Expand All @@ -102,10 +102,10 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Download all binaries
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: bin/rust-server-audio
merge-multiple: true
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-webapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 24

- name: Install dependencies
working-directory: webapp
run: npm install
run: npm install --omit=dev

- name: Build Electron app
working-directory: webapp
Expand All @@ -33,7 +33,7 @@ jobs:
run: npx electron-builder --publish never

- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: desktop-${{ matrix.os }}
path: |
Expand All @@ -52,7 +52,7 @@ jobs:

steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: artifacts
merge-multiple: true
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,20 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 24

- name: Install dependencies
run: npm install
- name: Install production dependencies
run: npm install --omit=dev

- name: Prune node_modules
run: npx --yes clean-modules@^3 --yes

- name: Build Electron app
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx electron-builder --publish ${{ startsWith(github.ref, 'refs/tags/v') && 'always' || 'never' }}
run: npx --yes electron-builder@^26.7.0 --publish ${{ startsWith(github.ref, 'refs/tags/v') && 'always' || 'never' }}
4 changes: 2 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
if: "!contains(github.event.release.tag_name, 'DESKTOP_PLAYER')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
registry-url: https://registry.npmjs.org/
Expand Down
127 changes: 0 additions & 127 deletions .github/workflows/test-ffmpeg-bootstrap.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ save/sync-cdn/*
bin/ffmpeg/*
!bin/ffmpeg/README.md

bin/syncthing/*
!bin/syncthing/README.md

bin/rust-parser/*
!bin/rust-parser/README.md
!bin/rust-parser/rust-parser-*
Expand Down
3 changes: 3 additions & 0 deletions bin/syncthing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
syncthing binaries will be downloaded here unless otherwise specified

binaries are only downloaded when federation is enabled
Binary file removed bin/syncthing/syncthing-android
Binary file not shown.
Binary file removed bin/syncthing/syncthing-linux
Binary file not shown.
Binary file removed bin/syncthing/syncthing-osx
Binary file not shown.
Binary file removed bin/syncthing/syncthing.exe
Binary file not shown.
43 changes: 19 additions & 24 deletions build/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import os from 'os';
import { makeDirectory } from 'make-dir';
import * as server from '../src/server.js';
import pkg from 'electron-updater';
const { autoUpdater } = pkg;
Expand All @@ -17,29 +16,14 @@ let updateAlertFlag = false;

const configFile = path.join(app.getPath('userData'), 'save/server-config-v3.json');

if (!fs.existsSync(path.join(app.getPath('userData'), 'image-cache'))) {
makeDirectory(path.join(app.getPath('userData'), 'image-cache'));
}

if (!fs.existsSync(path.join(app.getPath('userData'), 'save'))) {
makeDirectory(path.join(app.getPath('userData'), 'save'));
}

if (!fs.existsSync(path.join(app.getPath('userData'), 'db'))) {
makeDirectory(path.join(app.getPath('userData'), 'db'));
}

if (!fs.existsSync(path.join(app.getPath('userData'), 'logs'))) {
makeDirectory(path.join(app.getPath('userData'), 'logs'));
}

if (!fs.existsSync(path.join(app.getPath('userData'), 'sync'))) {
makeDirectory(path.join(app.getPath('userData'), 'sync'));
}

if (!fs.existsSync(path.join(app.getPath('userData'), 'ffmpeg'))) {
makeDirectory(path.join(app.getPath('userData'), 'ffmpeg'));
}
fs.mkdirSync(path.join(app.getPath('userData'), 'image-cache'), { recursive: true });
fs.mkdirSync(path.join(app.getPath('userData'), 'save'), { recursive: true });
fs.mkdirSync(path.join(app.getPath('userData'), 'db'), { recursive: true });
fs.mkdirSync(path.join(app.getPath('userData'), 'logs'), { recursive: true });
fs.mkdirSync(path.join(app.getPath('userData'), 'sync'), { recursive: true });
fs.mkdirSync(path.join(app.getPath('userData'), 'ffmpeg'), { recursive: true });
fs.mkdirSync(path.join(app.getPath('userData'), 'syncthing-bin'), { recursive: true });
fs.mkdirSync(path.join(app.getPath('userData'), 'sync-jobs'), { recursive: true });

process.on('uncaughtException', (error) => {
if (error.code === 'EADDRINUSE') {
Expand Down Expand Up @@ -83,13 +67,24 @@ function bootServer() {
if (program.storage.syncConfigDirectory === undefined) {
program.storage.syncConfigDirectory = path.join(app.getPath('userData'), 'sync');
}
if (program.storage.syncJobsDirectory === undefined) {
program.storage.syncJobsDirectory = path.join(app.getPath('userData'), 'sync-jobs');
}

// Set ffmpeg directory for transcode
if (!program.transcode) { program.transcode = {}; }
if (program.transcode.ffmpegDirectory === undefined) {
program.transcode.ffmpegDirectory = path.join(app.getPath('userData'), 'ffmpeg');
}

// Set syncthing binary directory for federation (writable path outside the
// read-only app bundle on macOS). syncthing gets downloaded here on first
// federation enable.
if (!program.federation) { program.federation = {}; }
if (program.federation.syncthingBinaryDirectory === undefined) {
program.federation.syncthingBinaryDirectory = path.join(app.getPath('userData'), 'syncthing-bin');
}

// Save modified config
fs.writeFileSync(configFile, JSON.stringify(program, null, 2), 'utf8');

Expand Down
Loading