From ca7fc1c2d3af0b70ad0e16ea00118a315d1415f2 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Sat, 1 Oct 2022 07:27:11 +0800 Subject: [PATCH] fix: transaltion in macos only existed english A regression from previous changes. --- goldendict.pro | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/goldendict.pro b/goldendict.pro index cc79e20f..22c71c53 100644 --- a/goldendict.pro +++ b/goldendict.pro @@ -217,16 +217,16 @@ mac { CONFIG += link_pkgconfig -!CONFIG( no_macos_universal ) { - LIBS+= -lhunspell - INCLUDEPATH = $${PWD}/maclibs/include - LIBS += -L$${PWD}/maclibs/lib -framework AppKit -framework Carbon -} -else{ - PKGCONFIG += hunspell - INCLUDEPATH = /opt/homebrew/include /usr/local/include - LIBS += -L/opt/homebrew/lib -L/usr/local/lib -framework AppKit -framework Carbon -} + !CONFIG( no_macos_universal ) { + LIBS+= -lhunspell + INCLUDEPATH = $${PWD}/maclibs/include + LIBS += -L$${PWD}/maclibs/lib -framework AppKit -framework Carbon + } + else{ + PKGCONFIG += hunspell + INCLUDEPATH = /opt/homebrew/include /usr/local/include + LIBS += -L/opt/homebrew/lib -L/usr/local/lib -framework AppKit -framework Carbon + } OBJECTIVE_SOURCES += lionsupport.mm \ machotkeywrapper.mm \ @@ -235,23 +235,29 @@ else{ ICON = icons/macicon.icns QMAKE_INFO_PLIST = myInfo.plist -!CONFIG( no_macos_universal ) { - QMAKE_POST_LINK = mkdir -p GoldenDict.app/Contents/Frameworks && \ - cp -nR $${PWD}/maclibs/lib/ GoldenDict.app/Contents/Frameworks/ && \ - mkdir -p GoldenDict.app/Contents/MacOS/help && \ - cp -R $${PWD}/help/*.qch GoldenDict.app/Contents/MacOS/help/ -} -else{ - QMAKE_POST_LINK = mkdir -p GoldenDict.app/Contents/Frameworks && \ - cp -nR $${PWD}/maclibs/lib/libeb.dylib GoldenDict.app/Contents/Frameworks/ && \ - mkdir -p GoldenDict.app/Contents/MacOS/help && \ - cp -R $${PWD}/help/*.qch GoldenDict.app/Contents/MacOS/help/ -} + !CONFIG( no_macos_universal ) { + QMAKE_POST_LINK = mkdir -p GoldenDict.app/Contents/Frameworks && \ + cp -nR $${PWD}/maclibs/lib/ GoldenDict.app/Contents/Frameworks/ && \ + mkdir -p GoldenDict.app/Contents/MacOS/locale && \ + cp -R locale/*.qm GoldenDict.app/Contents/MacOS/locale/ && \ + mkdir -p GoldenDict.app/Contents/MacOS/help && \ + cp -R $${PWD}/help/*.qch GoldenDict.app/Contents/MacOS/help/ + } + else{ + QMAKE_POST_LINK = mkdir -p GoldenDict.app/Contents/Frameworks && \ + cp -nR $${PWD}/maclibs/lib/libeb.dylib GoldenDict.app/Contents/Frameworks/ && \ + mkdir -p GoldenDict.app/Contents/MacOS/locale && \ + cp -R locale/*.qm GoldenDict.app/Contents/MacOS/locale/ && \ + mkdir -p GoldenDict.app/Contents/MacOS/help && \ + cp -R $${PWD}/help/*.qch GoldenDict.app/Contents/MacOS/help/ + } + !CONFIG( no_chinese_conversion_support ) { CONFIG += chinese_conversion_support QMAKE_POST_LINK += && mkdir -p GoldenDict.app/Contents/MacOS/opencc && \ cp -R $${PWD}/opencc/*.* GoldenDict.app/Contents/MacOS/opencc/ } + } DEFINES += PROGRAM_VERSION=\\\"$$VERSION\\\"