Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
3797e6ca
Commit
3797e6ca
authored
18 years ago
by
James Hawkins
Committed by
Alexandre Julliard
18 years ago
Browse files
Options
Downloads
Patches
Plain Diff
msi: Also set the SOURCEDIR property in MSI_InstallPackage.
parent
3b6017ae
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/msi/action.c
+4
-0
4 additions, 0 deletions
dlls/msi/action.c
dlls/msi/tests/install.c
+39
-18
39 additions, 18 deletions
dlls/msi/tests/install.c
with
43 additions
and
18 deletions
dlls/msi/action.c
+
4
−
0
View file @
3797e6ca
...
...
@@ -592,6 +592,10 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
if
(
!
check
)
MSI_SetPropertyW
(
package
,
cszSourceDir
,
path
);
check
=
msi_dup_property
(
package
,
cszSOURCEDIR
);
if
(
!
check
)
MSI_SetPropertyW
(
package
,
cszSOURCEDIR
,
path
);
package
->
PackagePath
=
path
;
msi_free
(
check
);
...
...
This diff is collapsed.
Click to expand it.
dlls/msi/tests/install.c
+
39
−
18
View file @
3797e6ca
...
...
@@ -71,7 +71,8 @@ static const CHAR component_dat[] = "Component\tComponentId\tDirectory_\tAttribu
"One
\t
{783B242E-E185-4A56-AF86-C09815EC053C}
\t
MSITESTDIR
\t
2
\t\t
one.txt
\n
"
"Three
\t
{010B6ADD-B27D-4EDD-9B3D-34C4F7D61684}
\t
CHANGEDDIR
\t
2
\t\t
three.txt
\n
"
"Two
\t
{BF03D1A6-20DA-4A65-82F3-6CAC995915CE}
\t
FIRSTDIR
\t
2
\t\t
two.txt
\n
"
"dangler
\t
{6091DF25-EF96-45F1-B8E9-A9B1420C7A3C}
\t
TARGETDIR
\t
4
\t\t
regdata"
;
"dangler
\t
{6091DF25-EF96-45F1-B8E9-A9B1420C7A3C}
\t
TARGETDIR
\t
4
\t\t
regdata
\n
"
"component
\t\t
TARGETDIR
\t
0
\t
1
\t
file"
;
static
const
CHAR
directory_dat
[]
=
"Directory
\t
Directory_Parent
\t
DefaultDir
\n
"
"s72
\t
S72
\t
l255
\n
"
...
...
@@ -91,7 +92,8 @@ static const CHAR feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\t
"Four
\t\t
Four
\t
The Four Feature
\t
4
\t
3
\t
CABOUTDIR
\t
0
\n
"
"One
\t\t
One
\t
The One Feature
\t
1
\t
3
\t
MSITESTDIR
\t
0
\n
"
"Three
\t\t
Three
\t
The Three Feature
\t
3
\t
3
\t
CHANGEDDIR
\t
0
\n
"
"Two
\t\t
Two
\t
The Two Feature
\t
2
\t
3
\t
FIRSTDIR
\t
0"
;
"Two
\t\t
Two
\t
The Two Feature
\t
2
\t
3
\t
FIRSTDIR
\t
0
\n
"
"feature
\t\t\t\t
2
\t
1
\t
TARGETDIR
\t
0"
;
static
const
CHAR
feature_comp_dat
[]
=
"Feature_
\t
Component_
\n
"
"s38
\t
s72
\n
"
...
...
@@ -100,7 +102,8 @@ static const CHAR feature_comp_dat[] = "Feature_\tComponent_\n"
"Four
\t
Four
\n
"
"One
\t
One
\n
"
"Three
\t
Three
\n
"
"Two
\t
Two"
;
"Two
\t
Two
\n
"
"feature
\t
component"
;
static
const
CHAR
file_dat
[]
=
"File
\t
Component_
\t
FileName
\t
FileSize
\t
Version
\t
Language
\t
Attributes
\t
Sequence
\n
"
"s72
\t
s72
\t
l255
\t
i4
\t
S72
\t
S20
\t
I2
\t
i2
\n
"
...
...
@@ -109,7 +112,8 @@ static const CHAR file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tL
"four.txt
\t
Four
\t
four.txt
\t
1000
\t\t\t
16384
\t
4
\n
"
"one.txt
\t
One
\t
one.txt
\t
1000
\t\t\t
0
\t
1
\n
"
"three.txt
\t
Three
\t
three.txt
\t
1000
\t\t\t
0
\t
3
\n
"
"two.txt
\t
Two
\t
two.txt
\t
1000
\t\t\t
0
\t
2"
;
"two.txt
\t
Two
\t
two.txt
\t
1000
\t\t\t
0
\t
2
\n
"
"file
\t
component
\t
filename
\t
100
\t\t\t
8192
\t
1"
;
static
const
CHAR
install_exec_seq_dat
[]
=
"Action
\t
Condition
\t
Sequence
\n
"
"s72
\t
S255
\t
I2
\n
"
...
...
@@ -123,7 +127,7 @@ static const CHAR install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
"InstallInitialize
\t\t
1500
\n
"
"InstallValidate
\t\t
1400
\n
"
"LaunchConditions
\t\t
100
\n
"
"WriteRegistryValues
\t\t
5000"
;
"WriteRegistryValues
\t
SourceDir And SOURCEDIR
\t
5000"
;
static
const
CHAR
media_dat
[]
=
"DiskId
\t
LastSequence
\t
DiskPrompt
\t
Cabinet
\t
VolumeLabel
\t
Source
\n
"
"i2
\t
i4
\t
L64
\t
S255
\t
S32
\t
S72
\n
"
...
...
@@ -153,7 +157,8 @@ static const CHAR registry_dat[] = "Registry\tRoot\tKey\tName\tValue\tComponent_
"Registry
\t
Registry
\n
"
"Apples
\t
2
\t
SOFTWARE
\\
Wine
\\
msitest
\t
Name
\t
imaname
\t
One
\n
"
"Oranges
\t
2
\t
SOFTWARE
\\
Wine
\\
msitest
\t
number
\t
#314
\t
Two
\n
"
"regdata
\t
2
\t
SOFTWARE
\\
Wine
\\
msitest
\t
blah
\t
bad
\t
dangler"
;
"regdata
\t
2
\t
SOFTWARE
\\
Wine
\\
msitest
\t
blah
\t
bad
\t
dangler
\n
"
"OrderTest
\t
2
\t
SOFTWARE
\\
Wine
\\
msitest
\t
OrderTestName
\t
OrderTestValue
\t
component"
;
typedef
struct
_msi_table
{
...
...
@@ -473,14 +478,6 @@ static void create_file(const CHAR *name)
static
void
create_test_files
(
void
)
{
int
len
;
GetCurrentDirectoryA
(
MAX_PATH
,
CURR_DIR
);
len
=
lstrlenA
(
CURR_DIR
);
if
(
len
&&
(
CURR_DIR
[
len
-
1
]
==
'\\'
))
CURR_DIR
[
len
-
1
]
=
0
;
get_program_files_dir
(
PROG_FILES_DIR
);
CreateDirectoryA
(
"msitest"
,
NULL
);
...
...
@@ -494,6 +491,8 @@ static void create_test_files(void)
create_file
(
"five.txt"
);
create_cab_file
(
"msitest.cab"
);
create_file
(
"filename"
);
DeleteFileA
(
"four.txt"
);
DeleteFileA
(
"five.txt"
);
}
...
...
@@ -514,6 +513,7 @@ static BOOL delete_pf(const CHAR *rel_path, BOOL is_file)
static
void
delete_test_files
(
void
)
{
DeleteFileA
(
"filename"
);
DeleteFileA
(
"msitest.msi"
);
DeleteFileA
(
"msitest.cab"
);
DeleteFileA
(
"msitest
\\
second
\\
three.txt"
);
...
...
@@ -601,6 +601,9 @@ static void test_MsiInstallProduct(void)
HKEY
hkey
;
DWORD
num
,
size
,
type
;
create_test_files
();
create_database
(
msifile
,
tables
,
sizeof
(
tables
)
/
sizeof
(
msi_table
));
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
...
...
@@ -641,7 +644,16 @@ static void test_MsiInstallProduct(void)
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
ok
(
num
==
314
,
"Expected 314, got %d
\n
"
,
num
);
size
=
MAX_PATH
;
type
=
REG_SZ
;
res
=
RegQueryValueExA
(
hkey
,
"OrderTestName"
,
NULL
,
&
type
,
(
LPBYTE
)
path
,
&
size
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
ok
(
!
lstrcmpA
(
path
,
"OrderTestValue"
),
"Expected imaname, got %s
\n
"
,
path
);
RegDeleteKeyA
(
HKEY_LOCAL_MACHINE
,
"SOFTWARE
\\
Wine
\\
msitest"
);
delete_test_files
();
}
static
void
test_MsiSetComponentState
(
void
)
...
...
@@ -650,6 +662,8 @@ static void test_MsiSetComponentState(void)
char
path
[
MAX_PATH
];
UINT
r
;
create_database
(
msifile
,
tables
,
sizeof
(
tables
)
/
sizeof
(
msi_table
));
CoInitialize
(
NULL
);
lstrcpy
(
path
,
CURR_DIR
);
...
...
@@ -673,6 +687,8 @@ static void test_MsiSetComponentState(void)
MsiCloseHandle
(
package
);
CoUninitialize
();
DeleteFileA
(
msifile
);
}
static
void
test_packagecoltypes
(
void
)
...
...
@@ -682,6 +698,8 @@ static void test_packagecoltypes(void)
LPCSTR
query
;
UINT
r
,
count
;
create_database
(
msifile
,
tables
,
sizeof
(
tables
)
/
sizeof
(
msi_table
));
CoInitialize
(
NULL
);
lstrcpy
(
path
,
CURR_DIR
);
...
...
@@ -729,15 +747,18 @@ static void test_packagecoltypes(void)
START_TEST
(
install
)
{
DWORD
len
;
if
(
!
init_function_pointers
())
return
;
create_test_files
();
create_database
(
msifile
,
tables
,
sizeof
(
tables
)
/
sizeof
(
msi_table
));
GetCurrentDirectoryA
(
MAX_PATH
,
CURR_DIR
);
len
=
lstrlenA
(
CURR_DIR
);
if
(
len
&&
(
CURR_DIR
[
len
-
1
]
==
'\\'
))
CURR_DIR
[
len
-
1
]
=
0
;
test_MsiInstallProduct
();
test_MsiSetComponentState
();
test_packagecoltypes
();
delete_test_files
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment