groffstudio

Check-in [300ab98f2c]
Login
Overview
Comment:Simplified build status output on Windows
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 300ab98f2cef94a044775bfde52e65bf29e517cfab271d168249151a36e4c86f
User & Date: Cthulhux on 2024-04-30 09:51:45
Other Links: manifest | tags
Context
2024-04-30
09:53
Cleaned up redundant code. check-in: d0b6777baf user: Cthulhux tags: trunk
09:51
Simplified build status output on Windows check-in: 300ab98f2c user: Cthulhux tags: trunk
09:49
Only build PDF when the user wants to, even on Windows. check-in: a74e7d1c7f user: Cthulhux tags: trunk
Changes

Modified src/groffstudio.lpi from [bfb4387ac2] to [a064dbe3a0].

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
        <Resource_0 FileName="..\LICENSE" Type="RCDATA" ResourceName="LICENSE"/>
      </Resources>
    </General>
    <VersionInfo>
      <UseVersionInfo Value="True"/>
      <AutoIncrementBuild Value="True"/>
      <MinorVersionNr Value="14"/>
      <BuildNr Value="2"/>
      <StringTable ProductName="groffstudio"/>
    </VersionInfo>
    <BuildModes>
      <Item Name="Default" Default="True"/>
    </BuildModes>
    <PublishOptions>
      <Version Value="2"/>







|







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
        <Resource_0 FileName="..\LICENSE" Type="RCDATA" ResourceName="LICENSE"/>
      </Resources>
    </General>
    <VersionInfo>
      <UseVersionInfo Value="True"/>
      <AutoIncrementBuild Value="True"/>
      <MinorVersionNr Value="14"/>
      <BuildNr Value="3"/>
      <StringTable ProductName="groffstudio"/>
    </VersionInfo>
    <BuildModes>
      <Item Name="Default" Default="True"/>
    </BuildModes>
    <PublishOptions>
      <Version Value="2"/>

Modified src/unit1.pas from [0295db007b] to [a9449c1e7e].

412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441





442
443
444
445
446
447
448
  buildOpts := buildOpts + ' > ' + outputFileName;

  // - Log file:
  if chkLogFile.Checked then logFileName := currentGroffFilePath + '.log';

  // Build:
  buildSuccess := BuildWindow.BuildDocument(buildOpts, logFileName);
  if buildSuccess then
    MainStatusBar.Panels[1].Text := 'build successful'
  else
    MainStatusBar.Panels[1].Text := 'build problem';

  {$IFDEF WINDOWS}
  if buildSuccess and hasGhostscript and rdPdf.Checked then
  begin
    // Invoke ps2pdf:
    buildOpts := 'ps2pdf';
    // outputFileName is still the .ps file. Just use it as the input name.
    buildOpts := buildOpts + ' ' + outputFileName;
    buildSuccess := BuildWindow.BuildDocument(buildOpts, logFileName);
    if buildSuccess then
    begin
      MainStatusBar.Panels[1].Text := 'build successful';
      DeleteFile(outputFileName); // get rid of the .ps file
    end
    else
      MainStatusBar.Panels[1].Text := 'build problem';
  end;
  {$ENDIF}






  FreeAndNil(BuildWindow);
end;

procedure TMainForm.btnLoadGroffClick(Sender: TObject);
var
  Reply, BoxStyle: integer;
begin







<
<
<
<










<
<
|
<
<
<



>
>
>
>
>







412
413
414
415
416
417
418




419
420
421
422
423
424
425
426
427
428


429



430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
  buildOpts := buildOpts + ' > ' + outputFileName;

  // - Log file:
  if chkLogFile.Checked then logFileName := currentGroffFilePath + '.log';

  // Build:
  buildSuccess := BuildWindow.BuildDocument(buildOpts, logFileName);





  {$IFDEF WINDOWS}
  if buildSuccess and hasGhostscript and rdPdf.Checked then
  begin
    // Invoke ps2pdf:
    buildOpts := 'ps2pdf';
    // outputFileName is still the .ps file. Just use it as the input name.
    buildOpts := buildOpts + ' ' + outputFileName;
    buildSuccess := BuildWindow.BuildDocument(buildOpts, logFileName);
    if buildSuccess then


       DeleteFile(outputFileName); // get rid of the .ps file



  end;
  {$ENDIF}

  if buildSuccess then
    MainStatusBar.Panels[1].Text := 'build successful'
  else
    MainStatusBar.Panels[1].Text := 'build problem';

  FreeAndNil(BuildWindow);
end;

procedure TMainForm.btnLoadGroffClick(Sender: TObject);
var
  Reply, BoxStyle: integer;
begin