Closed Pawe1 closed 7 years ago
Thanks / Look like it works :)
You can also do a test in Professional edition if everything is OK (especially about ADO stuff)
OK. And, how to change the icon of CnVcl?
You have to add picture with logo (in PNG / JPG format) somewhere inside repository Example here Then add "picture" parameter in Delphinus.Info.json with relative path Example here
Official documentation available is here
Maximum and optimal size is 128*128
Warning - all "\" chars in JSON file must be doubled ("\\")
I didn't add it because I haven't found it :wink:
Ok. thanks.
And about the PERSONAL_EDITION definition in CnPack.inc, I prefer to keep it undefined for old users.
You can revert this change if You like.
The only problem with PERSONAL_EDITION
is that compilation of packages fails if You have Delphi Starter... :cry:
Delphi Starter lacks for example ADO so Starter user will have to
So I thought that not enabling everything "out of the box" is more safe way because downloaded package will always compile.
Maybe it is possible to detect IDE version automatically? I have no idea...
I am also not sure if .dpk files should or should not include {$I CnPack.inc}
to make package condition {$IFDEF SUPPORT_ADO}
work properly...
It is probably possible to detect Starter version via this code (works in Delphi XE+)
function TDelphinusDialog.IsStarter: Boolean;
var
LService: IOTAServices;
LReg: TRegistry;
LBase: string;
begin
Result := False;
LService := BorlandIDEServices as IOTAServices;
LBase := LService.GetBaseRegistryKey();
LReg := TRegistry.Create();
try
if LReg.OpenKeyReadOnly(LBase) then
begin
if LReg.ValueExists('Edition') then
Result := SameText(LReg.ReadString('Edition'), 'Starter');
end;
finally
LReg.Free;
end;
end;
But I have no idea if this is possible to for example dynamically alter CnPack.inc
before building.
I have started a discussion here
Little Tip: Call it "CnPack VCL" or "CnPackVCL". Commandline users will thank you ;) (shorter names are easier to write :P)
In case none of you knew: Delphinus has a commandline interface which allows you to adress packages either by ID or their names.
@Memnarch Maybe You have an idea for automated conditional compilation for Starter / Professional+ ?...
well i had a few ideas for specifying defines in a DelphinusPackage-File so that you could conditionally compile. However never ironed out the details and its implications. On systems like Linux where packagemanagers are omnipresent, you'd usually split things like this into different packages. Have CnPackVCL, CnPackDB and so on. However that thing(conditional/optional features) is a thing i want to add!
Oh and @shanzhashu consider adding regular releases to this repository, which allows Delphinus to notify/tell users about updates. The documentation has a topic about versioning and stuff. If you have any questions, feel free to ask me.
Project Options
and switch Target to All configurations - All platformsIn Delphi Compiler > Conditional defines
add $(DelphiEdition)
CnPack.inc
Replace
//{$DEFINE PERSONAL_EDITION}
{$DEFINE ENTERPRISE_EDITION}
with
{$IFNDEF DelphiStarterEdition}
{$DEFINE ENTERPRISE_EDITION}
{$ELSE}
{$DEFINE PERSONAL_EDITION}
{$ENDIF}
to open
Tools > Options > Environment Options > Environment Variables > User overrides > New
and add variable with name DelphiEdition and value DelphiStarterEdition
@Memnarch Or maybe adding environment variables is possible using OTAPI?
well it is even possible to specify those values from Delphinus just for the running MSBuild(and therefore the DelphiCompiler). However things like that need more thinking and planning on my end.
It's crazy that Starter has such a differences and Embarcadero didn't provide any easy way to figure out Delphi Edition... :dizzy_face:
:bulb: Advantages:
The Readme.md and line with keyword "Delphinus-Support" in readme is required to find repository via GitHub API.
I also added
$IFDEF SUPPORT_ADO
sections into dpk files because I was unable to compile them in Delphi Starter. And switched$DEFINE PERSONAL_EDITION
as default option