mirror of
https://github.com/ONLYOFFICE/build_tools.git
synced 2026-02-10 20:45:38 +08:00
developing...
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ out/
|
||||
makefiles/
|
||||
.qmake.stash
|
||||
config
|
||||
**/__pycache__
|
||||
|
||||
@ -1,82 +0,0 @@
|
||||
TEMPLATE=aux
|
||||
|
||||
include($$PWD/../core/Common/base.pri)
|
||||
include($$PWD/scripts/common.pri)
|
||||
|
||||
MAKEFILE=$$PWD/makefiles/build_clean.makefile_$$CORE_BUILDS_PLATFORM_PREFIX
|
||||
|
||||
OO_OS = $$(OS_DEPLOY)
|
||||
isEmpty(OO_OS) {
|
||||
PLATFORMS = \
|
||||
win_64 \
|
||||
win_32 \
|
||||
win_64_xp \
|
||||
win_32_xp \
|
||||
linux_64 \
|
||||
linux_32 \
|
||||
mac_64
|
||||
|
||||
OO_BRANDING_SUFFIX = $$(OO_BRANDING)
|
||||
!isEmpty(OO_BRANDING_SUFFIX) {
|
||||
PLATFORMS += \
|
||||
win_64$$OO_BRANDING_SUFFIX \
|
||||
win_32$$OO_BRANDING_SUFFIX \
|
||||
win_64_xp$$OO_BRANDING_SUFFIX \
|
||||
win_32_xp$$OO_BRANDING_SUFFIX \
|
||||
linux_64$$OO_BRANDING_SUFFIX \
|
||||
linux_32$$OO_BRANDING_SUFFIX \
|
||||
mac_64$$OO_BRANDING_SUFFIX
|
||||
}
|
||||
} else {
|
||||
build_xp {
|
||||
OO_OS=$$join(OO_OS, OO_OS, "", "_xp")
|
||||
}
|
||||
|
||||
PLATFORMS = $$OO_OS
|
||||
|
||||
OO_BRANDING_SUFFIX = $$(OO_BRANDING)
|
||||
!isEmpty(OO_BRANDING_SUFFIX) {
|
||||
PLATFORMS += \
|
||||
$$OO_OS$$OO_BRANDING_SUFFIX
|
||||
}
|
||||
}
|
||||
|
||||
ROOT_DIR=$$PWD/..
|
||||
|
||||
for(PRO_SUFFIX, PLATFORMS) {
|
||||
removeFile($$ROOT_DIR/core/Common/3dParty/cryptopp/project/Makefile.cryptopp$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/Common/Makefile.kernel$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/UnicodeConverter/Makefile.UnicodeConverter$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/DesktopEditor/graphics/pro/Makefile.graphics$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/PdfWriter/Makefile.PdfWriter$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/DjVuFile/Makefile.DjVuFile$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/XpsFile/Makefile.XpsFile$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/HtmlRenderer/Makefile.htmlrenderer$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/PdfReader/Makefile.PdfReader$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/HtmlFile/Makefile.HtmlFile$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/DesktopEditor/doctrenderer/Makefile.doctrenderer$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/desktop-sdk/HtmlFile/Internal/Makefile.Internal$$PRO_SUFFIX)
|
||||
|
||||
removeFile($$ROOT_DIR/core/DesktopEditor/AllFontsGen/Makefile.AllFontsGen$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/DesktopEditor/doctrenderer/app_builder/Makefile.docbuilder$$PRO_SUFFIX)
|
||||
|
||||
removeFile($$ROOT_DIR/core/Common/DocxFormat/DocxFormatLib/Makefile.DocxFormatLib$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/Makefile.PPTXFormatLib$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/ASCOfficeDocxFile2/Linux/Makefile.ASCOfficeDocxFile2Lib$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/ASCOfficeTxtFile/TxtXmlFormatLib/Linux/Makefile.TxtXmlFormatLib$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/ASCOfficeRtfFile/RtfFormatLib/Linux/Makefile.RtfFormatLib$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/ASCOfficePPTFile/PPTFormatLib/Linux/Makefile.PPTFormatLib$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/ASCOfficeDocFile/DocFormatLib/Linux/Makefile.DocFormatLib$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/ASCOfficeOdfFile/linux/Makefile.OdfFileReaderLib$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/ASCOfficeOdfFileW/linux/Makefile.OdfFileWriterLib$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/ASCOfficeXlsFile2/source/linux/Makefile.XlsFormatLib$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/X2tConverter/build/Qt/Makefile.X2tConverter$$PRO_SUFFIX)
|
||||
|
||||
removeFile($$ROOT_DIR/core/DesktopEditor/hunspell-1.3.3/src/qt/Makefile.hunspell$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/core/DesktopEditor/xmlsec/src/Makefile.ooxmlsignature$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/Makefile.AscDocumentsCore_win$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/lib/Makefile.AscDocumentsCore_linux$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/desktop-sdk/ChromiumBasedEditors/videoplayerlib/Makefile.videoplayerlib$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/desktop-apps/win-linux/extras/projicons/Makefile.ProjIcons$$PRO_SUFFIX)
|
||||
removeFile($$ROOT_DIR/desktop-apps/win-linux/Makefile.ASCDocumentEditor$$PRO_SUFFIX)
|
||||
}
|
||||
24
configure
vendored
24
configure
vendored
@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
[ -e config ] && rm config
|
||||
|
||||
key=""
|
||||
is_closed=true
|
||||
|
||||
while [ "$#" -gt "0" ]
|
||||
do
|
||||
if [ "${1:0:2}" = "--" ]
|
||||
then
|
||||
if [ "$is_closed" = false ]
|
||||
then
|
||||
echo "$key=\"1\"" >> config
|
||||
fi
|
||||
key=${1:2}
|
||||
is_closed=false
|
||||
elif [ "$is_closed" = false ]
|
||||
then
|
||||
echo "$key=\"$1\"" >> config
|
||||
is_closed=true
|
||||
fi
|
||||
shift
|
||||
done
|
||||
@ -1,45 +0,0 @@
|
||||
@echo off
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
if exist config del /F config
|
||||
|
||||
:loop
|
||||
|
||||
set local1=%~1
|
||||
set local2=%~2
|
||||
|
||||
if "%local1%"=="" (
|
||||
GOTO :end
|
||||
)
|
||||
|
||||
set local1=%~1TEST
|
||||
|
||||
if not "%local1:~0,2%"=="--" (
|
||||
SHIFT
|
||||
GOTO :loop
|
||||
)
|
||||
|
||||
if "%local2:~0,2%"=="--" (
|
||||
echo %local1:~2,-4%=^"1^">> config
|
||||
SHIFT
|
||||
GOTO :loop
|
||||
)
|
||||
|
||||
if "%local2%"=="" (
|
||||
echo %local1:~2,-4%=^"1^">> config
|
||||
GOTO :end
|
||||
)
|
||||
|
||||
SHIFT
|
||||
SHIFT
|
||||
|
||||
echo %local1:~2,-4%=^"%local2%^">> config
|
||||
|
||||
GOTO :loop
|
||||
|
||||
:end
|
||||
|
||||
endlocal
|
||||
|
||||
@echo on
|
||||
26
configure.py
Normal file
26
configure.py
Normal file
@ -0,0 +1,26 @@
|
||||
import os
|
||||
import sys
|
||||
import optparse
|
||||
|
||||
arguments = sys.argv[1:]
|
||||
|
||||
parser = optparse.OptionParser()
|
||||
parser.add_option("--update", action="store", type="string", dest="update", default="1", help="is need update")
|
||||
parser.add_option("--branch", action="store", type="string", dest="branch", default="master", help="branch all repo [used only if update==1]")
|
||||
parser.add_option("--clean", action="store", type="string", dest="clean", default="1", help="clean build")
|
||||
parser.add_option("--module", action="store", type="string", dest="module", default="builder", help="list build modules [desktop | builder]")
|
||||
parser.add_option("--platform", action="store", type="string", dest="platform", default="native", help="destination platform build [all: windows(win_64, win_32, win_64_xp, win_32_xp), linux(linux_64, linux_32), mac(mac_64); combination: native | win_64 | win_32 | win_64_xp | win_32_xp | linux_64 | mac_64 | ios | android")
|
||||
parser.add_option("--config", action="store", type="string", dest="config", default="", help="qmake CONFIG addition")
|
||||
parser.add_option("--qt-dir", action="store", type="string", dest="qt-dir", default="", help="qt (qmake) directory")
|
||||
parser.add_option("--compiler", action="store", type="string", dest="compiler", default="", help="compiler name")
|
||||
parser.add_option("--no-apps", action="store", type="string", dest="no-apps", default="0", help="disable build desktop apps (qt)")
|
||||
parser.add_option("--themesparams", action="store", type="string", dest="themesparams", default="", help="presentation themes thumbnails additions")
|
||||
|
||||
(options, args) = parser.parse_args(arguments)
|
||||
configOptions = vars(options)
|
||||
|
||||
configStore = open(os.path.dirname(os.path.realpath(__file__)) + "/config","w+")
|
||||
for option in configOptions:
|
||||
configStore.write(option + "=\"" + configOptions[option] + "\"\n")
|
||||
|
||||
configStore.close()
|
||||
191
make
191
make
@ -1,191 +0,0 @@
|
||||
#!/bin/bash
|
||||
SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
OO_OS=$(uname -s)
|
||||
OS_DEPLOY_64=""
|
||||
case "$OO_OS" in
|
||||
Linux*) OS_DEPLOY_64="linux_64" ;;
|
||||
Darwin*) OS_DEPLOY_64="mac_64" ;;
|
||||
*) exit ;;
|
||||
esac
|
||||
|
||||
source ./scripts/config_value update OO_UPDATE 1
|
||||
source ./scripts/config_value branch OO_BRANCH master
|
||||
if [ "$OO_UPDATE" == "true" ]
|
||||
then
|
||||
OO_UPDATE=1
|
||||
fi
|
||||
############################ BRANDING #############################
|
||||
source ./scripts/config_value branding OO_BRANDING_NAME ""
|
||||
source ./scripts/config_value branding-url OO_BRANDING_URL ""
|
||||
|
||||
if [ "$OO_RUNNING_BRANDING" != "1" ]
|
||||
then
|
||||
if [ "$OO_BRANDING_NAME" != "" ]
|
||||
then
|
||||
if [ ! -d "./../$OO_BRANDING_NAME" ]
|
||||
then
|
||||
echo "clone branding ${OO_BRANDING_NAME}..."
|
||||
git clone "$OO_BRANDING_URL" "../$OO_BRANDING_NAME"
|
||||
fi
|
||||
if [ "$OO_UPDATE" == "1" ]
|
||||
then
|
||||
echo "update branding ${OO_BRANDING_NAME}..."
|
||||
cd "./../$OO_BRANDING_NAME"
|
||||
git fetch
|
||||
git checkout -f $OO_BRANCH
|
||||
git pull
|
||||
cd ../build_tools
|
||||
fi
|
||||
# run branding tools
|
||||
if [ -f "../$OO_BRANDING_NAME/build_tools/make" ]
|
||||
then
|
||||
export OO_RUNNING_BRANDING="1"
|
||||
export BRANDING_PATH="${SCRIPTPATH}/../${OO_BRANDING_NAME}"
|
||||
cd "./../$OO_BRANDING_NAME/build_tools"
|
||||
./make
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
###################################################################
|
||||
|
||||
if [[ "${OS_DEPLOY_64}" == "mac_64" ]]
|
||||
then
|
||||
export PATH="${SCRIPTPATH}/tools/mac:${PATH}"
|
||||
fi
|
||||
|
||||
source ./scripts/config_value module OO_MODULE "desktop builder"
|
||||
source ./scripts/config_value clean OO_CLEAN 0
|
||||
source ./scripts/config_value platform OO_PLATFORM native
|
||||
source ./scripts/config_value config OO_CONFIG no_vlc
|
||||
source ./scripts/config_value deploy OO_DEPLOY 1
|
||||
source ./scripts/config_value qt-dir OO_QT_DIR "set qt path"
|
||||
source ./scripts/config_value compiler OO_COMPILER gcc
|
||||
source ./scripts/config_value no-apps OO_NO_APPS 0
|
||||
source ./scripts/config_value themesparams OO_THEMES_PARAMS ""
|
||||
|
||||
if [ "$OO_CLEAN" == "true" ]
|
||||
then
|
||||
OO_CLEAN=1
|
||||
fi
|
||||
|
||||
if [ "$OO_DEPLOY" == "true" ]
|
||||
then
|
||||
OO_DEPLOY=1
|
||||
fi
|
||||
|
||||
OO_COMPILER_X64="${OO_COMPILER}_64"
|
||||
|
||||
if [ "$OO_UPDATE" == "1" ]
|
||||
then
|
||||
./scripts/git-fetch core
|
||||
./scripts/git-fetch desktop-sdk
|
||||
./scripts/git-fetch sdkjs
|
||||
./scripts/git-fetch sdkjs-plugins
|
||||
./scripts/git-fetch web-apps
|
||||
./scripts/git-fetch dictionaries
|
||||
./scripts/git-fetch DocumentBuilder
|
||||
|
||||
if [[ "$OO_MODULE" == *"desktop"* ]]
|
||||
then
|
||||
./scripts/git-fetch desktop-apps
|
||||
OO_CONFIG="$OO_CONFIG desktop"
|
||||
fi
|
||||
fi
|
||||
|
||||
BUILD_PLATFORM=$OO_PLATFORM
|
||||
|
||||
./../core/Common/3dParty/make.sh
|
||||
|
||||
IS_NEED_64=false
|
||||
IS_NEED_32=false
|
||||
|
||||
if [[ "$OO_PLATFORM" == *"all"* ]]
|
||||
then
|
||||
IS_NEED_64=true
|
||||
IS_NEED_32=true
|
||||
fi
|
||||
|
||||
if [[ "$OO_PLATFORM" == *"x64"* ]] || \
|
||||
[[ "$OO_PLATFORM" == *"linux_64"* ]] || \
|
||||
[[ "$OO_PLATFORM" == *"mac_64"* ]]
|
||||
then
|
||||
IS_NEED_64=true
|
||||
fi
|
||||
|
||||
if [[ "$OO_PLATFORM" == *"x86"* ]] || \
|
||||
[[ "$OO_PLATFORM" == *"linux_32"* ]]
|
||||
then
|
||||
IS_NEED_32=true
|
||||
fi
|
||||
|
||||
if [[ "${OS_DEPLOY_64}" == "mac_64" ]]
|
||||
then
|
||||
IS_NEED_32=false
|
||||
fi
|
||||
|
||||
if [[ "$OO_PLATFORM" == *"native"* ]]
|
||||
then
|
||||
architecture=$(uname -m)
|
||||
case "$architecture" in
|
||||
x86_64*) IS_NEED_64=true ;;
|
||||
*) IS_NEED_32=true ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [[ "${OO_COMPILER}" == "ios" ]]
|
||||
then
|
||||
OO_COMPILER_X64="${OO_COMPILER}"
|
||||
OS_DEPLOY_64=ios
|
||||
fi
|
||||
|
||||
if [[ "$IS_NEED_64" == true ]]
|
||||
then
|
||||
export QT_DEPLOY="${OO_QT_DIR}/${OO_COMPILER_X64}/bin"
|
||||
export OS_DEPLOY="${OS_DEPLOY_64}"
|
||||
|
||||
if [ "$OO_CLEAN" == "1" ]
|
||||
then
|
||||
make clean all -f "makefiles/build.makefile_${OS_DEPLOY_64}"
|
||||
make distclean -f "makefiles/build.makefile_${OS_DEPLOY_64}"
|
||||
fi
|
||||
"${QT_DEPLOY}/qmake" -nocache build_clean.pro "CONFIG+=${OO_CONFIG} $OO_MODULE"
|
||||
"${QT_DEPLOY}/qmake" -nocache build.pro "CONFIG+=${OO_CONFIG} $OO_MODULE"
|
||||
make -f "makefiles/build.makefile_${OS_DEPLOY_64}"
|
||||
rm ".qmake.stash"
|
||||
fi
|
||||
|
||||
if [[ "$IS_NEED_32" == true ]]
|
||||
then
|
||||
export QT_DEPLOY=${OO_QT_DIR}/${OO_COMPILER}/bin
|
||||
export OS_DEPLOY=linux_32
|
||||
if [ "$OO_CLEAN" == "1" ]
|
||||
then
|
||||
make clean all -f "makefiles/build.makefile_linux_32"
|
||||
make distclean -f "makefiles/build.makefile_linux_32"
|
||||
fi
|
||||
"${QT_DEPLOY}/qmake" -nocache build_clean.pro "CONFIG+=${OO_CONFIG} $OO_MODULE"
|
||||
"${QT_DEPLOY}/qmake" -nocache build.pro "CONFIG+=$OO_CONFIG $OO_MODULE"
|
||||
make -f "makefiles/build.makefile_linux_32"
|
||||
rm ".qmake.stash"
|
||||
fi
|
||||
|
||||
if [[ "${OS_DEPLOY_64}" == "mac_64" ]]
|
||||
then
|
||||
xcodebuild -project "../desktop-sdk/ChromiumBasedEditors/lib/ascdocumentscore/ascdocumentscore.xcodeproj" -target "ascdocumentscore" -configuration Release
|
||||
xcodebuild -project "../desktop-sdk/ChromiumBasedEditors/lib/ascdocumentscore Helper/ONLYOFFICE Helper.xcodeproj" -target "ONLYOFFICE Helper" -configuration Release
|
||||
fi
|
||||
|
||||
cd "$SCRIPTPATH"
|
||||
if [[ "$OO_NO_BUILD_JS" == "1" ]]
|
||||
then
|
||||
echo "no build js!!!"
|
||||
else
|
||||
"${OO_QT_DIR}/${OO_COMPILER_X64}/bin/qmake" -nocache ./scripts/build_js.pro "CONFIG+=$OO_MODULE"
|
||||
fi
|
||||
|
||||
if [[ "$OO_DEPLOY" == "1" ]]
|
||||
then
|
||||
./scripts/deploy
|
||||
fi
|
||||
327
make.bat
327
make.bat
@ -1,327 +0,0 @@
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
SET "OO_VS_DIR=%ProgramFiles%\Microsoft Visual Studio 14.0\VC"
|
||||
if defined ProgramFiles(x86) (
|
||||
SET "OO_VS_DIR=%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC"
|
||||
)
|
||||
|
||||
call %~dp0scripts\config_value.bat update OO_UPDATE 1
|
||||
call %~dp0scripts\config_value.bat branch OO_BRANCH master
|
||||
if "%OO_UPDATE%"=="true" (
|
||||
set "OO_UPDATE=1"
|
||||
)
|
||||
|
||||
rem ############################ BRANDING #############################
|
||||
call %~dp0scripts\config_value.bat branding OO_BRANDING_NAME ""
|
||||
call %~dp0scripts\config_value.bat branding-url OO_BRANDING_URL ""
|
||||
|
||||
if "%OO_RUNNING_BRANDING%" == "1" (
|
||||
goto :base
|
||||
)
|
||||
if "%OO_BRANDING_NAME%" == "" (
|
||||
goto :base
|
||||
)
|
||||
|
||||
if not exist "%OO_BRANDING_NAME%" (
|
||||
call git clone "%OO_BRANDING_URL%" "../%OO_BRANDING_NAME%"
|
||||
)
|
||||
if "%OO_UPDATE%"=="1" (
|
||||
cd "..\%OO_BRANDING_NAME%"
|
||||
call git fetch
|
||||
call git checkout -f %OO_BRANCH%
|
||||
call git pull
|
||||
cd "..\build_tools"
|
||||
)
|
||||
|
||||
if exist "..\%OO_BRANDING_NAME%\build_tools\make.bat" (
|
||||
set "OO_RUNNING_BRANDING=1"
|
||||
set "BRANDING_PATH=%~dp0..\%OO_BRANDING_NAME%"
|
||||
cd "..\%OO_BRANDING_NAME%\build_tools"
|
||||
call make.bat
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
:base
|
||||
rem ###################################################################
|
||||
|
||||
call %~dp0scripts\config_value.bat module OO_MODULE "desktop builder"
|
||||
call %~dp0scripts\config_value.bat update OO_UPDATE 1
|
||||
call %~dp0scripts\config_value.bat clean OO_CLEAN 0
|
||||
call %~dp0scripts\config_value.bat platform OO_PLATFORM native
|
||||
call %~dp0scripts\config_value.bat config OO_CONFIG no_vlc
|
||||
call %~dp0scripts\config_value.bat deploy OO_DEPLOY 1
|
||||
call %~dp0scripts\config_value.bat install OO_INSTALL 1
|
||||
call %~dp0scripts\config_value.bat qt-dir OO_QT_DIR "set qt path"
|
||||
call %~dp0scripts\config_value.bat qt-dir-xp OO_QT_XP_DIR "set qt path (windows xp version)"
|
||||
call %~dp0scripts\config_value.bat themesparams OO_THEMES_PARAMS ""
|
||||
|
||||
if "%OO_CLEAN%"=="true" (
|
||||
set "OO_CLEAN=1"
|
||||
)
|
||||
|
||||
if "%OO_DEPLOY%"=="true" (
|
||||
set "OO_DEPLOY=1"
|
||||
)
|
||||
|
||||
if "%OO_UPDATE%"=="1" (
|
||||
call scripts\git-fetch.bat core
|
||||
call scripts\git-fetch.bat desktop-sdk
|
||||
call scripts\git-fetch.bat sdkjs
|
||||
call scripts\git-fetch.bat sdkjs-plugins
|
||||
call scripts\git-fetch.bat web-apps
|
||||
call scripts\git-fetch.bat dictionaries
|
||||
call scripts\git-fetch.bat DocumentBuilder
|
||||
|
||||
if not "%OO_MODULE%"=="%OO_MODULE:desktop=%" (
|
||||
call scripts\git-fetch.bat desktop-apps
|
||||
|
||||
set "OO_CONFIG=%OO_CONFIG% desktop"
|
||||
)
|
||||
)
|
||||
|
||||
set "IS_NEED_64=0"
|
||||
set "IS_NEED_32=0"
|
||||
set "IS_NEED_XP_64=0"
|
||||
set "IS_NEED_XP_32=0"
|
||||
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:win_64_xp=%" (
|
||||
set "IS_NEED_XP_64=1"
|
||||
set "OO_PLATFORM=%OO_PLATFORM:win_64_xp=%"
|
||||
)
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:win_32_xp=%" (
|
||||
set "IS_NEED_XP_32=1"
|
||||
set "OO_PLATFORM=%OO_PLATFORM:win_32_xp=%"
|
||||
)
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:xp=%" (
|
||||
set "IS_NEED_XP_64=1"
|
||||
set "IS_NEED_XP_32=1"
|
||||
set "OO_PLATFORM=%OO_PLATFORM:xp=%"
|
||||
)
|
||||
|
||||
if "%OO_PLATFORM%"=="" (
|
||||
set "OO_PLATFORM=empty"
|
||||
)
|
||||
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:all=%" (
|
||||
set "IS_NEED_64=1"
|
||||
set "IS_NEED_32=1"
|
||||
)
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:x64=%" (
|
||||
set "IS_NEED_64=1"
|
||||
)
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:win_64=%" (
|
||||
set "IS_NEED_64=1"
|
||||
)
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:x86=%" (
|
||||
set "IS_NEED_32=1"
|
||||
)
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:win_32=%" (
|
||||
set "IS_NEED_32=1"
|
||||
)
|
||||
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:native=%" (
|
||||
if exist "%PROGRAMFILES(X86)%" (
|
||||
set "IS_NEED_64=1"
|
||||
) else (
|
||||
set "IS_NEED_32=1"
|
||||
)
|
||||
)
|
||||
|
||||
if not exist "%OO_QT_DIR%\msvc2015_64\bin\qmake.exe" (
|
||||
set "IS_NEED_64=0"
|
||||
)
|
||||
if not exist "%OO_QT_DIR%\msvc2015\bin\qmake.exe" (
|
||||
set "IS_NEED_32=0"
|
||||
)
|
||||
if not exist "%OO_QT_XP_DIR%\msvc2015_64\bin\qmake.exe" (
|
||||
set "IS_NEED_XP_64=0"
|
||||
)
|
||||
if not exist "%OO_QT_XP_DIR%\msvc2015\bin\qmake.exe" (
|
||||
set "IS_NEED_XP_32=0"
|
||||
)
|
||||
|
||||
set "QMAKE_FOR_SCRIPTS=%OO_QT_DIR%\msvc2015_64\bin\qmake.exe"
|
||||
if not exist "%QMAKE_FOR_SCRIPTS%" (
|
||||
"QMAKE_FOR_SCRIPTS=%OO_QT_DIR%\msvc2015\bin\qmake.exe"
|
||||
)
|
||||
if not exist "%QMAKE_FOR_SCRIPTS%" (
|
||||
"QMAKE_FOR_SCRIPTS=%OO_QT_XP_DIR%\msvc2015_64\bin\qmake.exe"
|
||||
)
|
||||
if not exist "%QMAKE_FOR_SCRIPTS%" (
|
||||
"QMAKE_FOR_SCRIPTS=%OO_QT_XP_DIR%\msvc2015\bin\qmake.exe"
|
||||
)
|
||||
|
||||
set "BUILD_PLATFORM=%OO_PLATFORM%"
|
||||
if "%IS_NEED_64%"=="1" (
|
||||
set "BUILD_PLATFORM=all"
|
||||
) else (
|
||||
if "%IS_NEED_32%"=="1" (
|
||||
set "BUILD_PLATFORM=all"
|
||||
)
|
||||
)
|
||||
if "%IS_NEED_XP_64%"=="1" (
|
||||
set "BUILD_PLATFORM=%BUILD_PLATFORM% xp"
|
||||
) else (
|
||||
if "%IS_NEED_XP_32%"=="1" (
|
||||
set "BUILD_PLATFORM=%BUILD_PLATFORM% xp"
|
||||
)
|
||||
)
|
||||
|
||||
call ../core/Common/3dParty/make.bat || goto :error
|
||||
|
||||
cd %~dp0
|
||||
|
||||
if not "%OO_MODULE%"=="%OO_MODULE:updmodule=%" (
|
||||
set "CONFIG_ADDON=updmodule"
|
||||
set "QMAKE_ADDON=LINK=https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/appcast.xml"
|
||||
|
||||
if not exist tools\WinSparkle-0.7.0.zip (
|
||||
call tools\win\curl\curl.exe "https://d2ettrnqo7v976.cloudfront.net/winsparkle/WinSparkle-0.7.0.zip" --output tools\WinSparkle-0.7.0.zip
|
||||
)
|
||||
|
||||
if not exist tools\WinSparkle-0.7.0 (
|
||||
call tools\win\7z\7z.exe x tools\WinSparkle-0.7.0.zip -otools
|
||||
)
|
||||
|
||||
if not exist "..\desktop-apps\win-linux\3dparty" (
|
||||
mkdir "..\desktop-apps\win-linux\3dparty"
|
||||
)
|
||||
if not exist "..\desktop-apps\win-linux\3dparty\WinSparkle" (
|
||||
mkdir "..\desktop-apps\win-linux\3dparty\WinSparkle"
|
||||
)
|
||||
if not exist "..\desktop-apps\win-linux\3dparty\WinSparkle\include" (
|
||||
xcopy /s /q /y /i "tools\WinSparkle-0.7.0\include" "..\desktop-apps\win-linux\3dparty\WinSparkle\include"
|
||||
)
|
||||
|
||||
xcopy /s /q /y /i "tools\WinSparkle-0.7.0\Release" "..\desktop-apps\win-linux\3dparty\WinSparkle\win_32"
|
||||
xcopy /s /q /y /i "tools\WinSparkle-0.7.0\x64\Release" "..\desktop-apps\win-linux\3dparty\WinSparkle\win_64"
|
||||
)
|
||||
|
||||
cd %~dp0
|
||||
|
||||
set "CURRENT_PATH=%PATH%"
|
||||
cd %~dp0
|
||||
if "%IS_NEED_64%"=="1" (
|
||||
call "%OO_VS_DIR%\vcvarsall.bat" x64
|
||||
set "QT_DEPLOY=%OO_QT_DIR%\msvc2015_64\bin"
|
||||
set "OS_DEPLOY=win_64"
|
||||
|
||||
if "%OO_CLEAN%"=="1" (
|
||||
call nmake clean -f "makefiles\build.makefile_win_64"
|
||||
call nmake distclean -f "makefiles\build.makefile_win_64"
|
||||
)
|
||||
|
||||
call "!QT_DEPLOY!\qmake" -nocache %~dp0build_clean.pro
|
||||
call "!QT_DEPLOY!\qmake" -nocache %~dp0build.pro "CONFIG+=%OO_CONFIG% %OO_MODULE% %CONFIG_ADDON%" "%QMAKE_ADDON%" || goto :error
|
||||
call nmake -f "makefiles\build.makefile_win_64" || goto :error
|
||||
|
||||
del ".qmake.stash"
|
||||
)
|
||||
|
||||
set "PATH=%CURRENT_PATH%"
|
||||
cd %~dp0
|
||||
if "%IS_NEED_32%"=="1" (
|
||||
call "%OO_VS_DIR%\vcvarsall.bat" x86
|
||||
set "QT_DEPLOY=%OO_QT_DIR%\msvc2015\bin"
|
||||
set "OS_DEPLOY=win_32"
|
||||
|
||||
if "%OO_CLEAN%"=="1" (
|
||||
call nmake clean -f "makefiles\build.makefile_win_32"
|
||||
call nmake distclean -f "makefiles\build.makefile_win_32"
|
||||
)
|
||||
|
||||
call "!QT_DEPLOY!\qmake" -nocache %~dp0build_clean.pro
|
||||
call "!QT_DEPLOY!\qmake" -nocache %~dp0build.pro "CONFIG+=%OO_CONFIG% %OO_MODULE% %CONFIG_ADDON%" "%QMAKE_ADDON%" || goto :error
|
||||
call nmake -f "makefiles\build.makefile_win_32" || goto :error
|
||||
|
||||
del ".qmake.stash"
|
||||
)
|
||||
|
||||
set "PATH=%CURRENT_PATH%"
|
||||
cd %~dp0
|
||||
if "%IS_NEED_XP_64%"=="1" (
|
||||
call "%OO_VS_DIR%\vcvarsall.bat" x64
|
||||
set "QT_DEPLOY=%OO_QT_XP_DIR%\msvc2015_64\bin"
|
||||
set "OS_DEPLOY=win_64"
|
||||
|
||||
if "%OO_CLEAN%"=="1" (
|
||||
call nmake clean -f "makefiles\build.makefile_win_64_xp"
|
||||
call nmake distclean -f "makefiles\build.makefile_win_64_xp"
|
||||
)
|
||||
|
||||
call "!QT_DEPLOY!\qmake" -nocache %~dp0build_clean.pro "CONFIG+=build_xp"
|
||||
call "!QT_DEPLOY!\qmake" -nocache %~dp0build.pro "CONFIG+=%OO_CONFIG% %OO_MODULE% build_xp %CONFIG_ADDON%" "%QMAKE_ADDON%" || goto :error
|
||||
call nmake -f "makefiles\build.makefile_win_64_xp" || goto :error
|
||||
|
||||
del ".qmake.stash"
|
||||
)
|
||||
|
||||
set "PATH=%CURRENT_PATH%"
|
||||
cd %~dp0
|
||||
if "%IS_NEED_XP_32%"=="1" (
|
||||
call "%OO_VS_DIR%\vcvarsall.bat" x86
|
||||
set "QT_DEPLOY=%OO_QT_XP_DIR%\msvc2015\bin"
|
||||
set "OS_DEPLOY=win_32"
|
||||
|
||||
if "%OO_CLEAN%"=="1" (
|
||||
call nmake clean -f "makefiles\build.makefile_win_32_xp"
|
||||
call nmake distclean -f "makefiles\build.makefile_win_32_xp"
|
||||
)
|
||||
|
||||
call "!QT_DEPLOY!\qmake" -nocache %~dp0build_clean.pro "CONFIG+=build_xp"
|
||||
call "!QT_DEPLOY!\qmake" -nocache %~dp0build.pro "CONFIG+=%OO_CONFIG% %OO_MODULE% build_xp %CONFIG_ADDON%" "%QMAKE_ADDON%" || goto :error
|
||||
call nmake -f "makefiles\build.makefile_win_32_xp" || goto :error
|
||||
|
||||
del ".qmake.stash"
|
||||
)
|
||||
|
||||
if not "%OO_MODULE%"=="%OO_MODULE:builder=%" (
|
||||
call ..\core\DesktopEditor\doctrenderer\docbuilder.com\build.bat || goto :error
|
||||
)
|
||||
|
||||
if "%OO_NO_BUILD_JS%"=="" (
|
||||
call "%OO_VS_DIR%\vcvarsall.bat" x64
|
||||
call "%QMAKE_FOR_SCRIPTS%" -nocache %~dp0scripts\build_js.pro "CONFIG+=%OO_MODULE%"
|
||||
)
|
||||
|
||||
if not "%OO_DEPLOY%"=="1" (
|
||||
GOTO :end
|
||||
)
|
||||
|
||||
set "PATH=%CURRENT_PATH%"
|
||||
if "%IS_NEED_64%"=="1" (
|
||||
call "%OO_VS_DIR%\vcvarsall.bat" x64
|
||||
set "QT_DEPLOY=%OO_QT_DIR%\msvc2015_64\bin"
|
||||
set "OS_DEPLOY=win_64"
|
||||
call "!QT_DEPLOY!\qmake" -nocache %~dp0scripts\deploy.pro "CONFIG+=%OO_CONFIG% %OO_MODULE%"
|
||||
)
|
||||
set "PATH=%CURRENT_PATH%"
|
||||
if "%IS_NEED_32%"=="1" (
|
||||
call "%OO_VS_DIR%\vcvarsall.bat" x86
|
||||
set "QT_DEPLOY=%OO_QT_DIR%\msvc2015\bin"
|
||||
set "OS_DEPLOY=win_32"
|
||||
call "!QT_DEPLOY!\qmake" -nocache %~dp0scripts\deploy.pro "CONFIG+=%OO_CONFIG% %OO_MODULE%"
|
||||
)
|
||||
set "PATH=%CURRENT_PATH%"
|
||||
if "%IS_NEED_XP_64%"=="1" (
|
||||
call "%OO_VS_DIR%\vcvarsall.bat" x64
|
||||
set "QT_DEPLOY=%OO_QT_XP_DIR%\msvc2015_64\bin"
|
||||
set "OS_DEPLOY=win_64"
|
||||
call "!QT_DEPLOY!\qmake" -nocache %~dp0scripts\deploy.pro "CONFIG+=%OO_CONFIG% %OO_MODULE% build_xp"
|
||||
)
|
||||
set "PATH=%CURRENT_PATH%"
|
||||
if "%IS_NEED_XP_32%"=="1" (
|
||||
call "%OO_VS_DIR%\vcvarsall.bat" x86
|
||||
set "QT_DEPLOY=%OO_QT_XP_DIR%\msvc2015\bin"
|
||||
set "OS_DEPLOY=win_32"
|
||||
call "!QT_DEPLOY!\qmake" -nocache %~dp0scripts\deploy.pro "CONFIG+=%OO_CONFIG% %OO_MODULE% build_xp"
|
||||
)
|
||||
|
||||
:end
|
||||
endlocal
|
||||
exit /b 0
|
||||
|
||||
:error
|
||||
echo "Failed with error #%errorlevel%."
|
||||
exit /b %errorlevel%
|
||||
57
make.py
Normal file
57
make.py
Normal file
@ -0,0 +1,57 @@
|
||||
sys.path.append('scripts')
|
||||
import config
|
||||
import base
|
||||
import build
|
||||
import deploy
|
||||
|
||||
# parse configuration
|
||||
config.parse()
|
||||
|
||||
# update...
|
||||
if ("1" == config.options["update"]):
|
||||
base.git_update("core")
|
||||
base.git_update("sdkjs")
|
||||
base.git_update("sdkjs-plugins")
|
||||
base.git_update("web-apps")
|
||||
base.git_update("desktop-sdk")
|
||||
base.git_update("dictionaries")
|
||||
base.git_update("core")
|
||||
|
||||
if config.check_option("module", "builder")
|
||||
base.git_update("DocumentBuilder")
|
||||
|
||||
if config.check_option("module", "desktop")
|
||||
base.git_update("desktop-apps")
|
||||
|
||||
base_dir = base.get_script_dir()
|
||||
|
||||
# core 3rdParty
|
||||
base.bash(base_dir + "/../core/Common/3dParty/make")
|
||||
|
||||
# build updmodule for desktop (only for windows version)
|
||||
if ("windows" == base.host_platform()) and (config.check_option("module", "desktop")):
|
||||
config.extend_option("updmodule")
|
||||
config.extend_option("LINK=https://download.onlyoffice.com/install/desktop/editors/windows/onlyoffice/appcast.xml")
|
||||
|
||||
if not base.is_file(base_dir + "/tools/WinSparkle-0.7.0.zip"):
|
||||
base.cmd(base_dir + "/tools/win/curl/curl.exe", ["https://d2ettrnqo7v976.cloudfront.net/winsparkle/WinSparkle-0.7.0.zip", "--output", base_dir + "tools/WinSparkle-0.7.0.zip"])
|
||||
|
||||
if not base.is_dir(base_dir + "/tools/WinSparkle-0.7.0"):
|
||||
base.cmd(base_dir + "/toolswin/7z/7z.exe", ["x", base_dir + "tools/WinSparkle-0.7.0.zip", "-otools"])
|
||||
|
||||
base.create_dir(base_dir + "/../desktop-apps/win-linux/3dparty/WinSparkle")
|
||||
base.copy_dir(base_dir + "/tools/WinSparkle-0.7.0/include", base_dir + "/../desktop-apps/win-linux/3dparty/WinSparkle/include")
|
||||
base.copy_dir(base_dir + "/tools/WinSparkle-0.7.0/Release", base_dir + "/../desktop-apps/win-linux/3dparty/WinSparkle/win_32")
|
||||
base.copy_dir(base_dir + "/tools/WinSparkle-0.7.0/x64/Release", base_dir + "/../desktop-apps/win-linux/3dparty/WinSparkle/win_64")
|
||||
|
||||
build.make()
|
||||
|
||||
if ("1" != base.get_env("OO_NO_BUILD_JS")):
|
||||
if (config.check_option("module", "builder") or config.check_option("module", "server")):
|
||||
build.build_interface(base_dir + "/../web-apps/build")
|
||||
build.build_sdk_builder(base_dir + "/../sdkjs/build")
|
||||
if config.check_option("module", "desktop"):
|
||||
build.build_sdk_desktop(base_dir + "/../sdkjs/build")
|
||||
|
||||
if ("0" != config.option("deploy")):
|
||||
deploy.make()
|
||||
97
scripts/base.py
Normal file
97
scripts/base.py
Normal file
@ -0,0 +1,97 @@
|
||||
import platform
|
||||
import shutil
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
def get_script_dir():
|
||||
scriptPath = os.path.realpath(__file__)
|
||||
scriptDir = os.path.dirname(scriptPath)
|
||||
return scriptDir
|
||||
|
||||
def get_path( path ):
|
||||
if "Windows" == platform.system():
|
||||
return path.replace("/", "\\")
|
||||
return path
|
||||
|
||||
def is_file( path ):
|
||||
return os.path.isfile(get_path(path))
|
||||
|
||||
def is_dir( path ):
|
||||
return os.path.isdir(get_path(path))
|
||||
|
||||
def is_exist(path):
|
||||
return is_file(path) || is_dir(path)
|
||||
|
||||
def copy_file( src, dst ):
|
||||
return shutil.copy2(get_path(src), get_path(dst))
|
||||
|
||||
def delete_file( path ):
|
||||
return os.remove(get_path(path))
|
||||
|
||||
def create_dir( path ):
|
||||
path2 = get_path(path)
|
||||
if not os.path.exists(path2):
|
||||
os.makedirs(path2)
|
||||
return
|
||||
|
||||
def copy_dir( src, dst ):
|
||||
try:
|
||||
shutil.copytree(get_path(src), get_path(dst))
|
||||
except OSError as e:
|
||||
print('Directory not copied. Error: %s' % e)
|
||||
|
||||
def delete_dir( path ):
|
||||
shutil.rmtree(get_path(path))
|
||||
|
||||
def cmd( prog, args )
|
||||
sub_args = args[:].insert(0, prog)
|
||||
ret = subprocess.call(sub_args, stderr=subprocess.STDOUT, shell=True)
|
||||
if ret != 0:
|
||||
sys.exit("Error (" + prog + "): " + str(ret))
|
||||
return ret
|
||||
|
||||
def bash( path )
|
||||
command = get_path(path)
|
||||
if ("Windows" == platform.system()):
|
||||
command += ".bat"
|
||||
else:
|
||||
command += ".sh"
|
||||
return cmd(command, [])
|
||||
|
||||
def get_native_platform():
|
||||
cur_system = platform.system()
|
||||
if "Windows" == cur_system:
|
||||
cur_system = "win_"
|
||||
elif "Linux" == cur_system:
|
||||
cur_system = "linux_"
|
||||
else:
|
||||
cur_system = "mac_"
|
||||
if platform.machine().endswith('64'):
|
||||
cur_system += cur_system + "64"
|
||||
else:
|
||||
cur_system += cur_system + "32"
|
||||
return cur_system
|
||||
|
||||
def host_platform():
|
||||
ret = platform.system.lower()
|
||||
if (ret == "darwin"):
|
||||
return "mac"
|
||||
return ret
|
||||
|
||||
def get_env(name):
|
||||
return os.environ.getenv(name, "")
|
||||
|
||||
def git_update( repo ):
|
||||
url = "https://github.com/ONLYOFFICE/" + repo + ".git"
|
||||
if config.options["git-protocol"] == "ssh":
|
||||
url = "git@github.com:ONLYOFFICE/" + repo + ".git"
|
||||
folder = base.get_script_dir() + "/../../" + repo
|
||||
if not base.is_dir(folder):
|
||||
base.cmd("git", ["clone", url, folder])
|
||||
old_cur = os.getcwd()
|
||||
os.chdir(folder)
|
||||
base.cmd("git", ["fetch"])
|
||||
base.cmd("git", ["checkout", "-f", config.options["branch"]])
|
||||
base.cmd("git", ["pull"])
|
||||
os.chdir(old_cur)
|
||||
78
scripts/build.py
Normal file
78
scripts/build.py
Normal file
@ -0,0 +1,78 @@
|
||||
sys.path.append('scripts')
|
||||
import config
|
||||
import base
|
||||
|
||||
# remove all makefiles
|
||||
def clean():
|
||||
suff = config.platforms[:]
|
||||
suff_branding = config.option("branding")
|
||||
if "" != suff_branding:
|
||||
suff2 = []
|
||||
for cur in suff:
|
||||
suff2.append(cur + suff_branding)
|
||||
suff += suff2
|
||||
core_dir = base.get_script_dir() + "/../"
|
||||
for cur in suff
|
||||
base.delete_file(core_dir + "/core/Common/3dParty/cryptopp/project/Makefile.cryptopp" + cur)
|
||||
base.delete_file(core_dir + "/core/Common/Makefile.kernel" + cur)
|
||||
base.delete_file(core_dir + "/core/UnicodeConverter/Makefile.UnicodeConverter" + cur)
|
||||
base.delete_file(core_dir + "/core/DesktopEditor/graphics/pro/Makefile.graphics" + cur)
|
||||
base.delete_file(core_dir + "/core/PdfWriter/Makefile.PdfWriter" + cur)
|
||||
base.delete_file(core_dir + "/core/DjVuFile/Makefile.DjVuFile" + cur)
|
||||
base.delete_file(core_dir + "/core/XpsFile/Makefile.XpsFile" + cur)
|
||||
base.delete_file(core_dir + "/core/HtmlRenderer/Makefile.htmlrenderer" + cur)
|
||||
base.delete_file(core_dir + "/core/PdfReader/Makefile.PdfReader" + cur)
|
||||
base.delete_file(core_dir + "/core/HtmlFile/Makefile.HtmlFile" + cur)
|
||||
base.delete_file(core_dir + "/core/DesktopEditor/doctrenderer/Makefile.doctrenderer" + cur)
|
||||
base.delete_file(core_dir + "/desktop-sdk/HtmlFile/Internal/Makefile.Internal" + cur)
|
||||
|
||||
base.delete_file(core_dir + "/core/DesktopEditor/AllFontsGen/Makefile.AllFontsGen" + cur)
|
||||
base.delete_file(core_dir + "/core/DesktopEditor/doctrenderer/app_builder/Makefile.docbuilder" + cur)
|
||||
|
||||
base.delete_file(core_dir + "/core/Common/DocxFormat/DocxFormatLib/Makefile.DocxFormatLib" + cur)
|
||||
base.delete_file(core_dir + "/core/ASCOfficePPTXFile/PPTXLib/Linux/PPTXFormatLib/Makefile.PPTXFormatLib" + cur)
|
||||
base.delete_file(core_dir + "/core/ASCOfficeDocxFile2/Linux/Makefile.ASCOfficeDocxFile2Lib" + cur)
|
||||
base.delete_file(core_dir + "/core/ASCOfficeTxtFile/TxtXmlFormatLib/Linux/Makefile.TxtXmlFormatLib" + cur)
|
||||
base.delete_file(core_dir + "/core/ASCOfficeRtfFile/RtfFormatLib/Linux/Makefile.RtfFormatLib" + cur)
|
||||
base.delete_file(core_dir + "/core/ASCOfficePPTFile/PPTFormatLib/Linux/Makefile.PPTFormatLib" + cur)
|
||||
base.delete_file(core_dir + "/core/ASCOfficeDocFile/DocFormatLib/Linux/Makefile.DocFormatLib" + cur)
|
||||
base.delete_file(core_dir + "/core/ASCOfficeOdfFile/linux/Makefile.OdfFileReaderLib" + cur)
|
||||
base.delete_file(core_dir + "/core/ASCOfficeOdfFileW/linux/Makefile.OdfFileWriterLib" + cur)
|
||||
base.delete_file(core_dir + "/core/ASCOfficeXlsFile2/source/linux/Makefile.XlsFormatLib" + cur)
|
||||
base.delete_file(core_dir + "/core/X2tConverter/build/Qt/Makefile.X2tConverter" + cur)
|
||||
|
||||
base.delete_file(core_dir + "/core/DesktopEditor/hunspell-1.3.3/src/qt/Makefile.hunspell" + cur)
|
||||
base.delete_file(core_dir + "/core/DesktopEditor/xmlsec/src/Makefile.ooxmlsignature" + cur)
|
||||
base.delete_file(core_dir + "/desktop-sdk/ChromiumBasedEditors/lib/Makefile.AscDocumentsCore_win" + cur)
|
||||
base.delete_file(core_dir + "/desktop-sdk/ChromiumBasedEditors/lib/Makefile.AscDocumentsCore_linux" + cur)
|
||||
base.delete_file(core_dir + "/desktop-sdk/ChromiumBasedEditors/videoplayerlib/Makefile.videoplayerlib" + cur)
|
||||
base.delete_file(core_dir + "/desktop-apps/win-linux/extras/projicons/Makefile.ProjIcons" + cur)
|
||||
base.delete_file(core_dir + "/desktop-apps/win-linux/Makefile.ASCDocumentEditor" + cur)
|
||||
|
||||
# make build.pro
|
||||
def make():
|
||||
return
|
||||
|
||||
# JS build
|
||||
def _run_npm( directory ):
|
||||
dir = base.get_path(directory)
|
||||
return base.cmd("npm", ["--prefix", dir, "install", dir])
|
||||
|
||||
def _run_grunt( directory, params=[] ):
|
||||
dir = base.get_path(directory)
|
||||
return base.cmd("grunt", ["--base", dir] + params)
|
||||
|
||||
def build_interface( directory ):
|
||||
_run_npm(directory)
|
||||
_run_grunt(directory, ["--force"])
|
||||
return
|
||||
|
||||
def build_sdk_desktop( directory ):
|
||||
_run_npm(directory)
|
||||
_run_grunt(directory, ["--level=ADVANCED", "--desktop=true"])
|
||||
return
|
||||
|
||||
def build_sdk_builder( directory ):
|
||||
_run_npm(directory)
|
||||
_run_grunt(directory, ["--level=ADVANCED"])
|
||||
return
|
||||
@ -1,76 +0,0 @@
|
||||
TEMPLATE=aux
|
||||
|
||||
CONFIG -= debug_and_release debug_and_release_target
|
||||
MAKEFILE=$$PWD/../makefiles/build_js.makefile
|
||||
|
||||
include($$PWD/../../core/Common/base.pri)
|
||||
include($$PWD/common.pri)
|
||||
|
||||
ROOT_GIT_DIR=$$PWD/../..
|
||||
DEPLOY_DIR=$$PWD/../out
|
||||
createDirectory($$DEPLOY_DIR)
|
||||
|
||||
PUBLISHER_NAME = $$(OO_BRANDING)
|
||||
isEmpty(PUBLISHER_NAME) {
|
||||
core_windows {
|
||||
PUBLISHER_NAME=ONLYOFFICE
|
||||
} else {
|
||||
PUBLISHER_NAME=onlyoffice
|
||||
}
|
||||
}
|
||||
|
||||
createDirectory($$DEPLOY_DIR)
|
||||
createDirectory($$DEPLOY_DIR/js)
|
||||
createDirectory($$DEPLOY_DIR/js/$$PUBLISHER_NAME)
|
||||
|
||||
DEPLOY_DIR=$$DEPLOY_DIR/js/$$PUBLISHER_NAME
|
||||
|
||||
CONFIG += min_build
|
||||
|
||||
min_build {
|
||||
runNPM($$ROOT_GIT_DIR/web-apps/build)
|
||||
gruntInterface($$ROOT_GIT_DIR/web-apps/build)
|
||||
}
|
||||
|
||||
desktop {
|
||||
|
||||
CUR_ROOT=$$DEPLOY_DIR/desktop
|
||||
removeDirectory($$CUR_ROOT)
|
||||
createDirectory($$CUR_ROOT)
|
||||
|
||||
runNPM($$ROOT_GIT_DIR/sdkjs/build)
|
||||
gruntDesktop($$ROOT_GIT_DIR/sdkjs/build)
|
||||
|
||||
copyDirectory($$ROOT_GIT_DIR/sdkjs/deploy/sdkjs, $$CUR_ROOT/sdkjs)
|
||||
copyFile($$ROOT_GIT_DIR/sdkjs/common/HtmlFileInternal/AllFonts.js, $$CUR_ROOT/sdkjs/common/AllFonts.js)
|
||||
|
||||
copyDirectory($$ROOT_GIT_DIR/web-apps/deploy/web-apps, $$CUR_ROOT/web-apps)
|
||||
removeDirectory($$CUR_ROOT/web-apps/apps/documenteditor/embed)
|
||||
removeDirectory($$CUR_ROOT/web-apps/apps/documenteditor/mobile)
|
||||
removeDirectory($$CUR_ROOT/web-apps/apps/presentationeditor/embed)
|
||||
removeDirectory($$CUR_ROOT/web-apps/apps/presentationeditor/mobile)
|
||||
removeDirectory($$CUR_ROOT/web-apps/apps/spreadsheeteditor/embed)
|
||||
removeDirectory($$CUR_ROOT/web-apps/apps/spreadsheeteditor/mobile)
|
||||
|
||||
copyFile($$ROOT_GIT_DIR/web-apps/apps/api/documents/index.html.desktop, $$CUR_ROOT/web-apps/apps/api/documents/index.html)
|
||||
|
||||
runNPM($$ROOT_GIT_DIR/desktop-apps/common/loginpage/build)
|
||||
gruntInterface($$ROOT_GIT_DIR/desktop-apps/common/loginpage/build)
|
||||
|
||||
copyFile($$ROOT_GIT_DIR/desktop-apps/common/loginpage/deploy/index.html, $$CUR_ROOT/index.html)
|
||||
|
||||
}
|
||||
|
||||
builder {
|
||||
|
||||
CUR_ROOT=$$DEPLOY_DIR/builder
|
||||
removeDirectory($$CUR_ROOT)
|
||||
createDirectory($$CUR_ROOT)
|
||||
|
||||
runNPM($$ROOT_GIT_DIR/sdkjs/build)
|
||||
gruntBuilder($$ROOT_GIT_DIR/sdkjs/build)
|
||||
|
||||
copyDirectory($$ROOT_GIT_DIR/sdkjs/deploy/sdkjs, $$CUR_ROOT/sdkjs)
|
||||
copyDirectory($$ROOT_GIT_DIR/web-apps/deploy/web-apps, $$CUR_ROOT/web-apps)
|
||||
|
||||
}
|
||||
@ -1,250 +0,0 @@
|
||||
LIB_EXT=.so
|
||||
core_windows {
|
||||
LIB_EXT=.dll
|
||||
}
|
||||
core_mac {
|
||||
LIB_EXT=.dylib
|
||||
}
|
||||
core_ios {
|
||||
LIB_EXT=.dylib
|
||||
}
|
||||
|
||||
EXE_EXT=
|
||||
core_windows {
|
||||
EXE_EXT=.exe
|
||||
}
|
||||
|
||||
LIB_PRE=
|
||||
!core_windows {
|
||||
LIB_PRE=lib
|
||||
}
|
||||
|
||||
CALL_COMMAND=
|
||||
core_windows {
|
||||
CALL_COMMAND="call "
|
||||
}
|
||||
|
||||
defineTest(copyDirectory) {
|
||||
src = $$1
|
||||
dst = $$2
|
||||
|
||||
win32:src ~= s,/,\\,g
|
||||
win32:dst ~= s,/,\\,g
|
||||
|
||||
system($$QMAKE_COPY_DIR $$shell_quote($$src) $$shell_quote($$dst) $$escape_expand(\\n\\t))
|
||||
}
|
||||
|
||||
defineTest(copyFile) {
|
||||
file = $$1
|
||||
dir = $$2
|
||||
|
||||
win32:file ~= s,/,\\,g
|
||||
win32:dir ~= s,/,\\,g
|
||||
|
||||
system($$QMAKE_COPY_FILE $$shell_quote($$file) $$shell_quote($$dir) $$escape_expand(\\n\\t))
|
||||
}
|
||||
|
||||
defineTest(copyLib) {
|
||||
dir1 = $$1
|
||||
dir2 = $$2
|
||||
lib = $$3
|
||||
|
||||
LIBNAME=$$join(lib, lib, "$$LIB_PRE", "$$LIB_EXT")
|
||||
|
||||
core_windows {
|
||||
dir1=$$dir1/$$LIBNAME
|
||||
dir2=$$dir2/$$LIBNAME
|
||||
dir1 ~= s,/,\\,g
|
||||
dir2 ~= s,/,\\,g
|
||||
|
||||
system($$QMAKE_COPY_FILE $$shell_quote($$dir1) $$shell_quote($$dir2) $$escape_expand(\\n\\t))
|
||||
} else {
|
||||
system($$QMAKE_COPY_FILE $$shell_quote($$dir1/$$LIBNAME) $$shell_quote($$dir2/$$LIBNAME) $$escape_expand(\\n\\t))
|
||||
}
|
||||
}
|
||||
|
||||
defineTest(removeFile) {
|
||||
file = $$1
|
||||
|
||||
win32:file ~= s,/,\\,g
|
||||
|
||||
core_windows {
|
||||
system(if exist $$shell_quote($$file) $$QMAKE_DEL_FILE $$shell_quote($$file) $$escape_expand(\\n\\t))
|
||||
} else {
|
||||
system($$QMAKE_DEL_FILE $$shell_quote($$file) $$escape_expand(\\n\\t))
|
||||
}
|
||||
}
|
||||
|
||||
defineTest(createDirectory) {
|
||||
dir = $$1
|
||||
|
||||
win32:dir ~= s,/,\\,g
|
||||
|
||||
core_windows {
|
||||
system($$QMAKE_CHK_DIR_EXISTS $$shell_quote($$dir) $$QMAKE_MKDIR $$shell_quote($$dir) $$escape_expand(\\n\\t))
|
||||
} else {
|
||||
system($$QMAKE_MKDIR $$shell_quote($$dir) $$escape_expand(\\n\\t))
|
||||
}
|
||||
}
|
||||
|
||||
defineTest(removeDirectory) {
|
||||
dir = $$1
|
||||
|
||||
win32:dir ~= s,/,\\,g
|
||||
|
||||
core_windows {
|
||||
system($$QMAKE_CHK_DIR_EXISTS $$shell_quote($$dir) $$QMAKE_MKDIR $$shell_quote($$dir) $$escape_expand(\\n\\t))
|
||||
} else {
|
||||
system($$QMAKE_MKDIR $$shell_quote($$dir) $$escape_expand(\\n\\t))
|
||||
}
|
||||
|
||||
core_windows {
|
||||
system(rmdir /S /Q $$shell_quote($$dir) $$escape_expand(\\n\\t))
|
||||
} else {
|
||||
system(rm -rf $$shell_quote($$dir) $$escape_expand(\\n\\t))
|
||||
}
|
||||
}
|
||||
|
||||
defineTest(copyQtLib) {
|
||||
createDirectory($$2);
|
||||
|
||||
core_windows {
|
||||
copyLib($$QT_CURRENT, $$2, $$1)
|
||||
}
|
||||
core_linux {
|
||||
file=$$1
|
||||
lib1=$$join(file, file, "lib", ".so.$$QT_VERSION")
|
||||
lib2=$$join(file, file, "lib", ".so.$$QT_MAJOR_VERSION")
|
||||
system($$QMAKE_COPY_FILE $$shell_quote($$QT_CURRENT/../lib/$$lib1) $$shell_quote($$2/$$lib2) $$escape_expand(\\n\\t))
|
||||
}
|
||||
}
|
||||
|
||||
defineTest(copyQtPlugin) {
|
||||
copyDirectory($$1, $$2)
|
||||
|
||||
core_windows {
|
||||
qt_libs = $$files($$2/*, false)
|
||||
win32:qt_libs ~= s,/,\\,g
|
||||
|
||||
for(qt_lib, qt_libs) {
|
||||
qt_lib_test=$$qt_lib
|
||||
qt_lib_test=$$replace(qt_lib_test, .dll, d.dll)
|
||||
system(if exist $$shell_quote($$qt_lib_test) $$QMAKE_DEL_FILE $$shell_quote($$qt_lib_test) $$escape_expand(\\n\\t))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
defineTest(runNPM) {
|
||||
dir = $$1
|
||||
|
||||
win32:dir ~= s,/,\\,g
|
||||
|
||||
system($$CALL_COMMAND npm --prefix $$shell_quote($$dir) install $$shell_quote($$dir) $$escape_expand(\\n\\t))
|
||||
}
|
||||
|
||||
defineTest(runNPM2) {
|
||||
dir = $$1
|
||||
|
||||
win32:dir ~= s,/,\\,g
|
||||
|
||||
system($$CALL_COMMAND npm --prefix $$shell_quote($$dir) install $$shell_quote($$dir) $$shell_quote(git://github.com/gruntjs/grunt-contrib-uglify.git$${LITERAL_HASH}harmony) $$escape_expand(\\n\\t))
|
||||
}
|
||||
|
||||
defineTest(gruntInterface) {
|
||||
dir = $$1
|
||||
|
||||
win32:dir ~= s,/,\\,g
|
||||
|
||||
system($$CALL_COMMAND grunt --force --base $$shell_quote($$dir) $$escape_expand(\\n\\t))
|
||||
}
|
||||
|
||||
defineTest(gruntBuilder) {
|
||||
dir = $$1
|
||||
|
||||
win32:dir ~= s,/,\\,g
|
||||
|
||||
system($$CALL_COMMAND grunt --base $$shell_quote($$dir) --level=ADVANCED $$escape_expand(\\n\\t))
|
||||
}
|
||||
|
||||
defineTest(gruntDesktop) {
|
||||
dir = $$1
|
||||
|
||||
win32:dir ~= s,/,\\,g
|
||||
|
||||
system($$CALL_COMMAND grunt --base $$shell_quote($$dir) --level=ADVANCED --desktop=true $$escape_expand(\\n\\t))
|
||||
}
|
||||
|
||||
defineTest(replaceInFile) {
|
||||
file = $$1
|
||||
win32:file ~= s,/,\\,g
|
||||
|
||||
core_windows {
|
||||
system("call powershell -Command \"(Get-Content '$$file') -replace '$$2', '$$3' | Set-Content '$$file'\"")
|
||||
} else {
|
||||
system(sed -i -e $$shell_quote(s|$$2|$$3|g) $$shell_quote($$file))
|
||||
}
|
||||
}
|
||||
|
||||
defineTest(checkICU_common) {
|
||||
testDir = $$1
|
||||
outputDir = $$2
|
||||
|
||||
exists($$testDir/libicu*) {
|
||||
system(cp -f -av "$$testDir/libicui18n*" $$shell_quote($$outputDir/) $$escape_expand(\\n\\t))
|
||||
system(cp -f -av "$$testDir/libicuuc*" $$shell_quote($$outputDir/) $$escape_expand(\\n\\t))
|
||||
system(cp -f -av "$$testDir/libicudata*" $$shell_quote($$outputDir/) $$escape_expand(\\n\\t))
|
||||
return(true)
|
||||
}
|
||||
return(false)
|
||||
}
|
||||
|
||||
defineTest(copyQtICU) {
|
||||
testDir = $$1
|
||||
outputDir = $$2
|
||||
|
||||
checkICU_common($$testDir, $$outputDir) {
|
||||
return(true)
|
||||
}
|
||||
|
||||
checkICU_common(/lib, $$outputDir) {
|
||||
return(true)
|
||||
}
|
||||
|
||||
checkICU_common(/lib/x86_64-linux-gnu, $$outputDir) {
|
||||
return(true)
|
||||
}
|
||||
|
||||
checkICU_common(/lib64, $$outputDir) {
|
||||
return(true)
|
||||
}
|
||||
|
||||
checkICU_common(/lib64/x86_64-linux-gnu, $$outputDir) {
|
||||
return(true)
|
||||
}
|
||||
|
||||
checkICU_common(/usr/lib, $$outputDir) {
|
||||
return(true)
|
||||
}
|
||||
|
||||
checkICU_common(/usr/lib/x86_64-linux-gnu, $$outputDir) {
|
||||
return(true)
|
||||
}
|
||||
|
||||
checkICU_common(/usr/lib64, $$outputDir) {
|
||||
return(true)
|
||||
}
|
||||
|
||||
checkICU_common(/usr/lib64/x86_64-linux-gnu, $$outputDir) {
|
||||
return(true)
|
||||
}
|
||||
|
||||
checkICU_common(/lib/i386-linux-gnu, $$outputDir) {
|
||||
return(true)
|
||||
}
|
||||
|
||||
checkICU_common(/usr/lib/i386-linux-gnu, $$outputDir) {
|
||||
return(true)
|
||||
}
|
||||
|
||||
return(false)
|
||||
}
|
||||
85
scripts/config.py
Normal file
85
scripts/config.py
Normal file
@ -0,0 +1,85 @@
|
||||
import base
|
||||
import os
|
||||
|
||||
def parse():
|
||||
configfile = open(base.get_script_path() + "/../config", "r")
|
||||
configOptions = {}
|
||||
for line in configfile:
|
||||
name, value = line.partition("=")[::2]
|
||||
k = name.strip()
|
||||
v = value.strip(" '\"\r\n")
|
||||
configOptions[k] = v
|
||||
os.environ["OO_" + k.upper().replace("-", "_")] = v
|
||||
|
||||
#export options
|
||||
global options
|
||||
options = configOptions
|
||||
|
||||
#all platforms
|
||||
global platforms
|
||||
platforms = ["win_64", "win_32", "win_64_xp", "win_32_xp", "linux_64", "linux_32", "mac_64", "ios"]
|
||||
|
||||
#correction
|
||||
|
||||
host_platform = base.host_platform()
|
||||
#platform
|
||||
if check_option("platform", "all"):
|
||||
if ("windows" == host_platform):
|
||||
options["platform"] += "win_64 win_32"
|
||||
elif ("linux" == host_platform):
|
||||
options["platform"] += "linux_64 linux_32"
|
||||
else:
|
||||
options["platform"] += "mac_64"
|
||||
|
||||
if check_option("platform", "xp") and ("windows" == host_platform):
|
||||
options["platform"] += "win_64_xp win_32_xp"
|
||||
|
||||
#correct compiler
|
||||
if ("" == option("compiler")):
|
||||
if ("windows" == host_platform):
|
||||
options["compiler"] = "msvc2015"
|
||||
options["compiler_64"] = "msvc2015"
|
||||
elif ("linux" == host_platform):
|
||||
options["compiler"] = "gcc"
|
||||
options["compiler_64"] = "gcc_64"
|
||||
elif ("mac" == host_platform):
|
||||
options["compiler"] += "clang"
|
||||
options["compiler_64"] += "clang_64"
|
||||
elif ("ios" == host_platform):
|
||||
options["compiler"] += "ios"
|
||||
options["compiler_64"] += "ios"
|
||||
elif ("windows" == host_platform):
|
||||
options["compiler_64"] = options["compiler"] + "_64"
|
||||
elif ("linux" == host_platform):
|
||||
options["compiler_64"] = options["compiler"] + "_64"
|
||||
elif ("mac" == host_platform):
|
||||
options["compiler_64"] = options["compiler"] + "_64"
|
||||
else:
|
||||
options["compiler_64"] = options["compiler"]
|
||||
|
||||
#check vs-path
|
||||
if ("windows" == host_platform):
|
||||
options["vs-path"] = base.get_env("ProgramFiles") + "/Microsoft Visual Studio 14.0/VC"
|
||||
if ("" != base.get_env("ProgramFiles(x86)")):
|
||||
options["vs-path"] = base.get_env("ProgramFiles(x86)") + "/Microsoft Visual Studio 14.0/VC"
|
||||
|
||||
return
|
||||
|
||||
def check_option(name, value):
|
||||
if not name in options
|
||||
return False
|
||||
tmp = " " + options[name] + " "
|
||||
if (-1 == tmp.find(" " + value + " ")):
|
||||
return False
|
||||
return True
|
||||
|
||||
def option(name):
|
||||
if name in options:
|
||||
return options[name]
|
||||
return ""
|
||||
|
||||
def extend_option(name, value):
|
||||
if name in options:
|
||||
options[name] = options[name] + " " + value
|
||||
else:
|
||||
options[name] = value
|
||||
@ -1,39 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
key=$1
|
||||
var=$2
|
||||
val=$3
|
||||
|
||||
isfound=false
|
||||
|
||||
while read line; do
|
||||
IFS='=' read -ra values <<< "$line"
|
||||
iskey=true
|
||||
isnextval=false
|
||||
for item in "${values[@]}"; do
|
||||
if [ "$iskey" = false ]
|
||||
then
|
||||
if [ "$isnextval" = true ]
|
||||
then
|
||||
val=$item
|
||||
isfound=true
|
||||
break
|
||||
fi
|
||||
iskey=true
|
||||
continue
|
||||
fi
|
||||
if [ "$item" = "$key" ]
|
||||
then
|
||||
isnextval=true
|
||||
fi
|
||||
iskey=false
|
||||
done
|
||||
done < "config"
|
||||
|
||||
if [ "$isfound" = false ]
|
||||
then
|
||||
export $var="$val"
|
||||
else
|
||||
#export $var="${val:1:(-1)}"
|
||||
export $var="${val:1:${#val}-2}"
|
||||
fi
|
||||
@ -1,20 +0,0 @@
|
||||
@echo off
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
set key=%~1
|
||||
|
||||
set "returnvalue=%~3"
|
||||
for /f "tokens=1,2 delims==" %%i in (config) do (
|
||||
set keyL=%%i
|
||||
set valueL=%%j
|
||||
|
||||
if "%key%"=="!keyL!" (
|
||||
set "returnvalue=!valueL:~1,-1!"
|
||||
goto :end
|
||||
)
|
||||
)
|
||||
|
||||
:end
|
||||
endlocal & set "%~2=%returnvalue%"
|
||||
|
||||
@echo on
|
||||
@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo apt-get -y install apt-transport-https \
|
||||
autoconf2.13 \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
cmake \
|
||||
curl \
|
||||
git \
|
||||
glib-2.0-dev \
|
||||
libgconf2-4 \
|
||||
libglu1-mesa-dev \
|
||||
libgtk2.0-dev \
|
||||
libpulse-dev \
|
||||
libtool \
|
||||
libxss1 \
|
||||
p7zip-full \
|
||||
subversion
|
||||
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
|
||||
sudo apt-get install -y nodejs
|
||||
sudo npm install -g npm
|
||||
sudo npm install -g grunt-cli
|
||||
|
||||
# Ubuntu 14
|
||||
sudo apt-get -y install software-properties-common
|
||||
sudo add-apt-repository ppa:openjdk-r/ppa
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install openjdk-8-jdk
|
||||
sudo update-alternatives --config java
|
||||
sudo update-alternatives --config javac
|
||||
@ -1,73 +0,0 @@
|
||||
#!/bin/bash
|
||||
SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
source ./scripts/config_value module OO_MODULE "desktop builder"
|
||||
source ./scripts/config_value platform OO_PLATFORM native
|
||||
source ./scripts/config_value qt-dir OO_QT_DIR "set qt path"
|
||||
source ./scripts/config_value compiler OO_COMPILER gcc
|
||||
|
||||
OO_COMPILER_X64="${OO_COMPILER}_64"
|
||||
|
||||
IS_NEED_64=false
|
||||
IS_NEED_32=false
|
||||
|
||||
if [[ "$OO_PLATFORM" == *"all"* ]]
|
||||
then
|
||||
IS_NEED_64=true
|
||||
IS_NEED_32=true
|
||||
fi
|
||||
|
||||
if [[ "$OO_PLATFORM" == *"x64"* ]] || \
|
||||
[[ "$OO_PLATFORM" == *"linux_64"* ]] || \
|
||||
[[ "$OO_PLATFORM" == *"mac_64"* ]]
|
||||
then
|
||||
IS_NEED_64=true
|
||||
fi
|
||||
|
||||
if [[ "$OO_PLATFORM" == *"x86"* ]] || \
|
||||
[[ "$OO_PLATFORM" == *"linux_32"* ]]
|
||||
then
|
||||
IS_NEED_32=true
|
||||
fi
|
||||
|
||||
if [[ "$OO_PLATFORM" == *"native"* ]]
|
||||
then
|
||||
architecture=$(uname -m)
|
||||
case "$architecture" in
|
||||
x86_64*) IS_NEED_64=true ;;
|
||||
*) IS_NEED_32=true ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
OO_OS=$(uname -s)
|
||||
OS_DEPLOY_64=""
|
||||
case "$OO_OS" in
|
||||
Linux*) OS_DEPLOY_64="linux_64" ;;
|
||||
Darwin*) OS_DEPLOY_64="mac_64" ;;
|
||||
*) exit ;;
|
||||
esac
|
||||
|
||||
if [[ "$OS_DEPLOY_64" == "mac_64" ]]
|
||||
then
|
||||
IS_NEED_32=false
|
||||
fi
|
||||
|
||||
if [[ "${OO_COMPILER}" == "ios" ]]
|
||||
then
|
||||
OO_COMPILER_X64="${OO_COMPILER}"
|
||||
OS_DEPLOY_64=ios
|
||||
fi
|
||||
|
||||
if [[ "$IS_NEED_64" == true ]]
|
||||
then
|
||||
export QT_DEPLOY="${OO_QT_DIR}/${OO_COMPILER_X64}/bin"
|
||||
export OS_DEPLOY=$OS_DEPLOY_64
|
||||
"$QT_DEPLOY/qmake" -nocache "$SCRIPTPATH/deploy.pro" "CONFIG+=${OO_CONFIG} $OO_MODULE"
|
||||
fi
|
||||
|
||||
if [[ "$IS_NEED_32" == true ]]
|
||||
then
|
||||
export QT_DEPLOY="${OO_QT_DIR}/${OO_COMPILER}/bin"
|
||||
export OS_DEPLOY=linux_32
|
||||
"$QT_DEPLOY/qmake" -nocache "$SCRIPTPATH/deploy.pro" "CONFIG+=${OO_CONFIG} $OO_MODULE"
|
||||
fi
|
||||
@ -1,84 +0,0 @@
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
call %~dp0config_value.bat module OO_MODULE "desktop builder"
|
||||
call %~dp0config_value.bat platform OO_PLATFORM "native"
|
||||
call %~dp0config_value.bat qt-dir OO_QT_DIR "set qt path"
|
||||
call %~dp0config_value.bat qt-dir-xp OO_QT_XP_DIR "set qt path (windows xp version)"
|
||||
|
||||
SET "OO_VS_DIR=%ProgramFiles%\Microsoft Visual Studio 14.0\VC"
|
||||
if defined ProgramFiles(x86) (
|
||||
SET "OO_VS_DIR=%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC"
|
||||
)
|
||||
|
||||
cd %~dp0..
|
||||
|
||||
set "IS_NEED_64=0"
|
||||
set "IS_NEED_32=0"
|
||||
set "IS_NEED_XP_64=0"
|
||||
set "IS_NEED_XP_32=0"
|
||||
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:win_64_xp=%" (
|
||||
set "IS_NEED_XP_64=1"
|
||||
set "OO_PLATFORM=%OO_PLATFORM:win_64_xp=%"
|
||||
)
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:win_32_xp=%" (
|
||||
set "IS_NEED_XP_32=1"
|
||||
set "OO_PLATFORM=%OO_PLATFORM:win_32_xp=%"
|
||||
)
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:xp=%" (
|
||||
set "IS_NEED_XP_64=1"
|
||||
set "IS_NEED_XP_32=1"
|
||||
set "OO_PLATFORM=%OO_PLATFORM:xp=%"
|
||||
)
|
||||
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:all=%" (
|
||||
set "IS_NEED_64=1"
|
||||
set "IS_NEED_32=1"
|
||||
)
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:x64=%" (
|
||||
set "IS_NEED_64=1"
|
||||
)
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:win_64=%" (
|
||||
set "IS_NEED_64=1"
|
||||
)
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:x86=%" (
|
||||
set "IS_NEED_32=1"
|
||||
)
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:win_32=%" (
|
||||
set "IS_NEED_32=1"
|
||||
)
|
||||
|
||||
if not "%OO_PLATFORM%"=="%OO_PLATFORM:native=%" (
|
||||
if exist "%PROGRAMFILES(X86)%" (
|
||||
set "IS_NEED_64=1"
|
||||
) else (
|
||||
set "IS_NEED_32=1"
|
||||
)
|
||||
)
|
||||
|
||||
if "%IS_NEED_64%"=="1" (
|
||||
call "%OO_VS_DIR%\vcvarsall.bat" x64
|
||||
set "QT_DEPLOY=%OO_QT_DIR%\msvc2015_64\bin"
|
||||
set "OS_DEPLOY=win_64"
|
||||
call "!QT_DEPLOY!\qmake" -nocache %~dp0deploy.pro "CONFIG+=%OO_CONFIG% %OO_MODULE%"
|
||||
)
|
||||
if "%IS_NEED_32%"=="1" (
|
||||
call "%OO_VS_DIR%\vcvarsall.bat" x86
|
||||
set "QT_DEPLOY=%OO_QT_DIR%\msvc2015\bin"
|
||||
set "OS_DEPLOY=win_32"
|
||||
call "!QT_DEPLOY!\qmake" -nocache %~dp0deploy.pro "CONFIG+=%OO_CONFIG% %OO_MODULE%"
|
||||
)
|
||||
if "%IS_NEED_XP_64%"=="1" (
|
||||
call "%OO_VS_DIR%\vcvarsall.bat" x64
|
||||
set "QT_DEPLOY=%OO_QT_XP_DIR%\msvc2015_64\bin"
|
||||
set "OS_DEPLOY=win_64"
|
||||
call "!QT_DEPLOY!\qmake" -nocache %~dp0deploy.pro "CONFIG+=%OO_CONFIG% %OO_MODULE% build_xp"
|
||||
)
|
||||
if "%IS_NEED_XP_32%"=="1" (
|
||||
call "%OO_VS_DIR%\vcvarsall.bat" x86
|
||||
set "QT_DEPLOY=%OO_QT_XP_DIR%\msvc2015\bin"
|
||||
set "OS_DEPLOY=win_32"
|
||||
call "!QT_DEPLOY!\qmake" -nocache %~dp0deploy.pro "CONFIG+=%OO_CONFIG% %OO_MODULE% build_xp"
|
||||
)
|
||||
|
||||
endlocal
|
||||
@ -1,349 +0,0 @@
|
||||
TEMPLATE=aux
|
||||
|
||||
include($$PWD/../../core/Common/base.pri)
|
||||
include($$PWD/common.pri)
|
||||
|
||||
MAKEFILE=$$PWD/../makefiles/deploy.makefile_$$CORE_BUILDS_PLATFORM_PREFIX
|
||||
build_xp {
|
||||
MAKEFILE=$$join(MAKEFILE, MAKEFILE, "", "_xp")
|
||||
}
|
||||
|
||||
OS_CURRENT=$$(OS_DEPLOY)
|
||||
QT_CURRENT=$$(QT_DEPLOY)
|
||||
|
||||
APPS_POSTFIX=$$OS_CURRENT
|
||||
OS_CURRENT_DEPLOY=$$OS_CURRENT
|
||||
build_xp {
|
||||
APPS_POSTFIX=$$join(APPS_POSTFIX, APPS_POSTFIX, "", "_xp")
|
||||
OS_CURRENT_DEPLOY=$$join(OS_CURRENT_DEPLOY, OS_CURRENT_DEPLOY, "", "_xp")
|
||||
}
|
||||
core_windows {
|
||||
APPS_POSTFIX=$$join(APPS_POSTFIX, APPS_POSTFIX, "", ".exe")
|
||||
}
|
||||
|
||||
ROOT_GIT_DIR=$$PWD/../..
|
||||
DEPLOY_DIR=$$PWD/../out
|
||||
|
||||
PUBLISHER_NAME = $$(OO_BRANDING)
|
||||
isEmpty(PUBLISHER_NAME) {
|
||||
core_windows {
|
||||
PUBLISHER_NAME=ONLYOFFICE
|
||||
} else {
|
||||
PUBLISHER_NAME=onlyoffice
|
||||
}
|
||||
}
|
||||
|
||||
THEMES_PARAMS = $$(OO_THEMES_PARAMS)
|
||||
|
||||
createDirectory($$DEPLOY_DIR)
|
||||
createDirectory($$DEPLOY_DIR/$$OS_CURRENT_DEPLOY)
|
||||
createDirectory($$DEPLOY_DIR/$$OS_CURRENT_DEPLOY/$$PUBLISHER_NAME)
|
||||
|
||||
JS_ROOT=$$DEPLOY_DIR/js/$$PUBLISHER_NAME
|
||||
DEPLOY_DIR=$$DEPLOY_DIR/$$OS_CURRENT_DEPLOY/$$PUBLISHER_NAME
|
||||
|
||||
desktop {
|
||||
|
||||
core_windows {
|
||||
CUR_ROOT=$$DEPLOY_DIR/DesktopEditors
|
||||
} else {
|
||||
CUR_ROOT=$$DEPLOY_DIR/desktopeditors
|
||||
}
|
||||
removeDirectory($$CUR_ROOT)
|
||||
createDirectory($$CUR_ROOT)
|
||||
|
||||
createDirectory($$CUR_ROOT/converter)
|
||||
copyFile($$ROOT_GIT_DIR/core/build/bin/$$OS_CURRENT/x2t$$EXE_EXT, $$CUR_ROOT/converter/x2t$$EXE_EXT)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT/converter, kernel)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT/converter, UnicodeConverter)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT/converter, graphics)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT/converter, PdfWriter)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT/converter, PdfReader)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT/converter, DjVuFile)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT/converter, XpsFile)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT/converter, HtmlFile)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT/converter, HtmlRenderer)
|
||||
|
||||
core_ios {
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, x2t)
|
||||
}
|
||||
|
||||
core_windows {
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/icu/$$OS_CURRENT/build/icudt58.dll, $$CUR_ROOT/converter/icudt58.dll)
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/icu/$$OS_CURRENT/build/icuuc58.dll, $$CUR_ROOT/converter/icuuc58.dll)
|
||||
}
|
||||
core_linux {
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/icu/$$OS_CURRENT/build/libicudata.so.58, $$CUR_ROOT/converter/libicudata.so.58)
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/icu/$$OS_CURRENT/build/libicuuc.so.58, $$CUR_ROOT/converter/libicuuc.so.58)
|
||||
}
|
||||
core_mac {
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/icu/$$OS_CURRENT/build/libicudata.58.dylib, $$CUR_ROOT/converter/libicudata.58.dylib)
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/icu/$$OS_CURRENT/build/libicuuc.58.dylib, $$CUR_ROOT/converter/libicuuc.58.dylib)
|
||||
}
|
||||
|
||||
build_xp {
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT/xp, $$CUR_ROOT/converter, doctrenderer)
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/v8/v8_xp/$$OS_CURRENT/release/icudt*.dll, $$CUR_ROOT/converter/)
|
||||
} else {
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT/converter, doctrenderer)
|
||||
|
||||
core_windows {
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/v8/v8/out.gn/$$OS_CURRENT/release/icudt*.dat, $$CUR_ROOT/converter/)
|
||||
} else {
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/v8/v8/out.gn/$$OS_CURRENT/icudtl.dat, $$CUR_ROOT/converter/)
|
||||
}
|
||||
}
|
||||
|
||||
copyFile($$ROOT_GIT_DIR/desktop-apps/common/converter/DoctRenderer.config, $$CUR_ROOT/converter/DoctRenderer.config)
|
||||
copyDirectory($$ROOT_GIT_DIR/desktop-apps/common/converter/empty, $$CUR_ROOT/converter/empty)
|
||||
|
||||
!core_mac {
|
||||
!build_xp {
|
||||
copyFile($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT/HtmlFileInternal$$EXE_EXT, $$CUR_ROOT/HtmlFileInternal$$EXE_EXT)
|
||||
}
|
||||
}
|
||||
|
||||
copyDirectory($$ROOT_GIT_DIR/dictionaries, $$CUR_ROOT/dictionaries)
|
||||
removeDirectory($$CUR_ROOT/dictionaries/.git)
|
||||
|
||||
copyDirectory($$ROOT_GIT_DIR/desktop-apps/common/package/fonts, $$CUR_ROOT/fonts)
|
||||
copyFile($$ROOT_GIT_DIR/desktop-apps/common/package/license/3dparty/3DPARTYLICENSE, $$CUR_ROOT/3DPARTYLICENSE)
|
||||
|
||||
!build_xp {
|
||||
copyDirectory($$ROOT_GIT_DIR/core/Common/3dParty/cef/$$OS_CURRENT/build/., $$CUR_ROOT/)
|
||||
} else {
|
||||
core_win_64 {
|
||||
copyDirectory($$ROOT_GIT_DIR/core/Common/3dParty/cef/winxp_64/build, $$CUR_ROOT/.)
|
||||
} else {
|
||||
copyDirectory($$ROOT_GIT_DIR/core/Common/3dParty/cef/winxp_32/build, $$CUR_ROOT/.)
|
||||
}
|
||||
}
|
||||
|
||||
core_mac {
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, hunspell)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, ooxmlsignature)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, ascdocumentscore)
|
||||
copyDirectory("$$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT/ONLYOFFICE Helper.app", $$CUR_ROOT/)
|
||||
} else {
|
||||
copyQtLib(Qt5Core, $$CUR_ROOT)
|
||||
copyQtLib(Qt5Gui, $$CUR_ROOT)
|
||||
copyQtLib(Qt5PrintSupport, $$CUR_ROOT)
|
||||
copyQtLib(Qt5Svg, $$CUR_ROOT)
|
||||
copyQtLib(Qt5Widgets, $$CUR_ROOT)
|
||||
copyQtLib(Qt5Multimedia, $$CUR_ROOT)
|
||||
copyQtLib(Qt5MultimediaWidgets, $$CUR_ROOT)
|
||||
copyQtLib(Qt5Network, $$CUR_ROOT)
|
||||
copyQtLib(Qt5OpenGL, $$CUR_ROOT)
|
||||
|
||||
core_linux {
|
||||
copyQtICU($$QT_CURRENT/../lib, $$CUR_ROOT)
|
||||
}
|
||||
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, hunspell)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, ooxmlsignature)
|
||||
|
||||
build_xp {
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT/xp, $$CUR_ROOT, videoplayer)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT/xp, $$CUR_ROOT, ascdocumentscore)
|
||||
} else {
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, videoplayer)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, ascdocumentscore)
|
||||
}
|
||||
|
||||
copyQtPlugin($$QT_CURRENT/../plugins/bearer, $$CUR_ROOT/bearer)
|
||||
copyQtPlugin($$QT_CURRENT/../plugins/iconengines, $$CUR_ROOT/iconengines)
|
||||
copyQtPlugin($$QT_CURRENT/../plugins/imageformats, $$CUR_ROOT/imageformats)
|
||||
copyQtPlugin($$QT_CURRENT/../plugins/platforms, $$CUR_ROOT/platforms)
|
||||
copyQtPlugin($$QT_CURRENT/../plugins/platforminputcontexts, $$CUR_ROOT/platforminputcontexts)
|
||||
copyQtPlugin($$QT_CURRENT/../plugins/printsupport, $$CUR_ROOT/printsupport)
|
||||
copyQtPlugin($$QT_CURRENT/../plugins/mediaservice, $$CUR_ROOT/mediaservice)
|
||||
copyQtPlugin($$QT_CURRENT/../plugins/playlistformats, $$CUR_ROOT/playlistformats)
|
||||
}
|
||||
|
||||
core_linux {
|
||||
copyQtLib(Qt5DBus, $$CUR_ROOT)
|
||||
copyQtLib(Qt5X11Extras, $$CUR_ROOT)
|
||||
copyQtLib(Qt5XcbQpa, $$CUR_ROOT)
|
||||
|
||||
copyQtPlugin($$QT_CURRENT/../plugins/platformthemes, $$CUR_ROOT/platformthemes)
|
||||
copyQtPlugin($$QT_CURRENT/../plugins/xcbglintegrations, $$CUR_ROOT/xcbglintegrations)
|
||||
|
||||
system(cp -f -av "$$QT_CURRENT/../lib/libqgsttools_p.so*" $$shell_quote($$CUR_ROOT/) $$escape_expand(\\n\\t))
|
||||
}
|
||||
|
||||
core_windows {
|
||||
!build_xp {
|
||||
copyQtPlugin($$QT_CURRENT/../plugins/styles, $$CUR_ROOT/styles)
|
||||
}
|
||||
}
|
||||
|
||||
core_windows {
|
||||
copyFile($$ROOT_GIT_DIR/desktop-apps/win-linux/extras/projicons/projicons_$$APPS_POSTFIX, $$CUR_ROOT/DesktopEditors.exe)
|
||||
copyFile($$ROOT_GIT_DIR/desktop-apps/win-linux/DesktopEditors_$$APPS_POSTFIX, $$CUR_ROOT/editors.exe)
|
||||
copyFile($$ROOT_GIT_DIR/desktop-apps/win-linux/res/icons/desktopeditors.ico, $$CUR_ROOT/app.ico)
|
||||
}
|
||||
core_linux {
|
||||
copyFile($$ROOT_GIT_DIR/desktop-apps/win-linux/DesktopEditors_$$APPS_POSTFIX, $$CUR_ROOT/DesktopEditors)
|
||||
}
|
||||
|
||||
createDirectory($$CUR_ROOT/editors)
|
||||
copyDirectory($$JS_ROOT/desktop/sdkjs, $$CUR_ROOT/editors/sdkjs)
|
||||
copyDirectory($$JS_ROOT/desktop/web-apps, $$CUR_ROOT/editors/web-apps)
|
||||
copyFile($$JS_ROOT/desktop/index.html, $$CUR_ROOT/index.html)
|
||||
|
||||
copyFile($$ROOT_GIT_DIR/desktop-apps/common/loginpage/addon/externalcloud.json, $$CUR_ROOT/editors/externalcloud.json)
|
||||
|
||||
createDirectory($$CUR_ROOT/editors/sdkjs-plugins)
|
||||
copyFile($$ROOT_GIT_DIR/sdkjs-plugins/LICENSE.txt, $$CUR_ROOT/editors/sdkjs-plugins/LICENSE.txt)
|
||||
copyFile($$ROOT_GIT_DIR/sdkjs-plugins/README.md, $$CUR_ROOT/editors/sdkjs-plugins/README.md)
|
||||
copyFile($$ROOT_GIT_DIR/sdkjs-plugins/plugins.css, $$CUR_ROOT/editors/sdkjs-plugins/plugins.css)
|
||||
copyFile($$ROOT_GIT_DIR/sdkjs-plugins/pluginBase.js, $$CUR_ROOT/editors/sdkjs-plugins/pluginBase.js)
|
||||
|
||||
copyDirectory($$ROOT_GIT_DIR/sdkjs-plugins/symboltable, $$CUR_ROOT/editors/sdkjs-plugins/{03C18A8D-8E01-444A-86EB-EDDFA7773157})
|
||||
copyDirectory($$ROOT_GIT_DIR/sdkjs-plugins/youtube, $$CUR_ROOT/editors/sdkjs-plugins/{38E022EA-AD92-45FC-B22B-49DF39746DB4})
|
||||
copyDirectory($$ROOT_GIT_DIR/sdkjs-plugins/ocr, $$CUR_ROOT/editors/sdkjs-plugins/{440EBF13-9B19-4BD8-8621-05200E58140B})
|
||||
copyDirectory($$ROOT_GIT_DIR/sdkjs-plugins/translate, $$CUR_ROOT/editors/sdkjs-plugins/{7327FC95-16DA-41D9-9AF2-0E7F449F687D})
|
||||
copyDirectory($$ROOT_GIT_DIR/sdkjs-plugins/synonim, $$CUR_ROOT/editors/sdkjs-plugins/{BE5CBF95-C0AD-4842-B157-AC40FEDD9840})
|
||||
copyDirectory($$ROOT_GIT_DIR/sdkjs-plugins/code, $$CUR_ROOT/editors/sdkjs-plugins/{BE5CBF95-C0AD-4842-B157-AC40FEDD9841})
|
||||
copyDirectory($$ROOT_GIT_DIR/sdkjs-plugins/photoeditor, $$CUR_ROOT/editors/sdkjs-plugins/{07FD8DFA-DFE0-4089-AL24-0730933CC80A})
|
||||
copyDirectory($$ROOT_GIT_DIR/sdkjs-plugins/macros, $$CUR_ROOT/editors/sdkjs-plugins/{E6978D28-0441-4BD7-8346-82FAD68BCA3B})
|
||||
# copyDirectory($$ROOT_GIT_DIR/sdkjs-plugins/clipart, $$CUR_ROOT/editors/sdkjs-plugins/{F5BACB61-64C5-4711-AC8A-D01EC3B2B6F1})
|
||||
|
||||
copyDirectory($$ROOT_GIT_DIR/desktop-sdk/ChromiumBasedEditors/plugins/{8D67F3C5-7736-4BAE-A0F2-8C7127DC4BB8}, $$CUR_ROOT/editors/sdkjs-plugins/{8D67F3C5-7736-4BAE-A0F2-8C7127DC4BB8})
|
||||
|
||||
!core_mac {
|
||||
copyDirectory($$ROOT_GIT_DIR/desktop-sdk/ChromiumBasedEditors/plugins/{060E6A7D-2766-44E8-A0EE-9A8CB9DB00D1}, $$CUR_ROOT/editors/sdkjs-plugins/{060E6A7D-2766-44E8-A0EE-9A8CB9DB00D1})
|
||||
copyDirectory($$ROOT_GIT_DIR/desktop-sdk/ChromiumBasedEditors/plugins/{B509123E-6335-40BD-B965-91EB799346E3}, $$CUR_ROOT/editors/sdkjs-plugins/{B509123E-6335-40BD-B965-91EB799346E3})
|
||||
copyDirectory($$ROOT_GIT_DIR/desktop-sdk/ChromiumBasedEditors/plugins/{F7E59EB4-317E-4E0B-AB2C-58E038A59EE2}, $$CUR_ROOT/editors/sdkjs-plugins/{F7E59EB4-317E-4E0B-AB2C-58E038A59EE2})
|
||||
}
|
||||
|
||||
copyDirectory($$ROOT_GIT_DIR/desktop-sdk/ChromiumBasedEditors/plugins/encrypt/ui/common/{14A8FC87-8E26-4216-B34E-F27F053B2EC4}, $$CUR_ROOT/editors/sdkjs-plugins/{14A8FC87-8E26-4216-B34E-F27F053B2EC4})
|
||||
copyDirectory($$ROOT_GIT_DIR/desktop-sdk/ChromiumBasedEditors/plugins/encrypt/ui/engine/blockchain/{B17BDC61-59FC-41A7-A471-CD2C415A665E}, $$CUR_ROOT/editors/sdkjs-plugins/{B17BDC61-59FC-41A7-A471-CD2C415A665E})
|
||||
|
||||
core_windows {
|
||||
updmodule {
|
||||
copyFile($$ROOT_GIT_DIR/desktop-apps/win-linux/3dparty/WinSparkle/$$OS_CURRENT/WinSparkle$$LIB_EXT, $$CUR_ROOT/WinSparkle$$LIB_EXT)
|
||||
}
|
||||
|
||||
removeFile($$CUR_ROOT/cef_sandbox.lib)
|
||||
removeFile($$CUR_ROOT/libcef.lib)
|
||||
}
|
||||
|
||||
# all themes generate ----
|
||||
copyFile($$ROOT_GIT_DIR/core/build/bin/$$OS_CURRENT/allfontsgen$$EXE_EXT, $$CUR_ROOT/converter/allfontsgen$$EXE_EXT)
|
||||
copyFile($$ROOT_GIT_DIR/core/build/bin/$$OS_CURRENT/allthemesgen$$EXE_EXT, $$CUR_ROOT/converter/allthemesgen$$EXE_EXT)
|
||||
|
||||
LIB_CONVERTER=
|
||||
core_linux {
|
||||
LIB_CONVERTER="LD_LIBRARY_PATH=$$CUR_ROOT/converter"
|
||||
}
|
||||
core_mac {
|
||||
LIB_CONVERTER="DYLD_LIBRARY_PATH=$$CUR_ROOT/converter"
|
||||
}
|
||||
|
||||
system($$LIB_CONVERTER $$CUR_ROOT/converter/allfontsgen$$EXE_EXT --use-system="1" --input="$$CUR_ROOT/fonts" --allfonts="$$CUR_ROOT/converter/AllFonts.js" --selection="$$CUR_ROOT/converter/font_selection.bin")
|
||||
system($$LIB_CONVERTER $$CUR_ROOT/converter/allthemesgen$$EXE_EXT --converter-dir="$$CUR_ROOT/converter" --src="$$CUR_ROOT/editors/sdkjs/slide/themes" --output="$$CUR_ROOT/editors/sdkjs/common/Images" --allfonts="AllFonts.js" --params="$$THEMES_PARAMS")
|
||||
|
||||
removeFile($$CUR_ROOT/converter/allfontsgen$$EXE_EXT)
|
||||
removeFile($$CUR_ROOT/converter/allthemesgen$$EXE_EXT)
|
||||
removeFile($$CUR_ROOT/converter/AllFonts.js)
|
||||
removeFile($$CUR_ROOT/converter/font_selection.bin)
|
||||
removeFile($$CUR_ROOT/editors/sdkjs/slide/sdk-all.cache)
|
||||
# ----
|
||||
}
|
||||
|
||||
builder {
|
||||
|
||||
core_windows {
|
||||
CUR_ROOT=$$DEPLOY_DIR/DocumentBuilder
|
||||
} else {
|
||||
CUR_ROOT=$$DEPLOY_DIR/documentbuilder
|
||||
}
|
||||
removeDirectory($$CUR_ROOT)
|
||||
createDirectory($$CUR_ROOT)
|
||||
|
||||
copyFile($$ROOT_GIT_DIR/core/build/bin/$$OS_CURRENT/x2t$$EXE_EXT, $$CUR_ROOT/x2t$$EXE_EXT)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, kernel)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, UnicodeConverter)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, graphics)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, PdfWriter)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, PdfReader)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, DjVuFile)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, XpsFile)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, HtmlFile)
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, HtmlRenderer)
|
||||
|
||||
core_ios {
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, x2t)
|
||||
}
|
||||
|
||||
core_windows {
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/icu/$$OS_CURRENT/build/icudt58.dll, $$CUR_ROOT/icudt58.dll)
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/icu/$$OS_CURRENT/build/icuuc58.dll, $$CUR_ROOT/icuuc58.dll)
|
||||
}
|
||||
core_linux {
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/icu/$$OS_CURRENT/build/libicudata.so.58, $$CUR_ROOT/libicudata.so.58)
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/icu/$$OS_CURRENT/build/libicuuc.so.58, $$CUR_ROOT/libicuuc.so.58)
|
||||
}
|
||||
core_mac {
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/icu/$$OS_CURRENT/build/libicudata.58.dylib, $$CUR_ROOT/libicudata.58.dylib)
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/icu/$$OS_CURRENT/build/libicuuc.58.dylib, $$CUR_ROOT/libicuuc.58.dylib)
|
||||
}
|
||||
|
||||
build_xp {
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT/xp, $$CUR_ROOT, doctrenderer)
|
||||
copyFile($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT/xp/doctrenderer.lib, $$CUR_ROOT/doctrenderer.lib)
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/v8/v8_xp/$$OS_CURRENT/release/icudt*.dll, $$CUR_ROOT/)
|
||||
} else {
|
||||
copyLib($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT, $$CUR_ROOT, doctrenderer)
|
||||
|
||||
core_windows {
|
||||
copyFile($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT/doctrenderer.lib, $$CUR_ROOT/doctrenderer.lib)
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/v8/v8/out.gn/$$OS_CURRENT/release/icudt*.dat, $$CUR_ROOT/)
|
||||
} else {
|
||||
copyFile($$ROOT_GIT_DIR/core/Common/3dParty/v8/v8/out.gn/$$OS_CURRENT/icudtl.dat, $$CUR_ROOT/)
|
||||
}
|
||||
}
|
||||
|
||||
!build_xp {
|
||||
|
||||
!core_mac {
|
||||
!build_xp {
|
||||
createDirectory($$CUR_ROOT/HtmlFileInternal)
|
||||
copyFile($$ROOT_GIT_DIR/core/build/lib/$$OS_CURRENT/HtmlFileInternal$$EXE_EXT, $$CUR_ROOT/HtmlFileInternal/HtmlFileInternal$$EXE_EXT)
|
||||
copyDirectory($$ROOT_GIT_DIR/core/Common/3dParty/cef/$$OS_CURRENT/build/., $$CUR_ROOT/HtmlFileInternal/.)
|
||||
}
|
||||
}
|
||||
|
||||
core_windows {
|
||||
removeFile($$CUR_ROOT/HtmlFileInternal/cef_sandbox.lib)
|
||||
removeFile($$CUR_ROOT/HtmlFileInternal/libcef.lib)
|
||||
}
|
||||
}
|
||||
|
||||
copyFile($$ROOT_GIT_DIR/core/build/bin/$$OS_CURRENT/docbuilder$$EXE_EXT, $$CUR_ROOT/docbuilder$$EXE_EXT)
|
||||
|
||||
copyFile($$ROOT_GIT_DIR/DocumentBuilder/DoctRenderer.config, $$CUR_ROOT/DoctRenderer.config)
|
||||
|
||||
copyDirectory($$JS_ROOT/builder/sdkjs, $$CUR_ROOT/sdkjs)
|
||||
createDirectory($$CUR_ROOT/sdkjs/vendor)
|
||||
copyDirectory($$JS_ROOT/builder/web-apps/vendor/jquery, $$CUR_ROOT/sdkjs/vendor/jquery)
|
||||
copyDirectory($$JS_ROOT/builder/web-apps/vendor/xregexp, $$CUR_ROOT/sdkjs/vendor/xregexp)
|
||||
|
||||
copyDirectory($$ROOT_GIT_DIR/DocumentBuilder/empty, $$CUR_ROOT/empty)
|
||||
copyDirectory($$ROOT_GIT_DIR/DocumentBuilder/samples, $$CUR_ROOT/samples)
|
||||
|
||||
createDirectory($$CUR_ROOT/include)
|
||||
copyFile($$ROOT_GIT_DIR/core/DesktopEditor/doctrenderer/common_deploy.h, $$CUR_ROOT/include/common.h)
|
||||
copyFile($$ROOT_GIT_DIR/core/DesktopEditor/doctrenderer/docbuilder.h, $$CUR_ROOT/include/docbuilder.h)
|
||||
|
||||
replaceInFile($$CUR_ROOT/include/docbuilder.h, Q_DECL_EXPORT, BUILDING_DOCBUILDER)
|
||||
|
||||
core_win_32 {
|
||||
copyFile($$ROOT_GIT_DIR/core/DesktopEditor/doctrenderer/docbuilder.com/Win32/Release/docbuilder.com.dll, $$CUR_ROOT/docbuilder.com.dll)
|
||||
}
|
||||
core_win_64 {
|
||||
copyFile($$ROOT_GIT_DIR/core/DesktopEditor/doctrenderer/docbuilder.com/x64/Release/docbuilder.com.dll, $$CUR_ROOT/docbuilder.com.dll)
|
||||
}
|
||||
|
||||
}
|
||||
16
scripts/deploy.py
Normal file
16
scripts/deploy.py
Normal file
@ -0,0 +1,16 @@
|
||||
sys.path.append('scripts')
|
||||
import config
|
||||
import base
|
||||
|
||||
def make_desktop():
|
||||
return
|
||||
|
||||
def make_builder():
|
||||
return
|
||||
|
||||
def make():
|
||||
if config.check_option("module", "desktop"):
|
||||
make_desktop()
|
||||
if config.check_option("module", "builder"):
|
||||
make_builder()
|
||||
return
|
||||
@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
SCRIPTPATH_FETCH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
REPO_NAME=$1
|
||||
|
||||
source ./scripts/config_value branch OO_BRANCH master
|
||||
source ./scripts/config_value git-protocol OO_GIT_PR https
|
||||
|
||||
echo "$OO_BRANCH"
|
||||
|
||||
OO_REPO_URL="https://github.com/ONLYOFFICE/$REPO_NAME.git"
|
||||
if [ "$OO_GIT_PR" == "ssh" ]
|
||||
then
|
||||
OO_REPO_URL="git@github.com:ONLYOFFICE/$REPO_NAME.git"
|
||||
fi
|
||||
|
||||
curdir=$PWD
|
||||
cd "$SCRIPTPATH_FETCH/../../"
|
||||
|
||||
if [ ! -d "./$REPO_NAME" ]
|
||||
then
|
||||
git clone "$OO_REPO_URL"
|
||||
fi
|
||||
|
||||
cd "$REPO_NAME"
|
||||
git fetch
|
||||
git checkout -f $OO_BRANCH
|
||||
git pull
|
||||
|
||||
cd "$curdir"
|
||||
@ -1,28 +0,0 @@
|
||||
setlocal
|
||||
|
||||
set REPO_NAME=%1
|
||||
set REPO_LOCAL_DIR=%~dp0..\..
|
||||
|
||||
call %~dp0config_value.bat branch OO_BRANCH master
|
||||
call %~dp0config_value.bat git-protocol OO_GIT_PR https
|
||||
|
||||
SET LOCAL_CD=%cd%
|
||||
cd %REPO_LOCAL_DIR%
|
||||
|
||||
SET "OO_REPO_URL=https://github.com/ONLYOFFICE/%REPO_NAME%.git"
|
||||
if "%OO_GIT_PR%"=="ssh" (
|
||||
SET "OO_REPO_URL=git@github.com:ONLYOFFICE/%REPO_NAME%.git"
|
||||
)
|
||||
|
||||
if not exist "%REPO_NAME%" (
|
||||
call git clone "%OO_REPO_URL%"
|
||||
)
|
||||
|
||||
cd "%REPO_NAME%"
|
||||
call git fetch
|
||||
call git checkout -f %OO_BRANCH%
|
||||
call git pull
|
||||
|
||||
cd "%LOCAL_CD%"
|
||||
|
||||
endlocal
|
||||
@ -1,9 +0,0 @@
|
||||
setlocal
|
||||
|
||||
call %~dp0scripts\config_value.bat qt-dir OO_QT_DIR "set qt path"
|
||||
call %~dp0..\scripts\json_value.bat module OO_MODULE "desktop builder"
|
||||
call "%OO_QT_DIR%\msvc2015_64\bin\qmake" -nocache %~dp0..\scripts\build_js.pro "CONFIG+=%OO_MODULE%"
|
||||
|
||||
endlocal
|
||||
|
||||
|
||||
16
tests/configure
vendored
16
tests/configure
vendored
@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPT=$(readlink -f "$0" || grealpath "$0")
|
||||
SCRIPTPATH=$(dirname "$SCRIPT")
|
||||
|
||||
"$SCRIPTPATH/../configure"\
|
||||
--module "desktop builder tests updmodule"\
|
||||
--platform native\
|
||||
--branding default\
|
||||
--update 1\
|
||||
--branch develop\
|
||||
--clean 0\
|
||||
--deploy\
|
||||
--install\
|
||||
--git-protocol https\
|
||||
--qt-dir "~/Qt5.9.1/5.9.1"
|
||||
@ -1,13 +0,0 @@
|
||||
call %~dp0..\configure.bat ^
|
||||
--module "desktop builder tests updmodule"^
|
||||
--platform native^
|
||||
--branding default^
|
||||
--update 1^
|
||||
--branch release/v5.3.0^
|
||||
--clean 0^
|
||||
--config no_vlc^
|
||||
--deploy^
|
||||
--install^
|
||||
--git-protocol https^
|
||||
--qt-dir "C:\Qt5.10.1\5.10.1"^
|
||||
--qt-dir-xp "C:\Qt5.6.3\5.6.3"
|
||||
Reference in New Issue
Block a user