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
|