diff options
author | Tor Lillqvist <tlillqvist@novell.com> | 2011-04-26 18:30:17 +0300 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@novell.com> | 2011-04-26 18:33:13 +0300 |
commit | 6b8e02c741b9aa46a3ed952a7dcd9dbbe3f64e60 (patch) | |
tree | 14739b35c45854d99b335465a54c6c47563ab550 | |
parent | 774ab34f391efbc1728ff652e0b504466e084dd0 (diff) |
Kill Sun-specific stclient_wrapper
-rw-r--r-- | setup_native/prj/build.lst | 1 | ||||
-rw-r--r-- | setup_native/prj/d.lst | 2 | ||||
-rw-r--r-- | setup_native/scripts/makefile.mk | 4 | ||||
-rw-r--r-- | setup_native/scripts/stclient_wrapper.sh | 66 | ||||
-rw-r--r-- | setup_native/source/win32/stwrapper/makefile.mk | 47 | ||||
-rw-r--r-- | setup_native/source/win32/stwrapper/resource.rc | 102 | ||||
-rw-r--r-- | setup_native/source/win32/stwrapper/stwrapper.cxx | 496 | ||||
-rw-r--r-- | setup_native/source/win32/stwrapper/stwrapper.manifest | 20 |
8 files changed, 0 insertions, 738 deletions
diff --git a/setup_native/prj/build.lst b/setup_native/prj/build.lst index 7767e773bfd6..8de5498f122e 100644 --- a/setup_native/prj/build.lst +++ b/setup_native/prj/build.lst @@ -18,5 +18,4 @@ pk setup_native\source\win32\customactions\shellextensions nmake - w sn_sh pk setup_native\source\win32\customactions\indexingfilter nmake - w sn_indexingfilter NULL pk setup_native\source\win32\customactions\languagepacks nmake - w sn_languagepacks sn_shellextensions.w sn_tools.w NULL pk setup_native\source\win32\customactions\patch nmake - w sn_patch sn_languagepacks.w sn_shellextensions.w sn_quickstarter.w sn_tools.w NULL -pk setup_native\source\win32\stwrapper nmake - w sn_stwrapper NULL pk setup_native\source\ulfconv nmake - all sn_ulfconv NULL diff --git a/setup_native/prj/d.lst b/setup_native/prj/d.lst index d0443cf8657e..b571e6b79ee7 100644 --- a/setup_native/prj/d.lst +++ b/setup_native/prj/d.lst @@ -18,8 +18,6 @@ mkdir: %_DEST%\bin%_EXT%\osolsmf ..\%__SRC%\bin\unpack_update.sh %_DEST%\bin%_EXT%\unpack_update ..\%__SRC%\bin\update.sh %_DEST%\bin%_EXT%\update ..\%__SRC%\bin\javaloader.sh %_DEST%\bin%_EXT%\javaloader.sh -..\%__SRC%\bin\stclient_wrapper.sh %_DEST%\bin%_EXT%\stclient_wrapper -..\%__SRC%\bin\stclient_wrapper.exe %_DEST%\bin%_EXT%\stclient_wrapper.exe ..\%__SRC%\misc\mac_ulffiles_dest\*.ulf %_DEST%\bin%_EXT%\*.ulf ..\source\win32\msi-encodinglist.txt %_DEST%\bin%_EXT%\msi-encodinglist.txt ..\source\win32\patchlist.txt %_DEST%\bin%_EXT%\patchlist.txt diff --git a/setup_native/scripts/makefile.mk b/setup_native/scripts/makefile.mk index de91bd011efe..61dc0b786bf3 100644 --- a/setup_native/scripts/makefile.mk +++ b/setup_native/scripts/makefile.mk @@ -46,10 +46,6 @@ UNIXTEXT= \ $(BIN)$/update.sh \ $(BIN)$/downloadscript.sh -.IF "$(OS)" == "SOLARIS" || "$(OS)" == "LINUX" -UNIXTEXT+= $(BIN)$/stclient_wrapper.sh -.ENDIF - NOARCH=$(BIN)$/noarch FAKEDB=$(NOARCH)/fake-db-1.0-0.noarch.rpm FAKEDBROOT=$(COMMONMISC)/$(TARGET)/fake-db-root diff --git a/setup_native/scripts/stclient_wrapper.sh b/setup_native/scripts/stclient_wrapper.sh deleted file mode 100644 index 52ff8abcb0ee..000000000000 --- a/setup_native/scripts/stclient_wrapper.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# All rights reserved. -# - -if [ `uname -s` = "SunOS" ]; then - STCLIENT=/usr/bin/stclient -else - STCLIENT=/opt/sun/servicetag/bin/stclient -fi - -TARGET_URN= -PRODUCT_NAME= -PRODUCT_VERSION= -PRODUCT_SOURCE= -PARENT_PRODUCT_NAME= -INSTANCE_URN= - -while [ $# -gt 0 ] -do - case "$1" in - -t) TARGET_URN="$2"; shift;; - -p) PRODUCT_NAME="$2"; shift;; - -e) PRODUCT_VERSION="$2"; shift;; - -i) INSTANCE_URN="$2"; shift;; - -P) PARENT_PRODUCT_NAME="$2"; shift;; - -S) PRODUCT_SOURCE="$2"; shift;; - --) shift; break;; - -*) - echo >&2 \ - "usage: $0 -p <product name> -e <product version> -t <urn> -S <source> -P <parent product name> [-i <instance urn>]" - exit 1;; - *) break;; - esac - shift -done - -[ -x "$STCLIENT" ] || exit 1 - -# test if already registered -if [ ! -n $INSTANCE_URN ]; then - TEST=`${STCLIENT} -f -t ${TARGET_URN}`; EXITCODE=$? - - # retry on unexpected error codes - [ ${EXITCODE} -eq 0 -o ${EXITCODE} -eq 225 ] || exit 1 - - # early versions did not have a dedicated exitcode, so need to compare text output - [ ${EXITCODE} -eq 225 -o "${TEST}" = "No records found" ] || echo "${TEST}"; exit 0 -fi - -uname=`uname -p` -zone="global" - -if [ `uname -s` = "SunOS" ]; then - if [ -x /usr/bin/zonename ]; then - zone=`/usr/bin/zonename` - fi -fi - -output=`"${STCLIENT}" -a -p "${PRODUCT_NAME}" -e "${PRODUCT_VERSION}" -t ${TARGET_URN} -S "${PRODUCT_SOURCE}" -P "${PARENT_PRODUCT_NAME}" ${INSTANCE_URN:+"-i"} ${INSTANCE_URN} -m "Sun Microsystems, Inc." -A "${uname}" -z "${zone}"`; EXITCODE=$? - -[ "${INSTANCE_URN}" = "" -a ${EXITCODE} -eq 226 ] && exit 0 - -exit ${EXITCODE} - diff --git a/setup_native/source/win32/stwrapper/makefile.mk b/setup_native/source/win32/stwrapper/makefile.mk deleted file mode 100644 index f81d86dc2f19..000000000000 --- a/setup_native/source/win32/stwrapper/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -PRJ=..$/..$/.. - -PRJNAME=setup_native -TARGET=stclient_wrapper -LIBTARGET=NO -ENABLE_EXCEPTIONS=TRUE -TARGETTYPE=GUI -USE_DEFFILE=TRUE -NO_DEFAULT_STL=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Resources ---------------------------------------------------- - -RCFILES=resource.rc - -# --- Files -------------------------------------------------------- - -OBJFILES=\ - $(OBJ)$/stwrapper.obj - -APP1OBJS=$(OBJ)$/stwrapper.obj - -APP1NOSAL=TRUE - -APP1TARGET=$(TARGET) - -APP1NOSVRES=$(RES)$/$(TARGET).res - -UWINAPILIB:= - -STDLIB1=\ - $(GDI32LIB)\ - $(COMCTL32LIB)\ - $(COMDLG32LIB)\ - $(ADVAPI32LIB)\ - $(SHELL32LIB) - -DLLPRE = - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -$(OBJ)$/stwrapper.obj: $(INCCOM)$/_version.h diff --git a/setup_native/source/win32/stwrapper/resource.rc b/setup_native/source/win32/stwrapper/resource.rc deleted file mode 100644 index 8683faac0d4a..000000000000 --- a/setup_native/source/win32/stwrapper/resource.rc +++ /dev/null @@ -1,102 +0,0 @@ -#define VERSION 1 -#define SUBVERSION 0 -//#define VERVARIANT 0 -// .0 + VER_CONCEPT -// .100 + VER_ALPHA -// .200 + VER_BETA -// .300 + VER_GAMMA -// .500 + VER_FINAL -//#define VER_CONCEPT 0 -//#define VER_BETA 6 -#define VER_FINAL 0 - -#define VER_DAY 1 -#define VER_MONTH 4 -#define VER_YEAR 09 - - -// Header -#if defined(_MSC_VER) && (_MSC_VER < 1500) -#include "winres.h" -#else -#define WINVER 0x0500 -#include "winresrc.h" -#endif -#include "verinfo.hrc" - -#define VER_FIRSTYEAR 07 - -#if !defined(ENGLISH) -#define LG_D // generate always german version -#endif - -// ----------------------------------------------------------------------- -// language/character set specification table -// ----------------------------------------------------------------------- - -RCD_LANGUAGE rcdata -{ - "040904B0", // USA -> Unicode - "040904E4", // USA -> Windows, Multilingual - "04090000", // USA -> 7-Bit-ASCII - 0 // end of table -} - -// ----------------------------------------------------------------------- -// version information -// ----------------------------------------------------------------------- - -VS_VERSION_INFO versioninfo - fileversion VERSION, SUBVERSION, VERVARIANT, VER_COUNT - productversion VERSION, SUBVERSION, VERVARIANT, VER_COUNT - fileflagsmask 0x3F - fileflags -#if defined(DEBUG) - VS_FF_DEBUG | -#endif -#ifdef VER_PREL - VS_FF_PRERELEASE | -#endif - 0 -#ifndef WIN32 - fileos VOS_DOS_WINDOWS16 -#else - fileos VOS_NT_WINDOWS32 -#endif - filetype VFT_APP - { - block "StringFileInfo" - { - block "040904E4" - { - // International StringTable - value "CompanyName", "The Document Foundation\0" - value "FileDescription", "Service Tags Wrapper\0" - value "FileVersion", PPS(VER_LEVEL) "\0" - value "ProductVersion", PPS(VER_LEVEL) "\0" - value "OriginalFilename", "STCLIENT_WRAPPER.EXE\0" - value "InternalName", "stclient_wrapper\0" - value "LegalCopyright", S_CRIGHT " Sun Microsystems, Inc.\0" - } - } - - block "VarFileInfo" - { - value "Translation", 0x0409, 1252 - } - } - -// version binary entry -VS_VERSION_INFO rcdata -{ - 0xF0, "sw", 0x0F, VER_YEAR, VER_MONTH, VER_DAY, - VERSION, SUBVERSION, VERVARIANT, VER_COUNT -}; - - -///////////////////////////////////////////////////////////////////////////// -// -// Manifest section -// -1 24 stwrapper.manifest - diff --git a/setup_native/source/win32/stwrapper/stwrapper.cxx b/setup_native/source/win32/stwrapper/stwrapper.cxx deleted file mode 100644 index 2376c94bf952..000000000000 --- a/setup_native/source/win32/stwrapper/stwrapper.cxx +++ /dev/null @@ -1,496 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -#define WIN32_LEAN_AND_MEAN - -#ifdef _MSC_VER -#pragma warning(disable:4668 4917) // disable warnings for system headers -#endif - -#include <windows.h> -#include <windowsx.h> -#include <shellapi.h> -#include <shlobj.h> -#include <tchar.h> - -#include <stdio.h> -#include <sal/macros.h> - -enum PathResult -{ - PATHRESULT_OK, - PATHRESULT_API_NOT_SUPPORTED, - PATHRESULT_EXE_NOT_FOUND -}; - -const int MAXCMDLINELEN = 32768; - -static TCHAR g_szSTInstallationPath[MAX_PATH] = TEXT(""); -static TCHAR g_szOperatingSystem[256] = TEXT(""); - -static const TCHAR g_szSTExecutable[256] = TEXT("stclient.exe"); - -//*************************************************************************** - -LONG RegReadValue( HKEY hBaseKey, LPCTSTR lpSubKey, LPCTSTR lpValueName, LPVOID lpData, DWORD cbData ) -{ - HKEY hKey = NULL; - LONG lResult( 0 ); - - lResult = RegOpenKeyEx( hBaseKey, lpSubKey, 0, KEY_QUERY_VALUE, &hKey ); - - if ( ERROR_SUCCESS == lResult ) - { - lResult = RegQueryValueEx( hKey, lpValueName, NULL, NULL, (LPBYTE)lpData, &cbData ); - RegCloseKey( hKey ); - } - - return lResult; -} - -//*************************************************************************** - -static LPTSTR *GetCommandArgs( int *pArgc ) -{ -#ifdef UNICODE - return CommandLineToArgvW( GetCommandLineW(), pArgc ); -#else - *pArgc = __argc; - return __argv; -#endif -} - -//*************************************************************************** - -static bool IsSupportedPlatform() -{ - OSVERSIONINFO aOsVersion; - - ZeroMemory( &aOsVersion, sizeof( OSVERSIONINFO )); - aOsVersion.dwOSVersionInfoSize = sizeof( OSVERSIONINFO ); - - // Try to determine OS version - if ( GetVersionEx( &aOsVersion )) - { - switch ( aOsVersion.dwPlatformId ) - { - case VER_PLATFORM_WIN32_NT: // Windows NT based - return true; - - case VER_PLATFORM_WIN32_WINDOWS: // Windows Me/98/95. - case VER_PLATFORM_WIN32s: // Win32s - return false; - - default: - return false; - } - } - - return false; -} - -//*************************************************************************** - -static LPCTSTR GetOperatingSystemString() -{ - OSVERSIONINFO aOsVersion; - - ZeroMemory( &aOsVersion, sizeof( OSVERSIONINFO )); - aOsVersion.dwOSVersionInfoSize = sizeof( OSVERSIONINFO ); - - _tcscpy( g_szOperatingSystem, TEXT( "Microsoft Windows" )); - - // Try to determine OS version - if ( GetVersionEx( &aOsVersion )) - { - switch ( aOsVersion.dwPlatformId ) - { - // Test for the Windows NT product family. - case VER_PLATFORM_WIN32_NT: - { - if ( aOsVersion.dwMajorVersion == 3 ) - { - _tcscat( g_szOperatingSystem, TEXT( " NT 3." )); - if ( aOsVersion.dwMinorVersion == 0 ) - _tcscat( g_szOperatingSystem, TEXT( "0" )); - else if ( aOsVersion.dwMinorVersion == 5 ) - _tcscat( g_szOperatingSystem, TEXT( "5" )); - else if ( aOsVersion.dwMinorVersion == 51 ) - _tcscat( g_szOperatingSystem, TEXT( "51" )); - } - else if ( aOsVersion.dwMajorVersion == 4 ) - _tcscat( g_szOperatingSystem, TEXT( " NT 4.0" )); - else if ( aOsVersion.dwMajorVersion == 5 ) - { - if ( aOsVersion.dwMinorVersion == 0 ) - _tcscat( g_szOperatingSystem, TEXT( " 2000" )); - else if ( aOsVersion.dwMinorVersion == 1 ) - _tcscat( g_szOperatingSystem, TEXT( " XP" )); - else if ( aOsVersion.dwMinorVersion == 2 ) - _tcscat( g_szOperatingSystem, TEXT( " Server 2003" )); - } - else if ( aOsVersion.dwMajorVersion == 6 ) - { - if ( aOsVersion.dwMinorVersion == 0 ) - _tcscat( g_szOperatingSystem, " Vista" ); - } - } - break; - - // Test for the Windows Me/98/95. - case VER_PLATFORM_WIN32_WINDOWS: - { - if ( aOsVersion.dwMinorVersion == 0 ) - _tcscat( g_szOperatingSystem, TEXT( " 95" )); - else if ( aOsVersion.dwMinorVersion == 10 ) - _tcscat( g_szOperatingSystem, TEXT( " 98" )); - else if ( aOsVersion.dwMinorVersion == 90 ) - _tcscat( g_szOperatingSystem, TEXT( " Me" )); - } - break; - } - } - - return g_szOperatingSystem; -} - -//*************************************************************************** - -static bool FileExists( LPCTSTR lpPathToFile ) -{ - bool bResult = false; - HANDLE hFind; - WIN32_FIND_DATA FindFileData; - - hFind = FindFirstFile( lpPathToFile, &FindFileData ); - - if ( hFind != INVALID_HANDLE_VALUE ) - { - FindClose( hFind ); - bResult = true; - } - - return bResult; -} - -//*************************************************************************** - -static bool GetProgramFilesFolder( LPTSTR strPath ) -{ - bool bRet = false; - HINSTANCE hLibrary; - - if (( hLibrary = LoadLibrary( "shell32.dll" )) != NULL ) - { - BOOL (WINAPI *pSHGetSpecialFolderPathA)( HWND, LPSTR, int, BOOL ); - - pSHGetSpecialFolderPathA = (BOOL (WINAPI *)(HWND, LPSTR, int, BOOL))GetProcAddress( hLibrary, "SHGetSpecialFolderPathA" ); - - if ( pSHGetSpecialFolderPathA ) - { - if ( pSHGetSpecialFolderPathA( NULL, strPath, CSIDL_PROGRAM_FILES, TRUE )) - bRet = true; - } - } - - FreeLibrary( hLibrary ); - - return ( bRet ); -} - -//*************************************************************************** - -static PathResult RetrieveExecutablePath( LPTSTR szExecutablePath ) -{ - PathResult eRet = PATHRESULT_API_NOT_SUPPORTED; - TCHAR szProgramFilesFolder[MAX_PATH]; - - if ( GetProgramFilesFolder( szProgramFilesFolder )) - { - size_t nLen = _tcslen( szProgramFilesFolder ); - if ( nLen > 0 ) - { - _tcscpy( szExecutablePath, szProgramFilesFolder ); - if ( szProgramFilesFolder[nLen-1] != '\\' ) - _tcscat( szExecutablePath, TEXT( "\\" )); - _tcscat( szExecutablePath, TEXT( "Sun\\servicetag\\" )); - _tcscat( szExecutablePath, g_szSTExecutable ); - eRet = FileExists( szExecutablePath ) ? PATHRESULT_OK : PATHRESULT_EXE_NOT_FOUND; - } - } - - return eRet; -} - -//*************************************************************************** - -static void SafeCopy( LPTSTR lpTarget, LPCSTR lpSource, size_t nMaxLen ) -{ - size_t nLen = _tcslen( lpSource ); - size_t nCopy = ( nLen < size_t( nMaxLen-1 )) ? nLen : nMaxLen-1; - _tcsncpy( lpTarget, lpSource, nMaxLen-1 ); - *(lpTarget+nCopy) = 0; -} - -//*************************************************************************** - -int WINAPI _tWinMain( HINSTANCE /*hInstance*/, HINSTANCE, LPTSTR, int ) -{ - const DWORD ERR_NO_RECORDS_FOUND = 225; - const DWORD ERR_DUP_RECORD = 226; - - DWORD dwExitCode = (DWORD)1; - - int nArgs = 0; - LPTSTR* lpArgs = GetCommandArgs( &nArgs ); - - if ( !IsSupportedPlatform() ) - { - // Return 0 for a successful run on not supported platforms - // We don't want that the Office tries to start us forever. - return 0; - } - - if ( nArgs >= 11 ) - { - TCHAR szTargetURN[1024] = {0}; - TCHAR szProductName[1024] = {0}; - TCHAR szProductVersion[1024] = {0}; - TCHAR szParentProductName[1024] = {0}; - TCHAR szProductSource[1024] = {0}; - TCHAR szInstanceURN[1024] = {0}; - -// -i) INSTANCE_URN="$2"; shift;; -// -t) TARGET_URN="$2"; shift;; -// -p) PRODUCT_NAME="$2"; shift;; -// -e) PRODUCT_VERSION="$2"; shift;; -// -P) PARENT_PRODUCT_NAME="$2"; shift;; -// -S) PRODUCT_SOURCE="$2"; shift;; -// "usage: $0 [-i <instance urn>] -p <product name> -e <product version> -t <urn> -S <source> -P <parent product name>" - - int i = 1; - while ( i < nArgs ) - { - LPTSTR lpArg = lpArgs[i]; - if ( _tcslen( lpArg ) >= 2 ) - { - if ( lpArg[0] == '-' ) - { - switch ( lpArg[1] ) - { - case 'i': - { - if ( i < nArgs ) - ++i; - SafeCopy( szInstanceURN, lpArgs[i], SAL_N_ELEMENTS( szInstanceURN )); - break; - } - - case 't': - { - if ( i < nArgs ) - ++i; - SafeCopy( szTargetURN, lpArgs[i], SAL_N_ELEMENTS( szTargetURN )); - break; - } - case 'p': - { - if ( i < nArgs ) - ++i; - SafeCopy( szProductName, lpArgs[i], SAL_N_ELEMENTS( szProductName )); - break; - } - case 'e': - { - if ( i < nArgs ) - ++i; - SafeCopy( szProductVersion, lpArgs[i], SAL_N_ELEMENTS( szProductVersion )); - break; - } - case 'P': - { - if ( i < nArgs ) - ++i; - SafeCopy( szParentProductName, lpArgs[i], SAL_N_ELEMENTS( szParentProductName )); - break; - } - case 'S': - { - if ( i < nArgs ) - ++i; - SafeCopy( szProductSource, lpArgs[i], SAL_N_ELEMENTS( szProductSource )); - break; - } - - default: - break; - } // switch - } - } - - ++i; - } - - if ( RetrieveExecutablePath( g_szSTInstallationPath ) == PATHRESULT_OK ) - { - BOOL bSuccess = TRUE; - BOOL bProcessStarted = FALSE; - - STARTUPINFO aStartupInfo; - PROCESS_INFORMATION aProcessInfo; - LPTSTR lpCommandLine = 0; - - ZeroMemory( &aStartupInfo, sizeof( aStartupInfo )); - aStartupInfo.cb = sizeof( aStartupInfo ); - ZeroMemory( &aProcessInfo, sizeof( aProcessInfo )); - - if ( _tcslen( szInstanceURN ) == 0 ) - { - // TEST=`${STCLIENT} -f -t ${TARGET_URN}` - lpCommandLine = new TCHAR[MAXCMDLINELEN]; - - _tcscpy( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, g_szSTInstallationPath ); - _tcscat( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, TEXT( " -f" )); - _tcscat( lpCommandLine, TEXT( " -t ")); - _tcscat( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, szTargetURN ); - _tcscat( lpCommandLine, TEXT( "\"" )); - - bSuccess = CreateProcess( - NULL, - lpCommandLine, - NULL, - NULL, - TRUE, - CREATE_NO_WINDOW, - NULL, - NULL, - &aStartupInfo, - &aProcessInfo ); - - bProcessStarted = TRUE; - - // wait until process ends to receive exit code - WaitForSingleObject( aProcessInfo.hProcess, INFINITE ); - - delete []lpCommandLine; - } - - if ( bSuccess ) - { - DWORD dwSTClientExitCode( ERR_NO_RECORDS_FOUND ); - if ( bProcessStarted ) - { - GetExitCodeProcess( aProcessInfo.hProcess, &dwSTClientExitCode ); - dwSTClientExitCode &= 0x000000ff; - - CloseHandle( aProcessInfo.hProcess ); - CloseHandle( aProcessInfo.hThread ); - } - - if ( dwSTClientExitCode == ERR_NO_RECORDS_FOUND ) - { - lpCommandLine = new TCHAR[MAXCMDLINELEN]; - - _tcscpy( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, g_szSTInstallationPath ); - _tcscat( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, TEXT( " -a" )); - if ( _tcslen( szInstanceURN ) > 0 ) - { - _tcscat( lpCommandLine, TEXT( " -i " )); - _tcscat( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, szInstanceURN ); - _tcscat( lpCommandLine, TEXT( "\"" )); - } - _tcscat( lpCommandLine, TEXT( " -p " )); - _tcscat( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, szProductName ); - _tcscat( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, TEXT( " -e " )); - _tcscat( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, szProductVersion ); - _tcscat( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, TEXT( " -t " )); - _tcscat( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, szTargetURN ); - _tcscat( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, TEXT( " -S " )); - _tcscat( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, szProductSource ); - _tcscat( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, TEXT( " -P " )); - _tcscat( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, szParentProductName ); - _tcscat( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, TEXT( " -m \"The Document Foundation\"" )); - _tcscat( lpCommandLine, TEXT( " -A " )); - _tcscat( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, GetOperatingSystemString() ); - _tcscat( lpCommandLine, TEXT( "\"" )); - _tcscat( lpCommandLine, TEXT( " -z global" )); - - ZeroMemory( &aStartupInfo, sizeof( aStartupInfo )); - aStartupInfo.cb = sizeof(aStartupInfo); - ZeroMemory( &aProcessInfo, sizeof( aProcessInfo )); - - bSuccess = CreateProcess( - NULL, - lpCommandLine, - NULL, - NULL, - TRUE, - CREATE_NO_WINDOW, - NULL, - NULL, - &aStartupInfo, - &aProcessInfo ); - - delete []lpCommandLine; - - // wait until process ends to receive exit code - WaitForSingleObject( aProcessInfo.hProcess, INFINITE ); - - dwSTClientExitCode = 0; - GetExitCodeProcess( aProcessInfo.hProcess, &dwSTClientExitCode ); - dwSTClientExitCode &= 0x000000ff; - - CloseHandle( aProcessInfo.hProcess ); - CloseHandle( aProcessInfo.hThread ); - - if ( !bSuccess ) - dwExitCode = 1; // couldn't start stclient process - else - { - if ( _tcslen( szInstanceURN ) > 0 ) - { - // don't register again if we registered in a previous run - // or we called stclient successfully. - if (( dwSTClientExitCode == ERR_DUP_RECORD ) || - ( dwSTClientExitCode == 0 )) - dwExitCode = 0; - else - dwExitCode = 1; // other errors - } - else - dwExitCode = ( dwSTClientExitCode == 0 ) ? 0 : 1; - } - } - else if ( dwSTClientExitCode == 0 ) - dwExitCode = 0; // already registered - else - dwExitCode = 1; // other errors - } - else - dwExitCode = 1; // couldn't start stclient - } - else - dwExitCode = 1; // no executable found - } - else - dwExitCode = 0; // wrong number of arguments - - return dwExitCode; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/setup_native/source/win32/stwrapper/stwrapper.manifest b/setup_native/source/win32/stwrapper/stwrapper.manifest deleted file mode 100644 index ec639e45cb04..000000000000 --- a/setup_native/source/win32/stwrapper/stwrapper.manifest +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<!-- Copyright © 1981-2001 Microsoft Corporation --> -<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> - <assemblyIdentity - type="win32" - name="Service Tags Wrapper" - version="1.0.0.0" - processorArchitecture="x86" - /> - <description>OpenOffice.org Installer</description> - <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> - <security> - <requestedPrivileges> - <requestedExecutionLevel level="asInvoker" /> - </requestedPrivileges> - </security> - </trustInfo> - <dependency> - </dependency> -</assembly> |