07-29-2013, 03:39 PM | #1 |
Junior Member
Posts: 3
Karma: 10
Join Date: Jul 2013
Device: Galaxy Nexus
|
Solution: Calibre AutoUpdater [Auto-Updater]
Dear community
I really like the agile development and short release cycles with user driven updates. This makes Calibre the tool I like. Although there is a pain because of the lacking auto update mechanism. In the last minutes I wrote my own solution wrapped around the calibre portable installer. See commented version below. Probably someone could embed button/link into the update notification which executs a configurable command line command (in this case the .bat path). Kind regards! === REM Auto-Updater for Calibre Portable REM tested on Windows but easily adaptable for other OS, please use proper paths and process kill command REM Preparation REM Download (compile) curl from http://curl.haxx.se/ REM set curlBin to binary path, e.g.: set curlBin=c:/_Portable/Internet/curl-7.22.0-w32/curl.exe REM set tempFile to a unique file with existing parent directory, readable and writable set tempFile=C:/Temp/calibreTemp.exe REM use the entry url of calibre download page (probably test it with your web browser) set staticUrl=http://status.calibre-ebook.com/dist/portable REM choose your installation directory for Calibre, prompts wether existing installation shell be updated or not, avoid the ending slash set targetDir="c:/_Portable/Office/Calibre Portable" REM shuts down calibre instance immediatly if running (you may also use pskill or ps for linux) taskkill -IM calibre.exe /T %curlBin% --url %staticUrl% -L --output %tempFile% %tempFile% %targetDir% del %tempFile% exit Last edited by megamaniac; 07-31-2013 at 03:34 PM. Reason: added the option "/T" to taskkill to kill the hole process subtree (like epub reader instances etc.) |
07-31-2013, 02:21 PM | #2 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Jan 2011
Device: Nook
|
Thanks for this! I'm going to use task scheduler to set it to run every Friday night! i don't have to ever worry about downloading it and installing it anymore. Thank you!
|
Advert | |
|
07-31-2013, 02:32 PM | #3 |
Grand Sorcerer
Posts: 12,160
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
Why not use the documented --shutdown-running-calibre switch to caliobre to shut it down, as opposed to using the brute force approach of killing it?
See http://manual.calibre-ebook.com/cli/calibre.html |
07-31-2013, 03:50 PM | #4 |
Junior Member
Posts: 3
Karma: 10
Join Date: Jul 2013
Device: Galaxy Nexus
|
update
I added the "/T" option to taskkill. Otherwise if e.g. an epub reader instance is in use the calibre-parallel.exe process blocks the update.
@PeterT Did you try these options. In my case none of the CLI options had any effect. @jemkeith Yes I have done it the same way, here some (hopefully useful) hints for scheduling configs: trigger: weekly at night before boot or login action: start program: cmd arguments: /c start /min "" <path-to-bat>/UpdateCalibre.bat condition: connection available config: start if missed You could also add "--no-update-check" to your calibre link but I am not shure if it really works. Last edited by megamaniac; 07-31-2013 at 03:52 PM. |
08-02-2013, 08:50 AM | #5 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Jan 2011
Device: Nook
|
bat for 64 bit
I modified it a little to use the 64 bit calibre and 64 bit curl and to install using the MSI file. You need to change the paths for your computer.
It seemed to work for me. I made a few more changes. Mine works now... It doesn't delete the download but moves it to another directory. Last edited by jemkeith; 08-03-2013 at 11:49 AM. |
Advert | |
|
08-02-2013, 08:55 AM | #6 | |
Enthusiast
Posts: 25
Karma: 10
Join Date: Jan 2011
Device: Nook
|
Quote:
|
|
08-02-2013, 09:47 PM | #7 |
Connoisseur
Posts: 96
Karma: 72130
Join Date: Nov 2008
Location: San Francisco Bay Area, CA, USA
Device: Sony PRS-505, Kindle DX 1st Gen, Kindle Fire 1st Gen
|
Windows already provides a temp folder to each user and sets an environment variable to it called %TEMP%. You should be using that, not creating a folder in your drive's root.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Solution to Calibre in Google Drive | Mattes | Related Tools | 10 | 06-02-2014 05:13 PM |
I need a solution to set default calibre viewer's window | ClientAlive | Calibre | 2 | 02-15-2013 09:21 AM |
iPhone 101: iPhone+Stanza+Calibre (the almost-perfect solution) | ChrisZA | Apple Devices | 236 | 04-25-2011 04:19 AM |
A solution for wirelessly syncing Calibre & NookColor | Quistopher | Devices | 0 | 01-23-2011 05:21 PM |
Calibre not auto-updating | Phonella | Calibre | 4 | 10-22-2009 07:37 AM |