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

This commit is contained in:
Damjan Jovanovic 2009-06-10 21:11:48 +02:00 committed by Alexandre Julliard
parent d84693cc29
commit 3b52d42ab4
14 changed files with 32 additions and 2 deletions

View File

@ -37,6 +37,7 @@ Volby:\n\
/MAX[imalizovaně] Spustí program maximalizovaně.\n\
/R Spustí program normálně (ani minimalizovaný ani maximalizovaný).\n\
/W Čeká na dokončení spuštěného programu, vrací návratový kód.\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\

View File

@ -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\

View File

@ -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\

View File

@ -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 después sale con su código 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 versión 0.2 Copyright (C) 2003, Dan Kegel\n\

View File

@ -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\

View File

@ -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\

View File

@ -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\

View File

@ -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 beëindigd, 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\

View File

@ -35,6 +35,7 @@ Opcje:\n\
/R[estored] Uruchamia program normalnie (bez minimalizacji ani maksymalizacji).\n\
/W[ait] Zaczekaj aż program zakończy działanie (i zakończ\n\
\t kodem wyjścia programu).\n\
/ProgIDOpen Open a document using the following progID.\n\
/L Pokaż licencję użytkownika.\n\
\n\
start.exe wersja 0.2 Copyright (C) 2003, Dan Kegel\n\

View File

@ -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 então retorno um código (exit code).\n\
/ProgIDOpen Open a document using the following progID.\n\
/L Mostra a licença ao usuário.\n\
\n\
start.exe version 0.2 Copyright (C) 2003, Dan Kegel\n\

View File

@ -34,6 +34,7 @@ start [options]
/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\

View File

@ -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\

View File

@ -33,6 +33,7 @@ Se
/MAX[imized] Ekranı kaplayacak şekilde başlat.\n\
/R[estored] Programı normal bir şekilde başlat (simge halinde veya büyütülmüş halde olabilir).\n\
/W[ait] Başlatılmış programın bitmesini bekle, sonra çıkış koduyla çık.\n\
/ProgIDOpen Open a document using the following progID.\n\
/L Son-kullanıcı lisansını göster.\n\
\n\
start.exe sürüm 0.2 Telif Hakkı (C) 2003, Dan Kegel\n\

View File

@ -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;