diff --git a/.github/workflows/build_nupkg.yml b/.github/workflows/build_and_test.yml
similarity index 67%
rename from .github/workflows/build_nupkg.yml
rename to .github/workflows/build_and_test.yml
index 4fcff9a..44d4199 100644
--- a/.github/workflows/build_nupkg.yml
+++ b/.github/workflows/build_and_test.yml
@@ -1,4 +1,4 @@
-name: Nuget Pack
+name: Build and Test
on:
push:
@@ -16,25 +16,28 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
- dotnet-version: 9.0.x
+ dotnet-version: |
+ 6.0.x
+ 8.0.x
+ 9.0.x
- - name: Restore dependencies
- run: dotnet restore
+ - name: Run tests
+ run: dotnet test
- - name: Pack
- run: dotnet pack
+ - name: Run publish script
+ run: ./publish-nix.sh -d
- - name: Upload build
+ - name: Upload package
uses: actions/upload-artifact@v4
with:
name: 'Nuget Package'
- path: 'psxt001z.Library/bin/Release/*.nupkg'
+ path: "*.nupkg,*.snupkg"
- name: Upload to rolling
uses: ncipollo/release-action@v1.14.0
with:
allowUpdates: True
- artifacts: 'psxt001z.Library/bin/Release/*.nupkg'
+ artifacts: "*.nupkg,*.snupkg,*.zip"
body: 'Last built commit: ${{ github.sha }}'
name: 'Rolling Release'
prerelease: True
diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml
deleted file mode 100644
index 7428be7..0000000
--- a/.github/workflows/build_test.yml
+++ /dev/null
@@ -1,53 +0,0 @@
-name: Build Test
-
-on:
- push:
- branches: [ "main" ]
-
-jobs:
- build:
- runs-on: ubuntu-latest
-
- strategy:
- matrix:
- project: [psxt001z]
- runtime: [win-x86, win-x64, win-arm64, linux-x64, linux-arm64, osx-x64]
- framework: [net9.0] #[net20, net35, net40, net452, net472, net48, netcoreapp3.1, net5.0, net6.0, net7.0, net8.0, net9.0]
- conf: [Debug] #[Release, Debug]
-
- steps:
- - uses: actions/checkout@v4
- with:
- submodules: recursive
-
- - name: Setup .NET
- uses: actions/setup-dotnet@v4
- with:
- dotnet-version: 9.0.x
-
- - name: Restore dependencies
- run: dotnet restore
-
- - name: Build
- run: dotnet publish ${{ matrix.project }}/${{ matrix.project }}.csproj -f ${{ matrix.framework }} -r ${{ matrix.runtime }} -c ${{ matrix.conf == 'Release' && 'Release -p:DebugType=None -p:DebugSymbols=false' || 'Debug'}} --self-contained true --version-suffix ${{ github.sha }} ${{ (startsWith(matrix.framework, 'net5') || startsWith(matrix.framework, 'net6') || startsWith(matrix.framework, 'net7') || startsWith(matrix.framework, 'net8') || startsWith(matrix.framework, 'net9')) && '-p:PublishSingleFile=true' || ''}}
-
- - name: Archive build
- run: zip -r ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip ${{ matrix.project }}/bin/${{ matrix.conf }}/${{ matrix.framework }}/${{ matrix.runtime }}/publish/
-
- - name: Upload build
- uses: actions/upload-artifact@v4
- with:
- name: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}
- path: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip
-
- - name: Upload to rolling
- uses: ncipollo/release-action@v1.14.0
- with:
- allowUpdates: True
- artifacts: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip
- body: 'Last built commit: ${{ github.sha }}'
- name: 'Rolling Release'
- prerelease: True
- replacesArtifacts: True
- tag: "rolling"
- updateOnlyUnreleased: True
diff --git a/.github/workflows/check_pr.yml b/.github/workflows/check_pr.yml
index fad7fe2..c9e23ec 100644
--- a/.github/workflows/check_pr.yml
+++ b/.github/workflows/check_pr.yml
@@ -11,7 +11,13 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
- dotnet-version: 9.0.x
+ dotnet-version: |
+ 6.0.x
+ 8.0.x
+ 9.0.x
- name: Build
- run: dotnet build
\ No newline at end of file
+ run: dotnet build
+
+ - name: Run tests
+ run: dotnet test
diff --git a/README.MD b/README.MD
index a403c54..d822a08 100644
--- a/README.MD
+++ b/README.MD
@@ -1,5 +1,13 @@
# psxt001z
+[](https://github.com/SabreTools/psxt001z/actions/workflows/build_and_test.yml)
+
This library is a mostly-complete port of the [tool of the same name](https://github.com/Dremora/psxt001z) by [Dremora](https://github.com/Dremora/). This currently compiles as a library and does not feature any of the direct disc reading that the original tool did. There are aspirations to changes this in the future.
Find the link to the Nuget package [here](https://www.nuget.org/packages/psxt001z.Library/).
+
+## Releases
+
+For the most recent stable build, download the latest release here: [Releases Page](https://github.com/SabreTools/psxt001z/releases)
+
+For the latest WIP build here: [Rolling Release](https://github.com/SabreTools/psxt001z/releases/tag/rolling)
diff --git a/psxt001z.Library/psxt001z.Library.csproj b/psxt001z.Library/psxt001z.Library.csproj
index ac25b70..6838f5f 100644
--- a/psxt001z.Library/psxt001z.Library.csproj
+++ b/psxt001z.Library/psxt001z.Library.csproj
@@ -1,36 +1,38 @@
-
-
- net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net9.0
- latest
- enable
- true
- 0.21-rc2
+
+
+ net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net9.0
+ true
+ latest
+ enable
+ snupkg
+ true
+ 0.21-rc2
-
- Kirill Korolyov, Matt Nadareski
- C# port of psxt001z as a library
- Copyright (c)2013 Dremora, Copyright (c)2018-2024 Matt Nadareski
- https://github.com/SabreTools/
- README.md
- https://github.com/SabreTools/psxt001z
- git
- libcrypt psx ps1 psone
- MIT
-
+
+ Kirill Korolyov, Matt Nadareski
+ C# port of psxt001z as a library
+ Copyright (c)2013 Dremora, Copyright (c)2018-2024 Matt Nadareski
+ https://github.com/SabreTools/
+ README.md
+ https://github.com/SabreTools/psxt001z
+ git
+ libcrypt psx ps1 psone
+ MIT
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
+
\ No newline at end of file
diff --git a/psxt001z/psxt001z.csproj b/psxt001z/psxt001z.csproj
index a40c549..c867967 100644
--- a/psxt001z/psxt001z.csproj
+++ b/psxt001z/psxt001z.csproj
@@ -1,40 +1,45 @@
-
-
- net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0
- Exe
- latest
- enable
- false
- true
- 0.21-rc2
+
+
+ net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0
+ Exe
+ latest
+ enable
+ false
+ true
+ 0.21-rc2
-
- Kirill Korolyov, Matt Nadareski
- C# port of psxt001z
- Copyright (c)2013 Dremora, Copyright (c)2018-2024 Matt Nadareski
- https://github.com/SabreTools/psxt001z
- git
- MIT
-
+
+ Kirill Korolyov, Matt Nadareski
+ C# port of psxt001z
+ Copyright (c)2013 Dremora, Copyright (c)2018-2024 Matt Nadareski
+ https://github.com/SabreTools/psxt001z
+ git
+ MIT
+
-
-
- win-x86;win-x64
-
-
- win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64
-
-
- win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64
-
-
- net6.0;net7.0;net8.0;net9.0
-
+
+
+ win-x86;win-x64
+
+
+ win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64
+
+
+ win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64
+
+
+ net6.0;net7.0;net8.0;net9.0
+
-
-
-
+
+
+
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/publish-nix.sh b/publish-nix.sh
index 27ea130..b33aba9 100755
--- a/publish-nix.sh
+++ b/publish-nix.sh
@@ -10,13 +10,17 @@
# Optional parameters
USE_ALL=false
+INCLUDE_DEBUG=false
NO_BUILD=false
NO_ARCHIVE=false
-while getopts "uba" OPTION; do
+while getopts "udba" OPTION; do
case $OPTION in
u)
USE_ALL=true
;;
+ d)
+ INCLUDE_DEBUG=true
+ ;;
b)
NO_BUILD=true
;;
@@ -39,6 +43,7 @@ COMMIT=$(git log --pretty=%H -1)
# Output the selected options
echo "Selected Options:"
echo " Use all frameworks (-u) $USE_ALL"
+echo " Include debug builds (-d) $INCLUDE_DEBUG"
echo " No build (-b) $NO_BUILD"
echo " No archive (-a) $NO_ARCHIVE"
echo " "
@@ -91,14 +96,14 @@ if [ $NO_BUILD = false ]; then
# Only .NET 5 and above can publish to a single file
if [[ $(echo ${SINGLE_FILE_CAPABLE[@]} | fgrep -w $FRAMEWORK) ]]; then
- # Only include Debug if building all
- if [ $USE_ALL = true ]; then
+ # Only include Debug if set
+ if [ $INCLUDE_DEBUG = true ]; then
dotnet publish psxt001z/psxt001z.csproj -f $FRAMEWORK -r $RUNTIME -c Debug --self-contained true --version-suffix $COMMIT -p:PublishSingleFile=true
fi
dotnet publish psxt001z/psxt001z.csproj -f $FRAMEWORK -r $RUNTIME -c Release --self-contained true --version-suffix $COMMIT -p:PublishSingleFile=true -p:DebugType=None -p:DebugSymbols=false
else
- # Only include Debug if building all
- if [ $USE_ALL = true ]; then
+ # Only include Debug if set
+ if [ $INCLUDE_DEBUG = true ]; then
dotnet publish psxt001z/psxt001z.csproj -f $FRAMEWORK -r $RUNTIME -c Debug --self-contained true --version-suffix $COMMIT
fi
dotnet publish psxt001z/psxt001z.csproj -f $FRAMEWORK -r $RUNTIME -c Release --self-contained true --version-suffix $COMMIT -p:DebugType=None -p:DebugSymbols=false
@@ -131,8 +136,8 @@ if [ $NO_ARCHIVE = false ]; then
fi
fi
- # Only include Debug if building all
- if [ $USE_ALL = true ]; then
+ # Only include Debug if set
+ if [ $INCLUDE_DEBUG = true ]; then
cd $BUILD_FOLDER/psxt001z/bin/Debug/${FRAMEWORK}/${RUNTIME}/publish/
zip -r $BUILD_FOLDER/psxt001z_${FRAMEWORK}_${RUNTIME}_debug.zip .
fi
diff --git a/publish-win.ps1 b/publish-win.ps1
index 48e62ce..97a7f38 100644
--- a/publish-win.ps1
+++ b/publish-win.ps1
@@ -12,6 +12,10 @@ param(
[Alias("UseAll")]
[switch]$USE_ALL,
+ [Parameter(Mandatory = $false)]
+ [Alias("IncludeDebug")]
+ [switch]$INCLUDE_DEBUG,
+
[Parameter(Mandatory = $false)]
[Alias("NoBuild")]
[switch]$NO_BUILD,
@@ -30,6 +34,7 @@ $COMMIT = git log --pretty=format:"%H" -1
# Output the selected options
Write-Host "Selected Options:"
Write-Host " Use all frameworks (-UseAll) $USE_ALL"
+Write-Host " Include debug builds (-IncludeDebug) $INCLUDE_DEBUG"
Write-Host " No build (-NoBuild) $NO_BUILD"
Write-Host " No archive (-NoArchive) $NO_ARCHIVE"
Write-Host " "
@@ -78,15 +83,15 @@ if (!$NO_BUILD.IsPresent) {
# Only .NET 5 and above can publish to a single file
if ($SINGLE_FILE_CAPABLE -contains $FRAMEWORK) {
- # Only include Debug if building all
- if ($USE_ALL.IsPresent) {
+ # Only include Debug if set
+ if ($INCLUDE_DEBUG.IsPresent) {
dotnet publish psxt001z\psxt001z.csproj -f $FRAMEWORK -r $RUNTIME -c Debug --self-contained true --version-suffix $COMMIT -p:PublishSingleFile=true
}
dotnet publish psxt001z\psxt001z.csproj -f $FRAMEWORK -r $RUNTIME -c Release --self-contained true --version-suffix $COMMIT -p:PublishSingleFile=true -p:DebugType=None -p:DebugSymbols=false
}
else {
- # Only include Debug if building all
- if ($USE_ALL.IsPresent) {
+ # Only include Debug if set
+ if ($INCLUDE_DEBUG.IsPresent) {
dotnet publish psxt001z\psxt001z.csproj -f $FRAMEWORK -r $RUNTIME -c Debug --self-contained true --version-suffix $COMMIT
}
dotnet publish psxt001z\psxt001z.csproj -f $FRAMEWORK -r $RUNTIME -c Release --self-contained true --version-suffix $COMMIT -p:DebugType=None -p:DebugSymbols=false
@@ -115,8 +120,8 @@ if (!$NO_ARCHIVE.IsPresent) {
continue
}
- # Only include Debug if building all
- if ($USE_ALL.IsPresent) {
+ # Only include Debug if set
+ if ($INCLUDE_DEBUG.IsPresent) {
Set-Location -Path $BUILD_FOLDER\psxt001z\bin\Debug\${FRAMEWORK}\${RUNTIME}\publish\
7z a -tzip $BUILD_FOLDER\psxt001z_${FRAMEWORK}_${RUNTIME}_debug.zip *
}