unit ReleaseForm; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ShellAPI, SynCommons; type TForm1 = class(TForm) Label1: TLabel; Label2: TLabel; Edit1: TEdit; Button1: TButton; Memo1: TMemo; Button2: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private public end; var Form1: TForm1; implementation {$R *.dfm} {$R vista.RES} // includes Win10 manifest - use .RES for linux cross-compilation procedure TForm1.Button1Click(Sender: TObject); var SearchVersion, Text, Head: string; procedure ProcessFile(const FN: TFileName); var SL: TStringList; s,tag,title: string; i,j,k,l: integer; first,titledone: boolean; begin SL := TStringList.Create; try SL.LoadFromFile(FN); first := false; titledone := false; for i := 0 to SL.Count-1 do begin s := trim(SL[i]); if s='' then continue; if not titledone and (s[1]='/') then begin while (s<>'') and (s[1] in [' ','/']) do delete(s,1,1); if s='' then continue; if s[1]='-' then titledone := true else title := title+s+' '; end; if SameText(s,'interface') then exit else if IdemPChar(pointer(s),'UNIT ') then first := true else if first and (copy(s,length(s)-length(SearchVersion)+1,length(SearchVersion))=SearchVersion) then begin s := ExtractFileName(FN); tag := copy(s,1,pos('.',s)-1); Head := Head+#13#10'
Our Open Source '+ 'mORMot framework is now available in revision '+ SearchVersion+'.
'#13#10#13#10+ 'The main new features are the following:
Go down to the download and forum links.'#13#10+ '
This is a per-unit list of changes for the '+SearchVersion+ ' release of mORMot:
'#13#10'Changes in details:
'#13#10+Text+#13#10'
'+
'Synopse mORMot download
'+
'To get it, go to this '+
'download page, or use the '+
'source...
Do not forget to get and read the '+ 'full reference documentation available there (mainly the "SAD" - Software Architecture Design - document).
'#13#10+ 'Feedback and questions are welcome in our forum, just '+ 'as usual.
'; Memo1.Text := Text; end; procedure TForm1.Button2Click(Sender: TObject); var FN: TFileName; version, content: string; begin version := Edit1.Text; content := Memo1.Text; if content='' then begin Button1Click(nil); content := Memo1.Text; end; FN := ChangeFileExt(paramstr(0),'_'+Version+'.htm'); with TFileStream.Create(FN,fmCreate) do try content := '