1 Star 0 Fork 0

NaNisNumber / redemption

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Jamroot 7.01 KB
一键复制 编辑 原始数据 按行查看 历史
JAM_INCLUDE_PATH ?= jam ;
#############################
# Internal help (`bjam --help`/`b2 --help`)
#
# # Setting build variables
#
# List with `sed -E 's/.*\[ setvar ([^ ]+).*\] ;/\1/;t;d' jam/defines.jam`
#
# bjam -s FFMPEG_INC_PATH=$HOME/ffmpeg/includes ....
#
# `BOOST_STACKTRACE=1`: (debug only) compile with `boost_stacktrace_backtrace`.
# `REDEMPTION_FILTER_ERROR`: (runtime) Only with `BOOST_STACKTRACE=1`. no backtrace for specific error (see `src/core/error.hpp`). example: `export REDEMPTION_FILTER_ERROR=ERR_TRANSPORT_NO_MORE_DATA,ERR_SEC`.
# `NO_FFMPEG=1`: disable ffmpeg
#
# # Compilation
#
# (Extra `cxx_*` options list with `sed -E 's/^constant jln_[^[]+\[ jln-get-env ([^ ]+) : ([^]]+) \].*/\1 = \2/;t;d' jam/cxxflags.jam`)
#
# Compile executables without tests (as user):
#
# bjam exe libs
#
# and install (as administrator):
#
# bjam install
#
# Binaries are located by default in `/usr/local/bin`.
#
# ## Tests
#
# bjam tests
# bjam tests/utils` all tests in tests/utils
# bjam tests/utils.norec` tests selected by tests/utils/test_*.cpp
#
# Verbose tests:
#
# export REDEMPTION_LOG_PRINT=1
# bjam tests
#
# REDEMPTION_LOG_PRINT=e for error and debug only
# REDEMPTION_LOG_PRINT=d for debug only
# REDEMPTION_LOG_PRINT=w for other than info
#
#############################
include $(JAM_INCLUDE_PATH)/redemption-config.jam ;
include $(JAM_INCLUDE_PATH)/cxxflags.jam ;
include $(JAM_INCLUDE_PATH)/defines.jam ;
include $(JAM_INCLUDE_PATH)/includes.jam ;
include $(JAM_INCLUDE_PATH)/sanitizer.jam ;
include $(JAM_INCLUDE_PATH)/libs.jam ;
project redemption
: requirements
$(REDEMPTION_CXXFLAGS)
$(REDEMPTION_FFMPEG_FLAGS)
$(REDEMPTION_BOOST_STACKTRACE_FLAGS)
$(GCOV)
<cxxflags>-fno-rtti
<toolset>gcc:<cxxflags>-pipe
# <cxx-lto-default>on
# <cxx-stack-protector-default>on # strong, all
# <cxxflags>-fpie
: default-build release
;
include $(JAM_INCLUDE_PATH)/testing-coverage.jam ;
include $(JAM_INCLUDE_PATH)/ocr.jam ;
include $(JAM_INCLUDE_PATH)/redemption-dependencies.jam ;
obj program_options : $(PROGRAM_OPTIONS_SRC_PATH)/program_options.cpp ;
make test_libredrec : libredrec : @test_libredrec : <variant>san:<build>no ;
actions test_libredrec
{
# check is loadable
$(TOOLS_PATH)/redrec rec $(>) -h > /dev/null && :> $(<)
}
include $(REDEMPTION_PUBLIC_PATH)/targets.jam ;
actions gen_targets
{
./tools/bjam/gen_targets.py > targets.jam
./tools/bjam/gen_targets.py src/main/headlessclient.cpp |
sed 's#^obj #add_obj #;t
/^\s*</!d
s/^\s*</requirement_list += </
s/$/ ;/' \
| sort > projects/ClientQtGraphicAPI/redemption_deps.jam
}
explicit targets.jam ;
make targets.jam : : @gen_targets ;
## { test_web_video_mp4
explicit test_web_video_mp4 tests/web_video/test.mp4 generate_video ;
exe generate_video
:
$(REDEMPTION_TEST_PATH)/web_video/generate_video.cpp
src/utils/set_exception_handler_pretty_message.o
:
$(EXE_DEPENDENCIES_NO_SYSLOG)
$(FFMPEG_CXXFLAGS)
<library>libredrec
<library>ffmpeg
<library>png
<library>dl
;
actions run_web_video_mp4 {
set -e
TMP=/tmp/web_video_mp4_test/
VIDEO=$TMP/test.mp4
rm -f "$VIDEO"
mkdir -p $TMP
"$(>)" $VIDEO
cp "$(REDEMPTION_TEST_PATH)/web_video/test.html" "$TMP"
cd $TMP
python -m SimpleHTTPServer 4104 &
xdg-open 'http://0000:4104/test.html'
sleep 3
pkill -P $$
}
make tests/web_video/test.mp4 : generate_video : @run_web_video_mp4 ;
alias test_web_video_mp4 : tests/web_video/test.mp4 ;
## } test_web_video_mp4
explicit
install
instexe
install-bin
install-lib
install-share
install-etc
install-etc-themes
install-etc-ppocr
install-etc-ppocr-latin
install-etc-ppocr-latin-cyrillic
exe
libs
;
alias instexe : install-bin ;
alias install :
install-bin install-lib
install-etc
install-etc-themes
install-etc-ppocr
install-share
;
alias exe : rdpproxy rdpclient rdpinichecker ;
alias libs : libredrec ;
alias ocr_tools : display_learning extract_text ppocr_extract_text ;
alias install-etc-ppocr : install-etc-ppocr-latin install-etc-ppocr-latin-cyrillic ;
install install-bin
: exe
: <install-type>EXE
#<install-dependencies>on
: <location>$(INSTALLDIR)$(BIN_PREFIX)
;
install install-share
: [ glob "$(REDEMPTION_SYS_PATH)/share/rdpproxy/[^.k]*" ]
:
: <location>$(INSTALLDIR)$(SHARE_PREFIX)
;
install install-etc
: [ glob
$(REDEMPTION_ETC_DH_GLOG)
]
:
: <location>$(INSTALLDIR)$(ETC_PREFIX)
;
install install-etc-ppocr-latin
: [ glob $(REDEMPTION_SYS_PATH)/etc/rdpproxy/ppocr.latin/* ]
:
: <location>$(INSTALLDIR)$(ETC_PREFIX)/ppocr.latin
;
install install-etc-ppocr-latin-cyrillic
: [ glob $(REDEMPTION_SYS_PATH)/etc/rdpproxy/ppocr.latin-cyrillic/* ]
:
: <location>$(INSTALLDIR)$(ETC_PREFIX)/ppocr.latin-cyrillic
;
install install-etc-themes
: [ glob $(REDEMPTION_SYS_PATH)/etc/rdpproxy/themes/HOWTO ]
:
: <location>$(INSTALLDIR)$(ETC_PREFIX)/themes
;
install install-lib
: libs
:
: <location>$(INSTALLDIR)$(LIB_PREFIX)
;
exe redrec
:
$(REDEMPTION_SRC_PATH)/main/redrec.cpp
libredrec
:
$(EXE_DEPENDENCIES)
;
## ppocr resources {
exe ppocr_write_glyphs :
$(PPOCR_SRC_PATH)/ppocr/write_glyphs.cpp
ppocr
:
$(EXE_DEPENDENCIES_NO_SYSLOG)
;
exe ppocr_normalize_glyphs :
$(PPOCR_SRC_PATH)/ppocr/normalize_glyphs.cpp
ppocr
:
$(EXE_DEPENDENCIES_NO_SYSLOG)
;
exe ppocr_write_datas :
$(PPOCR_SRC_PATH)/ppocr/write_datas.cpp
ppocr
:
$(EXE_DEPENDENCIES_NO_SYSLOG)
;
actions make_ppocr_resources {
$(PPOCR_MODULE_PATH)/learning "$(>)"
# latin
cp $(PPOCR_MODULE_PATH)/resources/glyphs/normalized-glyphs-latin.txt \
$(REDEMPTION_SYS_PATH)/etc/rdpproxy/ppocr.latin/glyphs.txt
cp $(PPOCR_MODULE_PATH)/resources/datas/latin.txt \
$(REDEMPTION_SYS_PATH)/etc/rdpproxy/ppocr.latin/datas.txt
cp $(PPOCR_MODULE_PATH)/resources/dict_fr.trie \
$(REDEMPTION_SYS_PATH)/etc/rdpproxy/ppocr.latin/dict.trie.txt
cp $(PPOCR_MODULE_PATH)/resources/words_lines-latin.txt \
$(REDEMPTION_SYS_PATH)/etc/rdpproxy/ppocr.latin/words_lines.txt
# latin-cyrillic
cp $(PPOCR_MODULE_PATH)/resources/glyphs/normalized-glyphs-latin-cyrillic.txt \
$(REDEMPTION_SYS_PATH)/etc/rdpproxy/ppocr.latin-cyrillic/glyphs.txt
cp $(PPOCR_MODULE_PATH)/resources/datas/latin-cyrillic.txt \
$(REDEMPTION_SYS_PATH)/etc/rdpproxy/ppocr.latin-cyrillic/datas.txt
cp $(PPOCR_MODULE_PATH)/resources/words_lines-latin-cyrillic.txt \
$(REDEMPTION_SYS_PATH)/etc/rdpproxy/ppocr.latin-cyrillic/words_lines.txt
cp $(PPOCR_MODULE_PATH)/resources/dict_fr.trie \
$(REDEMPTION_SYS_PATH)/etc/rdpproxy/ppocr.latin-cyrillic/dict.trie.txt
}
explicit ppocr_resources ppocr_write_glyphs ppocr_normalize_glyphs ppocr_write_datas ;
make ppocr_resources :
ppocr_write_glyphs
ppocr_normalize_glyphs
ppocr_write_datas
:
@make_ppocr_resources
;
## } ppocr resources
1
https://gitee.com/nan0/redemption.git
git@gitee.com:nan0/redemption.git
nan0
redemption
redemption
master

搜索帮助