diff --git a/.vscode/build.ps1 b/.vscode/build.ps1 new file mode 100644 index 0000000..7fef86a --- /dev/null +++ b/.vscode/build.ps1 @@ -0,0 +1,34 @@ +[CmdletBinding()] +param( + [ValidateSet('Debug', 'Release', 'Snapshot')] + [string]$Configuration = 'Debug' +) + +$ErrorActionPreference = 'Stop' +$solution = Join-Path $PSScriptRoot '..\Plain Craft Launcher 2.sln' +$solution = [IO.Path]::GetFullPath($solution) + +$msbuild = (Get-Command msbuild.exe -ErrorAction SilentlyContinue).Source +if (-not $msbuild) { + $vswhere = @( + (Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio\Installer\vswhere.exe'), + (Join-Path $env:ProgramFiles 'Microsoft Visual Studio\Installer\vswhere.exe') + ) | Where-Object { Test-Path $_ } | Select-Object -First 1 + + if ($vswhere) { + $installationPath = & $vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath + if ($installationPath) { + $candidate = Join-Path $installationPath 'MSBuild\Current\Bin\MSBuild.exe' + if (Test-Path $candidate) { $msbuild = $candidate } + } + } +} + +if (-not $msbuild) { + throw 'MSBuild was not found. Install Visual Studio Build Tools with the .NET desktop build tools and .NET Framework 4.8 targeting pack.' +} + +Write-Host "MSBuild: $msbuild" +Write-Host "Configuration: $Configuration" +& $msbuild $solution /t:Build "/p:Configuration=$Configuration" "/p:Platform=Any CPU" /m /v:minimal +exit $LASTEXITCODE diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..811a768 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + "recommendations": [ + "ms-dotnettools.csharp", + "ms-dotnettools.csdevkit" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7cce709 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dotnet.defaultSolution": "Plain Craft Launcher 2.sln" +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..eeaeea2 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,39 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Build PCL-ISE (Debug)", + "type": "shell", + "command": "powershell.exe", + "args": [ + "-NoProfile", + "-ExecutionPolicy", + "Bypass", + "-File", + "${workspaceFolder}\\.vscode\\build.ps1", + "-Configuration", + "Debug" + ], + "problemMatcher": "$msCompile", + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build PCL-ISE (Release)", + "type": "shell", + "command": "powershell.exe", + "args": [ + "-NoProfile", + "-ExecutionPolicy", + "Bypass", + "-File", + "${workspaceFolder}\\.vscode\\build.ps1", + "-Configuration", + "Release" + ], + "problemMatcher": "$msCompile" + } + ] +} diff --git a/Plain Craft Launcher 2/Modules/Base/ModBase.vb b/Plain Craft Launcher 2/Modules/Base/ModBase.vb index 422e405..7d5c081 100644 --- a/Plain Craft Launcher 2/Modules/Base/ModBase.vb +++ b/Plain Craft Launcher 2/Modules/Base/ModBase.vb @@ -5,8 +5,10 @@ Public Module ModBase #Region "声明" - '下列版本信息由更新器自动修改 - Public Const VersionBaseName As String = "2.99.0.0" '显示用版本名 + 'PCL-ISE 版本规则:主版本.次版本.修订版本;内部 VersionCode 继续用于更新兼容判断。 + Public Const ProductName As String = "Plain Craft Launcher (PCL) InfstarMC Edition" + Public Const ProductShortName As String = "PCL-ISE" + Public Const VersionBaseName As String = "0.1.0" '显示用版本名 Public Const CommitHash As String = "" 'Commit Hash,由 GitHub Workflow 自动替换 #If RELEASE Then Public Const VersionCode As Integer = 413 '正式版 diff --git a/Plain Craft Launcher 2/My Project/AssemblyInfo.vb b/Plain Craft Launcher 2/My Project/AssemblyInfo.vb index 0fc0a07..a6c335f 100644 --- a/Plain Craft Launcher 2/My Project/AssemblyInfo.vb +++ b/Plain Craft Launcher 2/My Project/AssemblyInfo.vb @@ -8,10 +8,10 @@ Imports System.Runtime.InteropServices '查看程序集特性的值 - - - - + + + + @@ -51,6 +51,6 @@ Imports System.Runtime.InteropServices ' 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 ' 方法是按如下所示使用“*” - - + + diff --git a/Plain Craft Launcher 2/Pages/PageOther/PageOtherAbout.xaml b/Plain Craft Launcher 2/Pages/PageOther/PageOtherAbout.xaml index a19f018..122e1e8 100644 --- a/Plain Craft Launcher 2/Pages/PageOther/PageOtherAbout.xaml +++ b/Plain Craft Launcher 2/Pages/PageOther/PageOtherAbout.xaml @@ -12,6 +12,7 @@ + @@ -20,7 +21,8 @@ - + + @@ -36,10 +38,16 @@ + + + + + - + + @@ -537,13 +545,13 @@ - + - +