Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ DEBUG_ELECTRON=true
# OPTIONAL SETTINGS (main — VITE_* figées au build)
# ===========================================
VITE_WINDOW_WIDTH=1200
VITE_WINDOW_HEIGHT=800
VITE_WINDOW_HEIGHT=750
VITE_ENABLE_DEVTOOLS=false
VITE_ELECTRON_ENABLE_LOGGING=true

43 changes: 43 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,46 @@ VITE_ENABLE_DEVTOOLS=true
# Logs fichier au niveau debug
VITE_ELECTRON_ENABLE_LOGGING=true

# ===========================================
# HTTP / DOWNLOAD / GAME (main process)
# ===========================================
# Timeouts in milliseconds
# VITE_HTTP_TIMEOUT_API_MS=8000
# VITE_HTTP_TIMEOUT_VERSION_PING_MS=5000
# VITE_HTTP_TIMEOUT_GITHUB_MS=10000
# VITE_DOWNLOAD_TIMEOUT_MS=600000
# VITE_GAME_PROCESS_POLL_MS=2000

# Optional download host (defaults to API base when empty)
# VITE_GAME_DOWNLOAD_BASE_UNIVERSE=
# VITE_GAME_DOWNLOAD_BASE_TESTING=

# Cachet status API ids (defaults: component 3, metric 2)
# VITE_STATUS_COMPONENT_ID_UNIVERSE=3
# VITE_STATUS_COMPONENT_ID_TESTING=3
# VITE_STATUS_METRIC_ID_UNIVERSE=2
# VITE_STATUS_METRIC_ID_TESTING=2

# Game install layout
# VITE_GAME_INSTALL_SUBDIR=DyingStar
# VITE_GAME_EXE_WINDOWS=DyingStar.exe
# VITE_GAME_EXE_LINUX=DyingStar.x86_64
# VITE_GAME_EXE_DARWIN=DyingStar.app

# OAuth / custom protocol
# VITE_APP_PROTOCOL=dyingstar
# VITE_AUTH_CLIENT_ID=dyingstar-launcher
# VITE_AUTH_REALM=dyingstar
# VITE_AUTH_REDIRECT_URI=dyingstar://auth/callback
# VITE_DOWNLOAD_USER_AGENT=DyingStar-Launcher/1.0

# Window max size when auto-fitting content
# VITE_WINDOW_MAX_WIDTH=1920
# VITE_WINDOW_MAX_HEIGHT=1200

# ===========================================
# UI TIMING (renderer)
# ===========================================
# VITE_UI_TOAST_DURATION_MS=3800
# VITE_UI_SOCIAL_PANEL_CLOSE_MS=1200

125 changes: 125 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: Build & Deploy Launcher

on:
push:
branches:
- develop
tags:
- 'v*'
pull_request:

jobs:
check:
name: Lint & Typecheck
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Lint
run: pnpm run lint

- name: Typecheck
run: pnpm run typecheck

build:
name: Build (${{ matrix.os }})
needs: check
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
cmd: build:linux
artifact_name: build-linux
- os: windows-latest
cmd: build:win
artifact_name: build-windows
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Set NODE_ENV to production
shell: bash
run: sed -i 's/NODE_ENV=development/NODE_ENV=production/' .env

- name: Build
run: pnpm run ${{ matrix.cmd }}

- name: Upload Linux artifacts
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: |
release/*.AppImage
release/*.rpm
release/*.deb
if-no-files-found: error
retention-days: ${{ github.event_name == 'pull_request' && 1 || 7 }}

- name: Upload Windows artifacts
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: release/*.exe
if-no-files-found: error
retention-days: ${{ github.event_name == 'pull_request' && 1 || 7 }}

release:
name: Create GitHub Release
needs: build
if: github.ref_type == 'tag'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Get version
id: version
run: echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT

- name: Download Linux artifacts
uses: actions/download-artifact@v4
with:
name: build-linux
path: artifacts/

- name: Download Windows artifacts
uses: actions/download-artifact@v4
with:
name: build-windows
path: artifacts/

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
"artifacts/Dying_Star_Launcher Setup ${{ steps.version.outputs.version }}.exe"
artifacts/Dying_Star_Launcher-${{ steps.version.outputs.version }}.AppImage
artifacts/dying-star-launcher-${{ steps.version.outputs.version }}.x86_64.rpm
artifacts/dying-star-launcher-${{ steps.version.outputs.version }}_amd64.deb
53 changes: 22 additions & 31 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,44 +1,35 @@
# Dependencies
node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*
node_modules/
.pnpm-store/

# Logs & cache
*.log
logs/
.eslintcache

# Next.js
.next/
out
# Environment (secrets — ne jamais committer)
.env
.env.local
.env.*.local

# Builds Electron / Vite
out/
dist/
release/
build/

# Production builds
dist
# Archives
*.tgz

# Environment variables
.env.local
.env.development.local
.env.test.local
.env.production.local

# Logs
*.log*
logs/
# OS
.DS_Store
Thumbs.db
ehthumbs.db

# Editor directories and files
.vscode/
# Editors (préférences personnelles uniquement)
.idea/
*.swp
*.swo

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Electron
# Electron legacy
app/
release/
3 changes: 1 addition & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
shamefully-hoist=true
node-linker=hoisted
shamefully-hoist=true
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}
39 changes: 39 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Main Process",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite",
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite.cmd"
},
"runtimeArgs": ["--sourcemap"],
"env": {
"REMOTE_DEBUGGING_PORT": "9222"
}
},
{
"name": "Debug Renderer Process",
"port": 9222,
"request": "attach",
"type": "chrome",
"webRoot": "${workspaceFolder}/src/renderer",
"timeout": 60000,
"presentation": {
"hidden": true
}
}
],
"compounds": [
{
"name": "Debug All",
"configurations": ["Debug Main Process", "Debug Renderer Process"],
"presentation": {
"order": 1
}
}
]
}
20 changes: 20 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
Loading
Loading