From 74d8d9d3d1172f90279a33c260fa01f69f252227 Mon Sep 17 00:00:00 2001
From: TetsuOtter <31824852+TetsuOtter@users.noreply.github.com>
Date: Sun, 22 Sep 2024 23:58:00 +0900
Subject: [PATCH 01/15] =?UTF-8?q?Windows=E5=90=91=E3=81=91=E3=81=84?=
=?UTF-8?q?=E3=82=8D=E3=81=84=E3=82=8D=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- WindowWidthが0で来てしまうので、無視する実装
- Unhandled Exception後はファイル書き込みができないので、クラッシュログの出力を削除
- Frameを多段で配置するとバグるので削除
- CrashReport.Exceptionはdeprecatedなので削除
---
TRViS/DTAC/PageParts/TabButton.xaml.cs | 4 +
TRViS/MauiProgram.cs | 9 +-
TRViS/RootPages/SelectTrainPage.xaml | 116 ++++++++++++-------------
TRViS/Services/AppCenterService.cs | 4 +-
TRViS/Services/LoggerService.cs | 2 +-
5 files changed, 64 insertions(+), 71 deletions(-)
diff --git a/TRViS/DTAC/PageParts/TabButton.xaml.cs b/TRViS/DTAC/PageParts/TabButton.xaml.cs
index f691b249..98b6f9fa 100644
--- a/TRViS/DTAC/PageParts/TabButton.xaml.cs
+++ b/TRViS/DTAC/PageParts/TabButton.xaml.cs
@@ -42,6 +42,10 @@ private void AppViewModel_PropertyChanged(object? sender, PropertyChangedEventAr
}
void OnWindowWidthChanged(double newValue)
{
+ if (newValue == 0)
+ {
+ return;
+ }
try
{
logger.Trace("newValue: {0}", newValue);
diff --git a/TRViS/MauiProgram.cs b/TRViS/MauiProgram.cs
index 649d1032..3e5000db 100644
--- a/TRViS/MauiProgram.cs
+++ b/TRViS/MauiProgram.cs
@@ -42,19 +42,12 @@ public static MauiApp CreateMauiApp()
return builder.Build();
}
- private static async void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
+ private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
if (e.ExceptionObject is not Exception ex)
return;
logger.Fatal(ex, "UnhandledException");
-
- if (!DirectoryPathProvider.CrashLogFileDirectory.Exists)
- {
- DirectoryPathProvider.CrashLogFileDirectory.Create();
- }
-
- await File.AppendAllTextAsync(CrashLogFilePath, $"{DateTime.Now:[yyyy/MM/dd HH:mm:ss]} {ex.Message}\n{ex.StackTrace}\n---\n(InnerException: {ex.InnerException})\n\n");
}
}
diff --git a/TRViS/RootPages/SelectTrainPage.xaml b/TRViS/RootPages/SelectTrainPage.xaml
index 70370201..850ac64b 100644
--- a/TRViS/RootPages/SelectTrainPage.xaml
+++ b/TRViS/RootPages/SelectTrainPage.xaml
@@ -56,67 +56,63 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TRViS/Services/AppCenterService.cs b/TRViS/Services/AppCenterService.cs
index d477c87f..c1d4bc7e 100644
--- a/TRViS/Services/AppCenterService.cs
+++ b/TRViS/Services/AppCenterService.cs
@@ -110,7 +110,7 @@ static async Task ApplyCrashesSettingAsync(bool statusToBe)
#elif ANDROID
crashReport.AndroidDetails,
#else
- crashReport.Exception,
+ "(No Detail)",
#endif
crashReport.StackTrace
);
@@ -203,7 +203,7 @@ static async Task InitCrashesSettings()
#elif ANDROID
crashReport.AndroidDetails,
#else
- crashReport.Exception,
+ "(No Detail)",
#endif
crashReport.StackTrace
);
diff --git a/TRViS/Services/LoggerService.cs b/TRViS/Services/LoggerService.cs
index 4bfa8440..0f609891 100644
--- a/TRViS/Services/LoggerService.cs
+++ b/TRViS/Services/LoggerService.cs
@@ -179,7 +179,7 @@ public static ErrorAttachmentLog[] GetErrorAttachmentsCallback(ErrorReport repor
#elif ANDROID
report.AndroidDetails,
#else
- report.Exception,
+ "(No Detail)",
#endif
report.StackTrace
);
From 52d71945a112665af993f7f364d7e29ec9b5a54d Mon Sep 17 00:00:00 2001
From: TetsuOtter <31824852+TetsuOtter@users.noreply.github.com>
Date: Mon, 23 Sep 2024 00:00:11 +0900
Subject: [PATCH 02/15] =?UTF-8?q?=E4=BE=9D=E5=AD=98=E3=83=91=E3=83=83?=
=?UTF-8?q?=E3=82=B1=E3=83=BC=E3=82=B8=E3=81=AE=E3=83=90=E3=83=BC=E3=82=B8?=
=?UTF-8?q?=E3=83=A7=E3=83=B3=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
TRViS.IO.Tests/TRViS.IO.Tests.csproj | 6 +++---
TRViS.IO/TRViS.IO.csproj | 4 ++--
.../TRViS.LocationService.Tests.csproj | 9 ++++++---
TRViS/TRViS.csproj | 6 +++---
4 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/TRViS.IO.Tests/TRViS.IO.Tests.csproj b/TRViS.IO.Tests/TRViS.IO.Tests.csproj
index 70521daa..84142dbe 100644
--- a/TRViS.IO.Tests/TRViS.IO.Tests.csproj
+++ b/TRViS.IO.Tests/TRViS.IO.Tests.csproj
@@ -9,10 +9,10 @@
-
-
+
+
- runtime; build; native; contentfiles; analyzers; buildtransitive
+ runtime; build; native; contentfiles; analyzers; buildtransitive
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/TRViS.IO/TRViS.IO.csproj b/TRViS.IO/TRViS.IO.csproj
index 2c23f715..2338fa20 100644
--- a/TRViS.IO/TRViS.IO.csproj
+++ b/TRViS.IO/TRViS.IO.csproj
@@ -9,8 +9,8 @@
-
+
-
+
diff --git a/TRViS.LocationService.Tests/TRViS.LocationService.Tests.csproj b/TRViS.LocationService.Tests/TRViS.LocationService.Tests.csproj
index 902153f7..ba805732 100644
--- a/TRViS.LocationService.Tests/TRViS.LocationService.Tests.csproj
+++ b/TRViS.LocationService.Tests/TRViS.LocationService.Tests.csproj
@@ -10,10 +10,13 @@
-
-
+
+
-
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/TRViS/TRViS.csproj b/TRViS/TRViS.csproj
index b2f3ab77..7a3997a5 100644
--- a/TRViS/TRViS.csproj
+++ b/TRViS/TRViS.csproj
@@ -52,7 +52,7 @@
+ Version="8.0.90" />
@@ -66,10 +66,10 @@
Version="8.0.4" />
+ Version="9.0.3" />
+ Version="5.3.4" />
From ac6b7a6916d85ce483df7545b9c8afc8f6077c02 Mon Sep 17 00:00:00 2001
From: TetsuOtter <31824852+TetsuOtter@users.noreply.github.com>
Date: Mon, 23 Sep 2024 00:58:01 +0900
Subject: [PATCH 03/15] =?UTF-8?q?Windows=E3=81=AB=E3=81=A6=E3=83=9D?=
=?UTF-8?q?=E3=83=83=E3=83=97=E3=82=A2=E3=83=83=E3=83=97=E3=81=8C=E7=B0=A1?=
=?UTF-8?q?=E5=8D=98=E3=81=AB=E9=96=89=E3=81=98=E3=81=A6=E3=81=97=E3=81=BE?=
=?UTF-8?q?=E3=81=86=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
TRViS/RootPages/SelectOnlineResourcePopup.cs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/TRViS/RootPages/SelectOnlineResourcePopup.cs b/TRViS/RootPages/SelectOnlineResourcePopup.cs
index 9f90a960..02e17625 100644
--- a/TRViS/RootPages/SelectOnlineResourcePopup.cs
+++ b/TRViS/RootPages/SelectOnlineResourcePopup.cs
@@ -59,6 +59,10 @@ public SelectOnlineResourcePopup()
logger.Debug("New SelectOnlineResourcePopup()");
Size = new(480, 480);
RootStyles.BackgroundColor.Apply(this, Popup.ColorProperty);
+#if WINDOWS
+ // 別ウィンドウを開くだけでも閉じてしまうため
+ CanBeDismissedByTappingOutsideOfPopup = false;
+#endif
RootStyles.BackgroundBlackWhite.Apply(UrlInput, Button.BackgroundColorProperty);
RootStyles.TableTextColor.Apply(UrlInput, Button.TextColorProperty);
From c98ac80488762eb78b3567e095196f02ec394386 Mon Sep 17 00:00:00 2001
From: TetsuOtter <31824852+TetsuOtter@users.noreply.github.com>
Date: Mon, 23 Sep 2024 00:58:39 +0900
Subject: [PATCH 04/15] =?UTF-8?q?AppLink=E3=82=92App=E5=86=85=E3=81=8B?=
=?UTF-8?q?=E3=82=89=E9=96=8B=E3=81=91=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
WindowsでAppLinkを使えない場合の対策
---
TRViS/RootPages/SelectOnlineResourcePopup.cs | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/TRViS/RootPages/SelectOnlineResourcePopup.cs b/TRViS/RootPages/SelectOnlineResourcePopup.cs
index 02e17625..1e414ffb 100644
--- a/TRViS/RootPages/SelectOnlineResourcePopup.cs
+++ b/TRViS/RootPages/SelectOnlineResourcePopup.cs
@@ -166,11 +166,13 @@ private async void DoLoad()
return;
}
- AppLinkInfo appLinkInfo = new(
- AppLinkInfo.FileType.Json,
- Version: new(1,0),
- ResourceUri: new(UrlInput.Text)
- );
+ AppLinkInfo appLinkInfo = UrlInput.Text.StartsWith("trvis://")
+ ? AppLinkInfo.FromAppLink(UrlInput.Text)
+ : new(
+ AppLinkInfo.FileType.Json,
+ Version: new(1,0),
+ ResourceUri: new(UrlInput.Text)
+ );
bool execResult = await InstanceManager.AppViewModel.HandleAppLinkUriAsync(appLinkInfo, CancellationToken.None);
if (execResult)
{
From 4bb89dbd975e85aebd1092ab15662415f300617c Mon Sep 17 00:00:00 2001
From: TetsuOtter <31824852+TetsuOtter@users.noreply.github.com>
Date: Mon, 23 Sep 2024 01:28:39 +0900
Subject: [PATCH 05/15] =?UTF-8?q?net8.0=E3=81=AB=E3=81=97=E5=BF=98?=
=?UTF-8?q?=E3=82=8C=E3=81=A6=E3=81=84=E3=81=9F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
TRViS/TRViS.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/TRViS/TRViS.csproj b/TRViS/TRViS.csproj
index 7a3997a5..5b7d11d0 100644
--- a/TRViS/TRViS.csproj
+++ b/TRViS/TRViS.csproj
@@ -2,7 +2,7 @@
net8.0-android;
- $(TargetFrameworks);net6.0-windows10.0.19041.0
+ $(TargetFrameworks);net8.0-windows10.0.19041.0
$(TargetFrameworks);net8.0-ios;net8.0-maccatalyst
true
Exe
From f495db16d068ef2cc97403dc9bc58786ba625bb9 Mon Sep 17 00:00:00 2001
From: TetsuOtter <31824852+TetsuOtter@users.noreply.github.com>
Date: Mon, 23 Sep 2024 19:15:30 +0900
Subject: [PATCH 06/15] =?UTF-8?q?SDK=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7?=
=?UTF-8?q?=E3=83=B3=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/cd-action.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/cd-action.yml b/.github/workflows/cd-action.yml
index 8610d940..4436855a 100644
--- a/.github/workflows/cd-action.yml
+++ b/.github/workflows/cd-action.yml
@@ -29,7 +29,7 @@ env:
PKG_PATH: ./out/TRViS.pkg
AAB_PATH: ./out/dev.t0r.trvis-Signed.aab
APK_PATH: ./out/dev.t0r.trvis-Signed.apk
- SDK_VERSION: '8.0.100'
+ SDK_VERSION: '8.0.401'
APP_CENTER_SECRETS_FILE_NAME: ./TRViS/AppCenterSecrets.cs
IOS_DSYM_PATH: ./TRViS/bin/Release/net8.0-ios/ios-arm64
IOS_DSYM_FILENAME: TRViS.app.dSYM
From 47942301634f2abf36d8cfd54fa87808ab330c3a Mon Sep 17 00:00:00 2001
From: TetsuOtter <31824852+TetsuOtter@users.noreply.github.com>
Date: Mon, 23 Sep 2024 19:16:02 +0900
Subject: [PATCH 07/15] =?UTF-8?q?Build=20keychain=E3=81=ABid=E3=82=92?=
=?UTF-8?q?=E3=81=A4=E3=81=91=E5=BF=98=E3=82=8C=E3=81=A6=E3=81=84=E3=81=9F?=
=?UTF-8?q?=E3=81=AE=E3=81=A7=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/cd-action.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/cd-action.yml b/.github/workflows/cd-action.yml
index 4436855a..9f8a89b3 100644
--- a/.github/workflows/cd-action.yml
+++ b/.github/workflows/cd-action.yml
@@ -160,6 +160,7 @@ jobs:
# ref: https://github.com/Apple-Actions/import-codesign-certs/pull/27#issuecomment-1298231619
- name: Build keychain
+ id: import-code-sign-cert
run: |
echo "${{ secrets.P12_FILE_BASE64 }}" | base64 --decode > certificate.p12
security create-keychain -p "${{ secrets.P12_PASSWORD }}" "${{ env.KEYCHAIN_NAME }}"
@@ -377,6 +378,7 @@ jobs:
# ref: https://github.com/Apple-Actions/import-codesign-certs/pull/27#issuecomment-1298231619
- name: Build keychain
+ id: import-code-sign-cert
run: |
echo "${{ secrets.P12_FILE_MAC_BASE64 }}" | base64 --decode > certificate.p12
security create-keychain -p '${{ secrets.P12_PASSWORD_MAC }}' "${{ env.KEYCHAIN_NAME }}"
From 3168eb70182d3c3d1c688478a2280f7d458cb249 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EF=BC=B4=EF=BC=B2?=
<31824852+TetsuOtter@users.noreply.github.com>
Date: Thu, 19 Sep 2024 02:36:20 +0900
Subject: [PATCH 08/15] =?UTF-8?q?Xcode=E3=81=AE=E3=83=90=E3=83=BC=E3=82=B8?=
=?UTF-8?q?=E3=83=A7=E3=83=B3=E3=82=92=E5=9B=BA=E5=AE=9A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Xcode16だとアップロードできなさそうなため
---
.github/workflows/cd-action.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/cd-action.yml b/.github/workflows/cd-action.yml
index 9f8a89b3..45a34bc1 100644
--- a/.github/workflows/cd-action.yml
+++ b/.github/workflows/cd-action.yml
@@ -177,7 +177,7 @@ jobs:
- name: Setup Xcode version
uses: maxim-lobanov/setup-xcode@v1.6.0
with:
- xcode-version: latest-stable
+ xcode-version: 15
- uses: actions/setup-dotnet@v3
with:
@@ -395,7 +395,7 @@ jobs:
- name: Setup Xcode version
uses: maxim-lobanov/setup-xcode@v1.6.0
with:
- xcode-version: 'latest-stable'
+ xcode-version: 15
- uses: actions/setup-dotnet@v3
with:
From 5b5ed47da89761ae0477b8576ac394c7e46310cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EF=BC=B4=EF=BC=B2?=
<31824852+TetsuOtter@users.noreply.github.com>
Date: Thu, 19 Sep 2024 02:40:41 +0900
Subject: [PATCH 09/15] =?UTF-8?q?=E5=90=84action=E3=82=92v4=E3=81=AB?=
=?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/cd-action.yml | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/cd-action.yml b/.github/workflows/cd-action.yml
index 45a34bc1..3ba6ded9 100644
--- a/.github/workflows/cd-action.yml
+++ b/.github/workflows/cd-action.yml
@@ -179,7 +179,7 @@ jobs:
with:
xcode-version: 15
- - uses: actions/setup-dotnet@v3
+ - uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.SDK_VERSION }}
- name: Install dotnet workloads
@@ -231,7 +231,7 @@ jobs:
/p:CodesignProvision="${{ secrets.CODESIGN_PROVISION_NAME_IOS }}"
- name: Upload IPA
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: ipa
path: ${{ env.IPA_PATH }}
@@ -240,7 +240,7 @@ jobs:
- name: tar dSYM
run: cd ${{ env.IOS_DSYM_PATH }} && tar -czf ${{ env.IOS_DSYM_FILENAME }}.tar.gz ${{ env.IOS_DSYM_FILENAME }}
- name: Upload dSYM
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: dSYM
path: ${{ env.IOS_DSYM_PATH }}/${{ env.IOS_DSYM_FILENAME }}.tar.gz
@@ -267,7 +267,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- - uses: actions/setup-dotnet@v3
+ - uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.SDK_VERSION }}
- name: Install dotnet workloads
@@ -329,14 +329,14 @@ jobs:
/p:AndroidSigningStorePass='${{ secrets.ANDROID_SIGNING_KEY_STORE_PASS }}'
- name: Upload AAB
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: aab
path: ${{ env.AAB_PATH }}
retention-days: 3
- name: Upload APK
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: apk
path: ${{ env.APK_PATH }}
@@ -397,7 +397,7 @@ jobs:
with:
xcode-version: 15
- - uses: actions/setup-dotnet@v3
+ - uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.SDK_VERSION }}
- name: Install dotnet workloads
@@ -457,7 +457,7 @@ jobs:
${{ env.PKG_PATH }}
- name: Upload PKG
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: pkg
path: ${{ env.PKG_PATH }}
@@ -496,7 +496,7 @@ jobs:
TARGET_FILE: AuthKey_${{ secrets.APPSTORECONNECT_API_KEY }}.p8
- name: Download IPA
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: ipa
path: ${{ env.OUTPUT_DIR }}
@@ -520,7 +520,7 @@ jobs:
--apiIssuer ${{ secrets.APPSTORECONNECT_ISSUER_ID }}
- name: Download dSYM
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: dSYM
path: .
@@ -566,7 +566,7 @@ jobs:
TARGET_FILE: AuthKey_${{ secrets.APPSTORECONNECT_API_KEY }}.p8
- name: Download PKG
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: pkg
path: ${{ env.OUTPUT_DIR }}
@@ -655,7 +655,7 @@ jobs:
steps:
- name: Download APK
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: apk
path: ${{ env.OUTPUT_DIR }}
From 2b3d6d27245d26bf440d0271ae9a36d1ee93fce3 Mon Sep 17 00:00:00 2001
From: TetsuOtter <31824852+TetsuOtter@users.noreply.github.com>
Date: Mon, 23 Sep 2024 20:00:34 +0900
Subject: [PATCH 10/15] =?UTF-8?q?Windows=E5=90=91=E3=81=91=E3=83=93?=
=?UTF-8?q?=E3=83=AB=E3=83=89=E3=83=AB=E3=83=BC=E3=83=AB=E3=82=92=E8=BF=BD?=
=?UTF-8?q?=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/cd-action.yml | 189 ++++++++++++++++++++++++++++++++
TRViS/TRViS.csproj | 3 +
2 files changed, 192 insertions(+)
diff --git a/.github/workflows/cd-action.yml b/.github/workflows/cd-action.yml
index 3ba6ded9..d687c8c7 100644
--- a/.github/workflows/cd-action.yml
+++ b/.github/workflows/cd-action.yml
@@ -24,11 +24,18 @@ env:
TARGET_FRAMEWORK_MAC: net8.0-maccatalyst
TARGET_RUNTIME_MAC: osx
TARGET_FRAMEWORK_ANDROID: net8.0-android
+ TARGET_FRAMEWORK_WIN: net8.0-windows10.0.19041.0
+ TARGET_RUNTIME_WINX64: win10-x64
+ TARGET_RUNTIME_WINX86: win10-x86
OUTPUT_DIR: ./out
IPA_PATH: ./out/TRViS.ipa
PKG_PATH: ./out/TRViS.pkg
AAB_PATH: ./out/dev.t0r.trvis-Signed.aab
APK_PATH: ./out/dev.t0r.trvis-Signed.apk
+ ASSET_NAME_WIN_X64: TRViS-win-x64
+ ASSET_NAME_WIN_X86: TRViS-win-x86
+ ASSET_NAME_WIN_X64_SELF_CONTAINED: TRViS-win-x64-self-contained
+ ASSET_NAME_WIN_X86_SELF_CONTAINED: TRViS-win-x86-self-contained
SDK_VERSION: '8.0.401'
APP_CENTER_SECRETS_FILE_NAME: ./TRViS/AppCenterSecrets.cs
IOS_DSYM_PATH: ./TRViS/bin/Release/net8.0-ios/ios-arm64
@@ -467,6 +474,148 @@ jobs:
if: always() && steps.import-code-sign-cert.conclusion == 'success'
run: /usr/bin/security delete-keychain ${{ steps.gen-keychain-name.outputs.keychain-name }}.keychain
+ build-windows:
+ if: |
+ !failure()
+ && !cancelled()
+ && (
+ github.event_name != 'pull_request'
+ || github.event.pull_request.draft == false
+ )
+
+ runs-on: windows-latest
+ timeout-minutes: 30
+ needs:
+ - get-version
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: ${{ env.SDK_VERSION }}
+ - name: Install dotnet workloads
+ run: dotnet workload install maui-windows
+
+ - name: Install dependencies
+ run: dotnet restore ${{ env.CSPROJ_PATH }}
+
+ - uses: actions/setup-python@v4
+ with:
+ python-version: '3.10'
+ - name: Prapare Python Package
+ run: |
+ python --version
+ python -m pip install aiofiles aiohttp
+ - name: Dump Third Party License Info
+ id: dump-third-party-license-info
+ continue-on-error: true
+ run: |
+ python ./tools/getThirdPartyLicenseJson.py windows ${{ env.THIRD_PARTY_LICENSE_INFO_DIR }}
+ ls -l ${{ env.THIRD_PARTY_LICENSE_INFO_DIR }}
+ - name: Dump Third Party License Info (Retry)
+ if: steps.dump-third-party-license-info.outcome == 'failure'
+ run: |
+ python ./tools/getThirdPartyLicenseJson.py windows ${{ env.THIRD_PARTY_LICENSE_INFO_DIR }}
+ ls -l ${{ env.THIRD_PARTY_LICENSE_INFO_DIR }}
+ - name: Print Third Party License Info Files
+ run: cat ${{ env.THIRD_PARTY_LICENSE_INFO_DIR }}/${{ env.THIRD_PARTY_LICENSE_LIST_NAME }}.json
+
+ - name: Add AppCenterSecrets.cs
+ run: |
+ echo "namespace TRViS;" >> ${{ env.APP_CENTER_SECRETS_FILE_NAME }}
+ echo "class AppCenterSecrets" >> ${{ env.APP_CENTER_SECRETS_FILE_NAME }}
+ echo "{" >> ${{ env.APP_CENTER_SECRETS_FILE_NAME }}
+ echo 'public const string WINDOWS = "${{ secrets.APP_CENTER_SECRET_WINDOWS }}";' >> ${{ env.APP_CENTER_SECRETS_FILE_NAME }}
+ echo "}" >> ${{ env.APP_CENTER_SECRETS_FILE_NAME }}
+ ls -l ${{ env.APP_CENTER_SECRETS_FILE_NAME }}
+
+ - name: Build x64
+ run: >
+ dotnet publish ${{ env.CSPROJ_PATH }}
+ -f ${{ env.TARGET_FRAMEWORK_WIN }}
+ -c Release
+ -o "${{ env.OUTPUT_DIR }}"
+ /p:WindowsPackageType=None
+ /p:RuntimeIdentifierOverride=${{ env.TARGET_RUNTIME_WINX64 }}
+ /p:ApplicationDisplayVersion=${{ needs.get-version.outputs.display_version }}
+ /p:ApplicationVersion=${{ needs.get-version.outputs.build_number }}
+
+ - name: Upload x64
+ uses: actions/upload-artifact@v4
+ with:
+ name: ${{ env.ASSET_NAME_WIN_X64 }}
+ path: ${{ env.OUTPUT_DIR }}
+ retention-days: 3
+
+ - name: Clear Output Directory
+ run: Remove-Item -Recurse -Force -Path ${{ env.OUTPUT_DIR }}
+
+ - name: Build x64 Self Contained
+ run: >
+ dotnet publish ${{ env.CSPROJ_PATH }}
+ -f ${{ env.TARGET_FRAMEWORK_WIN }}
+ -c Release
+ -o "${{ env.OUTPUT_DIR }}"
+ /p:WindowsPackageType=None
+ /p:WindowsAppSDKSelfContained=true
+ --self-contained
+ /p:RuntimeIdentifierOverride=${{ env.TARGET_RUNTIME_WINX64 }}
+ /p:ApplicationDisplayVersion=${{ needs.get-version.outputs.display_version }}
+ /p:ApplicationVersion=${{ needs.get-version.outputs.build_number }}
+
+ - name: Upload x64 Self Contained
+ uses: actions/upload-artifact@v4
+ with:
+ name: ${{ env.ASSET_NAME_WIN_X64_SELF_CONTAINED }}
+ path: ${{ env.OUTPUT_DIR }}
+ retention-days: 3
+
+ - name: Clear Output Directory
+ run: Remove-Item -Recurse -Force -Path ${{ env.OUTPUT_DIR }}
+
+ - name: Build x86
+ run: >
+ dotnet publish ${{ env.CSPROJ_PATH }}
+ -f ${{ env.TARGET_FRAMEWORK_WIN }}
+ -c Release
+ -o "${{ env.OUTPUT_DIR }}"
+ /p:WindowsPackageType=None
+ /p:RuntimeIdentifierOverride=${{ env.TARGET_RUNTIME_WINX86 }}
+ /p:ApplicationDisplayVersion=${{ needs.get-version.outputs.display_version }}
+ /p:ApplicationVersion=${{ needs.get-version.outputs.build_number }}
+
+ - name: Upload x86
+ uses: actions/upload-artifact@v4
+ with:
+ name: ${{ env.ASSET_NAME_WIN_X86 }}
+ path: ${{ env.OUTPUT_DIR }}
+ retention-days: 3
+
+ - name: Clear Output Directory
+ run: Remove-Item -Recurse -Force -Path ${{ env.OUTPUT_DIR }}
+
+ - name: Build x86 Self Contained
+ run: >
+ dotnet publish ${{ env.CSPROJ_PATH }}
+ -f ${{ env.TARGET_FRAMEWORK_WIN }}
+ -c Release
+ -o "${{ env.OUTPUT_DIR }}"
+ /p:WindowsPackageType=None
+ /p:WindowsAppSDKSelfContained=true
+ --self-contained
+ /p:RuntimeIdentifierOverride=${{ env.TARGET_RUNTIME_WINX86 }}
+ /p:ApplicationDisplayVersion=${{ needs.get-version.outputs.display_version }}
+ /p:ApplicationVersion=${{ needs.get-version.outputs.build_number }}
+
+ - name: Upload x86 Self Contained
+ uses: actions/upload-artifact@v4
+ with:
+ name: ${{ env.ASSET_NAME_WIN_X86_SELF_CONTAINED }}
+ path: ${{ env.OUTPUT_DIR }}
+ retention-days: 3
+
+
publish-ios:
if: |
!failure()
@@ -652,6 +801,7 @@ jobs:
needs:
- set-tag
- build-android
+ - build-windows
steps:
- name: Download APK
@@ -659,6 +809,43 @@ jobs:
with:
name: apk
path: ${{ env.OUTPUT_DIR }}
+ - name: Download windows asset (x64)
+ uses: actions/download-artifact@v4
+ with:
+ name: ${{ env.ASSET_NAME_WIN_X64 }}
+ path: ${{ env.ASSET_NAME_WIN_X64 }}
+ - name: Download windows asset (x86)
+ uses: actions/download-artifact@v4
+ with:
+ name: ${{ env.ASSET_NAME_WIN_X86 }}
+ path: ${{ env.ASSET_NAME_WIN_X86 }}
+ - name: Download windows asset (x64 self-contained)
+ uses: actions/download-artifact@v4
+ with:
+ name: ${{ env.ASSET_NAME_WIN_X64_SELF_CONTAINED }}
+ path: ${{ env.ASSET_NAME_WIN_X64_SELF_CONTAINED }}
+ - name: Download windows asset (x86 self-contained)
+ uses: actions/download-artifact@v4
+ with:
+ name: ${{ env.ASSET_NAME_WIN_X86_SELF_CONTAINED }}
+ path: ${{ env.ASSET_NAME_WIN_X86_SELF_CONTAINED }}
+
+ - name: pack win-x64
+ run: |
+ 7z a -tzip ${{ env.OUTPUT_DIR }}/${{ env.ASSET_NAME_WIN_X64 }}.zip ${{ env.ASSET_NAME_WIN_X64 }}
+ 7z a -t7z ${{ env.OUTPUT_DIR }}/${{ env.ASSET_NAME_WIN_X64 }}.7z ${{ env.ASSET_NAME_WIN_X64 }}
+ - name: pack win-x86
+ run: |
+ 7z a -tzip ${{ env.OUTPUT_DIR }}/${{ env.ASSET_NAME_WIN_X86 }}.zip ${{ env.ASSET_NAME_WIN_X86 }}
+ 7z a -t7z ${{ env.OUTPUT_DIR }}/${{ env.ASSET_NAME_WIN_X86 }}.7z ${{ env.ASSET_NAME_WIN_X86 }}
+ - name: pack win-x64-self-contained
+ run: |
+ 7z a -tzip ${{ env.OUTPUT_DIR }}/${{ env.ASSET_NAME_WIN_X64_SELF_CONTAINED }}.zip ${{ env.ASSET_NAME_WIN_X64_SELF_CONTAINED }}
+ 7z a -t7z ${{ env.OUTPUT_DIR }}/${{ env.ASSET_NAME_WIN_X64_SELF_CONTAINED }}.7z ${{ env.ASSET_NAME_WIN_X64_SELF_CONTAINED }}
+ - name: pack win-x86-self-contained
+ run: |
+ 7z a -tzip ${{ env.OUTPUT_DIR }}/${{ env.ASSET_NAME_WIN_X86_SELF_CONTAINED }}.zip ${{ env.ASSET_NAME_WIN_X86_SELF_CONTAINED }}
+ 7z a -t7z ${{ env.OUTPUT_DIR }}/${{ env.ASSET_NAME_WIN_X86_SELF_CONTAINED }}.7z ${{ env.ASSET_NAME_WIN_X86_SELF_CONTAINED }}
- name: Create Release
run: >
@@ -666,6 +853,8 @@ jobs:
--draft
--generate-notes
${{ env.OUTPUT_DIR }}/*.apk
+ ${{ env.OUTPUT_DIR }}/*.zip
+ ${{ env.OUTPUT_DIR }}/*.7z
--repo ${{ github.repository }}
--notes 'This release is automatically created by actions ... https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}'
env:
diff --git a/TRViS/TRViS.csproj b/TRViS/TRViS.csproj
index 5b7d11d0..ae600830 100644
--- a/TRViS/TRViS.csproj
+++ b/TRViS/TRViS.csproj
@@ -26,6 +26,9 @@
10.0.17763.0
10.0.17763.0
+
+ $(RuntimeIdentifierOverride)
+
4
From 9132a1575c742a8bfa42e7d449843733208d6c32 Mon Sep 17 00:00:00 2001
From: TetsuOtter <31824852+TetsuOtter@users.noreply.github.com>
Date: Mon, 23 Sep 2024 20:13:32 +0900
Subject: [PATCH 11/15] =?UTF-8?q?Windows=E7=89=88=E3=81=A7Android=E3=82=92?=
=?UTF-8?q?=E5=AF=BE=E8=B1=A1=E3=81=8B=E3=82=89=E5=A4=96=E3=81=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/cd-action.yml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.github/workflows/cd-action.yml b/.github/workflows/cd-action.yml
index d687c8c7..85a9b3d1 100644
--- a/.github/workflows/cd-action.yml
+++ b/.github/workflows/cd-action.yml
@@ -488,6 +488,9 @@ jobs:
needs:
- get-version
+ env:
+ WITHOUT_ANDROID: true
+
steps:
- uses: actions/checkout@v4
From 930744f213fd52ee5d30d747849242e4eab69c4d Mon Sep 17 00:00:00 2001
From: TetsuOtter <31824852+TetsuOtter@users.noreply.github.com>
Date: Mon, 23 Sep 2024 21:21:56 +0900
Subject: [PATCH 12/15] =?UTF-8?q?Windows=E3=81=A7=E3=83=A9=E3=82=A4?=
=?UTF-8?q?=E3=82=BB=E3=83=B3=E3=82=B9=E5=87=BA=E5=8A=9B=E3=81=8C=E3=81=86?=
=?UTF-8?q?=E3=81=BE=E3=81=8F=E5=8B=95=E3=81=8B=E3=81=AA=E3=81=84=E5=95=8F?=
=?UTF-8?q?=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
tools/getThirdPartyLicenseJson.py | 33 ++++++++++++++++---------------
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/tools/getThirdPartyLicenseJson.py b/tools/getThirdPartyLicenseJson.py
index aa9bb908..698b782c 100644
--- a/tools/getThirdPartyLicenseJson.py
+++ b/tools/getThirdPartyLicenseJson.py
@@ -1,6 +1,6 @@
from dataclasses import asdict, dataclass
import json
-from os import makedirs
+from os import makedirs, name as osName
from shutil import copyfile
from subprocess import PIPE, Popen
from os.path import dirname, basename, exists, join as joinPath
@@ -16,6 +16,8 @@
CSPROJ_PATH = dirname(__file__) + "/../TRViS/TRViS.csproj"
TIMEOUT_SEC = 2
ENC = "utf-8"
+DOTNET_ENCODING = 'utf-8-sig' if osName == 'nt' else 'utf-8'
+
IGNORE_NS = "TRViS"
LICENSE_INFO_LIST_FILE_NAME = "license_list.json"
@@ -51,11 +53,11 @@ def getNugetGlobalPackagesDir() -> str:
async def getLicenseInfo(globalPackagesDir: str, packageInfo: PackageInfo) -> LicenseInfo:
packageNameLower = str.lower(packageInfo.PackageName)
- resourcePath = f'{globalPackagesDir}{packageNameLower}/{packageInfo.ResolvedVersion}/{packageNameLower}.nuspec'
+ resourcePath = joinPath(globalPackagesDir, packageNameLower, packageInfo.ResolvedVersion, f'{packageNameLower}.nuspec')
metadata: ElementTree.Element = None
NUSPEC_XML_NAMESPACE = {}
- async with aio_open(resourcePath, 'r') as stream:
+ async with aio_open(resourcePath, 'r', encoding=DOTNET_ENCODING) as stream:
root = ElementTree.fromstring(await stream.read())
if root is None:
return None
@@ -100,18 +102,17 @@ def getAndTrySetUniqueKey(dic: Dict[str, str], key: str) -> str:
return hashStr
async def getAndWriteFile(session: ClientSession, srcUrl: str, targetPath: str):
- async with aio_open(targetPath, 'w') as f:
- text = ''
- async with session.get(srcUrl) as result:
- if not result.ok:
- raise EOFError(f'GET Request to {srcUrl} failed')
+ async with session.get(srcUrl) as result:
+ if not result.ok:
+ raise EOFError(f'GET Request to {srcUrl} failed')
- text = await result.text()
+ async with aio_open(targetPath, 'wb') as f:
+ async for chunk in result.content.iter_chunked(4096):
+ await f.write(chunk)
- result.close()
- if not result.closed:
- await result.wait_for_close()
- await f.write(text)
+ result.close()
+ if not result.closed:
+ await result.wait_for_close()
async def dumpLicenseTextFileFromLicenseUrl(session: ClientSession, targetDir: str, licenseInfo: LicenseInfo, urlDic: Dict[str, str]):
url = licenseInfo.licenseUrl
@@ -145,7 +146,7 @@ async def dumpLicenseTextFileFromLicenseUrl(session: ClientSession, targetDir: s
await getAndWriteFile(session, url, licenseFilePath)
async def dumpLicenseTextFileFromLicenseExpression(session: ClientSession, licenseInfo: LicenseInfo, targetDir: str):
- licenseList = [str(v) for v in re.split("\(|\)| ", licenseInfo.license) if (v != '' or v.isspace()) and v != "OR" and v != "AND"]
+ licenseList = [str(v) for v in re.split(r"\(|\)| ", licenseInfo.license) if (v != '' or v.isspace()) and v != "OR" and v != "AND"]
for licenseId in licenseList:
licenseFilePath = joinPath(targetDir, licenseId)
if exists(licenseFilePath):
@@ -176,7 +177,7 @@ def getFrameworkVersion(platform: str) -> str:
with Popen(["dotnet", "list", CSPROJ_PATH, "package"], stdout=PIPE) as p:
for line in p.stdout.readlines():
lineStr = line.decode(ENC)
- frameworkVersionCheckResult = re.search(r"\[net\d+\.\d+-" + platform + r"\d+.\d+\]", lineStr)
+ frameworkVersionCheckResult = re.search(r"\[net\d+\.\d+-" + platform + r"\d+(.\d)+\]", lineStr)
if not frameworkVersionCheckResult:
continue
@@ -203,7 +204,7 @@ async def main(platform: str, targetDir: str) -> int:
continue
packages.append(PackageInfo(v[1].decode(ENC), v[-1].decode(ENC)))
- globalPackagesDir = getNugetGlobalPackagesDir()
+ globalPackagesDir = getNugetGlobalPackagesDir().strip()
packageInfoList = await asyncio.gather(*[getLicenseInfo(globalPackagesDir, v) for v in packages if not v.PackageName.startswith(IGNORE_NS)])
urlDic = {}
From 35a0b15f4a364cc4ca2ec3a686a119c00573ca68 Mon Sep 17 00:00:00 2001
From: TetsuOtter <31824852+TetsuOtter@users.noreply.github.com>
Date: Mon, 23 Sep 2024 21:44:20 +0900
Subject: [PATCH 13/15] =?UTF-8?q?=E3=82=BF=E3=82=B0=E4=BB=98=E4=B8=8E?=
=?UTF-8?q?=E5=9B=9E=E3=82=8A=E8=AA=BF=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/cd-action.yml | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/cd-action.yml b/.github/workflows/cd-action.yml
index 85a9b3d1..ccdb56ce 100644
--- a/.github/workflows/cd-action.yml
+++ b/.github/workflows/cd-action.yml
@@ -743,10 +743,13 @@ jobs:
set-tag:
if: |
- needs.generate-bundle-version.result == 'success'
+ always()
+ && needs.generate-bundle-version.result == 'success'
&& (
needs.publish-ios.result == 'success'
|| needs.publish-mac.result == 'success'
+ || needs.build-android.result == 'success'
+ || needs.build-windows.result == 'success'
)
runs-on: ubuntu-latest
@@ -755,7 +758,9 @@ jobs:
- generate-bundle-version
- publish-ios
- publish-mac
-
+ - build-android
+ - build-windows
+
outputs:
tag-name: ${{ steps.tag-name.outputs.tag-name }}
From 2307d22b8ceb5c3feb4746e4410e9286ecde7540 Mon Sep 17 00:00:00 2001
From: TetsuOtter <31824852+TetsuOtter@users.noreply.github.com>
Date: Mon, 23 Sep 2024 21:44:34 +0900
Subject: [PATCH 14/15] =?UTF-8?q?[skip=20ci]=20setup-python=E3=82=92v5?=
=?UTF-8?q?=E3=81=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/cd-action.yml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/cd-action.yml b/.github/workflows/cd-action.yml
index ccdb56ce..835cd917 100644
--- a/.github/workflows/cd-action.yml
+++ b/.github/workflows/cd-action.yml
@@ -195,7 +195,7 @@ jobs:
- name: Install dependencies
run: dotnet restore ${{ env.CSPROJ_PATH }} -r ${{ env.TARGET_RUNTIME }}
- - uses: actions/setup-python@v4
+ - uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Prapare Python Package
@@ -283,7 +283,7 @@ jobs:
- name: Install dependencies
run: dotnet restore ${{ env.CSPROJ_PATH }}
- - uses: actions/setup-python@v4
+ - uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Prapare Python Package
@@ -413,7 +413,7 @@ jobs:
- name: Install dependencies
run: dotnet restore ${{ env.CSPROJ_PATH }} -r ${{ env.TARGET_RUNTIME_MAC }}
- - uses: actions/setup-python@v4
+ - uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Prapare Python Package
@@ -503,7 +503,7 @@ jobs:
- name: Install dependencies
run: dotnet restore ${{ env.CSPROJ_PATH }}
- - uses: actions/setup-python@v4
+ - uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Prapare Python Package
From 1789e3304d80ccebc66ed9b7c4022f7c85929951 Mon Sep 17 00:00:00 2001
From: TetsuOtter <31824852+TetsuOtter@users.noreply.github.com>
Date: Mon, 23 Sep 2024 21:46:09 +0900
Subject: [PATCH 15/15] =?UTF-8?q?[skip=20ci]=20Android/Windows=E3=81=AE?=
=?UTF-8?q?=E3=83=93=E3=83=AB=E3=83=89=E3=82=B9=E3=83=86=E3=83=BC=E3=82=BF?=
=?UTF-8?q?=E3=82=B9=E3=82=82PR=E3=81=AB=E6=8A=95=E3=81=92=E3=82=8B?=
=?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/cd-action.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/cd-action.yml b/.github/workflows/cd-action.yml
index 835cd917..1821ac10 100644
--- a/.github/workflows/cd-action.yml
+++ b/.github/workflows/cd-action.yml
@@ -795,7 +795,7 @@ jobs:
run: >
echo Tag \`${{ steps.tag-name.outputs.tag-name }}\` was automatically created and pushed with
... https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
- ' (Publish Status iOS: ${{ needs.publish-ios.result }} / macOS: ${{ needs.publish-mac.result }})'
+ ' (Publish Status iOS: ${{ needs.publish-ios.result }} / macOS: ${{ needs.publish-mac.result }} / Android: ${{ needs.build-android.result }} / Windows: ${{ needs.build-windows.result }})'
| gh pr comment ${{ github.event.number }} -F -
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}