![]() |
#1 |
Enthusiast
![]() Posts: 37
Karma: 10
Join Date: Jun 2011
Location: WV, USA
Device: Amazon Fire HD 10 (9th Generation)
|
More a question than a hack...
Just curious, since it even mentions in the new release that the installer is slow, why not use NSIS? I personally use it for making installers of helpful utilities, it works great in my experience.
It hasn't been updated for a while, but as far as I can tell, that's primarily because there's been no need. Thanks for a great program for organizing my ebooks, and for letting me access them anywhere. Keep up the good work. Last edited by ymerejo42; 06-03-2011 at 02:28 PM. Reason: Minor spelling correction |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,216
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
calibre used to use NSIS, I abandoned it a long time ago for various reasons.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() Posts: 37
Karma: 10
Join Date: Jun 2011
Location: WV, USA
Device: Amazon Fire HD 10 (9th Generation)
|
OK, I wasn't aware of that. I was kinda hoping you'd switch, since I hate MSI installers. lol
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,216
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I agree, .msi has got to be the worst technology I have ever used for building an installer. The only good thing about it is that it is the most robust in terms of installation failures.
|
![]() |
![]() |
![]() |
#5 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,722
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
So Kovid - I know you love to slag off MS over their installers (I'm neutral, they don't bother me that much) - but surely Linux isn't exactly paving the way of "how things should be done"? I mean, every day there are posts from people saying how their xyz distro version of Calibre doesn't work, and I've seen comments posted about how it is "impossible" to package Calibre in some Distros...
![]() |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,914
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Now I click, type in the sudo password, Enter Enter and fetch some coffee : ![]() I assume you know how to get the installer to set this up programatically. No need for repositories. |
|
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,216
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It took me 3 hours to make the linux installer vs. 3 days for the .msi (and I had to learn a whole new set of extremely poorly designed and documented tools just to make the installer). Whereas on linux, I just used a simple python script, the same language that calibre is written in. As for calibre not working on linux, thats usually because of porrly implemented distro packages, as long as people stick to the official one, they are usually fine.
And despite using two whole frameworks for the .msi, my simple python script for linux works, much better. Though I have to say that in the installer tech competition, OS X wins. |
![]() |
![]() |
![]() |
#8 |
Enthusiast
![]() Posts: 37
Karma: 10
Join Date: Jun 2011
Location: WV, USA
Device: Amazon Fire HD 10 (9th Generation)
|
Kovid, I'd be more than happy to create an NSIS script for you, if you're willing to work with me on what needs to go where, and what registry changes need to be made. I work with it on a semi-regular basis, and what I don't know I can usually find out.
|
![]() |
![]() |
![]() |
#9 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,216
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Thanks for the offer, calibre is fully self contained, except for the installation of an MSVC C runtime in the winsxs folder. It also does not use the registry at all. The .msi installer however does use the registry.
The first hurdle you have to cross is finding the calibre installation directory. Searching for calibre.exe and calibre-launcher.dll should be sufficient. Newer versions of the calibre installer write the installdir into HKLM\Software\calibre, but you cannot depend on that as people might be upgrading from an older release. Next is the installation of the c runtime in the winsxs folder, the msi uses a merge module provided by Microsoft for that. Next, you have to figure out how to add the calibre installation to the PATH, create a desktop shortcut and start menu items. Next, you have to create the uninstaller and add an entry in add/remove programs. Next the final screen of the installer should be able to launch calibre with properly dropped privileges. Finally, I'd like the installer to use LZX compression or something equivalent, as calibre is downloaded *a lot* and minimizing bandwidth usage is important. If you can figure out how to do all of that with NSIS, I'll be delighted to drop the .msi Here's a link to the c runtime redistributable: http://www.microsoft.com/downloads/e...displaylang=en I dont know if the exe is capable of installing in silent mode, I dont want a sub installer popping up. To build a calibre installer, all you have to do is package up the calibre install directory, it is self contained. |
![]() |
![]() |
![]() |
#10 |
Enthusiast
![]() Posts: 37
Karma: 10
Join Date: Jun 2011
Location: WV, USA
Device: Amazon Fire HD 10 (9th Generation)
|
I've made installers that do all of that except the C runtime, so I'll look into that tomorrow (it's 3am my time right now) and see what I can find out.
I'm fairly certain that NSIS can do a silent install of another program, so that shouldn't be too hard. Compression is always something I use, and in fact I always have NSIS compress it every way it can then tell me which made the smallest installer, it's usually lzma. |
![]() |
![]() |
![]() |
#11 |
Enthusiast
![]() Posts: 37
Karma: 10
Join Date: Jun 2011
Location: WV, USA
Device: Amazon Fire HD 10 (9th Generation)
|
OK, in regards to finding an old installation, was there ever any version of calibre that allowed the user to change the path when installing? If not, it should be trivial to find, since it would be in some variant of C:\Program Files.
Also, would you be willing to make it optional to install a shortcut on the Desktop, with it defaulted to "Yes"? Some people (like myself, to be honest) try to keep their Desktop as clean as possible. |
![]() |
![]() |
![]() |
#12 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,216
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
calibre has always allowed people to install anywhere they choose. And yes all three features (desktop icon/start menu folders/adding to path) must be optional, they are optional in the current installer by clicking the advanced button.
Couple more things I thought of: 1) Show the GPL license and have an accept checkbox for it (the license text is in the calibre source tree in txt and rtf formats) 2) Have a minimum amount of clicking Next as I hate that about installers. Ideally it would be like the current installer where you either click install which installs everything with the defaults or previously used settings and an "Advanced" button that allows you to customize the installation path and the other three options. |
![]() |
![]() |
![]() |
#13 |
Enthusiast
![]() Posts: 37
Karma: 10
Join Date: Jun 2011
Location: WV, USA
Device: Amazon Fire HD 10 (9th Generation)
|
I'll look into the Advanced button, because I hadn't noticed it. It had slightly annoyed me that it always installed a Desktop icon without asking, guess that will teach me to read buttons better.
I'd already noticed the license, I had it insert a license page, the user has to click a button, it's labeled "I Agree" instead of "Next". Is that sufficient? |
![]() |
![]() |
![]() |
#14 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,216
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That's fine.
|
![]() |
![]() |
![]() |
#15 |
Enthusiast
![]() Posts: 37
Karma: 10
Join Date: Jun 2011
Location: WV, USA
Device: Amazon Fire HD 10 (9th Generation)
|
About the C runtime library, it says on the site you linked me to that there's a newer version, should I use it?
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Paid Hack Request: Photo Slideshow Hack for Kindle 3 | chmreader | Kindle Developer's Corner | 0 | 05-25-2011 01:24 PM |
Question about the font hack | jdomingos76 | Kindle Developer's Corner | 2 | 03-17-2011 09:00 PM |
Book titles hack? Time delay hack? | re838uk | Sony Reader | 0 | 10-08-2009 05:29 AM |
Unicode Fonts Hack question | zdes | Kindle Developer's Corner | 1 | 05-07-2009 02:45 PM |
Hack Attack! Esquire wants us to hack their e-paper cover | TadW | News | 26 | 10-22-2008 03:51 AM |