Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 06-03-2011, 02:28 PM   #1
ymerejo42
Enthusiast
ymerejo42 began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Jun 2011
Device: Leader International Impression i7
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
ymerejo42 is offline   Reply With Quote
Old 06-03-2011, 02:34 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,124
Karma: 5101571
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre used to use NSIS, I abandoned it a long time ago for various reasons.
kovidgoyal is offline   Reply With Quote
 
Enthusiast
Old 06-03-2011, 05:46 PM   #3
ymerejo42
Enthusiast
ymerejo42 began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Jun 2011
Device: Leader International Impression i7
OK, I wasn't aware of that. I was kinda hoping you'd switch, since I hate MSI installers. lol
ymerejo42 is offline   Reply With Quote
Old 06-03-2011, 05:49 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,124
Karma: 5101571
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.
kovidgoyal is offline   Reply With Quote
Old 06-03-2011, 06:10 PM   #5
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
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...
kiwidude is offline   Reply With Quote
Old 06-03-2011, 07:21 PM   #6
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,854
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by kiwidude View Post
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...
Maybe you could create a Calibre updater item in the Linux Systems Menu (I did it manually through the GUI). I simply pasted your command-line setup into a new Run in Terminal menu Item, added an Icon (I used the disk with the 3 Green Nodes).
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.
theducks is offline   Reply With Quote
Old 06-03-2011, 07:31 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,124
Karma: 5101571
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.
kovidgoyal is offline   Reply With Quote
Old 06-04-2011, 01:13 AM   #8
ymerejo42
Enthusiast
ymerejo42 began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Jun 2011
Device: Leader International Impression i7
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.
ymerejo42 is offline   Reply With Quote
Old 06-04-2011, 02:18 AM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,124
Karma: 5101571
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.
kovidgoyal is offline   Reply With Quote
Old 06-04-2011, 02:55 AM   #10
ymerejo42
Enthusiast
ymerejo42 began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Jun 2011
Device: Leader International Impression i7
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.
ymerejo42 is offline   Reply With Quote
Old 06-04-2011, 11:32 AM   #11
ymerejo42
Enthusiast
ymerejo42 began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Jun 2011
Device: Leader International Impression i7
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.
ymerejo42 is offline   Reply With Quote
Old 06-04-2011, 11:54 AM   #12
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,124
Karma: 5101571
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.
kovidgoyal is offline   Reply With Quote
Old 06-04-2011, 12:04 PM   #13
ymerejo42
Enthusiast
ymerejo42 began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Jun 2011
Device: Leader International Impression i7
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?
ymerejo42 is offline   Reply With Quote
Old 06-04-2011, 12:11 PM   #14
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,124
Karma: 5101571
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That's fine.
kovidgoyal is offline   Reply With Quote
Old 06-04-2011, 12:21 PM   #15
ymerejo42
Enthusiast
ymerejo42 began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Jun 2011
Device: Leader International Impression i7
About the C runtime library, it says on the site you linked me to that there's a newer version, should I use it?
ymerejo42 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 08:12 AM.


MobileRead.com is a privately owned, operated and funded community.