Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
013d1e01
Kaydet (Commit)
013d1e01
authored
Agu 02, 2012
tarafından
Eilidh McAdam
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Ensure correct import of msi tables using wildcard character
Change-Id: I3e1800d73250a8a630dd37329189b13cfae311e9
üst
d607a9c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
msidb.c
setup_native/source/win32/wintools/msidb/msidb.c
+13
-7
No files found.
setup_native/source/win32/wintools/msidb/msidb.c
Dosyayı görüntüle @
013d1e01
...
@@ -279,15 +279,15 @@ static BOOL msidbExportStream(LPCWSTR dbfile, LPCWSTR wdir, LPCWSTR streamName)
...
@@ -279,15 +279,15 @@ static BOOL msidbExportStream(LPCWSTR dbfile, LPCWSTR wdir, LPCWSTR streamName)
/***********************************************************************
/***********************************************************************
* msidbImportTables
* msidbImportTables
*
*
* Takes a list of tables or '*' (for all) to
export to
text archive
* Takes a list of tables or '*' (for all) to
import from
text archive
* files in specified folder
* files in specified folder
*
*
* For each table, a file called <tablename>.idt is
ex
ported containing
* For each table, a file called <tablename>.idt is
im
ported containing
* tab separated ASCII.
* tab separated ASCII.
*
*
* Examples (note wildcard escape for *nix/bash):
* Examples (note wildcard escape for *nix/bash):
* msidb -d <pathtomsi>.msi -f <workdir> -
e
\*
* msidb -d <pathtomsi>.msi -f <workdir> -
i
\*
* msidb -d <pathtomsi>.msi -f <workdir> -
e
File Directory Binary
* msidb -d <pathtomsi>.msi -f <workdir> -
i
File Directory Binary
**********************************************************************/
**********************************************************************/
static
BOOL
msidbImportTables
(
LPCWSTR
dbfile
,
LPCWSTR
wdir
,
LPWSTR
tables
[],
BOOL
create
)
static
BOOL
msidbImportTables
(
LPCWSTR
dbfile
,
LPCWSTR
wdir
,
LPWSTR
tables
[],
BOOL
create
)
{
{
...
@@ -323,13 +323,17 @@ static BOOL msidbImportTables(LPCWSTR dbfile, LPCWSTR wdir, LPWSTR tables[], BOO
...
@@ -323,13 +323,17 @@ static BOOL msidbImportTables(LPCWSTR dbfile, LPCWSTR wdir, LPWSTR tables[], BOO
{
{
while
((
ent
=
readdir
(
dir
))
!=
NULL
)
while
((
ent
=
readdir
(
dir
))
!=
NULL
)
{
{
if
(
ent
->
d_type
!=
DT_REG
)
continue
;
fileName
=
ent
->
d_name
;
fileName
=
ent
->
d_name
;
if
(
strcmp
(
fileName
+
strlen
(
fileName
)
-
4
*
sizeof
(
fileName
[
0
]),
".idt"
)
!=
0
)
continue
;
if
(
strcmp
(
fileName
,
"."
)
==
0
||
strcmp
(
fileName
,
".."
)
==
0
)
continue
;
if
(
strcmp
(
fileName
,
"."
)
==
0
||
strcmp
(
fileName
,
".."
)
==
0
)
continue
;
tableFile
=
strdupAtoW
(
CP_ACP
,
fileName
);
tableFile
=
strdupAtoW
(
CP_ACP
,
fileName
);
r
=
MsiDatabaseImportW
(
dbhandle
,
wdir
,
tableFile
);
r
=
MsiDatabaseImportW
(
dbhandle
,
wdir
,
tableFile
);
free
(
tableFile
);
free
(
tableFile
);
}
}
}
}
else
return
FALSE
;
closedir
(
dir
);
closedir
(
dir
);
free
(
dirNameA
);
free
(
dirNameA
);
}
}
...
@@ -343,7 +347,6 @@ static BOOL msidbImportTables(LPCWSTR dbfile, LPCWSTR wdir, LPWSTR tables[], BOO
...
@@ -343,7 +347,6 @@ static BOOL msidbImportTables(LPCWSTR dbfile, LPCWSTR wdir, LPWSTR tables[], BOO
lstrcpyW
(
tableFile
,
tables
[
i
]);
lstrcpyW
(
tableFile
,
tables
[
i
]);
lstrcatW
(
tableFile
,
ext
);
lstrcatW
(
tableFile
,
ext
);
r
=
MsiDatabaseImportW
(
dbhandle
,
wdir
,
tableFile
);
r
=
MsiDatabaseImportW
(
dbhandle
,
wdir
,
tableFile
);
free
(
tableFile
);
free
(
tableFile
);
...
@@ -353,6 +356,7 @@ static BOOL msidbImportTables(LPCWSTR dbfile, LPCWSTR wdir, LPWSTR tables[], BOO
...
@@ -353,6 +356,7 @@ static BOOL msidbImportTables(LPCWSTR dbfile, LPCWSTR wdir, LPWSTR tables[], BOO
}
}
}
}
}
}
MsiDatabaseCommit
(
dbhandle
);
MsiDatabaseCommit
(
dbhandle
);
MsiCloseHandle
(
dbhandle
);
MsiCloseHandle
(
dbhandle
);
return
TRUE
;
return
TRUE
;
...
@@ -476,10 +480,9 @@ int wmain(int argc, WCHAR *argv[])
...
@@ -476,10 +480,9 @@ int wmain(int argc, WCHAR *argv[])
i
=
0
;
i
=
0
;
while
(
argv
[
2
]
&&
argv
[
2
][
0
]
!=
'-'
&&
i
<
10
)
while
(
argv
[
2
]
&&
argv
[
2
][
0
]
!=
'-'
&&
i
<
10
)
{
{
argv
++
;
argc
--
;
i
++
;
iTables
[
i
]
=
argv
[
2
];
iTables
[
i
]
=
argv
[
2
];
argv
++
;
argc
--
;
i
++
;
}
}
break
;
break
;
case
'e'
:
/* Export tables */
case
'e'
:
/* Export tables */
i
=
0
;
i
=
0
;
...
@@ -550,6 +553,9 @@ int wmain(int argc, WCHAR *argv[])
...
@@ -550,6 +553,9 @@ int wmain(int argc, WCHAR *argv[])
if
(
!
msidbExportStorage
(
dbfile
,
wdir
,
storageName
))
if
(
!
msidbExportStorage
(
dbfile
,
wdir
,
storageName
))
return
6
;
return
6
;
if
(
!
iTables
[
0
]
&&
!
oTables
[
0
]
&&
!
streamName
&&
!
streamFiles
[
0
]
&&
!
storageNames
[
0
]
&&
!
storageName
)
return
7
;
return
0
;
return
0
;
}
}
...
...
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