137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
-
+
-
+
|
ResStream: TResourceStream;
{$IFDEF DARWIN}
HTTPClient: TFPHttpClient;
{$ENDIF}
begin
// What's the current running groff version?
{$IFDEF WINDOWS}
if RunCommand('cmd', ['/c', 'troff --version'], GroffOutputVersion) then
if RunCommand('cmd', ['/c', 'troff --version'], GroffOutputVersion, [], swoHIDE) then
{$ELSE}
if RunCommand('/bin/sh', ['-c', 'troff --version'], GroffOutputVersion) then
if RunCommand('/bin/sh', ['-c', 'troff --version'], GroffOutputVersion, [], swoHIDE) then
{$ENDIF}
begin
edtGroffInstalledVersion.Text := GroffOutputVersion;
if pos('GNU', GroffOutputVersion) = 0 then
ShowMessage('groffstudio thinks that your installed version of troff is not GNU troff.' + LineEnding +
'If this is correct, you are advised to fix this before continuing.' + LineEnding +
'If it is an error, please tell me so I can improve this detection.');
|
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
|
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
|
-
+
|
BuildWindow := TBuildStatusWindow.Create(Application);
BuildWindow.Show;
// Build the parameters:
buildOpts := 'groff';
// - Macro:
if cmbMacro.SelText <> '' then buildOpts := buildOpts + ' -' + cmbMacro.SelText;
if LeftStr(cmbMacro.Text, 1) = 'm' then buildOpts := buildOpts + ' -' + cmbMacro.Text;
// - Enforce UTF-8:
buildOpts := buildOpts + ' -Kutf8';
// - Preprocessors:
if chkBoxPreprocessors.Checked[0] then buildOpts := buildOpts + ' -chem';
if chkBoxPreprocessors.Checked[1] then buildOpts := buildOpts + ' -eqn';
|