Commit 3b52d42a authored by Damjan Jovanovic's avatar Damjan Jovanovic Committed by Alexandre Julliard

start.exe: Add infrastructure to launch windows file open associations from freedesktop.

parent d84693cc
......@@ -37,6 +37,7 @@ Volby:\n\
/MAX[imalizovan] Spust program maximalizovan.\n\
/R Spust program normln (ani minimalizovan ani maximalizovan).\n\
/W ek na dokonen sputnho programu, vrac nvratov kd.\n\
/ProgIDOpen Open a document using the following progID.\n\
/L Zobraz licenci.\n\
\n\
start.exe verze 0.2 Copyright (C) 2003, Dan Kegel\n\
......
......@@ -34,6 +34,7 @@ Optionen:\n\
/MAX[imized] Starte das Programm maximiert.\n\
/R[estored] Starte das Programm normal (weder minimiert noch maximiert).\n\
/W[ait] Wartet bis das gestartete Programm sich beendet,\n\t dann beendet sich start mit dessen Exitcode des Programmes.\n\
/ProgIDOpen Open a document using the following progID.\n\
/L Zeige die Endbenutzerlizenz an.\n\
\n\
start.exe Version 0.2 Copyright (C) 2003, Dan Kegel\n\
......
......@@ -34,6 +34,7 @@ Options:\n\
/R[estored] Start the program normally (neither minimized nor maximized).\n\
/W[ait] Wait for started program to finish, then exit with its exit code.\n\
/Unix Use a Unix filename and start the file like windows explorer.\n\
/ProgIDOpen Open a document using the following progID.\n\
/L Show end-user license.\n\
\n\
start.exe version 0.2 Copyright (C) 2003, Dan Kegel\n\
......
......@@ -34,6 +34,7 @@ Opciones:\n\
/R[estored] Inicia el programa normalmente (ni minimizado ni maximizado).\n\
/W[ait] Espera que termine el programa iniciado y despus sale con su cdigo de salida.\n\
/Unix Usa un nombre de archivo de Unix e inicia el archivo como en el explorador de windows.\n\
/ProgIDOpen Open a document using the following progID.\n\
/L Muestra la licencia para el usuario final.\n\
\n\
start.exe versin 0.2 Copyright (C) 2003, Dan Kegel\n\
......
......@@ -37,6 +37,7 @@ Options :\n\
/MAX[imized] Lance le programme maximisé.\n\
/R[estored] Lance le programme normalement (ni minimisé ni maximisé).\n\
/W[ait] Attend que le programme lancé se termine, et termine ensuite avec son code de sortie.\n\
/ProgIDOpen Open a document using the following progID.\n\
/L Montre la licence d'utilisation.\n\
\n\
start.exe version 0.2 Copyright (C) 2003, Dan Kegel\n\
......
......@@ -35,6 +35,7 @@ Options:\n\
/MAX[imized] Avvia il programma massimizato.\n\
/R[estored] Avvia il programma normalmente (n minimizzato n massimizato).\n\
/W[ait] Attendi l'uscita del programma, poi esci con il suo codice di uscita.\n\
/ProgIDOpen Open a document using the following progID.\n\
/L Mostra l'accordo di licenza con l'utente finale.\n\
\n\
start.exe versione 0.2 Copyright (C) 2003, Dan Kegel\n\
......
......@@ -35,6 +35,7 @@ Options:\n\
/R[estored] 풀그림을 보통상태로 시작시키기 (최소화도 아니고 최대화도 아님).\n\
/W[ait] 시작된 풀그림이 끝날 때까지 기다림, 끝날 때 종료코드를 남김.\n\
/Unix 윈도우 익스플로어같이 유닉스 파일이름을 사용해서 시작.\n\
/ProgIDOpen Open a document using the following progID.\n\
/L 사용자 라이센스 보여줌\n\
\n\
start.exe version 0.2 Copyright (C) 2003, Dan Kegel\n\
......
......@@ -34,6 +34,7 @@ Options:\n\
/R[estored] Start het programma normaal (noch geminimaliseerd noch gemaximaliseerd).\n\
/W[ait] Wacht totdat het gestarte programma is beindigd, eindig dan met de exit code van dat programma.\n\
/Unix Gebruik een Unix bestandsnaam en start het bestand als de windows verkenner.\n\
/ProgIDOpen Open a document using the following progID.\n\
/L Laat de gebruikerslicentie zien.\n\
\n\
start.exe version 0.2 Copyright (C) 2003, Dan Kegel\n\
......
......@@ -35,6 +35,7 @@ Opcje:\n\
/R[estored] Uruchamia program normalnie (bez minimalizacji ani maksymalizacji).\n\
/W[ait] Zaczekaj a program zakoczy dziaanie (i zakocz\n\
\t kodem wyjcia programu).\n\
/ProgIDOpen Open a document using the following progID.\n\
/L Poka licencj uytkownika.\n\
\n\
start.exe wersja 0.2 Copyright (C) 2003, Dan Kegel\n\
......
......@@ -34,6 +34,7 @@ Options:\n\
/MAX[imized] Inicia o programa maximizado.\n\
/R[estored] Inicia o programa normalmente (sem minimizar nem maximizar).\n\
/W[ait] Aguarda que o programa iniciado termine e ento retorno um cdigo (exit code).\n\
/ProgIDOpen Open a document using the following progID.\n\
/L Mostra a licena ao usurio.\n\
\n\
start.exe version 0.2 Copyright (C) 2003, Dan Kegel\n\
......
......@@ -34,6 +34,7 @@ start [options] __\n\
/R[estored] ( ).\n\
/W[ait] .\n\
/Unix Unix .\n\
/ProgIDOpen Open a document using the following progID.\n\
/L .\n\
\n\
start.exe 0.2 Copyright (C) 2003, Dan Kegel\n\
......
......@@ -35,6 +35,7 @@ Možnosti:\n\
/MAX[imized] Zažene program z razširjenim oknom.\n\
/R[estored] Zažene program z običajno velikostjo okna.\n\
/W[ait] Počaka, da se zagnani program zaključi, nato se zaključi in vrne izhodno kodo programa.\n\
/ProgIDOpen Open a document using the following progID.\n\
/L Prikaže licenčno pogodbo.\n\
\n\
start.exe različica 0.2 Copyright (C) 2003, Dan Kegel\n\
......
......@@ -33,6 +33,7 @@ Seenekler:\n\
/MAX[imized] Ekran kaplayacak ekilde balat.\n\
/R[estored] Program normal bir ekilde balat (simge halinde veya bytlm halde olabilir).\n\
/W[ait] Balatlm programn bitmesini bekle, sonra k koduyla k.\n\
/ProgIDOpen Open a document using the following progID.\n\
/L Son-kullanc lisansn gster.\n\
\n\
start.exe srm 0.2 Telif Hakk (C) 2003, Dan Kegel\n\
......
......@@ -176,12 +176,15 @@ int wmain (int argc, WCHAR *argv[])
WCHAR *args = NULL;
int i;
int unix_mode = 0;
int progid_open = 0;
WCHAR *dos_filename = NULL;
WCHAR *parent_directory = NULL;
DWORD binary_type;
static const WCHAR openW[] = { 'o', 'p', 'e', 'n', 0 };
static const WCHAR unixW[] = { 'u', 'n', 'i', 'x', 0 };
static const WCHAR progIDOpenW[] =
{ 'p', 'r', 'o', 'g', 'I', 'D', 'O', 'p', 'e', 'n', 0};
memset(&sei, 0, sizeof(sei));
sei.cbSize = sizeof(sei);
......@@ -203,7 +206,7 @@ int wmain (int argc, WCHAR *argv[])
break;
/* Unix paths can start with / so we have to assume anything following /U is not a flag */
if (unix_mode)
if (unix_mode || progid_open)
break;
/* Handle all options in this word */
......@@ -235,6 +238,15 @@ int wmain (int argc, WCHAR *argv[])
usage();
}
break;
case 'p':
case 'P':
if (strncmpiW(&argv[i][ci], progIDOpenW, 17) == 0)
progid_open = 1;
else {
WINE_ERR("Option '%s' not recognized\n", wine_dbgstr_w( argv[i]+ci-1));
usage();
}
break;
case 'w':
case 'W':
sei.fMask |= SEE_MASK_NOCLOSEPROCESS;
......@@ -252,12 +264,17 @@ int wmain (int argc, WCHAR *argv[])
if (i == argc)
usage();
if (progid_open) {
sei.lpClass = argv[i++];
sei.fMask |= SEE_MASK_CLASSNAME;
}
sei.lpFile = argv[i++];
args = build_args( argc - i, &argv[i] );
sei.lpParameters = args;
if (unix_mode) {
if (unix_mode || progid_open) {
LPWSTR (*CDECL wine_get_dos_file_name_ptr)(LPCSTR);
char* multibyte_unixpath;
int multibyte_unixpath_len;
......
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