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
8412a136
Commit
8412a136
authored
Feb 17, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Feb 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Set the UserLanguageID property.
parent
e94367cc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
package.c
dlls/msi/package.c
+13
-6
package.c
dlls/msi/tests/package.c
+9
-0
No files found.
dlls/msi/package.c
View file @
8412a136
...
...
@@ -352,6 +352,7 @@ static VOID set_installer_properties(MSIPACKAGE *package)
LONG
res
;
SYSTEM_INFO
sys_info
;
SYSTEMTIME
systemtime
;
LANGID
langid
;
static
const
WCHAR
cszbs
[]
=
{
'\\'
,
0
};
static
const
WCHAR
CFF
[]
=
...
...
@@ -420,7 +421,7 @@ static VOID set_installer_properties(MSIPACKAGE *package)
static
const
WCHAR
szScreenX
[]
=
{
'S'
,
'c'
,
'r'
,
'e'
,
'e'
,
'n'
,
'X'
,
0
};
static
const
WCHAR
szScreenY
[]
=
{
'S'
,
'c'
,
'r'
,
'e'
,
'e'
,
'n'
,
'Y'
,
0
};
static
const
WCHAR
szColorBits
[]
=
{
'C'
,
'o'
,
'l'
,
'o'
,
'r'
,
'B'
,
'i'
,
't'
,
's'
,
0
};
static
const
WCHAR
sz
Screen
Format
[]
=
{
'%'
,
'd'
,
0
};
static
const
WCHAR
sz
Int
Format
[]
=
{
'%'
,
'd'
,
0
};
static
const
WCHAR
szIntel
[]
=
{
'I'
,
'n'
,
't'
,
'e'
,
'l'
,
0
};
static
const
WCHAR
szAllUsers
[]
=
{
'A'
,
'L'
,
'L'
,
'U'
,
'S'
,
'E'
,
'R'
,
'S'
,
0
};
static
const
WCHAR
szCurrentVersion
[]
=
{
...
...
@@ -437,6 +438,7 @@ static VOID set_installer_properties(MSIPACKAGE *package)
static
const
WCHAR
szCOMPANYNAME
[]
=
{
'C'
,
'O'
,
'M'
,
'P'
,
'A'
,
'N'
,
'Y'
,
'N'
,
'A'
,
'M'
,
'E'
,
0
};
static
const
WCHAR
szDate
[]
=
{
'D'
,
'a'
,
't'
,
'e'
,
0
};
static
const
WCHAR
szTime
[]
=
{
'T'
,
'i'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
szUserLangID
[]
=
{
'U'
,
's'
,
'e'
,
'r'
,
'L'
,
'a'
,
'n'
,
'g'
,
'u'
,
'a'
,
'g'
,
'e'
,
'I'
,
'D'
,
0
};
/*
* Other things that probably should be set:
...
...
@@ -523,7 +525,7 @@ static VOID set_installer_properties(MSIPACKAGE *package)
/* Physical Memory is specified in MB. Using total amount. */
msex
.
dwLength
=
sizeof
(
msex
);
GlobalMemoryStatusEx
(
&
msex
);
sprintfW
(
bufstr
,
sz
Screen
Format
,
(
int
)(
msex
.
ullTotalPhys
/
1024
/
1024
));
sprintfW
(
bufstr
,
sz
Int
Format
,
(
int
)(
msex
.
ullTotalPhys
/
1024
/
1024
));
MSI_SetPropertyW
(
package
,
szPhysicalMemory
,
bufstr
);
SHGetFolderPathW
(
NULL
,
CSIDL_WINDOWS
,
NULL
,
0
,
pth
);
...
...
@@ -570,17 +572,17 @@ static VOID set_installer_properties(MSIPACKAGE *package)
GetSystemInfo
(
&
sys_info
);
if
(
sys_info
.
u
.
s
.
wProcessorArchitecture
==
PROCESSOR_ARCHITECTURE_INTEL
)
{
sprintfW
(
bufstr
,
sz
Screen
Format
,
sys_info
.
wProcessorLevel
);
sprintfW
(
bufstr
,
sz
Int
Format
,
sys_info
.
wProcessorLevel
);
MSI_SetPropertyW
(
package
,
szIntel
,
bufstr
);
}
/* Screen properties. */
dc
=
GetDC
(
0
);
sprintfW
(
bufstr
,
sz
Screen
Format
,
GetDeviceCaps
(
dc
,
HORZRES
)
);
sprintfW
(
bufstr
,
sz
Int
Format
,
GetDeviceCaps
(
dc
,
HORZRES
)
);
MSI_SetPropertyW
(
package
,
szScreenX
,
bufstr
);
sprintfW
(
bufstr
,
sz
Screen
Format
,
GetDeviceCaps
(
dc
,
VERTRES
));
sprintfW
(
bufstr
,
sz
Int
Format
,
GetDeviceCaps
(
dc
,
VERTRES
));
MSI_SetPropertyW
(
package
,
szScreenY
,
bufstr
);
sprintfW
(
bufstr
,
sz
Screen
Format
,
GetDeviceCaps
(
dc
,
BITSPIXEL
));
sprintfW
(
bufstr
,
sz
Int
Format
,
GetDeviceCaps
(
dc
,
BITSPIXEL
));
MSI_SetPropertyW
(
package
,
szColorBits
,
bufstr
);
ReleaseDC
(
0
,
dc
);
...
...
@@ -628,6 +630,11 @@ static VOID set_installer_properties(MSIPACKAGE *package)
set_msi_assembly_prop
(
package
);
langid
=
GetUserDefaultLangID
();
sprintfW
(
bufstr
,
szIntFormat
,
langid
);
MSI_SetPropertyW
(
package
,
szUserLangID
,
bufstr
);
msi_free
(
check
);
CloseHandle
(
hkey
);
}
...
...
dlls/msi/tests/package.c
View file @
8412a136
...
...
@@ -4697,6 +4697,7 @@ static void test_installprops(void)
CHAR
path
[
MAX_PATH
];
CHAR
buf
[
MAX_PATH
];
DWORD
size
,
type
;
LANGID
langid
;
HKEY
hkey
;
UINT
r
;
...
...
@@ -4762,6 +4763,14 @@ static void test_installprops(void)
ok
(
r
==
ERROR_SUCCESS
,
"failed to get property: %d
\n
"
,
r
);
trace
(
"PackageCode = %s
\n
"
,
buf
);
langid
=
GetUserDefaultLangID
();
sprintf
(
path
,
"%d"
,
langid
);
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"UserLanguageID"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS< got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
buf
,
path
),
"Expected
\"
%s
\"
, got
\"
%s
\"\n
"
,
path
,
buf
);
CloseHandle
(
hkey
);
MsiCloseHandle
(
hpkg
);
DeleteFile
(
msifile
);
...
...
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