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
3de00147
Commit
3de00147
authored
Feb 21, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Feb 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Publish a few SourceList properties.
parent
2d5ba8d2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
15 deletions
+39
-15
action.c
dlls/msi/action.c
+39
-0
install.c
dlls/msi/tests/install.c
+0
-15
No files found.
dlls/msi/action.c
View file @
3de00147
...
...
@@ -3389,12 +3389,16 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
HKEY
hkey
=
0
;
HKEY
hukey
=
0
;
HKEY
hudkey
=
0
,
props
=
0
;
HKEY
source
;
static
const
WCHAR
szProductLanguage
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'L'
,
'a'
,
'n'
,
'g'
,
'u'
,
'a'
,
'g'
,
'e'
,
0
};
static
const
WCHAR
szARPProductIcon
[]
=
{
'A'
,
'R'
,
'P'
,
'P'
,
'R'
,
'O'
,
'D'
,
'U'
,
'C'
,
'T'
,
'I'
,
'C'
,
'O'
,
'N'
,
0
};
static
const
WCHAR
szProductVersion
[]
=
{
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
szSourceList
[]
=
{
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
'L'
,
'i'
,
's'
,
't'
,
0
};
static
const
WCHAR
szEmpty
[]
=
{
0
};
DWORD
langid
;
LPWSTR
buffer
;
DWORD
size
;
...
...
@@ -3423,6 +3427,12 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
rc
=
RegCreateKeyW
(
hukey
,
szSourceList
,
&
source
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
RegCloseKey
(
source
);
rc
=
MSIREG_OpenUserDataProductKey
(
package
->
ProductCode
,
&
hudkey
,
TRUE
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
...
...
@@ -3455,6 +3465,35 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package)
}
msi_free
(
buffer
);
buffer
=
strrchrW
(
package
->
PackagePath
,
'\\'
)
+
1
;
rc
=
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAMEW
,
buffer
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
rc
=
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_MEDIAPACKAGEPATHW
,
szEmpty
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
rc
=
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_DISKPROMPTW
,
szEmpty
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
buffer
=
msi_dup_property
(
package
,
cszSourceDir
);
rc
=
MsiSourceListSetInfoW
(
package
->
ProductCode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
INSTALLPROPERTY_LASTUSEDSOURCEW
,
buffer
);
msi_free
(
buffer
);
if
(
rc
!=
ERROR_SUCCESS
)
goto
end
;
/* FIXME: Need to write more keys to the user registry */
hDb
=
alloc_msihandle
(
&
package
->
db
->
hdr
);
...
...
dlls/msi/tests/install.c
View file @
3de00147
...
...
@@ -2990,12 +2990,9 @@ static void test_publishsourcelist(void)
lstrcpyA
(
value
,
"aaa"
);
r
=
pMsiSourceListGetInfoA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAME
,
value
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
value
,
"msitest.msi"
),
"Expected 'msitest.msi', got %s
\n
"
,
value
);
ok
(
size
==
11
,
"Expected 11, got %d
\n
"
,
size
);
}
size
=
MAX_PATH
;
lstrcpyA
(
value
,
"aaa"
);
...
...
@@ -3012,12 +3009,9 @@ static void test_publishsourcelist(void)
lstrcpyA
(
value
,
"aaa"
);
r
=
pMsiSourceListGetInfoA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_DISKPROMPT
,
value
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
value
,
""
),
"Expected
\"\"
, got
\"
%s
\"\n
"
,
value
);
ok
(
size
==
0
,
"Expected 0, got %d
\n
"
,
size
);
}
lstrcpyA
(
path
,
CURR_DIR
);
lstrcatA
(
path
,
"
\\
"
);
...
...
@@ -3048,10 +3042,7 @@ static void test_publishsourcelist(void)
lstrcpyA
(
value
,
"aaa"
);
r
=
MsiSourceListEnumSourcesA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_URL
,
0
,
value
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"Expected ERROR_NO_MORE_ITEMS, got %d
\n
"
,
r
);
}
ok
(
!
lstrcmpA
(
value
,
"aaa"
),
"Expected value to be unchanged, got %s
\n
"
,
value
);
ok
(
size
==
MAX_PATH
,
"Expected MAX_PATH, got %d
\n
"
,
size
);
...
...
@@ -3059,21 +3050,15 @@ static void test_publishsourcelist(void)
lstrcpyA
(
value
,
"aaa"
);
r
=
MsiSourceListEnumSourcesA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
0
,
value
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
value
,
path
),
"Expected
\"
%s
\"
, got
\"
%s
\"\n
"
,
path
,
value
);
ok
(
size
==
lstrlenA
(
path
),
"Expected %d, got %d
\n
"
,
lstrlenA
(
path
),
size
);
}
size
=
MAX_PATH
;
lstrcpyA
(
value
,
"aaa"
);
r
=
MsiSourceListEnumSourcesA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
1
,
value
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"Expected ERROR_NO_MORE_ITEMS, got %d
\n
"
,
r
);
}
ok
(
!
lstrcmpA
(
value
,
"aaa"
),
"Expected value to be unchanged, got %s
\n
"
,
value
);
ok
(
size
==
MAX_PATH
,
"Expected MAX_PATH, got %d
\n
"
,
size
);
...
...
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