remove broken updater for now

This commit is contained in:
fyr77 2021-05-08 00:04:40 +02:00
parent 85ae027c28
commit b54de3eb36
5 changed files with 56 additions and 32 deletions

View file

@ -9,7 +9,7 @@ namespace EnvyUpdate
public static readonly string exeloc = System.Reflection.Assembly.GetEntryAssembly().Location; public static readonly string exeloc = System.Reflection.Assembly.GetEntryAssembly().Location;
public static readonly string exepath = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\"; public static readonly string exepath = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\";
public static readonly string startmenu = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu); public static readonly string startmenu = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu);
public static readonly float version = 2.7F; public static readonly float version = 2.8F;
public static readonly string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\envyupdate\\"; public static readonly string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\envyupdate\\";
public static readonly string startup = Environment.GetFolderPath(Environment.SpecialFolder.Startup); public static readonly string startup = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
public static readonly string desktopOverride = exepath + "desktop.envy"; public static readonly string desktopOverride = exepath + "desktop.envy";

View file

@ -19,9 +19,7 @@
<Button x:Name="buttonHelp" Content="..." Margin="0,12,10,0" Click="buttonHelp_Click" HorizontalAlignment="Right" Width="20" Height="20" VerticalAlignment="Top" Grid.RowSpan="2"/> <Button x:Name="buttonHelp" Content="..." Margin="0,12,10,0" Click="buttonHelp_Click" HorizontalAlignment="Right" Width="20" Height="20" VerticalAlignment="Top" Grid.RowSpan="2"/>
<TextBlock Margin="10,40,0,0" TextWrapping="Wrap" FontWeight="Bold" Grid.Row="1" HorizontalAlignment="Left" Width="151" Height="16" VerticalAlignment="Top"><Run Text="{x:Static p:Resources.ui_onlinedriver}"/></TextBlock> <TextBlock Margin="10,40,0,0" TextWrapping="Wrap" FontWeight="Bold" Grid.Row="1" HorizontalAlignment="Left" Width="151" Height="16" VerticalAlignment="Top"><Run Text="{x:Static p:Resources.ui_onlinedriver}"/></TextBlock>
<TextBlock x:Name="textblockOnline" HorizontalAlignment="Right" Margin="0,40,10,0" TextWrapping="Wrap" Text="&lt;none&gt;" Width="106" Grid.Row="1" Height="16" VerticalAlignment="Top" TextAlignment="Right"/> <TextBlock x:Name="textblockOnline" HorizontalAlignment="Right" Margin="0,40,10,0" TextWrapping="Wrap" Text="&lt;none&gt;" Width="106" Grid.Row="1" Height="16" VerticalAlignment="Top" TextAlignment="Right"/>
<CheckBox x:Name="chkInstall" Content="{x:Static p:Resources.ui_install}" HorizontalAlignment="Left" Margin="10,83,0,0" IsChecked="False" Unchecked="chkInstall_Unchecked" Checked="chkInstall_Checked" Width="51" Grid.Row="1" Height="16" VerticalAlignment="Top"/>
<Button x:Name="buttonDL" Content="⟱" Margin="0,0,10,10" FontSize="20" Click="buttonDL_Click" Foreground="White" Background="#FF3CDA00" Visibility="Hidden" Grid.Row="1" HorizontalAlignment="Right" Width="30" Height="30" VerticalAlignment="Bottom"/> <Button x:Name="buttonDL" Content="⟱" Margin="0,0,10,10" FontSize="20" Click="buttonDL_Click" Foreground="White" Background="#FF3CDA00" Visibility="Hidden" Grid.Row="1" HorizontalAlignment="Right" Width="30" Height="30" VerticalAlignment="Bottom"/>
<CheckBox x:Name="chkAutostart" Content="{x:Static p:Resources.ui_autostart}" HorizontalAlignment="Left" Margin="10,62,0,0" IsEnabled="False" Checked="chkAutostart_Checked" Unchecked="chkAutostart_Unchecked" Width="69" Grid.Row="1" Height="16" VerticalAlignment="Top"/>
<TextBlock x:Name="textblockGPUName" Margin="10,14,35,0" TextWrapping="Wrap" Text="GPU..." Height="16" VerticalAlignment="Top" TextAlignment="Center" Grid.RowSpan="2" FontWeight="Bold"/> <TextBlock x:Name="textblockGPUName" Margin="10,14,35,0" TextWrapping="Wrap" Text="GPU..." Height="16" VerticalAlignment="Top" TextAlignment="Center" Grid.RowSpan="2" FontWeight="Bold"/>
</Grid> </Grid>
</Window> </Window>

View file

@ -42,12 +42,15 @@ namespace EnvyUpdate
Environment.Exit(1); Environment.Exit(1);
} }
// Set correct ticks // Set correct ticks
/*
if (File.Exists(GlobalVars.startup + "\\EnvyUpdate.lnk")) if (File.Exists(GlobalVars.startup + "\\EnvyUpdate.lnk"))
chkAutostart.IsChecked = true; chkAutostart.IsChecked = true;
if (File.Exists(GlobalVars.appdata + "EnvyUpdate.exe")) if (File.Exists(GlobalVars.appdata + "EnvyUpdate.exe"))
chkInstall.IsChecked = true; chkInstall.IsChecked = true;*/
//ALSO BROKEN
// Check if application is installed and update // Check if application is installed and update
/*
if (GlobalVars.exepath == GlobalVars.appdata) if (GlobalVars.exepath == GlobalVars.appdata)
{ {
try try
@ -63,7 +66,11 @@ namespace EnvyUpdate
} }
// Also set correct ticks. // Also set correct ticks.
chkInstall.IsChecked = true; chkInstall.IsChecked = true;
} }*/
//BROKEN
// Delete installed versions
UninstallAll();
// Check for overrides // Check for overrides
if (File.Exists(GlobalVars.desktopOverride)) if (File.Exists(GlobalVars.desktopOverride))
@ -189,7 +196,7 @@ namespace EnvyUpdate
} }
} }
private void chkInstall_Checked(object sender, RoutedEventArgs e) /*private void chkInstall_Checked(object sender, RoutedEventArgs e)
{ {
if (chkAutostart != null) if (chkAutostart != null)
{ {
@ -247,6 +254,29 @@ namespace EnvyUpdate
{ {
File.Delete(GlobalVars.startup + "\\EnvyUpdate.lnk"); File.Delete(GlobalVars.startup + "\\EnvyUpdate.lnk");
} }
*/
public void UninstallAll()
{
if (File.Exists(GlobalVars.startup + "\\EnvyUpdate.lnk"))
{
File.Delete(GlobalVars.startup + "\\EnvyUpdate.lnk");
}
if (File.Exists(GlobalVars.startmenu + "\\EnvyUpdate.lnk"))
{
File.Delete(GlobalVars.startmenu + "\\EnvyUpdate.lnk");
}
if ((GlobalVars.exepath == GlobalVars.appdata) && File.Exists(GlobalVars.appdata + "EnvyUpdate.exe"))
{
MessageBox.Show("EnvyUpdate must be uninstalled because of an application bug. Please download the most recent version again.");
Util.SelfDelete();
}
else if (Directory.Exists(GlobalVars.appdata))
{
Directory.Delete(GlobalVars.appdata, true);
}
}
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{ {

View file

@ -49,5 +49,5 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.7")] [assembly: AssemblyVersion("2.8")]
[assembly: AssemblyFileVersion("2.7")] [assembly: AssemblyFileVersion("2.8")]

View file

@ -1,3 +1,5 @@
Currently (as of 2.8), EnvyUpdate is portable only, because of a broken installer and updater. This will be changed in a future update to be released soon!
![Logo](https://github.com/fyr77/envyupdate/blob/master/res/banner.png?raw=true) ![Logo](https://github.com/fyr77/envyupdate/blob/master/res/banner.png?raw=true)
# EnvyUpdate # EnvyUpdate
@ -9,31 +11,8 @@
## How to use ## How to use
### 2.0 and later
1. Download the [latest release](https://github.com/fyr77/EnvyUpdate/releases/latest/download/EnvyUpdate.exe) (or as a [.zip](https://github.com/fyr77/EnvyUpdate/releases/latest/download/EnvyUpdate.zip)) and run it. Windows SmartScreen Messages can be safely ignored. They only happen because this project is not digitally signed. 1. Download the [latest release](https://github.com/fyr77/EnvyUpdate/releases/latest/download/EnvyUpdate.exe) (or as a [.zip](https://github.com/fyr77/EnvyUpdate/releases/latest/download/EnvyUpdate.zip)) and run it. Windows SmartScreen Messages can be safely ignored. They only happen because this project is not digitally signed.
2. If you want to install the application, tick "Install". Otherwise it will run in portable mode. 2. Currently (as of 2.8), EnvyUpdate is portable only, because of a broken installer and updater. This will be changed in a future update to be released soon!
### 1.x
1. Download the [latest release](https://github.com/fyr77/EnvyUpdate/releases/latest/download/EnvyUpdate.exe) (or as a [.zip](https://github.com/fyr77/EnvyUpdate/releases/latest/download/EnvyUpdate.zip)) and run it. Windows SmartScreen Messages can be safely ignored. They only happen because this project is not digitally signed.
2. If you want to use the application without saving any settings to your drive, keep the "Portable mode" checkbox checked. Otherwise uncheck it to automatically save your configuration.
3. Install the cookie-txt addon for [Firefox](https://addons.mozilla.org/en-US/firefox/addon/cookies-txt-one-click/) or [Chrome](https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg).
4. Go to the [Nvidia driver download page](https://www.nvidia.com/Download/index.aspx), enter your graphics card model, operating system, etc. and click "Search".
5. On the resulting page, click back in your browser and use the previously installed cookie-txt addon to save your site cookies as a .txt file.
6. Drag this .txt file into the corresponding space inside EnvyUpdate.
7. If everything works correctly, the online driver version should be displayed in the application window.
8. When not in portable mode, you may activate Autostart. This will make the application start everytime Windows boots. This will also install the application itself in your APPDATA folder.
## Uninstalling
### 2.0 and later
Untick "Install". This will delete EnvyUpdate from your system.
### 1.x
Simply download the latest release from the [releases page](https://github.com/fyr77/EnvyUpdate/releases), run it and untick "Autostart". This will remove EnvyUpdate from your system.
## Compatibility ## Compatibility
@ -65,3 +44,20 @@ EnvyUpdate is not a replacement for any of these tools. I will still try to impl
* Newtonsoft.Json: [MIT](https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md) * Newtonsoft.Json: [MIT](https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md)
* Resource Embedder: [MIT](https://github.com/MarcStan/resource-embedder/blob/master/LICENSE) * Resource Embedder: [MIT](https://github.com/MarcStan/resource-embedder/blob/master/LICENSE)
* Icon made by Freepik from www.flaticon.com * Icon made by Freepik from www.flaticon.com
## OLD 1.x Instructions for Archival purposes
### Installing
1. Download the [latest release](https://github.com/fyr77/EnvyUpdate/releases/latest/download/EnvyUpdate.exe) (or as a [.zip](https://github.com/fyr77/EnvyUpdate/releases/latest/download/EnvyUpdate.zip)) and run it. Windows SmartScreen Messages can be safely ignored. They only happen because this project is not digitally signed.
2. If you want to use the application without saving any settings to your drive, keep the "Portable mode" checkbox checked. Otherwise uncheck it to automatically save your configuration.
3. Install the cookie-txt addon for [Firefox](https://addons.mozilla.org/en-US/firefox/addon/cookies-txt-one-click/) or [Chrome](https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg).
4. Go to the [Nvidia driver download page](https://www.nvidia.com/Download/index.aspx), enter your graphics card model, operating system, etc. and click "Search".
5. On the resulting page, click back in your browser and use the previously installed cookie-txt addon to save your site cookies as a .txt file.
6. Drag this .txt file into the corresponding space inside EnvyUpdate.
7. If everything works correctly, the online driver version should be displayed in the application window.
8. When not in portable mode, you may activate Autostart. This will make the application start everytime Windows boots. This will also install the application itself in your APPDATA folder.
### Uninstalling
Simply download the latest release from the [releases page](https://github.com/fyr77/EnvyUpdate/releases), run it and untick "Autostart". This will remove EnvyUpdate from your system.