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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-11-2010, 03:33 PM   #1
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
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.
kiwidude is offline   Reply With Quote
Old 12-12-2010, 09:25 AM   #2
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,978
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
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 09:29 AM.
Valloric is offline   Reply With Quote
Old 12-12-2010, 10:05 AM   #3
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Quote:
Originally Posted by Valloric View Post
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.
Awesome, thanks for the help, I shall give that a try.
kiwidude is offline   Reply With Quote
Old 12-12-2010, 03:08 PM   #4
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
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
6. Run nmake

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.
kiwidude is offline   Reply With Quote
Old 12-12-2010, 04:57 PM   #5
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,978
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Quote:
Originally Posted by kiwidude View Post
1. Install the Microsoft Direct X SDK
This is unnecessary.

Quote:
Originally Posted by kiwidude View Post
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)
This actually comes with Visual Studio 2010, which you appear to be using.

Quote:
Originally Posted by kiwidude View Post
3. Add the bin folder from your Qt install to your path variable
The Qt install docs say you need to do this.
Valloric is offline   Reply With Quote
Old 12-12-2010, 05:11 PM   #6
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
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...
kiwidude is offline   Reply With Quote
Old 12-12-2010, 05:22 PM   #7
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,978
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Quote:
Originally Posted by kiwidude View Post
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...
The Qt docs don't assume you have Visual Studio. The SDK's are free; VS costs money.

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?
Valloric is offline   Reply With Quote
Old 12-12-2010, 06:39 PM   #8
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
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.
kiwidude is offline   Reply With Quote
Old 12-13-2010, 05:46 AM   #9
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,978
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Quote:
Originally Posted by kiwidude View Post
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.
Just make a public clone of Sigil and make sure your commits are self-contained (only one bug fix/feature per commit) and I'll be happy to take a look and merge the things I agree with.

I'll respond to these here, but if you want to talk about Sigil development in the future, please send me an email.

Quote:
Originally Posted by kiwidude View Post
- Ctrl+H always overwrites the Find text with the current selection, rather than only when a fresh Find dialog is opened
Good, this is one of the things I've been meaning to get to.

Quote:
Originally Posted by kiwidude View Post
- 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...)
Hm, can't agree here. The dialog default should be an option in the ever-elusive options screen.

Quote:
Originally Posted by kiwidude View Post
- F3 keyboard shortcut to Find Next
Yes, that and a Find Previous are on my TODO list.

Quote:
Originally Posted by kiwidude View Post
- 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
This I can't agree with either for several reasons. First, the "close" shortcuts are IMO too valuable to be spent on View switching actions; there will be other WYSIWYG actions in the future that would benefit more from these.

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:
Originally Posted by kiwidude View Post
- 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.
I understand this is useful to you, but it breaks the Law of least astonishment.

Quote:
Originally Posted by kiwidude View Post
- Rather than nagging me with a message when I try to find in book view, just switch to code view silently instead.
Again, breaks LLA. Also, there's a fair number of Sigil users who never ever want to see the code.

Quote:
Originally Posted by kiwidude View Post
- 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.
This would need to be a tab context menu option like in VS, yes.

Quote:
Originally Posted by kiwidude View Post
- When renaming files, by default select only the name without the extension like Windows 7/Vista does rather than the whole name.
I tried to do this once, but Qt didn't allow the required low-level of control to implement it. I think this could be done by injecting a completely different "editing delegate" (or whatever it's called in Qt docs), but I don't think it's worth the hassle. The new delegate would have to work on all the platforms.

Quote:
Originally Posted by kiwidude View Post
Nice clean well commented code makes it easy for tinkerers like me, thanks dude.
Valloric is offline   Reply With Quote
Old 12-13-2010, 07:09 AM   #10
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
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.
kiwidude is offline   Reply With Quote
Old 12-13-2010, 07:54 AM   #11
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,978
Karma: 350515
Join Date: Feb 2008
Device: Sony Reader PRS 505
Quote:
Originally Posted by kiwidude View Post
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.
Ah, I misunderstood your intent then. I thought you wanted your changes merged in. If you only want to make a few local tweaks, by all means, make the startup procedure rain pink elephants.

Quote:
Originally Posted by kiwidude View Post
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.
The changes are low-hanging fruit, but that's usually the best way to get familiar with a new codebase. Again, I thought you wanted the changes merged in.

Quote:
Originally Posted by kiwidude View Post
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.
Even if you were a C++ "guru" I'd still carefully review any patch, from you or anyone else for that matter. It's one of those "things that need to be done no matter what".

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:
Originally Posted by kiwidude View Post
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.
Seeing as how I'm currently tight on time with university work, having some else working on the code from time to time (even if it's only for the little things; those annoyances do add up) would be great.
Valloric 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
Errors in ePub Created in Sigil FlooseMan Dave Sigil 12 08-25-2010 08:01 PM
HTML Loads To Sigil w/ Errors FlooseMan Dave Sigil 1 08-21-2010 09:15 PM
Windows 7 64-bit Upgrading from 0.6.16 to 0.6.37 problems ciscoswitch Calibre 33 04-06-2010 01:35 PM
Compiling Sigil 0.1.3 on Ubuntu Intrepid rogue_ronin Sigil 7 10-04-2009 09:35 AM
PRS-300 Windows 7 64 bit issues I should know about? CupofDice Sony Reader 10 09-22-2009 04:09 PM


All times are GMT -4. The time now is 10:00 PM.


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