mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 01:39:31 +02:00
parent
20448170ae
commit
9581fe6649
@ -114,6 +114,7 @@ const
|
||||
'lrs',
|
||||
'res'
|
||||
);
|
||||
|
||||
function StrToResourceType(const s: string): TResourceType;
|
||||
|
||||
implementation
|
||||
@ -493,8 +494,8 @@ begin
|
||||
SetDeleteValue(Path+'VersionInfo/CurrentMinorRevNr/Value', VersionInfo.MinorRevNr,0);
|
||||
SetDeleteValue(Path+'VersionInfo/CurrentBuildNr/Value', VersionInfo.BuildNr,0);
|
||||
SetDeleteValue(Path+'VersionInfo/ProjectVersion/Value', VersionInfo.ProductVersionString,'1.0.0.0');
|
||||
SetDeleteValue(Path+'VersionInfo/Language/Value', VersionInfo.HexLang,'0409');
|
||||
SetDeleteValue(Path+'VersionInfo/CharSet/Value', VersionInfo.HexCharSet,'04E4');
|
||||
SetDeleteValue(Path+'VersionInfo/Language/Value', VersionInfo.HexLang,DefaultLanguage);
|
||||
SetDeleteValue(Path+'VersionInfo/CharSet/Value', VersionInfo.HexCharSet,DefaultCharset);
|
||||
SetDeleteValue(Path+'VersionInfo/Comments/Value', VersionInfo.CommentsString,'');
|
||||
SetDeleteValue(Path+'VersionInfo/CompanyName/Value', VersionInfo.CompanyString,'');
|
||||
SetDeleteValue(Path+'VersionInfo/FileDescription/Value', VersionInfo.DescriptionString,'');
|
||||
@ -523,8 +524,8 @@ begin
|
||||
VersionInfo.MinorRevNr := GetValue(Path+'VersionInfo/CurrentMinorRevNr/Value', 0);
|
||||
VersionInfo.BuildNr := GetValue(Path+'VersionInfo/CurrentBuildNr/Value', 0);
|
||||
VersionInfo.ProductVersionString := GetValue(Path+'VersionInfo/ProjectVersion/Value', '1.0.0.0');
|
||||
VersionInfo.HexLang := GetValue(Path+'VersionInfo/Language/Value', '0409');
|
||||
VersionInfo.HexCharSet := GetValue(Path+'VersionInfo/CharSet/Value', '04E4');
|
||||
VersionInfo.HexLang := GetValue(Path+'VersionInfo/Language/Value', DefaultLanguage);
|
||||
VersionInfo.HexCharSet := GetValue(Path+'VersionInfo/CharSet/Value', DefaultCharset);
|
||||
VersionInfo.CommentsString := LineBreaksToSystemLineBreaks(GetValue(Path+'VersionInfo/Comments/Value', ''));
|
||||
VersionInfo.CompanyString := LineBreaksToSystemLineBreaks(GetValue(Path+'VersionInfo/CompanyName/Value', ''));
|
||||
VersionInfo.DescriptionString := LineBreaksToSystemLineBreaks(GetValue(Path+'VersionInfo/FileDescription/Value', ''));
|
||||
|
@ -116,6 +116,10 @@ function MSHexLanguages: TStringList;
|
||||
function MSCharacterSets: TStringList;
|
||||
function MSHexCharacterSets: TStringList;
|
||||
|
||||
const
|
||||
DefaultLanguage = '0409';
|
||||
DefaultCharSet = '04E4';
|
||||
|
||||
implementation
|
||||
|
||||
var
|
||||
@ -275,6 +279,8 @@ var
|
||||
ARes: TVersionResource;
|
||||
st: TVersionStringTable;
|
||||
ti: TVerTranslationInfo;
|
||||
lang: String;
|
||||
charset: String;
|
||||
begin
|
||||
Result := True;
|
||||
if UseVersionInfo then
|
||||
@ -284,7 +290,12 @@ begin
|
||||
ARes.FixedInfo.FileVersion := FVersion;
|
||||
ARes.FixedInfo.ProductVersion := ExtractProductVersion;
|
||||
|
||||
st := TVersionStringTable.Create(HexLang + HexCharSet);
|
||||
lang:=HexLang;
|
||||
if lang='' then lang:=DefaultLanguage;
|
||||
charset:=HexCharSet;
|
||||
if charset='' then charset:=DefaultCharSet;
|
||||
|
||||
st := TVersionStringTable.Create(lang + charset);
|
||||
st.Add('Comments', Utf8ToAnsi(CommentsString));
|
||||
st.Add('CompanyName', Utf8ToAnsi(CompanyString));
|
||||
st.Add('FileDescription', Utf8ToAnsi(DescriptionString));
|
||||
@ -297,8 +308,8 @@ begin
|
||||
st.Add('ProductVersion', StringReplace(Utf8ToAnsi(ProductVersionString), ',', '.', [rfReplaceAll]));
|
||||
ARes.StringFileInfo.Add(st);
|
||||
|
||||
ti.language := StrToInt('$'+HexLang);
|
||||
ti.codepage := StrToInt('$'+HexCharSet);
|
||||
ti.language := StrToInt('$'+lang);
|
||||
ti.codepage := StrToInt('$'+charset);
|
||||
ARes.VarFileInfo.Add(ti);
|
||||
AResources.AddSystemResource(ARes);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user