Initial
Исходный код версии 2.0
This commit is contained in:
31
sources/shared_units/__history/cde_kernel.pas;10
Normal file
31
sources/shared_units/__history/cde_kernel.pas;10
Normal file
@@ -0,0 +1,31 @@
|
||||
unit cde_kernel;
|
||||
{$mode delphi}
|
||||
{$codepage UTF8}
|
||||
interface
|
||||
uses LazFileUtils, sysutils, cde_dir, SimplyJSON, VersionControl, windows, LazUTF8;
|
||||
{stdcalls}
|
||||
function GetCDEVer (const AProgramName: String): TVersionInfo; STDCALL;
|
||||
function GetCDEVerStr (const AProgramName: String): String; STDCALL;
|
||||
function ShowMessageBox (const AHandle: HWND; const AText, ATitle: String; const AMessageType: LongInt; const AMessageBtns: LongInt = 0): Integer; STDCALL;
|
||||
implementation
|
||||
//Versions
|
||||
//Исполльзуйте в роли AProgramName следующее:
|
||||
// package -- версия сборки;
|
||||
// dll -- версия cdejecter.dll;
|
||||
// cde -- версия оболочки командной строки;
|
||||
// cdeg -- версия GUI-приложения.
|
||||
function GetCDEVer (const AProgramName: String): TVersionInfo;
|
||||
begin
|
||||
Result:= StrToVersionInfo(JSReadString('/' + AProgramName + '/version', '0.0.0.0', GetCDEPath + 'configs\version.json'));
|
||||
end;
|
||||
function GetCDEVerStr (const AProgramName: String): String;
|
||||
begin
|
||||
Result:= JSReadString('/' + AProgramName + '/string', '0.0.0.0', GetCDEPath + 'configs\version.json');
|
||||
end;
|
||||
//MessageBoxes
|
||||
function ShowMessageBox (const AHandle: HWND; const AText, ATitle: String; const AMessageType: LongInt; const AMessageBtns: LongInt = 0): Integer;
|
||||
begin
|
||||
MessageBeep(AMessageType);
|
||||
Result:= MessageBoxA(AHandle, PChar(UTF8ToSys(AText)), PChar(UTF8ToSys(ATitle)), AMessageType + AMessageBtns);
|
||||
end;
|
||||
end.
|
Reference in New Issue
Block a user