diff --git a/.github/workflows/monthly-vulnerability-scan.yml b/.github/workflows/monthly-vulnerability-scan.yml deleted file mode 100644 index 1a90968..0000000 --- a/.github/workflows/monthly-vulnerability-scan.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Monthly Vulnerability Scan - -on: - schedule: - - cron: "0 0 1 * *" # Runs at 00:00 on the 1st day of every month - workflow_dispatch: # Allows manual triggering - -jobs: - scan-vulnerabilities: - name: Scan for .NET Package Vulnerabilities - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: "8.0.x" # Match latest LTS or adjust as needed - - - name: Restore dependencies - run: dotnet restore - - - name: List vulnerable packages - run: | - set -e - results=$(dotnet list package --vulnerable) - echo "$results" - if echo "$results" | grep -q "has the following vulnerable packages"; then - echo "Vulnerabilities found!" - exit 1 - fi diff --git a/AppDir/s2pk.desktop b/AppDir/s2pk.desktop deleted file mode 100644 index caf5609..0000000 --- a/AppDir/s2pk.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Name=Sims 2 Package Manager -Exec=s2pk -Icon=logo.svg -Type=Application -Categories=Utility; -Terminal=true diff --git a/GlobalUsing.cs b/GlobalUsing.cs index 7ea0ebc..800695e 100644 --- a/GlobalUsing.cs +++ b/GlobalUsing.cs @@ -1,5 +1,2 @@ global using S2PK; global using Tomlyn; -global using Serilog; -global using Serilog.Sinks.Debug; -global using Serilog.Sinks.Console; diff --git a/Makefile b/Makefile index 6c523d7..f3f883a 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,8 @@ CONFIGURATION = Release RUNTIME_LINUX = linux-x64 RUNTIME_MAC = osx-x64 OUTPUT_DIR = ./dist -APPIMAGE_DIR = ./AppDir -.PHONY: all clean build-linux build-mac build-appimage package-linux package-mac package-appimage +.PHONY: all clean build-linux build-mac package-linux package-mac all: build-linux build-mac package-linux package-mac @@ -17,9 +16,6 @@ clean: build-linux: dotnet publish -c $(CONFIGURATION) -r $(RUNTIME_LINUX) --self-contained true /p:PublishSingleFile=true -o $(OUTPUT_DIR)/$(APP_NAME)-linux -build-appimage: - dotnet publish -c $(CONFIGURATION) -r $(RUNTIME_LINUX) --self-contained true /p:PublishSingleFile=true -o $(APPIMAGE_DIR)/usr/bin - build-mac: dotnet publish -c $(CONFIGURATION) -r $(RUNTIME_MAC) --self-contained true /p:PublishSingleFile=true -o $(OUTPUT_DIR)/$(APP_NAME)-mac @@ -28,6 +24,3 @@ package-linux: package-mac: tar -czvf $(OUTPUT_DIR)/$(APP_NAME)-mac.tar.gz -C $(OUTPUT_DIR)/$(APP_NAME)-mac . - -package-appimage: - appimage-builder diff --git a/PackageManger.cs b/PackageManger.cs index 6a6a9bf..ace0601 100644 --- a/PackageManger.cs +++ b/PackageManger.cs @@ -28,14 +28,14 @@ public static class PackageManager if (!dir.Exists) { - Log.Error("Source directory does not exist."); + Console.Error.WriteLine("Source directory does not exist."); return; } var packageFiles = dir.GetFiles($"*{PackageExtension}", SearchOption.AllDirectories); if (packageFiles.Length == 0) { - Log.Error("No .package files found to pack."); + Console.Error.WriteLine("No .package files found to pack."); return; } @@ -75,7 +75,7 @@ public static class PackageManager // Check if destination directory exists if (!Directory.Exists(destination)) { - Log.Error("Destination directory does not exist."); + Console.Error.WriteLine("Destination directory does not exist."); return; } @@ -85,21 +85,21 @@ public static class PackageManager if (!file.Exists) { - Log.Error("Package file does not exist."); + Console.Error.WriteLine("Package file does not exist."); return; } if (!file.FullName.Contains(extension)) { - Log.Error("Package file is not a valid."); + Console.Error.WriteLine("Package file is not a valid."); return; } // Check for extension mismatch if (file.FullName.Contains(S3pkExtension) && !ts3) { - Log.Error("Package is for The Sims 3 but unpacking for The Sims 2."); + Console.Error.WriteLine("Package is for The Sims 3 but unpacking for The Sims 2."); return; } @@ -113,7 +113,7 @@ public static class PackageManager // Sanitize path to prevent directory traversal if (!fullPath.StartsWith(dir.FullName, StringComparison.OrdinalIgnoreCase)) { - Log.Error($"Skipping unsafe path: {entry.FullName}"); + Console.Error.WriteLine($"Skipping unsafe path: {entry.FullName}"); continue; } diff --git a/Program.cs b/Program.cs index b1d5114..6ab3c17 100644 --- a/Program.cs +++ b/Program.cs @@ -2,14 +2,6 @@ using System.CommandLine; var rootCommand = new RootCommand("The Sims 2 .s2pk Package Manager"); -Log.Logger = new LoggerConfiguration() -#if DEBUG - .WriteTo.Debug() -#else - .WriteTo.Console(theme: AnsiConsoleTheme.Code) -#endif - .CreateLogger(); - var sims3option = new Option( aliases: ["--ts3"], description: "Switch to The Sims 3 mode.", diff --git a/README.md b/README.md index 99dd98d..d90dea9 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ While The Sims 2 runs well on Linux through Wine, especially with Lutris setups, | ----- | ------------------------------------------- | ------ | | v0.1 | Core package manager | ✅ | | v0.2 | Config file with default paths | ✅ | -| v0.3 | Sims 3 support with `s3pk` extension | 🔜 | +| v0.3 | Sims 3 support with `s3pk` extention | 🔜 | | v0.x | Target .NET 10 | 🔜 | | v1.0 | Stable "Release" version with documentation | 🔜 | @@ -39,7 +39,7 @@ While The Sims 2 runs well on Linux through Wine, especially with Lutris setups, - .NET 8.0 - C# (focused on clarity, safety, minimalism) -- System.CommandLine for CLI parsing +- System.CommandLine for CLI parsing (no external libraries) - Pure backend logic (no UI planned) ## 📐 Design Principles diff --git a/S2PK.csproj b/S2PK.csproj index 54402e0..9adff19 100644 --- a/S2PK.csproj +++ b/S2PK.csproj @@ -8,15 +8,11 @@ enable Tony Bark true - s2pk s2pk s2pk - - - diff --git a/appimage-builder.yml b/appimage-builder.yml deleted file mode 100644 index 1b4151c..0000000 --- a/appimage-builder.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: 1 -AppDir: - path: ./AppDir - app_info: - id: com.tonybark.s2pk - name: s2pk - icon: s2pk - version: 0.3.101 - exec: usr/bin/s2pk - exec_args: "" - runtime: - env: - PATH: "$APPDIR/usr/bin:$PATH" - -recipe: - AppImage: - arch: x86_64 - output: s2pk-x86_64.AppImage