summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@novell.com>2011-07-21 23:35:15 +0300
committerTor Lillqvist <tlillqvist@novell.com>2011-07-21 23:36:04 +0300
commitebae552c79738d563bbcc8d5ec9084e755e6e1a6 (patch)
tree19d062cac384795c56d9cd20982432611e53c85d
parentf1cf998aa5a57768602e7c41a402837b33ced5c8 (diff)
We don't ship the rebase executables so bin the sources too
-rw-r--r--desktop/prj/build.lst3
-rw-r--r--desktop/prj/d.lst2
-rwxr-xr-xdesktop/win32/source/rebase/Resource.h41
-rwxr-xr-xdesktop/win32/source/rebase/makefile.mk89
-rwxr-xr-xdesktop/win32/source/rebase/rcfooter.txt2
-rwxr-xr-xdesktop/win32/source/rebase/rcheader.txt39
-rwxr-xr-xdesktop/win32/source/rebase/rctmpl.txt9
-rw-r--r--desktop/win32/source/rebase/rebase.cxx191
-rw-r--r--desktop/win32/source/rebase/rebasegui.cxx200
-rwxr-xr-xdesktop/win32/source/rebase/rebasegui.ulf11
10 files changed, 1 insertions, 586 deletions
diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst
index 4e59c5f215..a2c6f0ac6f 100644
--- a/desktop/prj/build.lst
+++ b/desktop/prj/build.lst
@@ -15,7 +15,6 @@ dt desktop\win32\source\guiloader nmake - w dt_guiloader dt_wrapper.w dt_inc N
dt desktop\win32\source\guistdio nmake - w dt_guistdio dt_inc NULL
dt desktop\win32\source\applauncher nmake - w dt_applauncher dt_inc NULL
dt desktop\win32\source\applauncher\ooo nmake - w dt_applauncher_ooo dt_applauncher.w dt_inc NULL
-dt desktop\win32\source\rebase nmake - w dt_rebase dt_inc NULL
dt desktop\win32\source\QuickStart nmake - w dt_win32_quickstart NULL
dt desktop\win32\source\QuickStart\so nmake - w dt_win32_quickstart_so dt_win32_quickstart.w NULL
@@ -39,7 +38,7 @@ dt desktop\source\deployment\registry\configuration nmake - all dt_dp_registry_c
dt desktop\source\deployment\registry\help nmake - all dt_dp_registry_help dt_inc NULL
dt desktop\source\deployment\registry\executable nmake - all dt_dp_registry_executable dt_inc NULL
dt desktop\scripts nmake - u dt_scripts dt_inc NULL
-dt desktop\util nmake - all dt_util dt_app dt_pagein.u dt_spl dt_uwrapper.u dt_usplash.u dt_wrapper.w dt_officeloader.w dt_officeloader_unx.u dt_migr dt_rebase.w dt_win32_quickstart_so.w dt_zipintro NULL
+dt desktop\util nmake - all dt_util dt_app dt_pagein.u dt_spl dt_uwrapper.u dt_usplash.u dt_wrapper.w dt_officeloader.w dt_officeloader_unx.u dt_migr dt_win32_quickstart_so.w dt_zipintro NULL
dt desktop\zipintro nmake - all dt_zipintro NULL
dt desktop\registry\data\org\openoffice\Office nmake - all sn_regconfig NULL
dt desktop\qa\deployment_misc nmake - all sn_qa_deployment_misc dt_dp_misc dt_inc NULL
diff --git a/desktop/prj/d.lst b/desktop/prj/d.lst
index 6287afa02e..008ade9ff6 100644
--- a/desktop/prj/d.lst
+++ b/desktop/prj/d.lst
@@ -85,8 +85,6 @@ mkdir: %_DEST%\bin\odf4ms
..\%__SRC%\bin\unopkga*.dll %_DEST%\bin\unopkga*.dll
..\%__SRC%\lib\libunopkgapp.dylib %_DEST%\lib\libunopkgapp.dylib
..\%__SRC%\lib\libunopkgapp.so %_DEST%\lib\libunopkgapp.so
-..\%__SRC%\bin\rebasegui.exe %_DEST%\bin\rebasegui.exe
-..\%__SRC%\bin\rebaseoo.exe %_DEST%\bin\rebaseoo.exe
..\%__SRC%\bin\pagein %_DEST%\bin\pagein
..\%__SRC%\misc\pagein-* %_DEST%\bin\pagein-*
diff --git a/desktop/win32/source/rebase/Resource.h b/desktop/win32/source/rebase/Resource.h
deleted file mode 100755
index 8c892111c9..0000000000
--- a/desktop/win32/source/rebase/Resource.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _RESOURCE_H
-#define _RESOURCE_H
-
-#define IDS_APP_TITLE 10
-#define IDS_MSG_OPTIMIZED_FOR_CLIENT 11
-#define IDS_MSG_OPTIMIZED_FOR_SERVER 12
-#define IDS_MSG_NO_INSTALLATION_FOUND 13
-
-#define IDI_REBASEGUI 99
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/rebase/makefile.mk b/desktop/win32/source/rebase/makefile.mk
deleted file mode 100755
index 724ea0edf4..0000000000
--- a/desktop/win32/source/rebase/makefile.mk
+++ /dev/null
@@ -1,89 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=desktop
-TARGET=rebasegui
-LIBTARGET=NO
-TARGETTYPE=GUI
-UWINAPILIB=
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-OBJFILES = \
- $(OBJ)$/rebase.obj \
- $(OBJ)$/rebasegui.obj
-
-ULFFILES= rebasegui.ulf
-
-.IF "$(WITH_LANG)"!=""
-ULFDIR:=$(COMMONMISC)$/$(TARGET)
-.ELSE # "$(WITH_LANG)"!=""
-ULFDIR:=.
-.ENDIF # "$(WITH_LANG)"!=""
-
-RCFILES= $(RES)$/$(TARGET).rc
-
-# --- Targets ------------------------------------------------------
-
-APP1NOSAL= TRUE
-APP1TARGET= rebaseoo
-
-APP1STDLIBS= $(SHELL32LIB) $(SOLARLIBDIR)$/pathutils-obj.obj
-.IF "$(COM)"=="GCC"
- APP1STDLIBS+=$(PSDK_HOME)$/lib$/imagehlp.lib
-.ELSE
- APP1STDLIBS+=imagehlp.lib
-.ENDIF
-
-APP1OBJS= $(OBJ)$/rebase.obj
-
-APP1RPATH= BRAND
-
-APP2NOSAL= TRUE
-APP2TARGET= rebasegui
-APP2STDLIBS= $(SHELL32LIB) $(SOLARLIBDIR)$/pathutils-obj.obj
-
-APP2OBJS= $(OBJ)$/rebasegui.obj
-
-APP2DEF= $(MISC)$/$(TARGET).def
-APP2RPATH= BRAND
-
-APP2RES= $(RES)$/$(TARGET).res
-APP2NOSVRES= $(RES)$/$(TARGET).res
-
-# --- setup --------------------------------------------------------------
-
-.INCLUDE : target.mk
-
-$(RCFILES) : $(ULFDIR)$/rebasegui.ulf makefile.mk rcfooter.txt rcheader.txt rctmpl.txt
- $(LNGCONVEX) -ulf $(ULFDIR)$/rebasegui.ulf -rc $(RCFILES) -rct rctmpl.txt -rch rcheader.txt -rcf rcfooter.txt
diff --git a/desktop/win32/source/rebase/rcfooter.txt b/desktop/win32/source/rebase/rcfooter.txt
deleted file mode 100755
index 3237729437..0000000000
--- a/desktop/win32/source/rebase/rcfooter.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-
-// The end
diff --git a/desktop/win32/source/rebase/rcheader.txt b/desktop/win32/source/rebase/rcheader.txt
deleted file mode 100755
index 56afc53779..0000000000
--- a/desktop/win32/source/rebase/rcheader.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-#if defined(_MSC_VER) && (_MSC_VER < 1500)
-#include <winres.h>
-#else
-#define WINVER 0x0500
-#include <winresrc.h>
-#define IDC_STATIC (-1)
-#endif
-#include "resource.h"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,1,1,0
- PRODUCTVERSION 1,1,1,0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x9L
-#else
- FILEFLAGS 0x8L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x1L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
diff --git a/desktop/win32/source/rebase/rctmpl.txt b/desktop/win32/source/rebase/rctmpl.txt
deleted file mode 100755
index 97a2775e9b..0000000000
--- a/desktop/win32/source/rebase/rctmpl.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-// String Table
-
-STRINGTABLE DISCARDABLE
-BEGIN
- IDS_APP_TITLE %APP_TITLE%
- IDS_MSG_OPTIMIZED_FOR_CLIENT %MSG_OPTIMIZED_FOR_CLIENT%
- IDS_MSG_OPTIMIZED_FOR_SERVER %MSG_OPTIMIZED_FOR_SERVER%
- IDS_MSG_NO_INSTALLATION_FOUND %MSG_NO_INSTALLATION_FOUND%
-END
diff --git a/desktop/win32/source/rebase/rebase.cxx b/desktop/win32/source/rebase/rebase.cxx
deleted file mode 100644
index e712c8d548..0000000000
--- a/desktop/win32/source/rebase/rebase.cxx
+++ /dev/null
@@ -1,191 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "precompiled_desktop.hxx"
-#define UNICODE
-#define _UNICODE
-
-#define WIN32_LEAN_AND_MEAN
-#if defined _MSC_VER
-#pragma warning(push, 1)
-#endif
-#include <windows.h>
-#include <shellapi.h>
-#include <imagehlp.h>
-#include <wchar.h>
-#if defined _MSC_VER
-#pragma warning(pop)
-#endif
-
-#include <time.h>
-#include "sal/config.h"
-#include <sal/macros.h>
-#include "tools/pathutils.hxx"
-
-#define MY_LENGTH(s) (sizeof (s) / sizeof *(s) - 1)
-#define MY_STRING(s) (s), MY_LENGTH(s)
-
-const int FORMAT_MESSAGE_SIZE = 4096;
-const DWORD PE_Signature = 0x00004550;
-const DWORD BASEVIRTUALADDRESS = 0x10000000;
-
-namespace
-{
-
-bool IsValidHandle( HANDLE handle )
-{
- return ((NULL != handle) && (INVALID_HANDLE_VALUE != handle));
-}
-
-void fail()
-{
- LPWSTR buf = NULL;
- FormatMessageW(
- FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL,
- GetLastError(), 0, reinterpret_cast< LPWSTR >(&buf), 0, NULL);
- MessageBoxW(NULL, buf, NULL, MB_OK | MB_ICONERROR);
- LocalFree(buf);
- TerminateProcess(GetCurrentProcess(), 255);
-}
-
-bool rebaseImage( wchar_t* pszFilePath, ULONG nNewImageBase)
-{
- ULONG ulOldImageSize;
- ULONG_PTR lpOldImageBase;
- ULONG ulNewImageSize;
- ULONG_PTR lpNewImageBase = nNewImageBase;
- ULONG ulDateTimeStamp = 0;
- bool bResult(false);
-
- char cszFilePath[_MAX_PATH+1] = {0};
- int nResult = WideCharToMultiByte(CP_ACP, 0, pszFilePath, -1, cszFilePath, _MAX_PATH, NULL, NULL);
-
- if (nResult != 0)
- {
- BOOL bResult = ReBaseImage(
- cszFilePath,
- "",
- TRUE,
- FALSE,
- FALSE,
- 0,
- &ulOldImageSize,
- &lpOldImageBase,
- &ulNewImageSize,
- &lpNewImageBase,
- ulDateTimeStamp );
- }
-
- return bResult;
-}
-
-wchar_t* getBrandPath(wchar_t * path)
-{
- DWORD n = GetModuleFileNameW(NULL, path, MAX_PATH);
- if (n == 0 || n >= MAX_PATH) {
- exit(EXIT_FAILURE);
- }
- return tools::filename(path);
-}
-
-void rebaseImagesInFolder( wchar_t* pszFolder, DWORD nNewImageBase )
-{
- wchar_t szPattern[MAX_PATH];
- wchar_t *lpLastSlash = wcsrchr( pszFolder, '\\' );
- if ( lpLastSlash )
- {
- size_t len = lpLastSlash - pszFolder + 1;
- wcsncpy( szPattern, pszFolder, len );
- wcsncpy( szPattern + len, TEXT("*.dll"), SAL_N_ELEMENTS(szPattern) - len );
- }
-
- WIN32_FIND_DATA aFindFileData;
- HANDLE hFind = FindFirstFile( szPattern, &aFindFileData );
-
- if ( IsValidHandle(hFind) )
- {
- BOOL fSuccess = false;
-
- do
- {
- wchar_t szLibFilePath[MAX_PATH];
- wchar_t *lpLastSlash = wcsrchr( pszFolder, '\\' );
- if ( lpLastSlash )
- {
- size_t len = lpLastSlash - pszFolder + 1;
- wcsncpy( szLibFilePath, pszFolder, len );
- wcsncpy( szLibFilePath + len, aFindFileData.cFileName, SAL_N_ELEMENTS(szLibFilePath) - len );
- }
-
- rebaseImage( szLibFilePath, nNewImageBase );
- fSuccess = FindNextFile( hFind, &aFindFileData );
- }
- while ( fSuccess );
-
- FindClose( hFind );
- }
-}
-
-}
-
-extern "C" int APIENTRY WinMain( HINSTANCE, HINSTANCE, LPSTR, int )
-{
- wchar_t path[MAX_PATH];
-
- wchar_t * pathEnd = getBrandPath(path);
-
- if (tools::buildPath(path, path, pathEnd, MY_STRING(L"")) == NULL)
- fail();
- rebaseImagesInFolder(path, BASEVIRTUALADDRESS);
-
- if (tools::buildPath(path, path, pathEnd, MY_STRING(L"..\\basis-link")) == NULL)
- fail();
- pathEnd = tools::resolveLink(path);
-
- if ( pathEnd == NULL )
- return 0;
-
- if (tools::buildPath(path, path, pathEnd, MY_STRING(L"\\program\\")) == NULL)
- fail();
- rebaseImagesInFolder(path, BASEVIRTUALADDRESS);
-
- if (tools::buildPath(path, path, pathEnd, MY_STRING(L"\\ure-link")) == NULL)
- fail();
- pathEnd = tools::resolveLink(path);
-
- if ( pathEnd == NULL )
- return 0;
-
- if (tools::buildPath(path, path, pathEnd, MY_STRING(L"\\bin\\")) == NULL)
- fail();
- rebaseImagesInFolder(path, BASEVIRTUALADDRESS);
-
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/rebase/rebasegui.cxx b/desktop/win32/source/rebase/rebasegui.cxx
deleted file mode 100644
index e1bb148c2b..0000000000
--- a/desktop/win32/source/rebase/rebasegui.cxx
+++ /dev/null
@@ -1,200 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "precompiled_desktop.hxx"
-
-#define UNICODE 1
-#define _UNICODE 1
-
-#ifndef _WINDOWS_
-# define WIN32_LEAN_AND_MEAN
-#if defined _MSC_VER
-#pragma warning(push, 1)
-#endif
-# include <windows.h>
-# include <shellapi.h>
-# include <wchar.h>
-#if defined _MSC_VER
-#pragma warning(pop)
-#endif
-#endif
-
-#include "Resource.h"
-#include <time.h>
-#include "sal/config.h"
-#include "tools/pathutils.hxx"
-
-const DWORD PE_Signature = 0x00004550;
-
-#define MY_LENGTH(s) (sizeof (s) / sizeof *(s) - 1)
-#define MY_STRING(s) (s), MY_LENGTH(s)
-#define MAX_STR_CAPTION 256
-#define MAX_TEXT_LENGTH 1024
-
-static void failPath(wchar_t* pszAppTitle, wchar_t* pszMsg)
-{
- MessageBoxW(NULL, pszMsg, pszAppTitle, MB_OK | MB_ICONERROR);
- TerminateProcess(GetCurrentProcess(), 255);
-}
-
-static void fail()
-{
- LPWSTR buf = NULL;
- FormatMessageW(
- FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL,
- GetLastError(), 0, reinterpret_cast< LPWSTR >(&buf), 0, NULL);
- MessageBoxW(NULL, buf, NULL, MB_OK | MB_ICONERROR);
- LocalFree(buf);
- TerminateProcess(GetCurrentProcess(), 255);
-}
-
-static LPVOID getVirtualBaseAddress( wchar_t* pszFilePath )
-{
- HANDLE hFile;
- HANDLE hFileMapping;
- LPVOID lpFileBase = 0;
- PIMAGE_DOS_HEADER lpDosHeader;
- PIMAGE_NT_HEADERS lpNTHeader;
-
- hFile = CreateFile(pszFilePath,
- GENERIC_READ, FILE_SHARE_READ, NULL,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
- 0);
-
- if ( hFile == INVALID_HANDLE_VALUE )
- {
- return NULL;
- }
-
- hFileMapping = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
- if ( hFileMapping == 0 )
- {
- CloseHandle(hFile);
- return NULL;
- }
-
- lpFileBase = MapViewOfFile(hFileMapping, FILE_MAP_READ, 0, 0, 0);
- if ( lpFileBase == 0 )
- {
- CloseHandle(hFileMapping);
- CloseHandle(hFile);
- return NULL;
- }
-
- lpDosHeader = (PIMAGE_DOS_HEADER)lpFileBase;
- if ( lpDosHeader->e_magic == IMAGE_DOS_SIGNATURE )
- {
- lpNTHeader = (PIMAGE_NT_HEADERS)((char*)lpDosHeader + lpDosHeader->e_lfanew);
- if (lpNTHeader->Signature == PE_Signature )
- lpFileBase = reinterpret_cast<LPVOID>( lpNTHeader->OptionalHeader.ImageBase );
- }
-
- UnmapViewOfFile(lpFileBase);
- CloseHandle(hFileMapping);
- CloseHandle(hFile);
-
- return lpFileBase;
-}
-
-static bool checkImageVirtualBaseAddress(wchar_t* pszFilePath, LPVOID lpVBA)
-{
- LPVOID lpImageVBA = getVirtualBaseAddress(pszFilePath);
- if ( lpImageVBA == lpVBA )
- return true;
- else
- return false;
-}
-
-static wchar_t* getBrandPath(wchar_t * pszPath)
-{
- DWORD n = GetModuleFileNameW(NULL, pszPath, MAX_PATH);
- if (n == 0 || n >= MAX_PATH) {
- exit(EXIT_FAILURE);
- }
- return tools::filename(pszPath);
-}
-
-extern "C" int APIENTRY WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, int )
-{
- wchar_t* pAppTitle = new wchar_t[ MAX_STR_CAPTION ];
- pAppTitle[0] = '\0';
- LoadString( hInst, IDS_APP_TITLE, pAppTitle, MAX_STR_CAPTION );
-
- wchar_t* pTextServer = new wchar_t[ MAX_TEXT_LENGTH ];
- pTextServer[0] = '\0';
- LoadString( hInst, IDS_MSG_OPTIMIZED_FOR_SERVER, pTextServer, MAX_TEXT_LENGTH );
-
- wchar_t* pTextClient = new wchar_t[ MAX_TEXT_LENGTH ];
- pTextClient[0] = '\0';
- LoadString( hInst, IDS_MSG_OPTIMIZED_FOR_CLIENT, pTextClient, MAX_TEXT_LENGTH );
-
- wchar_t* pTextNoInstallation = new wchar_t[ MAX_TEXT_LENGTH ];
- pTextNoInstallation[0] = '\0';
- LoadString( hInst, IDS_MSG_NO_INSTALLATION_FOUND, pTextNoInstallation, MAX_TEXT_LENGTH );
-
- LPVOID VBA = (void*)0x10000000;
- wchar_t path[MAX_PATH];
-
- wchar_t * pathEnd = getBrandPath(path);
-
- if (tools::buildPath(path, path, pathEnd, MY_STRING(L"libxml2.dll")) == NULL)
- fail();
- bool bFast = checkImageVirtualBaseAddress(path, VBA);
-
- if (tools::buildPath(path, path, pathEnd, MY_STRING(L"..\\basis-link")) == NULL)
- fail();
- pathEnd = tools::resolveLink(path);
-
- if (pathEnd == NULL)
- failPath(pAppTitle, pTextNoInstallation);
-
- if (tools::buildPath(path, path, pathEnd, MY_STRING(L"\\program\\vclmi.dll")) == NULL)
- fail();
- bFast &= checkImageVirtualBaseAddress(path, VBA);
-
- if (tools::buildPath(path, path, pathEnd, MY_STRING(L"\\ure-link")) == NULL)
- fail();
- pathEnd = tools::resolveLink(path);
-
- if (pathEnd == NULL)
- failPath(pAppTitle, pTextNoInstallation);
-
- if (tools::buildPath(path, path, pathEnd, MY_STRING(L"\\bin\\sal3.dll")) == NULL)
- fail();
- bFast &= checkImageVirtualBaseAddress(path, VBA);
-
- const wchar_t* pOutput = pTextClient;
- if (!bFast)
- pOutput = pTextServer;
-
- MessageBoxW( NULL, pOutput, pAppTitle, MB_OK );
-
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/rebase/rebasegui.ulf b/desktop/win32/source/rebase/rebasegui.ulf
deleted file mode 100755
index ee6b6e828a..0000000000
--- a/desktop/win32/source/rebase/rebasegui.ulf
+++ /dev/null
@@ -1,11 +0,0 @@
-[%APP_TITLE%]
-en-US = "Installation Status"
-
-[%MSG_OPTIMIZED_FOR_CLIENT%]
-en-US = "Installation is optimized for clients."
-
-[%MSG_OPTIMIZED_FOR_SERVER%]
-en-US = "Installation is optimized for servers."
-
-[%MSG_NO_INSTALLATION_FOUND%]
-en-US = "Cannot find Office installation."