Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2e9b5f7c
Commit
2e9b5f7c
authored
Jul 04, 2004
by
Aric Stewart
Committed by
Alexandre Julliard
Jul 04, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the newly implemented UPDATE code to set properties.
parent
11553baa
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
14 deletions
+90
-14
action.c
dlls/msi/action.c
+2
-0
msi.c
dlls/msi/msi.c
+17
-2
msipriv.h
dlls/msi/msipriv.h
+3
-0
package.c
dlls/msi/package.c
+68
-12
No files found.
dlls/msi/action.c
View file @
2e9b5f7c
...
...
@@ -1245,6 +1245,8 @@ static UINT ACTION_CostFinalize(MSIHANDLE hPackage)
MsiViewClose
(
view
);
MsiCloseHandle
(
view
);
MsiSetPropertyA
(
hPackage
,
"CostingComplete"
,
"1"
);
return
ERROR_SUCCESS
;
}
...
...
dlls/msi/msi.c
View file @
2e9b5f7c
...
...
@@ -65,6 +65,9 @@ static const WCHAR szComponents[] = {
/* the UI level */
INSTALLUILEVEL
gUILevel
;
HWND
gUIhwnd
;
INSTALLUI_HANDLERA
gUIHandler
;
DWORD
gUIFilter
;
LPVOID
gUIContext
;
/*
* .MSI file format
...
...
@@ -701,8 +704,14 @@ INSTALLUILEVEL WINAPI MsiSetInternalUI(INSTALLUILEVEL dwUILevel, HWND *phWnd)
INSTALLUI_HANDLERA
WINAPI
MsiSetExternalUIA
(
INSTALLUI_HANDLERA
puiHandler
,
DWORD
dwMessageFilter
,
LPVOID
pvContext
)
{
FIXME
(
"STUB
\n
"
);
return
NULL
;
INSTALLUI_HANDLERA
prev
=
gUIHandler
;
TRACE
(
"(%p %lx %p)
\n
"
,
puiHandler
,
dwMessageFilter
,
pvContext
);
gUIHandler
=
puiHandler
;
gUIFilter
=
dwMessageFilter
;
gUIContext
=
pvContext
;
return
prev
;
}
UINT
WINAPI
MsiLoadStringA
(
HINSTANCE
hInstance
,
UINT
uID
,
LPSTR
lpBuffer
,
int
nBufferMax
,
DWORD
e
)
...
...
@@ -1084,8 +1093,14 @@ UINT WINAPI MsiVerifyPackageW( LPCWSTR szPackage )
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
if
(
fdwReason
==
DLL_PROCESS_ATTACH
)
{
DisableThreadLibraryCalls
(
hinstDLL
);
/*
* UI Initialization
*/
gUILevel
=
INSTALLUILEVEL_BASIC
;
gUIhwnd
=
0
;
gUIHandler
=
NULL
;
gUIFilter
=
0
;
gUIContext
=
NULL
;
/* FIXME: Initialisation */
}
else
if
(
fdwReason
==
DLL_PROCESS_DETACH
)
{
/* FIXME: Cleanup */
...
...
dlls/msi/msipriv.h
View file @
2e9b5f7c
...
...
@@ -225,5 +225,8 @@ extern void enum_stream_names( IStorage *stg );
/* UI globals */
extern
INSTALLUILEVEL
gUILevel
;
extern
HWND
gUIhwnd
;
extern
INSTALLUI_HANDLERA
gUIHandler
;
extern
DWORD
gUIFilter
;
extern
LPVOID
gUIContext
;
#endif
/* __WINE_MSI_PRIVATE__ */
dlls/msi/package.c
View file @
2e9b5f7c
...
...
@@ -338,7 +338,43 @@ MSIHANDLE WINAPI MsiGetActiveDatabase(MSIHANDLE hInstall)
INT
WINAPI
MsiProcessMessage
(
MSIHANDLE
hInstall
,
INSTALLMESSAGE
eMessageType
,
MSIHANDLE
hRecord
)
{
FIXME
(
"STUB:
\n
"
);
DWORD
log_type
=
0
;
LPSTR
message
;
DWORD
sz
;
INT
msg_field
=
1
;
FIXME
(
"STUB: %x
\n
"
,
eMessageType
);
if
((
eMessageType
&
0xff000000
)
==
INSTALLMESSAGE_ERROR
)
log_type
|=
INSTALLLOGMODE_ERROR
;
if
((
eMessageType
&
0xff000000
)
==
INSTALLMESSAGE_WARNING
)
log_type
|=
INSTALLLOGMODE_WARNING
;
if
((
eMessageType
&
0xff000000
)
==
INSTALLMESSAGE_USER
)
log_type
|=
INSTALLLOGMODE_USER
;
if
((
eMessageType
&
0xff000000
)
==
INSTALLMESSAGE_INFO
)
log_type
|=
INSTALLLOGMODE_INFO
;
if
((
eMessageType
&
0xff000000
)
==
INSTALLMESSAGE_COMMONDATA
)
log_type
|=
INSTALLLOGMODE_COMMONDATA
;
if
((
eMessageType
&
0xff000000
)
==
INSTALLMESSAGE_ACTIONSTART
)
{
log_type
|=
INSTALLLOGMODE_ACTIONSTART
;
msg_field
=
2
;
}
if
((
eMessageType
&
0xff000000
)
==
INSTALLMESSAGE_ACTIONDATA
)
log_type
|=
INSTALLLOGMODE_ACTIONDATA
;
sz
=
0
;
MsiRecordGetStringA
(
hRecord
,
msg_field
,
NULL
,
&
sz
);
sz
++
;
message
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sz
);
MsiRecordGetStringA
(
hRecord
,
msg_field
,
message
,
&
sz
);
TRACE
(
"(%p %lx %lx)
\n
"
,
gUIHandler
,
gUIFilter
,
log_type
);
if
(
gUIHandler
&&
(
gUIFilter
&
log_type
))
gUIHandler
(
gUIContext
,
eMessageType
,
message
);
else
TRACE
(
"%s
\n
"
,
debugstr_a
(
message
));
HeapFree
(
GetProcessHeap
(),
0
,
message
);
return
ERROR_SUCCESS
;
}
...
...
@@ -388,8 +424,17 @@ UINT WINAPI MsiSetPropertyW( MSIHANDLE hInstall, LPCWSTR szName, LPCWSTR szValue
MSIHANDLE
view
,
row
;
UINT
rc
;
DWORD
sz
=
0
;
static
const
CHAR
Insert
[]
=
"INSERT into `_Property` (`_Property`,`Value`) VALUES (?)"
;
static
const
WCHAR
Insert
[]
=
{
'I'
,
'N'
,
'S'
,
'E'
,
'R'
,
'T'
,
' '
,
'i'
,
'n'
,
't'
,
'o'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'('
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
','
,
'`'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
'`'
,
')'
,
' '
,
'V'
,
'A'
,
'L'
,
'U'
,
'E'
,
'S'
,
' '
,
'('
,
'?'
,
')'
,
0
};
static
const
WCHAR
Update
[]
=
{
'U'
,
'P'
,
'D'
,
'A'
,
'T'
,
'E'
,
' '
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
' '
,
's'
,
'e'
,
't'
,
' '
,
'`'
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
'`'
,
' '
,
'='
,
' '
,
'?'
,
' '
,
'w'
,
'h'
,
'e'
,
'r'
,
'e'
,
' '
,
'`'
,
'_'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
' '
,
'='
,
' '
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
WCHAR
Query
[
1024
];
TRACE
(
"Setting property (%s %s)
\n
"
,
debugstr_w
(
szName
),
debugstr_w
(
szValue
));
...
...
@@ -397,24 +442,35 @@ UINT WINAPI MsiSetPropertyW( MSIHANDLE hInstall, LPCWSTR szName, LPCWSTR szValue
if
(
!
hInstall
)
return
ERROR_INVALID_HANDLE
;
package
=
msihandle2msiinfo
(
hInstall
,
MSIHANDLETYPE_PACKAGE
);
if
(
!
package
)
return
ERROR_INVALID_HANDLE
;
rc
=
MsiGetPropertyW
(
hInstall
,
szName
,
0
,
&
sz
);
if
(
rc
==
ERROR_MORE_DATA
||
rc
==
ERROR_SUCCESS
)
{
FIXME
(
"Cannot set exising properties! FIXME MIKE!
\n
"
);
return
ERROR_SUCCESS
;
}
sprintfW
(
Query
,
Update
,
szName
);
package
=
msihandle2msiinfo
(
hInstall
,
MSIHANDLETYPE_PACKAGE
);
if
(
!
package
)
return
ERROR_INVALID_HANDLE
;
row
=
MsiCreateRecord
(
1
);
MsiRecordSetStringW
(
row
,
1
,
szValue
);
rc
=
MsiDatabaseOpenViewA
(
package
->
db
,
Insert
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
}
else
{
strcpyW
(
Query
,
Insert
);
row
=
MsiCreateRecord
(
2
);
MsiRecordSetStringW
(
row
,
1
,
szName
);
MsiRecordSetStringW
(
row
,
2
,
szValue
);
}
rc
=
MsiDatabaseOpenViewW
(
package
->
db
,
Query
,
&
view
);
if
(
rc
!=
ERROR_SUCCESS
)
{
MsiCloseHandle
(
row
);
return
rc
;
}
rc
=
MsiViewExecute
(
view
,
row
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment