James Hawkins : msi:
Inform the user with an error message when the MSI file path is
invalid.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Aug 25 05:26:48 CDT 2006
Module: wine
Branch: master
Commit: fb7646beaa1a76f40ed0e05ab0dd7c36034439b7
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=fb7646beaa1a76f40ed0e05ab0dd7c36034439b7
Author: James Hawkins <truiken at gmail.com>
Date: Thu Aug 24 12:34:51 2006 -0700
msi: Inform the user with an error message when the MSI file path is invalid.
---
dlls/msi/helpers.c | 15 +++++++++++++++
dlls/msi/msi_Bg.rc | 1 +
dlls/msi/msi_De.rc | 1 +
dlls/msi/msi_En.rc | 1 +
dlls/msi/msi_Eo.rc | 1 +
dlls/msi/msi_Es.rc | 1 +
dlls/msi/msi_Fi.rc | 1 +
dlls/msi/msi_Fr.rc | 1 +
dlls/msi/msi_Hu.rc | 1 +
dlls/msi/msi_It.rc | 1 +
dlls/msi/msi_Ko.rc | 1 +
dlls/msi/msi_Nl.rc | 1 +
dlls/msi/msi_No.rc | 1 +
dlls/msi/msi_Pt.rc | 1 +
dlls/msi/msi_Ru.rc | 1 +
dlls/msi/msi_Tr.rc | 1 +
dlls/msi/package.c | 7 +++++++
17 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/dlls/msi/helpers.c b/dlls/msi/helpers.c
index 51184d5..33a7fa2 100644
--- a/dlls/msi/helpers.c
+++ b/dlls/msi/helpers.c
@@ -1008,3 +1008,18 @@ WCHAR* generate_error_string(MSIPACKAGE
data = NULL;
return data;
}
+
+void msi_ui_error( DWORD msg_id, DWORD type )
+{
+ WCHAR text[2048];
+
+ static const WCHAR title[] = {
+ 'W','i','n','d','o','w','s',' ','I','n','s','t','a','l','l','e','r',0
+ };
+
+ if (!MsiLoadStringW( -1, msg_id, text, sizeof(text) / sizeof(text[0]),
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL) ))
+ return;
+
+ MessageBoxW( NULL, text, title, type );
+}
diff --git a/dlls/msi/msi_Bg.rc b/dlls/msi/msi_Bg.rc
index d5818ef..3f2b34a 100644
--- a/dlls/msi/msi_Bg.rc
+++ b/dlls/msi/msi_Bg.rc
@@ -22,6 +22,7 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
+ 4 "The specified installation package could not be opened. Please check the file path and try again."
5 "ïúòÿò %s íå å íàìåðåí"
9 "ïîñòàâåòå äèñê %s"
10 "íåêîðåêòíè ïàðàìåòðè"
diff --git a/dlls/msi/msi_De.rc b/dlls/msi/msi_De.rc
index c07a3eb..ed1d537 100644
--- a/dlls/msi/msi_De.rc
+++ b/dlls/msi/msi_De.rc
@@ -22,6 +22,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
+ 4 "The specified installation package could not be opened. Please check the file path and try again."
5 "Der Pfad %s wurde nicht gefunden."
9 "Bitte Disk %s einlegen."
10 "schlechte Parameter"
diff --git a/dlls/msi/msi_En.rc b/dlls/msi/msi_En.rc
index 066d812..55a6b22 100644
--- a/dlls/msi/msi_En.rc
+++ b/dlls/msi/msi_En.rc
@@ -22,6 +22,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
+ 4 "The specified installation package could not be opened. Please check the file path and try again."
5 "path %s not found"
9 "insert disk %s"
10 "bad parameters"
diff --git a/dlls/msi/msi_Eo.rc b/dlls/msi/msi_Eo.rc
index 5b050c1..e7ed2fa 100644
--- a/dlls/msi/msi_Eo.rc
+++ b/dlls/msi/msi_Eo.rc
@@ -22,6 +22,7 @@ LANGUAGE LANG_ESPERANTO, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
+ 4 "The specified installation package could not be opened. Please check the file path and try again."
5 "Mi ne trovis la vojon %s"
9 "enþovu la diskon %s"
10 "nekorektaj parametroj"
diff --git a/dlls/msi/msi_Es.rc b/dlls/msi/msi_Es.rc
index 43e7652..3f33ea3 100644
--- a/dlls/msi/msi_Es.rc
+++ b/dlls/msi/msi_Es.rc
@@ -22,6 +22,7 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
STRINGTABLE DISCARDABLE
{
+ 4 "The specified installation package could not be opened. Please check the file path and try again."
5 "ruta %s no encontrada"
9 "inserte el disco %s"
10 "parámetros incorrectos"
diff --git a/dlls/msi/msi_Fi.rc b/dlls/msi/msi_Fi.rc
index 18686d9..87ce328 100644
--- a/dlls/msi/msi_Fi.rc
+++ b/dlls/msi/msi_Fi.rc
@@ -22,6 +22,7 @@ LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
+ 4 "The specified installation package could not be opened. Please check the file path and try again."
5 "Polkua %s ei löydy."
9 "Anna levy %s"
10 "Virheelliset parametrit."
diff --git a/dlls/msi/msi_Fr.rc b/dlls/msi/msi_Fr.rc
index fa50f68..8b4b83f 100644
--- a/dlls/msi/msi_Fr.rc
+++ b/dlls/msi/msi_Fr.rc
@@ -22,6 +22,7 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
STRINGTABLE DISCARDABLE
{
+ 4 "The specified installation package could not be opened. Please check the file path and try again."
5 "Le chemin %s est introuvable"
9 "insérez le disque %s"
10 "mauvais paramètres"
diff --git a/dlls/msi/msi_Hu.rc b/dlls/msi/msi_Hu.rc
index 4dacfe2..ccefef7 100644
--- a/dlls/msi/msi_Hu.rc
+++ b/dlls/msi/msi_Hu.rc
@@ -22,6 +22,7 @@ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
+ 4 "The specified installation package could not be opened. Please check the file path and try again."
5 "%s útvonal nem található"
9 "helyezze be a lemezt: %s"
10 "rossz paraméterek"
diff --git a/dlls/msi/msi_It.rc b/dlls/msi/msi_It.rc
index 7a3056c..8f5f2dd 100644
--- a/dlls/msi/msi_It.rc
+++ b/dlls/msi/msi_It.rc
@@ -22,6 +22,7 @@ LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
+ 4 "The specified installation package could not be opened. Please check the file path and try again."
5 "percorso %s non trovato"
9 "inserire disco %s"
10 "parametri incorretti"
diff --git a/dlls/msi/msi_Ko.rc b/dlls/msi/msi_Ko.rc
index 50b6225..8885c08 100644
--- a/dlls/msi/msi_Ko.rc
+++ b/dlls/msi/msi_Ko.rc
@@ -22,6 +22,7 @@ LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
+ 4 "The specified installation package could not be opened. Please check the file path and try again."
5 "%s °æ·Î¸¦ ãÀ»¼ö ¾ø½À´Ï´Ù"
9 "µð½ºÅ© %s »ðÀÔ"
10 "Àý¸øµÈ ¸Å°³º¯¼ö"
diff --git a/dlls/msi/msi_Nl.rc b/dlls/msi/msi_Nl.rc
index f941c29..336af05 100644
--- a/dlls/msi/msi_Nl.rc
+++ b/dlls/msi/msi_Nl.rc
@@ -22,6 +22,7 @@ LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
+ 4 "The specified installation package could not be opened. Please check the file path and try again."
5 "Pad %s niet gevonden"
9 "Plaats disk %s"
10 "Ongeldige parameters"
diff --git a/dlls/msi/msi_No.rc b/dlls/msi/msi_No.rc
index 5aaa271..3d40ba0 100644
--- a/dlls/msi/msi_No.rc
+++ b/dlls/msi/msi_No.rc
@@ -22,6 +22,7 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGI
STRINGTABLE DISCARDABLE
{
+ 4 "The specified installation package could not be opened. Please check the file path and try again."
5 "Fant ikke stien '%s'."
9 "Sett i disk '%s'"
10 "Gale parametere."
diff --git a/dlls/msi/msi_Pt.rc b/dlls/msi/msi_Pt.rc
index 7b814ff..f9af3f4 100644
--- a/dlls/msi/msi_Pt.rc
+++ b/dlls/msi/msi_Pt.rc
@@ -22,6 +22,7 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_DEFAUL
STRINGTABLE DISCARDABLE
{
+ 4 "The specified installation package could not be opened. Please check the file path and try again."
5 "caminho %s não encontrado"
9 "insira disco %s"
10 "parâmetros inválidos"
diff --git a/dlls/msi/msi_Ru.rc b/dlls/msi/msi_Ru.rc
index 23e55ab..888faa3 100644
--- a/dlls/msi/msi_Ru.rc
+++ b/dlls/msi/msi_Ru.rc
@@ -22,6 +22,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
+ 4 "The specified installation package could not be opened. Please check the file path and try again."
5 "ïóòü %s íå íàéäåí"
9 "âñòàâüòå äèñê %s"
10 "íåâåðíûå ïàðàìåòðû"
diff --git a/dlls/msi/msi_Tr.rc b/dlls/msi/msi_Tr.rc
index dda287c..becd913 100644
--- a/dlls/msi/msi_Tr.rc
+++ b/dlls/msi/msi_Tr.rc
@@ -22,6 +22,7 @@ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
+ 4 "The specified installation package could not be opened. Please check the file path and try again."
5 "%s yolu bulunamadý"
9 "%s nolu diski yerleþtirin"
10 "bozuk parametreler"
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index d172c50..d2b6f2f 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -47,6 +47,8 @@ #include "action.h"
WINE_DEFAULT_DEBUG_CHANNEL(msi);
+extern void msi_ui_error( DWORD msg_id, DWORD type );
+
static void MSI_FreePackage( MSIOBJECTHDR *arg)
{
MSIPACKAGE *package= (MSIPACKAGE*) arg;
@@ -549,7 +551,12 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage,
DeleteFileW( file );
if( r != ERROR_SUCCESS )
+ {
+ if (GetLastError() == ERROR_FILE_NOT_FOUND)
+ msi_ui_error( 4, MB_OK | MB_ICONWARNING );
+
return r;
+ }
}
package = MSI_CreatePackage( db );
More information about the wine-cvs
mailing list