From b786a33cfdca2e8a4114ddef0340e0e0628dd09c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 21 Oct 2011 17:18:13 +0200 Subject: Undo basis/brand split: Move SDK and ure-link, remove OOO_BASE_DIR and BaseInstallation. --- setup_native/source/packinfo/packinfo_brand.txt | 1 - .../source/packinfo/shellscripts_brand.txt | 69 -------------------- .../customactions/shellextensions/layerlinks.cxx | 74 +++------------------- 3 files changed, 10 insertions(+), 134 deletions(-) delete mode 100644 setup_native/source/packinfo/shellscripts_brand.txt (limited to 'setup_native/source') diff --git a/setup_native/source/packinfo/packinfo_brand.txt b/setup_native/source/packinfo/packinfo_brand.txt index 47d57452cbd2..476227771718 100644 --- a/setup_native/source/packinfo/packinfo_brand.txt +++ b/setup_native/source/packinfo/packinfo_brand.txt @@ -27,7 +27,6 @@ Start module = "gid_Module_Root_Brand" -# script = "shellscripts_brand.txt" solarispackagename = "%WITHOUTDOTUNIXPACKAGENAME%BRANDPACKAGEVERSION" packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION" requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure,%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX%OOOBASEVERSION-core03,%BASISPACKAGEPREFIX%OOOBASEVERSION-core04,%BASISPACKAGEPREFIX%OOOBASEVERSION-core05,%BASISPACKAGEPREFIX%OOOBASEVERSION-core06,%BASISPACKAGEPREFIX%OOOBASEVERSION-core07,%BASISPACKAGEPREFIX%OOOBASEVERSION-images" diff --git a/setup_native/source/packinfo/shellscripts_brand.txt b/setup_native/source/packinfo/shellscripts_brand.txt deleted file mode 100644 index 8d52d5752fb1..000000000000 --- a/setup_native/source/packinfo/shellscripts_brand.txt +++ /dev/null @@ -1,69 +0,0 @@ -%preinstall << END -END - -%postinstall << END - -# echo Command after installing -# searching for the PRODUCTINSTALLLOCATION for the different platforms -platform=`uname -s` -case $$platform in -SunOS) - BASISPACKAGE=openofficeorg-core01 - BASISDIR=`pkginfo -r $$BASISPACKAGE` - PRODUCTINSTALLLOCATION="$$BASEDIR" - ;; -Linux) - BASISPACKAGE=libreoffice-core01 - BASISDIR=`rpm -q --queryformat "%{INSTALLPREFIX}" $$BASISPACKAGE` - PRODUCTINSTALLLOCATION="$$RPM_INSTALL_PREFIX" - ;; -*) - PRODUCTINSTALLLOCATION="$$BASEDIR" - ;; -esac - -# creating link to basis layer -if [ -d $$BASISDIR/libreoffice/basisBASISDIRECTORYVERSION ] -then - ln -s $$BASISDIR/libreoffice/basisBASISDIRECTORYVERSION $$PRODUCTINSTALLLOCATION/PRODUCTDIRECTORYNAME/basis-link >/dev/null 2>&1 -else - ln -s ../libreoffice/basisBASISDIRECTORYVERSION $$PRODUCTINSTALLLOCATION/PRODUCTDIRECTORYNAME/basis-link >/dev/null 2>&1 -fi - -exit 0 -END - -%preremove << END -END - -%postremove << END -# echo Command after removing - -LASTUNINSTALL=1 # important for RPM deinstallation - -# searching for the PRODUCTINSTALLLOCATION for the different platforms -platform=`uname -s` -case $$platform in -SunOS) - PRODUCTINSTALLLOCATION="$$BASEDIR" - ;; -Linux) - PRODUCTINSTALLLOCATION="$$RPM_INSTALL_PREFIX" - if [ "$$1" = 1 ] # one package left after deinstallation -> update - then - LASTUNINSTALL=0 - fi - ;; -*) - PRODUCTINSTALLLOCATION="$$BASEDIR" - ;; -esac - -if [ -h $$PRODUCTINSTALLLOCATION/PRODUCTDIRECTORYNAME/basis-link -a $$LASTUNINSTALL -eq 1 ] -then - rm -f $$PRODUCTINSTALLLOCATION/PRODUCTDIRECTORYNAME/basis-link 2>/dev/null - rmdir $$PRODUCTINSTALLLOCATION/PRODUCTDIRECTORYNAME 2>/dev/null -fi - -exit 0 -END diff --git a/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx b/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx index 56885d408b77..28ecbfa20766 100644 --- a/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx +++ b/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx @@ -101,66 +101,20 @@ extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle) { string sInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); - string sOfficeInstallPath = sInstallPath; - string sBasisInstallPath = sInstallPath + TEXT("Basis\\"); - string sUreInstallPath = sInstallPath + TEXT("URE\\"); + string sUreInstallPath = sInstallPath + TEXT("URE"); - string sBasisLinkPath = sInstallPath + TEXT("basis-link"); - string sUreLinkPath = sInstallPath + TEXT("Basis\\ure-link"); + string sUreLinkPath = sInstallPath + TEXT("ure-link"); if ( IsSetMsiProperty(handle, TEXT("ADMININSTALL")) ) { - sBasisInstallPath = TEXT("Basis"); sUreInstallPath = TEXT("..\\URE"); } - stripFinalBackslash(&sBasisInstallPath); stripFinalBackslash(&sUreInstallPath); - // creating basis-link in brand layer + // creating ure-link - HANDLE h1file = CreateFile( - sBasisLinkPath.c_str(), - GENERIC_WRITE, - 0, - NULL, - CREATE_NEW, - FILE_ATTRIBUTE_NORMAL, - NULL); - - if (IsValidHandle(h1file)) - { - DWORD dummy; - - // Converting string into UTF-8 encoding and writing into file "basis-link" - - int nCharsRequired = MultiByteToWideChar( CP_ACP, 0, sBasisInstallPath.c_str(), -1, NULL, 0 ); - if ( nCharsRequired ) - { - LPWSTR lpPathW = new WCHAR[nCharsRequired]; - if ( MultiByteToWideChar( CP_ACP, 0, sBasisInstallPath.c_str(), -1, lpPathW, nCharsRequired ) ) - { - nCharsRequired = WideCharToMultiByte( CP_UTF8, 0, lpPathW, -1, NULL, 0, NULL, NULL ); - if ( nCharsRequired ) - { - LPSTR lpPathUTF8 = new CHAR[nCharsRequired]; - WideCharToMultiByte( CP_UTF8, 0, lpPathW, -1, lpPathUTF8, nCharsRequired, NULL, NULL ); - - WriteFile( h1file, lpPathUTF8, strlen(lpPathUTF8) ,&dummy, 0 ); - - delete lpPathUTF8; - } - } - - delete lpPathW; - } - - CloseHandle(h1file); - } - - // creating ure-link in basis layer - - HANDLE h2file = CreateFile( + HANDLE hfile = CreateFile( sUreLinkPath.c_str(), GENERIC_WRITE, 0, @@ -169,11 +123,11 @@ extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle) FILE_ATTRIBUTE_NORMAL, NULL); - if (IsValidHandle(h2file)) + if (IsValidHandle(hfile)) { DWORD dummy; - // Converting string into UTF-8 encoding and writing into file "basis-link" + // Converting string into UTF-8 encoding and writing into file "ure-link" int nCharsRequired = MultiByteToWideChar( CP_ACP, 0, sUreInstallPath.c_str(), -1, NULL, 0 ); if ( nCharsRequired ) @@ -187,7 +141,7 @@ extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle) LPSTR lpPathUTF8 = new CHAR[nCharsRequired]; WideCharToMultiByte( CP_UTF8, 0, lpPathW, -1, lpPathUTF8, nCharsRequired, NULL, NULL ); - WriteFile( h2file, lpPathUTF8, strlen(lpPathUTF8) ,&dummy, 0 ); + WriteFile( hfile, lpPathUTF8, strlen(lpPathUTF8) ,&dummy, 0 ); delete lpPathUTF8; } @@ -196,7 +150,7 @@ extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle) delete lpPathW; } - CloseHandle(h2file); + CloseHandle(hfile); } return ERROR_SUCCESS; @@ -206,16 +160,8 @@ extern "C" UINT __stdcall RemoveLayerLinks(MSIHANDLE handle) { string sInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); - string sOfficeInstallPath = sInstallPath; - string sBasisInstallPath = sInstallPath + TEXT("Basis\\"); - string sUreInstallPath = sInstallPath + TEXT("URE\\"); - - string sBasisLinkPath = sOfficeInstallPath + TEXT("basis-link"); - string sUreLinkPath = sBasisInstallPath + TEXT("ure-link"); - string sUreDirName = sUreInstallPath + TEXT("bin"); - - // Deleting link to basis layer - DeleteFile(sBasisLinkPath.c_str()); + string sUreLinkPath = sInstallPath + TEXT("ure-link"); + string sUreDirName = sInstallPath + TEXT("URE\\bin"); // Check, if URE is still installed bool ureDirExists = true; -- cgit