From ce39aadd3c50f1460c1e22efbbe7b17f32e9a9ba Mon Sep 17 00:00:00 2001 From: Alexey 'Cluster' Avdyukhin Date: Wed, 14 Dec 2022 13:31:26 +0400 Subject: Minor fixes, debug version for nighly builds. --- .github/workflows/build-test.yml | 4 ++-- NesTiler/Config.cs | 4 ++-- NesTiler/Program.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 4da33f6..e13b26a 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -33,7 +33,7 @@ jobs: APP_NAME: nestiler PROJECT_PATH: ./NesTiler OUTPUT_DIR: output - CONFIGURATION: Release + CONFIGURATION: Debug OUTPUT_SUBDIR: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.sc }} OUTPUT_FILE: nestiler-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.sc == 'self-contained' && '-self-contained' || '' }}.${{ matrix.os == 'win' && 'zip' || 'tar.gz' }} steps: @@ -48,7 +48,7 @@ jobs: - name: Build env: SC_OPS: ${{ matrix.sc == 'self-contained' && '--self-contained true' || '--no-self-contained' }} - run: dotnet publish ${{ env.PROJECT_PATH }} -c ${{ env.CONFIGURATION }} -r ${{ matrix.os }}-${{ matrix.arch }} -p:PublishSingleFile=true ${{ env.SC_OPS }} -o ${{ env.OUTPUT_DIR }}/${{ env.OUTPUT_SUBDIR }}/${{ env.APP_NAME }} -p:IncludeAllContentForSelfExtract=true + run: dotnet publish ${{ env.PROJECT_PATH }} -c ${{ env.CONFIGURATION }} -r ${{ matrix.os }}-${{ matrix.arch }} -p:PublishSingleFile=true ${{ env.SC_OPS }} -o ${{ env.OUTPUT_DIR }}/${{ env.OUTPUT_SUBDIR }}/${{ env.APP_NAME }} - name: Archive working-directory: ${{ env.OUTPUT_DIR }}/${{ env.OUTPUT_SUBDIR }} env: diff --git a/NesTiler/Config.cs b/NesTiler/Config.cs index c4c8225..af7f9bd 100644 --- a/NesTiler/Config.cs +++ b/NesTiler/Config.cs @@ -50,9 +50,9 @@ namespace com.clusterrr.Famicom.NesTiler private Config() { - ColorsFile = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule!.FileName)!, DEFAULT_COLORS_FILE); + ColorsFile = Path.Combine(AppContext.BaseDirectory, DEFAULT_COLORS_FILE); if (!File.Exists(ColorsFile)) - ColorsFile = Path.Combine(AppContext.BaseDirectory, DEFAULT_COLORS_FILE); + ColorsFile = Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule!.FileName)!, DEFAULT_COLORS_FILE); if (!File.Exists(ColorsFile) && !OperatingSystem.IsWindows()) ColorsFile = Path.Combine("/etc", DEFAULT_COLORS_FILE); } diff --git a/NesTiler/Program.cs b/NesTiler/Program.cs index 1ec2578..5b862e4 100644 --- a/NesTiler/Program.cs +++ b/NesTiler/Program.cs @@ -21,8 +21,8 @@ namespace com.clusterrr.Famicom.NesTiler static void PrintAppInfo() { Console.WriteLine($"NesTiler v{Assembly.GetExecutingAssembly()?.GetName()?.Version?.Major}.{Assembly.GetExecutingAssembly()?.GetName()?.Version?.Minor}"); - Console.WriteLine($" Commit {Properties.Resources.gitCommit} @ {REPO_PATH}"); #if DEBUG + Console.WriteLine($" Commit {Properties.Resources.gitCommit} @ {REPO_PATH}"); Console.WriteLine($" Debug version, build time: {BUILD_TIME.ToLocalTime()}"); #endif Console.WriteLine(" (c) Alexey 'Cluster' Avdyukhin / https://clusterrr.com / clusterrr@clusterrr.com"); -- cgit v1.2.3