diff --git a/cesetup/cesetup.coedit b/cesetup/cesetup.coedit index b2abc9c0..2d82bc4e 100644 --- a/cesetup/cesetup.coedit +++ b/cesetup/cesetup.coedit @@ -7,9 +7,9 @@ object CurrentProject: TCENativeProject outputOptions.boundsCheck = offAlways outputOptions.optimizations = True outputOptions.release = True - pathsOptions.outputFilename = 'output\coedit.2update6.win32.setup.exe' + pathsOptions.outputFilename = 'output/coedit.3alpha1.win32.setup' pathsOptions.importStringPaths.Strings = ( - 'win32\' + 'win32/' '' ) preBuildProcess.executable = 'cmd' @@ -34,9 +34,9 @@ object CurrentProject: TCENativeProject outputOptions.boundsCheck = offAlways outputOptions.optimizations = True outputOptions.release = True - pathsOptions.outputFilename = 'output\coedit.2update6.linux32.setup' + pathsOptions.outputFilename = 'output/coedit.3alpha1.linux32.setup' pathsOptions.importStringPaths.Strings = ( - 'nux32\' + 'nux32/' '' ) preBuildProcess.executable = 'sh' @@ -57,9 +57,9 @@ object CurrentProject: TCENativeProject outputOptions.boundsCheck = offAlways outputOptions.optimizations = True outputOptions.release = True - pathsOptions.outputFilename = 'output\coedit.2update6.linux64.setup' + pathsOptions.outputFilename = 'output/coedit.3alpha1.linux64.setup' pathsOptions.importStringPaths.Strings = ( - 'nux64\' + 'nux64/' '' ) preBuildProcess.executable = 'sh' @@ -77,6 +77,5 @@ object CurrentProject: TCENativeProject Sources.Strings = ( 'cesetup.d' ) - ConfigurationIndex = 0 + ConfigurationIndex = 2 end - diff --git a/cesetup/cesetup.d b/cesetup/cesetup.d index 3f30362a..828216d0 100644 --- a/cesetup/cesetup.d +++ b/cesetup/cesetup.d @@ -156,7 +156,8 @@ void main(string[] args) 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"); 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; -} - diff --git a/cesetup/version.txt b/cesetup/version.txt index 2fb67baa..33b079db 100644 --- a/cesetup/version.txt +++ b/cesetup/version.txt @@ -1 +1 @@ -2update6 \ No newline at end of file +3_alpha_1 \ No newline at end of file diff --git a/cesetup/zip-nux32.sh b/cesetup/zip-nux32.sh index 59fb736f..6223d6b7 100644 --- a/cesetup/zip-nux32.sh +++ b/cesetup/zip-nux32.sh @@ -4,7 +4,7 @@ cd nux32 mkdir $fld/ cp * $fld/ zip -9 \ -../output/coedit.$ver.linux32.zip \ +../output/coedit.${ver//_}.linux32.zip \ $fld/dcd.license.txt $fld/coedit.license.txt \ $fld/coedit $fld/dastworx \ $fld/coedit.ico $fld/coedit.png \ diff --git a/cesetup/zip-nux64.sh b/cesetup/zip-nux64.sh index 0aec31d7..03c00edf 100644 --- a/cesetup/zip-nux64.sh +++ b/cesetup/zip-nux64.sh @@ -4,7 +4,7 @@ cd nux64 mkdir $fld/ cp * $fld/ zip -9 \ -../output/coedit.$ver.linux64.zip \ +../output/coedit.${ver//_}.linux64.zip \ $fld/dcd.license.txt $fld/coedit.license.txt \ $fld/coedit $fld/dastworx \ $fld/coedit.ico $fld/coedit.png \ diff --git a/src/ce_infos.lfm b/src/ce_infos.lfm index 69edb76a..47e3c4fb 100644 --- a/src/ce_infos.lfm +++ b/src/ce_infos.lfm @@ -36,7 +36,6 @@ inherited CEInfoWidget: TCEInfoWidget Align = alClient Alignment = taCenter AutoSize = False - Caption = 'Coedit 3 - devel' Font.Height = -16 Font.Style = [fsBold] Layout = tlCenter diff --git a/src/ce_infos.pas b/src/ce_infos.pas index 3dfb6498..9d898530 100644 --- a/src/ce_infos.pas +++ b/src/ce_infos.pas @@ -5,7 +5,7 @@ unit ce_infos; interface 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; type @@ -170,60 +170,71 @@ end; constructor TCEInfoWidget.create(aOwner: TComponent); var - toolItem: TToolInfo; + itm: TToolInfo; + ver: string = 'enough_space_for_the_version'; + len: integer; begin inherited; toolbarVisible:=false; fIsModal := true; 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'); - toolItem.Parent := boxTools; - toolItem.ReAlign; - toolItem := TToolInfo.Construct(self, tikOptional, 'dfmt', + itm.Parent := boxTools; + itm.ReAlign; + itm := TToolInfo.Construct(self, tikOptional, 'dfmt', 'optional, the D source code formater, needed by the Dfmt commander widget'); - toolItem.Parent := boxTools; - toolItem.ReAlign; + itm.Parent := boxTools; + itm.ReAlign; // 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'); - toolItem.Parent := boxTools; - toolItem.ReAlign; - toolItem := TToolInfo.Construct(self, tikOptional, 'gdc', + itm.Parent := boxTools; + itm.ReAlign; + itm := TToolInfo.Construct(self, tikOptional, 'gdc', 'optional, the GDC D compiler'); - toolItem.Parent := boxTools; - toolItem.ReAlign; - toolItem := TToolInfo.Construct(self, tikOptional, 'ldc2', + itm.Parent := boxTools; + itm.ReAlign; + itm := TToolInfo.Construct(self, tikOptional, 'ldc2', 'optional, the LDC D compiler'); - toolItem.Parent := boxTools; - toolItem.ReAlign; - toolItem := TToolInfo.Construct(self, tikOptional, 'ddemangle', + itm.Parent := boxTools; + itm.ReAlign; + itm := TToolInfo.Construct(self, tikOptional, 'ddemangle', 'optional, allows to demangle cryptic symbols in the message widget'); - toolItem.Parent := boxTools; - toolItem.ReAlign; - toolItem := TToolInfo.Construct(self, tikRunning, 'dcd-server', + itm.Parent := boxTools; + itm.ReAlign; + itm := TToolInfo.Construct(self, tikRunning, 'dcd-server', 'mandatory, provides IDE-level features such as the completion'); - toolItem.Parent := boxTools; - toolItem.ReAlign; - toolItem := TToolInfo.Construct(self, tikFindable, 'dcd-client', + itm.Parent := boxTools; + itm.ReAlign; + itm := TToolInfo.Construct(self, tikFindable, 'dcd-client', 'mandatory, provides IDE-level features such as the completion'); - toolItem.Parent := boxTools; - toolItem.ReAlign; - toolItem := TToolInfo.Construct(self, tikFindable, 'dastworx', + itm.Parent := boxTools; + itm.ReAlign; + itm := TToolInfo.Construct(self, tikFindable, 'dastworx', 'background tool that works on the D modules AST to extract informations' + LineEnding + 'such as the declarations, the imports, the "TODO" comments, etc.'); - toolItem.Parent := boxTools; - toolItem.ReAlign; - toolItem := TToolInfo.Construct(self, tikOptional, 'dub', + itm.Parent := boxTools; + itm.ReAlign; + itm := TToolInfo.Construct(self, tikOptional, 'dub', 'the D package manager, mandatory to compile project in DUB format'); - toolItem.Parent := boxTools; - toolItem.ReAlign; - toolItem := TToolInfo.Construct(self, tikFindable, 'dmd', + itm.Parent := boxTools; + itm.ReAlign; + itm := TToolInfo.Construct(self, tikFindable, 'dmd', 'the reference D compiler, mandatory to compile native projects, ' + 'to unittest and to launch runnable modules'); - toolItem.Parent := boxTools; - toolItem.ReAlign; + itm.Parent := boxTools; + itm.ReAlign; // Realign; end; diff --git a/src/ce_main.pas b/src/ce_main.pas index 0ea1718c..7e1e31cf 100644 --- a/src/ce_main.pas +++ b/src/ce_main.pas @@ -1430,12 +1430,6 @@ begin tgg := dat.FindPath('tag_name'); if url.isNotNil and tgg.isNotNil then begin - // TODO: change version.txt format - // version.txt has a different format than the git tags - // txt: - // git: __ - // when = 'gold' no minor version is present - // => related to regexp on txt, could be changed with #54 res:= TResourceStream.Create(HINSTANCE, 'VERSION', RT_RCDATA); lst := TstringList.Create; lst.LoadFromStream(res); @@ -1445,19 +1439,18 @@ begin rng.init(str); 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; str := tgg.AsString; rng.init(str); mj1 := rng.takeWhile(['0'..'9']).yield.toIntNoExcept; - rng.popFront; - kd1 := rng.takeUntil('_').yield; - if (kd1 <> 'gold') and not rng.empty then - begin - rng.popFront; - mn1 := rng.takeWhile(['0'..'9']).yield.toIntNoExcept; - end; + rng.popWhile('_'); + kd1 := rng.takeWhile(['a'..'z']).yield; + rng.popWhile('_'); + mn1 := rng.takeWhile(['0'..'9']).yield.toIntNoExcept; if mj1 > mj0 then can := true @@ -3203,7 +3196,7 @@ begin fMsgs.message('start compiling a project group...', nil, amcAll, amkInf); for i:= 0 to fProjectGroup.projectCount-1 do 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; fProject.compile; end;