Browse Source

UPD: Build mode name, build scripts

Alexander Koblov 4 years ago
parent
commit
1c4d8d0b20

+ 25 - 29
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 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%" == "" (
 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,35 +49,31 @@ GOTO:EOF
   call plugins\build.bat
   call plugins\build.bat
 GOTO:EOF
 GOTO:EOF
 
 
-:beta
+:release
   call :components
   call :components
   call :plugins
   call :plugins
-
-  rem Build Double Commander
-  call :replace_old
-  lazbuild src\doublecmd.lpi --bm=beta %DC_ARCH%
-
-  rem Build Dwarf LineInfo Extractor
-  lazbuild tools\extractdwrflnfo.lpi
-
-  rem Extract debug line info
-  tools\extractdwrflnfo doublecmd.dbg
+  call :doublecmd
 GOTO:EOF
 GOTO:EOF
 
 
-:all
+:debug
   call :components
   call :components
   call :plugins
   call :plugins
-  call :default
-GOTO:EOF
 
 
-:default
+  rem Build Double Commander
   call :replace_old
   call :replace_old
-  lazbuild src\doublecmd.lpi %DC_ARCH%
+  lazbuild src\doublecmd.lpi --bm=debug %DC_ARCH%
 GOTO:EOF
 GOTO:EOF
 
 
-:nightly
+:doublecmd
+  rem Build Double Commander
   call :replace_old
   call :replace_old
-  lazbuild src\doublecmd.lpi --bm=nightly %DC_ARCH%
+  lazbuild src\doublecmd.lpi --bm=release %DC_ARCH%
+
+  rem Build Dwarf LineInfo Extractor
+  lazbuild tools\extractdwrflnfo.lpi
+
+  rem Extract debug line info
+  tools\extractdwrflnfo doublecmd.dbg
 GOTO:EOF
 GOTO:EOF
 
 
 :replace_old
 :replace_old

+ 25 - 31
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
-# 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
 # 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;;
-         all)  build_all;;
-           *)  build_default;;
+       debug)  build_debug;;
+           *)  build_release;;
 esac
 esac

+ 4 - 4
doc/INSTALL.txt

@@ -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

+ 2 - 2
fpmake.pp

@@ -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'));

+ 1 - 1
install/create_packages.bat

@@ -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

+ 1 - 1
install/create_packages.mac

@@ -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

+ 1 - 1
install/create_packages.sh

@@ -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 <[email protected]>"
 export MAINTAINER="Alexander Koblov <[email protected]>"

+ 2 - 2
install/linux/deb/doublecmd/rules

@@ -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
 
 

+ 1 - 1
install/linux/pkg/doublecmd-gtk2.pkgbuild

@@ -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() {

+ 1 - 1
install/linux/pkg/doublecmd-qt.pkgbuild

@@ -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() {

+ 1 - 1
install/linux/pkg/doublecmd-qt5.pkgbuild

@@ -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() {

+ 1 - 1
install/linux/rpm/doublecmd-gtk.spec

@@ -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}

+ 1 - 1
install/linux/rpm/doublecmd-qt.spec

@@ -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}

+ 1 - 1
install/linux/rpm/doublecmd-qt5.spec

@@ -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}

+ 3 - 45
src/doublecmd.lpi

@@ -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">
-        <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>
         <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"/>