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
Zsolt Vadász
wine
Commits
6f865b94
Commit
6f865b94
authored
17 years ago
by
Marcus Meissner
Committed by
Alexandre Julliard
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
msi: Common Files is translated to current language.
parent
9684c9fe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/msi/tests/install.c
+24
-5
24 additions, 5 deletions
dlls/msi/tests/install.c
with
24 additions
and
5 deletions
dlls/msi/tests/install.c
+
24
−
5
View file @
6f865b94
...
...
@@ -42,6 +42,7 @@ static const char *msifile2 = "winetest2.msi";
static
const
char
*
mstfile
=
"winetest.mst"
;
static
CHAR
CURR_DIR
[
MAX_PATH
];
static
CHAR
PROG_FILES_DIR
[
MAX_PATH
];
static
CHAR
COMMON_FILES_DIR
[
MAX_PATH
];
/* msi database data */
...
...
@@ -995,10 +996,10 @@ static void create_cab_file(const CHAR *name, DWORD max_size, const CHAR *files)
ok
(
res
,
"Failed to destroy the cabinet
\n
"
);
}
static
BOOL
get_program_files_dir
(
LPSTR
buf
)
static
BOOL
get_program_files_dir
(
LPSTR
buf
,
LPSTR
buf2
)
{
HKEY
hkey
;
DWORD
type
=
REG_EXPAND_SZ
,
size
;
DWORD
type
,
size
;
if
(
RegOpenKey
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Microsoft
\\
Windows
\\
CurrentVersion"
,
&
hkey
))
...
...
@@ -1008,6 +1009,10 @@ static BOOL get_program_files_dir(LPSTR buf)
if
(
RegQueryValueEx
(
hkey
,
"ProgramFilesDir"
,
0
,
&
type
,
(
LPBYTE
)
buf
,
&
size
))
return
FALSE
;
size
=
MAX_PATH
;
if
(
RegQueryValueEx
(
hkey
,
"CommonFilesDir"
,
0
,
&
type
,
(
LPBYTE
)
buf2
,
&
size
))
return
FALSE
;
RegCloseKey
(
hkey
);
return
TRUE
;
}
...
...
@@ -1064,6 +1069,20 @@ static BOOL delete_pf(const CHAR *rel_path, BOOL is_file)
return
RemoveDirectoryA
(
path
);
}
static
BOOL
delete_cf
(
const
CHAR
*
rel_path
,
BOOL
is_file
)
{
CHAR
path
[
MAX_PATH
];
lstrcpyA
(
path
,
COMMON_FILES_DIR
);
lstrcatA
(
path
,
"
\\
"
);
lstrcatA
(
path
,
rel_path
);
if
(
is_file
)
return
DeleteFileA
(
path
);
else
return
RemoveDirectoryA
(
path
);
}
static
void
delete_test_files
(
void
)
{
DeleteFileA
(
"msitest.msi"
);
...
...
@@ -1620,8 +1639,8 @@ static void test_setdirproperty(void)
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
delete_
p
f
(
"
Common Files
\\
msitest
\\
maximus"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_
p
f
(
"
Common Files
\\
msitest"
,
FALSE
),
"File not installed
\n
"
);
ok
(
delete_
c
f
(
"msitest
\\
maximus"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_
c
f
(
"msitest"
,
FALSE
),
"File not installed
\n
"
);
/* Delete the files in the temp (current) folder */
DeleteFile
(
msifile
);
...
...
@@ -2889,7 +2908,7 @@ START_TEST(install)
if
(
len
&&
(
CURR_DIR
[
len
-
1
]
==
'\\'
))
CURR_DIR
[
len
-
1
]
=
0
;
get_program_files_dir
(
PROG_FILES_DIR
);
get_program_files_dir
(
PROG_FILES_DIR
,
COMMON_FILES_DIR
);
test_MsiInstallProduct
();
test_MsiSetComponentState
();
...
...
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