12-11-2010, 04:33 PM | #1 |
Calibre Plugins Developer
Posts: 4,694
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Compiling Sigil on Windows 7 64-bit? Errors...
I thought I would have a dabble with tweaking a few things in the Sigil source. I am using:
- Sigil 0.3.2 source code. - cmake 2.8.3 - QT 4.7.1 libraries - VS.Net 2010 - Windows 7 64-bit However I am confused about whether to try to generate a 64-bit or 32-bit build of Sigil. I first tried the 32-bit build (ran cmake for VS.Net 2010) and Sigil compiles fine (built from within VS.Net), however when I try to run the built Sigil exe I get this error: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail. No idea what that error means. The application event log just has the same error information in it that I could see. So close and yet so far... So I thought I would try building it as a 64-bit version instead, creating another bin folder using cmake for VS.Net 64-bit. However that will not compile, giving the following error: error LNK1112: module machine type 'X86' conflicts with target machine type 'x64' D:\Sigil\bin64\src\Sigil\QtWebKitd4.lib(QtWebKitd4 .dll) Sigil I am not a C++ developer in the day job so fumbling around in the dark here. Any gurus out there who could enlighten me as to either of these errors and what I need to do? Many thanks for your help. |
12-12-2010, 10:25 AM | #2 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
For the x86 build you tried, you're using a different version of the CRT in Qt compared to the one you're using with Sigil. Essentially, you downloaded the pre-built Qt binaries from Nokia which are built with VS 2008 and then you tried to run-time link them with a Sigil exe built with VS 2010. That won't work. Build Qt from source using the same compiler you will use when building Sigil.
Same thing goes for your x64 build; the Nokia binaries are x86 and you can't link those to an x64 Sigil. Last edited by Valloric; 12-12-2010 at 10:29 AM. |
Advert | |
|
12-12-2010, 11:05 AM | #3 | |
Calibre Plugins Developer
Posts: 4,694
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
|
|
12-12-2010, 04:08 PM | #4 |
Calibre Plugins Developer
Posts: 4,694
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Ok, what a mission, but I got there in the end.
In case anyone else ends up following in my footsteps (or I reinstall my machine and can't remember) this is what I ended up doing in addition to the software in my first post: 1. Install the Microsoft Direct X SDK 2. Install the Microsoft Windows 7 SDK (for AMD 64, yeah even if your processor is an Intel 64-bit so long as it isn't Itanium) 3. Add the bin folder from your Qt install to your path variable 4. Start a VS.Net 2010 command prompt and go to the Qt directory 5. Run this command line: Code:
configure -platform win32-msvc2010 -opensource -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -nomake tools -nomake examples -nomake demos -nomake docs -nomake translations -ltcg After a fair time to compile (and lots of warnings scrolling by) it should have finished compiling Qt. At this point I was able to go back to my x86 project for VS.net, rebuild it and finally my own build of Sigil.exe runs. Yay! I get one warning in the error list in VS.Net (LNK4068: /MACHINE not specified; defaulting to x86) but since it still works I don't care. Thanks Valloric for identifying the problem and of course for Sigil to dabble with. I was very close to building a VM with VS.Net 2008 in it to save all the hassles but got there in the end. |
12-12-2010, 05:57 PM | #5 | |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
This is unnecessary.
Quote:
The Qt install docs say you need to do this. |
|
Advert | |
|
12-12-2010, 06:11 PM | #6 |
Calibre Plugins Developer
Posts: 4,694
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Well that would have saved a lot of effort .
The Qt install docs told me to install those two SDKs. And when I first ran configure the output said they weren't present so I kind of thought I had to. Ahh well... |
12-12-2010, 06:22 PM | #7 | |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
If configure said the SDK's weren't present, then it's probably because you turned off C++ support when you were installing VS (it's turned on by default). You're a C# dev, aren't you? |
|
12-12-2010, 07:39 PM | #8 |
Calibre Plugins Developer
Posts: 4,694
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Haha, I am indeed a C# man...
My dabbling in C++ is usually "read-only" - but there were a number of things with Sigil that I wanted to tweak that I wanted sooner rather than later. I know you have much bigger fish to fry (like spell checking) and some would possibly never get changed so figured I would dabble with doing them myself as an experiment. FYI the changes I have made so far are: - Ctrl+H always overwrites the Find text with the current selection, rather than only when a fresh Find dialog is opened - Default the Find dropdown to "All Files" rather than "Current File". Drove me mental always changing that (as I had to keep closing the dialog for the previous issue...) - F3 keyboard shortcut to Find Next - Change the keyboard shortcuts for code and book view to something accessible with the left hand without having to look at the keyboard or take hand off the mouse like the current ones do - Automatically open the CSS file rather than the "first html file" (which usually ends up being the title page which is mostly pointless to have open). 9 times out of 10 I open an epub file to manipulate a style first. - Rather than nagging me with a message when I try to find in book view, just switch to code view silently instead. The other couple of things next on the list to look at were: - Menu option/keyboard shortcut to "Close all but this" tab. A context menu on tabs like VS has would be ideal but this option is the one I would use the most anyways. - When renaming files, by default select only the name without the extension like Windows 7/Vista does rather than the whole name. Nice clean well commented code makes it easy for tinkerers like me, thanks dude. |
12-13-2010, 06:46 AM | #9 | ||||||||
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
I'll respond to these here, but if you want to talk about Sigil development in the future, please send me an email. Quote:
Quote:
Yes, that and a Find Previous are on my TODO list. Quote:
Secondly, there are many thousands of people who are used to the current shortcuts. Changing them is not an option. I prefer not getting crucified. Quote:
Quote:
Quote:
Quote:
|
||||||||
12-13-2010, 08:09 AM | #10 |
Calibre Plugins Developer
Posts: 4,694
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Thanks for the reply. I absolutely knew a few of the items would be "controversial" which is why I just tinkered in my copy rather than bother you with noise in your incident tracker etc.
Totally agree that several would best be pushed onto an options dialog when it exists but as I said there was stuff I wanted "now" to tide me over. As well as that "Find in all files" default, it would be nice to have a dropdown option to choose which file gets opened first when you open an epub, to assuage your "LLA rule". Also I totally understand the code view switch on Find thing, it was always going to be a temporary hack until you implement Find on book view which I believe is in your longer term plans. However as it is right now if you make the "mistake" of doing a Find on a tab that happens to be in book view the corresponding dialog and extra clicks got repetitively painful, hence my temporary hack. That last item on my list (renaming) was indeed the only one I haven't implemented as I discovered as you pointed out that it lies with Qt code interaction. I will still have a dabble to see if I can find a way though. As for submitting the changes to you, to be honest they are all only a couple of lines of code each and for a guru familiar with the code like yourself I would doubt more than 15 mins work to do the lot. It only took me a couple of hours and that was with no Sigil or Qt knowledge and minimal C++ skills. My hesitation in submitting them to you comes from the fact that as I am neither a C++ nor a cross platform developer you might spend more time having to review and "fix" my changes than it would take you to do them "properly" yourself. However if you are happy to take that risk then for sure I can redo the ones you showed interest in as patches for you to take a look at. It just so happens that I am taking a break from work for a few months more so some more dabbling with Sigil code from time to time if it helped you out at all to start addressing my "deficiencies" above could be of interest. |
12-13-2010, 08:54 AM | #11 | ||||
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
Quote:
Quote:
And I don't mind spending time on code reviews if that means some else's code will be better for it. As long as the person is willing to learn and shows potential, I'm willing to advise. Quote:
|
||||
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Errors in ePub Created in Sigil | FlooseMan Dave | Sigil | 12 | 08-25-2010 09:01 PM |
HTML Loads To Sigil w/ Errors | FlooseMan Dave | Sigil | 1 | 08-21-2010 10:15 PM |
Windows 7 64-bit Upgrading from 0.6.16 to 0.6.37 problems | ciscoswitch | Calibre | 33 | 04-06-2010 02:35 PM |
Compiling Sigil 0.1.3 on Ubuntu Intrepid | rogue_ronin | Sigil | 7 | 10-04-2009 10:35 AM |
PRS-300 Windows 7 64 bit issues I should know about? | CupofDice | Sony Reader | 10 | 09-22-2009 05:09 PM |