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%
|
||||
|
||||
rem You can execute this script with different parameters:
|
||||
rem components - compiling components needed for DC
|
||||
rem plugins - compiling all DC plugins
|
||||
rem all - compiling components, plugins and DC
|
||||
rem default - compiling DC only
|
||||
rem beta - compile in beta mode (using by default)
|
||||
rem components - compiling components needed for doublecmd
|
||||
rem doublecmd - compiling doublecmd only (release mode)
|
||||
rem plugins - compiling all doublecmd plugins
|
||||
rem debug - compiling components, plugins and doublecmd (debug mode)
|
||||
rem release - compile in release mode (using by default)
|
||||
if not "%OS_TARGET%" == "" (
|
||||
set DC_ARCH=%DC_ARCH% --os=%OS_TARGET%
|
||||
)
|
||||
|
|
@ -24,18 +24,18 @@ if "%1"=="components" ( call :components
|
|||
) else (
|
||||
if "%1"=="plugins" ( call :plugins
|
||||
) else (
|
||||
if "%1"=="beta" ( call :beta
|
||||
if "%1"=="beta" ( call :release
|
||||
) else (
|
||||
if "%1"=="default" ( call :default
|
||||
if "%1"=="doublecmd" ( call :doublecmd
|
||||
) else (
|
||||
if "%1"=="nightly" ( call :nightly
|
||||
if "%1"=="release" ( call :release
|
||||
) else (
|
||||
if "%1"=="all" ( call :all
|
||||
if "%1"=="debug" ( call :debug
|
||||
) else (
|
||||
if "%1"=="" ( call :beta
|
||||
if "%1"=="" ( call :release
|
||||
) else (
|
||||
echo ERROR: Mode not defined: %1
|
||||
echo Available modes: components, plugins, default, nightly, all, beta
|
||||
echo Available modes: components, plugins, doublecmd, release, debug
|
||||
)))))))
|
||||
|
||||
pause
|
||||
|
|
@ -49,13 +49,25 @@ GOTO:EOF
|
|||
call plugins\build.bat
|
||||
GOTO:EOF
|
||||
|
||||
:beta
|
||||
:release
|
||||
call :components
|
||||
call :plugins
|
||||
call :doublecmd
|
||||
GOTO:EOF
|
||||
|
||||
:debug
|
||||
call :components
|
||||
call :plugins
|
||||
|
||||
rem Build Double Commander
|
||||
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
|
||||
lazbuild tools\extractdwrflnfo.lpi
|
||||
|
|
@ -64,22 +76,6 @@ GOTO:EOF
|
|||
tools\extractdwrflnfo doublecmd.dbg
|
||||
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
|
||||
del /Q doublecmd.exe.old
|
||||
ren doublecmd.exe doublecmd.exe.old
|
||||
|
|
|
|||
56
build.sh
56
build.sh
|
|
@ -2,22 +2,17 @@
|
|||
|
||||
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:
|
||||
# components - compiling components needed for DC
|
||||
# plugins - compiling all DC plugins
|
||||
# all - compiling components, plugins and DC
|
||||
# default - compiling DC only (using by default)
|
||||
# components - compiling components needed for doublecmd
|
||||
# doublecmd - compiling doublecmd only (release mode)
|
||||
# plugins - compiling all doublecmd plugins
|
||||
# debug - compiling components, plugins and doublecmd (debug mode)
|
||||
# release - compile in release mode (using by default)
|
||||
|
||||
# path to 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
|
||||
if [ $2 ]
|
||||
then export lcl=$2
|
||||
|
|
@ -30,47 +25,46 @@ elif [ $CPU_TARGET ]
|
|||
then export DC_ARCH=$(echo "--cpu=$CPU_TARGET")
|
||||
fi
|
||||
|
||||
build_default()
|
||||
build_doublecmd()
|
||||
{
|
||||
$lazbuild src/doublecmd.lpi $DC_ARCH
|
||||
|
||||
strip doublecmd
|
||||
}
|
||||
|
||||
build_beta()
|
||||
{
|
||||
components/build.sh
|
||||
plugins/build.sh
|
||||
|
||||
# Build Double Commander
|
||||
$lazbuild src/doublecmd.lpi --bm=beta $DC_ARCH
|
||||
|
||||
$lazbuild src/doublecmd.lpi --bm=release $DC_ARCH
|
||||
|
||||
# Build Dwarf LineInfo Extractor
|
||||
$lazbuild tools/extractdwrflnfo.lpi
|
||||
|
||||
|
||||
# Extract debug line info
|
||||
chmod a+x tools/extractdwrflnfo
|
||||
if [ -f doublecmd.dSYM/Contents/Resources/DWARF/doublecmd ]; then
|
||||
mv -f doublecmd.dSYM/Contents/Resources/DWARF/doublecmd $(pwd)/doublecmd.dbg
|
||||
fi
|
||||
tools/extractdwrflnfo doublecmd.dbg
|
||||
|
||||
|
||||
# Strip debug info
|
||||
strip doublecmd
|
||||
}
|
||||
|
||||
build_all()
|
||||
build_release()
|
||||
{
|
||||
components/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
|
||||
components) components/build.sh;;
|
||||
doublecmd) build_doublecmd;;
|
||||
plugins) plugins/build.sh;;
|
||||
beta) build_beta;;
|
||||
all) build_all;;
|
||||
*) build_default;;
|
||||
debug) build_debug;;
|
||||
*) build_release;;
|
||||
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
|
||||
built:
|
||||
|
||||
> build.bat all
|
||||
> build.bat release
|
||||
|
||||
or alternatively without plugins
|
||||
|
||||
> build.bat components
|
||||
> build.bat
|
||||
> build.bat doublecmd
|
||||
|
||||
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
|
||||
built:
|
||||
|
||||
$ ./build.sh all
|
||||
$ ./build.sh release
|
||||
|
||||
or alternatively without plugins
|
||||
|
||||
$ ./build.sh components
|
||||
$ ./build.sh
|
||||
$ ./build.sh doublecmd
|
||||
|
|
|
|||
|
|
@ -259,10 +259,10 @@ begin
|
|||
BuildPlugins;
|
||||
// Set default build mode
|
||||
if Pos('--bm=', FLazBuildParams) = 0 then
|
||||
FLazBuildParams+= ' --bm=beta';
|
||||
FLazBuildParams+= ' --bm=release';
|
||||
// Build Double Commander
|
||||
BuildEngine.ExecuteCommand(FLazBuild, SetDirSeparators('src/doublecmd.lpi') + FLazBuildParams);
|
||||
if Pos('--bm=beta', FLazBuildParams) > 0 then
|
||||
if Pos('--bm=release', FLazBuildParams) > 0 then
|
||||
begin
|
||||
// Build Dwarf LineInfo Extractor
|
||||
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%
|
||||
|
||||
rem Build all components of Double Commander
|
||||
call build.bat beta
|
||||
call build.bat release
|
||||
|
||||
rem Prepare install files
|
||||
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
|
||||
|
||||
# Build all components of Double Commander
|
||||
./build.sh beta
|
||||
./build.sh release
|
||||
|
||||
# Update application bundle version
|
||||
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
|
||||
|
||||
# Build all components of Double Commander
|
||||
./build.sh beta
|
||||
./build.sh release
|
||||
|
||||
# Export variables for checkinstall
|
||||
export MAINTAINER="Alexander Koblov <Alexx2000@mail.ru>"
|
||||
|
|
|
|||
|
|
@ -14,12 +14,12 @@ override_dh_install:
|
|||
rm -f plugins/wlx/WlxMplayer/src/qt4.pas
|
||||
|
||||
# Build GTK2 version
|
||||
./build.sh beta gtk2
|
||||
./build.sh release gtk2
|
||||
./install/linux/install.sh --install-prefix=$(CURDIR)/debian/doublecmd-common
|
||||
./clean.sh
|
||||
|
||||
# Build Qt5 version
|
||||
./build.sh beta qt5
|
||||
./build.sh release qt5
|
||||
./install/linux/install.sh --install-prefix=$(CURDIR)/debian/doublecmd-qt-temp
|
||||
./clean.sh
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ prepare() {
|
|||
build() {
|
||||
msg 'Build GTK'
|
||||
cd "${srcdir}"
|
||||
./build.sh beta gtk2
|
||||
./build.sh release gtk2
|
||||
}
|
||||
|
||||
package() {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ prepare() {
|
|||
build() {
|
||||
msg 'Build Qt'
|
||||
cd "${srcdir}"
|
||||
./build.sh beta qt
|
||||
./build.sh release qt
|
||||
}
|
||||
|
||||
package() {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ prepare() {
|
|||
build() {
|
||||
msg 'Build Qt5'
|
||||
cd "${srcdir}"
|
||||
./build.sh beta qt5
|
||||
./build.sh release qt5
|
||||
}
|
||||
|
||||
package() {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ It is inspired by Total Commander and features some new ideas.
|
|||
%setup -q -n doublecmd-%{version}
|
||||
|
||||
%build
|
||||
./build.sh beta gtk2
|
||||
./build.sh release gtk2
|
||||
|
||||
%install
|
||||
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}
|
||||
|
||||
%build
|
||||
./build.sh beta qt
|
||||
./build.sh release qt
|
||||
|
||||
%install
|
||||
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}
|
||||
|
||||
%build
|
||||
./build.sh beta qt5
|
||||
./build.sh release qt5
|
||||
|
||||
%install
|
||||
install/linux/install.sh --install-prefix=%{buildroot}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<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"/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="5">
|
||||
<BuildModes Count="4">
|
||||
<Item1 Name="Debug" Default="True"/>
|
||||
<Item2 Name="Debug + HeapTrc">
|
||||
<CompilerOptions>
|
||||
|
|
@ -111,49 +111,7 @@
|
|||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item3>
|
||||
<Item4 Name="Nightly">
|
||||
<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">
|
||||
<Item4 Name="Release">
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
|
|
@ -226,7 +184,7 @@ end;"/>
|
|||
</ExecuteBefore>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item5>
|
||||
</Item4>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue