Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c6f155a5
Commit
c6f155a5
authored
Jul 11, 2005
by
Aric Stewart
Committed by
Alexandre Julliard
Jul 11, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the string constants located in msi.h and make use of them in
files.c and source.c.
parent
18116dec
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
44 deletions
+35
-44
files.c
dlls/msi/files.c
+8
-10
source.c
dlls/msi/source.c
+27
-34
msi.h
include/msi.h
+0
-0
No files found.
dlls/msi/files.c
View file @
c6f155a5
...
...
@@ -55,8 +55,6 @@ extern const WCHAR szRemoveDuplicateFiles[];
extern
const
WCHAR
szRemoveFiles
[];
static
const
WCHAR
cszTempFolder
[]
=
{
'T'
,
'e'
,
'm'
,
'p'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
INSTALLPROPERTY_LASTUSEDSOURCE
[]
=
{
'L'
,
'a'
,
's'
,
't'
,
'U'
,
's'
,
'e'
,
'd'
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
0
};
static
const
WCHAR
INSTALLPROPERTY_PACKAGENAME
[]
=
{
'P'
,
'a'
,
'c'
,
'k'
,
'a'
,
'g'
,
'e'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
inline
static
UINT
create_component_directory
(
MSIPACKAGE
*
package
,
INT
component
)
{
...
...
@@ -508,12 +506,12 @@ static UINT ready_media_for_file(MSIPACKAGE *package, int fileindex,
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_MEDIA
,
INSTALLPROPERTY_LASTUSEDSOURCE
,
last_path
);
INSTALLPROPERTY_LASTUSEDSOURCE
stringW
,
last_path
);
else
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
INSTALLPROPERTY_LASTUSEDSOURCE
,
last_path
);
INSTALLPROPERTY_LASTUSEDSOURCE
stringW
,
last_path
);
msiobj_release
(
&
row
->
hdr
);
return
rc
;
}
...
...
@@ -541,7 +539,7 @@ static UINT ready_media_for_file(MSIPACKAGE *package, int fileindex,
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
INSTALLPROPERTY_LASTUSEDSOURCE
,
path
);
INSTALLPROPERTY_LASTUSEDSOURCE
stringW
,
path
);
HeapFree
(
GetProcessHeap
(),
0
,
path
);
}
...
...
@@ -565,12 +563,12 @@ static UINT ready_media_for_file(MSIPACKAGE *package, int fileindex,
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_MEDIA
,
INSTALLPROPERTY_LASTUSEDSOURCE
,
last_path
);
INSTALLPROPERTY_LASTUSEDSOURCE
stringW
,
last_path
);
else
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
INSTALLPROPERTY_LASTUSEDSOURCE
,
last_path
);
INSTALLPROPERTY_LASTUSEDSOURCE
stringW
,
last_path
);
/* extract the cab file into a folder in the temp folder */
sz
=
MAX_PATH
;
...
...
@@ -596,12 +594,12 @@ static UINT ready_media_for_file(MSIPACKAGE *package, int fileindex,
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_MEDIA
,
INSTALLPROPERTY_LASTUSEDSOURCE
,
last_path
);
INSTALLPROPERTY_LASTUSEDSOURCE
stringW
,
last_path
);
else
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
INSTALLPROPERTY_LASTUSEDSOURCE
,
last_path
);
INSTALLPROPERTY_LASTUSEDSOURCE
stringW
,
last_path
);
}
set_file_source
(
package
,
file
,
comp
,
last_path
);
...
...
@@ -666,7 +664,7 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAME
,
ptr
);
INSTALLPROPERTY_PACKAGENAME
stringW
,
ptr
);
}
FIXME
(
"Write DiskPrompt
\n
"
);
...
...
dlls/msi/source.c
View file @
c6f155a5
...
...
@@ -44,13 +44,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi);
* These apis are defined in MSI 3.0
*/
static
const
WCHAR
INSTALLPROPERTY_MEDIAPACKAGEPATH
[]
=
{
'M'
,
'e'
,
'd'
,
'i'
,
'a'
,
'P'
,
'a'
,
'c'
,
'k'
,
'a'
,
'g'
,
'e'
,
'P'
,
'a'
,
't'
,
'h'
,
0
};
static
const
WCHAR
INSTALLPROPERTY_DISKPROMPT
[]
=
{
'D'
,
'i'
,
's'
,
'k'
,
'P'
,
'r'
,
'o'
,
'm'
,
'p'
,
't'
,
0
};
static
const
WCHAR
INSTALLPROPERTY_LASTUSEDSOURCE
[]
=
{
'L'
,
'a'
,
's'
,
't'
,
'U'
,
's'
,
'e'
,
'd'
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
0
};
static
const
WCHAR
INSTALLPROPERTY_LASTUSEDTYPE
[]
=
{
'L'
,
'a'
,
's'
,
't'
,
'U'
,
's'
,
'e'
,
'd'
,
'T'
,
'y'
,
'p'
,
'e'
,
0
};
static
const
WCHAR
INSTALLPROPERTY_PACKAGENAME
[]
=
{
'P'
,
'a'
,
'c'
,
'k'
,
'a'
,
'g'
,
'e'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
typedef
struct
tagMediaInfo
{
LPWSTR
path
;
...
...
@@ -194,43 +187,43 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
if
(
rc
!=
ERROR_SUCCESS
)
return
ERROR_UNKNOWN_PRODUCT
;
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_MEDIAPACKAGEPATH
)
==
0
)
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_MEDIAPACKAGEPATH
stringW
)
==
0
)
{
HKEY
key
;
rc
=
OpenMediaSubkey
(
sourcekey
,
&
key
,
FALSE
);
if
(
rc
==
ERROR_SUCCESS
)
rc
=
RegQueryValueExW
(
key
,
INSTALLPROPERTY_MEDIAPACKAGEPATH
,
0
,
0
,
(
LPBYTE
)
szValue
,
pcchValue
);
rc
=
RegQueryValueExW
(
key
,
INSTALLPROPERTY_MEDIAPACKAGEPATH
stringW
,
0
,
0
,
(
LPBYTE
)
szValue
,
pcchValue
);
if
(
rc
!=
ERROR_SUCCESS
&&
rc
!=
ERROR_MORE_DATA
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
RegCloseKey
(
key
);
}
else
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_DISKPROMPT
)
==
0
)
else
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_DISKPROMPT
stringW
)
==
0
)
{
HKEY
key
;
rc
=
OpenMediaSubkey
(
sourcekey
,
&
key
,
FALSE
);
if
(
rc
==
ERROR_SUCCESS
)
rc
=
RegQueryValueExW
(
key
,
INSTALLPROPERTY_DISKPROMPT
,
0
,
0
,
rc
=
RegQueryValueExW
(
key
,
INSTALLPROPERTY_DISKPROMPT
stringW
,
0
,
0
,
(
LPBYTE
)
szValue
,
pcchValue
);
if
(
rc
!=
ERROR_SUCCESS
&&
rc
!=
ERROR_MORE_DATA
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
RegCloseKey
(
key
);
}
else
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_LASTUSEDSOURCE
)
==
0
)
else
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_LASTUSEDSOURCE
stringW
)
==
0
)
{
LPWSTR
buffer
;
DWORD
size
=
0
;
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCE
,
0
,
0
,
NULL
,
&
size
);
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCE
stringW
,
0
,
0
,
NULL
,
&
size
);
if
(
size
==
0
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
else
{
LPWSTR
ptr
;
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
rc
=
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCE
,
0
,
0
,
(
LPBYTE
)
buffer
,
&
size
);
rc
=
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCE
stringW
,
0
,
0
,
(
LPBYTE
)
buffer
,
&
size
);
ptr
=
strchrW
(
buffer
,
';'
);
ptr
=
strchrW
(
ptr
,
';'
);
if
(
!
ptr
)
...
...
@@ -250,20 +243,20 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
}
else
if
(
strcmpW
(
INSTALLPROPERTY_LASTUSEDTYPE
,
szProperty
)
==
0
)
else
if
(
strcmpW
(
INSTALLPROPERTY_LASTUSEDTYPE
stringW
,
szProperty
)
==
0
)
{
LPWSTR
buffer
;
DWORD
size
=
0
;
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCE
,
0
,
0
,
NULL
,
&
size
);
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCE
stringW
,
0
,
0
,
NULL
,
&
size
);
if
(
size
==
0
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
else
{
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
rc
=
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCE
,
0
,
0
,
(
LPBYTE
)
buffer
,
&
size
);
rc
=
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCE
stringW
,
0
,
0
,
(
LPBYTE
)
buffer
,
&
size
);
if
(
*
pcchValue
<
1
)
{
rc
=
ERROR_MORE_DATA
;
...
...
@@ -277,9 +270,9 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
}
else
if
(
strcmpW
(
INSTALLPROPERTY_PACKAGENAME
,
szProperty
)
==
0
)
else
if
(
strcmpW
(
INSTALLPROPERTY_PACKAGENAME
stringW
,
szProperty
)
==
0
)
{
rc
=
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_PACKAGENAME
,
0
,
0
,
rc
=
RegQueryValueExW
(
sourcekey
,
INSTALLPROPERTY_PACKAGENAME
stringW
,
0
,
0
,
(
LPBYTE
)
szValue
,
pcchValue
);
if
(
rc
!=
ERROR_SUCCESS
&&
rc
!=
ERROR_MORE_DATA
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
...
...
@@ -331,31 +324,31 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
return
ERROR_UNKNOWN_PRODUCT
;
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_MEDIAPACKAGEPATH
)
==
0
)
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_MEDIAPACKAGEPATH
stringW
)
==
0
)
{
HKEY
key
;
DWORD
size
=
lstrlenW
(
szValue
)
*
sizeof
(
WCHAR
);
rc
=
OpenMediaSubkey
(
sourcekey
,
&
key
,
FALSE
);
if
(
rc
==
ERROR_SUCCESS
)
rc
=
RegSetValueExW
(
key
,
INSTALLPROPERTY_MEDIAPACKAGEPATH
,
0
,
rc
=
RegSetValueExW
(
key
,
INSTALLPROPERTY_MEDIAPACKAGEPATH
stringW
,
0
,
REG_SZ
,
(
LPBYTE
)
szValue
,
size
);
if
(
rc
!=
ERROR_SUCCESS
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
RegCloseKey
(
key
);
}
else
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_DISKPROMPT
)
==
0
)
else
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_DISKPROMPT
stringW
)
==
0
)
{
HKEY
key
;
DWORD
size
=
lstrlenW
(
szValue
)
*
sizeof
(
WCHAR
);
rc
=
OpenMediaSubkey
(
sourcekey
,
&
key
,
FALSE
);
if
(
rc
==
ERROR_SUCCESS
)
rc
=
RegSetValueExW
(
key
,
INSTALLPROPERTY_DISKPROMPT
,
0
,
REG_SZ
,
(
LPBYTE
)
szValue
,
size
);
rc
=
RegSetValueExW
(
key
,
INSTALLPROPERTY_DISKPROMPT
stringW
,
0
,
REG_SZ
,
(
LPBYTE
)
szValue
,
size
);
if
(
rc
!=
ERROR_SUCCESS
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
RegCloseKey
(
key
);
}
else
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_LASTUSEDSOURCE
)
==
0
)
else
if
(
strcmpW
(
szProperty
,
INSTALLPROPERTY_LASTUSEDSOURCE
stringW
)
==
0
)
{
LPWSTR
buffer
=
NULL
;
DWORD
size
;
...
...
@@ -378,17 +371,17 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
size
=
(
lstrlenW
(
szValue
)
+
5
)
*
sizeof
(
WCHAR
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
sprintfW
(
buffer
,
LastUsedSource_Fmt
,
typechar
,
1
,
szValue
);
rc
=
RegSetValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCE
,
0
,
rc
=
RegSetValueExW
(
sourcekey
,
INSTALLPROPERTY_LASTUSEDSOURCE
stringW
,
0
,
REG_EXPAND_SZ
,
(
LPBYTE
)
buffer
,
size
);
if
(
rc
!=
ERROR_SUCCESS
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
else
if
(
strcmpW
(
INSTALLPROPERTY_PACKAGENAME
,
szProperty
)
==
0
)
else
if
(
strcmpW
(
INSTALLPROPERTY_PACKAGENAME
stringW
,
szProperty
)
==
0
)
{
DWORD
size
=
lstrlenW
(
szValue
)
*
sizeof
(
WCHAR
);
rc
=
RegSetValueExW
(
sourcekey
,
INSTALLPROPERTY_PACKAGENAME
,
0
,
REG_SZ
,
(
LPBYTE
)
szValue
,
size
);
rc
=
RegSetValueExW
(
sourcekey
,
INSTALLPROPERTY_PACKAGENAME
stringW
,
0
,
REG_SZ
,
(
LPBYTE
)
szValue
,
size
);
if
(
rc
!=
ERROR_SUCCESS
)
rc
=
ERROR_UNKNOWN_PROPERTY
;
}
...
...
include/msi.h
View file @
c6f155a5
This diff is collapsed.
Click to expand it.
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