Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-03-2020, 01:57 AM   #1
The_book
Zealot
The_book began at the beginning.
 
Posts: 100
Karma: 10
Join Date: Aug 2019
Device: none
Questions of developing Sigil.

Follow the guide of Building_Sigil_on_Windows.md, I build Sigil in windows. Now I have some problem.
First, need I build Sigil installer and install it in windows every time when I change something? Or I just need to replace the Sigil.exe file?
Second, is here some way to debug Sigil? Like log files about Sigil or a printing function to print what I want in a windows? I want to see some output of my change.
The_book is offline   Reply With Quote
Old 03-03-2020, 02:00 AM   #2
The_book
Zealot
The_book began at the beginning.
 
Posts: 100
Karma: 10
Join Date: Aug 2019
Device: none
I find in recent commits of Sigil that RepoLog seem like what I want. Am I right?
The_book is offline   Reply With Quote
Advert
Old 03-03-2020, 05:51 AM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
No. RepoLog has nothing to do with debug logging. On Windows, create an environment variable named SIGIL_DEBUG_LOGFILE and set it to a path (including the file name itself) where you want debug output to be printed. Then use Qt's qDebug() function to output stuff. There's plenty of examples in Sigil's code. Microsoft makes it nearly impossible to get any console logging happening from a Qt gui application. But I hear some people have luck getting a cygwin/bash prompt to show the stdout/stderr of a running program.

The answer to your previous question is "it depends." If you've changed nothing in any of Sigil's libraries and support files then you might be able to get by with replacing just the Sigil binary. I play it safe, myself. I find the time it takes to install sigil is trivial compared to the painfulness of configuring/compiling Sigil on Windows.

Last edited by DiapDealer; 03-03-2020 at 05:57 AM.
DiapDealer is offline   Reply With Quote
Old 03-03-2020, 09:09 AM   #4
The_book
Zealot
The_book began at the beginning.
 
Posts: 100
Karma: 10
Join Date: Aug 2019
Device: none
Quote:
Originally Posted by DiapDealer View Post
No. RepoLog has nothing to do with debug logging. On Windows, create an environment variable named SIGIL_DEBUG_LOGFILE and set it to a path (including the file name itself) where you want debug output to be printed. Then use Qt's qDebug() function to output stuff. There's plenty of examples in Sigil's code. Microsoft makes it nearly impossible to get any console logging happening from a Qt gui application. But I hear some people have luck getting a cygwin/bash prompt to show the stdout/stderr of a running program.

The answer to your previous question is "it depends." If you've changed nothing in any of Sigil's libraries and support files then you might be able to get by with replacing just the Sigil binary. I play it safe, myself. I find the time it takes to install sigil is trivial compared to the painfulness of configuring/compiling Sigil on Windows.
Thanks, this really helps.
By the way, I find the Building_Sigil_on_Windows.md having some bugs in building 1.1.0. I get everything well before 'nmake makeinstaller' but in 'nmake makeinstaller' I get error result in the end.

[100%] Copying installer files to temporary location...
Warning: Unable to read C:\MyQtx64_WE\Qt5.12.6\mkspecs\qconfig.pri: NMAKE : fatal error U1077: “D:\MyQtx64_WE\Qt5.12.6\bin\windeployqt.exe”: return code “0x1”
Stop.
NMAKE : fatal error U1077: “"D:\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bi n\HostX64\x64\nmake.exe"”: return code “0x2”

And I use the D:\MyQtx64_WE\Qt5.12.6\mkspecs\qconfig.pri, not C:\
Do you know what happened?
The_book is offline   Reply With Quote
Old 03-03-2020, 09:22 AM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by The_book View Post
And I use the D:\MyQtx64_WE\Qt5.12.6\mkspecs\qconfig.pri, not C:\
Do you know what happened?
Yes. The problem is that you're using D:\ and not C:\. You're clearly using my custom pre-compiled version of Qt 5.12.6, so you'll also need to make sure it's installed in the exact same path as I had it so that windeployqt can locate a few things that seem to be hardcoded. That means you need to have my custom Qt installed to C:\MyQtx64_WE\Qt5.12.6\ and not D:\MyQtx64_WE\Qt5.12.6\.

If you want the flexibility of being able to create a Sigil installer from a Qt installed wherever you want, you'll have to either use the stock Qt installer, or compile Qt yourself from source and install it wherever you want.

Last edited by DiapDealer; 03-03-2020 at 09:27 AM.
DiapDealer is offline   Reply With Quote
Advert
Old 03-03-2020, 09:43 AM   #6
The_book
Zealot
The_book began at the beginning.
 
Posts: 100
Karma: 10
Join Date: Aug 2019
Device: none
Quote:
Originally Posted by DiapDealer View Post
Yes. The problem is that you're using D:\ and not C:\. You're clearly using my custom pre-compiled version of Qt 5.12.6, so you'll also need to make sure it's installed in the exact same path as I had it so that windeployqt can locate a few things that seem to be hardcoded. That means you need to have my custom Qt installed to C:\MyQtx64_WE\Qt5.12.6\ and not D:\MyQtx64_WE\Qt5.12.6\.

If you want the flexibility of being able to install Qt anywhere you want, you'll have to either use the stock Qt installer, or compile Qt yourself from source and install it wherever you want.
Ok, after moving folder I successfully build installer. Thanks.
The_book is offline   Reply With Quote
Old 03-03-2020, 12:11 PM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
No problem.

The main reason you have to build and run the Sigil installer after making changes is that by default, Sigil on Windows relies on the bundled Python paths for all of it's embedded Python needs. If Python is not where Sigil thinks it's supposed to be, things break.

But if you're doing development that doesn't involve any embedded Python work or any plugin framework stuff, you can always add -DPKG_SYSTEM_PYTHON=0 to the initial cmake configuration command. That way, so long as the necessary Python installation and the Qt libraries are on the system path, Sigil should be able to be run from the build folder (without installing it). And should you consequently build the installer, Python will not be bundled with Sigil -- but can still make use of the system python for the necessary embedded python requirements (and can still run plugins so long as an external python interpreter is configured).
DiapDealer is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions about Sigil INI GrannyGrump Sigil 19 08-01-2017 08:07 AM
questions about Sigil plugins Gregg Bell Sigil 4 02-05-2017 08:04 PM
Sigil metadata code questions authorava Sigil 2 01-24-2017 03:21 PM
EPub Finished using Sigil - Validate questions ralphiedee ePub 4 06-08-2012 04:42 PM
I'm developing an alternate keyboard for disabled users, and have questions. eewestcoaster Kindle Developer's Corner 8 05-22-2011 11:36 AM


All times are GMT -4. The time now is 07:38 PM.


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