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
c8a8f77a
Commit
c8a8f77a
authored
Jun 12, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Jun 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Set the MsiNetAssemblySupport property.
parent
8b362f7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
120 additions
and
0 deletions
+120
-0
package.c
dlls/msi/package.c
+120
-0
No files found.
dlls/msi/package.c
View file @
c8a8f77a
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#include "wincrypt.h"
#include "wincrypt.h"
#include "winuser.h"
#include "winuser.h"
#include "wininet.h"
#include "wininet.h"
#include "winver.h"
#include "urlmon.h"
#include "urlmon.h"
#include "shlobj.h"
#include "shlobj.h"
#include "wine/unicode.h"
#include "wine/unicode.h"
...
@@ -205,6 +206,123 @@ done:
...
@@ -205,6 +206,123 @@ done:
return
r
;
return
r
;
}
}
static
LPWSTR
get_fusion_filename
(
MSIPACKAGE
*
package
)
{
HKEY
netsetup
;
LONG
res
;
LPWSTR
file
;
DWORD
index
=
0
,
size
;
WCHAR
ver
[
MAX_PATH
];
WCHAR
name
[
MAX_PATH
];
WCHAR
windir
[
MAX_PATH
];
static
const
WCHAR
backslash
[]
=
{
'\\'
,
0
};
static
const
WCHAR
fusion
[]
=
{
'f'
,
'u'
,
's'
,
'i'
,
'o'
,
'n'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
static
const
WCHAR
sub
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'N'
,
'E'
,
'T'
,
' '
,
'F'
,
'r'
,
'a'
,
'm'
,
'e'
,
'w'
,
'o'
,
'r'
,
'k'
,
' '
,
'S'
,
'e'
,
't'
,
'u'
,
'p'
,
'\\'
,
'N'
,
'D'
,
'P'
,
0
};
static
const
WCHAR
subdir
[]
=
{
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'.'
,
'N'
,
'E'
,
'T'
,
'\\'
,
'F'
,
'r'
,
'a'
,
'm'
,
'e'
,
'w'
,
'o'
,
'r'
,
'k'
,
'\\'
,
0
};
res
=
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
sub
,
0
,
KEY_ENUMERATE_SUB_KEYS
,
&
netsetup
);
if
(
res
!=
ERROR_SUCCESS
)
return
NULL
;
ver
[
0
]
=
'\0'
;
size
=
MAX_PATH
;
while
(
RegEnumKeyExW
(
netsetup
,
index
,
name
,
&
size
,
NULL
,
NULL
,
NULL
,
NULL
)
==
ERROR_SUCCESS
)
{
index
++
;
if
(
lstrcmpW
(
ver
,
name
)
<
0
)
lstrcpyW
(
ver
,
name
);
}
RegCloseKey
(
netsetup
);
if
(
!
index
)
return
NULL
;
GetWindowsDirectoryW
(
windir
,
MAX_PATH
);
size
=
lstrlenW
(
windir
)
+
lstrlenW
(
subdir
)
+
lstrlenW
(
ver
)
+
lstrlenW
(
fusion
)
+
3
;
file
=
msi_alloc
(
size
*
sizeof
(
WCHAR
));
if
(
!
file
)
return
NULL
;
lstrcpyW
(
file
,
windir
);
lstrcatW
(
file
,
backslash
);
lstrcatW
(
file
,
subdir
);
lstrcatW
(
file
,
ver
);
lstrcatW
(
file
,
backslash
);
lstrcatW
(
file
,
fusion
);
return
file
;
}
typedef
struct
tagLANGANDCODEPAGE
{
WORD
wLanguage
;
WORD
wCodePage
;
}
LANGANDCODEPAGE
;
static
void
set_msi_assembly_prop
(
MSIPACKAGE
*
package
)
{
UINT
val_len
;
DWORD
size
,
handle
;
LPVOID
version
=
NULL
;
WCHAR
buf
[
MAX_PATH
];
LPWSTR
fusion
,
verstr
;
LANGANDCODEPAGE
*
translate
;
static
const
WCHAR
netasm
[]
=
{
'M'
,
's'
,
'i'
,
'N'
,
'e'
,
't'
,
'A'
,
's'
,
's'
,
'e'
,
'm'
,
'b'
,
'l'
,
'y'
,
'S'
,
'u'
,
'p'
,
'p'
,
'o'
,
'r'
,
't'
,
0
};
static
const
WCHAR
translation
[]
=
{
'\\'
,
'V'
,
'a'
,
'r'
,
'F'
,
'i'
,
'l'
,
'e'
,
'I'
,
'n'
,
'f'
,
'o'
,
'\\'
,
'T'
,
'r'
,
'a'
,
'n'
,
's'
,
'l'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
verfmt
[]
=
{
'\\'
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
'F'
,
'i'
,
'l'
,
'e'
,
'I'
,
'n'
,
'f'
,
'o'
,
'\\'
,
'%'
,
'0'
,
'4'
,
'x'
,
'%'
,
'0'
,
'4'
,
'x'
,
'\\'
,
'P'
,
'r'
,
'o'
,
'd'
,
'u'
,
'c'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
fusion
=
get_fusion_filename
(
package
);
if
(
!
fusion
)
return
;
size
=
GetFileVersionInfoSizeW
(
fusion
,
&
handle
);
if
(
!
size
)
return
;
version
=
msi_alloc
(
size
);
if
(
!
version
)
return
;
if
(
!
GetFileVersionInfoW
(
fusion
,
handle
,
size
,
version
))
goto
done
;
if
(
!
VerQueryValueW
(
version
,
translation
,
(
LPVOID
*
)
&
translate
,
&
val_len
))
goto
done
;
sprintfW
(
buf
,
verfmt
,
translate
[
0
].
wLanguage
,
translate
[
0
].
wCodePage
);
if
(
!
VerQueryValueW
(
version
,
buf
,
(
LPVOID
*
)
&
verstr
,
&
val_len
))
goto
done
;
if
(
!
val_len
||
!
verstr
)
goto
done
;
MSI_SetPropertyW
(
package
,
netasm
,
verstr
);
done:
msi_free
(
fusion
);
msi_free
(
version
);
}
/*
/*
* There are a whole slew of these we need to set
* There are a whole slew of these we need to set
*
*
...
@@ -499,6 +617,8 @@ static VOID set_installer_properties(MSIPACKAGE *package)
...
@@ -499,6 +617,8 @@ static VOID set_installer_properties(MSIPACKAGE *package)
else
else
ERR
(
"Couldn't set Time property: GetTimeFormat failed with error %d
\n
"
,
GetLastError
());
ERR
(
"Couldn't set Time property: GetTimeFormat failed with error %d
\n
"
,
GetLastError
());
set_msi_assembly_prop
(
package
);
msi_free
(
check
);
msi_free
(
check
);
CloseHandle
(
hkey
);
CloseHandle
(
hkey
);
}
}
...
...
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