ElPumpo / TinyNvidiaUpdateChecker

Open sourced tool for keeping NVIDIA GPUs updated, featuring fully customizable driver installs for complete control, multi-GPU support, and more!
GNU General Public License v3.0
1.42k stars 56 forks source link

Remove WinRAR requirement for minimal installer #16

Closed SirMarth01 closed 6 years ago

SirMarth01 commented 6 years ago

If WinRAR is required for its ability to create RAR archives, there's no existing alternative.

Otherwise, there are a few options:

EDIT: And now realizing that the problem might not be unRAR but SFX. Entirety of everything above might be useless.

ElPumpo commented 6 years ago

Correction: the drivers e.g 385.41-desktop-win10-64bit-international-whql.exe are inside a 7zip SFX archive. I'll look into alternatives! Damn you do constructive feedback!

SirMarth01 commented 6 years ago

The 7-Zip Extra download offers a command line executable and a DLL. Just pointing 7-Zip to the driver executable was enough to get 7-Zip to extract it on my system, even through the command line version. I can't speak as to how to go about implementing 7-Zip into your program, but it's probably the best way forward.

ElPumpo commented 6 years ago

EDIT: And now realizing that the problem might not be unRAR but SFX. Entirety of everything above might be useless.

haha exactly, seems like I only have 1 choice:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\7-Zip MainConsole.cs#L998 namnlos

SirMarth01 commented 6 years ago

On the one hand, 7-zip is pretty commonly used, I imagine especially among potential users of this program.

On the other hand, forcing the user to install a program that they have to obtain elsewhere to access a feature is also undesirable.

Proposal: offer both options? Ship two ZIP files, one with 7za.exe (7za.dll only handles 7z format; if you planned on using a .dll instead of an .exe, you'll need the regular 7z.dll.) and one without. (Include HTML Agility Pack in both, for convenience.)

EDIT: Fun fact: even if you included the larger 64-bit version of 7za.exe, you'd still be able to fit it all onto a floppy disk. 1440 KiB per floppy disk vs. 1365 KiB for 7za 64-bit, HtmlAgilityPack, and the UpdateChecker.

ElPumpo commented 6 years ago

Ok but who doesn't have either winrar or 7zip on their computer? I even wanted to remove html agility pack because it made the application less portable.

levicki commented 6 years ago

@ElPumpo You should not assume that people have WinRAR and 7-Zip.

If you want to automatically extract the driver why not just use SevenZipSharp, and save both users and yourself the trouble?

https://sevenzipsharp.codeplex.com/

ElPumpo commented 6 years ago

You should not assume that people have WinRAR and 7-Zip well I do..

and as I've already said above, I really don't want to add more libaries that I ship with the application

levicki commented 6 years ago

You are free to do as you wish, but then you will have less people using your application, which defeats the purpose of making it available to everyone in the first place. WinRAR is not free software -- it is shareware, and shareware cannot be used for free past the initial trial period.

ElPumpo commented 6 years ago

TinyNvidiaUpdateChecker v1.9.0 beta 1.zip build with 7zip support! oh i forgot to tell y'all i was working on this :D

berserkwarwolf commented 6 years ago

Thanks @ElPumpo for using the better AND open source alternative !

ElPumpo commented 6 years ago

Important: if the application crashes whilst trying to download htmlagilitypack it's because it isn't released yet on github, and the application assumes that it exists there. I've also updated to the new version of htmlagilitypack so you have to download it manually because I haven't released a version yet with the new libary file! Workaround: download the latest version of htmlagilitypack HtmlAgilityPack.zip

@berserkwarwolf thanks for the feedback! and to correct you I never dropped support for winrar, instead i extended the support. Feel free to post more feedback if you have any!

seagull commented 6 years ago

Would you consider having a download for the 7ZipSharp library in case it is absent, like you do for HTMLAgilityPack? That way you only need to ship a single executable.

MikeZeDev commented 6 years ago

You can always ship 7ZipSharp and HtmlAgilityPack as binary resources and use them dynamically if you are so concerned about libraries.

Or include their source in your own maybe?

It would require more programming but i think its better than downloading them. I am not fan of program downloading libraries, people may argue that is a security problem. Any solution would be better than an already installed program

ElPumpo commented 6 years ago

You know what, I'll have look into shipping the app with the libaries then... But I'm not sure about the license... HAP is licensed under MIT so I think I can include it, 7zipsharp is under LGPL?

levicki commented 6 years ago

@ElPumpo Yes, under LGPL 3.0: http://www.gnu.org/licenses/lgpl.html

In short, to distribute SevenZipSharp you need to:

  1. Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
  2. Accompany the object code with a copy of the GNU GPL and this license document.

In any case, it is better to distribute both AgilityPack and SevenZipSharp because you control the version, new versions may break your program be it intentionally (API change) or unintentionally (bug).

ElPumpo commented 6 years ago

Ok @levicki thanks for the info!

levicki commented 6 years ago

@ElPumpo You are welcome.

grynnan commented 6 years ago

So I was just going to tell ElPumpo about 7-zip, and sevenzipsharp.. I think I don't have to. =P Btw, codeplex is shuting down.. 7-zip extra is also available at sourceforge (Personal note: SF.. Eew!)

ElPumpo commented 6 years ago

Yea why did they not chose github?

ElPumpo commented 6 years ago

So after some research I'm left confused yet again

Why did you recommend me SevenZipSharp?!

I'm not ready to pack 5000 dll files into TNUC, sorry. Unless I find another solution to this, I guess will stay with what I'm already using...

and I still want an answer for:

who doesn't have either winrar or 7zip on their computer?

seagull commented 6 years ago

I have no problem with just including 7z.exe (and the DLLs) with the binary when I distribute it. Would that work? Will the program search its immediate directory for 7z (or if not, could it?)

levicki commented 6 years ago

@ElPumpo Yes, SevenZipSharp project is old and seems abandoned, but it is the only fully functional wrapper around the COM interface from 7z.dll and its LZMA SDK. If you prefer writing your own from scratch be my guest.

As for what is needed for distribution the only thing you need besides SevenZipSharp.dll is 7z.dll which contains actual decompression code. The advantage of this approach is that you can do everything from your own application process.

You have another option and that would be to bundle 7za.exe with your application, then launch it as a process from your code and wait for it to finish, but unless you create pipes for STDIN and STDOUT to communicate with 7za.exe process (which still requires good Windows API knowledge and some marshalling) you won't be able to display the decompression progress, not to mention that launching console apps in a separate process when there is a programatic way of doing decompression is ugly.

As to who doesn't have 7-Zip or WinRAR, the answer is approx. 95% of PC users, because most of them are happy with built-in Windows ZIP support. You can argue that those 95% don't need your program, but I'd say that even those who have 7-Zip don't because they can find and download and extract the driver on their own. For a program to be useful it has to offer a signiicant amount of convenience and this convenience will always be more significant to those who are not tech savvy already.

It's your project anyway, so do as you wish. Hopefully you find my advice at least helpful.

ElPumpo commented 6 years ago

You have another option and that would be to bundle 7za.exe with your application, then launch it as a process from your code and wait for it to finish, but unless you create pipes for STDIN and STDOUT to communicate with 7za.exe process (which still requires good Windows API knowledge and some marshalling) you won't be able to display the decompression progress, not to mention that launching console apps in a separate process when there is a programatic way of doing decompression is ugly.

have you tried out v1.9.0-beta1? it uses 7zG.exe which will show a GUI whilst extracting the content, which is good enough i say.

You can argue that those 95% don't need your program, but I'd say that even those who have 7-Zip don't because they can find and download and extract the driver on their own

Sure thing man, but exactly which files should you extract; and which ones shouldn't you ? 🔢

For a program to be useful it has to offer a signiicant amount of convenience and this convenience will always be more significant to those who are not tech savvy already.

Then I'll say again: for 'minimal install' to be effective, the user must fully uninstall the current drivers using DDU and then use the extracted drivers that TNUC makes. This feature is only for advanced users, and I expect advanced users to have either 7Zip or WinRAR installed.

levicki commented 6 years ago

To answer your questions:

  1. No, I have not tried 1.9.0 beta1 because I don't see it on the releases page here on GitHub.

  2. Extract all files and modify setup.cfg using Notepad to remove telemetry while still allowing the user to install other stuff they need such as PhysX (pretty much required for most games), 3D Vision (in case they have NVIDIA 3D glasses), HDAudio driver (in case they use audio through HDMI). It is not that hard to do that manually for people who are familiar with NVIDIA driver packages.

Anyway, this discussion has just became pointless so I am out. I just wanted to help, sorry if I have disturbed you.

grynnan commented 6 years ago

So after some research I'm left confused yet again

Why did you recommend me SevenZipSharp?!

has not been updated since 2011
    'newest' fork by StevenBonePgh was updated ~1 year ago
still requires 7zip installed (7zip binaries, 7z.dll etc)
NO documentation

Old, yes, but it works. And the docu is good.

I'm not ready to pack 5000 dll files into TNUC, sorry. Unless I find another solution to this, I guess will stay with what I'm already using...

Ehm.. read the docu? =P Nope, not 5000, nor 500 or 50.. more like 5.. or 15 if you want .FAR support (Who uses .far anyway?)

and I still want an answer for:

who doesn't have either winrar or 7zip on their computer?

7zip, because a lot of people doesn't know about it. Winrar, because they use the built in crap in windows.

ElPumpo commented 6 years ago

I'm not going to argue any more about this either, as I've already said the requirement is optional, and only used for the optional feature called 'minimal install' and is only for advanced users.

I have no problem with just including 7z.exe (and the DLLs) with the binary when I distribute it. Would that work? Will the program search its immediate directory for 7z (or if not, could it?)

How about the application if searches for a 7ip directory in the same directory the executable is located in, so you can use 7Zip portable? By default it will check if the program is installed by looking in the registry for the 7zip installer & uninstaller

seagull commented 6 years ago

Works for me!

pulse-wave commented 6 years ago

@ElPumpo I'm glad you're taking in consideration to switch to 7zip way to go! thanks!! Personally I never installed winrar being shareware, plus 7zip is far better at archiving than winrar so it's a win\win :), can't wait to see it implemented in a non beta version thanks!

ElPumpo commented 6 years ago

TinyNvidiaUpdateChecker v1.9.0-beta 2.zip

Two betas have been released in total, next thing would be fully releasing v1.9.0

MrJustMe commented 6 years ago

Hi there

Ok but who doesn't have either winrar or 7zip on their computer?.

I :) I went to test the beta 2 but i stopped when the message for winrar came out, so i finally did not test the beta. Anyway, i think the 7zip option commented before could be the best and for sure i will prefer if you bundle the dll and the config file in the same download. If you finally take this way, how to do this?. Well, i have no idea since i'm not a coder but you have a good example in one of the following links: http://www.peazip.org/peaextractor-unace-unrar-unzip.html Portable versions of the software (direct downloads): Windows All: peaextractor-portable-1.3.WINDOWS.zip Windows 64 bits: peaextractor-portable-1.3.WIN64.zip

Just download one of the portable versions, and look inside the downloaded zip for the folder 7z, That's the way!!. Perhaps you can use an exact copy of that directory with your config file simply adding another text file referring to the Peazip Project or even is not requiered thanks to the GNU LGPL license. Have a good day!. PD Also i recommend peazip instead 7zip for compress and extract stuff, i think is better, you can google some benchmarks between them.

ElPumpo commented 6 years ago

@MrJustMe sure thing man! Adding support for PeaExtractor now! (I also fixed the links in your comment)

Edit But why do you want support for PeaExtractor? It uses 7zip to extract .sfx files anyways

i think is better, you can google some benchmarks between them.

you think, but you don't know. as i said above it uses 7zip, so how can it be any faster?!

Edit 2 Seems like PeaExtractor doesn't support listing the files to be extracted, so I cannot add it - there's nothing I can do. We use inclList.txt to give the extractors a list of the stuff inside the archive we want extracted. PeaZip supported command line arguments