Portable Tool for an Ideal Windows Setup
C# activatorbloatware-removalcsharpdebloatdebloaterdisable-servicesmonitoring-systemportableprivacy-toolsregistry-tweakssystem-tuningsystem-utilitytelemetrytweakerwindows-10windows-11windows-debloatwindows-defenderwindows-optimizationwindows-tweaks
-assembly version auto generate & changed checked import file
Greedeksb9f16adf2832
diff --git a/.Source/GTweak/GTweak.csproj b/.Source/GTweak/GTweak.csprojindex 454be785..19f2938c 100644--- a/.Source/GTweak/GTweak.csproj+++ b/.Source/GTweak/GTweak.csproj@@ -15,7 +15,7 @@<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids><WarningLevel>4</WarningLevel><AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>- <Deterministic>true</Deterministic>+ <Deterministic>false</Deterministic><IsWebBootstrapper>false</IsWebBootstrapper><NuGetPackageImportStamp></NuGetPackageImportStamp>@@ -242,6 +242,11 @@<Generator>MSBuild:Compile</Generator><SubType>Designer</SubType></ApplicationDefinition>+ <Compile Include="Properties\AssemblyInfo.cs">+ <AutoGen>True</AutoGen>+ <DesignTime>True</DesignTime>+ <DependentUpon>AssemblyInfo.tt</DependentUpon>+ </Compile><Compile Include="Assets\UserControl\Card.xaml.cs"><DependentUpon>Card.xaml</DependentUpon></Compile>@@ -469,9 +474,6 @@</Page></ItemGroup><ItemGroup>- <Compile Include="Properties\AssemblyInfo.cs">- <SubType>Code</SubType>- </Compile><Compile Include="Properties\Resources.Designer.cs"><AutoGen>True</AutoGen><DesignTime>True</DesignTime>@@ -528,6 +530,15 @@<ItemGroup><Resource Include="GTweak.ico" /></ItemGroup>+ <ItemGroup>+ <Content Include="Properties\AssemblyInfo.tt">+ <Generator>TextTemplatingFileGenerator</Generator>+ <LastGenOutput>AssemblyInfo.cs</LastGenOutput>+ </Content>+ </ItemGroup>+ <ItemGroup>+ <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />+ </ItemGroup><Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /><Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"><PropertyGroup>diff --git a/.Source/GTweak/Properties/AssemblyInfo.cs b/.Source/GTweak/Properties/AssemblyInfo.csindex 77564354..77d969e6 100644--- a/.Source/GTweak/Properties/AssemblyInfo.cs+++ b/.Source/GTweak/Properties/AssemblyInfo.cs@@ -1,21 +1,19 @@-using System.Reflection;+using System.Reflection;using System.Runtime.InteropServices;using System.Windows;-[assembly: AssemblyTitle("GTweak.exe")]-[assembly: AssemblyDescription("Customize Windows to suit your need")]-[assembly: AssemblyConfiguration("")]-[assembly: AssemblyCompany("")]+[assembly: AssemblyTitle("Customize your Windows")]+[assembly: AssemblyDescription("Perfect setup of Windows 10 & Windows 11 with the choice of options you need for better convenience and performance")][assembly: AssemblyProduct("GTweak")]-[assembly: AssemblyCopyright("Copyright © Greedeks 2024")]+[assembly: AssemblyCopyright("Copyright � Greedeks 2024")][assembly: AssemblyTrademark("Greedeks")]-[assembly: AssemblyCulture("")]-[assembly: AssemblyInformationalVersion("Build: 4.100.0")]-[assembly: AssemblyFileVersion("4.100.0")]+[assembly: AssemblyInformationalVersion("Build: 5.0.0")]+[assembly: AssemblyVersion("5.0.27.572")]+[assembly: AssemblyFileVersion("5.0.27.572")][assembly: ComVisible(false)][assembly: ThemeInfo(ResourceDictionaryLocation.None,ResourceDictionaryLocation.SourceAssembly-)]\ No newline at end of file+)]diff --git a/.Source/GTweak/Properties/AssemblyInfo.tt b/.Source/GTweak/Properties/AssemblyInfo.ttnew file mode 100644index 00000000..c2e29b2f--- /dev/null+++ b/.Source/GTweak/Properties/AssemblyInfo.tt@@ -0,0 +1,29 @@+<#@ template hostspecific="true" language="C#" #>+<#@ output extension=".cs" #>+using System.Reflection;+using System.Runtime.InteropServices;+using System.Windows;++[assembly: AssemblyTitle("Customize your Windows")]+[assembly: AssemblyDescription("Perfect setup of Windows 10 & Windows 11 with the choice of options you need for better convenience and performance")]+[assembly: AssemblyProduct("GTweak")]+[assembly: AssemblyCopyright("Copyright � Greedeks 2024")]+[assembly: AssemblyTrademark("Greedeks")]+[assembly: AssemblyInformationalVersion("Build: 5.0.0")]+[assembly: AssemblyVersion("5.<#= GenerateVersion() #>")]+[assembly: AssemblyFileVersion("5.<#= GenerateVersion() #>")]++[assembly: ComVisible(false)]++[assembly: ThemeInfo(+ ResourceDictionaryLocation.None,+ ResourceDictionaryLocation.SourceAssembly+)]+<#++ private string GenerateVersion()+ {+ int major = (int)(DateTime.UtcNow - new DateTime(DateTime.UtcNow.Year, DateTime.UtcNow.Month, DateTime.UtcNow.Day)).TotalSeconds / 1000;+ int revision = (int)(DateTime.UtcNow - DateTime.Now.Date).TotalSeconds % 1000;+ return $"{0}.{major}.{revision}";+ }+#>\ No newline at end of filediff --git a/.Source/GTweak/Utilities/Settings.cs b/.Source/GTweak/Utilities/Settings.csindex c4a62a8d..6ea581a2 100644--- a/.Source/GTweak/Utilities/Settings.cs+++ b/.Source/GTweak/Utilities/Settings.cs@@ -29,6 +29,7 @@ namespace GTweak.Utilitiesinternal static bool _isHiddenIpAddress = false;internal static int PID = 0;+ internal static string currentRelease = (Assembly.GetEntryAssembly() ?? throw new InvalidOperationException()).GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion.Split(' ').Last().Trim();internal static bool IsViewNotification { get => _isViewNotification; set => _isViewNotification = value; }internal static bool IsSoundNotification { get => _isSoundNotification; set => _isSoundNotification = value; }@@ -140,7 +141,7 @@ namespace GTweak.UtilitiesINIManager iniManager = new INIManager(PathConfig);iniManager.Write("GTweak", "Author", "Greedeks");- iniManager.Write("GTweak", "Release", "v4");+ iniManager.Write("GTweak", "Release", currentRelease);iniManager.WriteAll("Confidentiality Tweaks", INIManager.UserTweaksConfidentiality);iniManager.WriteAll("Interface Tweaks", INIManager.UserTweaksInterface);iniManager.WriteAll("Services Tweaks", INIManager.UserTweaksServices);@@ -164,7 +165,7 @@ namespace GTweak.UtilitiesPathConfig = openFileDialog.FileName;INIManager iniManager = new INIManager(PathConfig);- if (iniManager.Read("GTweak", "Author").Contains("Greedeks") && iniManager.Read("GTweak", "Release").Contains("v4"))+ if (iniManager.GetKeysOrValue("GTweak", false).Contains("Greedeks") && iniManager.GetKeysOrValue("GTweak").Contains("Release")){if (File.ReadLines(PathConfig).Any(line => line.Contains("TglButton")) || File.ReadLines(PathConfig).Any(line => line.Contains("Slider")))new ImportWindow(openFileDialog.SafeFileName).ShowDialog();diff --git a/.Source/GTweak/Windows/UpdateWindow.xaml.cs b/.Source/GTweak/Windows/UpdateWindow.xaml.csindex b2d2fa93..f091b65e 100644--- a/.Source/GTweak/Windows/UpdateWindow.xaml.cs+++ b/.Source/GTweak/Windows/UpdateWindow.xaml.cs@@ -2,7 +2,6 @@using System;using System.ComponentModel;using System.Diagnostics;-using System.Linq;using System.Net;using System.Reflection;using System.Windows;@@ -18,7 +17,7 @@ namespace GTweak.Windowspublic UpdateWindow(){InitializeComponent();- CurrentVerison.Text = (Assembly.GetEntryAssembly() ?? throw new InvalidOperationException()).GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion.Split(' ').Last().Trim();+ CurrentVerison.Text = Settings.currentRelease;DownloadVersion.Text = NewVerison.Text = Utilities.Tweaks.SystemData.UtilityСonfiguration.DownloadVersion;}