[Libreoffice-commits] .: 3 commits - setup_native/source solenv/bin
Eilidh McAdam
emcadam at kemper.freedesktop.org
Thu Aug 2 04:11:32 PDT 2012
setup_native/source/win32/wintools/msidb/msidb.c | 20 +++++++++++++-------
solenv/bin/make_installer.pl | 4 ++--
solenv/bin/modules/installer/windows/msiglobal.pm | 5 ++++-
solenv/bin/modules/installer/windows/msp.pm | 3 +++
solenv/bin/modules/installer/windows/update.pm | 3 +++
5 files changed, 25 insertions(+), 10 deletions(-)
New commits:
commit 73ec8371d797b5be564381d8982977696444ffa6
Author: Eilidh McAdam <eilidh at lanedo.com>
Date: Thu Aug 2 12:05:42 2012 +0100
Installer logic changed call msi functions on request
Change-Id: Ic73825cab20bd9e56be69531cba6452fe0202b72
diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl
index ea77d9f..38b4793 100644
--- a/solenv/bin/make_installer.pl
+++ b/solenv/bin/make_installer.pl
@@ -604,7 +604,7 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
my $allupdatelastsequences = "";
my $allupdatediskids = "";
- if ( $installer::globals::iswindowsbuild )
+ if ( $installer::globals::iswindowsbuild || $installer::globals::packageformat eq 'msi' )
{
if ( $allvariableshashref->{'UPDATE_DATABASE'} )
{
@@ -625,7 +625,7 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
if (!($installer::globals::is_copy_only_project))
{
- if (( $installer::globals::iswindowsbuild ) && ( $installer::globals::packageformat ne "archive" ) && ( $installer::globals::packageformat ne "installed" ))
+ if ((( $installer::globals::iswindowsbuild ) && ( $installer::globals::packageformat ne "archive" ) && ( $installer::globals::packageformat ne "installed" ) ) || $insaller::globals::packageformat eq 'msi' )
{
installer::windows::msiglobal::set_global_code_variables($languagesarrayref, $languagestringref, $allvariableshashref, $alloldproperties);
}
commit 013d1e01c33ad41d16427470ac151192ea52adec
Author: Eilidh McAdam <eilidh at lanedo.com>
Date: Thu Aug 2 12:01:05 2012 +0100
Ensure correct import of msi tables using wildcard character
Change-Id: I3e1800d73250a8a630dd37329189b13cfae311e9
diff --git a/setup_native/source/win32/wintools/msidb/msidb.c b/setup_native/source/win32/wintools/msidb/msidb.c
index 6916423..c492ba2 100644
--- a/setup_native/source/win32/wintools/msidb/msidb.c
+++ b/setup_native/source/win32/wintools/msidb/msidb.c
@@ -279,15 +279,15 @@ static BOOL msidbExportStream(LPCWSTR dbfile, LPCWSTR wdir, LPCWSTR streamName)
/***********************************************************************
* 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
*
- * For each table, a file called <tablename>.idt is exported containing
+ * For each table, a file called <tablename>.idt is imported containing
* tab separated ASCII.
*
* Examples (note wildcard escape for *nix/bash):
- * msidb -d <pathtomsi>.msi -f <workdir> -e \*
- * msidb -d <pathtomsi>.msi -f <workdir> -e File Directory Binary
+ * msidb -d <pathtomsi>.msi -f <workdir> -i \*
+ * msidb -d <pathtomsi>.msi -f <workdir> -i File Directory Binary
**********************************************************************/
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
{
while ((ent = readdir(dir)) != NULL)
{
+ if (ent->d_type != DT_REG) continue;
fileName = ent->d_name;
+ if (strcmp(fileName+strlen(fileName)-4*sizeof(fileName[0]), ".idt") != 0) continue;
if (strcmp(fileName, ".") == 0 || strcmp(fileName, "..") == 0) continue;
tableFile = strdupAtoW(CP_ACP, fileName);
r = MsiDatabaseImportW(dbhandle, wdir, tableFile);
free(tableFile);
}
}
+ else
+ return FALSE;
closedir(dir);
free(dirNameA);
}
@@ -343,7 +347,6 @@ static BOOL msidbImportTables(LPCWSTR dbfile, LPCWSTR wdir, LPWSTR tables[], BOO
lstrcpyW(tableFile, tables[i]);
lstrcatW(tableFile, ext);
-
r = MsiDatabaseImportW(dbhandle, wdir, tableFile);
free(tableFile);
@@ -353,6 +356,7 @@ static BOOL msidbImportTables(LPCWSTR dbfile, LPCWSTR wdir, LPWSTR tables[], BOO
}
}
}
+
MsiDatabaseCommit(dbhandle);
MsiCloseHandle(dbhandle);
return TRUE;
@@ -476,10 +480,9 @@ int wmain(int argc, WCHAR *argv[])
i = 0;
while (argv[2] && argv[2][0] != '-' && i < 10)
{
- argv++; argc--; i++;
iTables[i] = argv[2];
+ argv++; argc--; i++;
}
-
break;
case 'e': /* Export tables */
i = 0;
@@ -550,6 +553,9 @@ int wmain(int argc, WCHAR *argv[])
if (!msidbExportStorage(dbfile, wdir, storageName))
return 6;
+ if (!iTables[0] && !oTables[0] && !streamName && !streamFiles[0] && !storageNames[0] && !storageName)
+ return 7;
+
return 0;
}
commit d607a9c31bbe0b352cfa7797af17899cd9b7650d
Author: Eilidh McAdam <eilidh at lanedo.com>
Date: Thu Aug 2 12:00:12 2012 +0100
Escape asterisk in Linux system calls
Change-Id: Iabe5748d23d68cb475823d91a7c125de271eecd5
diff --git a/solenv/bin/modules/installer/windows/msiglobal.pm b/solenv/bin/modules/installer/windows/msiglobal.pm
index 97edc40..3cbc952 100644
--- a/solenv/bin/modules/installer/windows/msiglobal.pm
+++ b/solenv/bin/modules/installer/windows/msiglobal.pm
@@ -734,6 +734,9 @@ sub create_msi_database
$msifilename =~ s/\//\\\\/g;
$extraslash = "\\";
}
+ if ( $^O =~ /linux/i ) {
+ $extraslash = "\\";
+ }
my $systemcall = $msidb . " -f " . $idtdirbase . " -d " . $msifilename . " -c " . "-i " . $extraslash . "*";
my $returnvalue = system($systemcall);
@@ -988,7 +991,7 @@ sub write_summary_into_msi_database
if ($returnvalue)
{
- $infoline = "ERROR: Could not execute $systemcall\n";
+ $infoline = "ERROR: Could not execute $systemcall (return $returnvalue)\n";
push( @installer::globals::logfileinfo, $infoline);
}
else
diff --git a/solenv/bin/modules/installer/windows/msp.pm b/solenv/bin/modules/installer/windows/msp.pm
index 0de6eff..d76d1e4 100644
--- a/solenv/bin/modules/installer/windows/msp.pm
+++ b/solenv/bin/modules/installer/windows/msp.pm
@@ -298,6 +298,9 @@ sub extract_all_tables_from_pcpfile
$localworkdir =~ s/\//\\\\/g;
$extraslash = "\\";
}
+ if ( $^O =~ /linux/i ) {
+ $extraslash = "\\";
+ }
# Export of all tables by using "*"
diff --git a/solenv/bin/modules/installer/windows/update.pm b/solenv/bin/modules/installer/windows/update.pm
index 4378ecf..ae6cd4a 100644
--- a/solenv/bin/modules/installer/windows/update.pm
+++ b/solenv/bin/modules/installer/windows/update.pm
@@ -56,6 +56,9 @@ sub extract_all_tables_from_msidatabase
$workdir =~ s/\//\\\\/g;
$extraslash = "\\";
}
+ if ( $^O =~ /linux/i) {
+ $extraslash = "\\";
+ }
$systemcall = $msidb . " -d " . $fulldatabasepath . " -f " . $workdir . " -e " . $extraslash . "*";
$returnvalue = system($systemcall);
More information about the Libreoffice-commits
mailing list