chore: cleanup + prepare things for open source
This commit is contained in:
parent
f998722d71
commit
d69a328ce9
15 changed files with 145 additions and 115 deletions
11
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
11
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
|
@ -5,12 +5,21 @@ body:
|
||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: Before raising an issue, please search for existing issues to avoid creating duplicates.
|
value: Before raising an issue, please search for existing issues to avoid creating duplicates.
|
||||||
- type: textarea
|
- type: input
|
||||||
attributes:
|
attributes:
|
||||||
label: Original reporter/ticket ID
|
label: Original reporter/ticket ID
|
||||||
description: If you are rewording a ticket, put the original reporter(s) and ticket ID(s). If not, leave this blank.
|
description: If you are rewording a ticket, put the original reporter(s) and ticket ID(s). If not, leave this blank.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: Project
|
||||||
|
description: Select the project this issue is related to.
|
||||||
|
multiple: true
|
||||||
|
options:
|
||||||
|
- Core
|
||||||
|
- OneClient
|
||||||
|
- OneLauncher
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Describe the bug
|
label: Describe the bug
|
||||||
|
|
|
||||||
13
.github/ISSUE_TEMPLATE/enhancement.yml
vendored
13
.github/ISSUE_TEMPLATE/enhancement.yml
vendored
|
|
@ -5,12 +5,23 @@ body:
|
||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: Before raising an issue, please search for existing issues and [Discord](https://polyfrost.org/discord) suggestions to avoid creating duplicates.
|
value: Before raising an issue, please search for existing issues and [Discord](https://polyfrost.org/discord) suggestions to avoid creating duplicates.
|
||||||
- type: textarea
|
- type: input
|
||||||
attributes:
|
attributes:
|
||||||
label: Original reporter/ticket ID
|
label: Original reporter/ticket ID
|
||||||
description: If you are rewording a ticket, put the original reporter(s) and ticket ID(s). If not, leave this blank.
|
description: If you are rewording a ticket, put the original reporter(s) and ticket ID(s). If not, leave this blank.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: Project
|
||||||
|
description: Select the project this issue is related to.
|
||||||
|
multiple: true
|
||||||
|
default: General
|
||||||
|
options:
|
||||||
|
- General
|
||||||
|
- Core
|
||||||
|
- OneClient
|
||||||
|
- OneLauncher
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Is your suggested enhancement related to a problem? Please describe, or link another Issue.
|
label: Is your suggested enhancement related to a problem? Please describe, or link another Issue.
|
||||||
|
|
|
||||||
BIN
.github/media/RepoBanner.png
vendored
Normal file
BIN
.github/media/RepoBanner.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
47
.github/workflows/oneclient_release.yml
vendored
Normal file
47
.github/workflows/oneclient_release.yml
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
name: OneClient Release Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish-tauri:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- platform: macos-latest # ARM
|
||||||
|
args: --target aarch64-apple-darwin
|
||||||
|
- platform: macos-latest # Intel
|
||||||
|
args: --target x86_64-apple-darwin
|
||||||
|
- platform: ubuntu-22.04
|
||||||
|
args: ''
|
||||||
|
- platform: windows-latest
|
||||||
|
args: ''
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Rust
|
||||||
|
uses: ./.github/actions/setup-rust
|
||||||
|
with:
|
||||||
|
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
|
||||||
|
target: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
|
||||||
|
save-cache: true
|
||||||
|
restore-cache: true
|
||||||
|
|
||||||
|
- name: Setup Packages
|
||||||
|
uses: ./.github/actions/setup-packages
|
||||||
|
|
||||||
|
- uses: tauri-apps/tauri-action@v0
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tagName: oneclient-__VERSION__
|
||||||
|
releaseName: OneClient __VERSION__
|
||||||
|
releaseDraft: true
|
||||||
|
prerelease: ${{ startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-alpha') || false }}
|
||||||
|
tauriScript: pnpm oneclient:desktop
|
||||||
|
args: ${{ matrix.args }}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
name: Release Build
|
name: OneLauncher Release Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
@ -43,5 +43,5 @@ jobs:
|
||||||
releaseName: OneLauncher __VERSION__
|
releaseName: OneLauncher __VERSION__
|
||||||
releaseDraft: true
|
releaseDraft: true
|
||||||
prerelease: ${{ startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-alpha') || false }}
|
prerelease: ${{ startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-alpha') || false }}
|
||||||
tauriScript: pnpm desktop
|
tauriScript: pnpm onelauncher:desktop
|
||||||
args: ${{ matrix.args }}
|
args: ${{ matrix.args }}
|
||||||
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
|
|
@ -3,8 +3,7 @@
|
||||||
"tauri-apps.tauri-vscode", // Provides Tauri framework support.
|
"tauri-apps.tauri-vscode", // Provides Tauri framework support.
|
||||||
"rust-lang.rust-analyzer", // Provides Rust language support.
|
"rust-lang.rust-analyzer", // Provides Rust language support.
|
||||||
"vadimcn.vscode-lldb", // Provides Rust debugging support.
|
"vadimcn.vscode-lldb", // Provides Rust debugging support.
|
||||||
"oscarbeaumont.rspc-vscode", // RSPC is a framework for Routers.
|
"bradlc.vscode-tailwindcss", // Provides UnoCSS intellisense.
|
||||||
"antfu.unocss", // Provides UnoCSS intellisense.
|
|
||||||
"EditorConfig.EditorConfig", // Maintains consistent coding styles.
|
"EditorConfig.EditorConfig", // Maintains consistent coding styles.
|
||||||
"dbaeumer.vscode-eslint" // Code formatting using ESLint.
|
"dbaeumer.vscode-eslint" // Code formatting using ESLint.
|
||||||
]
|
]
|
||||||
|
|
|
||||||
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
|
@ -27,9 +27,6 @@
|
||||||
"rust-analyzer.diagnostics.disabled": [
|
"rust-analyzer.diagnostics.disabled": [
|
||||||
"macro-error" // TODO: Remove this once taurpc upgrades to latest specta
|
"macro-error" // TODO: Remove this once taurpc upgrades to latest specta
|
||||||
],
|
],
|
||||||
"rust-analyzer.procMacro.ignored": {
|
|
||||||
"tauri-specta": ["command"]
|
|
||||||
},
|
|
||||||
"rust-analyzer.check.command": "check",
|
"rust-analyzer.check.command": "check",
|
||||||
"rust-analyzer.diagnostics.experimental.enable": false,
|
"rust-analyzer.diagnostics.experimental.enable": false,
|
||||||
"rust-analyzer.linkedProjects": [],
|
"rust-analyzer.linkedProjects": [],
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Attribution
|
# Attribution
|
||||||
|
|
||||||
The source code of this repository is licensed under the GNU General Public License, Version 3 only, which is provided in the file [LICENSE](./LICENSE), with a header provided below. [Certain files in our library wrappers](./core/wrapper/) may be under a different license or [require credit](#additional-libraries), with their specific headers outlined in the below non-exhaustive list.
|
The source code of this repository is licensed under the GNU General Public License, Version 3 only, which is provided in the file [LICENSE](./LICENSE), with a header provided below. Certain files in our library wrappers may be under a different license or [require credit](#additional-libraries), with their specific headers outlined in the below non-exhaustive list.
|
||||||
|
|
||||||
## OneLauncher
|
## OneLauncher
|
||||||
|
|
||||||
|
|
@ -16,6 +16,20 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||||
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## OneClient
|
||||||
|
|
||||||
|
```txt
|
||||||
|
OneClient - A Minecraft Launcher
|
||||||
|
Copyright (C) 2023~CURRENT Polyfrost and Contributors
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
```
|
||||||
|
|
||||||
## Polyfrost branding
|
## Polyfrost branding
|
||||||
|
|
||||||
Any files depicting [Polyfrost branding](https://polyfrost.org/legal/branding), including the Polyfrost logo, any landing and background images, the OneConfig logo, the OneLauncher logo, and variations thereof, are licensed under the following:
|
Any files depicting [Polyfrost branding](https://polyfrost.org/legal/branding), including the Polyfrost logo, any landing and background images, the OneConfig logo, the OneLauncher logo, and variations thereof, are licensed under the following:
|
||||||
|
|
@ -31,67 +45,12 @@ This includes, but may not be limited to, the following files:
|
||||||
|
|
||||||
## Additional Libraries
|
## Additional Libraries
|
||||||
|
|
||||||
The following are libraries, projects, and codebases which we (Polyfrost and Contributors) copied or modified, with additional attribution inline (THIS IS A NON-EXHAUSTIVE LIST, IF WE ARE MISSING A LICENSE, PLEASE CHECK OUR [attributions page](https://polyfrost.org/attributions), OR LEAVE A TICKET IN [our Discord server](https://polyfrost.org/discord)):
|
The following are libraries, projects, and codebases which we (Polyfrost and Contributors) copied or modified, with additional attribution inline (THIS IS A NON-EXHAUSTIVE LIST, IF WE ARE MISSING A LICENSE, PLEASE LEAVE A TICKET IN [our Discord server](https://polyfrost.org/discord)):
|
||||||
|
|
||||||
## [Prism Launcher]
|
|
||||||
|
|
||||||
```txt
|
|
||||||
Prism Launcher - Minecraft Launcher
|
|
||||||
Copyright (C) 2022-2024 Prism Launcher Contributors
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, version 3.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
This file incorporates work covered by the following copyright and
|
|
||||||
permission notice:
|
|
||||||
|
|
||||||
Copyright 2013-2021 MultiMC Contributors
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
```
|
|
||||||
|
|
||||||
## [Modrinth App]
|
|
||||||
|
|
||||||
```txt
|
|
||||||
Modrinth App
|
|
||||||
Copyright (C) 2022-2023 Modrinth
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, version 3.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
```
|
|
||||||
|
|
||||||
## [Gamemode]
|
## [Gamemode]
|
||||||
|
|
||||||
```txt
|
```txt
|
||||||
Copyright (c) 2017-2022, Feral Interactive
|
Copyright (c) 2017-2025, Feral Interactive and the GameMode contributors
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
|
@ -145,7 +104,5 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
```
|
```
|
||||||
|
|
||||||
[Prism Launcher]: https://github.com/PrismLauncher/PrismLauncher
|
|
||||||
[Modrinth App]: https://github.com/modrinth/code
|
|
||||||
[Gamemode]: https://github.com/FeralInteractive/gamemode
|
[Gamemode]: https://github.com/FeralInteractive/gamemode
|
||||||
[Rust Gamemode Internal Linking]: https://github.com/SophieSilver/linking-gamemode
|
[Rust Gamemode Internal Linking]: https://github.com/SophieSilver/linking-gamemode
|
||||||
|
|
|
||||||
|
|
@ -47,18 +47,15 @@ To make changes locally, follow these steps:
|
||||||
4. Install dependencies: `pnpm i`
|
4. Install dependencies: `pnpm i`
|
||||||
5. Prepare your cargo installation: `pnpm prep`
|
5. Prepare your cargo installation: `pnpm prep`
|
||||||
|
|
||||||
To quickly run only the desktop app after `prep`, you can use:
|
### Running
|
||||||
|
The most common scripts you will use are:
|
||||||
|
|
||||||
- `pnpm desktop dev`
|
- `pnpm onelauncher:desktop dev` - Runs the **OneLauncher** desktop application with watch mode enabled and starts up the frontend's vite dev server.
|
||||||
|
|
||||||
|
- `pnpm oneclient:desktop dev` - Runs the **OneClient** desktop application with watch mode enabled and starts up the frontend's vite dev server.
|
||||||
|
|
||||||
If necessary, the webview devtools can be opened by pressing `Ctrl + Shift + I` (Linux and Windows) or `Command + Option + I` (macOS) in the desktop app.
|
If necessary, the webview devtools can be opened by pressing `Ctrl + Shift + I` (Linux and Windows) or `Command + Option + I` (macOS) in the desktop app.
|
||||||
|
|
||||||
If you encounter any issues, ensure that you are using the following versions (or later) of Rust, Node and Pnpm:
|
|
||||||
|
|
||||||
- `rustc` version: **1.80**
|
|
||||||
- `node` version: **20.15**
|
|
||||||
- `pnpm` version: **9.6.0**
|
|
||||||
|
|
||||||
After cleaning out your build artifacts using `pnpm clean`, `git clean`, or `cargo clean`, it is necessary to re-run the `setup` script.
|
After cleaning out your build artifacts using `pnpm clean`, `git clean`, or `cargo clean`, it is necessary to re-run the `setup` script.
|
||||||
|
|
||||||
After you finish making your changes and committed them to your branch, make sure to execute `pnpm format` to fix any style inconsistency in your code.
|
After you finish making your changes and committed them to your branch, make sure to execute `pnpm format` to fix any style inconsistency in your code.
|
||||||
|
|
|
||||||
49
README.md
49
README.md
|
|
@ -1,10 +1,45 @@
|
||||||
# OneLauncher
|
<div align="center">
|
||||||
|
|
||||||
Rust-based Minecraft launcher utilizing Tauri, SolidJS, and Tailwind
|
<img src=".github/media/RepoBanner.png" alt="Repository Banner" />
|
||||||
|
|
||||||
## Project Structure
|
# ` OneLauncher ` + ` OneClient `
|
||||||
|
Here is the monorepo containing the code for OneLauncher and OneClient.
|
||||||
|
|
||||||
* [`apps/desktop`](./apps/desktop/) - Rust-based Minecraft launcher utilizing Tauri, SolidJS, and Tailwind.
|
</div>
|
||||||
* [`crates/core`](./crates/core/) - The core for our Minecraft launcher (platform agnostic), along with Rust-based utilities for other Polyfrost projects and interactions.
|
|
||||||
* [`testing`](./crates/testing/) - Testing playground for our Rust core, independant of Tauri.
|
## Technologies Used
|
||||||
* [`distribution`](./packages/distribution/) - Distribution utilties and meta files for the [`apps/desktop`](./apps/desktop/) app.
|
- [**Tauri**](https://tauri.app/)
|
||||||
|
- [**Sea ORM**](https://www.sea-ql.org/SeaORM/)
|
||||||
|
- [**SQLite**](https://www.sqlite.org/)
|
||||||
|
- [**React**](https://react.dev/)
|
||||||
|
- [**Tailwind CSS**](https://tailwindcss.com/)
|
||||||
|
- [**Tanstack Query**](https://tanstack.com/query/latest)
|
||||||
|
- [**Tanstack Router**](https://tanstack.com/router/latest)
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
We welcome contributions! Please read our [contributing guidelines](CONTRIBUTING.md) before getting started.
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
|
||||||
|
If you encounter any issues, ensure that you are using the following versions (or later) of Rust, Node and Pnpm:
|
||||||
|
|
||||||
|
- `rustc` version: **1.89**
|
||||||
|
- `node` version: **22.15**
|
||||||
|
- `pnpm` version: **10.13**
|
||||||
|
|
||||||
|
### Project Structure
|
||||||
|
- **`packages/`** - Shared libraries and utilities.
|
||||||
|
- [**`core/`**](./packages/core/) - Launcher Core. This is the library that contains the entire launcher logic.
|
||||||
|
- [**`entity/`**](./packages/entity/) - Contains entity definitions used in the launcher's database.
|
||||||
|
- [**`macro/`**](./packages/macro/) - Contains macro definitions to simplify some code.
|
||||||
|
- [**`scripts/`**](./packages/scripts/) - General scripts for CI/CD or development environments.
|
||||||
|
- [**`web_common/`**](./packages/web_common/) - Contains common web code used by both OneLauncher and OneClient.
|
||||||
|
- **`apps/`**
|
||||||
|
- [**`onelauncher/`**](./apps/onelauncher/)
|
||||||
|
- **`desktop/`** - Tauri desktop application.
|
||||||
|
- **`frontend/`** - React SPA frontend.
|
||||||
|
- **`distribution/`** - Files used for release builds.
|
||||||
|
- [**`oneclient/`**](./apps/oneclient/)
|
||||||
|
- **`desktop/`** - Tauri desktop application.
|
||||||
|
- **`frontend/`** - React SPA frontend.
|
||||||
|
- **`distribution/`** - Files used for release builds.
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
const config = {
|
|
||||||
types: {
|
|
||||||
chore: { title: '🔨 Chores' },
|
|
||||||
feature: { title: '✨ Features' },
|
|
||||||
fix: { title: '🐞 Bug Fixes' },
|
|
||||||
perf: { title: '🏎 Performance' },
|
|
||||||
refactor: { title: '♻️ Refactors' },
|
|
||||||
test: { title: '✅ Tests' },
|
|
||||||
style: { title: '🎨 Stylistic' },
|
|
||||||
doc: { title: '📝 Docs' },
|
|
||||||
deps: { title: '📦 Dependencies' },
|
|
||||||
deploy: { title: '🚀 Deployments' },
|
|
||||||
wip: { title: '🚧 Experiments' },
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default config;
|
|
||||||
0
test.rs
0
test.rs
|
|
@ -2,7 +2,7 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ESNext",
|
"target": "ESNext",
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"jsxImportSource": "solid-js",
|
"jsxImportSource": "react",
|
||||||
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
export { default } from './apps/onelauncher/old_frontend/uno.config';
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
[
|
|
||||||
"packages/client/vitest.config.ts",
|
|
||||||
"apps/frontend/vitest.config.ts"
|
|
||||||
]
|
|
||||||
Loading…
Add table
Reference in a new issue