mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: Use another way to get subversion revision
This commit is contained in:
parent
b77f4df8e9
commit
98a84ddd69
7 changed files with 53 additions and 24 deletions
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# get DC revision under Linux
|
||||
$1tools/svn2revisioninc ../ dcrevision.inc --c=dcRevision
|
||||
|
||||
echo "This command is need for successful exit code"
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
rem @echo off
|
||||
|
||||
rem get DC revision under Windows
|
||||
%1tools\svn2revisioninc.exe ..\ dcrevision.inc --c=dcRevision
|
||||
|
||||
echo "This command is need for successful exit code"
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
// Created by Svn2RevisionInc
|
||||
const dcRevision = '6510:6511M';
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
<Filename Value="..\doublecmd"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(LazarusDir)\ide;$(ProjOutDir);..\sdk"/>
|
||||
<IncludeFiles Value="$(LazarusDir)\ide;$(ProjOutDir);..\sdk;platform"/>
|
||||
<OtherUnitFiles Value="platform;platform\$(SrcOS);..\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"/>
|
||||
<UnitOutputDirectory Value="..\units\$(TargetCPU)-$(TargetOS)-$(LCLWidgetType)"/>
|
||||
<SrcPath Value="$(LazarusDir)\lcl;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType);$(fpcsrcdir)\packages\fcl-base\src"/>
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
<Other>
|
||||
<CustomOptions Value="-dHEAPTRC -dHEAPTRC_EXTRA"/>
|
||||
<ExecuteBefore>
|
||||
<Command Value="$(ProjPath)\_getsvnrev$(ExeExt).cmd $MakeDir($(LazarusDir))"/>
|
||||
<Command Value="$(ProjPath)\platform\svn2revisioninc$(ExeExt).cmd $MakeFile($(ProjOutDir))"/>
|
||||
<CompileReasons Run="False"/>
|
||||
</ExecuteBefore>
|
||||
</Other>
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
<Filename Value="..\doublecmd"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(LazarusDir)\ide;$(ProjOutDir);..\sdk"/>
|
||||
<IncludeFiles Value="$(LazarusDir)\ide;$(ProjOutDir);..\sdk;platform"/>
|
||||
<OtherUnitFiles Value="platform;platform\$(SrcOS);..\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"/>
|
||||
<UnitOutputDirectory Value="..\units\$(TargetCPU)-$(TargetOS)-$(LCLWidgetType)"/>
|
||||
<SrcPath Value="$(LazarusDir)\lcl;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType);$(fpcsrcdir)\packages\fcl-base\src"/>
|
||||
|
|
@ -105,7 +105,7 @@
|
|||
</Linking>
|
||||
<Other>
|
||||
<ExecuteBefore>
|
||||
<Command Value="$(ProjPath)\_getsvnrev$(ExeExt).cmd $MakeDir($(LazarusDir))"/>
|
||||
<Command Value="$(ProjPath)\platform\svn2revisioninc$(ExeExt).cmd $MakeFile($(ProjOutDir))"/>
|
||||
<CompileReasons Run="False"/>
|
||||
</ExecuteBefore>
|
||||
</Other>
|
||||
|
|
@ -119,7 +119,7 @@
|
|||
<Filename Value="..\doublecmd"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(LazarusDir)\ide;$(ProjOutDir);..\sdk"/>
|
||||
<IncludeFiles Value="$(LazarusDir)\ide;$(ProjOutDir);..\sdk;platform"/>
|
||||
<OtherUnitFiles Value="platform;platform\$(SrcOS);..\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"/>
|
||||
<UnitOutputDirectory Value="..\units\$(TargetCPU)-$(TargetOS)-$(LCLWidgetType)"/>
|
||||
<SrcPath Value="$(LazarusDir)\lcl;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType);$(fpcsrcdir)\packages\fcl-base\src"/>
|
||||
|
|
@ -147,7 +147,7 @@
|
|||
<Other>
|
||||
<CustomOptions Value="-dNIGHTLY_BUILD"/>
|
||||
<ExecuteBefore>
|
||||
<Command Value="$(ProjPath)\_getsvnrev$(ExeExt).cmd $MakeDir($(LazarusDir))"/>
|
||||
<Command Value="$(ProjPath)\platform\svn2revisioninc$(ExeExt).cmd $MakeFile($(ProjOutDir))"/>
|
||||
<CompileReasons Run="False"/>
|
||||
</ExecuteBefore>
|
||||
</Other>
|
||||
|
|
@ -161,7 +161,7 @@
|
|||
<Filename Value="..\doublecmd"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(LazarusDir)\ide;$(ProjOutDir);..\sdk"/>
|
||||
<IncludeFiles Value="$(LazarusDir)\ide;$(ProjOutDir);..\sdk;platform"/>
|
||||
<OtherUnitFiles Value="platform;platform\$(SrcOS);..\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"/>
|
||||
<UnitOutputDirectory Value="..\units\$(TargetCPU)-$(TargetOS)-$(LCLWidgetType)"/>
|
||||
<SrcPath Value="$(LazarusDir)\lcl;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType);$(fpcsrcdir)\packages\fcl-base\src"/>
|
||||
|
|
@ -210,7 +210,7 @@ end;"/>
|
|||
</Verbosity>
|
||||
<CustomOptions Value="-dNIGHTLY_BUILD"/>
|
||||
<ExecuteBefore>
|
||||
<Command Value="$(ProjPath)\_getsvnrev$(ExeExt).cmd $MakeDir($(LazarusDir))"/>
|
||||
<Command Value="$(ProjPath)\platform\svn2revisioninc$(ExeExt).cmd $MakeFile($(ProjOutDir))"/>
|
||||
<CompileReasons Run="False"/>
|
||||
</ExecuteBefore>
|
||||
</Other>
|
||||
|
|
@ -1057,6 +1057,7 @@ end;"/>
|
|||
<Unit116>
|
||||
<Filename Value="filesources\ufilesourceexecuteoperation.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="uFileSourceExecuteOperation"/>
|
||||
</Unit116>
|
||||
<Unit117>
|
||||
<Filename Value="filesources\ufilesourcelistoperation.pas"/>
|
||||
|
|
@ -1601,7 +1602,7 @@ end;"/>
|
|||
<Filename Value="..\doublecmd"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(LazarusDir)\ide;$(ProjOutDir);..\sdk"/>
|
||||
<IncludeFiles Value="$(LazarusDir)\ide;$(ProjOutDir);..\sdk;platform"/>
|
||||
<OtherUnitFiles Value="platform;platform\$(SrcOS);..\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"/>
|
||||
<UnitOutputDirectory Value="..\units\$(TargetCPU)-$(TargetOS)-$(LCLWidgetType)"/>
|
||||
<SrcPath Value="$(LazarusDir)\lcl;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType);$(fpcsrcdir)\packages\fcl-base\src"/>
|
||||
|
|
@ -1632,7 +1633,7 @@ end;"/>
|
|||
</Linking>
|
||||
<Other>
|
||||
<ExecuteBefore>
|
||||
<Command Value="$(ProjPath)\_getsvnrev$(ExeExt).cmd $MakeDir($(LazarusDir))"/>
|
||||
<Command Value="$(ProjPath)\platform\svn2revisioninc$(ExeExt).cmd $MakeFile($(ProjOutDir))"/>
|
||||
<CompileReasons Run="False"/>
|
||||
</ExecuteBefore>
|
||||
</Other>
|
||||
|
|
|
|||
2
src/platform/dcrevision.inc
Normal file
2
src/platform/dcrevision.inc
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
// Created by Svn2RevisionInc
|
||||
const dcRevision = 'Unknown';
|
||||
16
src/platform/svn2revisioninc.cmd
Executable file
16
src/platform/svn2revisioninc.cmd
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
export REVISION_INC=$1/dcrevision.inc
|
||||
|
||||
rm -f $REVISION_INC
|
||||
|
||||
export REVISION=$(svnversion ../ | sed -e 's/\([0-9]*\).*/\1/')
|
||||
|
||||
if [ ! -z $REVISION ]; then
|
||||
|
||||
echo "// Created by Svn2RevisionInc" > $REVISION_INC
|
||||
echo "const dcRevision = '$REVISION';" >> $REVISION_INC
|
||||
|
||||
fi
|
||||
|
||||
echo "Subversion revision" $REVISION
|
||||
24
src/platform/svn2revisioninc.exe.cmd
Executable file
24
src/platform/svn2revisioninc.exe.cmd
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
@echo off
|
||||
|
||||
set REVISION_TXT=%1\revision.txt
|
||||
set REVISION_INC=%1\dcrevision.inc
|
||||
|
||||
del /Q %REVISION_TXT%
|
||||
del /Q %REVISION_INC%
|
||||
|
||||
svnversion -n ..\ > %REVISION_TXT%
|
||||
|
||||
IF ERRORLEVEL 1 goto EXIT
|
||||
|
||||
set /P REVISION=<%REVISION_TXT%
|
||||
|
||||
echo %REVISION% | find "Unversioned"
|
||||
|
||||
IF NOT ERRORLEVEL 1 goto EXIT
|
||||
|
||||
echo // Created by Svn2RevisionInc> %REVISION_INC%
|
||||
echo const dcRevision = '%REVISION%';>> %REVISION_INC%
|
||||
|
||||
:EXIT
|
||||
|
||||
echo Subversion revision %REVISION%
|
||||
Loading…
Add table
Add a link
Reference in a new issue