From 8746125dda5c3da862c22058e7319fc4eb80ba8a Mon Sep 17 00:00:00 2001
From: ChsBuffer <33744752+chsbuffer@users.noreply.github.com>
Date: Sun, 28 Mar 2021 00:01:59 +0800
Subject: [PATCH] Create Publish.ps1
---
Interop.nfapinet/Interop.nfapinet.csproj | 4 ++++
Netch/App.config | 6 ------
Netch/Netch.cs | 1 +
Netch/Netch.csproj | 1 +
PUBLISH.ps1 | 14 ++++++++++++++
5 files changed, 20 insertions(+), 6 deletions(-)
delete mode 100644 Netch/App.config
create mode 100644 PUBLISH.ps1
diff --git a/Interop.nfapinet/Interop.nfapinet.csproj b/Interop.nfapinet/Interop.nfapinet.csproj
index 21202604..c111d58b 100644
--- a/Interop.nfapinet/Interop.nfapinet.csproj
+++ b/Interop.nfapinet/Interop.nfapinet.csproj
@@ -6,4 +6,8 @@
true
+
+ none
+
+
diff --git a/Netch/App.config b/Netch/App.config
deleted file mode 100644
index 451442db..00000000
--- a/Netch/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Netch/Netch.cs b/Netch/Netch.cs
index 81a3b337..27cf0f2d 100644
--- a/Netch/Netch.cs
+++ b/Netch/Netch.cs
@@ -87,6 +87,7 @@ namespace Netch
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
Application.ThreadException += Application_OnException;
+ Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(Global.MainForm);
diff --git a/Netch/Netch.csproj b/Netch/Netch.csproj
index 312a58a7..07b388df 100644
--- a/Netch/Netch.csproj
+++ b/Netch/Netch.csproj
@@ -48,6 +48,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/PUBLISH.ps1 b/PUBLISH.ps1
new file mode 100644
index 00000000..8df58b6e
--- /dev/null
+++ b/PUBLISH.ps1
@@ -0,0 +1,14 @@
+Write-Host 'Building'
+
+dotnet publish -c "Release" `
+ -p:Platform="x64" `
+ -p:PublishSingleFile=true `
+ -p:RuntimeIdentifier=win-x64 `
+ -p:SolutionDir="$pwd\" `
+ -o Netch\bin\Publish\ `
+ --no-self-contained `
+ Netch\Netch.csproj
+
+if ($LASTEXITCODE) { exit $LASTEXITCODE }
+
+Write-Host 'Build done'