added short cmd line params

git-svn-id: trunk@4823 -
This commit is contained in:
mattias 2003-11-22 15:29:20 +00:00
parent 2d193b48c1
commit aeaf1ae674
11 changed files with 89 additions and 52 deletions

View File

@ -57,7 +57,7 @@ resourcestring
lisIDEOptions = 'IDE Options:';
lisCmdLineLCLInterfaceSpecificOptions =
'LCL Interface specific options:';
lisDoNotShowSplashScreen = 'Do not show splash screen';
lisDoNotShowSplashScreen = ' Do not show splash screen';
lissecondaryConfigDirectoryWhereLazarusSearchesFor =
' secondary config '
+'directory, where Lazarus searches for config template files. Default is ';

View File

@ -712,10 +712,35 @@ uses
-------------------------------------------------------------------------------}
procedure TMainIDE.ParseCmdLineOptions;
const
PrimaryConfPathOpt='--primary-config-path=';
SecondaryConfPathOpt='--secondary-config-path=';
NoSplashScreenOpt='--no-splash-screen';
var i: integer;
PrimaryConfPathOptLong='--primary-config-path=';
PrimaryConfPathOptShort='--pcp=';
SecondaryConfPathOptLong='--secondary-config-path=';
SecondaryConfPathOptShort='--scp=';
NoSplashScreenOptLong='--no-splash-screen';
NoSplashScreenOptShort='--nsc';
function ParamIsOption(ParamIndex: integer;
const Option: string): boolean;
begin
Result:=AnsiCompareText(ParamStr(ParamIndex),Option)=0;
end;
function ParamIsOptionPlusValue(ParamIndex: integer;
const Option: string; var AValue: string): boolean;
var
p: String;
begin
p:=ParamStr(ParamIndex);
Result:=AnsiCompareText(LeftStr(p,length(Option)),Option)=0;
if Result then
AValue:=copy(p,length(Option)+1,length(p))
else
AValue:='';
end;
var
i: integer;
AValue: string;
begin
if (ParamCount>0)
and ((AnsiCompareText(ParamStr(1),'--help')=0)
@ -730,13 +755,20 @@ begin
writeln('');
writeln('--help or -? ', listhisHelpMessage);
writeln('');
writeln(PrimaryConfPathOpt,' <path>');
writeln(PrimaryConfPathOptLong,' <path>');
writeln('or ',PrimaryConfPathOptShort,' <path>');
writeln(BreakString(lisprimaryConfigDirectoryWhereLazarusStoresItsConfig,
75, 22), GetPrimaryConfigPath);
writeln(SecondaryConfPathOpt,' <path>');
writeln('');
writeln(SecondaryConfPathOptLong,' <path>');
writeln('or ',SecondaryConfPathOptShort,' <path>');
writeln(BreakString(lissecondaryConfigDirectoryWhereLazarusSearchesFor,
75, 22), GetSecondaryConfigPath);
writeln(NoSplashScreenOpt,' ',lisDoNotShowSplashScreen);
writeln('');
writeln(NoSplashScreenOptLong);
writeln('or ',NoSplashScreenOptShort);
writeln(BreakString(lisDoNotShowSplashScreen,75, 22));
writeln('');
writeln('');
writeln('');
writeln(lisCmdLineLCLInterfaceSpecificOptions);
@ -746,20 +778,22 @@ begin
Halt;
end;
for i:=1 to ParamCount do begin
if AnsiCompareText(LeftStr(ParamStr(i),length(PrimaryConfPathOpt)),
PrimaryConfPathOpt)=0 then
begin
SetPrimaryConfigPath(copy(ParamStr(i),length(PrimaryConfPathOpt)+1,
length(ParamStr(i))));
if ParamIsOptionPlusValue(i,PrimaryConfPathOptLong,AValue) then begin
SetPrimaryConfigPath(AValue);
end;
if AnsiCompareText(LeftStr(ParamStr(i),length(SecondaryConfPathOpt)),
SecondaryConfPathOpt)=0 then
begin
SetSecondaryConfigPath(copy(ParamStr(i),length(SecondaryConfPathOpt)+1,
length(ParamStr(i))));
if ParamIsOptionPlusValue(i,PrimaryConfPathOptShort,AValue) then begin
SetPrimaryConfigPath(AValue);
end;
if AnsiCompareText(ParamStr(i),NoSplashScreenOpt)=0 then
if ParamIsOptionPlusValue(i,SecondaryConfPathOptLong,AValue) then begin
SetSecondaryConfigPath(AValue);
end;
if ParamIsOptionPlusValue(i,SecondaryConfPathOptShort,AValue) then begin
SetSecondaryConfigPath(AValue);
end;
if ParamIsOption(i,NoSplashScreenOptLong)
or ParamIsOption(i,NoSplashScreenOptShort) then begin
ShowSplashScreen:=false;
end;
end;
end;
@ -10106,6 +10140,9 @@ end.
{ =============================================================================
$Log$
Revision 1.672 2003/11/22 15:29:20 mattias
added short cmd line params
Revision 1.671 2003/11/22 15:14:12 mattias
prepared IDE units for split

View File

@ -1,3 +1,7 @@
#: lazarusidestrconsts:lisdonotshowsplashscreen
msgid " Do not show splash screen"
msgstr ""
#: lazarusidestrconsts:lisprimaryconfigdirectorywherelazarusstoresitsconfig
msgid " primary config directory, where Lazarus stores its config files. Default is "
msgstr ""
@ -1578,10 +1582,6 @@ msgstr "Pantalla(no per win32, p.e. 198.112.45.11:0, x.org:1, hydra:0.1)"
msgid "Display Line Numbers in Run-time Error Backtraces"
msgstr "Mostrar números de línia en errors en temps d'execució en seguiments inversos"
#: lazarusidestrconsts:lisdonotshowsplashscreen
msgid "Do not show splash screen"
msgstr ""
#: lazarusidestrconsts:dlgnotsplitlineafter
msgid "Do not split line after:"
msgstr "No separar la línia després de:"

View File

@ -8,6 +8,10 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 0.9.6\n"
#: lazarusidestrconsts:lisdonotshowsplashscreen
msgid " Do not show splash screen"
msgstr ""
#: lazarusidestrconsts:lisprimaryconfigdirectorywherelazarusstoresitsconfig
msgid " primary config directory, where Lazarus stores its config files. Default is "
msgstr ""
@ -1588,10 +1592,6 @@ msgstr ""
msgid "Display Line Numbers in Run-time Error Backtraces"
msgstr ""
#: lazarusidestrconsts:lisdonotshowsplashscreen
msgid "Do not show splash screen"
msgstr ""
#: lazarusidestrconsts:dlgnotsplitlineafter
msgid "Do not split line after:"
msgstr ""

View File

@ -1,3 +1,7 @@
#: lazarusidestrconsts:lisdonotshowsplashscreen
msgid " Do not show splash screen"
msgstr ""
#: lazarusidestrconsts:lisprimaryconfigdirectorywherelazarusstoresitsconfig
msgid " primary config directory, where Lazarus stores its config files. Default is "
msgstr ""
@ -1578,10 +1582,6 @@ msgstr "Pantalla (no para win32, e.g. 198.112.45.11:0, x.org:1, hydra:0.1)"
msgid "Display Line Numbers in Run-time Error Backtraces"
msgstr "Visualizar números de líneas en los errores de tiempo de ejecucion en trazados inversos"
#: lazarusidestrconsts:lisdonotshowsplashscreen
msgid "Do not show splash screen"
msgstr ""
#: lazarusidestrconsts:dlgnotsplitlineafter
msgid "Do not split line after:"
msgstr "No separar línea después de:"

View File

@ -7,6 +7,10 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 0.9.6\n"
#: lazarusidestrconsts:lisdonotshowsplashscreen
msgid " Do not show splash screen"
msgstr ""
#: lazarusidestrconsts:lisprimaryconfigdirectorywherelazarusstoresitsconfig
msgid " primary config directory, where Lazarus stores its config files. Default is "
msgstr ""
@ -1587,10 +1591,6 @@ msgstr "Affichage (pas pour Win32; par exemple : 198.112.45.11:0, x.org:1, hydra
msgid "Display Line Numbers in Run-time Error Backtraces"
msgstr "Affiche les numéros de lignes dans les Backtraces d'erreur d'exécution"
#: lazarusidestrconsts:lisdonotshowsplashscreen
msgid "Do not show splash screen"
msgstr "Ne pas voir l'écran d'acceuil"
#: lazarusidestrconsts:dlgnotsplitlineafter
msgid "Do not split line after:"
msgstr "Pas de ligne de séparation après"

View File

@ -7,6 +7,10 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: lazarusidestrconsts:lisdonotshowsplashscreen
msgid " Do not show splash screen"
msgstr ""
#: lazarusidestrconsts:lisprimaryconfigdirectorywherelazarusstoresitsconfig
msgid " primary config directory, where Lazarus stores its config files. Default is "
msgstr " directory di configurazione primaria, dove Lazarus memorizza i file di configurazione. Il valore predefinito è"
@ -1587,10 +1591,6 @@ msgstr "Display (non per win32, per esempio 198.112.45.11:0, x.org:1, hydra:0.1)
msgid "Display Line Numbers in Run-time Error Backtraces"
msgstr "Mostra i numeri di linea nelle backtrace degli errori di esecuzione"
#: lazarusidestrconsts:lisdonotshowsplashscreen
msgid "Do not show splash screen"
msgstr "Non mostrare schermata di avvio"
#: lazarusidestrconsts:dlgnotsplitlineafter
msgid "Do not split line after:"
msgstr "Non spezzare le righe dietro a:"

View File

@ -8,6 +8,10 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.3\n"
#: lazarusidestrconsts:lisdonotshowsplashscreen
msgid " Do not show splash screen"
msgstr ""
#: lazarusidestrconsts:lisprimaryconfigdirectorywherelazarusstoresitsconfig
msgid " primary config directory, where Lazarus stores its config files. Default is "
msgstr " g³ówny katalog konfiguracji, gdzie Lazarus przechowuje pliki konfiguracyjne. Domy¶lnie jest to "
@ -1588,10 +1592,6 @@ msgstr "Ekran (nie dotyczy win32), np. 198.112.45.11:0, x.org:1, hydra:0.1"
msgid "Display Line Numbers in Run-time Error Backtraces"
msgstr "Wy¶wietlaj numery linii w zrzucie b³êdu uruchomieniowego:"
#: lazarusidestrconsts:lisdonotshowsplashscreen
msgid "Do not show splash screen"
msgstr "Nie pokazuj ekranu startowego"
#: lazarusidestrconsts:dlgnotsplitlineafter
msgid "Do not split line after:"
msgstr "Nie dziel wiersza po:"

View File

@ -31,7 +31,7 @@ msgid "LCL Interface specific options:"
msgstr ""
#: lazarusidestrconsts:lisdonotshowsplashscreen
msgid "Do not show splash screen"
msgid " Do not show splash screen"
msgstr ""
#: lazarusidestrconsts:lissecondaryconfigdirectorywherelazarussearchesfor

View File

@ -1,3 +1,7 @@
#: lazarusidestrconsts:lisdonotshowsplashscreen
msgid " Do not show splash screen"
msgstr ""
#: lazarusidestrconsts:lisprimaryconfigdirectorywherelazarusstoresitsconfig
msgid " primary config directory, where Lazarus stores its config files. Default is "
msgstr " ÇÌÁ×ÎÙÊ ËÁÔÁÌÏÇ ÎÁÓÔÒÏÅË, ÇÄÅ Lazarus ÈÒÁÎÉÔ Ó×ÏÉ ÆÁÊÌÙ ÎÁÓÔÒÏÅË. ðÏ ÕÍÏÌÞÁÎÉÀ "
@ -1578,10 +1582,6 @@ msgstr "
msgid "Display Line Numbers in Run-time Error Backtraces"
msgstr "÷ÙÄÁÔØ ÎÏÍÅÒÁ ÓÔÒÏË × ÏÛÉÂËÁÈ ×ÒÅÍÅÎÉ ÉÓÐÏÌÎÅÎÉÑ"
#: lazarusidestrconsts:lisdonotshowsplashscreen
msgid "Do not show splash screen"
msgstr "Не показывать заставку"
#: lazarusidestrconsts:dlgnotsplitlineafter
msgid "Do not split line after:"
msgstr "îÅ ÒÁÚÒÙ×ÁÔØ ÓÔÒÏËÕ ÐÏÓÌÅ:"

View File

@ -1,3 +1,7 @@
#: lazarusidestrconsts:lisdonotshowsplashscreen
msgid " Do not show splash screen"
msgstr ""
#: lazarusidestrconsts:lisprimaryconfigdirectorywherelazarusstoresitsconfig
msgid " primary config directory, where Lazarus stores its config files. Default is "
msgstr " ãëàâíûé êàòàëîã íàñòðîåê, ãäå Lazarus õðàíèò ñâîè ôàéëû íàñòðîåê. Ïî óìîë÷àíèþ "
@ -1578,10 +1582,6 @@ msgstr "
msgid "Display Line Numbers in Run-time Error Backtraces"
msgstr "Âûäàòü íîìåðà ñòðîê â îøèáêàõ âðåìåíè èñïîëíåíèÿ"
#: lazarusidestrconsts:lisdonotshowsplashscreen
msgid "Do not show splash screen"
msgstr "Не показывать заставку"
#: lazarusidestrconsts:dlgnotsplitlineafter
msgid "Do not split line after:"
msgstr "Íå ðàçðûâàòü ñòðîêó ïîñëå:"