Skip to content

Commit

Permalink
2024-04-27 - Multiple small fixes
Browse files Browse the repository at this point in the history
- Added Cookies back to Platforms.json for Riot Games. May fix #390
- Using more consistent version naming where possible, #355
  • Loading branch information
TCNOco committed Aug 27, 2024
1 parent 57dd869 commit 78f2773
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 21 deletions.
8 changes: 4 additions & 4 deletions Installer/Installer.rc
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ IDI_ICON1 ICON "..\\TcNo-Acc-Switcher-Tray\\fav
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 2024,08,25,00
PRODUCTVERSION 2024,08,25,00
FILEVERSION 2024,08,27,00
PRODUCTVERSION 2024,08,27,00
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -79,12 +79,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "TroubleChute (Wesley Pyburn)"
VALUE "FileDescription", "Easy redistributable installer for the TcNo Account Switcher"
VALUE "FileVersion", "2024.08.25.00"
VALUE "FileVersion", "2024-08-27_00"
VALUE "InternalName", "_First_R.exe"
VALUE "LegalCopyright", "Copyright � TroubleChute (Wesley Pyburn) 2019-2024"
VALUE "OriginalFilename", "_First_Run_Installer.exe"
VALUE "ProductName", "TcNo Account Switcher - Redistributable Installer"
VALUE "ProductVersion", "2024.08.25.00"
VALUE "ProductVersion", "2024-08-27_00"
END
END
BLOCK "VarFileInfo"
Expand Down
4 changes: 2 additions & 2 deletions TcNo-Acc-Switcher-Client/TcNo-Acc-Switcher-Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<RootNamespace>TcNo_Acc_Switcher_Client</RootNamespace>
<UseWPF>true</UseWPF>
<ApplicationIcon>favicon.ico</ApplicationIcon>
<Version>2024.08.25.00</Version>
<Version>2024.08.27.00</Version>
<Authors>TroubleChute (Wesley Pyburn)</Authors>
<Product>TcNo Account Switcher</Product>
<Copyright>Copyright © TroubleChute (Wesley Pyburn) 2019-2024</Copyright>
<PackageProjectUrl>https://github.com/TcNobo/TcNo-Acc-Switcher</PackageProjectUrl>
<PackageIcon>TcNoAccSw-Icon-100x100.png</PackageIcon>
<RepositoryUrl>https://github.com/TcNobo/TcNo-Acc-Switcher</RepositoryUrl>
<AssemblyName>TcNo-Acc-Switcher</AssemblyName>
<AssemblyVersion>2024.08.25.00</AssemblyVersion>
<AssemblyVersion>2024.08.27.00</AssemblyVersion>
<Platforms>x64</Platforms>
<SignAssembly>false</SignAssembly>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down
2 changes: 1 addition & 1 deletion TcNo-Acc-Switcher-Globals/Globals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,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 = "2024-08-25_00";
public static readonly string Version = "2024-08-27_00";

#region INITIALISATION

Expand Down
1 change: 1 addition & 0 deletions TcNo-Acc-Switcher-Server/Platforms.json
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
],
"PathListToClear": [ "SAME_AS_LOGIN_FILES" ],
"LoginFiles": {
"%LocalAppData%\\Riot Games\\Riot Client\\Data\\Cookies\\": "Cookies",
"%LocalAppData%\\Riot Games\\Riot Client\\Data\\Sessions\\": "Sessions",
"%LocalAppData%\\Riot Games\\Riot Client\\Data": "RiotClientPrivateSettings.yaml",
"%LocalAppData%\\Riot Games\\Riot Client\\Config": "RiotClientSettings.yaml",
Expand Down
6 changes: 3 additions & 3 deletions TcNo-Acc-Switcher-Server/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private static void MoveIfFileExists(string f)
[SupportedOSPlatform("windows")]
public static void UpdateRegistryVersion(string version)
{
version = version.Replace("-", ".").Replace("_", ".");
var dotVersion = version.Replace("-", ".").Replace("_", ".");

string exeDirectory = AppDomain.CurrentDomain.BaseDirectory;
string uninstallExePath = Path.Combine(exeDirectory, "Uninstall TcNo Account Switcher.exe");
Expand All @@ -169,8 +169,8 @@ public static void UpdateRegistryVersion(string version)
if (registryKey == null) continue;

registryKey.SetValue("DisplayVersion", version, RegistryValueKind.String);
registryKey.SetValue("ProductVersion", version, RegistryValueKind.String);
registryKey.SetValue("FileVersion", version, RegistryValueKind.String);
registryKey.SetValue("ProductVersion", dotVersion, RegistryValueKind.String);
registryKey.SetValue("FileVersion", dotVersion, RegistryValueKind.String);
Globals.WriteToLog($"Updated registry key: {key}");
}
catch (Exception ex)
Expand Down
2 changes: 1 addition & 1 deletion TcNo-Acc-Switcher-Server/TcNo-Acc-Switcher-Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>TcNo_Acc_Switcher_Server</RootNamespace>
<ApplicationIcon>wwwroot\favicon.ico</ApplicationIcon>
<Version>2024.08.25.00</Version>
<Version>2024.08.27.00</Version>
<Authors>TroubleChute (Wesley Pyburn)</Authors>
<Product>TcNo Account Switcher - Server</Product>
<Copyright>Copyright © TroubleChute (Wesley Pyburn) 2022</Copyright>
Expand Down
8 changes: 4 additions & 4 deletions _Updater_Wrapper/_Wrapper.rc
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ IDI_ICON1 ICON "..\\TcNo-Acc-Switcher-Tray\\fav
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 2024,08,25,00
PRODUCTVERSION 2024,08,25,00
FILEVERSION 2024,08,27,00
PRODUCTVERSION 2024,08,27,00
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -79,12 +79,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "TroubleChute (Wesley Pyburn)"
VALUE "FileDescription", "TcNo Account Switcher Wrapper"
VALUE "FileVersion", "2024.08.25.00"
VALUE "FileVersion", "2024-08-27_00"
VALUE "InternalName", "_Wrap.exe"
VALUE "LegalCopyright", "Copyright � TroubleChute (Wesley Pyburn) 2019-2024"
VALUE "OriginalFilename", "_Wrapper.exe"
VALUE "ProductName", "TcNo Account Switcher - Wrapper"
VALUE "ProductVersion", "2024.08.25.00"
VALUE "ProductVersion", "2024-08-27_00"
END
END
BLOCK "VarFileInfo"
Expand Down
5 changes: 3 additions & 2 deletions other/NSIS/nsis-build-x64.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
!define LNK_NAME "TcNo Account Switcher.lnk"
!define COMP_NAME "TroubleChute (Wesley Pyburn)"
!define WEB_SITE "https://tcno.co"
!define VERSION "2024.08.25.00"
!define VERSION "2024.08.27.00"
!define DISPLAY_VERSION "2024-08-27_00"
!define COPYRIGHT "TroubleChute (Wesley Pyburn) (C) 2024"
!define DESCRIPTION "TcNo Account Switcher"
!define LICENSE_TXT "..\..\LICENSE"
Expand Down Expand Up @@ -140,7 +141,7 @@ Section "Main files" InstSec
;Create uninstaller
WriteUninstaller "$INSTDIR\${UNINSTALL_EXE}"
WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "TcNo Account Switcher"
WriteRegStr HKLM "${UNINST_KEY}" "DisplayVersion" "${VERSION}"
WriteRegStr HKLM "${UNINST_KEY}" "DisplayVersion" "${DISPLAY_VERSION}"
WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" "$INSTDIR\${UNINSTALL_EXE}"
WriteRegStr HKLM "${UNINST_KEY}" "InstallLocation" "$INSTDIR"
WriteRegStr HKLM "${UNINST_KEY}" "Publisher" "${COMP_NAME}"
Expand Down
12 changes: 8 additions & 4 deletions updateversion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ $nsisFilePath = "other\NSIS\nsis-build-x64.nsi"
$nsisFileContent = Get-Content $nsisFilePath
$nsisReplacement = '!define VERSION "' + $nsisVersion + '"'
$nsisFileContent = $nsisFileContent -replace '^!define VERSION\s+".*"$', $nsisReplacement

$nsisReplacement = '!define DISPLAY_VERSION "' + $dateVersion + '"'
$nsisFileContent = $nsisFileContent -replace '^!define DISPLAY_VERSION\s+".*"$', $nsisReplacement

$nsisFileContent | Set-Content $nsisFilePath

Write-Host "UPDATED NSIS"
Expand All @@ -26,8 +30,8 @@ $rcFileContent = Get-Content $rcFilePath
$rcProductVersionReplacement = ' PRODUCTVERSION ' + $rcVersion
$rcFileVersionReplacement = ' FILEVERSION ' + $rcVersion

$rcValueProductVersionReplacement = ' VALUE "ProductVersion", "' + $nsisVersion + '"'
$rcValueFileVersionReplacement = ' VALUE "FileVersion", "' + $nsisVersion + '"'
$rcValueProductVersionReplacement = ' VALUE "ProductVersion", "' + $dateVersion + '"'
$rcValueFileVersionReplacement = ' VALUE "FileVersion", "' + $dateVersion + '"'

$rcFileContent = $rcFileContent -replace '^\s*PRODUCTVERSION\s+\d+,\d+,\d+,\d+', $rcProductVersionReplacement
$rcFileContent = $rcFileContent -replace '^\s*FILEVERSION\s+\d+,\d+,\d+,\d+', $rcFileVersionReplacement
Expand All @@ -48,8 +52,8 @@ $rcFileContent = Get-Content $rcFilePath
$rcProductVersionReplacement = ' PRODUCTVERSION ' + $rcVersion
$rcFileVersionReplacement = ' FILEVERSION ' + $rcVersion

$rcValueProductVersionReplacement = ' VALUE "ProductVersion", "' + $nsisVersion + '"'
$rcValueFileVersionReplacement = ' VALUE "FileVersion", "' + $nsisVersion + '"'
$rcValueProductVersionReplacement = ' VALUE "ProductVersion", "' + $dateVersion + '"'
$rcValueFileVersionReplacement = ' VALUE "FileVersion", "' + $dateVersion + '"'

$rcFileContent = $rcFileContent -replace '^\s*PRODUCTVERSION\s+\d+,\d+,\d+,\d+', $rcProductVersionReplacement
$rcFileContent = $rcFileContent -replace '^\s*FILEVERSION\s+\d+,\d+,\d+,\d+', $rcFileVersionReplacement
Expand Down

0 comments on commit 78f2773

Please sign in to comment.