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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-28-2010, 07:54 AM   #1
kgn
Groupie
kgn has learned how to buy an e-book online
 
Posts: 171
Karma: 94
Join Date: May 2010
Location: Brisbane, Australia
Device: Pocketbook 302
Changes to Installer???

Since we are doing so many (very welcome) updates to the Calibre software lately - could we also do a few changes to the installer?

For some reason, it checks for available hard disk space. This takes AGES!! It can be a few minutes, and in my opinion is totally uncalled for. Hard disk space is no longer a concern for anyone, I would suggest.

Also - do not check for the version number. Just install. This allows a user to reinstall an older version if so desired.

Just some ideas....thanks
kgn is offline   Reply With Quote
Old 06-28-2010, 10:02 AM   #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: 43,775
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I certainly don't ask it to check for disk space, that was Microsoft's bright idea and their implementation of it is absolutely ridiculous. Unfortunately, I am stuck using Microsoft software to build the installer because of another crazy decision they made regarding the distribution of visual studio runtimes.

Personally, working on the windows installer gives me a migraine, so I'm not going to touch it anymore. Still if anyone wants to help the code is in

setup/installer/windows/*

(calibre uses WiX to generate the .msi file)
kovidgoyal is offline   Reply With Quote
Old 06-28-2010, 02:28 PM   #3
toddos
Guru
toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.
 
toddos's Avatar
 
Posts: 695
Karma: 822675
Join Date: May 2010
Device: Kobo Aura, Nokia Lumia 920 (Freda)
Quote:
Originally Posted by kovidgoyal View Post
I certainly don't ask it to check for disk space, that was Microsoft's bright idea and their implementation of it is absolutely ridiculous. Unfortunately, I am stuck using Microsoft software to build the installer because of another crazy decision they made regarding the distribution of visual studio runtimes.

Personally, working on the windows installer gives me a migraine, so I'm not going to touch it anymore. Still if anyone wants to help the code is in

setup/installer/windows/*

(calibre uses WiX to generate the .msi file)
MSIs do the file costing for a reason -- by spending some time up front calculating file diffs, the MSI can avoid unpacking/installing files it doesn't need to change. Unfortunately for Calibre, this works poorly when there are a ton of files in the installer (I'm seeing > 4000 files, which is a lot) and that slows down costing. I don't know which will be more efficient -- spending the time to do file costing, or just copying every file whether it's needed or not. I suspect the latter is done anyway during a calibre installation, so FileCost could most likely be disabled.

In wix-template.xml, add a section at the end (before </Product>) like:

Code:
<InstallExecuteSequence>
    <FileCost Suppress="yes" />
</InstallExecuteSequence>
You might have to do the same for <InstallUISequence />, <AdminExecuteSequence />, and <AdminUISequence />, but I'm not sure. I'd hope <InstallExecuteSequence /> would take care of it. Also note that this is completely untested but should get people moving in the right direction if someone is interested enough to make this change.
toddos is offline   Reply With Quote
Old 06-28-2010, 03:27 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: 43,775
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Thanks for the tip, I'll test it.
kovidgoyal is offline   Reply With Quote
Old 06-28-2010, 03:47 PM   #5
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: 43,775
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Actually thinking about it a little I don't think its the file costing, per se. The disk space calculation doesn't take any time for a new install (you can verify this by uninstalling and the re-installing calibre). I think what's happening is that windows installer is comparing all the individual .pyo files to see which need to be updated, and then calculating diskspace based on that. You know how to suppress that?
kovidgoyal is offline   Reply With Quote
Old 06-28-2010, 03:54 PM   #6
toddos
Guru
toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.
 
toddos's Avatar
 
Posts: 695
Karma: 822675
Join Date: May 2010
Device: Kobo Aura, Nokia Lumia 920 (Freda)
Quote:
Originally Posted by kovidgoyal View Post
Actually thinking about it a little I don't think its the file costing, per se. The disk space calculation doesn't take any time for a new install (you can verify this by uninstalling and the re-installing calibre). I think what's happening is that windows installer is comparing all the individual .pyo files to see which need to be updated, and then calculating diskspace based on that. You know how to suppress that?
That's filecosting. It's checking the local filesystem against the files in the MSI and determining which ones need to be updated. Disabling file costing should disable that check and cause the MSI to just straight-up copy every file in its package.
toddos is offline   Reply With Quote
Old 06-28-2010, 04:28 PM   #7
kgn
Groupie
kgn has learned how to buy an e-book online
 
Posts: 171
Karma: 94
Join Date: May 2010
Location: Brisbane, Australia
Device: Pocketbook 302
Quote:
Originally Posted by kovidgoyal View Post
I certainly don't ask it to check for disk space, that was Microsoft's bright idea and their implementation of it is absolutely ridiculous.
Understood. One of the reasons I will never use an MSI based installer. I develop using Delphi and quite understand your frustration with Microsoft!
kgn is offline   Reply With Quote
Old 06-28-2010, 04:44 PM   #8
toddos
Guru
toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.
 
toddos's Avatar
 
Posts: 695
Karma: 822675
Join Date: May 2010
Device: Kobo Aura, Nokia Lumia 920 (Freda)
Quote:
Originally Posted by kgn View Post
Understood. One of the reasons I will never use an MSI based installer. I develop using Delphi and quite understand your frustration with Microsoft!
Why not? MSI-based installers are as customizable as you want them to be, with an open-source framework for building them (WIX). They get you nice standard behaviors (install/repair/upgrade/uninstall) easily integrated into the Add/Remove Programs control panel, and are fully supported by Microsoft. Sure, they can be arcane but that's where 3rd parties often step in and try to make things nicer.

I'm not trying to knock Kovid here. I realize he's a Linux developer, not Windows, so I wouldn't expect or even encourage him to learn the ins and outs of WIX and MSIs. That's where the community can step in. People like me, who've been working with WIX for the last ~10 years (yes, I work at Microsoft, and we were using WIX for years before it was released as a public open source project). Hopefully my guidance above helps, and if I ever get any free time I may go ahead and sync up my calibre sources and have a go at modifying the installer myself.

Last edited by toddos; 06-28-2010 at 04:49 PM.
toddos is offline   Reply With Quote
Old 06-28-2010, 04:57 PM   #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: 43,775
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by toddos View Post
That's filecosting. It's checking the local filesystem against the files in the MSI and determining which ones need to be updated. Disabling file costing should disable that check and cause the MSI to just straight-up copy every file in its package.
Ah, for some reason I was under the impression that the file diffs would be separate (in the sense that they would happen even if costing was suppresed) from the costing, but perhaps not. I'll try it and see.
kovidgoyal is offline   Reply With Quote
Old 06-28-2010, 06:03 PM   #10
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: 43,775
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I tried adding the following as the last entries before product
Code:
                <InstallExecuteSequence>
                    <FileCost Suppress="yes" />
                </InstallExecuteSequence>
                <InstallUISequence>
                    <FileCost Suppress="yes" />
                </InstallUISequence>
                <AdminExecuteSequence>
                    <FileCost Suppress="yes" />
                </AdminExecuteSequence>
                <AdminUISequence>
                    <FileCost Suppress="yes" />
                </AdminUISequence>
I got the following warnings from WiX

Code:
C:\cygwin\home\kovid\build\calibre\build\wix\calibre.wxs(4707) : warning LGHT1008 : The action 'FileCost' in the InstallExecuteSequence table is being suppressed.
C:\cygwin\home\kovid\build\calibre\build\wix\calibre.wxs(4710) : warning LGHT1008 : The action 'FileCost' in the InstallUISequence table is being suppressed.
C:\cygwin\home\kovid\build\calibre\build\wix\calibre.wxs(4713) : warning LGHT1008 : The action 'FileCost' in the AdminExecuteSequence table is being suppressed.
C:\cygwin\home\kovid\build\calibre\build\wix\calibre.wxs(4716) : warning LGHT1008 : The action 'FileCost' in the AdminUISequence table is being suppressed.
The checking space requirements action seems to have decreased in duration (took about 30secs as opposed to a couple of minutes). I would have thought it would go down to almost zero, but...

I'll leave it in, hopefully there wont be any nasty side effects. In a system as byzantine as windows installer, how is one supposed to know if there are going to be side-effects?
kovidgoyal is offline   Reply With Quote
Old 06-28-2010, 06:33 PM   #11
toddos
Guru
toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.
 
toddos's Avatar
 
Posts: 695
Karma: 822675
Join Date: May 2010
Device: Kobo Aura, Nokia Lumia 920 (Freda)
Kovid, can you send me a log of the msi output? Run the msi from an administrator command line using "msiexec /i calibre.msi /l*v logfile.txt" and then share logfile.txt. That will create a very large, verbose log of everything the installer is doing, from which we should be able to track down what else is taking a long time, whether FileCost is still running (it might be that we missed a place to suppress it, such that it still runs and what was taking so long before was not that FileCost was running but that it was running N times), etc.

Last edited by toddos; 06-28-2010 at 11:18 PM.
toddos is offline   Reply With Quote
Old 06-28-2010, 06:50 PM   #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: 43,775
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Here you go (this time the disk space check took only about 10secs)

A 17MB logfile, and I though calibre generated verbose logs
Attached Files
File Type: zip logfile.zip (929.3 KB, 375 views)
kovidgoyal is offline   Reply With Quote
Old 06-28-2010, 06:54 PM   #13
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: 43,775
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Interestingly, I noticed that the used diskspace for calibre in the add/remove programs decreased to the size of the installer (~30MB)
kovidgoyal is offline   Reply With Quote
Old 06-28-2010, 07:05 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: 43,775
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
In case you want to run the modified installer yourself, it's available here:

http://calibre-ebook.com/downloads/b...ibre-0.7.6.msi

The current and past versions installers are available from sourceforge
kovidgoyal is offline   Reply With Quote
Old 06-28-2010, 07:10 PM   #15
toddos
Guru
toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.toddos ought to be getting tired of karma fortunes by now.
 
toddos's Avatar
 
Posts: 695
Karma: 822675
Join Date: May 2010
Device: Kobo Aura, Nokia Lumia 920 (Freda)
Thanks. I'll parse through this and see what I can figure out. I've also got a source enlistment up and running, but can't quite seem to figure out how to generate my own MSI (the wiki pages are focused on actual Calibre development and how to run Calibre from source, not how to run a build and generate an installer).
toddos 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
Installer for Reader shmish Sony Reader 6 09-01-2010 01:47 PM
New Inept Installer.... Voltare ePub 13 05-04-2010 08:28 PM
Installer partition Mike_73 Sony Reader 0 03-12-2010 03:56 PM
Windows Installer? radamo Calibre 4 12-27-2009 08:09 AM
6.17 installer not executable?? petercreasey Calibre 3 10-13-2009 05:28 PM


All times are GMT -4. The time now is 12:06 PM.


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