Commit 6ffe7dfe authored by Martin Schreiber's avatar Martin Schreiber

+ MSEide --globstatfile command line parameter.

parent 18096029
......@@ -115,6 +115,8 @@ MSEide command line parameters
Macro definition, will be overridden by 'Project'-'Options'-'Macros'. Example:
--macrodef=MAC1,abc,MAC2,def
defines ${MAC1} with value 'abc' and ${MAC2} with value 'def'.
--globstatfile=<filepath>
Use <filepath> instead the default global MSEide status file.
MSEide environment variables
****************************
......
......@@ -108,11 +108,22 @@ object guitemplatesmo: tguitemplatesmo
top = 16
end
object sysenv: tsysenvmanager
helpheader = 'MSEide Copyright 1999-2013 by Martin Schreiber'#10'Usage: mseide [OPTION]... [PROJECTFILE]'#10#10'Options:'
helpheader = 'MSEide Copyright 1999-2015 by Martin Schreiber'#10'Usage: mseide [OPTION]... [PROJECTFILE]'#10#10'Options:'
helpfooter = #10'Environment variables'#10'FPCDIR, FPCLIBDIR, MSEDIR, MSELIBDIR'#10'SYNTAXDEFDIR, TEMPLATEDIR, COMPSTOREDIR'#10'COMPILER, DEBUGGER, EXEEXT,TARGET,TARGETOSDIR'#10'can be used to override the settings macros.'#10#10'Have a lot of fun!'#10#10'Martin'
left = 24
top = 96
defs = (
(
ak_pararg
'-globstatfile'
( )
[]
''
'<filepath>'
'Set path to global status file.'
''
''
)
(
ak_pararg
'-macrodef'
......
......@@ -6,7 +6,7 @@ uses
msesysenv,msemacros;
type
envvarty = (env_macrodef,env_vargroup,env_np,env_ns,env_help,
envvarty = (env_globstatfile,env_macrodef,env_vargroup,env_np,env_ns,env_help,
env_fpcdir,env_fpclibdir,env_msedir,env_mselibdir,env_syntaxdefdir,
env_templatedir,env_compstoredir,env_compiler,env_debugger,
env_exeext,env_target,env_targetosdir,
......@@ -104,6 +104,8 @@ end;
*)
procedure tguitemplatesmo.loadedexe(const sender: TObject);
var
mstr1: msestring;
begin
// sysenv.init(sysenvvalues);
skin.active:= not sysenv.defined[ord(env_ns)];
......
This diff is collapsed.
......@@ -17,7 +17,7 @@
unit main;
{$ifdef linux}{$define unix}{$endif}
{$ifdef FPC}
{$mode objfpc}{$h+}
{$mode objfpc}{$h+}{$goto on}
{$endif}
{$ifndef mse_no_ifi}
{$define mse_with_ifi}
......@@ -396,7 +396,6 @@ begin
end;
end;
{ tmainfo }
constructor tmainfo.create(aowner: tcomponent);
......@@ -1775,8 +1774,17 @@ end;
procedure tmainfo.mainonloaded(const sender: tobject);
var
wstr1: msestring;
label
endlab;
begin
try
if guitemplatesmo.sysenv.defined[ord(env_globstatfile)] then begin
wstr1:= guitemplatesmo.sysenv.value[ord(env_globstatfile)];
if wstr1 <> '' then begin
mainstatfile.filename:= wstr1;
goto endlab;
end;
end;
wstr1:= filepath(statdirname);
if not finddir(wstr1) then begin
createdir(wstr1);
......@@ -1793,6 +1801,7 @@ begin
{$ifdef bsd}
mainstatfile.filename:= statname+'bsd.sta';
{$endif}
endlab:
mainstatfile.readstat;
expandprojectmacros;
onscale(nil);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment