Page 2 of 4

Re: Beta 11

Posted: 10 May 2011, 10:22
by Tulon
Misty wrote: Tulon, are you able to advise as to the best way to package up a build for distribution? I'd be able to make a Mac build.
I've never made a Mac build and don't really know how to.

Re: Beta 11

Posted: 10 May 2011, 22:13
by jimboh
I compile ST for Mac OS X using the instructions on the SourceForge web site. Is the resulting binary self-contained, or would someone else need to have Xcode and MacPorts on his computer to use my binary?

Re: Beta 11

Posted: 20 May 2011, 21:42
by n9yty
At one point I had made detailed build notes, and included the support files to build on the Mac. They were included at one point in the repository under the packaging/osx directory. I don't know what the current state is, though, as I never got a scanner built and have had to move on to other projects. But I would start looking there...

EDIT: I downloaded the current git source and after updating my Qt Carbon install to the current 4.7.3 it compiled fine.

Build here: http://www.4shared.com/file/72104Vm1/Sc ... eta11.html
MD5 (ScanTailor-1.0.0beta11.dmg) = ab062b4521a120ac7439aa56b213a01f

However, there was a patch needed for the Mac that Tulon never wanted to include in the source, but is required to prevent a problem with contextual menus in zone operations.

Code: Select all

*** ZoneContextMenuInteraction.h	2011-05-10 17:02:08.000000000 -0500
--- fixed/ZoneContextMenuInteraction.h	2011-05-20 21:17:43.000000000 -0500
***************
*** 131,136 ****
--- 131,139 ----
  	std::auto_ptr<QMenu> m_ptrMenu;
  	int m_highlightedZoneIdx;
  	bool m_menuItemTriggered;
+ #ifdef Q_WS_MAC
+ 	int m_extraDelaysDone;
+ #endif
  };
  
  #endif
*** ZoneContextMenuInteraction.cpp	2011-05-10 17:02:08.000000000 -0500
--- fixed/ZoneContextMenuInteraction.cpp	2011-05-20 21:17:43.000000000 -0500
***************
*** 112,117 ****
--- 112,121 ----
  
  	interaction.capture(m_interaction);
  
+ #ifdef Q_WS_MAC
+ 	m_extraDelaysDone = 0;
+ #endif
+ 
  	int h = 20;
  	int const h_step = 65;
  	int const s = 255 * 64 / 100;
***************
*** 193,198 ****
--- 197,209 ----
  		return;
  	}
  
+ #ifdef Q_WS_MAC
+ 	if (m_extraDelaysDone++ < 1) {
+ 		QTimer::singleShot(200, this, SLOT(menuAboutToHide()));
+ 		return;
+ 	}
+ #endif
+ 
  	InteractionHandler* next_handler = m_rContext.createDefaultInteraction();
  	if (next_handler) {
  		makePeerPreceeder(*next_handler);

Re: Beta 11

Posted: 21 May 2011, 11:16
by Tulon
Actually it was another approach (the one with intercepting clicks and key presses) that was too dirty for my taste. This patch I am willing to apply.
For some reason I am getting rejections trying to do so. Could you make this patch by doing "git diff > file.patch" from the toplevel directory?

Re: Beta 11

Posted: 22 May 2011, 21:11
by jimboh
Will the patch discussed immediately above solve the problem discussed a few posts down in this thread (i.e. the missing feature in the Mac version of QT):

http://www.diybookscanner.org/forum/vie ... ?f=8&t=995 ?

Re: Beta 11

Posted: 23 May 2011, 02:54
by Tulon
jimboh wrote:Will the patch discussed immediately above solve the problem discussed a few posts down in this thread (i.e. the missing feature in the Mac version of QT):
Yes.

Re: Beta 11

Posted: 23 May 2011, 03:02
by jimboh
Tulon wrote:Yes.
Cool!

Re: Beta 11

Posted: 24 May 2011, 14:45
by jimboh
Has the patch been applied? I don't see anything new on the summary / shortlog.

Re: Beta 11

Posted: 24 May 2011, 15:14
by Tulon
jimboh wrote:Has the patch been applied? I don't see anything new on the summary / shortlog.
Not yet. As I said above, I am having problems applying it. I asked n9yty to produce the patch differently, but haven't heard back from him. I'll wait some more, and then I'll try applying it by hand.

Re: Beta 11

Posted: 24 May 2011, 15:36
by jimboh
Thanks for the update. When I see something in the summary / shortlog, I will download the latest snapshot, give it a whirl, and let you know how it works.

BTW, on the issue of font size in the Apply To dialogues, I figured out how to edit the ui files to make the fonts bigger for Mac OS X. I am not a programmer, but I am wondering whether there are instructions somewhere on how to write a patch that would make the changes for compiling under Mac OS X only. Your thoughts?