12-19-2019, 04:17 PM | #61 |
Grand Sorcerer
Posts: 6,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
@GitHub gurus, I need some help please.
Windows 10 64bit user. I've tested my plugins for Python3 compatibility as well as I can in the 4.99.2 beta of calibre portable. However one of them does require that I also test it in a Win64 environment. For reasons best known to Microsoft, the MS SAPI functions for text-to-speech don't seem to work the same in Win32 and Win64. To do this I'd like to create a complete new copy of Python3 run from source calibre which doesn't interfere with my normal Python2 run from source calibre. (in case it's relevant, I only ever use run from source as a convenient way of quickly testing not-yet-released features or for having access to python code.) My knowledge and experience of GitHub cloning/pulling is limited to what I read in the calibre user manual "Getting the code", namely, from a CMD window: To clone: Code:
"C:\Program Files\Git\cmd\git" clone git://github.com/kovidgoyal/calibre.git Code:
"C:\Program Files\Git\cmd\git" pull --no-edit Please can you tell me what I need to change to do what's required? Last edited by jackie_w; 12-19-2019 at 04:20 PM. |
12-19-2019, 05:46 PM | #62 |
Deviser
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
|
I always just go to Github for Kovid, go to Calibre, select the Branch of 'py3' (not the default Branch of 'master'), and download the code as a Zip file.
DaltonST Last edited by DaltonST; 12-19-2019 at 05:48 PM. |
Advert | |
|
12-19-2019, 05:50 PM | #63 |
Grand Sorcerer
Posts: 6,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Thank you for replying. But would I be able to keep any changed files up-to-date with some sort of PULL if I did this?
|
12-19-2019, 05:58 PM | #64 |
Deviser
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
|
No, the indicated method is non-Github. To get new files, have to repeat the Zip download.
|
12-19-2019, 06:21 PM | #65 |
Guru
Posts: 921
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
I use Github Desktop. Its a GUI interface for the most common uses for Git. With it you can change branches just with 2 clicks.
|
Advert | |
|
12-19-2019, 06:48 PM | #66 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
@jackie_w,
Use the command: Code:
git checkout py3 You can then switch between checking out master and py3 by repeating the "git checkout" command. ... Github desktop is a very good idea to use if you're not familiar with git. |
12-19-2019, 07:07 PM | #67 | |
Grand Sorcerer
Posts: 6,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
@eschwartz, Switch to it where? In the .bat file which I double-click when I want to run from source? If so, it currently contains 2 lines: Code:
set CALIBRE_DEVELOP_FROM=D:\JS_git_devel\cal\src "c:\program files\calibre2\calibre.exe" Code:
"C:\Program Files\Git\cmd\git" checkout py3 |
|
12-19-2019, 07:14 PM | #68 |
Plugin Developer
Posts: 6,307
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
Has there been any discussion yet about volunteers for the orphan plugins? It would be nice to both avoid duplicating work and cover the common ones.
In addition to my own plugins, I've already posted py3 test versions for a couple and plan to do a few more, since I use them and did the pyqt5 migration for them. Test version posted in thread:
* 'orphan' plugins, IE, not mine. Last edited by JimmXinu; 12-20-2019 at 01:28 PM. Reason: Update list |
12-19-2019, 08:21 PM | #69 | |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
Code:
# download the calibre project git clone https://github.com/kovidgoyal/calibre # make sure you're actually using the correct version of the project by # changing all the files to point to the right development branch git checkout py3 ## profit # run calibre calibre.bat # update calibre by downloading new versions of all source code # this will also update the files on disk according to your currently # configured branch git pull --no-edit Already on 'py3' and nothing will happen. It's a total waste of time. ... To give you a non-git analogy... git clone is like downloading a zip file and extracting it into a new folder "myproject", then creating a new folder called "current", which is a directory link to a hidden folder called "myproject/.hidden/available-versions/master". You always access the project using "current", though. RELEVANT: when you git clone, there is an implied "git checkout master", that is run automatically by git, as part of the cloning process. This is what set your initial version to use. git pull is like downloading a new copy of the zip file, nuking the "myproject" folder, and re-extracting. (git checkout is *not* implicitly run here. In the analogy of the "current" link, your link still exists, and does not need changing.) git checkout py3 is like changing the directory link for "current", to "myproject/.hidden/available-versions/py3", and future git pulls will continue to nuke myproject, update all the .hidden/available-versions/, and leave the "current" directory link intact, still pointing to your preferred version. |
|
12-19-2019, 09:10 PM | #70 |
creator of calibre
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@JimmXinu: That traceback is caused precisely by the code to preserve the clipboard contents on exit, https://bugreports.qt.io/browse/QTBUG-41125
and is now fixed. |
12-20-2019, 12:04 AM | #71 | |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
What you might want to do is do the checkout for each branch in different directories. Then you can have a startup script that sets CALIBRE_DEVELOP_FROM to the appropriate directory and runs the correct binary. That should work to run the beta version of the portable install, but, I haven't tried it yet. |
|
12-20-2019, 10:16 AM | #72 | |
Grand Sorcerer
Posts: 6,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Running a calibre portable 4.99.2 executable just runs my Win64 PC in Win32 mode, so I still can't test what I need to. Is there any way, other than installing the Win64 4.99.2 beta over the top of my Win64 4.6 production version, to get these Win64 tests done? Obviously I'm not eager to mess up my production setup. |
|
12-20-2019, 10:41 AM | #73 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
There is probably a way to tell the MSI installer service to simply extract the contents of the installer, rather than actually putting it in "C:\Program Files\".
If you cannot figure out how to do that, another thing that should work is simply copying the "C:\Program Files\Calibre2\" directory to "C:\Users\Jackie_w\My Documents\", then installing the beta. Run the production version from wherever you copied it to, run the beta by default. Or install the beta, copy that to a secondary location, and then reinstall the production version. |
12-20-2019, 10:54 AM | #74 |
creator of calibre
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Install the beta, copy c:\program files\calibre2 to somewhere else. Uninstall the beta. Install regular calibre. Now run the beta from wherever you copied it.
|
12-20-2019, 10:57 AM | #75 | |
Grand Sorcerer
Posts: 6,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Edit: Sorry, Kovid, didn't see your reply. Last edited by jackie_w; 12-20-2019 at 11:02 AM. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Plugin Devs: Should we include a License or COPYING file? | KevinH | Plugins | 3 | 08-15-2017 01:09 PM |
Attn plugin developers: calibre moving to Qt 5 | kovidgoyal | Plugins | 157 | 01-01-2015 11:22 PM |
Can I develop a plugin in a launguage other than Python? | jamawg | Development | 2 | 06-13-2014 12:38 AM |
Calibre in a Python 3.2 world, attn: Kovid | Kevin McAleavey | Calibre | 8 | 01-09-2012 05:49 PM |
How do I Create a Python Plugin? | Sydney's Mom | Plugins | 25 | 01-27-2010 06:26 AM |