mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: Build mode name, build scripts
This commit is contained in:
parent
011e920302
commit
1c4d8d0b20
15 changed files with 70 additions and 122 deletions
54
build.bat
54
build.bat
|
|
@ -5,11 +5,11 @@ if [%LAZARUS_HOME%] == [] set LAZARUS_HOME=D:\Alexx\Prog\FreePascal\Lazarus
|
||||||
set PATH=%LAZARUS_HOME%;%PATH%
|
set PATH=%LAZARUS_HOME%;%PATH%
|
||||||
|
|
||||||
rem You can execute this script with different parameters:
|
rem You can execute this script with different parameters:
|
||||||
rem components - compiling components needed for DC
|
rem components - compiling components needed for doublecmd
|
||||||
rem plugins - compiling all DC plugins
|
rem doublecmd - compiling doublecmd only (release mode)
|
||||||
rem all - compiling components, plugins and DC
|
rem plugins - compiling all doublecmd plugins
|
||||||
rem default - compiling DC only
|
rem debug - compiling components, plugins and doublecmd (debug mode)
|
||||||
rem beta - compile in beta mode (using by default)
|
rem release - compile in release mode (using by default)
|
||||||
if not "%OS_TARGET%" == "" (
|
if not "%OS_TARGET%" == "" (
|
||||||
set DC_ARCH=%DC_ARCH% --os=%OS_TARGET%
|
set DC_ARCH=%DC_ARCH% --os=%OS_TARGET%
|
||||||
)
|
)
|
||||||
|
|
@ -24,18 +24,18 @@ if "%1"=="components" ( call :components
|
||||||
) else (
|
) else (
|
||||||
if "%1"=="plugins" ( call :plugins
|
if "%1"=="plugins" ( call :plugins
|
||||||
) else (
|
) else (
|
||||||
if "%1"=="beta" ( call :beta
|
if "%1"=="beta" ( call :release
|
||||||
) else (
|
) else (
|
||||||
if "%1"=="default" ( call :default
|
if "%1"=="doublecmd" ( call :doublecmd
|
||||||
) else (
|
) else (
|
||||||
if "%1"=="nightly" ( call :nightly
|
if "%1"=="release" ( call :release
|
||||||
) else (
|
) else (
|
||||||
if "%1"=="all" ( call :all
|
if "%1"=="debug" ( call :debug
|
||||||
) else (
|
) else (
|
||||||
if "%1"=="" ( call :beta
|
if "%1"=="" ( call :release
|
||||||
) else (
|
) else (
|
||||||
echo ERROR: Mode not defined: %1
|
echo ERROR: Mode not defined: %1
|
||||||
echo Available modes: components, plugins, default, nightly, all, beta
|
echo Available modes: components, plugins, doublecmd, release, debug
|
||||||
)))))))
|
)))))))
|
||||||
|
|
||||||
pause
|
pause
|
||||||
|
|
@ -49,13 +49,25 @@ GOTO:EOF
|
||||||
call plugins\build.bat
|
call plugins\build.bat
|
||||||
GOTO:EOF
|
GOTO:EOF
|
||||||
|
|
||||||
:beta
|
:release
|
||||||
|
call :components
|
||||||
|
call :plugins
|
||||||
|
call :doublecmd
|
||||||
|
GOTO:EOF
|
||||||
|
|
||||||
|
:debug
|
||||||
call :components
|
call :components
|
||||||
call :plugins
|
call :plugins
|
||||||
|
|
||||||
rem Build Double Commander
|
rem Build Double Commander
|
||||||
call :replace_old
|
call :replace_old
|
||||||
lazbuild src\doublecmd.lpi --bm=beta %DC_ARCH%
|
lazbuild src\doublecmd.lpi --bm=debug %DC_ARCH%
|
||||||
|
GOTO:EOF
|
||||||
|
|
||||||
|
:doublecmd
|
||||||
|
rem Build Double Commander
|
||||||
|
call :replace_old
|
||||||
|
lazbuild src\doublecmd.lpi --bm=release %DC_ARCH%
|
||||||
|
|
||||||
rem Build Dwarf LineInfo Extractor
|
rem Build Dwarf LineInfo Extractor
|
||||||
lazbuild tools\extractdwrflnfo.lpi
|
lazbuild tools\extractdwrflnfo.lpi
|
||||||
|
|
@ -64,22 +76,6 @@ GOTO:EOF
|
||||||
tools\extractdwrflnfo doublecmd.dbg
|
tools\extractdwrflnfo doublecmd.dbg
|
||||||
GOTO:EOF
|
GOTO:EOF
|
||||||
|
|
||||||
:all
|
|
||||||
call :components
|
|
||||||
call :plugins
|
|
||||||
call :default
|
|
||||||
GOTO:EOF
|
|
||||||
|
|
||||||
:default
|
|
||||||
call :replace_old
|
|
||||||
lazbuild src\doublecmd.lpi %DC_ARCH%
|
|
||||||
GOTO:EOF
|
|
||||||
|
|
||||||
:nightly
|
|
||||||
call :replace_old
|
|
||||||
lazbuild src\doublecmd.lpi --bm=nightly %DC_ARCH%
|
|
||||||
GOTO:EOF
|
|
||||||
|
|
||||||
:replace_old
|
:replace_old
|
||||||
del /Q doublecmd.exe.old
|
del /Q doublecmd.exe.old
|
||||||
ren doublecmd.exe doublecmd.exe.old
|
ren doublecmd.exe doublecmd.exe.old
|
||||||
|
|
|
||||||
56
build.sh
56
build.sh
|
|
@ -2,22 +2,17 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# if you compile first time you must change variable "lazpath" and "lcl"
|
|
||||||
# after it execute this script with parameter "all" at doublecmd dir
|
|
||||||
# "./build.sh all" it build doublecmd
|
|
||||||
# by Attid
|
|
||||||
|
|
||||||
|
|
||||||
# You can execute this script with different parameters:
|
# You can execute this script with different parameters:
|
||||||
# components - compiling components needed for DC
|
# components - compiling components needed for doublecmd
|
||||||
# plugins - compiling all DC plugins
|
# doublecmd - compiling doublecmd only (release mode)
|
||||||
# all - compiling components, plugins and DC
|
# plugins - compiling all doublecmd plugins
|
||||||
# default - compiling DC only (using by default)
|
# debug - compiling components, plugins and doublecmd (debug mode)
|
||||||
|
# release - compile in release mode (using by default)
|
||||||
|
|
||||||
# path to lazbuild
|
# path to lazbuild
|
||||||
export lazbuild=$(which lazbuild)
|
export lazbuild=$(which lazbuild)
|
||||||
|
|
||||||
# Set up widgetset: gtk or gtk2 or qt
|
# Set up widgetset: gtk2 or qt or qt5 or cocoa
|
||||||
# Set up processor architecture: i386 or x86_64
|
# Set up processor architecture: i386 or x86_64
|
||||||
if [ $2 ]
|
if [ $2 ]
|
||||||
then export lcl=$2
|
then export lcl=$2
|
||||||
|
|
@ -30,47 +25,46 @@ elif [ $CPU_TARGET ]
|
||||||
then export DC_ARCH=$(echo "--cpu=$CPU_TARGET")
|
then export DC_ARCH=$(echo "--cpu=$CPU_TARGET")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build_default()
|
build_doublecmd()
|
||||||
{
|
{
|
||||||
$lazbuild src/doublecmd.lpi $DC_ARCH
|
|
||||||
|
|
||||||
strip doublecmd
|
|
||||||
}
|
|
||||||
|
|
||||||
build_beta()
|
|
||||||
{
|
|
||||||
components/build.sh
|
|
||||||
plugins/build.sh
|
|
||||||
|
|
||||||
# Build Double Commander
|
# Build Double Commander
|
||||||
$lazbuild src/doublecmd.lpi --bm=beta $DC_ARCH
|
$lazbuild src/doublecmd.lpi --bm=release $DC_ARCH
|
||||||
|
|
||||||
# Build Dwarf LineInfo Extractor
|
# Build Dwarf LineInfo Extractor
|
||||||
$lazbuild tools/extractdwrflnfo.lpi
|
$lazbuild tools/extractdwrflnfo.lpi
|
||||||
|
|
||||||
# Extract debug line info
|
# Extract debug line info
|
||||||
chmod a+x tools/extractdwrflnfo
|
chmod a+x tools/extractdwrflnfo
|
||||||
if [ -f doublecmd.dSYM/Contents/Resources/DWARF/doublecmd ]; then
|
if [ -f doublecmd.dSYM/Contents/Resources/DWARF/doublecmd ]; then
|
||||||
mv -f doublecmd.dSYM/Contents/Resources/DWARF/doublecmd $(pwd)/doublecmd.dbg
|
mv -f doublecmd.dSYM/Contents/Resources/DWARF/doublecmd $(pwd)/doublecmd.dbg
|
||||||
fi
|
fi
|
||||||
tools/extractdwrflnfo doublecmd.dbg
|
tools/extractdwrflnfo doublecmd.dbg
|
||||||
|
|
||||||
# Strip debug info
|
# Strip debug info
|
||||||
strip doublecmd
|
strip doublecmd
|
||||||
}
|
}
|
||||||
|
|
||||||
build_all()
|
build_release()
|
||||||
{
|
{
|
||||||
components/build.sh
|
components/build.sh
|
||||||
plugins/build.sh
|
plugins/build.sh
|
||||||
build_default
|
build_doublecmd
|
||||||
|
}
|
||||||
|
|
||||||
|
build_debug()
|
||||||
|
{
|
||||||
|
components/build.sh
|
||||||
|
plugins/build.sh
|
||||||
|
|
||||||
|
# Build Double Commander
|
||||||
|
$lazbuild src/doublecmd.lpi --bm=debug $DC_ARCH
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
components) components/build.sh;;
|
components) components/build.sh;;
|
||||||
|
doublecmd) build_doublecmd;;
|
||||||
plugins) plugins/build.sh;;
|
plugins) plugins/build.sh;;
|
||||||
beta) build_beta;;
|
debug) build_debug;;
|
||||||
all) build_all;;
|
*) build_release;;
|
||||||
*) build_default;;
|
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
|
|
@ -44,12 +44,12 @@ Execute the script to start the build process. Make sure you use all parameter
|
||||||
if you're building for the first time, so that also components and plugins are
|
if you're building for the first time, so that also components and plugins are
|
||||||
built:
|
built:
|
||||||
|
|
||||||
> build.bat all
|
> build.bat release
|
||||||
|
|
||||||
or alternatively without plugins
|
or alternatively without plugins
|
||||||
|
|
||||||
> build.bat components
|
> build.bat components
|
||||||
> build.bat
|
> build.bat doublecmd
|
||||||
|
|
||||||
From command line (Linux)
|
From command line (Linux)
|
||||||
|
|
||||||
|
|
@ -69,9 +69,9 @@ Execute the script to start the build process. Make sure you use all parameter
|
||||||
if you're building for the first time, so that also components and plugins are
|
if you're building for the first time, so that also components and plugins are
|
||||||
built:
|
built:
|
||||||
|
|
||||||
$ ./build.sh all
|
$ ./build.sh release
|
||||||
|
|
||||||
or alternatively without plugins
|
or alternatively without plugins
|
||||||
|
|
||||||
$ ./build.sh components
|
$ ./build.sh components
|
||||||
$ ./build.sh
|
$ ./build.sh doublecmd
|
||||||
|
|
|
||||||
|
|
@ -259,10 +259,10 @@ begin
|
||||||
BuildPlugins;
|
BuildPlugins;
|
||||||
// Set default build mode
|
// Set default build mode
|
||||||
if Pos('--bm=', FLazBuildParams) = 0 then
|
if Pos('--bm=', FLazBuildParams) = 0 then
|
||||||
FLazBuildParams+= ' --bm=beta';
|
FLazBuildParams+= ' --bm=release';
|
||||||
// Build Double Commander
|
// Build Double Commander
|
||||||
BuildEngine.ExecuteCommand(FLazBuild, SetDirSeparators('src/doublecmd.lpi') + FLazBuildParams);
|
BuildEngine.ExecuteCommand(FLazBuild, SetDirSeparators('src/doublecmd.lpi') + FLazBuildParams);
|
||||||
if Pos('--bm=beta', FLazBuildParams) > 0 then
|
if Pos('--bm=release', FLazBuildParams) > 0 then
|
||||||
begin
|
begin
|
||||||
// Build Dwarf LineInfo Extractor
|
// Build Dwarf LineInfo Extractor
|
||||||
BuildEngine.ExecuteCommand(FLazBuild, SetDirSeparators('tools/extractdwrflnfo.lpi'));
|
BuildEngine.ExecuteCommand(FLazBuild, SetDirSeparators('tools/extractdwrflnfo.lpi'));
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ copy windows\lib\%CPU_TARGET%\*.dll %BUILD_DC_TMP_DIR%\
|
||||||
cd /D %BUILD_DC_TMP_DIR%
|
cd /D %BUILD_DC_TMP_DIR%
|
||||||
|
|
||||||
rem Build all components of Double Commander
|
rem Build all components of Double Commander
|
||||||
call build.bat beta
|
call build.bat release
|
||||||
|
|
||||||
rem Prepare install files
|
rem Prepare install files
|
||||||
call %BUILD_DC_TMP_DIR%\install\windows\install.bat
|
call %BUILD_DC_TMP_DIR%\install\windows\install.bat
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ cp -a darwin/lib/$CPU_TARGET/$lcl/*.dylib $BUILD_DC_TMP_DIR/
|
||||||
cd $BUILD_DC_TMP_DIR
|
cd $BUILD_DC_TMP_DIR
|
||||||
|
|
||||||
# Build all components of Double Commander
|
# Build all components of Double Commander
|
||||||
./build.sh beta
|
./build.sh release
|
||||||
|
|
||||||
# Update application bundle version
|
# Update application bundle version
|
||||||
defaults write $(pwd)/doublecmd.app/Contents/Info CFBundleVersion $DC_REVISION
|
defaults write $(pwd)/doublecmd.app/Contents/Info CFBundleVersion $DC_REVISION
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ cp -a linux/lib/$CPU_TARGET/$lcl/*.so* $BUILD_DC_TMP_DIR/
|
||||||
cd $BUILD_DC_TMP_DIR
|
cd $BUILD_DC_TMP_DIR
|
||||||
|
|
||||||
# Build all components of Double Commander
|
# Build all components of Double Commander
|
||||||
./build.sh beta
|
./build.sh release
|
||||||
|
|
||||||
# Export variables for checkinstall
|
# Export variables for checkinstall
|
||||||
export MAINTAINER="Alexander Koblov <Alexx2000@mail.ru>"
|
export MAINTAINER="Alexander Koblov <Alexx2000@mail.ru>"
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,12 @@ override_dh_install:
|
||||||
rm -f plugins/wlx/WlxMplayer/src/qt4.pas
|
rm -f plugins/wlx/WlxMplayer/src/qt4.pas
|
||||||
|
|
||||||
# Build GTK2 version
|
# Build GTK2 version
|
||||||
./build.sh beta gtk2
|
./build.sh release gtk2
|
||||||
./install/linux/install.sh --install-prefix=$(CURDIR)/debian/doublecmd-common
|
./install/linux/install.sh --install-prefix=$(CURDIR)/debian/doublecmd-common
|
||||||
./clean.sh
|
./clean.sh
|
||||||
|
|
||||||
# Build Qt5 version
|
# Build Qt5 version
|
||||||
./build.sh beta qt5
|
./build.sh release qt5
|
||||||
./install/linux/install.sh --install-prefix=$(CURDIR)/debian/doublecmd-qt-temp
|
./install/linux/install.sh --install-prefix=$(CURDIR)/debian/doublecmd-qt-temp
|
||||||
./clean.sh
|
./clean.sh
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ prepare() {
|
||||||
build() {
|
build() {
|
||||||
msg 'Build GTK'
|
msg 'Build GTK'
|
||||||
cd "${srcdir}"
|
cd "${srcdir}"
|
||||||
./build.sh beta gtk2
|
./build.sh release gtk2
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ prepare() {
|
||||||
build() {
|
build() {
|
||||||
msg 'Build Qt'
|
msg 'Build Qt'
|
||||||
cd "${srcdir}"
|
cd "${srcdir}"
|
||||||
./build.sh beta qt
|
./build.sh release qt
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ prepare() {
|
||||||
build() {
|
build() {
|
||||||
msg 'Build Qt5'
|
msg 'Build Qt5'
|
||||||
cd "${srcdir}"
|
cd "${srcdir}"
|
||||||
./build.sh beta qt5
|
./build.sh release qt5
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ It is inspired by Total Commander and features some new ideas.
|
||||||
%setup -q -n doublecmd-%{version}
|
%setup -q -n doublecmd-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./build.sh beta gtk2
|
./build.sh release gtk2
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install/linux/install.sh --install-prefix=%{buildroot}
|
install/linux/install.sh --install-prefix=%{buildroot}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ It is inspired by Total Commander and features some new ideas.
|
||||||
%setup -q -n doublecmd-%{version}
|
%setup -q -n doublecmd-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./build.sh beta qt
|
./build.sh release qt
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install/linux/install.sh --install-prefix=%{buildroot}
|
install/linux/install.sh --install-prefix=%{buildroot}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ It is inspired by Total Commander and features some new ideas.
|
||||||
%setup -q -n %{doublecmd}-%{version}
|
%setup -q -n %{doublecmd}-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./build.sh beta qt5
|
./build.sh release qt5
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install/linux/install.sh --install-prefix=%{buildroot}
|
install/linux/install.sh --install-prefix=%{buildroot}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
<MajorVersionNr Value="1"/>
|
<MajorVersionNr Value="1"/>
|
||||||
<StringTable FileDescription="Double Commander is a cross platform open source file manager with two panels side by side" InternalName="DOUBLECMD" LegalCopyright="Copyright (C) 2006-2021 Alexander Koblov" ProductName="Double Commander"/>
|
<StringTable FileDescription="Double Commander is a cross platform open source file manager with two panels side by side" InternalName="DOUBLECMD" LegalCopyright="Copyright (C) 2006-2021 Alexander Koblov" ProductName="Double Commander"/>
|
||||||
</VersionInfo>
|
</VersionInfo>
|
||||||
<BuildModes Count="5">
|
<BuildModes Count="4">
|
||||||
<Item1 Name="Debug" Default="True"/>
|
<Item1 Name="Debug" Default="True"/>
|
||||||
<Item2 Name="Debug + HeapTrc">
|
<Item2 Name="Debug + HeapTrc">
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
|
|
@ -111,49 +111,7 @@
|
||||||
</Other>
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
</Item3>
|
</Item3>
|
||||||
<Item4 Name="Nightly">
|
<Item4 Name="Release">
|
||||||
<CompilerOptions>
|
|
||||||
<Version Value="11"/>
|
|
||||||
<PathDelim Value="\"/>
|
|
||||||
<Target>
|
|
||||||
<Filename Value="..\doublecmd"/>
|
|
||||||
</Target>
|
|
||||||
<SearchPaths>
|
|
||||||
<IncludeFiles Value="$(LazarusDir)\ide;$(ProjOutDir);..\sdk;..\units"/>
|
|
||||||
<OtherUnitFiles Value="platform;platform\$(SrcOS);platform\$(SrcOS)\$(TargetOS);..\sdk;frames;fileviews;filesources;filesources\filesystem;filesources\multiarchive;filesources\multilist;filesources\searchresult;filesources\tempfilesystem;filesources\vfs;filesources\wcxarchive;filesources\wfxplugin;filesources\winnet;platform\unix\glib;platform\unix\mime;filesources\gio;rpc;rpc\sys\$(SrcOS);rpc\sys"/>
|
|
||||||
<UnitOutputDirectory Value="..\units\$(TargetCPU)-$(TargetOS)-$(LCLWidgetType)"/>
|
|
||||||
<SrcPath Value="$(LazarusDir)\lcl;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType);$(fpcsrcdir)\packages\fcl-base\src"/>
|
|
||||||
</SearchPaths>
|
|
||||||
<Parsing>
|
|
||||||
<SyntaxOptions>
|
|
||||||
<IncludeAssertionCode Value="True"/>
|
|
||||||
</SyntaxOptions>
|
|
||||||
</Parsing>
|
|
||||||
<CodeGeneration>
|
|
||||||
<Checks>
|
|
||||||
<IOChecks Value="True"/>
|
|
||||||
</Checks>
|
|
||||||
<Optimizations>
|
|
||||||
<OptimizationLevel Value="0"/>
|
|
||||||
</Optimizations>
|
|
||||||
</CodeGeneration>
|
|
||||||
<Linking>
|
|
||||||
<Debugging>
|
|
||||||
<DebugInfoType Value="dsDwarf2Set"/>
|
|
||||||
<UseLineInfoUnit Value="False"/>
|
|
||||||
<UseExternalDbgSyms Value="True"/>
|
|
||||||
</Debugging>
|
|
||||||
</Linking>
|
|
||||||
<Other>
|
|
||||||
<CustomOptions Value="-dNIGHTLY_BUILD"/>
|
|
||||||
<ExecuteBefore>
|
|
||||||
<Command Value="$(ProjPath)\platform\git2revisioninc$(ExeExt).cmd $MakeFile($(ProjOutDir))"/>
|
|
||||||
<CompileReasons Run="False"/>
|
|
||||||
</ExecuteBefore>
|
|
||||||
</Other>
|
|
||||||
</CompilerOptions>
|
|
||||||
</Item4>
|
|
||||||
<Item5 Name="Beta">
|
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="11"/>
|
<Version Value="11"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
|
|
@ -226,7 +184,7 @@ end;"/>
|
||||||
</ExecuteBefore>
|
</ExecuteBefore>
|
||||||
</Other>
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
</Item5>
|
</Item4>
|
||||||
</BuildModes>
|
</BuildModes>
|
||||||
<PublishOptions>
|
<PublishOptions>
|
||||||
<Version Value="2"/>
|
<Version Value="2"/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue