diff --git a/.github/workflows/official-build.yml b/.github/workflows/official-build.yml new file mode 100644 index 00000000..f691d247 --- /dev/null +++ b/.github/workflows/official-build.yml @@ -0,0 +1,300 @@ +name: Serial Loops Official Build +run-name: "Official release build for Serial Loops" +on: + # schedule: + # - cron: '0 23 * * *' + workflow_dispatch: + inputs: + version: + description: Release version + required: true + type: string + releaseNotes: + description: Release notes + required: true + type: string + +permissions: + contents: write + +env: + SLVersion: ${{ inputs.version == '' && format('0.3.pre.a{0}', github.run_number) || inputs.version }} + SLAssemblyVersion: ${{ inputs.version == '' && format('0.3.9999.a{0}', github.run_number) || inputs.version }} + +jobs: + linux-flatpak-setup: + runs-on: ubuntu-latest + steps: + - name: Check out + uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.13' + - name: Setup .NET + uses: actions/setup-dotnet@v4.1.0 + with: + dotnet-version: '8.0.x' + - run: pip install requests + - run: python install/linux/flatpak/flatpak-dotnet-generator.py --dotnet 8 --freedesktop 23.08 nuget-sources.json src/SerialLoops/SerialLoops.csproj + - name: Publish nuget-sources.json + uses: actions/upload-artifact@v4 + with: + name: nuget-sources + path: nuget-sources.json + retention-days: 1 + linux-flatpak: + needs: linux-flatpak-setup + runs-on: ubuntu-latest + container: + image: bilelmoussaoui/flatpak-github-actions:freedesktop-23.08 + options: --privileged + steps: + - name: Check out + uses: actions/checkout@v4 + - name: Download nuget-sources.json + uses: actions/download-artifact@v4.1.8 + with: + name: nuget-sources + path: install/linux/flatpak/ + - name: Export version + run: echo $SLVersion > install/linux/flatpak/VERSION + - name: Build flatpak + uses: flatpak/flatpak-github-actions/flatpak-builder@v6 + with: + manifest-path: install/linux/flatpak/club.haroohie.SerialLoops.yaml + bundle: SerialLoops.flatpak + cache-key: flatpak-builder-${{ github.sha }} + - name: Upload flatpak + uses: actions/upload-artifact@v4 + with: + name: linux-x64-flatpak + path: SerialLoops.flatpak + retention-days: 1 + + linux-dpkg-tarball: + runs-on: ubuntu-latest + steps: + - name: Check out + uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4.1.0 + with: + dotnet-version: '8.0.x' + - name: Build & Publish Serial Loops + run: dotnet publish src/SerialLoops/SerialLoops.csproj -c Release -f net8.0 -r linux-x64 --self-contained /p:DebugType=None /p:DebugSymbols=false /p:PublishSingleFile=true + - name: Create tarball + run: | + chmod +x ./src/SerialLoops/bin/Release/net8.0/linux-x64/publish/SerialLoops + pushd ./src/SerialLoops/bin/Release/net8.0/linux-x64/publish + tar -czvf ../SerialLoops.tar.gz --transform "s,^\.\/,SerialLoops-$SLVersion/," . + popd + - name: Upload tarball + uses: actions/upload-artifact@v4 + with: + name: linux-x64-tarball + path: src/SerialLoops/bin/Release/net8.0/linux-x64/SerialLoops.tar.gz + retention-days: 1 + - name: Create deb package + shell: pwsh + run: | + Copy-Item -Path ./install/linux/dpkg-build -Destination ./dpkg-build -Recurse -Exclude ".gitkeep" + New-Item -ItemType "directory" -Path ./dpkg-build/SerialLoops/usr -Name bin + Push-Location ./dpkg-build/SerialLoops + ((Get-Content -Path DEBIAN/control) -replace '#VERSION#', "$env:SLVersion") | Set-Content -Path DEBIAN/control + ((Get-Content -Path usr/share/applications/SerialLoops.desktop) -replace '#VERSION#', "$env:SLVersion") | Set-Content -Path usr/share/applications/SerialLoops.desktop + Copy-Item -Path ../../src/SerialLoops/bin/Release/net8.0/linux-x64/publish/* -Destination ./usr/lib/SerialLoops -Recurse + ln -s /usr/lib/SerialLoops/SerialLoops usr/bin/SerialLoops + Copy-Item -Path ../../src/SerialLoops/Assets/Icons/AppIcon.png usr/lib/SerialLoops/SerialLoops.png + Set-Location .. + dpkg-deb --build SerialLoops + Pop-Location + - name: Upload dpkg + uses: actions/upload-artifact@v4 + with: + name: linux-x64-dpkg + path: dpkg-build/SerialLoops.deb + retention-days: 1 + + linux-rpm: + runs-on: ubuntu-latest + container: + image: fedora:39 + steps: + - name: Check out + uses: actions/checkout@v4 + - name: Create RPM + run: | + cp -r install/linux/rpm/rpmbuild ~/ + tar -czvf ~/rpmbuild/SOURCES/SerialLoops-$SLVersion.tar.gz --transform "s,^\.\/,SerialLoops-$SLVersion/," . + sed -i "s/#VERSION#/$SLVersion/g" ~/rpmbuild/SPECS/SerialLoops.spec + dnf install -y rpmdevtools rpmlint dotnet-sdk-8.0 + pushd ~ + rpmbuild -bb rpmbuild/SPECS/SerialLoops.spec + popd + mv ~/rpmbuild/RPMS/x86_64/SerialLoops-${{ env.SLVersion }}-1.fc39.x86_64.rpm SerialLoops.rpm + - name: Upload rpm + uses: actions/upload-artifact@v4 + with: + name: linux-x64-rpm + path: SerialLoops.rpm + retention-days: 1 + + macos-pkg: + runs-on: macos-latest + strategy: + matrix: + rid: ['osx-x64', 'osx-arm64'] + steps: + - name: Check out + uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4.1.0 + with: + dotnet-version: '8.0.x' + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.13' + - run: pip install macos-pkg-builder + - name: Restore + run: dotnet restore src/SerialLoops/SerialLoops.csproj -r ${{ matrix.rid }} + - name: Build .app + run: dotnet msbuild src/SerialLoops/SerialLoops.csproj -t:BundleApp -p:Configuration=Release -p:TargetFramework=net8.0 -p:RuntimeIdentifier=${{ matrix.rid }} -p:UseAppHost=true --p:SelfContained=true -p:DebugType=None -p:DebugSymbols=false -p:PublishSingleFile=true + - name: Build pkg installer + run: | + mkdir "install/macos/Serial Loops.app" + cp -r "src/SerialLoops/bin/Release/net8.0/${{ matrix.rid }}/publish/Serial Loops.app" "install/macos/" + cd install/macos/ + chmod +x "./Serial Loops.app/Contents/MacOS/SerialLoops" + python serial_loops_pkg_builder.py $SLVersion ${{ matrix.rid }} + - name: Upload pkg installer + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.rid }}-installer + path: install/macos/SerialLoops-${{ matrix.rid }}.pkg + retention-days: 1 + + windows: + runs-on: windows-latest + steps: + - name: Check out + uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4.1.0 + with: + dotnet-version: '8.0.x' + - name: Build & Publish Serial Loops + shell: pwsh + run: | + dotnet publish src/SerialLoops/SerialLoops.csproj -c Release -f net8.0-windows -r win-x64 --self-contained /p:DebugType=None /p:DebugSymbols=false /p:PublishSingleFile=true + Compress-Archive -Path src/SerialLoops/bin/Release/net8.0-windows/win-x64/publish/ -DestinationPath src/SerialLoops/bin/Release/net8.0-windows/win-x64/SerialLoops-winx64.zip + - name: Upload Windows zip + uses: actions/upload-artifact@v4 + with: + name: windows-x64-zip + path: src/SerialLoops/bin/Release/net8.0-windows/win-x64/SerialLoops-winx64.zip + retention-days: 1 + - name: Download ISCC, Docker Desktop Installer, and devkitPro Updater + shell: pwsh + run: | + ((Get-Content -Path install\windows\serial-loops.iss) -replace '#VERSION#', "$env:SLVersion") | Set-Content -Path install\windows\serial-loops.iss + Start-BitsTransfer -Source https://haroohie.nyc3.cdn.digitaloceanspaces.com/bootstrap/serial-loops/iscc.zip -Destination install\windows\iscc.zip + Expand-Archive -Path install\windows\iscc.zip -DestinationPath install\windows\ + Start-BitsTransfer -Source https://github.com/devkitPro/installer/releases/download/v3.0.3/devkitProUpdater-3.0.3.exe -Destination install\windows\devkitProUpdater-3.0.3.exe + Start-BitsTransfer -Source https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe -Destination "install\windows\Docker Desktop Installer.exe" + - name: Compile Windows installer + run: install\windows\iscc\ISCC.exe .\install\windows\serial-loops.iss + - name: Upload Windows installer + uses: actions/upload-artifact@v4 + with: + name: windows-x64-installer + path: install/windows/Output/SerialLoopsInstaller.exe + retention-days: 1 + + release: + runs-on: ubuntu-latest + needs: [ linux-flatpak, linux-dpkg-tarball, linux-rpm, macos-pkg, windows ] + steps: + - name: Download Linux flatpak + uses: actions/download-artifact@v4.1.8 + with: + name: linux-x64-flatpak + - name: Download Linux tarball + uses: actions/download-artifact@v4.1.8 + with: + name: linux-x64-tarball + - name: Download Linux dpkg + uses: actions/download-artifact@v4.1.8 + with: + name: linux-x64-dpkg + - name: Download Linux rpm + uses: actions/download-artifact@v4.1.8 + with: + name: linux-x64-rpm + - name: Download Apple Silicon macOS installer + uses: actions/download-artifact@v4.1.8 + with: + name: osx-arm64-installer + - name: Download Intel macOS installer + uses: actions/download-artifact@v4.1.8 + with: + name: osx-x64-installer + - name: Download Windows installer + uses: actions/download-artifact@v4.1.8 + with: + name: windows-x64-installer + - name: Download Windows portable zip + uses: actions/download-artifact@v4.1.8 + with: + name: windows-x64-zip + - name: Move and rename artifacts + shell: pwsh + run: | + New-Item -Type Directory -Path release + Get-ChildItem . + Move-Item -Path SerialLoops.flatpak -Destination release/SerialLoops-linux-x64-v$($env:SLVersion).flatpak + Move-Item -Path SerialLoops.tar.gz -Destination release/SerialLoops-linux-x64-v$($env:SLVersion).tar.gz + Move-Item -Path SerialLoops.deb -Destination release/SerialLoops-linux-x64-$($env:SLVersion).deb + Move-Item -Path SerialLoops.rpm -Destination release/SerialLoops-linux-x64-$($env:SLVersion)-1.fc39.x86_64.rpm + Move-Item -Path SerialLoops-osx-arm64.pkg -Destination release/SerialLoops-macOS-arm-v$($env:SLVersion)-installer.pkg + Move-Item -Path SerialLoops-osx-x64.pkg -Destination release/SerialLoops-macOS-x64-v$($env:SLVersion)-installer.pkg + Move-Item -Path SerialLoopsInstaller.exe -Destination release/SerialLoops-windows-x64-v$($env:SLVersion)-installer.exe + Move-Item -Path SerialLoops-winx64.zip -Destination release/SerialLoops-windows-x64-v$($env:SLVersion)-portable.zip + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + name: Serial Loops v${{ env.SLVersion }} + tag_name: ${{ env.SLVersion }} + prerelease: ${{ inputs.version == '' }} + generate_release_notes: true + files: release/* + body: | + ${{ inputs.releaseNotes }} + + ## Installation Notes + To test the game you will need to have a Nintendo DS emulator installed. We recommend [melonDS](https://melonds.kuribo64.net/) for its accuracy. + + 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. + + ### 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. + + 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. + + 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`. + * The `.rpm` package is intended for Red Hat distros (e.g. Fedora). Install it with `sudo dnf install ./SerialLoops-linux-x64-${{ env.SLVersion }}-1.fc39.x86_64.rpm`. + * For other Linux distros, please use the binaries packaged in the `.tar.gz` archive; when doing so, ensure you install the OpenAL binaries so audio playback works. diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000..1876c50b --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,40 @@ +name: Serial Loops PR +run-name: PR for ${{ github.actor }} - ${{ github.ref_name }} +on: + pull_request: + types: + - opened + - reopened + branches: + - 'main' + - 'Avalonia' + +jobs: + build_test: + strategy: + matrix: + platform: + - os: ubuntu-latest + targetFramework: net8.0 + container: 'ghcr.io/haroohie-club/chokuretsu-devkitarm:main' + - os: macos-latest + targetFramework: net8.0 + container: '' + - os: windows-latest + targetFramework: net8.0-windows + container: '' + runs-on: ${{ matrix.platform.os }} + container: ${{ matrix.platform.container }} + steps: + - name: Check out + uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4.1.0 + with: + dotnet-version: '8.0.x' + - name: Build project + run: dotnet build src/SerialLoops/SerialLoops.csproj -f ${{ matrix.platform.targetFramework }} + - name: Run tests + run: dotnet test test/SerialLoops.Tests.Headless/SerialLoops.Tests.Headless.csproj -f ${{ matrix.platform.targetFramework }} + env: + ROM_URI: ${{ secrets.CHOKU_ROM_URI }} diff --git a/.gitignore b/.gitignore index 4aeaec07..05ffdd9d 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,9 @@ bld/ [Ll]og/ [Ll]ogs/ +# Python venv +.venv/ + # Rider solution directory .idea/ diff --git a/NuGet.config b/NuGet.Config similarity index 76% rename from NuGet.config rename to NuGet.Config index 1856e5de..6895cbec 100644 --- a/NuGet.config +++ b/NuGet.Config @@ -3,6 +3,5 @@ - - \ No newline at end of file + diff --git a/azure-pipelines-merge.yml b/azure-pipelines-merge.yml deleted file mode 100644 index f4081ff2..00000000 --- a/azure-pipelines-merge.yml +++ /dev/null @@ -1,111 +0,0 @@ -trigger: - branches: - include: - - main -pr: none - -variables: - - group: SerialLoopsPublic - -jobs: -- job: - displayName: UI Tests (macOS) - pool: - vmImage: macOS-latest - steps: - - checkout: self - clean: true - - task: DotNetCoreCLI@2 - inputs: - command: 'build' - projects: $(Build.SourcesDirectory)/src/SerialLoops.Mac/SerialLoops.Mac.csproj - displayName: Build SerialLoops.Mac - - task: DotNetCoreCLI@2 - inputs: - command: 'build' - projects: $(Build.SourcesDirectory)/test/ui/SerialLoops.Mac.Tests/SerialLoops.Mac.Tests.csproj - displayName: Build SerialLoops.Mac.Tests - - pwsh: | - mkdir $env:AGENT_BUILDDIRECTORY/devkitpro - Invoke-WebRequest -Uri $env:DOWNLOAD_URI -OutFile devkitpro.zip - Expand-Archive -Path devkitpro.zip -DestinationPath $env:AGENT_BUILDDIRECTORY/devkitpro - displayName: Bootstrap devkitARM - env: - DOWNLOAD_URI: $(DevkitARMUri) - - script: | - export DEVKITARM=$AGENT_BUILDDIRECTORY/devkitpro/devkitARM - npm i -g appium - appium driver install mac2 - displayName: Install and Run Appium Driver - - task: DotNetCoreCLI@2 - displayName: Run macOS UI tests - inputs: - command: 'test' - projects: $(Build.SourcesDirectory)/test/ui/SerialLoops.Mac.Tests/SerialLoops.Mac.Tests.csproj - env: - APP_LOCATION: "$(Build.SourcesDirectory)/src/SerialLoops.Mac/bin/Debug/net8.0/Serial Loops.app" - PROJECT_NAME: MacUITest - ROM_URI: $(ChokuRomUri) - LOG_FILE: $(Build.ArtifactStagingDirectory)/TestConsole.log - DEVKITARM: $(Agent.BuildDirectory)/devkitpro/devkitARM - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: $(Build.ArtifactStagingDirectory) - ArtifactName: MacTestArtifacts - publishLocation: Container - displayName: Publish macOS Test Artifacts - condition: always() -- job: - displayName: UI Tests (Windows) - pool: - name: LoopyPool - demands: - - Agent.OS -equals Windows_NT - steps: - - checkout: self - clean: true - - pwsh: | - Remove-Item -Path $env:USERPROFILE\SerialLoops\Logs\SerialLoops.log - displayName: Delete SL logs if they exist - continueOnError: true - - task: DotNetCoreCLI@2 - inputs: - command: 'build' - projects: $(Build.SourcesDirectory)/src/SerialLoops.Wpf/SerialLoops.Wpf.csproj - displayName: Build SerialLoops.Wpf - - task: DotNetCoreCLI@2 - inputs: - command: 'build' - projects: $(Build.SourcesDirectory)/test/ui/SerialLoops.Wpf.Tests/SerialLoops.Wpf.Tests.csproj - displayName: Build SerialLoops.Wpf.Tests - - task: Docker@2 - displayName: Pull devkitpro/devkitarm in advance - inputs: - command: pull - arguments: devkitpro/devkitarm - - task: ms-autotest.screen-resolution-utility-task.screen-resolution-utlity-task.ScreenResolutionUtility@1 - displayName: 'Set Screen Resolution' - inputs: - displaySettings: specific - width: 2048 - height: 1536 - - task: VSTest@3 - displayName: 'VsTest - Run UI Tests' - inputs: - testAssemblyVer2: | - **\*SerialLoops.Wpf.Tests.dll - !**\obj\** - uiTests: true - env: - APP_LOCATION: $(Build.SourcesDirectory)\src\SerialLoops.Wpf\bin\Debug\net8.0-windows\SerialLoops.exe - PROJECT_NAME: WinUITest - WINAPPDRIVER_LOC: 'C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe' - ROM_URI: $(ChokuRomUri) - LOG_FILE: $(Build.ArtifactStagingDirectory)/TestConsole.log - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: $(Build.ArtifactStagingDirectory) - ArtifactName: WindowsTestArtifacts - publishLocation: Container - displayName: Publish Windows Test Artifacts - condition: always() \ No newline at end of file diff --git a/azure-pipelines-official.yml b/azure-pipelines-official.yml deleted file mode 100644 index c34e9619..00000000 --- a/azure-pipelines-official.yml +++ /dev/null @@ -1,265 +0,0 @@ -trigger: none -pr: none - -schedules: -- cron: "0 23 * * *" - displayName: Nightly build - branches: - include: - - main - -parameters: -- name: version - displayName: Release Version - type: string - default: '' -- name: releaseNotes - displayName: Release Notes - type: string - default: 'Latest nightly build. **Note that this is likely to have bugs and we recommend you use a regular release instead!**' - -name: 0.3.pre.$(Rev:r) - -variables: - - name: Version - ${{ if ne(parameters['version'], '') }}: - value: ${{ parameters.version }} - ${{ if eq(parameters['version'], '') }}: - value: $(Build.BuildNumber) - - name: AssemblyVersion - ${{ if ne(parameters['version'], '') }}: - value: ${{ parameters.version }} - ${{ if eq(parameters['version'], '') }}: - value: ${{ replace(variables['Build.BuildNumber'], 'pre', '9999') }} - -stages: -- stage: Build - jobs: - - job: - strategy: - matrix: - Linux: - imageName: 'ubuntu-latest' - platformName: 'Gtk' - artifactName: 'Linux-v$(Version)' - framework: 'net8.0' - rid: 'linux-x64' - artifactPath: '$(Build.SourcesDirectory)/src/SerialLoops.$(platformName)/bin/Gtk/Release/net8.0/linux-x64/publish.tar.gz' - secondArtifactPath: '$(Build.SourcesDirectory)/dpkg-build/SerialLoops.deb' - thirdArtifactPath: '$(Build.SourcesDirectory)/rpmbuild/RPMS/x86_64/SerialLoops-$(Version)-1.fc39.x86_64.rpm' - extraPublishParams: '' - macOS-x64: - imageName: 'macOS-latest' - platformName: 'Mac' - artifactName: 'macOS-x64-v$(Version)' - framework: 'net8.0' - rid: 'osx-x64' - artifactPath: '$(Build.SourcesDirectory)/src/SerialLoops.$(platformName)/bin/Mac/Release/net8.0/osx-x64/Serial Loops.dmg' - secondArtifactPath: '' - thirdArtifactPath: '' - extraPublishParams: '/p:EnableDmgBuild=true' - macOS-arm64: - imageName: 'macOS-latest' - platformName: 'Mac' - artifactName: 'macOS-arm-v$(Version)' - framework: 'net8.0' - rid: 'osx-arm64' - artifactPath: '$(Build.SourcesDirectory)/src/SerialLoops.$(platformName)/bin/Mac/Release/net8.0/osx-arm64/Serial Loops.dmg' - secondArtifactPath: '' - thirdArtifactPath: '' - extraPublishParams: '/p:EnableDmgBuild=true' - Windows: - imageName: 'windows-latest' - platformName: 'Wpf' - artifactName: 'Windows-v$(Version)' - framework: 'net8.0-windows' - rid: 'win-x64' - artifactPath: '$(Build.SourcesDirectory)/src/SerialLoops.$(platformName)/bin/Wpf/Release/net8.0-windows/win-x64/publish.zip' - secondArtifactPath: '' - thirdArtifactPath: '' - extraPublishParams: '' - displayName: Build & Publish - pool: - vmImage: $(imageName) - steps: - - checkout: self - clean: true - - - pwsh: | - Push-Location .. - Move-Item s SerialLoops-$(Version) - tar -czvf SerialLoops-$(Version).tar.gz SerialLoops-$(Version) - Move-Item SerialLoops-$(Version) s - Pop-Location - displayName: Create source tar.gz for rpm package - condition: eq(variables['rid'], 'linux-x64') - - - task: DotNetCoreCLI@2 - inputs: - command: 'publish' - projects: $(Build.SourcesDirectory)/src/SerialLoops.$(platformName)/SerialLoops.$(platformName).csproj - arguments: '-c Release -f $(framework) -r $(rid) --self-contained /p:DebugType=None /p:DebugSymbols=false /p:PublishSingleFile=true' - publishWebProjects: false - env: - SLVersion: $(Version) - SLAssemblyVersion: $(AssemblyVersion) - displayName: Build & Publish Serial Loops - - - pwsh: | - Expand-Archive $(Build.SourcesDirectory)/src/SerialLoops.$(platformName)/bin/Gtk/Release/net8.0/linux-x64/publish.zip -DestinationPath $(Build.SourcesDirectory)/src/SerialLoops.$(platformName)/bin/Gtk/Release/net8.0/linux-x64/publish/ - chmod +x $(Build.SourcesDirectory)/src/SerialLoops.$(platformName)/bin/Gtk/Release/net8.0/linux-x64/publish/SerialLoops - Push-Location $(Build.SourcesDirectory)/src/SerialLoops.$(platformName)/bin/Gtk/Release/net8.0/linux-x64/publish - tar -czvf ../publish.tar.gz --transform 's,^\.\/,,' . - Pop-Location - mkdir -p dpkg-build/SerialLoops/DEBIAN - mkdir -p dpkg-build/SerialLoops/usr/bin - mkdir -p dpkg-build/SerialLoops/usr/lib/SerialLoops - mkdir -p dpkg-build/SerialLoops/usr/share/applications - Push-Location dpkg-build/SerialLoops - Write-Output "Package: SerialLoops`nVersion: $(Version)`nSection: custom`nPriority: optional`nArchitecture: all`nEssential: no`nDepends: libopenal-dev, make`nMaintainer: The Haroohie Translation Club `nHomepage: https://haroohie.club/`nDescription: Editor for Suzumiya Haruhi no Chokuretsu`n" | Out-File -FilePath DEBIAN/control - Write-Output "[Desktop Entry]`nVersion=$(Version)`nName=Serial Loops`nComment=Editor for Suzumiya Haruhi no Chokuretsu`nExec=/usr/bin/SerialLoops`nIcon=/usr/lib/SerialLoops/Icons/AppIcon.png`nTerminal=false`nType=Application`nCategories=Utility;Application;`n" | Out-File -FilePath usr/share/applications/SerialLoops.desktop - chmod 777 usr/lib/SerialLoops - chmod +x usr/share/applications/SerialLoops.desktop - mv $(Build.SourcesDirectory)/src/SerialLoops.$(platformName)/bin/Gtk/Release/net8.0/linux-x64/publish/* usr/lib/SerialLoops - ln -s /usr/lib/SerialLoops/SerialLoops usr/bin/SerialLoops - cd .. - dpkg-deb --build SerialLoops - Pop-Location - mkdir -p rpmbuild/BUILD - mkdir -p rpmbuild/RPMS - mkdir -p rpmbuild/SOURCES - mkdir -p rpmbuild/SPECS - mkdir -p rpmbuild/SRPMS - mv $(Build.SourcesDirectory)/../SerialLoops-$(Version).tar.gz $(Build.SourcesDirectory)/rpmbuild/SOURCES/ - Write-Output "Name: SerialLoops`nVersion: $(Version)`nRelease: 1%{?dist}`nSummary: Editor for Suzumiya Haruhi no Chokuretsu`nExclusiveArch: x86_64`n`nLicense: GPLv3`nURL: https://haroohie.club/chokuretsu/serial-loops`nSource0: %{name}-%{version}.tar.gz`nSource1: https://github.com/haroohie-club/SerialLoops`n`nBuildRequires: dotnet-sdk-8.0`nRequires: openal-soft make`n`n%global debug_package %{nil}`n%define __os_install_post %{nil}`n`n%description`nAn editor for the Nintendo DS game Suzumiya Haruhi no Chokuretsu (The Series of Haruhi Suzumiya)`n`n%prep`n%setup -q`n`n%build`ndotnet publish src/SerialLoops.Gtk/SerialLoops.Gtk.csproj -c Release -f net8.0 -r linux-x64 --self-contained /p:DebugType=None /p:DebugSymbols=false /p:PublishSingleFile=true`n`n%install`nrm -rf %{buildroot}`nmkdir -p %{buildroot}/%{_bindir}`nmkdir -p %{buildroot}/%{_libdir}/SerialLoops`nmkdir -p %{buildroot}/%{_datadir}/applications`ncp -r src/SerialLoops.Gtk/bin/Release/net8.0/linux-x64/publish/* %{buildroot}/%{_libdir}/SerialLoops/`nchmod 777 %{buildroot}/%{_libdir}/SerialLoops/`nln -s %{_libdir}/SerialLoops/SerialLoops %{buildroot}/%{_bindir}/SerialLoops`nprintf `"[Desktop Entry]\nVersion=%{version}\nName=Serial Loops\nComment=Editor for Suzumiya Haruhi no Chokuretsu\nExec=%{_bindir}/SerialLoops\nIcon=%{_libdir}/SerialLoops/Icons/AppIcon.png\nTerminal=false\nType=Application\nCategories=Utility;Application;\n`" > %{buildroot}/%{_datadir}/applications/SerialLoops.desktop`nchmod +x %{buildroot}/%{_datadir}/applications/SerialLoops.desktop`n`n%files`n%dir %{_libdir}/SerialLoops`n%{_bindir}/SerialLoops`n%{_libdir}/SerialLoops`n%{_datadir}/applications/SerialLoops.desktop`n" | Out-File -FilePath rpmbuild/SPECS/SerialLoops.spec - chmod +x $(Build.SourcesDirectory)/install/rpm-scripts/rpm-make.sh - docker run -v $(Build.SourcesDirectory)/install/rpm-scripts:/rpm-scripts -v $(Build.SourcesDirectory)/rpmbuild:/root/rpmbuild -e VERSION=$(Version) fedora:39 /rpm-scripts/rpm-make.sh - displayName: Create Linux tar, dpkg, and rpm - condition: eq(variables['rid'], 'linux-x64') - - # We need a second round of publishing to get dmg packing to work. Idk why, but it works if we do it this way lol - - task: DotNetCoreCLI@2 - inputs: - command: 'publish' - projects: $(Build.SourcesDirectory)/src/SerialLoops.$(platformName)/SerialLoops.$(platformName).csproj - arguments: '-c Release -f $(framework) -r $(rid) --self-contained /p:DebugType=None /p:DebugSymbols=false /p:PublishSingleFile=true $(extraPublishParams)' - publishWebProjects: false - env: - SLVersion: $(Version) - SLAssemblyVersion: $(AssemblyVersion) - displayName: Publishing Second Round - condition: ne(variables['extraPublishParams'], '') - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(artifactPath)' - ArtifactName: '$(artifactName)' - publishLocation: 'Container' - displayName: Publish build artifact - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(secondArtifactPath)' - ArtifactName: '$(artifactName)-2' - publishLocation: 'Container' - displayName: Publish secondary build artifact - condition: ne(variables['secondArtifactPath'], '') - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(thirdArtifactPath)' - ArtifactName: '$(artifactName)-3' - publishLocation: 'Container' - displayName: Publish tertiary build artifact - condition: ne(variables['thirdArtifactPath'], '') -- stage: Publish - dependsOn: Build - jobs: - - job: - pool: - vmImage: ubuntu-latest - displayName: Create Pre-Release - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Linux artifacts - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'Linux-v$(Version)' - downloadPath: '$(Build.ArtifactStagingDirectory)' - - task: DownloadBuildArtifacts@0 - displayName: Download Linux deb - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'Linux-v$(Version)-2' - downloadPath: '$(Build.ArtifactStagingDirectory)' - - task: DownloadBuildArtifacts@0 - displayName: Download Linux rpm - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'Linux-v$(Version)-3' - downloadPath: '$(Build.ArtifactStagingDirectory)' - - task: DownloadBuildArtifacts@0 - displayName: Download macOS x64 artifacts - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'macOS-x64-v$(Version)' - downloadPath: '$(Build.ArtifactStagingDirectory)' - - task: DownloadBuildArtifacts@0 - displayName: Download macOS ARM artifacts - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'macOS-arm-v$(Version)' - downloadPath: '$(Build.ArtifactStagingDirectory)' - - task: DownloadBuildArtifacts@0 - displayName: Download Windows artifacts - inputs: - buildType: 'current' - downloadType: 'single' - artifactName: 'Windows-v$(Version)' - downloadPath: '$(Build.ArtifactStagingDirectory)' - - pwsh: | - Move-Item -Path $(Build.ArtifactStagingDirectory)/Linux-v$(Version)/publish.tar.gz -Destination $(Build.ArtifactStagingDirectory)/SerialLoops-linux-x64-v$(Version).tar.gz - Move-Item -Path $(Build.ArtifactStagingDirectory)/Linux-v$(Version)-2/SerialLoops.deb -Destination $(Build.ArtifactStagingDirectory)/SerialLoops-$(Version)_amd64.deb - Move-Item -Path $(Build.ArtifactStagingDirectory)/Linux-v$(Version)-3/SerialLoops-$(Version)-1.fc39.x86_64.rpm -Destination $(Build.ArtifactStagingDirectory)/SerialLoops-$(Version)-1.fc39.x86_64.rpm - Move-Item -Path "$(Build.ArtifactStagingDirectory)/macOS-x64-v$(Version)/Serial Loops.dmg" -Destination $(Build.ArtifactStagingDirectory)/SerialLoops-macOS-x64-v$(Version).dmg - Move-Item -Path "$(Build.ArtifactStagingDirectory)/macOS-arm-v$(Version)/Serial Loops.dmg" -Destination $(Build.ArtifactStagingDirectory)/SerialLoops-macOS-arm-v$(Version).dmg - Move-Item -Path $(Build.ArtifactStagingDirectory)/Windows-v$(Version)/publish.zip -Destination $(Build.ArtifactStagingDirectory)/SerialLoops-windows-x64-v$(Version).zip - displayName: Move and rename artifacts - - task: GitHubRelease@1 - displayName: 'Create GitHub Pre-Release' - inputs: - gitHubConnection: 'GitHub Connection (Jonko)' - tagSource: userSpecifiedTag - tag: '$(Version)' - title: 'Serial Loops v$(Version)' - releaseNotesSource: inline - releaseNotesInline: | - ${{ parameters.releaseNotes }} - - ## Installation Notes - Please ensure you have installed [devkitARM from devkitPro](https://devkitpro.org/wiki/Getting_Started) before using the program. Select the NDS Development workload when installing to do this. - - Additionally, to test the game you will need to have a Nintendo DS emulator installed. We recommend [melonDS](https://melonds.kuribo64.net/) for its accuracy. - - ### Windows - There is currently no Windows installer; instead, you simply download the zip and run the application directly. Because our application contacts GitHub's servers to check for new releases on lauch, it is possible it will get flagged by firewall software – please allow it through so it can function correctly. - - ### macOS - On macOS, after dragging the app from the dmg into Applications, please run `xattr -cr "/Applications/Serial Loops.app"` from the Terminal in order to be able to run the app. This is required because we currently don't codesign the application, meaning macOS will refuse to run it without explicit approval from you. - - #### Which macOS dmg should I choose? - If your Mac is newer, you will probably want the ARM dmg. If it is older, you will 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 - The `.deb` package is intended for Debian-based distros (e.g. Ubuntu). Install it with `sudo apt install -f ./SerialLoops-$(Version)_amd64.deb`. - The `.rpm` package is intended for Red Hat distros (e.g. Fedora). Install it with `sudo dnf install ./SerialLoops-$(Version)-1.fc39.x86_64.rpm`. - For other Linux distros, please use the binaries packaged in the `.tar.gz` archive; when doing so, ensure you install the OpenAL binaries so audio playback works. - ${{ if eq(parameters['version'], '') }}: - isPreRelease: true - ${{ if ne(parameters['version'], '') }}: - isPreRelease: false \ No newline at end of file diff --git a/install/linux/dpkg-build/SerialLoops/DEBIAN/control b/install/linux/dpkg-build/SerialLoops/DEBIAN/control new file mode 100644 index 00000000..2efb6c17 --- /dev/null +++ b/install/linux/dpkg-build/SerialLoops/DEBIAN/control @@ -0,0 +1,10 @@ +Package: SerialLoops +Version: #VERSION# +Section: custom +Priority: optional +Architecture: amd64 +Essential: no +Depends: libopenal-dev, make, dotnet-sdk-8.0 +Maintainer: The Haroohie Translation Club +Homepage: https://haroohie.club/chokurestu/serial-loops/ +Description: Editor for Suzumiya Haruhi no Chokuretsu diff --git a/install/linux/dpkg-build/SerialLoops/usr/lib/SerialLoops/.gitkeep b/install/linux/dpkg-build/SerialLoops/usr/lib/SerialLoops/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/install/linux/dpkg-build/SerialLoops/usr/share/applications/SerialLoops.desktop b/install/linux/dpkg-build/SerialLoops/usr/share/applications/SerialLoops.desktop new file mode 100755 index 00000000..998e9944 --- /dev/null +++ b/install/linux/dpkg-build/SerialLoops/usr/share/applications/SerialLoops.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=#VERSION# +Name=Serial Loops +Comment=Editor for Suzumiya Haruhi no Chokuretsu +Exec=/usr/bin/SerialLoops +Icon=/usr/lib/SerialLoops/SerialLoops.png +Terminal=false +Type=Application +Categories=Utility;Application diff --git a/install/linux/flatpak/club.haroohie.SerialLoops.desktop b/install/linux/flatpak/club.haroohie.SerialLoops.desktop new file mode 100644 index 00000000..57ed1814 --- /dev/null +++ b/install/linux/flatpak/club.haroohie.SerialLoops.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=Serial Loops +Comment=Editor for Suzumiya Haruhi no Chokuretsu +Exec=SerialLoops +Icon=club.haroohie.SerialLoops +Terminal=false +Type=Application +Categories=Utility;Application diff --git a/install/linux/flatpak/club.haroohie.SerialLoops.metainfo.xml b/install/linux/flatpak/club.haroohie.SerialLoops.metainfo.xml new file mode 100644 index 00000000..e599b918 --- /dev/null +++ b/install/linux/flatpak/club.haroohie.SerialLoops.metainfo.xml @@ -0,0 +1,58 @@ + + + club.haroohie.SerialLoops + CC0-1.0 + GPL-3.0-or-later + Serial Loops + club.haroohie.SerialLoops.desktop + Editor for Suzumiya Haruhi no Chokuretsu + + Serial Loops is a full-fledged editor for the Nintendo DS game Suzumiya Haruhi no Chokuretsu (The Series of Haruhi Suzumiya). + + + #9accfe + #042058 + + + The Haroohie Translation Club + https://haroohie.club/chokuretsu/serial-loops + + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + + diff --git a/install/linux/flatpak/club.haroohie.SerialLoops.yaml b/install/linux/flatpak/club.haroohie.SerialLoops.yaml new file mode 100644 index 00000000..708455af --- /dev/null +++ b/install/linux/flatpak/club.haroohie.SerialLoops.yaml @@ -0,0 +1,86 @@ +id: club.haroohie.SerialLoops +runtime: org.freedesktop.Platform +runtime-version: '23.08' +sdk: org.freedesktop.Sdk +sdk-extensions: + - org.freedesktop.Sdk.Extension.dotnet8 +build-options: + prepend-path: "/usr/lib/sdk/dotnet8/bin" + append-ld-library-path: "/usr/lib/sdk/dotnet8/lib" + prepend-pkg-config-path: "/usr/lib/sdk/dotnet8/lib/pkgconfig" + +command: SerialLoops + +finish-args: + - --device=dri + - --socket=x11 + - --share=ipc + - --share=network + - --socket=pulseaudio + - --filesystem=~/SerialLoops:create + - --filesystem=xdg-config:create + - --env=DOTNET_ROOT=/app/lib/dotnet + - --env=DEVKITPRO=/opt/devkitpro + - --env=DEVKITARM=${DEVKITPRO}/devkitARM + - --env="PATH=${DEVKITPRO}/tools/bin:$PATH" + - --talk-name=org.freedesktop.Flatpak + +modules: + - name: dotnet + buildsystem: simple + build-commands: + - /usr/lib/sdk/dotnet8/bin/install.sh + + - name: devkitARM + buildsystem: simple + sources: + - type: archive + url: https://haroohie.nyc3.cdn.digitaloceanspaces.com/bootstrap/serial-loops/dkp.zip + sha256: 91d9d524d5150ae892de4457c4cbb7eaa5edcb2449a85366def678242b1f60e2 + build-commands: + - mkdir -p ${FLATPAK_DEST}/opt/ + - cp -r ./* ${FLATPAK_DEST}/opt/ + + - name: make + buildsystem: autotools + sources: + - type: archive + url: https://mirror.team-cymru.com/gnu/make/make-4.4.tar.gz + sha256: 581f4d4e872da74b3941c874215898a7d35802f03732bdccee1d4a7979105d18 + build-commands: + - ./configure --prefix=${FLATPAK_DEST}/app/usr/local + - make + - make install + + - name: OpenAL + buildsystem: cmake + sources: + - type: git + url: https://github.com/kcat/openal-soft.git + + - name: SerialLoops + buildsystem: simple + sources: + - type: git + url: https://github.com/haroohie-club/SerialLoops.git + branch: Avalonia + - ./nuget-sources.json + - type: patch + path: patches/sandbox.patch + - type: file + path: club.haroohie.SerialLoops.metainfo.xml + - type: file + path: club.haroohie.SerialLoops.desktop + - type: file + path: ../../../src/SerialLoops/Assets/Icons/AppIcon.svg + - type: file + path: VERSION + build-commands: + - export SLVersion=$(cat VERSION) + - export SLAssemblyVersion=$(sed -n 's/pre/9999/p' VERSION) + - dotnet publish src/SerialLoops/SerialLoops.csproj -c Release -f net8.0 --no-self-contained --source ./nuget-sources + - mkdir -p ${FLATPAK_DEST}/bin + - cp -r src/SerialLoops/bin/Release/net8.0/publish/* ${FLATPAK_DEST}/bin + - install -Dm644 AppIcon.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/club.haroohie.SerialLoops.svg + - install -Dm644 club.haroohie.SerialLoops.metainfo.xml ${FLATPAK_DEST}/share/metainfo/club.haroohie.SerialLoops.metainfo.xml + - install -Dm644 club.haroohie.SerialLoops.desktop ${FLATPAK_DEST}/share/applications/club.haroohie.SerialLoops.desktop diff --git a/install/linux/flatpak/flatpak-dotnet-generator.py b/install/linux/flatpak/flatpak-dotnet-generator.py new file mode 100644 index 00000000..5bd8c94c --- /dev/null +++ b/install/linux/flatpak/flatpak-dotnet-generator.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python3 + +__license__ = 'MIT' + +from pathlib import Path + +import argparse +import base64 +import binascii +import json +import requests +import subprocess +import tempfile + + +def main(): + # Bump this to latest freedesktop runtime version. + freedesktop_default = '22.08' + # Bump this to an LTS dotnet version. + dotnet_default = '6' + + parser = argparse.ArgumentParser() + parser.add_argument('output', help='The output JSON sources file') + parser.add_argument('project', help='The project file') + parser.add_argument('--runtime', '-r', help='The target runtime to restore packages for') + parser.add_argument('--freedesktop', '-f', help='The target version of the freedesktop sdk to use', + default=freedesktop_default) + parser.add_argument('--dotnet', '-d', help='The target version of dotnet to use', + default=dotnet_default) + parser.add_argument('--destdir', + help='The directory the generated sources file will save sources to', + default='nuget-sources') + args = parser.parse_args() + + sources = [] + + with tempfile.TemporaryDirectory(dir=Path()) as tmp: + runtime_args = [] + if args.runtime: + runtime_args.extend(('-r', args.runtime)) + + subprocess.run(['dotnet', 'restore', '--packages', tmp, args.project] + runtime_args) + + for path in Path(tmp).glob('**/*.nupkg.sha512'): + name = path.parent.parent.name + version = path.parent.name + filename = '{}.{}.nupkg'.format(name, version) + url = 'https://api.nuget.org/v3-flatcontainer/{}/{}/{}'.format(name, version, + filename) + if requests.head(url).status_code != 200: + url = 'https://pkgs.dev.azure.com/jonko0493/haroohie-public/_apis/packaging/feeds/haroohie/nuget/packages/{}/versions/{}/content?api-version=7.1-preview.1'.format(name, version) + + with path.open() as fp: + sha512 = binascii.hexlify(base64.b64decode(fp.read())).decode('ascii') + + sources.append({ + 'type': 'file', + 'url': url, + 'sha512': sha512, + 'dest': args.destdir, + 'dest-filename': filename, + }) + + with open(args.output, 'w') as fp: + json.dump( + sorted(sources, key=lambda n: n.get("dest-filename")), + fp, + indent=4 + ) + + +if __name__ == '__main__': + main() diff --git a/install/linux/flatpak/patches/sandbox.patch b/install/linux/flatpak/patches/sandbox.patch new file mode 100644 index 00000000..8fc68060 --- /dev/null +++ b/install/linux/flatpak/patches/sandbox.patch @@ -0,0 +1,56 @@ +diff --git a/src/SerialLoops.Lib/Factories/ConfigFactory.cs b/src/SerialLoops.Lib/Factories/ConfigFactory.cs +index 275c2c2..434b611 100644 +--- a/src/SerialLoops.Lib/Factories/ConfigFactory.cs ++++ b/src/SerialLoops.Lib/Factories/ConfigFactory.cs +@@ -71,7 +71,7 @@ public class ConfigFactory : IConfigFactory + } + else + { +- devkitArmDir = Path.Combine("/opt", "devkitpro", "devkitARM"); ++ devkitArmDir = Path.Combine("/app", "opt", "devkitpro", "devkitARM"); + } + } + if (!Directory.Exists(devkitArmDir)) +@@ -96,7 +96,7 @@ public class ConfigFactory : IConfigFactory + { + Process flatpakProc = new() + { +- StartInfo = new ProcessStartInfo("flatpak", ["info", emulatorFlatpak]) ++ StartInfo = new ProcessStartInfo("flatpak-spawn", ["--host", "flatpak", "info", emulatorFlatpak]) + { + RedirectStandardError = true, RedirectStandardOutput = true + } +diff --git a/src/SerialLoops/ViewModels/MainWindowViewModel.cs b/src/SerialLoops/ViewModels/MainWindowViewModel.cs +index d866647..97c09f3 100644 +--- a/src/SerialLoops/ViewModels/MainWindowViewModel.cs ++++ b/src/SerialLoops/ViewModels/MainWindowViewModel.cs +@@ -683,7 +683,7 @@ public partial class MainWindowViewModel : ViewModelBase + string emulatorExecutable = CurrentConfig.EmulatorPath; + if (!string.IsNullOrWhiteSpace(CurrentConfig.EmulatorFlatpak)) + { +- emulatorExecutable = "flatpak"; ++ emulatorExecutable = "flatpak-spawn"; + } + if (emulatorExecutable.EndsWith(".app")) + { +@@ -692,11 +692,11 @@ public partial class MainWindowViewModel : ViewModelBase + } + + string[] emulatorArgs = [Path.Combine(OpenProject.MainDirectory, $"{OpenProject.Name}.nds")]; +- if (emulatorExecutable.Equals("flatpak")) ++ if (emulatorExecutable.Equals("flatpak-spawn")) + { + emulatorArgs = + [ +- "run", CurrentConfig.EmulatorFlatpak, ++ "--host", "flatpak", "run", CurrentConfig.EmulatorFlatpak, + Path.Combine(OpenProject.MainDirectory, $"{OpenProject.Name}.nds") + ]; + } +@@ -863,4 +863,4 @@ public partial class MainWindowViewModel : ViewModelBase + Icon = ControlGenerator.GetVectorIcon("Search", Log), + }); + } +-} +\ No newline at end of file ++} diff --git a/install/linux/rpm/rpmbuild/BUILD/.gitkeep b/install/linux/rpm/rpmbuild/BUILD/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/install/linux/rpm/rpmbuild/RPMS/.gitkeep b/install/linux/rpm/rpmbuild/RPMS/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/install/linux/rpm/rpmbuild/SOURCES/.gitkeep b/install/linux/rpm/rpmbuild/SOURCES/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/install/linux/rpm/rpmbuild/SPECS/SerialLoops.spec b/install/linux/rpm/rpmbuild/SPECS/SerialLoops.spec new file mode 100644 index 00000000..3b15beaa --- /dev/null +++ b/install/linux/rpm/rpmbuild/SPECS/SerialLoops.spec @@ -0,0 +1,39 @@ +Name: SerialLoops +Version: #VERSION# +Release: 1%{?dist} +Summary: Editor for Suzumiya Haruhi no Chokuretsu +ExclusiveArch: x86_64 +License: GPLv3 +URL: https://haroohie.club/chokurestu/serial-loops/ +Source0: %{name}-%{version}.tar.gz +Source1: https://github.com/haroohie-club/SerialLoops +BuildRequires: dotnet-sdk-8.0 +Requires: openal-soft make + +%global debug_package %{nil} +%define __os_install_post %{nil} + +%description +An editor for the Nintendo DS game Suzumiya Haruhi no Chokuretsu (The Series of Haruhi Suzumiya) + +%prep +%setup -q + +%build +dotnet publish src/SerialLoops/SerialLoops.csproj -c Release -f net8.0 -r linux-x64 --self-contained /p:DebugType=None /p:DebugSymbols=false /p:PublishSingleFile=true + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_bindir} +mkdir -p %{buildroot}/%{_datadir}/applications +mkdir -p %{buildroot}/%{_libdir}/SerialLoops +cp -r src/SerialLoops/bin/Release/net8.0/linux-x64/publish/* %{buildroot}/%{_libdir}/SerialLoops/ +chmod 777 %{buildroot}/%{_libdir}/SerialLoops/ +ln -s %{_libdir}/SerialLoops/SerialLoops %{buildroot}/%{_bindir}/SerialLoops +printf "[Desktop Entry]\nVersion=%{version}\nName=Serial Loops\nComment=Editor for Suzumiya Haruhi no Chokuretsu\nExec=%{_bindir}/SerialLoops\nIcon=%{_libdir}/SerialLoops/Assets/Icons/AppIcon.png\nTerminal=false\nType=Application\nCategories=Utility;Application\n" > %{buildroot}/%{_datadir}/applications/SerialLoops.desktop +chmod +x %{buildroot}/%{_datadir}/applications/SerialLoops.desktop + +%files +%{_bindir}/SerialLoops +%{_libdir}/SerialLoops +%{_datadir}/applications/SerialLoops.desktop diff --git a/install/linux/rpm/rpmbuild/SRPMS/.gitkeep b/install/linux/rpm/rpmbuild/SRPMS/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/install/macos/cleanup-logs.sh b/install/macos/cleanup-logs.sh new file mode 100644 index 00000000..480fc8cf --- /dev/null +++ b/install/macos/cleanup-logs.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +rm /var/tmp/SerialLoopsInstaller.log + +exit 0 diff --git a/install/macos/install-dependencies.sh b/install/macos/install-dependencies.sh new file mode 100644 index 00000000..ae20f7e6 --- /dev/null +++ b/install/macos/install-dependencies.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ ! -d "/opt/devkitpro/devkitARM" ]; then + installer -pkg devkitpro-pacman-installer.pkg -target / -dumplog >> /var/tmp/SerialLoopsInstaller.log + xcode-select --install || true >> /var/tmp/SerialLoopsInstaller.log + dkp-pacman -Sy --noconfirm >> /var/tmp/SerialLoopsInstaller.log + dkp-pacman -S --noconfirm nds-dev >> /var/tmp/SerialLoopsInstaller.log +fi + +exit 0 diff --git a/install/macos/serial_loops_pkg_builder.py b/install/macos/serial_loops_pkg_builder.py new file mode 100644 index 00000000..3a5e58f0 --- /dev/null +++ b/install/macos/serial_loops_pkg_builder.py @@ -0,0 +1,34 @@ +from macos_pkg_builder import Packages +from sys import argv +import urllib.request + +ver = argv[1] +rid = argv[2] + +urllib.request.urlretrieve("https://github.com/devkitPro/pacman/releases/download/v6.0.2/devkitpro-pacman-installer.pkg", "devkitpro-pacman-installer.pkg") + +with open("welcome.md") as welcome_file: + welcome_md = welcome_file.read() +with open("../../README.md") as readme_file: + readme_md = readme_file.read() +with open("../../LICENSE") as license_file: + license_md = license_file.read() + +pkg_obj = Packages( + pkg_output=f"SerialLoops-{rid}.pkg", + pkg_bundle_id="club.haroohie.serialloopsinstaller", + pkg_file_structure={ + "./Serial Loops.app": "/Applications/Serial Loops.app", + }, + pkg_preinstall_script="install-dependencies.sh", + pkg_script_resources=['devkitpro-pacman-installer.pkg'], + pkg_postinstall_script="cleanup-logs.sh", + pkg_as_distribution=True, + pkg_version=ver, + pkg_welcome=welcome_md, + pkg_readme=readme_md, + pkg_license=license_md, + pkg_title="Serial Loops" +) + +assert pkg_obj.build() is True diff --git a/install/macos/welcome.md b/install/macos/welcome.md new file mode 100644 index 00000000..64094b02 --- /dev/null +++ b/install/macos/welcome.md @@ -0,0 +1,9 @@ +# Welcome to Serial Loops! +This application will guide you through installing Serial Loops and all of its dependencies. + +The following applications will be installed: +* devkitARM by devkitPro +* make +* Serial Loops + +If any of these are already installed, they will be skipped! diff --git a/install/windows/serial-loops.iss b/install/windows/serial-loops.iss new file mode 100644 index 00000000..f4d1cee7 --- /dev/null +++ b/install/windows/serial-loops.iss @@ -0,0 +1,76 @@ +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +#define MyAppName "Serial Loops" +#define MyAppVersion "#VERSION#" +#define MyAppPublisher "The Haroohie Translation Club" +#define MyAppURL "https://haroohie.club/chokuretsu/serial-loops" +#define MyAppExeName "SerialLoops.exe" +#define MyAppAssocName MyAppName + " Project" +#define MyAppAssocExt ".slproj" +#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt + +[Setup] +; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications. +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) +AppId={{2CD00D2C-F0F5-4E6A-A772-C6FA479F5370} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +;AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName={autopf}\{#MyAppName} +; "ArchitecturesAllowed=x64compatible" specifies that Setup cannot run +; on anything but x64 and Windows 11 on Arm. +ArchitecturesAllowed=x64compatible +; "ArchitecturesInstallIn64BitMode=x64compatible" requests that the +; install be done in "64-bit mode" on x64 or Windows 11 on Arm, +; meaning it should use the native 64-bit Program Files directory and +; the 64-bit view of the registry. +ArchitecturesInstallIn64BitMode=x64compatible +ChangesAssociations=yes +DisableProgramGroupPage=yes +LicenseFile=..\..\LICENSE +UninstallDisplayIcon={app}\{#MyAppExeName} +; Uncomment the following line to run in non administrative install mode (install for current user only.) +;PrivilegesRequired=lowest +PrivilegesRequiredOverridesAllowed=commandline +OutputBaseFilename=SerialLoopsInstaller +SetupIconFile=..\..\src\SerialLoops\Assets\serial-loops.ico +Compression=lzma +SolidCompression=yes +WizardStyle=modern + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked +Name: "devkitarm"; Description: "Install devkitARM"; GroupDescription: "Install Other Tools"; Flags: checkedonce +Name: "dockerdesktop"; Description: "Install Docker Desktop"; GroupDescription: "Install Other Tools"; Flags: checkedonce + +[Files] +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: "Docker Desktop Installer.exe"; DestDir: {tmp}; Flags: deleteafterinstall; Tasks: dockerdesktop +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Registry] +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0" +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1""" +Root: HKA; Subkey: "Software\Classes\Applications\{#MyAppExeName}\SupportedTypes"; ValueType: string; ValueName: ".myp"; ValueData: "" + +[Icons] +Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" +Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon + +[Run] +Filename: "{tmp}\devkitProUpdater-3.0.3.exe"; WorkingDir: {tmp}; Tasks: devkitarm +Filename: "{tmp}\Docker Desktop Installer.exe"; WorkingDir: {tmp}; Tasks: dockerdesktop +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent + diff --git a/src/SerialLoops.Lib/Factories/ConfigFactory.cs b/src/SerialLoops.Lib/Factories/ConfigFactory.cs index 8e6dbf45..275c2c28 100644 --- a/src/SerialLoops.Lib/Factories/ConfigFactory.cs +++ b/src/SerialLoops.Lib/Factories/ConfigFactory.cs @@ -3,7 +3,9 @@ using System.Globalization; using System.IO; using System.Runtime.InteropServices; +using System.Security.Cryptography; using System.Text.Json; +using DynamicData.Binding; using HaruhiChokuretsuLib.Util; namespace SerialLoops.Lib.Factories; @@ -92,7 +94,22 @@ public static Config GetDefault(ILogger log) emulatorFlatpak = "net.kuribo64.melonDS"; try { - Process flatpakProc = Process.Start((new ProcessStartInfo("flatpak", ["info", emulatorFlatpak]))); + Process flatpakProc = new() + { + StartInfo = new ProcessStartInfo("flatpak", ["info", emulatorFlatpak]) + { + RedirectStandardError = true, RedirectStandardOutput = true + } + }; + flatpakProc.OutputDataReceived += (_, args) => log.Log(args.Data ?? string.Empty); + flatpakProc.ErrorDataReceived += (_, args) => + { + if (!string.IsNullOrEmpty(args.Data)) + { + log.LogWarning(args.Data); + } + }; + flatpakProc.Start(); flatpakProc?.WaitForExit(); emulatorExists = flatpakProc?.ExitCode == 0; } @@ -124,4 +141,4 @@ public static Config GetDefault(ILogger log) PreReleaseChannel = false, }; } -} \ No newline at end of file +} diff --git a/src/SerialLoops/Assets/Strings.pt-BR.resx b/src/SerialLoops/Assets/Strings.pt-BR.resx index d743fe4e..82cfd253 100644 --- a/src/SerialLoops/Assets/Strings.pt-BR.resx +++ b/src/SerialLoops/Assets/Strings.pt-BR.resx @@ -382,2075 +382,4 @@ Save de Chokuretsu - - 提取 - - - 确认 - - - 选择同伴描述 - - - 淡入百分比 - - - 第 5 章 - - - 在默认或指定的安装位置未检测到 devkitARM 。请设置 devkitARM 路径。 - - - 语言模板 - - - 展示旗标 3 - - - 清理迭代目录失败 - - - 第 3 章滚动条 - - - 将 evt.bin 中的文件 {0} 替换为文件“{1}”失败 - - - 最近使用 - - - 打开项目 - - - 正在导出 GIF… - - - 指令 - - - 第 2 章标题 - - - 淡出百分比 - - - 将图形文件 {0} 替换为文件“{1}”失败 - - - 将 evt.bin 中的源文件 {0} 替换为文件“{1}”失败 - - - 将音频文件编码到 ADX 失败。 - - - 未能对 ROM 应用以下修改:\n{0}\n\n有关详细信息,请检查日志文件。\n\n为了保持当前状态,没有应用任何修改。 - - - 错误 - - - 章节: - - - 擦除数据选项滚动条 - - - 关闭项目 - - - 将 grp.bin 中的动画文件 {0} 替换为文件“{1}”失败 - - - 创建新项目 - - - 从 Vorbis 转换… - - - 还原 BGM 文件失败。 - - - 第 1 章滚动条 - - - 清除所有象棋谜题消息框 - - - 已收集所有实玖瑠话题消息框 - - - 最近的项目 - - - 选择同伴 - - - 清除游戏场景中的所有命令?\n此行为不可逆。 - - - 模拟器路径 - - - 第 3 章 - - - 新项目… - - - 第 5 章标题 - - - 额外项目解锁消息框 - - - 对话文本 - - - 导出 SFX - - - 添加到事件表 - - - 复制 - - - 关闭除此之外的所有 - - - 创建文件夹 - - - 跳过对话设置 - - - 已收集所有主要话题消息框 - - - 编码 - - - 英语 - - - 创建 - - - 新项目 - - - 第 5 章滚动条 - - - 清除脚本 - - - 检测到损坏的文件! - - - 编辑教程映射 - - - 延迟(帧数) - - - 导出 GIF - - - 章节编号 - - - 编辑存档文件 - - - 必须同时选择导出项目和基础 ROM 才能导入项目。 - - - 章节组 - - - 获取脚本 {0}({1})的脚本命令树时出错 - {0} is the script display name, {1} is the script's underlying name - - - 将归档文件复制到迭代原件 - - - 导出道具名 - - - 章节唯一 - - - 创建补丁 - - - 导出项目... - - - 编辑存档文件 - {0} - - - 导出 BGM - - - 快进对话 - - - 添加读取旗标 - As in "add a read flag to the script" - - - 音频文件下采样失败。 - - - 配置数据 - - - 章节头 - - - 将新建的归档文件复制到迭代原始目录失败 - - - 指令类型: - - - 编辑教程映射… - - - 正在绘制纹理… - - - 淡入淡出时间(帧数) - - - 持续时间(帧数) - - - 修剪标签时出错! - - - 通用存档… - - - 俄语 - - - 结束脚本部分 - - - 关闭右侧的所有 - - - 日语 - - - 尝试缓存音频文件失败 - - - 开始 - - - 错误:检测到重复的修改!已导入与此修改中的文件同名的文件。 - - - 将文件“{0}”复制到路径“{1}”处的基目录和迭代目录失败 - - - 打开导出的项目 - As in a slzip exported project - - - 删除所有数据消息框 - - - 编辑 UI 文本… - - - 结束 - - - 剪裁&缩放 - - - 进入/退出 - - - 通用存档 - - - 创建项目 - - - 解析 config.json 时发生异常! - - - 已收集所有长门话题消息框 - - - 转换帧… - - - 第 1 章标题 - - - 胜利部分 - - - 指令序号: - - - 对话 - - - 从 GitHub 下载版本 - - - 展示旗标 2 - - - 设置 - - - 导出帧 - - - 对话: - - - 启动模拟器失败 - - - 淡出时间(帧数) - - - 第 1 章 - - - 正在绘制上屏幕瓦片… - - - 第 4 章滚动条 - - - 淡入淡出时间(帧数) - - - 运行 - - - 展示? - - - 第 2 章 - - - 正在下采样… - - - 导出 - - - 将 dat.bin 中的源文件 {0} 替换为文件“{1}”失败 - - - 已收集所有古泉话题消息框 - - - 表情 - - - 不清除文本 - - - 从 GitHub 下载 - - - 编辑字幕 - - - 跳过对话滚动条 - - - 导出补丁 - - - 请输入字幕文本… - - - 项目创建对话框未提供编辑器选项卡 - - - 自定义颜色 - - - 失败后继续 - - - 关闭所有 - - - 导出项目 - - - devkitARM Docker 标签 - - - 清除场景 - - - 展示旗标 1 - - - 在修改 {1} 中为修改文件 {0} 添加参数失败 - - - 展示旗标 4 - - - 保存 - - - 跳过对话 - - - 淡入时间(帧数) - - - 导出精灵图 - - - 默认 - - - 将音频文件转换为 WAV 失败。 - - - 删除 - - - 第 4 章 - - - 颜色 - - - 导出项目 - - - 解析 projects_cache.json 时发生异常! - - - 意大利语 - - - 检查更新失败!(端点:{0}) - - - 第 2 章滚动条 - - - 错误:检测到重复的修改!已导入同名修改。 - - - 计算图形边界失败! - - - 禁用口型同步 - - - 正在复制文件 - - - devkitARM 路径 - - - 剪切 - - - 编辑 UI 文本 - - - 从下向上展示 - - - 跳过已读对话 - - - 条件式 - - - 绘制起点 - - - 交叉空间 {0}" - As on a chessboard - - - 为了构建,必须提供 devkitARM! - - - 擦除数据选项标题 - - - 第 4 章标题 - - - 第 3 章标题 - - - 正在绘制下屏幕纹理… - - - 已编译的文件 {0} 不存在! - - - Ctrl+滚轮 - 缩放图片 - - - 已导出的项目 - Past tense verb as in "project has been exported" - - - 已收集所有春日话题消息框 - - - 预期的 ROM SHA-1 哈希值:{0} - {0} is the SHA-1 hash of the ROM that is expected when importing a project - - - 从 MP3 转换… - - - EPISODE: {0} - Should match the game's translation for this (e.g. for Japanese this should still be EPISODE: {0}) - - - 编辑存档文件… - - - 语言 - - - 读取存档文件时出错。 - - - 重置数据消息框 - - - 绘制路径图 - - - 古泉时间百分比 - - - 长门同伴选择描述 - - - 替换 - - - 创建命令失败 - - - 对 {0} 的引用 - - - 话题库存模式 - - - 突出显示格 {0} - As on a chessboard - - - 开始读取旗标 - As in, the first read flag of the script file - - - 重命名项目 - - - 脚本位置 - - - 加载语音文件失败:文件无效。 - - - 神秘女孩的声音添加到配置中消息框 - - - 插入 ARM9 程序集修改失败 - - - 关闭时更新 - - - 游戏解谜阶段(选项) - - - 文本速度 - - - 选项 3 - - - 生成脚本模板失败! - - - 项目 - - - 删除文件“{0}”失败 - - - 未应用修改! - - - 解谜中断场景设置 - - - 游戏标题 - - - 设置 - - - NDS ROM - - - ROM 哈希值不匹配 - Message box title when there is a mismatch between the expected ROM hash and the selected ROM hash on project import - - - 名称“{0}”已被使用! - {0} is the name of an item (this appears when attempting to rename an item) - - - 在“{0}”处找不到gcc - - - 包括口型动画吗? - - - 选择一个话题 - - - 隐藏 ID - - - 已迁移到新 ROM! - - - 地点 - - - 加载提示消息框 - - - 导出项目失败 - Failed to export the Serial Loops project file to an slzip, basically - - - 标题屏幕选项滚动条 - - - 调查阶段结果 - - - 补丁已创建! - - - 话题 - - - 缩放图像 - - - 选择图标 - - - 字幕文本 - - - SFX - - - 语音字体 - - - 没有存档数据滚动条 - - - 标题屏幕新游戏滚动条 - - - 设置 - As in "set value to" - - - 图像文件 - - - 有大纲吗? - - - 请在创建项目之前选择 ROM。 - - - 凉宫春日事件解锁消息框 - - - 剧情 - - - 加载编辑器控件失败! - - - 朝比奈实玖瑠事件解锁消息框 - - - 无声对话音量选项滚动条 - - - 正在写入包含文件 - "Includes" here is a noun, as in "an 'includes' file" - - - 语音 - - - 话题集 - - - 使用 Docker 进行 ASM 修改 - - - 加载缓存数据失败 - - - 替换… - - - 显示 - As in show/hide - - - 已获得 {0} - {0} is the name of a topic that's been obtained - - - 切换鹤屋语音滚动条 - - - 游戏横幅最多只能包含三行。 - - - 目标编号 - - - 此脚本未包含在事件表中。 - - - Vorbis 文件 - - - 删除起始 Q 版角色 - - - 保持时间(帧数) - - - 空白结束 - As on a chessboard - - - 快速存档数据损坏&重置消息框 - - - {0} 个结果 - {0} is the number of flags found - - - 未来描述 - - - 跳过已读 - - - 导入项目失败 - Failed to import slzip into Serial Loops project - - - 给 Overlay {0} 打补丁 - - - {0} - 调整音量 - {0} is the title of a BGM track - - - 加载项目 - - - 重置为默认配置滚动条 - - - 长门有希事件解锁消息框 - - - 存档数据 1 损坏&重置消息框 - - - 选择命令类型 - - - 打包 ROM - - - PNG 图像 - - - {0} - 管理循环 - {0} is the title of a BGM track - - - 项目导出成功! - - - 文本颜色 - - - 长门时间百分比 - - - 将 NitroPacker NDS 项目文件写入磁盘失败 - - - 解谜中断场景开 - - - 游戏调查阶段(选项) - - - 成功! - - - 项目创建警告 - - - 结果 - - - 话题库存模式滚动条 - - - 将配音的行另存为 WAV - - - 法语 - - - 垂直强度 - - - 地点 - - - 此系统纹理使用通用调色板,因此已禁用调色板替换 - - - 文件 {0} - - - 项目选项 - - - 解压缩 ROM失败 - - - 过去的描述 - - - 将 ARM9 写入磁盘失败 - - - 已成功应用以下修改:\n{0} - - - 删除 Q 版角色 - - - 管理循环 - - - 春日在场 - - - 重置存档数据消息框 - - - SFX - - - 时间(帧数) - - - 类型 - - - 解谜中断场景关 - - - 所需团队成员 - - - ID - - - 路线“{0}”已完成 - {0} is the name of a route following a group selection that has been completed - - - 将选项重置为默认标题 - - - 精灵图退出/移动过渡 - - - 用文件 {1} 替换背景 {0} 失败 - - - 路线 - - - 选择的音频文件无效。 - - - 奇点 - - - 语音 - - - 选择… - - - 保留纵横比: - - - 地点 - - - 调色板 - - - 解谜中断场景仅未看过 - - - 标题屏幕返回未保存进度丢失提示消息框 - - - 长门解谜阶段选择描述 - - - 替换有配音的行 - - - 正在写入 NitroPacker 项目文件 - - - 输出补丁位置 - - - 保存《串联》存档文件失败! - - - 预发布渠道 - - - 地图 - - - 未知 17 - - - 基础 ROM 哈希值与预期哈希值不匹配!如果要覆盖此项,请选中“忽略哈希值”复选框。 - - - 请选择一个模板 - - - 用文件 {1} 替换项 {0} 失败 - - - 替换我 - - - 切换神秘女孩语音滚动条 - - - 可见? - - - 选择帧 - - - 过渡 - - - 在项目目录中检测到已保存但未构建的文件。您想在加载项目之前进行构建吗?不构建可能会导致这些文件被覆盖。 - - - 请为节名称输入一个值 - - - 阿虚的对话框同伴选择 - - - 旗标:{0} - {0} is the ID of the flag - - - 无效的搜索词 - - - 快速保存 - - - 补充话题 - - - 不确定如何处理文件“{0}” - - - 过滤器 - - - 要编辑“保存文件”,您需要打开一个项目。\n当前没有打开的项目。您想创建一个新项目吗? - - - 系统纹理 - - - 声音(选项) - - - 选择要下载的资产 URL 失败 - - - GIF 已导出! - - - 在尝试构建时,发现归档文件 {1} 中的文件#{0:X3} 已损坏。Serial Loops 可以自动从基本目录中删除此文件,这可能允许您加载项目的其余部分,但对该文件所做的任何更改都将丢失。或者,您可以尝试手动编辑文件以修复它。您想如何继续?按“确定”继续删除文件,按“取消”尝试手动处理。 - - - 支持的音频文件 - - - WAV 文件 - - - 话题 - - - 系统数据损坏和重置消息框 - - - 正在设置项目图像… - - - WAV 文件 - - - 文本计时器 - - - 葡萄牙语(巴西) - - - 存档数: - - - 旗标 - - - 屏幕位置 - - - 保存提示 - - - 循环? - - - 切换春日语音滚动条 - - - 正在加载归档文件(evt.bin) - - - 否 - - - 分组选择 - - - 导入项目... - - - 语音: - - - 未知 15 - - - 选项 4 - - - 快速切换 - - - 力量角色 1 - - - Serial Loops v{0} - - - 阿虚时间百分比 - - - 未知 16 - - - 替换 BGM - - - 分组选择不合理滚动条 - - - 是 - - - 文本语音字体 - - - 项目 - - - MP3 文件 - - - 切换阿虚语音滚动条 - - - 保存 Q 版角色 GIF - - - 脚本节 - - - 存档滚动条 - - - 在“{0}”处找不到 objcopy - - - 选择图形 - - - 正在设置屏幕图像… - - - 地点名称 - - - Xdelta 补丁 - - - 重命名 - - - 替换 BGM 音轨 - - - 打开 ROM - - - 按比例调整: - - - 关 - - - 没有阿虚的话题 - - - 删除缺失的项目 - - - 项目名称列表 - - - 失败部分 - - - 用调色板替换 - - - 项目类型无效! - - - 为脚本命令列表面板设置查看器内容失败。 - - - 已收听 {0} - {0} is the name of a BGM that's been encountered while playing the game - - - 游戏横幅 - - - 刷新地图列表 - - - 一个或多个归档文件是空的。 - - - 脚本 - - - 加载语音文件失败:找不到文件。 - - - 主要话题 - - - 导入项目 - - - 情节 - - - 替换文件 - - - 在脚本 {0} 参数 {1} 中检测到无效参数 - - - 找到 {0} 个结果 - {0} is the number of search results - - - 切换国木田语音滚动条 - - - 等待时间(帧数) - - - 阿虚同伴选择描述 - - - 您在 {0} 个项目中有未保存的更改。您想在关闭项目之前保存吗? - - - 滚动方向 - - - 存档文件 - - - Serial Loops 项目 - - - 加载 {0} 的角色进度语音失败。 - - - 音量设置 - - - 暂停菜单标题滚动条 - - - 删除地图角色 - - - 音乐: - - - 存档读取失败消息框 - - - 更新可用:{0} - {0} is the version - - - Haroohie - - - 解谜阶段选项滚动条 - - - 所选脚本命令无效或不可用:{0} - - - 未知 04 - - - 解谜阶段分组 - - - 正在加载: - - - 原始文件解码也失败,放弃! - - - SFX 组 - - - 声音 - - - 迁移完成! - - - 暂停菜单加载滚动条 - - - 未知 04 - - - 文件 - Please make this the same as &File, just without the ampersand - - - 正在迁移到新 ROM - - - 地图角色 - - - 标题 - - - 未知 01 - - - 加载此存档提示 - - - 从“{0}”读取 ARM9 失败 - - - 教程 {0} - - - 说话人名 - - - 保存进度提示结束游戏消息框 - - - 切换虚妹语音滚动条 - - - 保存时间: - - - 标题屏幕加载游戏滚动条 - - - 切换长门语音滚动条 - - - 已在额外内容看过 {0} - {0} is the name of a topic that has had its associated scene watched in the Extras mode - - - 按名称筛选 - - - 春日路线 - - - 请至少选择一个搜索范围和项目筛选器。 - - - 删除命令/节 - - - 未设置模拟器路径。\n请在“设置”中添加 Nintendo DS 模拟器的路径以使用“构建和运行”。 - - - 章节标签 - - - 未知 02 - - - 旗标说明 - - - 图板颜色 - - - 将系统纹理 {0} 导出到文件 {1} 失败 - - - 模板属性 - Template in question is a script template - - - 解谜阶段角色描述 - - - 保存角色精灵图 GIF - - - 替换 BGM - - - 立即更新 - - - Serial Loops 导出的项目 - Refers to the "slzip" archive that is the exported project format - - - 空白开始 - As on a chessboard - - - 搜索 - - - 声音选项滚动条 - - - 古泉事件解锁消息框 - - - 场景命令索引: - - - 设置/清除 - - - 目标屏幕 - - - 没有最近的项目。创建项目后,将在此处显示。 - - - 没有打开的项目 - - - 成功应用修改! - - - 语音设置 - - - 未选择 - In the context of "no ROM selected" - - - 未记录 ROM 哈希值! - - - 未知附加短代码:{0} - - - 切换谷口语音滚动条 - - - 解谜 - - - 地图 - - - 棋子 3 - Chesspiece - - - 未知附加字节:{0} - - - 删除命令 - - - 没有可用的预览 - - - 给 ARM9 打补丁 - - - GIF 文件 - - - 序列化 ASM 修改 - - - 修改于 - Expects an amount, i.e. "Modify by +5" - - - 奇点数量 - - - 将项 {0} 导出到文件 {1} 失败 - - - 语音对话音量选项滚动条 - - - 新部分 - - - 仅未见过 - - - 导入修改 - - - 请为横幅输入一个游戏名称,长度在 1 到 128 个字符之间。 - - - 搜索 - - - 将 Q 版角色 {1} 的动画 {0} 导出到文件失败 - - - 保存项目 - - - 设置 BGM 循环信息 - - - 区块: - - - 正在设置 CG 单幅图像… - - - 保存提示消息框 - - - 加载游戏菜单滚动条 - - - 选择 Q 版角色导出文件夹 - - - 所做的更改将需要重新启动 Serial Loops。可以吗? - - - 加载 BGM 文件失败:找不到文件。 - - - 粘贴 - - - 将设置重置为默认滚动条 - - - 旗标 - - - 最差组 - - - 存档数据损坏&重置消息框 - - - 脚本: - - - 快速存档数据 - - - 迁移到新 ROM - - - 所选 ROM 的哈希值与预期的 ROM 哈希值不匹配。请确保您使用的是正确的基础 ROM。\n\n如果您想忽略此问题,请选中“忽略哈希值”复选框。 - - - 音量 - - - 名称 - - - 语音行 - - - 调查阶段选项滚动条 - - - 查找孤立项目 - - - 新基础 ROM - - - 音乐 - - - 生成模板 - Template in question is a script template - - - 导入 - As in import an exported project - - - 精灵图摇动 - - - 向上移动命令 - - - 分组:{0} - As in "Sound Groups" - - - 删除读取旗标 - As in "remove this read flag from the script" - - - 音效: - - - 查找引用… - - - 正在加载归档文件(dat.bin) - - - 音效音量选项滚动条 - - - 选择导出的项目以查看预期的 ROM 哈希值值 - - - 在项目中查找 - - - 导入修改 - - - 值 - - - 按项目筛选 - - - 将精灵图 {1} 的眼睛动画 {0} 导出到文件失败 - - - 暂停菜单配置滚动条 - - - 古泉同伴选择描述 - - - 使用参数“{2}”解析类型为 {1} 的脚本参数 {0} 失败! - - - 未知 03 - - - 已见过 {0}({1}) - {0} is the internal name and {1} is the display name of a CG that has been encountered during the game - - - NitroPacker 未能打包 ROM,出现异常 - - - 项目设置 - - - 查找孤立项目… - - - 存档写入失败消息框 - - - 过渡 - - - 加载 BGM 文件失败:文件无效。 - - - 搜索范围 - - - 查看日志 - - - 轮廓颜色 - - - 位置图片 - - - 替换帧 - - - 解谜中断场景滚动条 - - - 模式 - Sound play mode (start/stop) - - - 解谜中断场景 - - - 棋子 2 - Chesspiece - - - 古泉解谜阶段选择描述 - - - 精灵图 - - - 德语 - - - 位置: - - - 模板名称 - Template in question is a script template - - - 将精灵图 {0} 的布局导出到文件失败 - - - 章节名称: - - - 正在加载归档文件(grp.bin) - - - 选择角色精灵图导出文件夹 - - - 分组 - As in "Sound Groups" - - - 秒 - As in "seconds" - - - 迁移项目 - - - 向下移动命令 - - - 要跳过的场景 - - - 滚动速度 - - - 选择 ROM - - - 找不到角色项——是否已保存对角色名称的所有更改? - - - 反序列化脚本模板文件“{0}”失败 - {0} is a script template file path. - - - 更新预览失败! - - - 西班牙语 - - - 项目设置… - - - 正在设置调色板和图像… - - - 切换实玖瑠语音滚动条 - - - 文本入口效果 - - - 正在写入修改后的归档文件 - - - 棋子 1 - Chesspiece - - - 帧 - - - 参数值 - - - 正在搜索{0}… - - - 用文件 {1} 替换系统纹理 {0} 失败 - - - 数据被擦除的第二次提示 - - - 未知 - - - 力量角色 2 - - - 鹤屋事件解锁消息框 - - - gcc 退出,代码为 {0} - - - 新名称 - - - 设置 BGM 音量 - - - 打开《串联》存档文件 - - - 模板 - Tool bar text for "apply [script] template" -- needs to be short to fit in the toolbar button - - - 棋子 4 - Chesspiece - - - 已载入存档消息框 - - - 选择基础 ROM - - - 上屏幕 - - - 精灵图图层 - - - 搜索… - - - 读取 BGM 文件失败;回退到原始文件… - - - 查看日志 (_L) - - - 起始 Q 版角色 - - - 未找到有效地图。 - - - 跳过更新 - - - 删除修改“{0}”的文件失败——此修改可能应用于 ROM 库,无法禁用。 - - - 存档数据 2 损坏&重置消息框 - - - 话题库存模式选项 - - - 正在保存 GIF… - - - 尺寸: - - - 阿虚的对话框分组选择 - - - 游戏保存消息框 - - - 解谜 - - - 正在查找孤立项目… - - - 快进 - - - 选择要应用的模板 - - - 切换古泉语音滚动条 - - - 标题屏幕额外内容滚动条 - - - 在指定路径上创建目录失败! - - - 未设置模拟器路径 - - - 请在创建项目之前选择项目名称。 - - - 缺失: - - - 脚本 {0} 节 {1} 已完成 - {0} is the display name of a script and {1} is the name of the section of that script that has been completed - - - 脚本 - - - 分组选择 - - - 支持的图像 - - - 未知 03 - - - 正在替换 {0}… - - - 失败 2 部分 - - - 按 ENTER 执行搜索 - - - 没有存档加载游戏菜单滚动条 - - - 未选择导出项目 - - - 新命令 - - - 最优组 - - - 水平强度 - - - 恢复工作区 - - - 保存进度提示消息框 - - - 系统纹理 - - - 精灵图进入过渡 - - - 选项 2 - - - 项目未提供给项目创建对话框 - - - 隐藏未设置的旗标 - - - 导入项目 - - - 开 - - - 覆盖保存提示消息框 - - - 还原 - - - 将背景 {0} 导出到文件 {1} 失败 - - - 重置: - - - FLAC 文件 - - - 未使用的项目 - - - 按名称、ID 或类型搜索项目。 - - - 项目 - - - 春日话题 - - - 实玖瑠时间百分比 - - - objcopy 已退出,代码为 {0} - - - 选项 1 - - - 设置脚本命令列表面板部分内容失败。 - - - 场景 - - - 使用预发布更新渠道 - - - 希腊语 - - - 次数 - - - 此项目没有记录的基础 ROM 哈希值。这可能是因为此项目是使用旧版本的 Serial Loops 创建的。请选择用于此项目的基础 ROM,以便现在可以记录哈希值。 - - - 重试提示消息框 - - - 记住项目工作区 - - - 将包含文件写入磁盘失败。 - - - 存档数据 - diff --git a/src/SerialLoops/SerialLoops.csproj b/src/SerialLoops/SerialLoops.csproj index f44a5043..72b817ac 100644 --- a/src/SerialLoops/SerialLoops.csproj +++ b/src/SerialLoops/SerialLoops.csproj @@ -8,6 +8,8 @@ true $(SLAssemblyVersion) $(SLVersion) + True + Assets\serial-loops.ico @@ -23,7 +25,6 @@ NSApplication true - True @@ -54,6 +55,7 @@ + diff --git a/src/SerialLoops/ViewModels/Dialogs/PreferencesDialogViewModel.cs b/src/SerialLoops/ViewModels/Dialogs/PreferencesDialogViewModel.cs index 6e8e52f3..8d8905ee 100644 --- a/src/SerialLoops/ViewModels/Dialogs/PreferencesDialogViewModel.cs +++ b/src/SerialLoops/ViewModels/Dialogs/PreferencesDialogViewModel.cs @@ -66,7 +66,7 @@ public void Initialize(PreferencesDialog preferencesDialog, ILogger log, IConfig OptionName = Strings.Emulator_Flatpak, Value = Configuration.EmulatorFlatpak, OnChange = (flatpak) => Configuration.EmulatorFlatpak = flatpak, - Enabled = !OperatingSystem.IsLinux(), + Enabled = OperatingSystem.IsLinux(), }, new BooleanOption { @@ -168,4 +168,4 @@ private static (string Culture, string Language) GetLanguageComboxBoxOption(stri { return (culture, new CultureInfo(culture).NativeName.ToSentenceCase()); } -} \ No newline at end of file +} diff --git a/src/SerialLoops/Views/Editors/ScriptCommandEditors/ScreenFadeOutScriptCommandEditorView.axaml b/src/SerialLoops/Views/Editors/ScriptCommandEditors/ScreenFadeOutScriptCommandEditorView.axaml index 84488956..1470a04b 100644 --- a/src/SerialLoops/Views/Editors/ScriptCommandEditors/ScreenFadeOutScriptCommandEditorView.axaml +++ b/src/SerialLoops/Views/Editors/ScriptCommandEditors/ScreenFadeOutScriptCommandEditorView.axaml @@ -4,7 +4,6 @@ xmlns:vm="using:SerialLoops.ViewModels.Editors.ScriptCommandEditors" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:assets="using:SerialLoops.Assets" - xmlns:controls="using:SerialLoops.Controls" xmlns:utility="using:SerialLoops.Utility" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:DataType="vm:ScreenFadeOutScriptCommandEditorViewModel" @@ -27,5 +26,5 @@ - +
Serial Loops is a full-fledged editor for the Nintendo DS game Suzumiya Haruhi no Chokuretsu (The Series of Haruhi Suzumiya).