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
ae18c2dc
Commit
ae18c2dc
authored
Nov 07, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Nov 08, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Store the base URL of the MSI package if it is downloaded.
parent
542101fc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
5 deletions
+19
-5
files.c
dlls/msi/files.c
+1
-1
helpers.c
dlls/msi/helpers.c
+1
-0
msipriv.h
dlls/msi/msipriv.h
+2
-1
package.c
dlls/msi/package.c
+14
-2
preview.c
dlls/msi/preview.c
+1
-1
No files found.
dlls/msi/files.c
View file @
ae18c2dc
...
...
@@ -532,7 +532,7 @@ static UINT ready_media_for_file( MSIPACKAGE *package, struct media_info *mi,
/* only download the remote cabinet file if a local copy does not exist */
if
(
GetFileAttributesW
(
mi
->
source
)
==
INVALID_FILE_ATTRIBUTES
&&
UrlIsW
(
package
->
PackagePath
,
URLIS_URL
))
UrlIsW
(
package
->
BaseURL
,
URLIS_URL
))
{
rc
=
msi_extract_remote_cabinet
(
package
,
mi
);
}
...
...
dlls/msi/helpers.c
View file @
ae18c2dc
...
...
@@ -591,6 +591,7 @@ void ACTION_free_package_structures( MSIPACKAGE* package)
msi_free
(
package
->
script
);
}
msi_free
(
package
->
BaseURL
);
msi_free
(
package
->
PackagePath
);
msi_free
(
package
->
ProductCode
);
msi_free
(
package
->
ActionFormat
);
...
...
dlls/msi/msipriv.h
View file @
ae18c2dc
...
...
@@ -228,6 +228,7 @@ typedef struct tagMSIPACKAGE
struct
list
RunningActions
;
LPWSTR
BaseURL
;
LPWSTR
PackagePath
;
LPWSTR
ProductCode
;
...
...
@@ -620,7 +621,7 @@ extern UINT VIEW_find_column( MSIVIEW *, LPCWSTR, UINT * );
extern
UINT
MSI_SetInstallLevel
(
MSIPACKAGE
*
package
,
int
iInstallLevel
);
/* package internals */
extern
MSIPACKAGE
*
MSI_CreatePackage
(
MSIDATABASE
*
);
extern
MSIPACKAGE
*
MSI_CreatePackage
(
MSIDATABASE
*
,
LPWSTR
);
extern
UINT
MSI_OpenPackageW
(
LPCWSTR
szPackage
,
MSIPACKAGE
**
);
extern
UINT
MSI_SetTargetPathW
(
MSIPACKAGE
*
,
LPCWSTR
,
LPCWSTR
);
extern
UINT
MSI_SetPropertyW
(
MSIPACKAGE
*
,
LPCWSTR
,
LPCWSTR
);
...
...
dlls/msi/package.c
View file @
ae18c2dc
...
...
@@ -428,7 +428,7 @@ static UINT msi_get_word_count( MSIPACKAGE *package )
return
word_count
;
}
MSIPACKAGE
*
MSI_CreatePackage
(
MSIDATABASE
*
db
)
MSIPACKAGE
*
MSI_CreatePackage
(
MSIDATABASE
*
db
,
LPWSTR
base_url
)
{
static
const
WCHAR
szLevel
[]
=
{
'U'
,
'I'
,
'L'
,
'e'
,
'v'
,
'e'
,
'l'
,
0
};
static
const
WCHAR
szpi
[]
=
{
'%'
,
'i'
,
0
};
...
...
@@ -466,6 +466,7 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db )
package
->
WordCount
=
msi_get_word_count
(
package
);
package
->
PackagePath
=
strdupW
(
db
->
path
);
package
->
BaseURL
=
strdupW
(
base_url
);
/* OK, here is where we do a slew of things to the database to
* prep for all that is to come as a package */
...
...
@@ -550,6 +551,7 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
MSIDATABASE
*
db
=
NULL
;
MSIPACKAGE
*
package
;
MSIHANDLE
handle
;
LPWSTR
ptr
,
base_url
=
NULL
;
UINT
r
;
static
const
WCHAR
OriginalDatabase
[]
=
...
...
@@ -571,7 +573,16 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
LPCWSTR
file
;
if
(
UrlIsW
(
szPackage
,
URLIS_URL
)
)
{
file
=
msi_download_file
(
szPackage
,
temppath
);
base_url
=
strdupW
(
szPackage
);
if
(
!
base_url
)
return
ERROR_OUTOFMEMORY
;
ptr
=
strrchrW
(
base_url
,
'/'
);
if
(
ptr
)
*
(
ptr
+
1
)
=
'\0'
;
}
else
file
=
copy_package_to_temp
(
szPackage
,
temppath
);
...
...
@@ -589,7 +600,8 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)
}
}
package
=
MSI_CreatePackage
(
db
);
package
=
MSI_CreatePackage
(
db
,
base_url
);
msi_free
(
base_url
);
msiobj_release
(
&
db
->
hdr
);
if
(
!
package
)
return
ERROR_FUNCTION_FAILED
;
...
...
dlls/msi/preview.c
View file @
ae18c2dc
...
...
@@ -43,7 +43,7 @@ MSIPREVIEW *MSI_EnableUIPreview( MSIDATABASE *db )
MSIPREVIEW
*
preview
=
NULL
;
MSIPACKAGE
*
package
;
package
=
MSI_CreatePackage
(
db
);
package
=
MSI_CreatePackage
(
db
,
NULL
);
if
(
package
)
{
preview
=
alloc_msiobject
(
MSIHANDLETYPE_PREVIEW
,
sizeof
(
MSIPREVIEW
),
...
...
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