groffstudio

Check-in [ebe98e25b1]
Login
Overview
Comment:[Bugfix] Windows builds still had a seemingly broken update check. Fixed the status display.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | release-0.10.1
Files: files | file ages | folders
SHA3-256: ebe98e25b194c3183d389bb3036d6d02c8a8176fa99f393a82f7b916ffde7e68
User & Date: Cthulhux on 2022-03-10 15:23:43
Other Links: manifest | tags
Context
2022-03-10
15:38
RevisionNr check-in: 94ba820d84 user: Cthulhux tags: trunk
15:23
[Bugfix] Windows builds still had a seemingly broken update check. Fixed the status display. check-in: ebe98e25b1 user: Cthulhux tags: trunk, release-0.10.1
15:14
[Bugfix] When editing an unsaved document, the status panel will (correctly) display '[unsaved file]' now. check-in: abbf41a4a7 user: Cthulhux tags: trunk
Changes

Modified CHANGES.txt from [4a00451b46] to [16edf83c70].

1


2
3

4
5
6
7
8
9
10

1
2
3
4
5
6
7
8
9
10
11
12
-
+
+


+







Version [unreleased]
Version 0.10.1
2022-03-10

[Bugfix] When editing an unsaved document, the status panel will (correctly) display "[unsaved file]" now.
[Bugfix] Windows builds still had a seemingly broken update check. Fixed the status display.

-------------------------------

Version 0.10.0
2022-03-10

[Feature] Log file creation.

Modified src/buildoutputwindow.pas from [ea372bf0cc] to [244f78b094].

16
17
18
19
20
21
22
23

24
25
26
27
28
29
30
16
17
18
19
20
21
22

23
24
25
26
27
28
29
30







-
+







}

{$mode ObjFPC}{$H+}

interface

uses
  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, Process;
  Classes, SysUtils, Forms, StdCtrls, Process;

type

  { TBuildStatusWindow }

  TBuildStatusWindow = class(TForm)
    Label1: TLabel;

Modified src/helpers.pas from [1080e43d57] to [7fc6e4646d].

53
54
55
56
57
58
59
60
61
62
63
64
53
54
55
56
57
58
59

60
61
62
63







-




  else if nV1 > nV2 then
    comp := 1
  else if nV1 < nV2 then
    comp := -1;
 end
 else
   comp := 0;
 end;
end;

end.

Modified src/unit1.pas from [00c2628984] to [24552d1e1a].

189
190
191
192
193
194
195

196
197
198
199
200
201
202
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203







+







  // What's the latest available version?
  FileVerInfo := TFileVersionInfo.Create(nil);

  try
    FileVerInfo.ReadFileInfo;
    edtGroffStudioInstalledVersion.Text := FileVerInfo.VersionStrings.Values['FileVersion'];
    lblAboutProductName.Caption := FileVerInfo.VersionStrings.Values['ProductName'] + ' ' + FileVerInfo.VersionStrings.Values['FileVersion'];
    MainStatusBar.Panels[2].Text := '';

    {$IFDEF WINDOWS}
    OnlineVersionsFile := TFPCustomHTTPClient.SimpleGet('https://groff.tuxproject.de/updates/versions.txt');
    reGroffVersion := TRegExpr.Create('groff-win ([\d\.]+) (.*)$');
    reGroffVersion.ModifierM := True;
    if reGroffVersion.Exec(OnlineVersionsFile) then
    begin
211
212
213
214
215
216
217
218

219
220
221
222
223
224
225
226
227
228
229
230
212
213
214
215
216
217
218

219
220
221
222
223

224
225
226
227
228
229
230







-
+




-







    reGroffStudioVersion.ModifierM := True;
    if reGroffStudioVersion.Exec(OnlineVersionsFile) then
    begin
      // Compare the two versions - ours and the online one:
      GroffHelpers.VerStrCompare(reGroffStudioVersion.Match[1], FileVerInfo.VersionStrings.Values['FileVersion'], HasVersionUpdate);
      if HasVersionUpdate > 0 then
        MainStatusBar.Panels[2].Text := 'update ' + reGroffStudioVersion.Match[1] + ' available';
    end else MainStatusBar.Panels[2].Text := '';
    end;
    {$ELSE}
    // Non-Windows platforms won't need some of that.
    {$IFDEF DARWIN}
    // What's the latest available version?
    MainStatusBar.Panels[2].Text := '';
    try
      HTTPClient := TFPHTTPClient.Create(Nil);
      HTTPClient.OnGetSocketHandler := @GetSocketHandler;
      OnlineVersionsFile := HTTPClient.SimpleGet('https://groff.tuxproject.de/updates/versions.txt');

      reGroffStudioVersion := TRegExpr.Create('studio-macos ([\d\.]+) (.*)$');
      reGroffStudioVersion.ModifierM := True;