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
f1b52aef
Commit
f1b52aef
authored
Jun 28, 2005
by
Aric Stewart
Committed by
Alexandre Julliard
Jun 28, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Relocate the msi file to prevent cd locking, corrected to properly not
try to relocated #nnnn handles as files.
parent
67970288
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
11 deletions
+52
-11
action.c
dlls/msi/action.c
+5
-6
helpers.c
dlls/msi/helpers.c
+1
-0
msi.c
dlls/msi/msi.c
+21
-3
msipriv.h
dlls/msi/msipriv.h
+2
-1
package.c
dlls/msi/package.c
+23
-1
No files found.
dlls/msi/action.c
View file @
f1b52aef
...
...
@@ -432,7 +432,7 @@ static void ui_actioninfo(MSIPACKAGE *package, LPCWSTR action, BOOL start,
*****************************************************/
UINT
ACTION_DoTopLevelINSTALL
(
MSIPACKAGE
*
package
,
LPCWSTR
szPackagePath
,
LPCWSTR
szCommandLine
)
LPCWSTR
szCommandLine
,
LPCWSTR
msiFilePath
)
{
DWORD
sz
;
WCHAR
buffer
[
10
];
...
...
@@ -447,6 +447,8 @@ UINT ACTION_DoTopLevelINSTALL(MSIPACKAGE *package, LPCWSTR szPackagePath,
package
->
script
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
MSISCRIPT
));
memset
(
package
->
script
,
0
,
sizeof
(
MSISCRIPT
));
package
->
msiFilePath
=
strdupW
(
msiFilePath
);
if
(
szPackagePath
)
{
LPWSTR
p
,
check
,
path
;
...
...
@@ -1371,9 +1373,6 @@ static INT load_folder(MSIPACKAGE *package, const WCHAR* dir)
if
(
targetdir
[
0
]
==
'.'
&&
targetdir
[
1
]
==
0
)
targetdir
=
NULL
;
if
(
srcdir
&&
srcdir
[
0
]
==
'.'
&&
srcdir
[
1
]
==
0
)
srcdir
=
NULL
;
if
(
targetdir
)
{
TRACE
(
" TargetDefault = %s
\n
"
,
debugstr_w
(
targetdir
));
...
...
@@ -3574,9 +3573,9 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package)
snprintfW
(
path
,
sizeof
(
path
)
/
sizeof
(
path
[
0
]),
installerPathFmt
,
windir
);
create_full_pathW
(
path
);
TRACE
(
"Copying to local package %s
\n
"
,
debugstr_w
(
packagefile
));
if
(
!
CopyFileW
(
package
->
Packag
ePath
,
packagefile
,
FALSE
))
if
(
!
CopyFileW
(
package
->
msiFil
ePath
,
packagefile
,
FALSE
))
ERR
(
"Unable to copy package (%s -> %s) (error %ld)
\n
"
,
debugstr_w
(
package
->
Packag
ePath
),
debugstr_w
(
packagefile
),
debugstr_w
(
package
->
msiFil
ePath
),
debugstr_w
(
packagefile
),
GetLastError
());
size
=
strlenW
(
packagefile
)
*
sizeof
(
WCHAR
);
RegSetValueExW
(
hkey
,
szLocalPackage
,
0
,
REG_SZ
,(
LPSTR
)
packagefile
,
size
);
...
...
dlls/msi/helpers.c
View file @
f1b52aef
...
...
@@ -580,6 +580,7 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
}
HeapFree
(
GetProcessHeap
(),
0
,
package
->
PackagePath
);
HeapFree
(
GetProcessHeap
(),
0
,
package
->
msiFilePath
);
/* cleanup control event subscriptions */
ControlEvent_CleanupSubscriptions
(
package
);
...
...
dlls/msi/msi.c
View file @
f1b52aef
...
...
@@ -202,6 +202,9 @@ UINT WINAPI MsiInstallProductW(LPCWSTR szPackagePath, LPCWSTR szCommandLine)
MSIPACKAGE
*
package
=
NULL
;
UINT
r
;
MSIHANDLE
handle
;
WCHAR
path
[
MAX_PATH
];
WCHAR
filename
[
MAX_PATH
];
static
const
WCHAR
szMSI
[]
=
{
'M'
,
'S'
,
'I'
,
0
};
FIXME
(
"%s %s
\n
"
,
debugstr_w
(
szPackagePath
),
debugstr_w
(
szCommandLine
));
...
...
@@ -209,16 +212,31 @@ UINT WINAPI MsiInstallProductW(LPCWSTR szPackagePath, LPCWSTR szCommandLine)
if
(
r
!=
ERROR_SUCCESS
)
return
r
;
r
=
MSI_OpenPackageW
(
szPackagePath
,
&
package
);
/* copy the msi file to a temp file to pervent locking a CD
* with a multi disc install
*/
GetTempPathW
(
MAX_PATH
,
path
);
GetTempFileNameW
(
path
,
szMSI
,
0
,
filename
);
CopyFileW
(
szPackagePath
,
filename
,
FALSE
);
TRACE
(
"Opening relocated package %s
\n
"
,
debugstr_w
(
filename
));
r
=
MSI_OpenPackageW
(
filename
,
&
package
);
if
(
r
!=
ERROR_SUCCESS
)
{
DeleteFileW
(
filename
);
return
r
;
}
handle
=
alloc_msihandle
(
&
package
->
hdr
);
r
=
ACTION_DoTopLevelINSTALL
(
package
,
szPackagePath
,
szCommandLine
);
r
=
ACTION_DoTopLevelINSTALL
(
package
,
szPackagePath
,
szCommandLine
,
filename
);
MsiCloseHandle
(
handle
);
msiobj_release
(
&
package
->
hdr
);
DeleteFileW
(
filename
);
return
r
;
}
...
...
@@ -324,7 +342,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
if
(
MsiQueryProductStateW
(
szProduct
)
!=
INSTALLSTATE_UNKNOWN
)
lstrcatW
(
commandline
,
szInstalled
);
rc
=
ACTION_DoTopLevelINSTALL
(
package
,
sourcepath
,
commandline
);
rc
=
ACTION_DoTopLevelINSTALL
(
package
,
sourcepath
,
commandline
,
sourcepath
);
msiobj_release
(
&
package
->
hdr
);
...
...
dlls/msi/msipriv.h
View file @
f1b52aef
...
...
@@ -216,6 +216,7 @@ typedef struct tagMSIPACKAGE
UINT
RunningActionCount
;
LPWSTR
PackagePath
;
LPWSTR
msiFilePath
;
UINT
CurrentInstallState
;
msi_dialog
*
dialog
;
...
...
@@ -307,7 +308,7 @@ extern UINT read_raw_stream_data( MSIDATABASE*, LPCWSTR stname,
USHORT
**
pdata
,
UINT
*
psz
);
/* action internals */
extern
UINT
ACTION_DoTopLevelINSTALL
(
MSIPACKAGE
*
,
LPCWSTR
,
LPCWSTR
);
extern
UINT
ACTION_DoTopLevelINSTALL
(
MSIPACKAGE
*
,
LPCWSTR
,
LPCWSTR
,
LPCWSTR
);
extern
void
ACTION_free_package_structures
(
MSIPACKAGE
*
);
extern
UINT
ACTION_DialogBox
(
MSIPACKAGE
*
,
LPCWSTR
);
...
...
dlls/msi/package.c
View file @
f1b52aef
...
...
@@ -454,18 +454,40 @@ UINT WINAPI MsiOpenPackageExW(LPCWSTR szPackage, DWORD dwOptions, MSIHANDLE *phP
{
MSIPACKAGE
*
package
=
NULL
;
UINT
ret
;
WCHAR
path
[
MAX_PATH
];
WCHAR
filename
[
MAX_PATH
];
static
const
WCHAR
szMSI
[]
=
{
'M'
,
'S'
,
'I'
,
0
};
TRACE
(
"%s %08lx %p
\n
"
,
debugstr_w
(
szPackage
),
dwOptions
,
phPackage
);
/* copy the msi file to a temp file to pervent locking a CD
* with a multi disc install
*/
if
(
szPackage
[
0
]
==
'#'
)
strcpyW
(
filename
,
szPackage
);
else
{
GetTempPathW
(
MAX_PATH
,
path
);
GetTempFileNameW
(
path
,
szMSI
,
0
,
filename
);
CopyFileW
(
szPackage
,
filename
,
FALSE
);
TRACE
(
"Opening relocated package %s
\n
"
,
debugstr_w
(
filename
));
}
if
(
dwOptions
)
FIXME
(
"dwOptions %08lx not supported
\n
"
,
dwOptions
);
ret
=
MSI_OpenPackageW
(
szPackag
e
,
&
package
);
ret
=
MSI_OpenPackageW
(
filenam
e
,
&
package
);
if
(
ret
==
ERROR_SUCCESS
)
{
*
phPackage
=
alloc_msihandle
(
&
package
->
hdr
);
msiobj_release
(
&
package
->
hdr
);
}
if
(
szPackage
[
0
]
!=
'#'
)
DeleteFileW
(
filename
);
return
ret
;
}
...
...
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