summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-12-09 08:43:20 +0000
committerRüdiger Timm <rt@openoffice.org>2008-12-09 08:43:20 +0000
commitcad36daba44cb432559d0e7b68e5cd7744e8555e (patch)
treedb01f2d8674a660ea9076fbb03c14a20d6b5fee3 /desktop
parent18456944853a992ebcc980201eb7a3d54771500e (diff)
CWS-TOOLING: integrate CWS os2port04
2008-11-27 13:22:38 +0100 ydario r264480 : #i96439#: fix build for unix platforms. 2008-11-26 18:32:42 +0100 ydario r264433 : #i96439#: os2 systemshell code (dummy code). 2008-11-26 16:33:48 +0100 ydario r264421 : #i96439#: vcl fix for pdf export of truetype fonts. 2008-11-26 15:04:44 +0100 ydario r264399 : #i96439#: build macros fix scripts, gcc specific flags. 2008-11-26 15:00:15 +0100 ydario r264398 : #i96439#: vcl source code updates. 2008-11-26 13:21:37 +0100 ydario r264378 : #i96439#: os2 build system fixes. 2008-11-26 13:20:27 +0100 ydario r264377 : #i96439#: configuration and build macros updates. 2008-11-26 13:16:35 +0100 ydario r264375 : #i96439#: new launcher code, build system updates. 2008-11-26 13:12:49 +0100 ydario r264373 : #i96439#: use OSL endian macro. 2008-11-26 12:54:50 +0100 ydario r264371 : #i96439#: os2 build system fixes. 2008-11-26 12:30:46 +0100 ydario r264367 : #i96439#: os2 build system fixes. 2008-11-26 12:09:33 +0100 ydario r264365 : #i96439#: _Export is a reserved keyword under gcc for os2. 2008-11-26 12:08:12 +0100 ydario r264364 : #i96439#: new libpath handling. 2008-11-26 11:57:51 +0100 ydario r264363 : #i96439#: use C call, generates proper stabs; fix rtti names.
Diffstat (limited to 'desktop')
-rw-r--r--desktop/os2/source/applauncher/launcher.cxx203
-rw-r--r--desktop/prj/d.lst4
-rw-r--r--desktop/source/app/makefile.mk5
-rw-r--r--desktop/util/makefile.mk2
-rw-r--r--desktop/util/ooverinfo2.rc46
5 files changed, 148 insertions, 112 deletions
diff --git a/desktop/os2/source/applauncher/launcher.cxx b/desktop/os2/source/applauncher/launcher.cxx
index bb85d5a03d2b..24bb85aa5457 100644
--- a/desktop/os2/source/applauncher/launcher.cxx
+++ b/desktop/os2/source/applauncher/launcher.cxx
@@ -1,85 +1,118 @@
-#include "launcher.hxx"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <malloc.h>
-#include <process.h>
-
-int main( int argc, char* argv[])
-{
- PPIB pib;
- APIRET rc;
- RESULTCODES result = {0};
- char szFail[ _MAX_PATH];
-
- HAB hab = WinInitialize( 0);
- HMQ hmq = WinCreateMsgQueue( hab, 0);
- ERRORID erridErrorCode = 0;
- erridErrorCode = WinGetLastError(hab);
-
- // Calculate application name
- CHAR szApplicationName[_MAX_PATH];
- CHAR szDrive[_MAX_PATH];
- CHAR szDir[_MAX_PATH];
- CHAR szFileName[_MAX_PATH];
- CHAR szExt[_MAX_PATH];
-
- // get executable fullpath
- DosGetInfoBlocks(NULL, &pib);
- DosQueryModuleName(pib->pib_hmte, sizeof(szApplicationName), szApplicationName);
- _splitpath( szApplicationName, szDrive, szDir, szFileName, szExt );
-
- // adjust libpath
- _makepath( szApplicationName, szDrive, szDir, NULL, NULL);
- strcat( szApplicationName, ";%BeginLIBPATH%");
- DosSetExtLIBPATH( (PCSZ)szApplicationName, BEGIN_LIBPATH);
-
- // adjust exe name
- _makepath( szApplicationName, szDrive, szDir, OFFICE_IMAGE_NAME, (".bin") );
-
- // copy command line parameters
- int i, len;
- len = strlen(szApplicationName)+1;
- for( i=1; i<argc; i++)
- len += strlen( argv[i]) + 1;
-
- char* pszCommandLine, *pszArgs;
- pszCommandLine = (char*) malloc( len);
- strcpy( pszCommandLine, szApplicationName);
- pszArgs = pszCommandLine + strlen(szApplicationName) + 1;
- strcat( pszArgs, APPLICATION_SWITCH);
- strcat( pszArgs, " ");
- for( i=1; i<argc; i++) {
- // add quotes if argument has spaces!
- if (strchr( argv[i], ' '))
- strcat( pszArgs, "\"");
- strcat( pszArgs, argv[i]);
- if (strchr( argv[i], ' '))
- strcat( pszArgs, "\"");
- strcat( pszArgs, " ");
- }
- pszArgs[ strlen( pszArgs) + 0] = 0;
-
- // execute
- rc = DosExecPgm(szFail, sizeof(szFail),
- EXEC_SYNC, (PCSZ)pszCommandLine, (PCSZ)NULL, &result,
- (PCSZ)szApplicationName);
- if (rc) {
- char szMessage[ _MAX_PATH*2];
- sprintf( szMessage, "Execution failed! Contact technical support.\n\nReturn code: %d\nFailing module:%s\n", rc, szFail);
- rc = WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
- (PSZ)szMessage,
- (PSZ)"Unable to start OpenOffice.org!",
- 0, MB_ERROR | MB_OK);
- WinDestroyMsgQueue( hmq);
- WinTerminate( hab);
- exit(1);
- }
-
- WinDestroyMsgQueue( hmq);
- WinTerminate( hab);
-
- exit( result.codeResult);
-}
-
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * 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 "launcher.hxx"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <malloc.h>
+#include <process.h>
+
+int main( int argc, char* argv[])
+{
+ PPIB pib;
+ APIRET rc;
+ RESULTCODES result = {0};
+ char szFail[ _MAX_PATH];
+
+ HAB hab = WinInitialize( 0);
+ HMQ hmq = WinCreateMsgQueue( hab, 0);
+ ERRORID erridErrorCode = 0;
+ erridErrorCode = WinGetLastError(hab);
+
+ // Calculate application name
+ CHAR szLibpath[_MAX_PATH*2];
+ CHAR szApplicationName[_MAX_PATH];
+ CHAR szDrive[_MAX_PATH];
+ CHAR szDir[_MAX_PATH];
+ CHAR szFileName[_MAX_PATH];
+ CHAR szExt[_MAX_PATH];
+
+ // get executable fullpath
+ DosGetInfoBlocks(NULL, &pib);
+ DosQueryModuleName(pib->pib_hmte, sizeof(szApplicationName), szApplicationName);
+
+ // adjust libpath
+ _splitpath( szApplicationName, szDrive, szDir, szFileName, szExt );
+ char* basedir = strstr( szDir, "\\PROGRAM\\");
+ if (basedir) *basedir = 0;
+ sprintf( szLibpath, "%s%s\\URE\\BIN;%s%s\\BASIS\\PROGRAM;%BeginLIBPATH%",
+ szDrive, szDir, szDrive, szDir);
+ DosSetExtLIBPATH( (PCSZ)szLibpath, BEGIN_LIBPATH);
+ // make sure we load DLL from our path only, so multiple instances/versions
+ // can be loaded.
+ DosSetExtLIBPATH( (PCSZ)"T", LIBPATHSTRICT);
+
+ // adjust exe name
+ _splitpath( szApplicationName, szDrive, szDir, szFileName, szExt );
+ _makepath( szApplicationName, szDrive, szDir, OFFICE_IMAGE_NAME, (".bin") );
+
+ // copy command line parameters
+ int i, len;
+ len = strlen(szApplicationName) + 1 + strlen( APPLICATION_SWITCH) + 1 + 1;
+ for( i=1; i<argc; i++)
+ len += strlen( argv[i]) + 1;
+
+ char* pszCommandLine, *pszArgs;
+ pszCommandLine = (char*) calloc( 1, len);
+ strcpy( pszCommandLine, szApplicationName);
+ pszArgs = pszCommandLine + strlen(szApplicationName) + 1;
+ strcat( pszArgs, APPLICATION_SWITCH);
+ strcat( pszArgs, " ");
+ for( i=1; i<argc; i++) {
+ // add quotes if argument has spaces!
+ if (strchr( argv[i], ' '))
+ strcat( pszArgs, "\"");
+ strcat( pszArgs, argv[i]);
+ if (strchr( argv[i], ' '))
+ strcat( pszArgs, "\"");
+ strcat( pszArgs, " ");
+ }
+ pszArgs[ strlen( pszArgs) + 0] = 0;
+
+ // execute
+ rc = DosExecPgm(szFail, sizeof(szFail),
+ EXEC_SYNC, (PCSZ)pszCommandLine, (PCSZ)NULL, &result,
+ (PCSZ)szApplicationName);
+ if (rc) {
+ char szMessage[ _MAX_PATH*2];
+ sprintf( szMessage, "Execution failed! Contact technical support.\n\nReturn code: %d\nFailing module:%s\n", rc, szFail);
+ rc = WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
+ (PSZ)szMessage,
+ (PSZ)"Unable to start OpenOffice.org!",
+ 0, MB_ERROR | MB_OK);
+ WinDestroyMsgQueue( hmq);
+ WinTerminate( hab);
+ exit(1);
+ }
+
+ WinDestroyMsgQueue( hmq);
+ WinTerminate( hab);
+
+ exit( result.codeResult);
+}
diff --git a/desktop/prj/d.lst b/desktop/prj/d.lst
index d69aa9fccc25..7f5cb144e766 100644
--- a/desktop/prj/d.lst
+++ b/desktop/prj/d.lst
@@ -16,7 +16,7 @@ mkdir: %_DEST%\bin%_EXT%\odf4ms
..\%__SRC%\bin\so\soffice.bin %_DEST%\bin%_EXT%\so\soffice.bin
..\%__SRC%\bin\so\officeloader.exe %_DEST%\bin%_EXT%\so\soffice.exe
..\%__SRC%\bin\so\soffice %_DEST%\bin%_EXT%\so\soffice.bin
-..\%__SRC%\bin\sofficeapp.dll %_DEST%\bin%_EXT%\sofficeapp.dll
+..\%__SRC%\bin\sofficea*.dll %_DEST%\bin%_EXT%\sofficea*.dll
..\%__SRC%\lib\isofficeapp.lib %_DEST%\lib%_EXT%\isofficeapp.lib
..\%__SRC%\lib\libsofficeapp.dylib %_DEST%\lib%_EXT%\libsofficeapp.dylib
..\%__SRC%\lib\libsofficeapp.so %_DEST%\lib%_EXT%\libsofficeapp.so
@@ -81,7 +81,7 @@ mkdir: %_DEST%\bin%_EXT%\odf4ms
..\%__SRC%\bin\unopkg.exe %_DEST%\bin%_EXT%\unopkg.bin
..\%__SRC%\bin\so\unopkg.exe %_DEST%\bin%_EXT%\so\unopkg.bin
..\%__SRC%\misc\unopkg.sh %_DEST%\bin%_EXT%\unopkg
-..\%__SRC%\bin\unopkgapp.dll %_DEST%\bin%_EXT%\unopkgapp.dll
+..\%__SRC%\bin\unopkga*.dll %_DEST%\bin%_EXT%\unopkga*.dll
..\%__SRC%\lib\libunopkgapp.dylib %_DEST%\lib%_EXT%\libunopkgapp.dylib
..\%__SRC%\lib\libunopkgapp.so %_DEST%\lib%_EXT%\libunopkgapp.so
diff --git a/desktop/source/app/makefile.mk b/desktop/source/app/makefile.mk
index f0948baf6477..027f45f10b6a 100644
--- a/desktop/source/app/makefile.mk
+++ b/desktop/source/app/makefile.mk
@@ -88,8 +88,11 @@ DEF1NAME = $(SHL1TARGET)
OBJFILES = \
$(OBJ)$/copyright_ascii_ooo.obj \
- $(OBJ)$/copyright_ascii_sun.obj \
$(OBJ)$/main.obj
+.IF "$(GUI)" != "OS2"
+OBJFILES += \
+ $(OBJ)$/copyright_ascii_sun.obj
+.ENDIF
SLOFILES = $(SHL1OBJS)
diff --git a/desktop/util/makefile.mk b/desktop/util/makefile.mk
index 0b85d7d246d3..5c8b8f681075 100644
--- a/desktop/util/makefile.mk
+++ b/desktop/util/makefile.mk
@@ -131,7 +131,7 @@ APP5STACK=10000000
.IF "$(GUI)" == "OS2"
APP5DEF= # automatic
APP5RES= $(RES)$/oodesktop.res
-APP5ICON=$(SOLARRESDIR)$/icons/ooo3_main_app.ico
+APP5ICON=$(SOLARRESDIR)$/icons/ooo-main-app.ico
APP5VERINFO=ooverinfo2.rc
APP5LINKRES=$(MISC)$/ooffice.res
.ENDIF # OS2
diff --git a/desktop/util/ooverinfo2.rc b/desktop/util/ooverinfo2.rc
index 342e1fab72e3..ac60d0701609 100644
--- a/desktop/util/ooverinfo2.rc
+++ b/desktop/util/ooverinfo2.rc
@@ -51,32 +51,32 @@
// -----------------------------------------------------------------------
-ICON 2 "icons/ooo3_writer_doc.ico"
-ICON 3 "icons/ooo3_writer_tem.ico"
-ICON 4 "icons/ooo3_calc_doc.ico"
-ICON 5 "icons/ooo3_calc_tem.ico"
-ICON 6 "icons/ooo3_draw_doc.ico"
-ICON 7 "icons/ooo3_draw_tem.ico"
-ICON 8 "icons/ooo3_impress_doc.ico"
-ICON 9 "icons/ooo3_impress_tem.ico"
-ICON 10 "icons/ooo3_impress_doc.ico"
-ICON 11 "icons/ooo3_global_doc.ico"
-ICON 12 "icons/ooo3_html_doc.ico"
-ICON 13 "icons/ooo3_chart_doc.ico"
-ICON 14 "icons/ooo3_base_doc.ico"
-ICON 15 "icons/ooo3_math_doc.ico"
-ICON 16 "icons/ooo3_empty_tem.ico"
-ICON 17 "icons/ooo3_macro_doc.ico"
+ICON 2 "icons/ooo-writer-doc.ico"
+ICON 3 "icons/ooo-writer-tem.ico"
+ICON 4 "icons/ooo-calc-doc.ico"
+ICON 5 "icons/ooo-calc-tem.ico"
+ICON 6 "icons/ooo-draw-doc.ico"
+ICON 7 "icons/ooo-draw-tem.ico"
+ICON 8 "icons/ooo-impress-doc.ico"
+ICON 9 "icons/ooo-impress-tem.ico"
+ICON 10 "icons/ooo-impress-doc.ico"
+//ICON 11 "icons/ooo-global-doc.ico"
+//ICON 12 "icons/ooo-html-doc.ico"
+ICON 13 "icons/ooo-chart-doc.ico"
+ICON 14 "icons/ooo-base-doc.ico"
+ICON 15 "icons/ooo-math-doc.ico"
+ICON 16 "icons/ooo-empty-tem.ico"
+ICON 17 "icons/ooo-macro-doc.ico"
ICON 18 "icons/ooo-configuration.ico"
ICON 19 "icons/ooo-open.ico"
ICON 20 "icons/ooo-image-doc.ico"
-ICON 21 "icons/ooo3_writer_app.ico"
-ICON 22 "icons/ooo3_calc_app.ico"
-ICON 23 "icons/ooo3_draw_app.ico"
-ICON 24 "icons/ooo3_impress_app.ico"
-ICON 25 "icons/ooo3_math_app.ico"
-ICON 26 "icons/ooo3_base_app.ico"
-ICON 27 "icons/ooo3_empty_doc.ico"
+ICON 21 "icons/ooo-writer-app.ico"
+ICON 22 "icons/ooo-calc-app.ico"
+ICON 23 "icons/ooo-draw-app.ico"
+ICON 24 "icons/ooo-impress-app.ico"
+ICON 25 "icons/ooo-math-app.ico"
+ICON 26 "icons/ooo-base-app.ico"
+ICON 27 "icons/ooo-empty-doc.ico"
ICON 28 "icons/ooo11-writer-doc.ico"
ICON 29 "icons/ooo11-writer-tem.ico"
ICON 30 "icons/ooo11-calc-doc.ico"