New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

Added Mac OS X support

General discussion

Re: Added Mac OS X support

Postby chulai » Sun Aug 21, 2011 11:20 pm

I overlooked that the excerpt was specific to 10.4. Talking of that, what do you think it should be the targets OS X platform? According to http://www.trinitydesktop.org/docs/qt4/ ... n-mac.html
10.4 Tiger is carbon-only and 32-bit only. Both PPC/Intel.
With 10.5 Leopard we can build 32-bit carbon or 32/64-bit cocoa. Both PPC/Intel.

I also read that:
10.4 Tiger was released on 2005. Too old if you ask me.
10.5 Leopard was released on 2007. It supports ppc and intel but dropped support for G3 processors.

From the following 2 excerpts I get that If we want to go with the last technology then it should be 64-bit cocoa on intel architecture.

In 2006, Apple begin transitioning from PowerPC (PPC) to Intel (x86) systems.


For Mac OS X 10.6, Apple has started recommending developers to build their applications 64-bit. The main reason is that there is a small speed increase due to the extra registers on Intel CPU's, all their machine offerings have been 64-bit since 2007, and there is a cost for reading all the 32-bit libraries into memory if everything else is 64-bit. If you want to follow this advice, there is only one choice, 64-bit Cocoa.


The other option is to have a 32-bit and 64-bit universal binary with cocoa for both PPC/Intel and targeting OS X 10.5 Leopard and up.

Gosh, in comparison, deploying to Windows and Linux is so easy!

strannik wrote:
chulai wrote:ld: warning: in /usr/local/Cellar/libvorbis/1.3.2/lib/libvorbis.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/Cellar/libogg/1.2.2/lib/libogg.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/Cellar/hunspell/1.3.2/lib/libhunspell-1.3.dylib, file was built for i386 which is not the architecture being linked (x86_64)

It still looks for Brew versions of these libraries. I don't understand why.
As for cross-building Qt apps on your platform for both 32 and 64, it SHOULD be possible. You do have 32/64-bit Cocoa for 10.5/10.6, so the excerpt about 10.4 is irrelevant..
You can even check the directory "build/" for .o files which are generated prior to the error messages:
Code: Select all
goldendict# file build/*.o

They all are built for both architectures!
So, this is really weird.
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: Added Mac OS X support

Postby chulai » Sun Aug 21, 2011 11:25 pm

Can you try adding ppc 32 and 64-bit support and see if you can build GoldenDict?:

contains(QMAKE_HOST.arch, x86_64) {
CONFIG += x86 x86_64 ppc ppc64
} else {
CONFIG += x86
}

I tried this but didn't work:

contains(QMAKE_HOST.arch, x86_64) {
CONFIG += x86 x86_64
} else {
CONFIG += x86 ppc
}
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: Added Mac OS X support

Postby strannik » Mon Aug 22, 2011 5:30 am

Nope, let's dump PPC altogether. I can't compile any third-party libraries for PPC because even Xcode 4 doesn't support it anymore.
strannik
 
Posts: 74
Joined: Mon Oct 19, 2009 12:05 pm

Re: Added Mac OS X support

Postby chulai » Mon Aug 22, 2011 11:51 pm

So that leave us where we were before: 32/64 bit cocoa Intel on OS X 10.5+. I'm ok with it :) If someone wants GoldenDict in a previous OS X he can still build it provided he has some level of programming.

strannik wrote:Nope, let's dump PPC altogether. I can't compile any third-party libraries for PPC because even Xcode 4 doesn't support it anymore.
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: Added Mac OS X support

Postby strannik » Tue Aug 23, 2011 2:47 am

Actually, I can built universal libs to support even PPC if I install Snow Leo and Xcode 3 in VmWare :)
I'm going to try this on a weekend.

UPDATE: as I don't have a proper testing environment, I won't work on ppc/10.4 stuff anymore.
Last edited by strannik on Sat Sep 17, 2011 5:46 pm, edited 1 time in total.
strannik
 
Posts: 74
Joined: Mon Oct 19, 2009 12:05 pm

Re: Added Mac OS X support

Postby strannik » Sat Sep 17, 2011 5:44 pm

Submitted changes to better support Mac OS X 10.6. Hopefully, now everything will build correctly for both architectures on an i386 machine too, and there should be no sluggishness while scrolling.
Tested in Xcode 4 on Lion with
mac {
QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.6.sdk
CONFIG += x86 x86_64

Please check if everything is indeed building and working correctly on Snow Leopard.
Here's the updated app.
strannik
 
Posts: 74
Joined: Mon Oct 19, 2009 12:05 pm

Re: Added Mac OS X support

Postby chulai » Sat Sep 17, 2011 10:39 pm

Don't work for me yet:

...
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -arch i386 -Wall -W -DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/QtXml -I/Library/Frameworks/phonon.framework/Versions/4/Headers -I/usr/include/phonon -I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/usr/include/QtWebKit -I/usr/include -Imaclibs/include -Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild -F/Library/Frameworks -o build/moc_qtsingleapplication.o build/moc_qtsingleapplication.cpp
/Developer/Tools/Qt/moc -DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/QtXml -I/Library/Frameworks/phonon.framework/Versions/4/Headers -I/usr/include/phonon -I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/usr/include/QtWebKit -I/usr/include -Imaclibs/include -Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild -F/Library/Frameworks -D__APPLE__ -D__GNUC__ qtsingleapplication/src/qtlocalpeer.h -o build/moc_qtlocalpeer.cpp
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -arch i386 -Wall -W -DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/QtXml -I/Library/Frameworks/phonon.framework/Versions/4/Headers -I/usr/include/phonon -I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/usr/include/QtWebKit -I/usr/include -Imaclibs/include -Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild -F/Library/Frameworks -o build/moc_qtlocalpeer.o build/moc_qtlocalpeer.cpp
/Developer/Tools/Qt/rcc -name resources resources.qrc -o build/qrc_resources.cpp
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -arch i386 -Wall -W -DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/QtXml -I/Library/Frameworks/phonon.framework/Versions/4/Headers -I/usr/include/phonon -I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/usr/include/QtWebKit -I/usr/include -Imaclibs/include -Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild -F/Library/Frameworks -o build/qrc_resources.o build/qrc_resources.cpp
/Developer/Tools/Qt/rcc -name flags flags.qrc -o build/qrc_flags.cpp
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -arch i386 -Wall -W -DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/QtXml -I/Library/Frameworks/phonon.framework/Versions/4/Headers -I/usr/include/phonon -I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/usr/include/QtWebKit -I/usr/include -Imaclibs/include -Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild -F/Library/Frameworks -o build/qrc_flags.o build/qrc_flags.cpp
g++ -headerpad_max_install_names -arch x86_64 -arch i386 -Xarch_x86_64 -mmacosx-version-min=10.5 -o goldendict.app/Contents/MacOS/goldendict build/folding.o build/main.o build/dictionary.o build/config.o build/sources.o build/mainwindow.o build/utf8.o build/file.o build/bgl_babylon.o build/bgl.o build/initializing.o build/article_netmgr.o build/dictzip.o build/btreeidx.o build/stardict.o build/chunkedstorage.o build/xdxf2html.o build/iconv.o build/lsa.o build/htmlescape.o build/dsl.o build/dsl_details.o build/filetype.o build/fsencoding.o build/groups.o build/groups_widgets.o build/instances.o build/article_maker.o build/scanpopup.o build/articleview.o build/externalviewer.o build/wordfinder.o build/groupcombobox.o build/keyboardstate.o build/mouseover.o build/preferences.o build/mutex.o build/mediawiki.o build/sounddir.o build/hunspell.o build/dictdfiles.o build/audiolink.o build/wstring.o build/wstring_qt.o build/processwrapper.o build/hotkeywrapper.o build/hotkeyedit.o build/langcoder.o build/editdictionaries.o build/loaddictionaries.o build/transliteration.o build/romaji.o build/russiantranslit.o build/german.o build/website.o build/orderandprops.o build/language.o build/dictionarybar.o build/broken_xrecord.o build/history.o build/atomic_rename.o build/articlewebview.o build/zipfile.o build/indexedzip.o build/termination.o build/greektranslit.o build/webmultimediadownload.o build/forvo.o build/country.o build/about.o build/programs.o build/parsecmdline.o build/maintabwidget.o build/mainstatusbar.o build/gdappstyle.o build/qtsingleapplication.o build/qtlocalpeer.o build/moc_mainwindow.o build/moc_dictionary.o build/moc_config.o build/moc_sources.o build/moc_initializing.o build/moc_article_netmgr.o build/moc_groups.o build/moc_groups_widgets.o build/moc_article_maker.o build/moc_scanpopup.o build/moc_articleview.o build/moc_externalviewer.o build/moc_wordfinder.o build/moc_groupcombobox.o build/moc_mouseover.o build/moc_preferences.o build/moc_mediawiki.o build/moc_hotkeywrapper.o build/moc_hotkeyedit.o build/moc_editdictionaries.o build/moc_loaddictionaries.o build/moc_orderandprops.o build/moc_dictionarybar.o build/moc_history.o build/moc_articlewebview.o build/moc_webmultimediadownload.o build/moc_forvo.o build/moc_about.o build/moc_programs.o build/moc_maintabwidget.o build/moc_mainstatusbar.o build/moc_gdappstyle.o build/moc_qtsingleapplication.o build/moc_qtlocalpeer.o build/qrc_resources.o build/qrc_flags.o -F/Library/Frameworks -L/Library/Frameworks -lz -liconv -lvorbisfile -lvorbis -logg -lhunspell-1.3 -Lmaclibs/lib -framework QtWebKit -framework phonon -framework QtDBus -framework QtXml -framework QtCore -framework QtGui -framework QtNetwork
ld: warning: in /usr/local/lib/libvorbisfile.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/lib/libvorbis.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/lib/libogg.dylib, file was built for i386 which is not the architecture being linked (x86_64)
ld: warning: in /usr/local/lib/libhunspell-1.3.dylib, file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
"Hunspell::free_list(char***, int)", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellHeadwordsRequest::suggest(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&)in hunspell.o
HunspellMorpho::(anonymous namespace)::HunspellArticleRequestRunnable::run()in hunspell.o
HunspellMorpho::(anonymous namespace)::HunspellArticleRequestRunnable::run()in hunspell.o
"Hunspell::analyze(char***, char const*)", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellHeadwordsRequest::suggest(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&)in hunspell.o
"Hunspell::~Hunspell()", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellDictionary::~HunspellDictionary()in hunspell.o
HunspellMorpho::(anonymous namespace)::HunspellDictionary::~HunspellDictionary()in hunspell.o
"Hunspell::spell(char const*, int*, char**)", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellPrefixMatchRequestRunnable::run()in hunspell.o
HunspellMorpho::(anonymous namespace)::HunspellArticleRequestRunnable::run()in hunspell.o
"_ov_info", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
"Hunspell::suggest(char***, char const*)", referenced from:
HunspellMorpho::(anonymous namespace)::HunspellArticleRequestRunnable::run()in hunspell.o
"_ov_read", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
"Hunspell::Hunspell(char const*, char const*, char const*)", referenced from:
HunspellMorpho::makeDictionaries(Config::Hunspell const&) in hunspell.o
"Hunspell::get_dic_encoding()", referenced from:
HunspellMorpho::(anonymous namespace)::decodeFromHunspell(Hunspell&, char const*)in hunspell.o
HunspellMorpho::(anonymous namespace)::encodeToHunspell(Hunspell&, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)in hunspell.o
"_ov_open_callbacks", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
"_ov_pcm_seek", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
"_ov_clear", referenced from:
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
Lsa::(anonymous namespace)::LsaDictionary::getResource(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in lsa.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/7u/7uJ+y36XGnyfZ9WQYgmDFk+++TI/-Tmp-//cc1wiyLZ.out (No such file or directory)
make: *** [goldendict.app/Contents/MacOS/goldendict] Error 1
make: Leaving directory `/Users/chulai/Documents/goldendict'
The process "/usr/bin/make" exited with code 2.
Error while building project goldendict (target: Desktop)
When executing build step 'Make'


strannik wrote:Submitted changes to better support Mac OS X 10.6. Hopefully, now everything will build correctly for both architectures on an i386 machine too, and there should be no sluggishness while scrolling.
Tested in Xcode 4 on Lion with
mac {
QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.6.sdk
CONFIG += x86 x86_64

Please check if everything is indeed building and working correctly on Snow Leopard.
Here's the updated app.
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: Added Mac OS X support

Postby strannik » Sun Sep 18, 2011 3:44 am

Can you try these changes, please?
strannik
 
Posts: 74
Joined: Mon Oct 19, 2009 12:05 pm

Re: Added Mac OS X support

Postby chulai » Sun Sep 18, 2011 2:14 pm

Build successfully!

Code: Select all
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -arch i386 -Wall -W -isysroot /Developer/SDKs/MacOSX10.6.sdk -DPROGRAM_VERSION=\"1.0.1+git\" -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_PHONON_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Frameworks/QtXml.framework/Versions/4/Headers -I/usr/include/QtXml -I/Library/Frameworks/phonon.framework/Versions/4/Headers -I/usr/include/phonon -I/Library/Frameworks/QtWebKit.framework/Versions/4/Headers -I/usr/include/QtWebKit -I/usr/include -Imaclibs/include -Iqtsingleapplication/src -I/usr/include/phonon_compat -Ibuild -Ibuild -F/Library/Frameworks -o build/qrc_flags.o build/qrc_flags.cpp
g++ -headerpad_max_install_names -arch x86_64 -arch i386 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk -Xarch_x86_64 -mmacosx-version-min=10.5 -o goldendict.app/Contents/MacOS/goldendict build/folding.o build/main.o build/dictionary.o build/config.o build/sources.o build/mainwindow.o build/utf8.o build/file.o build/bgl_babylon.o build/bgl.o build/initializing.o build/article_netmgr.o build/dictzip.o build/btreeidx.o build/stardict.o build/chunkedstorage.o build/xdxf2html.o build/iconv.o build/lsa.o build/htmlescape.o build/dsl.o build/dsl_details.o build/filetype.o build/fsencoding.o build/groups.o build/groups_widgets.o build/instances.o build/article_maker.o build/scanpopup.o build/articleview.o build/externalviewer.o build/wordfinder.o build/groupcombobox.o build/keyboardstate.o build/mouseover.o build/preferences.o build/mutex.o build/mediawiki.o build/sounddir.o build/hunspell.o build/dictdfiles.o build/audiolink.o build/wstring.o build/wstring_qt.o build/processwrapper.o build/hotkeywrapper.o build/hotkeyedit.o build/langcoder.o build/editdictionaries.o build/loaddictionaries.o build/transliteration.o build/romaji.o build/russiantranslit.o build/german.o build/website.o build/orderandprops.o build/language.o build/dictionarybar.o build/broken_xrecord.o build/history.o build/atomic_rename.o build/articlewebview.o build/zipfile.o build/indexedzip.o build/termination.o build/greektranslit.o build/webmultimediadownload.o build/forvo.o build/country.o build/about.o build/programs.o build/parsecmdline.o build/maintabwidget.o build/mainstatusbar.o build/gdappstyle.o build/qtsingleapplication.o build/qtlocalpeer.o build/moc_mainwindow.o build/moc_dictionary.o build/moc_config.o build/moc_sources.o build/moc_initializing.o build/moc_article_netmgr.o build/moc_groups.o build/moc_groups_widgets.o build/moc_article_maker.o build/moc_scanpopup.o build/moc_articleview.o build/moc_externalviewer.o build/moc_wordfinder.o build/moc_groupcombobox.o build/moc_mouseover.o build/moc_preferences.o build/moc_mediawiki.o build/moc_hotkeywrapper.o build/moc_hotkeyedit.o build/moc_editdictionaries.o build/moc_loaddictionaries.o build/moc_orderandprops.o build/moc_dictionarybar.o build/moc_history.o build/moc_articlewebview.o build/moc_webmultimediadownload.o build/moc_forvo.o build/moc_about.o build/moc_programs.o build/moc_maintabwidget.o build/moc_mainstatusbar.o build/moc_gdappstyle.o build/moc_qtsingleapplication.o build/moc_qtlocalpeer.o build/qrc_resources.o build/qrc_flags.o   -F/Library/Frameworks -L/Library/Frameworks -lz -liconv -lvorbisfile -lvorbis -logg -lhunspell-1.2 -Lmaclibs/lib -framework QtWebKit -framework phonon -framework QtDBus -framework QtXml -framework QtCore -framework QtGui -framework QtNetwork
mkdir -p goldendict.app/Contents/Frameworks & cp maclibs/lib/* goldendict.app/Contents/Frameworks/ &
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
make: Leaving directory `/Users/chulai/Documents/goldendict'
The process "/usr/bin/make" exited normally.


Apparently is 32 and 64-bit binary now as shown by the Terminal commands:

Code: Select all
macs-Mac:MacOS mac$ pwd
/Users/chulai/Documents/goldendict/goldendict.app/Contents/MacOS
macs-Mac:MacOS mac$ otool -L goldendict
goldendict:
   /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
   /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
   @executable_path/../Frameworks/libvorbisfile.dylib (compatibility version 7.0.0, current version 7.4.0)
   @executable_path/../Frameworks/libvorbis.dylib (compatibility version 5.0.0, current version 5.5.0)
   @executable_path/../Frameworks/libogg.dylib (compatibility version 9.0.0, current version 9.0.0)
   @executable_path/../Frameworks/libhunspell-1.2.dylib (compatibility version 1.0.0, current version 1.0.0)
   QtWebKit.framework/Versions/4/QtWebKit (compatibility version 4.7.0, current version 4.7.3)
   phonon.framework/Versions/4/phonon (compatibility version 4.4.0, current version 4.4.0)
   QtDBus.framework/Versions/4/QtDBus (compatibility version 4.7.0, current version 4.7.3)
   QtXml.framework/Versions/4/QtXml (compatibility version 4.7.0, current version 4.7.3)
   QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0, current version 4.7.3)
   QtGui.framework/Versions/4/QtGui (compatibility version 4.7.0, current version 4.7.3)
   QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.7.0, current version 4.7.3)
   /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
   /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 103.0.0)
   /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)
macs-Mac:MacOS mac$ file goldendict
goldendict: Mach-O universal binary with 2 architectures
goldendict (for architecture x86_64):   Mach-O 64-bit executable x86_64
goldendict (for architecture i386):   Mach-O executable i386
macs-Mac:MacOS mac$


But I cannot make it run ok:

Code: Select all
Starting /Users/mac/Documents/goldendict/goldendict.app/Contents/MacOS/goldendict...
Load done
getResource: gdlookup://localhost?blank=1
scheme: gdlookup
host: localhost
getResource: gdlookup://localhost?blank=1
scheme: gdlookup
host: localhost
getResource: gdlookup://localhost?word=Welcome!&group=4294967295
scheme: gdlookup
host: localhost
In-place finish.
====reading 53393 bytes
/Users/chulai/Documents/goldendict/goldendict.app/Contents/MacOS/goldendict exited with code 0

Starting /Users/chulai/Documents/goldendict/goldendict.app/Contents/MacOS/goldendict...
dyld: Library not loaded: @executable_path/../Frameworks/libogg.dylib
  Referenced from: /Users/chulai/Documents/goldendict/goldendict.app/Contents/MacOS/goldendict
  Reason: Incompatible library version: goldendict requires version 9.0.0 or later, but libogg.dylib provides version 8.0.0
The program has unexpectedly finished.
/Users/chulai/Documents/goldendict/goldendict.app/Contents/MacOS/goldendict exited with code 0
/Users/chulai/Documents/goldendict/goldendict.app/Contents/MacOS/goldendict exited with code 0


You are almost there strannik to allow to build a universal binary in a 32-bit OS X! Let me know if I have to try another test. Thanks

strannik wrote:Can you try these changes, please?
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: Added Mac OS X support

Postby strannik » Sun Sep 18, 2011 7:43 pm

Please try this new version.
strannik
 
Posts: 74
Joined: Mon Oct 19, 2009 12:05 pm

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 7 guests