use same naming convention for version.txt and git tags

This commit is contained in:
Basile Burg 2016-07-09 21:35:00 +02:00
parent ad8ba83fcd
commit 1a4240fe9e
8 changed files with 66 additions and 71 deletions

View File

@ -7,9 +7,9 @@ object CurrentProject: TCENativeProject
outputOptions.boundsCheck = offAlways outputOptions.boundsCheck = offAlways
outputOptions.optimizations = True outputOptions.optimizations = True
outputOptions.release = True outputOptions.release = True
pathsOptions.outputFilename = 'output\coedit.2update6.win32.setup.exe' pathsOptions.outputFilename = 'output/coedit.3alpha1.win32.setup'
pathsOptions.importStringPaths.Strings = ( pathsOptions.importStringPaths.Strings = (
'win32\' 'win32/'
'<CPP>' '<CPP>'
) )
preBuildProcess.executable = 'cmd' preBuildProcess.executable = 'cmd'
@ -34,9 +34,9 @@ object CurrentProject: TCENativeProject
outputOptions.boundsCheck = offAlways outputOptions.boundsCheck = offAlways
outputOptions.optimizations = True outputOptions.optimizations = True
outputOptions.release = True outputOptions.release = True
pathsOptions.outputFilename = 'output\coedit.2update6.linux32.setup' pathsOptions.outputFilename = 'output/coedit.3alpha1.linux32.setup'
pathsOptions.importStringPaths.Strings = ( pathsOptions.importStringPaths.Strings = (
'nux32\' 'nux32/'
'<CPP>' '<CPP>'
) )
preBuildProcess.executable = 'sh' preBuildProcess.executable = 'sh'
@ -57,9 +57,9 @@ object CurrentProject: TCENativeProject
outputOptions.boundsCheck = offAlways outputOptions.boundsCheck = offAlways
outputOptions.optimizations = True outputOptions.optimizations = True
outputOptions.release = True outputOptions.release = True
pathsOptions.outputFilename = 'output\coedit.2update6.linux64.setup' pathsOptions.outputFilename = 'output/coedit.3alpha1.linux64.setup'
pathsOptions.importStringPaths.Strings = ( pathsOptions.importStringPaths.Strings = (
'nux64\' 'nux64/'
'<CPP>' '<CPP>'
) )
preBuildProcess.executable = 'sh' preBuildProcess.executable = 'sh'
@ -77,6 +77,5 @@ object CurrentProject: TCENativeProject
Sources.Strings = ( Sources.Strings = (
'cesetup.d' 'cesetup.d'
) )
ConfigurationIndex = 0 ConfigurationIndex = 2
end end

View File

@ -156,7 +156,8 @@ void main(string[] args)
return; return;
} }
if (!uninstall) Formater.justify!'C'(format("Coedit %s - setup", splitVer)); if (!uninstall) Formater.justify!'C'(format("Coedit %s - setup",
import("version.txt").split('_').join(" ")));
else Formater.justify!'C'("Coedit uninstaller"); else Formater.justify!'C'("Coedit uninstaller");
Formater.separate; Formater.separate;
@ -399,11 +400,3 @@ void postUninstall()
} }
} }
/// splits the version identifier used in filenames
string splitVer()
{
import std.regex: matchAll, ctRegex;
return matchAll(import("version.txt"), ctRegex!("\\d+|\\D+"))
.join.join(" ").stripRight;
}

View File

@ -1 +1 @@
2update6 3_alpha_1

View File

@ -4,7 +4,7 @@ cd nux32
mkdir $fld/ mkdir $fld/
cp * $fld/ cp * $fld/
zip -9 \ zip -9 \
../output/coedit.$ver.linux32.zip \ ../output/coedit.${ver//_}.linux32.zip \
$fld/dcd.license.txt $fld/coedit.license.txt \ $fld/dcd.license.txt $fld/coedit.license.txt \
$fld/coedit $fld/dastworx \ $fld/coedit $fld/dastworx \
$fld/coedit.ico $fld/coedit.png \ $fld/coedit.ico $fld/coedit.png \

View File

@ -4,7 +4,7 @@ cd nux64
mkdir $fld/ mkdir $fld/
cp * $fld/ cp * $fld/
zip -9 \ zip -9 \
../output/coedit.$ver.linux64.zip \ ../output/coedit.${ver//_}.linux64.zip \
$fld/dcd.license.txt $fld/coedit.license.txt \ $fld/dcd.license.txt $fld/coedit.license.txt \
$fld/coedit $fld/dastworx \ $fld/coedit $fld/dastworx \
$fld/coedit.ico $fld/coedit.png \ $fld/coedit.ico $fld/coedit.png \

View File

@ -36,7 +36,6 @@ inherited CEInfoWidget: TCEInfoWidget
Align = alClient Align = alClient
Alignment = taCenter Alignment = taCenter
AutoSize = False AutoSize = False
Caption = 'Coedit 3 - devel'
Font.Height = -16 Font.Height = -16
Font.Style = [fsBold] Font.Style = [fsBold]
Layout = tlCenter Layout = tlCenter

View File

@ -5,7 +5,7 @@ unit ce_infos;
interface interface
uses uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, strutils,
StdCtrls, ExtCtrls, Buttons, Menus,ce_widget, ce_common, ce_sharedres; StdCtrls, ExtCtrls, Buttons, Menus,ce_widget, ce_common, ce_sharedres;
type type
@ -170,60 +170,71 @@ end;
constructor TCEInfoWidget.create(aOwner: TComponent); constructor TCEInfoWidget.create(aOwner: TComponent);
var var
toolItem: TToolInfo; itm: TToolInfo;
ver: string = 'enough_space_for_the_version';
len: integer;
begin begin
inherited; inherited;
toolbarVisible:=false; toolbarVisible:=false;
fIsModal := true; fIsModal := true;
fIsDockable := false; fIsDockable := false;
// //
toolItem := TToolInfo.Construct(self, tikOptional, 'dscanner', with TResourceStream.Create(HINSTANCE, 'VERSION', RT_RCDATA) do
try
len := read(ver[1], ver.length);
setLength(ver, len);
Label1.Caption := 'Coedit - ' + replaceStr(ver, '_', ' ');
finally
free;
end;
//
itm := TToolInfo.Construct(self, tikOptional, 'dscanner',
'optional, the D source code analyzer'); 'optional, the D source code analyzer');
toolItem.Parent := boxTools; itm.Parent := boxTools;
toolItem.ReAlign; itm.ReAlign;
toolItem := TToolInfo.Construct(self, tikOptional, 'dfmt', itm := TToolInfo.Construct(self, tikOptional, 'dfmt',
'optional, the D source code formater, needed by the Dfmt commander widget'); 'optional, the D source code formater, needed by the Dfmt commander widget');
toolItem.Parent := boxTools; itm.Parent := boxTools;
toolItem.ReAlign; itm.ReAlign;
// TODO-cmaintenance: remove this entry if GDMD is distributed with GDC // TODO-cmaintenance: remove this entry if GDMD is distributed with GDC
toolItem := TToolInfo.Construct(self, tikOptional, 'gdmd', itm := TToolInfo.Construct(self, tikOptional, 'gdmd',
'optional, the GDC wrapper with a DMD command line interface'); 'optional, the GDC wrapper with a DMD command line interface');
toolItem.Parent := boxTools; itm.Parent := boxTools;
toolItem.ReAlign; itm.ReAlign;
toolItem := TToolInfo.Construct(self, tikOptional, 'gdc', itm := TToolInfo.Construct(self, tikOptional, 'gdc',
'optional, the GDC D compiler'); 'optional, the GDC D compiler');
toolItem.Parent := boxTools; itm.Parent := boxTools;
toolItem.ReAlign; itm.ReAlign;
toolItem := TToolInfo.Construct(self, tikOptional, 'ldc2', itm := TToolInfo.Construct(self, tikOptional, 'ldc2',
'optional, the LDC D compiler'); 'optional, the LDC D compiler');
toolItem.Parent := boxTools; itm.Parent := boxTools;
toolItem.ReAlign; itm.ReAlign;
toolItem := TToolInfo.Construct(self, tikOptional, 'ddemangle', itm := TToolInfo.Construct(self, tikOptional, 'ddemangle',
'optional, allows to demangle cryptic symbols in the message widget'); 'optional, allows to demangle cryptic symbols in the message widget');
toolItem.Parent := boxTools; itm.Parent := boxTools;
toolItem.ReAlign; itm.ReAlign;
toolItem := TToolInfo.Construct(self, tikRunning, 'dcd-server', itm := TToolInfo.Construct(self, tikRunning, 'dcd-server',
'mandatory, provides IDE-level features such as the completion'); 'mandatory, provides IDE-level features such as the completion');
toolItem.Parent := boxTools; itm.Parent := boxTools;
toolItem.ReAlign; itm.ReAlign;
toolItem := TToolInfo.Construct(self, tikFindable, 'dcd-client', itm := TToolInfo.Construct(self, tikFindable, 'dcd-client',
'mandatory, provides IDE-level features such as the completion'); 'mandatory, provides IDE-level features such as the completion');
toolItem.Parent := boxTools; itm.Parent := boxTools;
toolItem.ReAlign; itm.ReAlign;
toolItem := TToolInfo.Construct(self, tikFindable, 'dastworx', itm := TToolInfo.Construct(self, tikFindable, 'dastworx',
'background tool that works on the D modules AST to extract informations' + 'background tool that works on the D modules AST to extract informations' +
LineEnding + 'such as the declarations, the imports, the "TODO" comments, etc.'); LineEnding + 'such as the declarations, the imports, the "TODO" comments, etc.');
toolItem.Parent := boxTools; itm.Parent := boxTools;
toolItem.ReAlign; itm.ReAlign;
toolItem := TToolInfo.Construct(self, tikOptional, 'dub', itm := TToolInfo.Construct(self, tikOptional, 'dub',
'the D package manager, mandatory to compile project in DUB format'); 'the D package manager, mandatory to compile project in DUB format');
toolItem.Parent := boxTools; itm.Parent := boxTools;
toolItem.ReAlign; itm.ReAlign;
toolItem := TToolInfo.Construct(self, tikFindable, 'dmd', itm := TToolInfo.Construct(self, tikFindable, 'dmd',
'the reference D compiler, mandatory to compile native projects, ' 'the reference D compiler, mandatory to compile native projects, '
+ 'to unittest and to launch runnable modules'); + 'to unittest and to launch runnable modules');
toolItem.Parent := boxTools; itm.Parent := boxTools;
toolItem.ReAlign; itm.ReAlign;
// //
Realign; Realign;
end; end;

View File

@ -1430,12 +1430,6 @@ begin
tgg := dat.FindPath('tag_name'); tgg := dat.FindPath('tag_name');
if url.isNotNil and tgg.isNotNil then if url.isNotNil and tgg.isNotNil then
begin begin
// TODO: change version.txt format
// version.txt has a different format than the git tags
// txt: <major><kind><minor>
// git: <major>_<kind>_<minor>
// when <kind> = 'gold' no minor version is present
// => related to regexp on txt, could be changed with #54
res:= TResourceStream.Create(HINSTANCE, 'VERSION', RT_RCDATA); res:= TResourceStream.Create(HINSTANCE, 'VERSION', RT_RCDATA);
lst := TstringList.Create; lst := TstringList.Create;
lst.LoadFromStream(res); lst.LoadFromStream(res);
@ -1445,19 +1439,18 @@ begin
rng.init(str); rng.init(str);
mj0 := rng.takeWhile(['0'..'9']).yield.toIntNoExcept; mj0 := rng.takeWhile(['0'..'9']).yield.toIntNoExcept;
kd0 := rng.takeUntil(['0'..'9']).yield; rng.popWhile('_');
kd0 := rng.takeWhile(['a'..'z']).yield;
rng.popWhile('_');
mn0 := rng.takeWhile(['0'..'9']).yield.toIntNoExcept; mn0 := rng.takeWhile(['0'..'9']).yield.toIntNoExcept;
str := tgg.AsString; str := tgg.AsString;
rng.init(str); rng.init(str);
mj1 := rng.takeWhile(['0'..'9']).yield.toIntNoExcept; mj1 := rng.takeWhile(['0'..'9']).yield.toIntNoExcept;
rng.popFront; rng.popWhile('_');
kd1 := rng.takeUntil('_').yield; kd1 := rng.takeWhile(['a'..'z']).yield;
if (kd1 <> 'gold') and not rng.empty then rng.popWhile('_');
begin
rng.popFront;
mn1 := rng.takeWhile(['0'..'9']).yield.toIntNoExcept; mn1 := rng.takeWhile(['0'..'9']).yield.toIntNoExcept;
end;
if mj1 > mj0 then if mj1 > mj0 then
can := true can := true
@ -3203,7 +3196,7 @@ begin
fMsgs.message('start compiling a project group...', nil, amcAll, amkInf); fMsgs.message('start compiling a project group...', nil, amcAll, amkInf);
for i:= 0 to fProjectGroup.projectCount-1 do for i:= 0 to fProjectGroup.projectCount-1 do
begin begin
//TODO-cprojectgroup: verify that compilation is not paralell since the projects use an async proc. //TODO-cprojectgroup: verify that compilation is not parallel since the projects use an async proc.
fProjectGroup.getProject(i).activate; fProjectGroup.getProject(i).activate;
fProject.compile; fProject.compile;
end; end;