You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RnQ/RnQ/aboutDlg.pas

59 lines
1.7 KiB
Plaintext

{
This file is part of R&Q.
Under same license
}
unit aboutDlg;
{$I RnQConfig.inc}
interface
uses
Winapi.Windows, System.SysUtils, SciterJS, SciterJSAPI, GR32;
{$I PubRTTI.inc}
type
TAboutInfo = record
ver, build, sciterver, opensslver, bassver, icsver, synopsever, zstdver, gr32ver: String;
end;
{$I NoRTTI.inc}
TAboutMethods = class(TNativeMethods)
class procedure RegisterMethods(var ReturnValue: TSciterValue); override;
class procedure GetAboutInfo(argc: UINT; argv: PSciterValue; retval: PSciterValue); cdecl;
end;
implementation
uses
SciterLib, globalLib, RQUtil, RnQLangs, RnQGlobal, ZSTDLib, mormot.core.base;
class procedure TAboutMethods.RegisterMethods(var ReturnValue: TSciterValue);
begin
AddMethod('GetAboutInfo', GetAboutInfo);
inherited;
end;
class procedure TAboutMethods.GetAboutInfo(argc: UINT; argv: PSciterValue; retval: PSciterValue); cdecl;
var
AboutInfo: TAboutInfo;
begin
AboutInfo.ver := IntToStr(RnQBuild) + ' ' + GetTranslation('Build') + ' ' + IntToStr(RnQBuildCustom);
{$IFDEF CPUX64}
AboutInfo.ver := AboutInfo.ver + ' x64';
{$ENDIF CPUX64}
AboutInfo.build := GetTranslation('Built at') + ' ' + FormatDateTime('dd.mm.yyyy H:mm', builtTime) + ' [Mikanoshi]';
AboutInfo.sciterver := GetLibVersion(SCITER_DLL_DIR + SCITER_DLL_FILENAME);
AboutInfo.bassver := GetLibVersion(ModulesPath + 'bass.dll');
AboutInfo.synopsever := SYNOPSE_FRAMEWORK_VERSION;
AboutInfo.gr32ver := Graphics32Version;
if FileExists(ZSTDDllName) then
AboutInfo.zstdver := ZSTD_versionString
else
AboutInfo.zstdver := '';
V2S(UI.RecordToVar(AboutInfo), retval);
end;
end.