Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WSL to the Windows installer #416

Merged
merged 7 commits into from
Nov 26, 2024
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
6 changes: 2 additions & 4 deletions .github/workflows/pr.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: Serial Loops PR
run-name: PR for ${{ github.actor }} - ${{ github.ref_name }}
on:
pull_request:
types:
- opened
- reopened
push:
branches:
- 'main'
- 'Avalonia'

jobs:
build_test:
if: github.repository == 'haroohie-club'
strategy:
matrix:
platform:
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/official-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -278,21 +278,18 @@ jobs:
Because our application contacts GitHub's servers to check for new releases on launch, it is possible it will get flagged by firewall software – please allow it through so it can function correctly.

### Windows
Simply download the Windows installer application and run it. It will walk you through installation, including installing the necessary dependencies.
Alternatively, you can download the zip file for a portable application; however, dependencies are not included with this option.
Simply download the Windows installer application and run it. It will walk you through installation, including installing the necessary dependencies. Alternatively, you can download the zip file for a portable application; however, dependencies are not included with this option.

### macOS
Pick the macOS pkg installer that fits your computer's architecture. Before executing it, you will need to open the Terminal application and run `xattr -cr /User/yourusernamehere/Downloads/pkginstallernamehere.pkg`,
replacing "yourusernamehere" with your username and "pkginstallernamehere.pkg" with the appropriate pkg installer filename. Running this command makes it so that the pkg installer is runnable even though we don't codesign it.
Pick the macOS pkg installer that fits your computer's architecture. Before executing it, you will need to open the Terminal application and run `xattr -cr /User/yourusernamehere/Downloads/pkginstallernamehere.pkg`, replacing "yourusernamehere" with your username and "pkginstallernamehere.pkg" with the appropriate pkg installer filename. Running this command makes it so that the pkg installer is runnable even though we don't codesign it.

The pkg installer will guide you through installing Serial Loops and will automatically install the dependencies devkitARM and make if necessary.

#### Which macOS pkg installer should I choose?
If your Mac is newer, you will probably want the ARM installer. If it is older, you may want the x64 one. If unsure, download the ARM one first and attempt to run it – it will throw an error saying it can't be run on this computer if your computer is not able to run it. If that's the case, download the x64 one instead.

### Linux
We recommend using the provided flatpak as it is the easiest to use. First, install flatpak if you haven't already. Then, download the flatpak and double click it or run `flatpak install` on it from the terminal. It will then install itself,
bringing all the necessary dependencies with it.
We recommend using the provided flatpak as it is the easiest to use. First, install flatpak if you haven't already. Then, download the flatpak and double click it or run `flatpak install` on it from the terminal. It will then install itself, bringing all the necessary dependencies with it.

If you would rather manually install, follow the below instructions:
* The `.deb` package is intended for Debian-based distros (e.g. Ubuntu). Install it with `sudo apt install -f ./SerialLoops-linux-x64-${{ env.SLVersion }}.deb`.
Expand Down
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,17 @@ Documentation for how to use Serial Loops can be found on [our website](https://

## Installation
### Prerequisites
#### A Nintendo DS Emulator
To test the game easily, you will want to have a Nintendo DS emulator installed. We recommend using [melonDS](https://melonds.kuribo64.net/) for its accuracy.
It is recommended that you use a distribution of Serial Loops that automatically installs or comes with the necessary prerequisites. For each platform these are:

* Linux: Flatpak
* macOS: Installer
* Windows: Installer

Using these will ensure Serial Loops is ready to use after installation. However, if you would rather use a portable build on Windows/Linux, please check the information on installing
these prerequisites below.

<details>
<summary>View prerequisites for non-Flatpak/installer distributions</summary>

#### Installing devkitARM
[devkitARM](https://devkitpro.org/wiki/Getting_Started) is required to use Serial Loops on all platforms.
Expand Down Expand Up @@ -85,6 +94,11 @@ way of getting the Docker path to work, so you will have to use Make.
#### Installing OpenAL (Linux)
If you're running on Linux and _not using one of the package releases_ (the `.deb` or `.rpm`), you will also need to install OpenAL which is used for audio processing.

</details>

#### A Nintendo DS Emulator
To test the game easily, you will want to have a Nintendo DS emulator installed. We recommend using [melonDS](https://melonds.kuribo64.net/) for its accuracy.

### Download & Install
Once you have installed any necessary prerequisites, to install Serial Loops, download the latest release for your platform from the [Releases tab](https://github.com/haroohie-club/SerialLoops/releases).

Expand Down Expand Up @@ -113,6 +127,8 @@ dotnet build -f net8.0
```
Specifying this prevents dotnet from trying to build the Windows project, which can cause errors.

We recommend [Visual Studio 2022](https://visualstudio.microsoft.com/) on Windows or [Rider](https://www.jetbrains.com/rider/) on Linux/Mac (or Windows!) for development. You can also build from both of these IDEs; however, when building from Rider on Linux/Mac, you must go into **Settings &rarr; Build, Execution, Deployment &rarr; Toolset and Build** and add `TargetFramework=net8.0` to the MSBuild global properties field. This has the same effect as specifying `-f net8.0` on the command line.
We recommend [Rider](https://www.jetbrains.com/rider/) for development as it has the best Avalonia support and is now free to use for non-commercial purposes; however, on Windows, you can also use [Visual Studio 2022](https://visualstudio.microsoft.com/).
You can also build from both of these IDEs; however, when building from Rider on Linux/Mac, you must go into **Settings &rarr; Build, Execution, Deployment &rarr; Toolset and Build** and add `TargetFramework=net8.0`
to the MSBuild global properties field. This has the same effect as specifying `-f net8.0` on the command line.

If you'd like to contribute new features or fixes, we recommend [getting in touch on Discord first](https://discord.gg/nesRSbpeFM) before submitting a pull request!
14 changes: 2 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,16 @@ jobs:
Windows:
imageName: 'windows-latest'
targetFramework: 'net8.0-windows'
displayName: Build & Test
displayName: Build Validation
pool:
vmImage: $(imageName)
steps:
- checkout: self
clean: true

- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: $(Build.SourcesDirectory)/src/SerialLoops/SerialLoops.csproj
arguments: -f $(targetFramework)
displayName: Build project

- task: DotNetCoreCLI@2
inputs:
command: 'test'
projects: $(Build.SourcesDirectory)/test/SerialLoops.Tests.Headless/SerialLoops.Tests.Headless.csproj
arguments: -f $(targetFramework)
publishTestResults: true
env:
ROM_URI: $(ChokuRomUri)
displayName: Run tests
2 changes: 2 additions & 0 deletions install/windows/serial-loops.iss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Name: "dockerdesktop"; Description: "Install Docker Desktop"; GroupDescription:
Source: "..\..\src\SerialLoops\bin\Release\net8.0-windows\win-x64\publish\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\src\SerialLoops\bin\Release\net8.0-windows\win-x64\publish\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "devkitProUpdater-3.0.3.exe"; DestDir: {tmp}; Flags: deleteafterinstall; Tasks: devkitarm
Source: "wsl-install.bat"; DestDir: {tmp}; Flags: deleteafterinstall; Tasks: dockerdesktop
Source: "Docker Desktop Installer.exe"; DestDir: {tmp}; Flags: deleteafterinstall; Tasks: dockerdesktop
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

Expand All @@ -71,6 +72,7 @@ Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: de

[Run]
Filename: "{tmp}\devkitProUpdater-3.0.3.exe"; WorkingDir: {tmp}; Tasks: devkitarm
Filename: "{tmp}\wsl-install.bat"; WorkingDir: {tmp}; Tasks: dockerdesktop
Filename: "{tmp}\Docker Desktop Installer.exe"; WorkingDir: {tmp}; Tasks: dockerdesktop
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

1 change: 1 addition & 0 deletions install/windows/wsl-install.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wsl --install --no-launch