From 040d15be78106549a0542ac263be44f2f64ed7a1 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 00:50:51 +0900 Subject: [PATCH 01/34] feat/add inno setup service in build workflow --- .github/workflows/build.yml | 15 ++++++++++++++- setup.iss | 6 +++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cfb99513..8feb91bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,4 +72,17 @@ jobs: uses: actions/upload-artifact@v4.6.0 with: name: Build-${{ matrix.targetPlatform }}-${{ steps.vars.outputs.sha_short }} - path: build \ No newline at end of file + path: build + + - name: Set up Inno Setup + uses: Minionguyjpro/Inno-Setup-Action@v1.0.0 + with: + setup_script: 'setup.iss' + app_version: '0.0.3' + + - name: Upload Installer + if: matrix.targetPlatform == 'StandaloneWindows64' + uses: actions/upload-artifact@v4.6.0 + with: + name: Installer-${{ steps.vars.outputs.sha_short }} + path: "build/uDesktopMascot_${{ matrix.targetPlatform }}_${{ steps.vars.outputs.sha_short }}.exe" \ No newline at end of file diff --git a/setup.iss b/setup.iss index abbab50b..19c5e7be 100644 --- a/setup.iss +++ b/setup.iss @@ -31,7 +31,7 @@ ArchitecturesInstallIn64BitMode=x64compatible DisableProgramGroupPage=yes ; Uncomment the following line to run in non administrative install mode (install for current user only). ;PrivilegesRequired=lowest -OutputDir=Build +OutputDir=build OutputBaseFilename=uDesktopMascot_{#MyAppVersion} SolidCompression=yes WizardStyle=modern @@ -44,8 +44,8 @@ Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl" Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] -Source: "Build\{#MyAppName}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion -Source: "Build\{#MyAppName}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "build\{#MyAppName}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion +Source: "build\{#MyAppName}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] From 850a380cd9c4970dad9bde5078bda8cced99844d Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 01:22:57 +0900 Subject: [PATCH 02/34] fix build file path --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8feb91bd..c4596c28 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -75,6 +75,7 @@ jobs: path: build - name: Set up Inno Setup + if: matrix.targetPlatform == 'StandaloneWindows64' uses: Minionguyjpro/Inno-Setup-Action@v1.0.0 with: setup_script: 'setup.iss' @@ -85,4 +86,4 @@ jobs: uses: actions/upload-artifact@v4.6.0 with: name: Installer-${{ steps.vars.outputs.sha_short }} - path: "build/uDesktopMascot_${{ matrix.targetPlatform }}_${{ steps.vars.outputs.sha_short }}.exe" \ No newline at end of file + path: "build/uDesktopMascot_0.0.3.exe" From 9ca85051830c89d7c9e53e2eb80e723662bec692 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 01:48:18 +0900 Subject: [PATCH 03/34] fix/fix iss path setting --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c4596c28..bb7dc891 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -78,8 +78,7 @@ jobs: if: matrix.targetPlatform == 'StandaloneWindows64' uses: Minionguyjpro/Inno-Setup-Action@v1.0.0 with: - setup_script: 'setup.iss' - app_version: '0.0.3' + path: 'setup.iss' - name: Upload Installer if: matrix.targetPlatform == 'StandaloneWindows64' From ac4c29b7ce1289f4c3a498a16be0caea9110bed1 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 02:15:04 +0900 Subject: [PATCH 04/34] =?UTF-8?q?fix=20build=E5=85=88=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 1 + setup.iss | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bb7dc891..2db01527 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,6 +69,7 @@ jobs: unityVersion: ${{ matrix.unityVersion }} - name: Upload the Build for ${{ matrix.targetPlatform }} + if: matrix.targetPlatform == 'StandaloneOSX' uses: actions/upload-artifact@v4.6.0 with: name: Build-${{ matrix.targetPlatform }}-${{ steps.vars.outputs.sha_short }} diff --git a/setup.iss b/setup.iss index 19c5e7be..f40ce5ac 100644 --- a/setup.iss +++ b/setup.iss @@ -44,8 +44,8 @@ Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl" Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] -Source: "build\{#MyAppName}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion -Source: "build\{#MyAppName}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "build\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion +Source: "build\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] From 85182aa16d5f5e692bcce0159410f4324eb8f239 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 03:21:59 +0900 Subject: [PATCH 05/34] =?UTF-8?q?fix=20=E3=83=93=E3=83=AB=E3=83=89?= =?UTF-8?q?=E3=83=91=E3=82=B9=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.iss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.iss b/setup.iss index f40ce5ac..5eb1f4f4 100644 --- a/setup.iss +++ b/setup.iss @@ -44,7 +44,7 @@ Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl" Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] -Source: "build\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion +Source: "build\uDesktopMascot_{#MyAppVersion}.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "build\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs ; NOTE: Don't use "Flags: ignoreversion" on any shared system files From c7fc2f1f0dd8cb278ef5f1b0dbccc857bb73cbe1 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 03:43:45 +0900 Subject: [PATCH 06/34] =?UTF-8?q?fix=20=E3=83=95=E3=82=A9=E3=83=AB?= =?UTF-8?q?=E3=83=80=E9=9A=8E=E5=B1=A4=E3=82=92=E5=87=BA=E5=8A=9B=E3=81=95?= =?UTF-8?q?=E3=81=9B=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2db01527..3f3e6f20 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,6 +68,13 @@ jobs: targetPlatform: ${{ matrix.targetPlatform }} unityVersion: ${{ matrix.unityVersion }} + - name: List build directory structure + if: matrix.targetPlatform == 'StandaloneWindows64' + run: | + echo "--- Build Directory Structure ---" + dir build /s + echo "--- End of Build Directory Structure ---" + - name: Upload the Build for ${{ matrix.targetPlatform }} if: matrix.targetPlatform == 'StandaloneOSX' uses: actions/upload-artifact@v4.6.0 From dcd0f2d9b04bd6bab08a99bb7390c00e31202a93 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 04:06:52 +0900 Subject: [PATCH 07/34] =?UTF-8?q?fix=20=E3=83=93=E3=83=AB=E3=83=89?= =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=83=91=E3=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 15 ++++++++++++++- setup.iss | 4 ++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f3e6f20..e2b85f7a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,11 +68,16 @@ jobs: targetPlatform: ${{ matrix.targetPlatform }} unityVersion: ${{ matrix.unityVersion }} + - name: Show Current Directory + run: | + echo "Current Directory:" + Get-Location + - name: List build directory structure if: matrix.targetPlatform == 'StandaloneWindows64' run: | echo "--- Build Directory Structure ---" - dir build /s + ls build -Recurse echo "--- End of Build Directory Structure ---" - name: Upload the Build for ${{ matrix.targetPlatform }} @@ -94,3 +99,11 @@ jobs: with: name: Installer-${{ steps.vars.outputs.sha_short }} path: "build/uDesktopMascot_0.0.3.exe" + + - name: Check if 'build' Directory Exists + run: | + if (Test-Path -Path "build") { + Write-Output "'build' directory exists." + } else { + Write-Output "'build' directory does not exist." + } diff --git a/setup.iss b/setup.iss index 5eb1f4f4..324810a4 100644 --- a/setup.iss +++ b/setup.iss @@ -44,8 +44,8 @@ Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl" Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] -Source: "build\uDesktopMascot_{#MyAppVersion}.exe"; DestDir: "{app}"; Flags: ignoreversion -Source: "build\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "build\{#MyAppName}\uDesktopMascot.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "build\{#MyAppName}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] From dc928f8fd0985d2f3c51d1eeaeb45428b71a042a Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 07:26:37 +0900 Subject: [PATCH 08/34] =?UTF-8?q?fix=20=E3=83=93=E3=83=AB=E3=83=89?= =?UTF-8?q?=E5=85=88=E3=81=AE=E3=83=91=E3=82=B9=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.iss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.iss b/setup.iss index 324810a4..aa985823 100644 --- a/setup.iss +++ b/setup.iss @@ -44,8 +44,8 @@ Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl" Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] -Source: "build\{#MyAppName}\uDesktopMascot.exe"; DestDir: "{app}"; Flags: ignoreversion -Source: "build\{#MyAppName}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "build\StandaloneWindows64\StandaloneWindows64.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "build\StandaloneWindows64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] From 266aac49206ecc31e7424597ba9d862de180e4e9 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 08:06:14 +0900 Subject: [PATCH 09/34] =?UTF-8?q?fix=20iss=E3=81=A7=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E3=81=99=E3=82=8Bapp=E5=90=8D=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.iss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.iss b/setup.iss index aa985823..4d50cb99 100644 --- a/setup.iss +++ b/setup.iss @@ -5,7 +5,7 @@ #define MyAppVersion "0.0.3" #define MyAppPublisher "MidraLab" #define MyAppURL "https://midralab.github.io/uDesktopMascot/" -#define MyAppExeName "uDesktopMascot.exe" +#define MyAppExeName "StandaloneWindows64.exe" [Setup] ; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications. From cf790de87dd205419200fb614a84c177b61f8014 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 09:24:22 +0900 Subject: [PATCH 10/34] =?UTF-8?q?feat:=20Installer=E3=81=AE=E3=83=90?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=92=E3=82=A2=E3=83=97?= =?UTF-8?q?=E3=83=AA=E3=81=AE=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3?= =?UTF-8?q?=E3=81=AB=E5=90=88=E3=82=8F=E3=81=9B=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 34 +++++++------------ .../Editor/PostBuildProcessor.cs | 7 ++++ ProjectSettings/ProjectSettings.asset | 2 +- 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e2b85f7a..a41c0300 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,18 +68,6 @@ jobs: targetPlatform: ${{ matrix.targetPlatform }} unityVersion: ${{ matrix.unityVersion }} - - name: Show Current Directory - run: | - echo "Current Directory:" - Get-Location - - - name: List build directory structure - if: matrix.targetPlatform == 'StandaloneWindows64' - run: | - echo "--- Build Directory Structure ---" - ls build -Recurse - echo "--- End of Build Directory Structure ---" - - name: Upload the Build for ${{ matrix.targetPlatform }} if: matrix.targetPlatform == 'StandaloneOSX' uses: actions/upload-artifact@v4.6.0 @@ -87,6 +75,16 @@ jobs: name: Build-${{ matrix.targetPlatform }}-${{ steps.vars.outputs.sha_short }} path: build + - name: バージョンを読み取る + id: get_version + run: | + VERSION=$(cat build/StandaloneWindows64/version.txt) + echo "app_version=$VERSION" >> $GITHUB_ENV + + - name: setup.issのMyAppVersionを更新する + run: | + sed -i 's/#define MyAppVersion ".*"/#define MyAppVersion "'$VERSION'"/' setup.iss + - name: Set up Inno Setup if: matrix.targetPlatform == 'StandaloneWindows64' uses: Minionguyjpro/Inno-Setup-Action@v1.0.0 @@ -97,13 +95,5 @@ jobs: if: matrix.targetPlatform == 'StandaloneWindows64' uses: actions/upload-artifact@v4.6.0 with: - name: Installer-${{ steps.vars.outputs.sha_short }} - path: "build/uDesktopMascot_0.0.3.exe" - - - name: Check if 'build' Directory Exists - run: | - if (Test-Path -Path "build") { - Write-Output "'build' directory exists." - } else { - Write-Output "'build' directory does not exist." - } + name: Installer-${{ env.app_version }} + path: "build/uDesktopMascot_${{ env.app_version }}.exe" diff --git a/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs b/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs index 08fef323..4e143ba9 100644 --- a/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs +++ b/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs @@ -43,6 +43,13 @@ public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProj // ビルドフォルダを最大圧縮で ZIP 圧縮 CreateMaxCompressedZipOfBuildFolder(buildDirectory, appName); + // アプリのバージョンを取得 + var appVersion = PlayerSettings.bundleVersion; // Application.version の代わりに PlayerSettings.bundleVersion を使用 + // ビルドされたプロジェクトのディレクトリを基に version.txt を作成または上書き + var versionFilePath = Path.Combine(Path.GetDirectoryName(pathToBuiltProject), "version.txt"); + File.WriteAllText(versionFilePath, appVersion); + Log.Debug($"アプリのバージョン: {appVersion}"); + Log.Debug("ビルド後処理が完了しました。"); } diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 715068f3..16da78a5 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -140,7 +140,7 @@ PlayerSettings: loadStoreDebugModeEnabled: 0 visionOSBundleVersion: 1.0 tvOSBundleVersion: 1.0 - bundleVersion: 0.0.3 + bundleVersion: 0.0.4 preloadedAssets: - {fileID: -944628639613478452, guid: a44af2b5a23d08f4592b3b54055c29f3, type: 3} - {fileID: 11400000, guid: b14675277748e3a46b2a223537b09f22, type: 2} From 60c6eb54571f0bf0230b8fe6f0bbe6ba5c882e9e Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 09:49:01 +0900 Subject: [PATCH 11/34] fix build workflow --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a41c0300..9d9c2b4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -78,7 +78,7 @@ jobs: - name: バージョンを読み取る id: get_version run: | - VERSION=$(cat build/StandaloneWindows64/version.txt) + $VERSION = Get-Content "build/StandaloneWindows64/version.txt" echo "app_version=$VERSION" >> $GITHUB_ENV - name: setup.issのMyAppVersionを更新する From 22edfe6539b52f615bd9421c5951937c7126cf1a Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 11:16:41 +0900 Subject: [PATCH 12/34] =?UTF-8?q?fix=20iss=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E5=A4=89=E6=9B=B4=E3=82=B3=E3=83=9E=E3=83=B3=E3=83=89?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d9c2b4b..302db7b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -83,7 +83,7 @@ jobs: - name: setup.issのMyAppVersionを更新する run: | - sed -i 's/#define MyAppVersion ".*"/#define MyAppVersion "'$VERSION'"/' setup.iss + sed -i 's/#define MyAppVersion ".*"/#define MyAppVersion "'"$VERSION"'"' setup.iss - name: Set up Inno Setup if: matrix.targetPlatform == 'StandaloneWindows64' From f4229b7d679919a5ab2a1778357634e638e38254 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 16:44:22 +0900 Subject: [PATCH 13/34] =?UTF-8?q?fix=20=E3=82=A2=E3=83=97=E3=83=AA?= =?UTF-8?q?=E3=81=AE=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=92?= =?UTF-8?q?=E5=8F=96=E5=BE=97=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 9 +++---- .../Editor/PostBuildProcessor.cs | 25 ++++++++++++++----- setup.iss | 4 +-- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 302db7b7..5ca32016 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,15 +76,12 @@ jobs: path: build - name: バージョンを読み取る + if: matrix.targetPlatform == 'StandaloneWindows64' id: get_version run: | $VERSION = Get-Content "build/StandaloneWindows64/version.txt" echo "app_version=$VERSION" >> $GITHUB_ENV - - name: setup.issのMyAppVersionを更新する - run: | - sed -i 's/#define MyAppVersion ".*"/#define MyAppVersion "'"$VERSION"'"' setup.iss - - name: Set up Inno Setup if: matrix.targetPlatform == 'StandaloneWindows64' uses: Minionguyjpro/Inno-Setup-Action@v1.0.0 @@ -95,5 +92,5 @@ jobs: if: matrix.targetPlatform == 'StandaloneWindows64' uses: actions/upload-artifact@v4.6.0 with: - name: Installer-${{ env.app_version }} - path: "build/uDesktopMascot_${{ env.app_version }}.exe" + name: uDesktopMascot_win64_${{ env.app_version }} + path: "build/uDesktopMascot_win64_${{ env.app_version }}.exe" diff --git a/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs b/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs index 4e143ba9..08ba3faa 100644 --- a/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs +++ b/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs @@ -43,12 +43,8 @@ public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProj // ビルドフォルダを最大圧縮で ZIP 圧縮 CreateMaxCompressedZipOfBuildFolder(buildDirectory, appName); - // アプリのバージョンを取得 - var appVersion = PlayerSettings.bundleVersion; // Application.version の代わりに PlayerSettings.bundleVersion を使用 - // ビルドされたプロジェクトのディレクトリを基に version.txt を作成または上書き - var versionFilePath = Path.Combine(Path.GetDirectoryName(pathToBuiltProject), "version.txt"); - File.WriteAllText(versionFilePath, appVersion); - Log.Debug($"アプリのバージョン: {appVersion}"); + // アプリのバージョンを取得してファイルに書き込む + CreateAppVersionFiles(pathToBuiltProject); Log.Debug("ビルド後処理が完了しました。"); } @@ -198,5 +194,22 @@ private static string GetRelativePath(string basePath, string targetPath) .ToString() .Replace('/', Path.DirectorySeparatorChar)); } + + /// + /// アプリのバージョンを取得して version.txt と config.txt に書き込む + /// + /// ビルドされたプロジェクトのパス + private static void CreateAppVersionFiles(string pathToBuiltProject) + { + // InstallerのZipファイルにバージョンを書き込むために生成する + var appVersion = PlayerSettings.bundleVersion; + var versionFilePath = Path.Combine(Path.GetDirectoryName(pathToBuiltProject), "version.txt"); + File.WriteAllText(versionFilePath, appVersion); + + // Inno Setup の MyAppVersion にバージョンを書き込むために生成する + var configFilePath = Path.Combine(Path.GetDirectoryName(pathToBuiltProject), "config.txt"); + var configText = $"#define MyAppVersion \"{appVersion}\""; + File.WriteAllText(configFilePath, configText); + } } } \ No newline at end of file diff --git a/setup.iss b/setup.iss index 4d50cb99..54fea596 100644 --- a/setup.iss +++ b/setup.iss @@ -2,12 +2,12 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "uDesktopMascot" -#define MyAppVersion "0.0.3" #define MyAppPublisher "MidraLab" #define MyAppURL "https://midralab.github.io/uDesktopMascot/" #define MyAppExeName "StandaloneWindows64.exe" [Setup] +#include "build\StandaloneWindows64\config.txt" ; 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={{8C3A0DD1-5FD3-4F40-A7AA-5A08F5121022} @@ -32,7 +32,7 @@ DisableProgramGroupPage=yes ; Uncomment the following line to run in non administrative install mode (install for current user only). ;PrivilegesRequired=lowest OutputDir=build -OutputBaseFilename=uDesktopMascot_{#MyAppVersion} +OutputBaseFilename=uDesktopMascot_win64_{#MyAppVersion} SolidCompression=yes WizardStyle=modern From a3314cecf19a9bbe68942863d9fde76869026b01 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 16:58:51 +0900 Subject: [PATCH 14/34] =?UTF-8?q?fix=20step=E3=81=AE=E5=90=8D=E5=89=8D?= =?UTF-8?q?=E3=82=92=E8=8B=B1=E8=AA=9E=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c3779bb5..7cf17f5f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -90,7 +90,7 @@ jobs: name: Build-${{ matrix.targetPlatform }}-${{ steps.vars.outputs.sha_short }} path: build - - name: バージョンを読み取る + - name: Read version.txt if: matrix.targetPlatform == 'StandaloneWindows64' id: get_version run: | From b901d3448089fae78881e39c87060c9519e4bace Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 17:45:22 +0900 Subject: [PATCH 15/34] =?UTF-8?q?fix=20=E3=82=A2=E3=83=97=E3=83=AA?= =?UTF-8?q?=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=92=E3=83=AD?= =?UTF-8?q?=E3=82=B0=E3=81=AB=E5=87=BA=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7cf17f5f..aeff53f7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,6 +96,7 @@ jobs: run: | $VERSION = Get-Content "build/StandaloneWindows64/version.txt" echo "app_version=$VERSION" >> $GITHUB_ENV + echo "アプリのバージョン: $VERSION" - name: Set up Inno Setup if: matrix.targetPlatform == 'StandaloneWindows64' From 3f0f606d0810e400ed2069a9a2881021ce062b56 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 21:15:46 +0900 Subject: [PATCH 16/34] =?UTF-8?q?fix:=20=E3=83=93=E3=83=AB=E3=83=89?= =?UTF-8?q?=E5=BE=8C=E3=81=AB=E3=82=B3=E3=83=B3=E3=83=95=E3=82=A3=E3=82=B0?= =?UTF-8?q?=E3=82=92=E3=82=A2=E3=82=A6=E3=83=88=E3=83=97=E3=83=83=E3=83=88?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 12 ++++++++++-- Assets/uDesktopMascot/Editor/PostBuildProcessor.cs | 11 ++++++----- ProjectSettings/ProjectSettings.asset | 2 +- inno_setup_config.txt | 1 + setup.iss | 4 ++-- version.txt | 1 + 6 files changed, 21 insertions(+), 10 deletions(-) create mode 100644 inno_setup_config.txt create mode 100644 version.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aeff53f7..cde277a7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,6 @@ jobs: fi build: - needs: check-branch # check-branch ジョブの成功が必要 name: Run builds for Windows, Mac strategy: fail-fast: false @@ -90,11 +89,20 @@ jobs: name: Build-${{ matrix.targetPlatform }}-${{ steps.vars.outputs.sha_short }} path: build + - name: Commit version and config files + if: matrix.targetPlatform == 'StandaloneWindows64' + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add version.txt inno_setup_config.txt + git commit -m "Update version and config files after build" + git push origin HEAD:${{ github.head_ref }} + - name: Read version.txt if: matrix.targetPlatform == 'StandaloneWindows64' id: get_version run: | - $VERSION = Get-Content "build/StandaloneWindows64/version.txt" + $VERSION = Get-Content "version.txt" echo "app_version=$VERSION" >> $GITHUB_ENV echo "アプリのバージョン: $VERSION" diff --git a/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs b/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs index c303f024..d0903352 100644 --- a/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs +++ b/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs @@ -45,10 +45,10 @@ public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProj { // ビルドフォルダを最大圧縮で ZIP 圧縮 CreateMaxCompressedZipOfBuildFolder(buildDirectory, appName); - } - // アプリのバージョンを取得してファイルに書き込む - CreateAppVersionFiles(pathToBuiltProject); + // アプリのバージョンを取得してファイルに書き込む + CreateAppVersionFiles(pathToBuiltProject); + } Log.Debug("ビルド後処理が完了しました。"); } @@ -205,13 +205,14 @@ private static string GetRelativePath(string basePath, string targetPath) /// ビルドされたプロジェクトのパス private static void CreateAppVersionFiles(string pathToBuiltProject) { + Log.Debug($"ビルドディレクトリ: {pathToBuiltProject}"); // InstallerのZipファイルにバージョンを書き込むために生成する var appVersion = PlayerSettings.bundleVersion; - var versionFilePath = Path.Combine(Path.GetDirectoryName(pathToBuiltProject), "version.txt"); + var versionFilePath = Path.Combine(Path.GetDirectoryName(pathToBuiltProject), "..", "..", "version.txt"); File.WriteAllText(versionFilePath, appVersion); // Inno Setup の MyAppVersion にバージョンを書き込むために生成する - var configFilePath = Path.Combine(Path.GetDirectoryName(pathToBuiltProject), "config.txt"); + var configFilePath = Path.Combine(Path.GetDirectoryName(pathToBuiltProject), "..", "..", "inno_setup_config.txt"); var configText = $"#define MyAppVersion \"{appVersion}\""; File.WriteAllText(configFilePath, configText); } diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index d0940441..136fe9c3 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -140,7 +140,7 @@ PlayerSettings: loadStoreDebugModeEnabled: 0 visionOSBundleVersion: 1.0 tvOSBundleVersion: 1.0 - bundleVersion: 0.0.4 + bundleVersion: 0.0.3 preloadedAssets: - {fileID: -944628639613478452, guid: a44af2b5a23d08f4592b3b54055c29f3, type: 3} - {fileID: 11400000, guid: b14675277748e3a46b2a223537b09f22, type: 2} diff --git a/inno_setup_config.txt b/inno_setup_config.txt new file mode 100644 index 00000000..bdad27a9 --- /dev/null +++ b/inno_setup_config.txt @@ -0,0 +1 @@ +#define MyAppVersion "0.0.3" \ No newline at end of file diff --git a/setup.iss b/setup.iss index 54fea596..339cfd29 100644 --- a/setup.iss +++ b/setup.iss @@ -7,7 +7,7 @@ #define MyAppExeName "StandaloneWindows64.exe" [Setup] -#include "build\StandaloneWindows64\config.txt" +#include "inno_setup_config.txt" ; 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={{8C3A0DD1-5FD3-4F40-A7AA-5A08F5121022} @@ -32,7 +32,7 @@ DisableProgramGroupPage=yes ; Uncomment the following line to run in non administrative install mode (install for current user only). ;PrivilegesRequired=lowest OutputDir=build -OutputBaseFilename=uDesktopMascot_win64_{#MyAppVersion} +OutputBaseFilename=uDesktopMascot_{#MyAppVersion} SolidCompression=yes WizardStyle=modern diff --git a/version.txt b/version.txt new file mode 100644 index 00000000..6812f812 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +0.0.3 \ No newline at end of file From 9b73d71fc27d89d9daae49e53c28a530e65cbc9c Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 21:44:09 +0900 Subject: [PATCH 17/34] =?UTF-8?q?fix=20update=E3=81=97=E3=81=9F=E3=83=95?= =?UTF-8?q?=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=AE=E3=82=B3=E3=83=9F=E3=83=83?= =?UTF-8?q?=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cde277a7..de81b1af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,7 +96,7 @@ jobs: git config --local user.name "GitHub Action" git add version.txt inno_setup_config.txt git commit -m "Update version and config files after build" - git push origin HEAD:${{ github.head_ref }} + git push origin HEAD:${{ github.ref }} - name: Read version.txt if: matrix.targetPlatform == 'StandaloneWindows64' From d6e8cd01b1187dd0cef460c50891cfeeac8d1688 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 16 Jan 2025 13:12:11 +0000 Subject: [PATCH 18/34] Update version and config files after build --- inno_setup_config.txt | 2 +- version.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inno_setup_config.txt b/inno_setup_config.txt index bdad27a9..12d32dfb 100644 --- a/inno_setup_config.txt +++ b/inno_setup_config.txt @@ -1 +1 @@ -#define MyAppVersion "0.0.3" \ No newline at end of file +#define MyAppVersion "0.0.157" \ No newline at end of file diff --git a/version.txt b/version.txt index 6812f812..a05c4714 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.0.3 \ No newline at end of file +0.0.157 \ No newline at end of file From 1366d6a189ca6cb48499d2d3381a167de270e12d Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 22:54:04 +0900 Subject: [PATCH 19/34] fix change file name --- Assets/uDesktopMascot/Editor/PostBuildProcessor.cs | 3 +-- setup.iss | 4 ++-- inno_setup_config.txt => setup.txt | 0 3 files changed, 3 insertions(+), 4 deletions(-) rename inno_setup_config.txt => setup.txt (100%) diff --git a/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs b/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs index d0903352..efd7a8a2 100644 --- a/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs +++ b/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs @@ -205,14 +205,13 @@ private static string GetRelativePath(string basePath, string targetPath) /// ビルドされたプロジェクトのパス private static void CreateAppVersionFiles(string pathToBuiltProject) { - Log.Debug($"ビルドディレクトリ: {pathToBuiltProject}"); // InstallerのZipファイルにバージョンを書き込むために生成する var appVersion = PlayerSettings.bundleVersion; var versionFilePath = Path.Combine(Path.GetDirectoryName(pathToBuiltProject), "..", "..", "version.txt"); File.WriteAllText(versionFilePath, appVersion); // Inno Setup の MyAppVersion にバージョンを書き込むために生成する - var configFilePath = Path.Combine(Path.GetDirectoryName(pathToBuiltProject), "..", "..", "inno_setup_config.txt"); + var configFilePath = Path.Combine(Path.GetDirectoryName(pathToBuiltProject), "..", "..", "setup.txt"); var configText = $"#define MyAppVersion \"{appVersion}\""; File.WriteAllText(configFilePath, configText); } diff --git a/setup.iss b/setup.iss index 339cfd29..9bb1aef4 100644 --- a/setup.iss +++ b/setup.iss @@ -7,7 +7,7 @@ #define MyAppExeName "StandaloneWindows64.exe" [Setup] -#include "inno_setup_config.txt" +#include "setup.txt" ; 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={{8C3A0DD1-5FD3-4F40-A7AA-5A08F5121022} @@ -23,7 +23,7 @@ UninstallDisplayIcon={app}\{#MyAppExeName} ; "ArchitecturesAllowed=x64compatible" specifies that Setup cannot run ; on anything but x64 and Windows 11 on Arm. ArchitecturesAllowed=x64compatible -; "ArchitecturesInstallIn64BitMode=x64compatible" requests that the +; "ArchitecturesInstallIn64BitMode=x6 4compatible" 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. diff --git a/inno_setup_config.txt b/setup.txt similarity index 100% rename from inno_setup_config.txt rename to setup.txt From d42b956f8c92bd9b35faeb2002060b7067918197 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 16 Jan 2025 14:24:30 +0000 Subject: [PATCH 20/34] Update version and config files after build --- inno_setup_config.txt | 2 +- version.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inno_setup_config.txt b/inno_setup_config.txt index 12d32dfb..a55b0b16 100644 --- a/inno_setup_config.txt +++ b/inno_setup_config.txt @@ -1 +1 @@ -#define MyAppVersion "0.0.157" \ No newline at end of file +#define MyAppVersion "0.0.158" \ No newline at end of file diff --git a/version.txt b/version.txt index a05c4714..5042bbb0 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.0.157 \ No newline at end of file +0.0.158 \ No newline at end of file From c28d065e7207981002a26e815afb63de2144fbe3 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Thu, 16 Jan 2025 23:44:36 +0900 Subject: [PATCH 21/34] =?UTF-8?q?fix=20=E3=83=93=E3=83=AB=E3=83=89?= =?UTF-8?q?=E3=83=AF=E3=83=BC=E3=82=AF=E3=83=95=E3=83=AD=E3=83=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de81b1af..d4e4f7ae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -118,3 +118,6 @@ jobs: with: name: uDesktopMascot_win64_${{ env.app_version }} path: "build/uDesktopMascot_win64_${{ env.app_version }}.exe" + + - name: Check app_version + run: echo "app_version=${{ env.app_version }}" From b55df4ea30fda66b43909401459cb604e981b493 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 16 Jan 2025 16:00:51 +0000 Subject: [PATCH 22/34] Update version and config files after build --- inno_setup_config.txt | 2 +- version.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inno_setup_config.txt b/inno_setup_config.txt index a55b0b16..16b11d06 100644 --- a/inno_setup_config.txt +++ b/inno_setup_config.txt @@ -1 +1 @@ -#define MyAppVersion "0.0.158" \ No newline at end of file +#define MyAppVersion "0.0.159" \ No newline at end of file diff --git a/version.txt b/version.txt index 5042bbb0..540664c1 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.0.158 \ No newline at end of file +0.0.159 \ No newline at end of file From b4850fab9451e0a4d32c3452456c6c56aae29958 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Fri, 17 Jan 2025 01:08:04 +0900 Subject: [PATCH 23/34] fix iss file --- setup.iss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.iss b/setup.iss index 9bb1aef4..c0dcf7c7 100644 --- a/setup.iss +++ b/setup.iss @@ -32,7 +32,7 @@ DisableProgramGroupPage=yes ; Uncomment the following line to run in non administrative install mode (install for current user only). ;PrivilegesRequired=lowest OutputDir=build -OutputBaseFilename=uDesktopMascot_{#MyAppVersion} +OutputBaseFilename=uDesktopMascot_win64_{#MyAppVersion} SolidCompression=yes WizardStyle=modern From f55c3e2dcc1096dea1c2e049bd595eb95ac7ed23 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Fri, 17 Jan 2025 02:05:05 +0900 Subject: [PATCH 24/34] fix build workflow --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d4e4f7ae..681fa9b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,8 +103,9 @@ jobs: id: get_version run: | $VERSION = Get-Content "version.txt" - echo "app_version=$VERSION" >> $GITHUB_ENV + echo "app_version=$VERSION" | Out-File -FilePath $GITHUB_ENV -Encoding utf8 -Append echo "アプリのバージョン: $VERSION" + echo "app_version=${{ env.app_version }}" - name: Set up Inno Setup if: matrix.targetPlatform == 'StandaloneWindows64' From 60a84304f230bf4e8573109ee41877e2cf9bb528 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Fri, 17 Jan 2025 07:36:04 +0900 Subject: [PATCH 25/34] fix build workflow --- .github/workflows/build.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 681fa9b7..193a6a6e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -102,10 +102,9 @@ jobs: if: matrix.targetPlatform == 'StandaloneWindows64' id: get_version run: | - $VERSION = Get-Content "version.txt" - echo "app_version=$VERSION" | Out-File -FilePath $GITHUB_ENV -Encoding utf8 -Append + VERSION=$(cat version.txt) + echo "app_version=$VERSION" >> $GITHUB_ENV echo "アプリのバージョン: $VERSION" - echo "app_version=${{ env.app_version }}" - name: Set up Inno Setup if: matrix.targetPlatform == 'StandaloneWindows64' From 29cea6a4652f71512a537962419c2153f68c9397 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Fri, 17 Jan 2025 08:17:14 +0900 Subject: [PATCH 26/34] fix cat version file --- .github/workflows/build.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 193a6a6e..31d3c336 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -100,11 +100,10 @@ jobs: - name: Read version.txt if: matrix.targetPlatform == 'StandaloneWindows64' + uses: pCYSl5EDgo/cat@master id: get_version - run: | - VERSION=$(cat version.txt) - echo "app_version=$VERSION" >> $GITHUB_ENV - echo "アプリのバージョン: $VERSION" + with: + path: version.txt - name: Set up Inno Setup if: matrix.targetPlatform == 'StandaloneWindows64' @@ -116,8 +115,8 @@ jobs: if: matrix.targetPlatform == 'StandaloneWindows64' uses: actions/upload-artifact@v4.6.0 with: - name: uDesktopMascot_win64_${{ env.app_version }} - path: "build/uDesktopMascot_win64_${{ env.app_version }}.exe" + name: uDesktopMascot_win64_${{ steps.get_version.outputs.version }} + path: "build/uDesktopMascot_win64_${{ steps.get_version.outputs.version }}.exe" - name: Check app_version - run: echo "app_version=${{ env.app_version }}" + run: echo "app_version=${{ steps.get_version.outputs.version }}" From 4dcda930c89c283b918c3177e52dc6fb18e43219 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Fri, 17 Jan 2025 08:39:09 +0900 Subject: [PATCH 27/34] fix change workflow --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 31d3c336..b130af28 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -94,7 +94,7 @@ jobs: run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git add version.txt inno_setup_config.txt + git add version.txt setup.txt git commit -m "Update version and config files after build" git push origin HEAD:${{ github.ref }} From a687cc13870e9e98d9b62bd7534465535babbf6b Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 16 Jan 2025 23:57:11 +0000 Subject: [PATCH 28/34] Update version and config files after build --- setup.txt | 2 +- version.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.txt b/setup.txt index 16b11d06..dfabc836 100644 --- a/setup.txt +++ b/setup.txt @@ -1 +1 @@ -#define MyAppVersion "0.0.159" \ No newline at end of file +#define MyAppVersion "0.0.169" \ No newline at end of file diff --git a/version.txt b/version.txt index 540664c1..bbab5083 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.0.159 \ No newline at end of file +0.0.169 \ No newline at end of file From 41a596ea6d80223b5ec55951c545d54e5d0e7fe6 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Fri, 17 Jan 2025 19:06:15 +0900 Subject: [PATCH 29/34] =?UTF-8?q?fix:=20=E3=83=90=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=82=92=E3=82=A4=E3=83=B3=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=83=BC=E3=83=A9=E3=83=BC=E5=90=8D=E3=81=AB=E5=90=AB=E3=82=81?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=81=93=E3=81=A8=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 23 ++----------------- .../Editor/PostBuildProcessor.cs | 19 --------------- setup.iss | 5 ++-- setup.txt | 1 - version.txt | 1 - 5 files changed, 4 insertions(+), 45 deletions(-) delete mode 100644 setup.txt delete mode 100644 version.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b130af28..93689e29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -89,22 +89,6 @@ jobs: name: Build-${{ matrix.targetPlatform }}-${{ steps.vars.outputs.sha_short }} path: build - - name: Commit version and config files - if: matrix.targetPlatform == 'StandaloneWindows64' - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add version.txt setup.txt - git commit -m "Update version and config files after build" - git push origin HEAD:${{ github.ref }} - - - name: Read version.txt - if: matrix.targetPlatform == 'StandaloneWindows64' - uses: pCYSl5EDgo/cat@master - id: get_version - with: - path: version.txt - - name: Set up Inno Setup if: matrix.targetPlatform == 'StandaloneWindows64' uses: Minionguyjpro/Inno-Setup-Action@v1.0.0 @@ -115,8 +99,5 @@ jobs: if: matrix.targetPlatform == 'StandaloneWindows64' uses: actions/upload-artifact@v4.6.0 with: - name: uDesktopMascot_win64_${{ steps.get_version.outputs.version }} - path: "build/uDesktopMascot_win64_${{ steps.get_version.outputs.version }}.exe" - - - name: Check app_version - run: echo "app_version=${{ steps.get_version.outputs.version }}" + name: uDesktopMascot_win64 + path: "build/uDesktopMascot_win64.exe" diff --git a/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs b/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs index efd7a8a2..4c6b9de6 100644 --- a/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs +++ b/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs @@ -46,8 +46,6 @@ public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProj // ビルドフォルダを最大圧縮で ZIP 圧縮 CreateMaxCompressedZipOfBuildFolder(buildDirectory, appName); - // アプリのバージョンを取得してファイルに書き込む - CreateAppVersionFiles(pathToBuiltProject); } Log.Debug("ビルド後処理が完了しました。"); @@ -198,22 +196,5 @@ private static string GetRelativePath(string basePath, string targetPath) .ToString() .Replace('/', Path.DirectorySeparatorChar)); } - - /// - /// アプリのバージョンを取得して version.txt と config.txt に書き込む - /// - /// ビルドされたプロジェクトのパス - private static void CreateAppVersionFiles(string pathToBuiltProject) - { - // InstallerのZipファイルにバージョンを書き込むために生成する - var appVersion = PlayerSettings.bundleVersion; - var versionFilePath = Path.Combine(Path.GetDirectoryName(pathToBuiltProject), "..", "..", "version.txt"); - File.WriteAllText(versionFilePath, appVersion); - - // Inno Setup の MyAppVersion にバージョンを書き込むために生成する - var configFilePath = Path.Combine(Path.GetDirectoryName(pathToBuiltProject), "..", "..", "setup.txt"); - var configText = $"#define MyAppVersion \"{appVersion}\""; - File.WriteAllText(configFilePath, configText); - } } } \ No newline at end of file diff --git a/setup.iss b/setup.iss index c0dcf7c7..167aa4da 100644 --- a/setup.iss +++ b/setup.iss @@ -7,12 +7,11 @@ #define MyAppExeName "StandaloneWindows64.exe" [Setup] -#include "setup.txt" ; 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={{8C3A0DD1-5FD3-4F40-A7AA-5A08F5121022} AppName={#MyAppName} -AppVersion={#MyAppVersion} +AppVersion=1.0.0 ;AppVerName={#MyAppName} {#MyAppVersion} AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} @@ -32,7 +31,7 @@ DisableProgramGroupPage=yes ; Uncomment the following line to run in non administrative install mode (install for current user only). ;PrivilegesRequired=lowest OutputDir=build -OutputBaseFilename=uDesktopMascot_win64_{#MyAppVersion} +OutputBaseFilename=uDesktopMascot_win64 SolidCompression=yes WizardStyle=modern diff --git a/setup.txt b/setup.txt deleted file mode 100644 index dfabc836..00000000 --- a/setup.txt +++ /dev/null @@ -1 +0,0 @@ -#define MyAppVersion "0.0.169" \ No newline at end of file diff --git a/version.txt b/version.txt deleted file mode 100644 index bbab5083..00000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -0.0.169 \ No newline at end of file From 89a4de297654798f120f3a777ad00172e866a673 Mon Sep 17 00:00:00 2001 From: eiei114 <60887155+eiei114@users.noreply.github.com> Date: Fri, 17 Jan 2025 23:43:17 +0900 Subject: [PATCH 30/34] Update PostBuildProcessor.cs --- Assets/uDesktopMascot/Editor/PostBuildProcessor.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs b/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs index c674ea4d..2ab53373 100644 --- a/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs +++ b/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs @@ -54,7 +54,6 @@ public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProj { // ビルドフォルダを最大圧縮で ZIP 圧縮 CreateMaxCompressedZipOfBuildFolder(buildDirectory, appName); - } Log.Debug("ビルド後処理が完了しました。"); @@ -206,4 +205,4 @@ private static string GetRelativePath(string basePath, string targetPath) .Replace('/', Path.DirectorySeparatorChar)); } } -} \ No newline at end of file +} From 6f8d9a05cb31bb2676ce9a3750e90f71b2f0ffa2 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Fri, 17 Jan 2025 23:45:42 +0900 Subject: [PATCH 31/34] =?UTF-8?q?fix:=20=E5=A4=89=E6=9B=B4=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/uDesktopMascot/Editor/PostBuildProcessor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs b/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs index 2ab53373..94538205 100644 --- a/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs +++ b/Assets/uDesktopMascot/Editor/PostBuildProcessor.cs @@ -205,4 +205,4 @@ private static string GetRelativePath(string basePath, string targetPath) .Replace('/', Path.DirectorySeparatorChar)); } } -} +} \ No newline at end of file From 2b06c0a6331feee1873bfc19665bf580cbc7a86a Mon Sep 17 00:00:00 2001 From: eiei114 Date: Sat, 18 Jan 2025 00:03:42 +0900 Subject: [PATCH 32/34] =?UTF-8?q?fix:=20=E4=B8=8D=E8=A6=81=E3=81=AA?= =?UTF-8?q?=E7=A9=BA=E7=99=BD=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.iss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.iss b/setup.iss index 167aa4da..5512c3db 100644 --- a/setup.iss +++ b/setup.iss @@ -22,7 +22,7 @@ UninstallDisplayIcon={app}\{#MyAppExeName} ; "ArchitecturesAllowed=x64compatible" specifies that Setup cannot run ; on anything but x64 and Windows 11 on Arm. ArchitecturesAllowed=x64compatible -; "ArchitecturesInstallIn64BitMode=x6 4compatible" requests that the +; "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. From f65180e37785ed64090056d523b2e2a63b11d280 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Sat, 18 Jan 2025 00:05:28 +0900 Subject: [PATCH 33/34] =?UTF-8?q?fix:=20windows=E7=95=AA=E3=82=82=E3=83=93?= =?UTF-8?q?=E3=83=AB=E3=83=89=E7=89=A9=E3=82=92=E3=82=A2=E3=83=83=E3=83=97?= =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=83=89=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 28675d81..b06218f9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -125,7 +125,6 @@ jobs: unityVersion: ${{ matrix.unityVersion }} - name: Upload the Build for ${{ matrix.targetPlatform }} - if: matrix.targetPlatform == 'StandaloneOSX' uses: actions/upload-artifact@v4.6.0 with: name: Build-${{ matrix.targetPlatform }}-${{ steps.vars.outputs.sha_short }} From f6d432ba8831d0f9f2f56f3b6a44be8ebd7597c3 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Sat, 18 Jan 2025 01:26:14 +0900 Subject: [PATCH 34/34] =?UTF-8?q?fix:=20=E3=82=A4=E3=83=B3=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=83=BC=E3=83=A9=E3=83=BC=E5=90=8D=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 4 ++-- setup.iss | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b06218f9..4856630c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -140,5 +140,5 @@ jobs: if: matrix.targetPlatform == 'StandaloneWindows64' uses: actions/upload-artifact@v4.6.0 with: - name: uDesktopMascot_win64 - path: "build/uDesktopMascot_win64.exe" + name: uDesktopMascot_win64_installer + path: "build/uDesktopMascot_win64_installer.exe" diff --git a/setup.iss b/setup.iss index 5512c3db..2466adc0 100644 --- a/setup.iss +++ b/setup.iss @@ -31,7 +31,7 @@ DisableProgramGroupPage=yes ; Uncomment the following line to run in non administrative install mode (install for current user only). ;PrivilegesRequired=lowest OutputDir=build -OutputBaseFilename=uDesktopMascot_win64 +OutputBaseFilename=uDesktopMascot_win64_installer SolidCompression=yes WizardStyle=modern