Skip to content

Commit

Permalink
update about form with version info
Browse files Browse the repository at this point in the history
  • Loading branch information
alanphys committed May 2, 2024
1 parent 77f8dd2 commit eb3f1b8
Show file tree
Hide file tree
Showing 16 changed files with 1,145 additions and 1,234 deletions.
41 changes: 20 additions & 21 deletions aboutunit.lfm
Original file line number Diff line number Diff line change
@@ -1,60 +1,59 @@
object AboutForm: TAboutForm
Left = 711
Height = 378
Top = 755
Width = 645
Left = 605
Height = 252
Top = 276
Width = 430
Caption = 'About'
ClientHeight = 378
ClientWidth = 645
DesignTimePPI = 144
ClientHeight = 252
ClientWidth = 430
OnCreate = FormCreate
LCLVersion = '2.2.6.0'
object PageControl: TPageControl
Left = 0
Height = 378
Height = 252
Top = 0
Width = 645
Width = 430
ActivePage = TabSheet1
Align = alClient
TabIndex = 0
TabOrder = 0
object TabSheet1: TTabSheet
Caption = 'About'
ClientHeight = 337
ClientWidth = 641
ClientHeight = 217
ClientWidth = 426
object mAbout: TMemo
Left = 0
Height = 337
Height = 217
Top = 0
Width = 641
Width = 426
Align = alClient
ScrollBars = ssAutoVertical
TabOrder = 0
end
end
object TabSheet2: TTabSheet
Caption = 'Licence'
ClientHeight = 337
ClientWidth = 641
ClientHeight = 217
ClientWidth = 426
object mLicence: TMemo
Left = 0
Height = 337
Height = 217
Top = 0
Width = 641
Width = 426
Align = alClient
ScrollBars = ssAutoVertical
TabOrder = 0
end
end
object TabSheet3: TTabSheet
Caption = 'Credits'
ClientHeight = 337
ClientWidth = 641
ClientHeight = 217
ClientWidth = 426
object mCredits: TMemo
Left = 0
Height = 337
Height = 217
Top = 0
Width = 641
Width = 426
Align = alClient
ScrollBars = ssAutoVertical
TabOrder = 0
Expand Down
32 changes: 16 additions & 16 deletions aboutunit.lrs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{ This is an automatically generated lazarus resource file }

LazarusResources.Add('TAboutForm','FORMDATA',[
'TPF0'#10'TAboutForm'#9'AboutForm'#4'Left'#3#199#2#6'Height'#3'z'#1#3'Top'#3
+#243#2#5'Width'#3#133#2#7'Caption'#6#5'About'#12'ClientHeight'#3'z'#1#11'Cli'
+'entWidth'#3#133#2#13'DesignTimePPI'#3#144#0#8'OnCreate'#7#10'FormCreate'#10
+'LCLVersion'#6#7'2.2.6.0'#0#12'TPageControl'#11'PageControl'#4'Left'#2#0#6'H'
+'eight'#3'z'#1#3'Top'#2#0#5'Width'#3#133#2#10'ActivePage'#7#9'TabSheet1'#5'A'
+'lign'#7#8'alClient'#8'TabIndex'#2#0#8'TabOrder'#2#0#0#9'TTabSheet'#9'TabShe'
+'et1'#7'Caption'#6#5'About'#12'ClientHeight'#3'Q'#1#11'ClientWidth'#3#129#2#0
+#5'TMemo'#6'mAbout'#4'Left'#2#0#6'Height'#3'Q'#1#3'Top'#2#0#5'Width'#3#129#2
+#5'Align'#7#8'alClient'#10'ScrollBars'#7#14'ssAutoVertical'#8'TabOrder'#2#0#0
+#0#0#9'TTabSheet'#9'TabSheet2'#7'Caption'#6#7'Licence'#12'ClientHeight'#3'Q'
+#1#11'ClientWidth'#3#129#2#0#5'TMemo'#8'mLicence'#4'Left'#2#0#6'Height'#3'Q'
+#1#3'Top'#2#0#5'Width'#3#129#2#5'Align'#7#8'alClient'#10'ScrollBars'#7#14'ss'
+'AutoVertical'#8'TabOrder'#2#0#0#0#0#9'TTabSheet'#9'TabSheet3'#7'Caption'#6#7
+'Credits'#12'ClientHeight'#3'Q'#1#11'ClientWidth'#3#129#2#0#5'TMemo'#8'mCred'
+'its'#4'Left'#2#0#6'Height'#3'Q'#1#3'Top'#2#0#5'Width'#3#129#2#5'Align'#7#8
+'alClient'#10'ScrollBars'#7#14'ssAutoVertical'#8'TabOrder'#2#0#0#0#0#0#0
'TPF0'#10'TAboutForm'#9'AboutForm'#4'Left'#3']'#2#6'Height'#3#252#0#3'Top'#3
+#20#1#5'Width'#3#174#1#7'Caption'#6#5'About'#12'ClientHeight'#3#252#0#11'Cli'
+'entWidth'#3#174#1#8'OnCreate'#7#10'FormCreate'#10'LCLVersion'#6#7'2.2.6.0'#0
+#12'TPageControl'#11'PageControl'#4'Left'#2#0#6'Height'#3#252#0#3'Top'#2#0#5
+'Width'#3#174#1#10'ActivePage'#7#9'TabSheet1'#5'Align'#7#8'alClient'#8'TabIn'
+'dex'#2#0#8'TabOrder'#2#0#0#9'TTabSheet'#9'TabSheet1'#7'Caption'#6#5'About'
+#12'ClientHeight'#3#217#0#11'ClientWidth'#3#170#1#0#5'TMemo'#6'mAbout'#4'Lef'
+'t'#2#0#6'Height'#3#217#0#3'Top'#2#0#5'Width'#3#170#1#5'Align'#7#8'alClient'
+#10'ScrollBars'#7#14'ssAutoVertical'#8'TabOrder'#2#0#0#0#0#9'TTabSheet'#9'Ta'
+'bSheet2'#7'Caption'#6#7'Licence'#12'ClientHeight'#3#217#0#11'ClientWidth'#3
+#170#1#0#5'TMemo'#8'mLicence'#4'Left'#2#0#6'Height'#3#217#0#3'Top'#2#0#5'Wid'
+'th'#3#170#1#5'Align'#7#8'alClient'#10'ScrollBars'#7#14'ssAutoVertical'#8'Ta'
+'bOrder'#2#0#0#0#0#9'TTabSheet'#9'TabSheet3'#7'Caption'#6#7'Credits'#12'Clie'
+'ntHeight'#3#217#0#11'ClientWidth'#3#170#1#0#5'TMemo'#8'mCredits'#4'Left'#2#0
+#6'Height'#3#217#0#3'Top'#2#0#5'Width'#3#170#1#5'Align'#7#8'alClient'#10'Scr'
+'ollBars'#7#14'ssAutoVertical'#8'TabOrder'#2#0#0#0#0#0#0
]);
38 changes: 38 additions & 0 deletions aboutunit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,68 @@ TAboutForm = class(TForm)

end;

function GetAppVersionString(IncludeBuildInfo:Boolean=True; MinorDigits:Byte=2;
IncludePosRelease:Boolean=False; IncludeAnyRelease:Boolean=False): String;

var
AboutForm: TAboutForm;

implementation

uses FileInfo;

function GetAppVersionString(IncludeBuildInfo:Boolean=True; MinorDigits:Byte=2;
IncludePosRelease:Boolean=False; IncludeAnyRelease:Boolean=False): String;
var VersionInfo: TVersionInfo;
begin
Result:= '';
try
VersionInfo:= TVersionInfo.Create;
VersionInfo.Load(HINSTANCE);
Result:= IntToStr(VersionInfo.FixedInfo.FileVersion[0]) + '.' +
Format('%0.*d',[MinorDigits,VersionInfo.FixedInfo.FileVersion[1]]);
if (IncludeAnyRelease or (IncludePosRelease and (VersionInfo.FixedInfo.FileVersion[2]<>0))) then
Result:= Result + '.' + IntToStr(VersionInfo.FixedInfo.FileVersion[2]);
if IncludeBuildInfo then
Result:= Result + '.' + IntToStr(VersionInfo.FixedInfo.FileVersion[3]);
finally
if assigned(VersionInfo) then
VersionInfo.Free;
end;
end; {getappversionstring}


{ TAboutForm }

procedure TAboutForm.FormCreate(Sender: TObject);
var FontName :string;
begin
Caption := 'Opposing Fields version ' + GetAppVersionString(True,2,True,True);
{$IF Defined(LINUX)}
FontName := 'Liberation Mono';
{$ELSEIF Defined(WINDOWS)}
FontName := 'Courier New';
{$ELSE}
FontName := 'Courier';
{$ENDIF}
try
mAbout.Font.Name := FontName;
mAbout.Lines.LoadFromFile('readme.txt');
except
on E:Exception do
mAbout.Lines.Text := 'Sorry readme not available';
end;

try
mLicence.Font.Name := FontName;
mLicence.Lines.LoadFromFile('licence.txt');
except
on E:Exception do
mLicence.Lines.Text := 'Sorry licence not available';
end;

try
mCredits.Font.Name := FontName;
mCredits.Lines.LoadFromFile('credits.txt');
except
on E:Exception do
Expand Down
4 changes: 0 additions & 4 deletions credits.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
Opposing Fields (OPF) written and maintained by Alan Chamberlain

OPF is compiled on Lazarus and Free Pascal. We gratefully acknowledge the contributions of the Lazarus and Free Pascal teams.

We also wish to acknowledge the following:

Lightweight Networking Library (lNet) written by Ales Katona and Micha Nelissen
23 changes: 1 addition & 22 deletions licence.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Opposing Fields v 3.0
(c) AC Chamberlain 1994-2024
Opposing Fields (c) AC Chamberlain 1994-2024

Licence and Disclaimer
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand All @@ -17,23 +16,3 @@ Redistribution and use in source and binary forms, with or without modification,
Yenzakahle Medical Physics Inc, their subsidiaries and associated companies or practices make no representations or warranties, expressly or implied regarding the program and associated computer files forming the software. No representations or warranties of the merchantablity or fitness for any particular purpose are made or that the use of the software will not infringe any patents, copyrights or trademarks. The licensee agrees that neither Yenzakahle Medical Physics Inc nor any of their employees, agents or contractors nor the authors, developers or programmers of the software shall be liable under any claim, charge, demand, whether in contract, tort or otherwise, for any and all loss, cost, charge, claim, demand, fee, expense or damage of any nature or kind arising out of, connected with, resulting from or sustained as a result of this agreement. In no event shall Yenzakahle Medical Physics Inc, nor any of their employees, agents or contractors nor the authors, developers or programmers of the software be liable for special, direct, indirect or consequential damages, losses, costs, charges, demands, fees or expenses of any nature or kind.

The files Varian.bdf and Elekta.bdf contain generic data and should in no way be considered a standard of linac performance.

-------------------------------------------
lNet
-------------------------------------------
LGPL

This is the file LICENSE.Addon, it applies to the Lighweight Network Library (lnet).

The source code of the Lightweight Network library are distributed under the Library GNU General Public License (see the file LICENSE) with the following modification:

- object files and libraries linked into an application may be distributed without source code.

The unit tomwinsock.pas is EXLUDED from both the GPL and this addon license. It is distributed under the terms of BSD license as mentioned in the file. Original author of tomwinsock.pas is Thomas Schatzl.

If you didn't receive a copy of the file LICENSE, contact:
Free Software Foundation, Inc.,
59 Temple Place - Suite 330
Boston, MA 02111
USA

Binary file modified opf
Binary file not shown.
Binary file modified opf.exe
Binary file not shown.
Loading

0 comments on commit eb3f1b8

Please sign in to comment.