Skip to content

Commit

Permalink
Minor fixes - 2022-01-30_01
Browse files Browse the repository at this point in the history
- Added ps1 file to be manually run, for now - as it requires multiple runs sometimes, that makes sure everything is signed.
- Fixed not all platforms showing in manage platforms list
- Fixed missing BattleNet icon
  • Loading branch information
TCNOco committed Jan 30, 2022
1 parent 839bd27 commit 05af02a
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 3 deletions.
7 changes: 7 additions & 0 deletions TcNo-Acc-Switcher-Client/PostBuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,14 @@ copy /b/v/y CEF\vk_swiftshader.dll TcNo-Acc-Switcher\runtimes\win-x64\native\vk_
copy /b/v/y CEF\chrome_elf.dll TcNo-Acc-Switcher\runtimes\win-x64\native\chrome_elf.dll
copy /b/v/y CEF\CefSharp.BrowserSubprocess.Core.dll TcNo-Acc-Switcher\runtimes\win-x64\native\CefSharp.BrowserSubprocess.Core.dll

REM Verifying file sign state

IF EXIST A:\AccountSwitcherConfig\sign.txt (
ECHO Verifying signatures of binaries
call ../../../VerifySignatures.ps1
) ELSE ECHO ----- SKIPPING SIGNATURE VERIFICATION -----

cd %origDir%
goto :eof

:end
15 changes: 15 additions & 0 deletions TcNo-Acc-Switcher-Client/VerifySignatures.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

function RunSign {
param (
[string]$p
)
Write-Host $p

$args = 'sign /tr http://timestamp.sectigo.com?td=sha256 /td SHA256 /fd SHA256 /a "' + $p + '"'
Start-Process "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64\signtool.exe" -ArgumentList $args
Write-Host $args
}

cd "C:\Users\TCNO\Documents\GitHub\TcNo-Acc-Switcher\TcNo-Acc-Switcher-Client\bin\x64\Release\TcNo-Acc-Switcher"

Get-ChildItem TcNo*.exe,TcNo*.dll,runas.exe,_First* -Recurse | ForEach-object {Get-AuthenticodeSignature $_} | Where-Object {$_.status -eq "NotSigned"} | ForEach-Object { RunSign($_.path)}
2 changes: 1 addition & 1 deletion TcNo-Acc-Switcher-Client/sign.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off
echo Signing %1
if "%SIGNTOOL%"=="" set SIGNTOOL=%ProgramFiles(x86)%\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe
if "%SIGNTOOL%"=="" set SIGNTOOL=%ProgramFiles(x86)%\Windows Kits\10\bin\10.0.22000.0\x64\signtool.exe
"%SIGNTOOL%" sign /tr http://timestamp.sectigo.com?td=sha256 /td SHA256 /fd SHA256 /a %1
exit
2 changes: 1 addition & 1 deletion TcNo-Acc-Switcher-Globals/Globals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public partial class Globals
#pragma warning disable CA2211 // Non-constant fields should not be visible - This is necessary due to it being a launch parameter.
public static bool VerboseMode;
#pragma warning restore CA2211 // Non-constant fields should not be visible
public static readonly string Version = "2022-01-30_00";
public static readonly string Version = "2022-01-30_01";

#region INITIALISATION

Expand Down
2 changes: 1 addition & 1 deletion TcNo-Acc-Switcher-Server/Pages/Platforms/Settings.razor
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</div>
}

@if (AppSettings.DisabledPlatforms.Count > 0)
@if (AppSettings.DisabledPlatforms.Count > 0 || BasicPlatforms.PlatformDict.Count != AppSettings.EnabledBasicPlatforms.Count)
{
<div class="SettingsHeader">
<p>@_locale["Settings_ExtraPlatformsDisabled"]</p>
Expand Down

0 comments on commit 05af02a

Please sign in to comment.