Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
60234a550b | |||
|
67bca78946 | ||
|
2706ec5db6 | ||
|
48689d1b79 | ||
|
8940008b41 | ||
|
7050d01aab | ||
|
b9ba1f1c65 | ||
|
d873774547 | ||
|
7c6204b5f1 | ||
|
dd3a788f7b | ||
|
c479712f32 | ||
|
b43764d355 | ||
|
0565bd7c68 | ||
|
3e46252058 |
116
.github/workflows/build.yml
vendored
116
.github/workflows/build.yml
vendored
@ -39,9 +39,6 @@ on:
|
|||||||
APPLE_NOTARIZE_PASSWORD:
|
APPLE_NOTARIZE_PASSWORD:
|
||||||
description: Password used for notarizing macOS builds
|
description: Password used for notarizing macOS builds
|
||||||
required: false
|
required: false
|
||||||
CACHIX_AUTH_TOKEN:
|
|
||||||
description: Private token for authenticating against Cachix cache
|
|
||||||
required: false
|
|
||||||
GPG_PRIVATE_KEY:
|
GPG_PRIVATE_KEY:
|
||||||
description: Private key for AppImage signing
|
description: Private key for AppImage signing
|
||||||
required: false
|
required: false
|
||||||
@ -68,6 +65,9 @@ jobs:
|
|||||||
qt_arch: ""
|
qt_arch: ""
|
||||||
qt_version: "6.5.3"
|
qt_version: "6.5.3"
|
||||||
qt_modules: "qt5compat qtimageformats qtnetworkauth"
|
qt_modules: "qt5compat qtimageformats qtnetworkauth"
|
||||||
|
linuxdeploy_hash: "4648f278ab3ef31f819e67c30d50f462640e5365a77637d7e6f2ad9fd0b4522a linuxdeploy-x86_64.AppImage"
|
||||||
|
linuxdeploy_qt_hash: "15106be885c1c48a021198e7e1e9a48ce9d02a86dd0a1848f00bdbf3c1c92724 linuxdeploy-plugin-qt-x86_64.AppImage"
|
||||||
|
appimageupdate_hash: "f1747cf60058e99f1bb9099ee9787d16c10241313b7acec81810ea1b1e568c11 AppImageUpdate-x86_64.AppImage"
|
||||||
|
|
||||||
- os: windows-2022
|
- os: windows-2022
|
||||||
name: "Windows-MinGW-w64"
|
name: "Windows-MinGW-w64"
|
||||||
@ -80,9 +80,9 @@ jobs:
|
|||||||
architecture: "x64"
|
architecture: "x64"
|
||||||
vcvars_arch: "amd64"
|
vcvars_arch: "amd64"
|
||||||
qt_ver: 6
|
qt_ver: 6
|
||||||
qt_host: windows
|
qt_host: "windows"
|
||||||
qt_arch: ""
|
qt_arch: "win64_msvc2022_64"
|
||||||
qt_version: "6.7.3"
|
qt_version: "6.8.1"
|
||||||
qt_modules: "qt5compat qtimageformats qtnetworkauth"
|
qt_modules: "qt5compat qtimageformats qtnetworkauth"
|
||||||
nscurl_tag: "v24.9.26.122"
|
nscurl_tag: "v24.9.26.122"
|
||||||
nscurl_sha256: "AEE6C4BE3CB6455858E9C1EE4B3AFE0DB9960FA03FE99CCDEDC28390D57CCBB0"
|
nscurl_sha256: "AEE6C4BE3CB6455858E9C1EE4B3AFE0DB9960FA03FE99CCDEDC28390D57CCBB0"
|
||||||
@ -93,9 +93,9 @@ jobs:
|
|||||||
architecture: "arm64"
|
architecture: "arm64"
|
||||||
vcvars_arch: "amd64_arm64"
|
vcvars_arch: "amd64_arm64"
|
||||||
qt_ver: 6
|
qt_ver: 6
|
||||||
qt_host: windows
|
qt_host: "windows"
|
||||||
qt_arch: "win64_msvc2019_arm64"
|
qt_arch: "win64_msvc2022_arm64_cross_compiled"
|
||||||
qt_version: "6.7.3"
|
qt_version: "6.8.1"
|
||||||
qt_modules: "qt5compat qtimageformats qtnetworkauth"
|
qt_modules: "qt5compat qtimageformats qtnetworkauth"
|
||||||
nscurl_tag: "v24.9.26.122"
|
nscurl_tag: "v24.9.26.122"
|
||||||
nscurl_sha256: "AEE6C4BE3CB6455858E9C1EE4B3AFE0DB9960FA03FE99CCDEDC28390D57CCBB0"
|
nscurl_sha256: "AEE6C4BE3CB6455858E9C1EE4B3AFE0DB9960FA03FE99CCDEDC28390D57CCBB0"
|
||||||
@ -106,7 +106,7 @@ jobs:
|
|||||||
qt_ver: 6
|
qt_ver: 6
|
||||||
qt_host: mac
|
qt_host: mac
|
||||||
qt_arch: ""
|
qt_arch: ""
|
||||||
qt_version: "6.7.3"
|
qt_version: "6.8.1"
|
||||||
qt_modules: "qt5compat qtimageformats qtnetworkauth"
|
qt_modules: "qt5compat qtimageformats qtnetworkauth"
|
||||||
|
|
||||||
- os: macos-14
|
- os: macos-14
|
||||||
@ -216,14 +216,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Install host Qt (Windows MSVC arm64)
|
- name: Install host Qt (Windows MSVC arm64)
|
||||||
if: runner.os == 'Windows' && matrix.architecture == 'arm64'
|
if: runner.os == 'Windows' && matrix.architecture == 'arm64'
|
||||||
uses: jurplel/install-qt-action@v3
|
uses: jurplel/install-qt-action@v4
|
||||||
with:
|
with:
|
||||||
aqtversion: "==3.1.*"
|
aqtversion: "==3.1.*"
|
||||||
py7zrversion: ">=0.20.2"
|
py7zrversion: ">=0.20.2"
|
||||||
version: ${{ matrix.qt_version }}
|
version: ${{ matrix.qt_version }}
|
||||||
host: "windows"
|
host: "windows"
|
||||||
target: "desktop"
|
target: "desktop"
|
||||||
arch: ""
|
arch: ${{ matrix.qt_arch }}
|
||||||
modules: ${{ matrix.qt_modules }}
|
modules: ${{ matrix.qt_modules }}
|
||||||
cache: ${{ inputs.is_qt_cached }}
|
cache: ${{ inputs.is_qt_cached }}
|
||||||
cache-key-prefix: host-qt-arm64-windows
|
cache-key-prefix: host-qt-arm64-windows
|
||||||
@ -232,7 +232,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install Qt (macOS, Linux & Windows MSVC)
|
- name: Install Qt (macOS, Linux & Windows MSVC)
|
||||||
if: matrix.msystem == ''
|
if: matrix.msystem == ''
|
||||||
uses: jurplel/install-qt-action@v3
|
uses: jurplel/install-qt-action@v4
|
||||||
with:
|
with:
|
||||||
aqtversion: "==3.1.*"
|
aqtversion: "==3.1.*"
|
||||||
py7zrversion: ">=0.20.2"
|
py7zrversion: ">=0.20.2"
|
||||||
@ -252,19 +252,26 @@ jobs:
|
|||||||
|
|
||||||
- name: Prepare AppImage (Linux)
|
- name: Prepare AppImage (Linux)
|
||||||
if: runner.os == 'Linux' && matrix.qt_ver != 5
|
if: runner.os == 'Linux' && matrix.qt_ver != 5
|
||||||
|
env:
|
||||||
|
APPIMAGEUPDATE_HASH: ${{ matrix.appimageupdate_hash }}
|
||||||
|
LINUXDEPLOY_HASH: ${{ matrix.linuxdeploy_hash }}
|
||||||
|
LINUXDEPLOY_QT_HASH: ${{ matrix.linuxdeploy_qt_hash }}
|
||||||
run: |
|
run: |
|
||||||
wget "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
|
wget "https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20250213-2/linuxdeploy-x86_64.AppImage"
|
||||||
wget "https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage"
|
wget "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20250213-1/linuxdeploy-plugin-qt-x86_64.AppImage"
|
||||||
wget "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage"
|
|
||||||
|
|
||||||
wget "https://github.com/AppImageCommunity/AppImageUpdate/releases/download/continuous/AppImageUpdate-x86_64.AppImage"
|
wget "https://github.com/AppImageCommunity/AppImageUpdate/releases/download/2.0.0-alpha-1-20241225/AppImageUpdate-x86_64.AppImage"
|
||||||
|
|
||||||
|
sha256sum -c - <<< "$LINUXDEPLOY_HASH"
|
||||||
|
sha256sum -c - <<< "$LINUXDEPLOY_QT_HASH"
|
||||||
|
sha256sum -c - <<< "$APPIMAGEUPDATE_HASH"
|
||||||
|
|
||||||
sudo apt install libopengl0 libfuse2
|
sudo apt install libopengl0 libfuse2
|
||||||
|
|
||||||
- name: Add QT_HOST_PATH var (Windows MSVC arm64)
|
- name: Add QT_HOST_PATH var (Windows MSVC arm64)
|
||||||
if: runner.os == 'Windows' && matrix.architecture == 'arm64'
|
if: runner.os == 'Windows' && matrix.architecture == 'arm64'
|
||||||
run: |
|
run: |
|
||||||
echo "QT_HOST_PATH=${{ github.workspace }}\HostQt\Qt\${{ matrix.qt_version }}\msvc2019_64" >> $env:GITHUB_ENV
|
echo "QT_HOST_PATH=${{ github.workspace }}\HostQt\Qt\${{ matrix.qt_version }}\msvc2022_64" >> $env:GITHUB_ENV
|
||||||
|
|
||||||
- name: Setup java (macOS)
|
- name: Setup java (macOS)
|
||||||
if: runner.os == 'macOS'
|
if: runner.os == 'macOS'
|
||||||
@ -629,76 +636,3 @@ jobs:
|
|||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
ccache -s
|
ccache -s
|
||||||
|
|
||||||
flatpak:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.8
|
|
||||||
options: --privileged
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
if: inputs.build_type == 'Debug'
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
|
|
||||||
- name: Set short version
|
|
||||||
shell: bash
|
|
||||||
run: echo "VERSION=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Build Flatpak (Linux)
|
|
||||||
if: inputs.build_type == 'Debug'
|
|
||||||
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
|
||||||
with:
|
|
||||||
bundle: ShatteredPrism-${{ runner.os }}-${{ env.VERSION }}-Flatpak.flatpak
|
|
||||||
manifest-path: flatpak/org.lunaislazier.ShatteredPrism.yml
|
|
||||||
|
|
||||||
nix:
|
|
||||||
name: Nix (${{ matrix.system }})
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: ubuntu-22.04
|
|
||||||
system: x86_64-linux
|
|
||||||
|
|
||||||
- os: macos-13
|
|
||||||
system: x86_64-darwin
|
|
||||||
|
|
||||||
- os: macos-14
|
|
||||||
system: aarch64-darwin
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Nix
|
|
||||||
uses: cachix/install-nix-action@v30
|
|
||||||
|
|
||||||
# For PRs
|
|
||||||
- name: Setup Nix Magic Cache
|
|
||||||
uses: DeterminateSystems/magic-nix-cache-action@v8
|
|
||||||
|
|
||||||
# For in-tree builds
|
|
||||||
- name: Setup Cachix
|
|
||||||
uses: cachix/cachix-action@v15
|
|
||||||
with:
|
|
||||||
name: unmojang
|
|
||||||
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
||||||
|
|
||||||
- name: Run flake checks
|
|
||||||
run: |
|
|
||||||
nix flake check --print-build-logs --show-trace
|
|
||||||
|
|
||||||
- name: Build debug package
|
|
||||||
if: ${{ inputs.build_type == 'Debug' }}
|
|
||||||
run: |
|
|
||||||
nix build --print-build-logs .#shatteredprism-debug
|
|
||||||
|
|
||||||
- name: Build release package
|
|
||||||
if: ${{ inputs.build_type != 'Debug' }}
|
|
||||||
run: |
|
|
||||||
nix build --print-build-logs .#shatteredprism
|
|
||||||
|
62
.github/workflows/flatpak.yml
vendored
Normal file
62
.github/workflows/flatpak.yml
vendored
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
name: Flatpak
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- "**.md"
|
||||||
|
- "**/LICENSE"
|
||||||
|
- ".github/ISSUE_TEMPLATE/**"
|
||||||
|
- ".markdownlint**"
|
||||||
|
- "nix/**"
|
||||||
|
# We don't do anything with these artifacts on releases. They go to Flathub
|
||||||
|
tags-ignore:
|
||||||
|
- "*"
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- "**.md"
|
||||||
|
- "**/LICENSE"
|
||||||
|
- ".github/ISSUE_TEMPLATE/**"
|
||||||
|
- ".markdownlint**"
|
||||||
|
- "nix/**"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build (${{ matrix.arch }})
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
arch: x86_64
|
||||||
|
|
||||||
|
- os: ubuntu-22.04-arm
|
||||||
|
arch: aarch64
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.8
|
||||||
|
options: --privileged
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Set short version
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "VERSION=${GITHUB_SHA::7}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Build Flatpak
|
||||||
|
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||||
|
with:
|
||||||
|
bundle: ShatteredPrism-${{ runner.os }}-${{ env.VERSION }}-Flatpak.flatpak
|
||||||
|
manifest-path: flatpak/org.lunaislazier.ShatteredPrism.yml
|
||||||
|
arch: ${{ matrix.arch }}
|
88
.github/workflows/nix.yml
vendored
Normal file
88
.github/workflows/nix.yml
vendored
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
name: Nix
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- "**.md"
|
||||||
|
- "**/LICENSE"
|
||||||
|
- ".github/ISSUE_TEMPLATE/**"
|
||||||
|
- ".markdownlint**"
|
||||||
|
- "flatpak/**"
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
pull_request_target:
|
||||||
|
paths-ignore:
|
||||||
|
- "**.md"
|
||||||
|
- "**/LICENSE"
|
||||||
|
- ".github/ISSUE_TEMPLATE/**"
|
||||||
|
- ".markdownlint**"
|
||||||
|
- "flatpak/**"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
env:
|
||||||
|
DEBUG: ${{ github.ref_type != 'tag' }}
|
||||||
|
USE_DETERMINATE: ${{ github.event_name == 'pull_request' }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build (${{ matrix.system }})
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
system: x86_64-linux
|
||||||
|
|
||||||
|
- os: ubuntu-22.04-arm
|
||||||
|
system: aarch64-linux
|
||||||
|
|
||||||
|
- os: macos-13
|
||||||
|
system: x86_64-darwin
|
||||||
|
|
||||||
|
- os: macos-14
|
||||||
|
system: aarch64-darwin
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Nix
|
||||||
|
uses: DeterminateSystems/nix-installer-action@v16
|
||||||
|
with:
|
||||||
|
determinate: ${{ env.USE_DETERMINATE }}
|
||||||
|
|
||||||
|
# For PRs
|
||||||
|
- name: Setup Nix Magic Cache
|
||||||
|
if: ${{ env.USE_DETERMINATE }}
|
||||||
|
uses: DeterminateSystems/flakehub-cache-action@v1
|
||||||
|
|
||||||
|
# For in-tree builds
|
||||||
|
- name: Setup Cachix
|
||||||
|
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
|
||||||
|
uses: cachix/cachix-action@v15
|
||||||
|
with:
|
||||||
|
name: lunaislazier
|
||||||
|
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
||||||
|
|
||||||
|
- name: Run Flake checks
|
||||||
|
run: |
|
||||||
|
nix flake check --print-build-logs --show-trace
|
||||||
|
|
||||||
|
- name: Build debug package
|
||||||
|
if: ${{ env.DEBUG }}
|
||||||
|
run: |
|
||||||
|
nix build --print-build-logs .#shatteredprism-debug
|
||||||
|
|
||||||
|
- name: Build release package
|
||||||
|
if: ${{ !env.DEBUG }}
|
||||||
|
run: |
|
||||||
|
nix build --print-build-logs .#shatteredprism
|
1
.github/workflows/trigger_builds.yml
vendored
1
.github/workflows/trigger_builds.yml
vendored
@ -38,6 +38,5 @@ jobs:
|
|||||||
APPLE_NOTARIZE_APPLE_ID: ${{ secrets.APPLE_NOTARIZE_APPLE_ID }}
|
APPLE_NOTARIZE_APPLE_ID: ${{ secrets.APPLE_NOTARIZE_APPLE_ID }}
|
||||||
APPLE_NOTARIZE_TEAM_ID: ${{ secrets.APPLE_NOTARIZE_TEAM_ID }}
|
APPLE_NOTARIZE_TEAM_ID: ${{ secrets.APPLE_NOTARIZE_TEAM_ID }}
|
||||||
APPLE_NOTARIZE_PASSWORD: ${{ secrets.APPLE_NOTARIZE_PASSWORD }}
|
APPLE_NOTARIZE_PASSWORD: ${{ secrets.APPLE_NOTARIZE_PASSWORD }}
|
||||||
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
||||||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
GPG_PRIVATE_KEY_ID: ${{ secrets.GPG_PRIVATE_KEY_ID }}
|
GPG_PRIVATE_KEY_ID: ${{ secrets.GPG_PRIVATE_KEY_ID }}
|
||||||
|
1
.github/workflows/trigger_release.yml
vendored
1
.github/workflows/trigger_release.yml
vendored
@ -23,7 +23,6 @@ jobs:
|
|||||||
APPLE_NOTARIZE_APPLE_ID: ${{ secrets.APPLE_NOTARIZE_APPLE_ID }}
|
APPLE_NOTARIZE_APPLE_ID: ${{ secrets.APPLE_NOTARIZE_APPLE_ID }}
|
||||||
APPLE_NOTARIZE_TEAM_ID: ${{ secrets.APPLE_NOTARIZE_TEAM_ID }}
|
APPLE_NOTARIZE_TEAM_ID: ${{ secrets.APPLE_NOTARIZE_TEAM_ID }}
|
||||||
APPLE_NOTARIZE_PASSWORD: ${{ secrets.APPLE_NOTARIZE_PASSWORD }}
|
APPLE_NOTARIZE_PASSWORD: ${{ secrets.APPLE_NOTARIZE_PASSWORD }}
|
||||||
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
||||||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
GPG_PRIVATE_KEY_ID: ${{ secrets.GPG_PRIVATE_KEY_ID }}
|
GPG_PRIVATE_KEY_ID: ${{ secrets.GPG_PRIVATE_KEY_ID }}
|
||||||
|
|
||||||
|
15
.github/workflows/winget.yml
vendored
15
.github/workflows/winget.yml
vendored
@ -1,15 +0,0 @@
|
|||||||
name: Publish to WinGet
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [released]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish:
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- uses: vedantmgoyal2009/winget-releaser@v2
|
|
||||||
with:
|
|
||||||
identifier: PrismLauncher.PrismLauncher
|
|
||||||
version: ${{ github.event.release.tag_name }}
|
|
||||||
installers-regex: 'PrismLauncher-Windows-MSVC(:?-arm64|-Legacy)?-Setup-.+\.exe$'
|
|
||||||
token: ${{ secrets.WINGET_TOKEN }}
|
|
6
.gitignore
vendored
6
.gitignore
vendored
@ -47,8 +47,12 @@ run/
|
|||||||
|
|
||||||
# Nix/NixOS
|
# Nix/NixOS
|
||||||
.direnv/
|
.direnv/
|
||||||
.pre-commit-config.yaml
|
## Used when manually invoking stdenv phases
|
||||||
|
outputs/
|
||||||
|
## Regular artifacts
|
||||||
result
|
result
|
||||||
|
result-*
|
||||||
|
repl-result-*
|
||||||
|
|
||||||
# Flatpak
|
# Flatpak
|
||||||
.flatpak-builder
|
.flatpak-builder
|
||||||
|
@ -4,6 +4,9 @@ MD012: false
|
|||||||
# MD013/line-length - Line length
|
# MD013/line-length - Line length
|
||||||
MD013: false
|
MD013: false
|
||||||
|
|
||||||
|
# MD022/blanks-around-headings
|
||||||
|
MD022: false
|
||||||
|
|
||||||
# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
|
# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
|
||||||
MD024:
|
MD024:
|
||||||
siblings-only: true
|
siblings-only: true
|
||||||
|
@ -78,6 +78,13 @@ else()
|
|||||||
# ATL's pack list needs more than the default 1 Mib stack on windows
|
# ATL's pack list needs more than the default 1 Mib stack on windows
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--stack,8388608 ${CMAKE_EXE_LINKER_FLAGS}")
|
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--stack,8388608 ${CMAKE_EXE_LINKER_FLAGS}")
|
||||||
|
|
||||||
|
# -ffunction-sections and -fdata-sections help reduce binary size
|
||||||
|
# -mguard=cf enables Control Flow Guard
|
||||||
|
# TODO: Look into -gc-sections to further reduce binary size
|
||||||
|
foreach(lang C CXX)
|
||||||
|
set("CMAKE_${lang}_FLAGS_RELEASE" "-ffunction-sections -fdata-sections -mguard=cf")
|
||||||
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -106,14 +113,14 @@ if ((CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebI
|
|||||||
else()
|
else()
|
||||||
# AppleClang and Clang
|
# AppleClang and Clang
|
||||||
message(STATUS "Address Sanitizer available on Clang")
|
message(STATUS "Address Sanitizer available on Clang")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=null")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=null")
|
||||||
endif()
|
endif()
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
# GCC
|
# GCC
|
||||||
message(STATUS "Address Sanitizer available on GCC")
|
message(STATUS "Address Sanitizer available on GCC")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover")
|
||||||
link_libraries("asan")
|
link_libraries("asan")
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
message(STATUS "Address Sanitizer available on MSVC")
|
message(STATUS "Address Sanitizer available on MSVC")
|
||||||
@ -181,7 +188,7 @@ set(Launcher_FMLLIBS_BASE_URL "https://files.prismlauncher.org/fmllibs/" CACHE S
|
|||||||
|
|
||||||
######## Set version numbers ########
|
######## Set version numbers ########
|
||||||
set(Launcher_VERSION_MAJOR 1)
|
set(Launcher_VERSION_MAJOR 1)
|
||||||
set(Launcher_VERSION_MINOR 6)
|
set(Launcher_VERSION_MINOR 7)
|
||||||
|
|
||||||
set(Launcher_VERSION_NAME "${Launcher_VERSION_MAJOR}.${Launcher_VERSION_MINOR}")
|
set(Launcher_VERSION_NAME "${Launcher_VERSION_MAJOR}.${Launcher_VERSION_MINOR}")
|
||||||
set(Launcher_VERSION_NAME4 "${Launcher_VERSION_MAJOR}.${Launcher_VERSION_MINOR}.0.0")
|
set(Launcher_VERSION_NAME4 "${Launcher_VERSION_MAJOR}.${Launcher_VERSION_MINOR}.0.0")
|
||||||
|
12
README.md
12
README.md
@ -8,10 +8,13 @@
|
|||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
Shattered Prism is a custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once.<br />
|
Shattered Prism is a custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once.<br />
|
||||||
<br />This is a <b>fork</b> of PrismLauncher and is <b>not</b> endorsed by it.
|
<br />This is a <b>fork</b> of FjordLauncher and is <b>not</b> endorsed by it or Prism.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
# Why does this exist?
|
## Why does this exist?
|
||||||
|
|
||||||
|
This project was originally a direct fork of upstream Prism, but spent most of it's time as a small group-oriented continuation of fn2006's PollyMC, except with continued support for Microsoft authentication and being without branding that would get it confused for a uh... *similarly named project*. Luckily though, [@evan-goode](https://github.com/evan-goode) eventually created Fjord and this project has been based upon it ever since!
|
||||||
|
## Differences from PrismLauncher
|
||||||
|
|
||||||
- Fully removed PrismLauncher's DRM.
|
- Fully removed PrismLauncher's DRM.
|
||||||
- Restores the ability to download modpacks from FTB.
|
- Restores the ability to download modpacks from FTB.
|
||||||
@ -25,10 +28,11 @@
|
|||||||
|
|
||||||
## Community & Support
|
## Community & Support
|
||||||
|
|
||||||
Feel free to create a GitHub issue if you find a bug or want to suggest something, it is currently the **only** way to contact anyone regarding this project.
|
Feel free to create a GitHub issue if you find a bug or want to suggest something.
|
||||||
|
|
||||||
Do **not** ask for support on any of the official PrismLauncher channels as they cannot be held responsible for any issues caused by the changes made.
|
For any other project-related inquiries, reach me at either my [Bluesky](https://bsky.app/profile/moonlitvtuber.org) or [Twitter](https://twitter.com/lunasc_ope).
|
||||||
|
|
||||||
|
Do **not** ask for support on any of the official PrismLauncher channels, please refer to the FjordLauncher ones **only** if the issue is shared between these two projects.
|
||||||
|
|
||||||
## License [](LICENSE)
|
## License [](LICENSE)
|
||||||
|
|
||||||
|
13
default.nix
13
default.nix
@ -1,9 +1,4 @@
|
|||||||
(import (
|
(import (fetchTarball {
|
||||||
let
|
url = "https://github.com/edolstra/flake-compat/archive/ff81ac966bb2cae68946d5ed5fc4994f96d0ffec.tar.gz";
|
||||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
sha256 = "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=";
|
||||||
in
|
}) { src = ./.; }).defaultNix
|
||||||
fetchTarball {
|
|
||||||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
|
||||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
|
||||||
}
|
|
||||||
) { src = ./.; }).defaultNix
|
|
||||||
|
131
flake.nix
131
flake.nix
@ -15,28 +15,6 @@
|
|||||||
url = "github:PrismLauncher/libnbtplusplus";
|
url = "github:PrismLauncher/libnbtplusplus";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix-filter.url = "github:numtide/nix-filter";
|
|
||||||
|
|
||||||
/*
|
|
||||||
Inputs below this are optional and can be removed
|
|
||||||
|
|
||||||
```
|
|
||||||
{
|
|
||||||
inputs.shatteredprism = {
|
|
||||||
url = "github:lunaislazier/ShatteredPrism";
|
|
||||||
inputs = {
|
|
||||||
flake-compat.follows = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
```
|
|
||||||
*/
|
|
||||||
|
|
||||||
flake-compat = {
|
|
||||||
url = "github:edolstra/flake-compat";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
@ -44,9 +22,8 @@
|
|||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
libnbtplusplus,
|
libnbtplusplus,
|
||||||
nix-filter,
|
|
||||||
...
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
|
|
||||||
@ -58,27 +35,108 @@
|
|||||||
forAllSystems = lib.genAttrs systems;
|
forAllSystems = lib.genAttrs systems;
|
||||||
nixpkgsFor = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
nixpkgsFor = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
checks = forAllSystems (
|
checks = forAllSystems (
|
||||||
system:
|
system:
|
||||||
|
|
||||||
let
|
let
|
||||||
checks' = nixpkgsFor.${system}.callPackage ./nix/checks.nix { inherit self; };
|
pkgs = nixpkgsFor.${system};
|
||||||
|
llvm = pkgs.llvmPackages_19;
|
||||||
in
|
in
|
||||||
lib.filterAttrs (_: lib.isDerivation) checks'
|
|
||||||
|
{
|
||||||
|
formatting =
|
||||||
|
pkgs.runCommand "check-formatting"
|
||||||
|
{
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
deadnix
|
||||||
|
llvm.clang-tools
|
||||||
|
markdownlint-cli
|
||||||
|
nixfmt-rfc-style
|
||||||
|
statix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
''
|
||||||
|
cd ${self}
|
||||||
|
|
||||||
|
echo "Running clang-format...."
|
||||||
|
clang-format --dry-run --style='file' --Werror */**.{c,cc,cpp,h,hh,hpp}
|
||||||
|
|
||||||
|
echo "Running deadnix..."
|
||||||
|
deadnix --fail
|
||||||
|
|
||||||
|
echo "Running markdownlint..."
|
||||||
|
markdownlint --dot .
|
||||||
|
|
||||||
|
echo "Running nixfmt..."
|
||||||
|
find -type f -name '*.nix' -exec nixfmt --check {} +
|
||||||
|
|
||||||
|
echo "Running statix"
|
||||||
|
statix check .
|
||||||
|
|
||||||
|
touch $out
|
||||||
|
'';
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
devShells = forAllSystems (
|
devShells = forAllSystems (
|
||||||
system:
|
system:
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgs = nixpkgsFor.${system};
|
pkgs = nixpkgsFor.${system};
|
||||||
|
llvm = pkgs.llvmPackages_19;
|
||||||
|
|
||||||
|
packages' = self.packages.${system};
|
||||||
|
|
||||||
|
# Re-use our package wrapper to wrap our development environment
|
||||||
|
qt-wrapper-env = packages'.shatteredprism.overrideAttrs (old: {
|
||||||
|
name = "qt-wrapper-env";
|
||||||
|
|
||||||
|
# Required to use script-based makeWrapper below
|
||||||
|
strictDeps = true;
|
||||||
|
|
||||||
|
# We don't need/want the unwrapped Fjord package
|
||||||
|
paths = [ ];
|
||||||
|
|
||||||
|
nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [
|
||||||
|
# Ensure the wrapper is script based so it can be sourced
|
||||||
|
pkgs.makeWrapper
|
||||||
|
];
|
||||||
|
|
||||||
|
# Inspired by https://discourse.nixos.org/t/python-qt-woes/11808/10
|
||||||
|
buildCommand = ''
|
||||||
|
makeQtWrapper ${lib.getExe pkgs.runtimeShellPackage} "$out"
|
||||||
|
sed -i '/^exec/d' "$out"
|
||||||
|
'';
|
||||||
|
});
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
inputsFrom = [ self.packages.${system}.shatteredprism-unwrapped ];
|
inputsFrom = [ packages'.shatteredprism-unwrapped ];
|
||||||
buildInputs = with pkgs; [
|
|
||||||
|
packages = with pkgs; [
|
||||||
ccache
|
ccache
|
||||||
ninja
|
llvm.clang-tools
|
||||||
];
|
];
|
||||||
|
|
||||||
|
cmakeBuildType = "Debug";
|
||||||
|
cmakeFlags = [ "-GNinja" ] ++ packages'.shatteredprism.cmakeFlags;
|
||||||
|
dontFixCmake = true;
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
echo "Sourcing ${qt-wrapper-env}"
|
||||||
|
source ${qt-wrapper-env}
|
||||||
|
|
||||||
|
git submodule update --init --force
|
||||||
|
|
||||||
|
if [ ! -f compile_commands.json ]; then
|
||||||
|
cmakeConfigurePhase
|
||||||
|
cd ..
|
||||||
|
ln -s "$cmakeBuildDir"/compile_commands.json compile_commands.json
|
||||||
|
fi
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -89,7 +147,6 @@
|
|||||||
shatteredprism-unwrapped = prev.callPackage ./nix/unwrapped.nix {
|
shatteredprism-unwrapped = prev.callPackage ./nix/unwrapped.nix {
|
||||||
inherit
|
inherit
|
||||||
libnbtplusplus
|
libnbtplusplus
|
||||||
nix-filter
|
|
||||||
self
|
self
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
@ -99,6 +156,7 @@
|
|||||||
|
|
||||||
packages = forAllSystems (
|
packages = forAllSystems (
|
||||||
system:
|
system:
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgs = nixpkgsFor.${system};
|
pkgs = nixpkgsFor.${system};
|
||||||
|
|
||||||
@ -111,6 +169,7 @@
|
|||||||
default = shatteredPackages.shatteredprism;
|
default = shatteredPackages.shatteredprism;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
# Only output them if they're available on the current system
|
# Only output them if they're available on the current system
|
||||||
lib.filterAttrs (_: lib.meta.availableOn pkgs.stdenv.hostPlatform) packages
|
lib.filterAttrs (_: lib.meta.availableOn pkgs.stdenv.hostPlatform) packages
|
||||||
);
|
);
|
||||||
@ -118,16 +177,18 @@
|
|||||||
# We put these under legacyPackages as they are meant for CI, not end user consumption
|
# We put these under legacyPackages as they are meant for CI, not end user consumption
|
||||||
legacyPackages = forAllSystems (
|
legacyPackages = forAllSystems (
|
||||||
system:
|
system:
|
||||||
|
|
||||||
let
|
let
|
||||||
shatteredPackages = self.packages.${system};
|
packages' = self.packages.${system};
|
||||||
legacyPackages = self.legacyPackages.${system};
|
legacyPackages' = self.legacyPackages.${system};
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
shatteredprism-debug = shatteredPackages.shatteredprism.override {
|
shatteredprism-debug = packages'.shatteredprism.override {
|
||||||
shatteredprism-unwrapped = legacyPackages.shatteredprism-unwrapped-debug;
|
shatteredprism-unwrapped = legacyPackages'.shatteredprism-unwrapped-debug;
|
||||||
};
|
};
|
||||||
|
|
||||||
shatteredprism-unwrapped-debug = shatteredPackages.shatteredprism-unwrapped.overrideAttrs {
|
shatteredprism-unwrapped-debug = packages'.shatteredprism-unwrapped.overrideAttrs {
|
||||||
cmakeBuildType = "Debug";
|
cmakeBuildType = "Debug";
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
};
|
};
|
||||||
|
4
launcher/Application.cpp
Normal file → Executable file
4
launcher/Application.cpp
Normal file → Executable file
@ -166,6 +166,8 @@
|
|||||||
#define STRINGIFY(x) #x
|
#define STRINGIFY(x) #x
|
||||||
#define TOSTRING(x) STRINGIFY(x)
|
#define TOSTRING(x) STRINGIFY(x)
|
||||||
|
|
||||||
|
#include "onimai.h"
|
||||||
|
|
||||||
static const QLatin1String liveCheckFile("live.check");
|
static const QLatin1String liveCheckFile("live.check");
|
||||||
|
|
||||||
PixmapCache* PixmapCache::s_instance = nullptr;
|
PixmapCache* PixmapCache::s_instance = nullptr;
|
||||||
@ -932,6 +934,8 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
|
|||||||
connect(this, &Application::clickedOnDock, [this]() { this->showMainWindow(); });
|
connect(this, &Application::clickedOnDock, [this]() { this->showMainWindow(); });
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
onimaiLoadLauncher(this);
|
||||||
|
|
||||||
connect(this, &Application::aboutToQuit, [this]() {
|
connect(this, &Application::aboutToQuit, [this]() {
|
||||||
if (m_instances) {
|
if (m_instances) {
|
||||||
// save any remaining instance state
|
// save any remaining instance state
|
||||||
|
0
launcher/Application.h
Normal file → Executable file
0
launcher/Application.h
Normal file → Executable file
0
launcher/ApplicationMessage.cpp
Normal file → Executable file
0
launcher/ApplicationMessage.cpp
Normal file → Executable file
0
launcher/ApplicationMessage.h
Normal file → Executable file
0
launcher/ApplicationMessage.h
Normal file → Executable file
0
launcher/BaseInstaller.cpp
Normal file → Executable file
0
launcher/BaseInstaller.cpp
Normal file → Executable file
0
launcher/BaseInstaller.h
Normal file → Executable file
0
launcher/BaseInstaller.h
Normal file → Executable file
2
launcher/BaseInstance.cpp
Normal file → Executable file
2
launcher/BaseInstance.cpp
Normal file → Executable file
@ -58,6 +58,8 @@ BaseInstance::BaseInstance(SettingsObjectPtr globalSettings, SettingsObjectPtr s
|
|||||||
m_global_settings = globalSettings;
|
m_global_settings = globalSettings;
|
||||||
m_rootDir = rootDir;
|
m_rootDir = rootDir;
|
||||||
|
|
||||||
|
qDebug() << "BaseInstance: " << rootDir;
|
||||||
|
|
||||||
m_settings->registerSetting("name", "Unnamed Instance");
|
m_settings->registerSetting("name", "Unnamed Instance");
|
||||||
m_settings->registerSetting("iconKey", "default");
|
m_settings->registerSetting("iconKey", "default");
|
||||||
m_settings->registerSetting("notes", "");
|
m_settings->registerSetting("notes", "");
|
||||||
|
0
launcher/BaseInstance.h
Normal file → Executable file
0
launcher/BaseInstance.h
Normal file → Executable file
0
launcher/BaseVersion.h
Normal file → Executable file
0
launcher/BaseVersion.h
Normal file → Executable file
0
launcher/BaseVersionList.cpp
Normal file → Executable file
0
launcher/BaseVersionList.cpp
Normal file → Executable file
0
launcher/BaseVersionList.h
Normal file → Executable file
0
launcher/BaseVersionList.h
Normal file → Executable file
1
launcher/CMakeLists.txt
Normal file → Executable file
1
launcher/CMakeLists.txt
Normal file → Executable file
@ -5,6 +5,7 @@ project(application)
|
|||||||
######## Sources and headers ########
|
######## Sources and headers ########
|
||||||
|
|
||||||
set(CORE_SOURCES
|
set(CORE_SOURCES
|
||||||
|
onimai.cpp
|
||||||
# LOGIC - Base classes and infrastructure
|
# LOGIC - Base classes and infrastructure
|
||||||
BaseInstaller.h
|
BaseInstaller.h
|
||||||
BaseInstaller.cpp
|
BaseInstaller.cpp
|
||||||
|
0
launcher/Commandline.cpp
Normal file → Executable file
0
launcher/Commandline.cpp
Normal file → Executable file
0
launcher/Commandline.h
Normal file → Executable file
0
launcher/Commandline.h
Normal file → Executable file
0
launcher/DataMigrationTask.cpp
Normal file → Executable file
0
launcher/DataMigrationTask.cpp
Normal file → Executable file
0
launcher/DataMigrationTask.h
Normal file → Executable file
0
launcher/DataMigrationTask.h
Normal file → Executable file
0
launcher/DefaultVariable.h
Normal file → Executable file
0
launcher/DefaultVariable.h
Normal file → Executable file
0
launcher/DesktopServices.cpp
Normal file → Executable file
0
launcher/DesktopServices.cpp
Normal file → Executable file
0
launcher/DesktopServices.h
Normal file → Executable file
0
launcher/DesktopServices.h
Normal file → Executable file
0
launcher/Exception.h
Normal file → Executable file
0
launcher/Exception.h
Normal file → Executable file
0
launcher/ExponentialSeries.h
Normal file → Executable file
0
launcher/ExponentialSeries.h
Normal file → Executable file
0
launcher/FastFileIconProvider.cpp
Normal file → Executable file
0
launcher/FastFileIconProvider.cpp
Normal file → Executable file
0
launcher/FastFileIconProvider.h
Normal file → Executable file
0
launcher/FastFileIconProvider.h
Normal file → Executable file
0
launcher/FileIgnoreProxy.cpp
Normal file → Executable file
0
launcher/FileIgnoreProxy.cpp
Normal file → Executable file
0
launcher/FileIgnoreProxy.h
Normal file → Executable file
0
launcher/FileIgnoreProxy.h
Normal file → Executable file
0
launcher/FileSystem.cpp
Normal file → Executable file
0
launcher/FileSystem.cpp
Normal file → Executable file
0
launcher/FileSystem.h
Normal file → Executable file
0
launcher/FileSystem.h
Normal file → Executable file
0
launcher/Filter.cpp
Normal file → Executable file
0
launcher/Filter.cpp
Normal file → Executable file
0
launcher/Filter.h
Normal file → Executable file
0
launcher/Filter.h
Normal file → Executable file
0
launcher/GZip.cpp
Normal file → Executable file
0
launcher/GZip.cpp
Normal file → Executable file
0
launcher/GZip.h
Normal file → Executable file
0
launcher/GZip.h
Normal file → Executable file
0
launcher/GetAuthlibInjectorApiLocation.cpp
Normal file → Executable file
0
launcher/GetAuthlibInjectorApiLocation.cpp
Normal file → Executable file
0
launcher/GetAuthlibInjectorApiLocation.h
Normal file → Executable file
0
launcher/GetAuthlibInjectorApiLocation.h
Normal file → Executable file
0
launcher/InstanceCopyPrefs.cpp
Normal file → Executable file
0
launcher/InstanceCopyPrefs.cpp
Normal file → Executable file
0
launcher/InstanceCopyPrefs.h
Normal file → Executable file
0
launcher/InstanceCopyPrefs.h
Normal file → Executable file
0
launcher/InstanceCopyTask.cpp
Normal file → Executable file
0
launcher/InstanceCopyTask.cpp
Normal file → Executable file
0
launcher/InstanceCopyTask.h
Normal file → Executable file
0
launcher/InstanceCopyTask.h
Normal file → Executable file
0
launcher/InstanceCreationTask.cpp
Normal file → Executable file
0
launcher/InstanceCreationTask.cpp
Normal file → Executable file
0
launcher/InstanceCreationTask.h
Normal file → Executable file
0
launcher/InstanceCreationTask.h
Normal file → Executable file
6
launcher/InstanceImportTask.cpp
Normal file → Executable file
6
launcher/InstanceImportTask.cpp
Normal file → Executable file
@ -244,6 +244,8 @@ void InstanceImportTask::extractFinished()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qDebug() << "extractFinished " << static_cast<int>(m_modpackType);
|
||||||
|
|
||||||
switch (m_modpackType) {
|
switch (m_modpackType) {
|
||||||
case ModpackType::MultiMC:
|
case ModpackType::MultiMC:
|
||||||
processMultiMC();
|
processMultiMC();
|
||||||
@ -326,6 +328,8 @@ void InstanceImportTask::processMultiMC()
|
|||||||
QString configPath = FS::PathCombine(m_stagingPath, "instance.cfg");
|
QString configPath = FS::PathCombine(m_stagingPath, "instance.cfg");
|
||||||
auto instanceSettings = std::make_shared<INISettingsObject>(configPath);
|
auto instanceSettings = std::make_shared<INISettingsObject>(configPath);
|
||||||
|
|
||||||
|
qDebug() << "processMultiMC: " << m_stagingPath;
|
||||||
|
|
||||||
NullInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
|
NullInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
|
||||||
|
|
||||||
// reset time played on import... because packs.
|
// reset time played on import... because packs.
|
||||||
@ -334,6 +338,8 @@ void InstanceImportTask::processMultiMC()
|
|||||||
// set a new nice name
|
// set a new nice name
|
||||||
instance.setName(name());
|
instance.setName(name());
|
||||||
|
|
||||||
|
qDebug() << "processMultiMC2 " << instance.instanceRoot() << name();
|
||||||
|
|
||||||
// if the icon was specified by user, use that. otherwise pull icon from the pack
|
// if the icon was specified by user, use that. otherwise pull icon from the pack
|
||||||
if (m_instIcon != "default") {
|
if (m_instIcon != "default") {
|
||||||
instance.setIconKey(m_instIcon);
|
instance.setIconKey(m_instIcon);
|
||||||
|
0
launcher/InstanceImportTask.h
Normal file → Executable file
0
launcher/InstanceImportTask.h
Normal file → Executable file
5
launcher/InstanceList.cpp
Normal file → Executable file
5
launcher/InstanceList.cpp
Normal file → Executable file
@ -449,6 +449,7 @@ QList<InstanceId> InstanceList::discoverInstances()
|
|||||||
out.append(id);
|
out.append(id);
|
||||||
qDebug() << "Found instance ID" << id;
|
qDebug() << "Found instance ID" << id;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||||
instanceSet = QSet<QString>(out.begin(), out.end());
|
instanceSet = QSet<QString>(out.begin(), out.end());
|
||||||
#else
|
#else
|
||||||
@ -977,6 +978,7 @@ QString InstanceList::getStagedInstancePath()
|
|||||||
#ifdef Q_OS_WIN32
|
#ifdef Q_OS_WIN32
|
||||||
SetFileAttributesA(tempRoot.toStdString().c_str(), FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED);
|
SetFileAttributesA(tempRoot.toStdString().c_str(), FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED);
|
||||||
#endif
|
#endif
|
||||||
|
qDebug() << "get Debug" << result;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -994,7 +996,7 @@ bool InstanceList::commitStagedInstance(const QString& path,
|
|||||||
auto should_override = commiting.shouldOverride();
|
auto should_override = commiting.shouldOverride();
|
||||||
|
|
||||||
if (should_override) {
|
if (should_override) {
|
||||||
instID = commiting.originalInstanceID();
|
instID = instanceName.modifiedName();
|
||||||
} else {
|
} else {
|
||||||
instID = FS::DirNameFromString(instanceName.modifiedName(), m_instDir);
|
instID = FS::DirNameFromString(instanceName.modifiedName(), m_instDir);
|
||||||
}
|
}
|
||||||
@ -1010,6 +1012,7 @@ bool InstanceList::commitStagedInstance(const QString& path,
|
|||||||
qWarning() << "Failed to override" << path << "to" << destination;
|
qWarning() << "Failed to override" << path << "to" << destination;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
FS::deletePath(path);
|
||||||
} else {
|
} else {
|
||||||
if (!FS::move(path, destination)) {
|
if (!FS::move(path, destination)) {
|
||||||
qWarning() << "Failed to move" << path << "to" << destination;
|
qWarning() << "Failed to move" << path << "to" << destination;
|
||||||
|
0
launcher/InstanceList.h
Normal file → Executable file
0
launcher/InstanceList.h
Normal file → Executable file
0
launcher/InstancePageProvider.h
Normal file → Executable file
0
launcher/InstancePageProvider.h
Normal file → Executable file
0
launcher/InstanceTask.cpp
Normal file → Executable file
0
launcher/InstanceTask.cpp
Normal file → Executable file
5
launcher/InstanceTask.h
Normal file → Executable file
5
launcher/InstanceTask.h
Normal file → Executable file
@ -51,6 +51,11 @@ class InstanceTask : public Task, public InstanceName {
|
|||||||
|
|
||||||
[[nodiscard]] QString originalInstanceID() const { return m_original_instance_id; };
|
[[nodiscard]] QString originalInstanceID() const { return m_original_instance_id; };
|
||||||
|
|
||||||
|
void setShouldOverride(bool should)
|
||||||
|
{
|
||||||
|
m_override_existing = should;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void setOverride(bool override, QString instance_id_to_override = {})
|
void setOverride(bool override, QString instance_id_to_override = {})
|
||||||
{
|
{
|
||||||
|
0
launcher/JavaCommon.cpp
Normal file → Executable file
0
launcher/JavaCommon.cpp
Normal file → Executable file
0
launcher/JavaCommon.h
Normal file → Executable file
0
launcher/JavaCommon.h
Normal file → Executable file
0
launcher/Json.cpp
Normal file → Executable file
0
launcher/Json.cpp
Normal file → Executable file
0
launcher/Json.h
Normal file → Executable file
0
launcher/Json.h
Normal file → Executable file
0
launcher/KonamiCode.cpp
Normal file → Executable file
0
launcher/KonamiCode.cpp
Normal file → Executable file
0
launcher/KonamiCode.h
Normal file → Executable file
0
launcher/KonamiCode.h
Normal file → Executable file
0
launcher/LaunchController.cpp
Normal file → Executable file
0
launcher/LaunchController.cpp
Normal file → Executable file
0
launcher/LaunchController.h
Normal file → Executable file
0
launcher/LaunchController.h
Normal file → Executable file
0
launcher/LoggedProcess.cpp
Normal file → Executable file
0
launcher/LoggedProcess.cpp
Normal file → Executable file
0
launcher/LoggedProcess.h
Normal file → Executable file
0
launcher/LoggedProcess.h
Normal file → Executable file
7
launcher/Logging.cpp
Normal file
7
launcher/Logging.cpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
// This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT!
|
||||||
|
|
||||||
|
#include "Logging.h"
|
||||||
|
|
||||||
|
|
||||||
|
Q_LOGGING_CATEGORY(authCredentials, "launcher.auth.credentials", QtWarningMsg)
|
||||||
|
|
11
launcher/Logging.h
Normal file
11
launcher/Logging.h
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// This file was generated by ecm_qt_declare_logging_category(): DO NOT EDIT!
|
||||||
|
|
||||||
|
#ifndef ECM_QLOGGINGCATEGORY_AUTHCREDENTIALS_LOGGING_H
|
||||||
|
#define ECM_QLOGGINGCATEGORY_AUTHCREDENTIALS_LOGGING_H
|
||||||
|
|
||||||
|
#include <QLoggingCategory>
|
||||||
|
|
||||||
|
Q_DECLARE_LOGGING_CATEGORY(authCredentials)
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
0
launcher/MMCTime.cpp
Normal file → Executable file
0
launcher/MMCTime.cpp
Normal file → Executable file
0
launcher/MMCTime.h
Normal file → Executable file
0
launcher/MMCTime.h
Normal file → Executable file
0
launcher/MMCZip.cpp
Normal file → Executable file
0
launcher/MMCZip.cpp
Normal file → Executable file
0
launcher/MMCZip.h
Normal file → Executable file
0
launcher/MMCZip.h
Normal file → Executable file
0
launcher/MTPixmapCache.h
Normal file → Executable file
0
launcher/MTPixmapCache.h
Normal file → Executable file
10388
launcher/Makefile
Executable file
10388
launcher/Makefile
Executable file
File diff suppressed because it is too large
Load Diff
0
launcher/MangoHud.cpp
Normal file → Executable file
0
launcher/MangoHud.cpp
Normal file → Executable file
0
launcher/MangoHud.h
Normal file → Executable file
0
launcher/MangoHud.h
Normal file → Executable file
0
launcher/Manifest.cpp
Normal file → Executable file
0
launcher/Manifest.cpp
Normal file → Executable file
0
launcher/Manifest.h
Normal file → Executable file
0
launcher/Manifest.h
Normal file → Executable file
0
launcher/Markdown.cpp
Normal file → Executable file
0
launcher/Markdown.cpp
Normal file → Executable file
0
launcher/Markdown.h
Normal file → Executable file
0
launcher/Markdown.h
Normal file → Executable file
0
launcher/MessageLevel.cpp
Normal file → Executable file
0
launcher/MessageLevel.cpp
Normal file → Executable file
0
launcher/MessageLevel.h
Normal file → Executable file
0
launcher/MessageLevel.h
Normal file → Executable file
0
launcher/NullInstance.h
Normal file → Executable file
0
launcher/NullInstance.h
Normal file → Executable file
0
launcher/PSaveFile.h
Normal file → Executable file
0
launcher/PSaveFile.h
Normal file → Executable file
0
launcher/ProblemProvider.h
Normal file → Executable file
0
launcher/ProblemProvider.h
Normal file → Executable file
0
launcher/QObjectPtr.h
Normal file → Executable file
0
launcher/QObjectPtr.h
Normal file → Executable file
0
launcher/QVariantUtils.h
Normal file → Executable file
0
launcher/QVariantUtils.h
Normal file → Executable file
0
launcher/RWStorage.h
Normal file → Executable file
0
launcher/RWStorage.h
Normal file → Executable file
0
launcher/RecursiveFileSystemWatcher.cpp
Normal file → Executable file
0
launcher/RecursiveFileSystemWatcher.cpp
Normal file → Executable file
0
launcher/RecursiveFileSystemWatcher.h
Normal file → Executable file
0
launcher/RecursiveFileSystemWatcher.h
Normal file → Executable file
0
launcher/ResourceDownloadTask.cpp
Normal file → Executable file
0
launcher/ResourceDownloadTask.cpp
Normal file → Executable file
0
launcher/ResourceDownloadTask.h
Normal file → Executable file
0
launcher/ResourceDownloadTask.h
Normal file → Executable file
0
launcher/RuntimeContext.h
Normal file → Executable file
0
launcher/RuntimeContext.h
Normal file → Executable file
0
launcher/SeparatorPrefixTree.h
Normal file → Executable file
0
launcher/SeparatorPrefixTree.h
Normal file → Executable file
0
launcher/StringUtils.cpp
Normal file → Executable file
0
launcher/StringUtils.cpp
Normal file → Executable file
0
launcher/StringUtils.h
Normal file → Executable file
0
launcher/StringUtils.h
Normal file → Executable file
0
launcher/SysInfo.cpp
Normal file → Executable file
0
launcher/SysInfo.cpp
Normal file → Executable file
0
launcher/SysInfo.h
Normal file → Executable file
0
launcher/SysInfo.h
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user