opt: refactor the homebrew macos action (#140)

This commit is contained in:
xiaoyifang 2022-09-08 21:46:17 +08:00 committed by GitHub
parent cd5e5abe4d
commit ab9297c8a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 36 deletions

View file

@ -74,7 +74,11 @@ jobs:
brew install libtiff
brew install libvorbis
brew install hunspell
wget ftp://ftp.sra.co.jp/pub/misc/eb/eb-4.4.3.tar.bz2
tar xvjf eb-4.4.3.tar.bz2
cd eb-4.4.3 && ./configure && make -j 8 && sudo make install && cd ..
#brew install qt # or use official offline installer
brew install xz lzo
brew install pkg-config
brew install create-dmg
- name: compile

View file

@ -67,7 +67,11 @@ jobs:
brew install libtiff
brew install libvorbis --force
brew install hunspell
wget ftp://ftp.sra.co.jp/pub/misc/eb/eb-4.4.3.tar.bz2
tar xvjf eb-4.4.3.tar.bz2
cd eb-4.4.3 && ./configure && make -j 8 && sudo make install && cd ..
#brew install qt # or use official offline installer
brew install xz lzo
brew install pkg-config
- name: compile

View file

@ -72,13 +72,17 @@ jobs:
brew install libtiff
brew install libvorbis --force
brew install hunspell
wget ftp://ftp.sra.co.jp/pub/misc/eb/eb-4.4.3.tar.bz2
tar xvjf eb-4.4.3.tar.bz2
cd eb-4.4.3 && ./configure && make -j 8 && sudo make install && cd ..
#brew install qt # or use official offline installer
brew install xz lzo
brew install pkg-config
brew install create-dmg
- name: compile
run: |
qmake CONFIG+=release CONFIG+=no_macos_universal CONFIG+=zim_support CONFIG+=no_extra_tiff_handler #CONFIG+=no_epwing_support # CONFIG+=no_ffmpeg_player #CONFIG+=no_qtmultimedia_player
make
make -j 8
# # 打包
# - name: package
# run: |

View file

@ -23,12 +23,7 @@
// speed improvements.
#ifdef __BTREE_USE_LZO
#ifndef INCLUDE_LIBRARY_PATH
#include <lzo1x.h>
#else
#include <lzo/lzo1x.h>
#endif
namespace {
struct __LzoInit

View file

@ -64,10 +64,6 @@ DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050F00
DEFINES += MAKE_FFMPEG_PLAYER
}
!CONFIG( no_macos_universal ) {
DEFINES += INCLUDE_LIBRARY_PATH
}
CONFIG += exceptions \
rtti \
stl \
@ -202,13 +198,11 @@ mac {
# You will need to use Xcode 3 and Qt Carbon SDK
# if you want the support for PowerPC and/or Mac OS X 10.4
# CONFIG += x86 x86_64 ppc
!CONFIG( no_macos_universal ) {
LIBS = -lz \
-lbz2 \
-lvorbisfile \
-lvorbis \
-logg \
-lhunspell \
-llzo2
!CONFIG( no_ffmpeg_player ) {
@ -221,28 +215,17 @@ mac {
QT_CONFIG -= no-pkg-config
CONFIG += link_pkgconfig
!CONFIG( no_macos_universal ) {
DEFINES += INCLUDE_LIBRARY_PATH
LIBS+= -lhunspell
INCLUDEPATH = $${PWD}/maclibs/include
LIBS += -L$${PWD}/maclibs/lib -framework AppKit -framework Carbon
}
else{
QT_CONFIG -= no-pkg-config
CONFIG += link_pkgconfig
PKGCONFIG += vorbisfile \
vorbis \
ogg \
lzo2 hunspell
!CONFIG( no_ffmpeg_player ) {
PKGCONFIG += ao \
libavutil \
libavformat \
libavcodec \
libswresample \
}
PKGCONFIG += hunspell
INCLUDEPATH = /opt/homebrew/include /usr/local/include
INCLUDEPATH += $${PWD}/maclibs/include/
LIBS += -L/opt/homebrew/lib -L/usr/local/lib -framework AppKit -framework Carbon
LIBS += -L$${PWD}/maclibs/lib/
}
OBJECTIVE_SOURCES += lionsupport.mm \

View file

@ -22,11 +22,8 @@
#include <errno.h>
#include <zlib.h>
#ifdef INCLUDE_LIBRARY_PATH
#include <lzo/lzo1x.h>
#else
#include <lzo1x.h>
#endif
#include <QtEndian>
#include <QStringList>
#include <QByteArray>