launcher.cxx (8951e390) launcher.cxx (055eca97)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 40 unchanged lines hidden (view full) ---

49 CHAR szFileName[_MAX_PATH];
50 CHAR szExt[_MAX_PATH];
51
52 // get executable fullpath
53 DosGetInfoBlocks(NULL, &pib);
54 DosQueryModuleName(pib->pib_hmte, sizeof(szApplicationName), szApplicationName);
55
56 // adjust libpath
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 40 unchanged lines hidden (view full) ---

49 CHAR szFileName[_MAX_PATH];
50 CHAR szExt[_MAX_PATH];
51
52 // get executable fullpath
53 DosGetInfoBlocks(NULL, &pib);
54 DosQueryModuleName(pib->pib_hmte, sizeof(szApplicationName), szApplicationName);
55
56 // adjust libpath
57#if OSL_DEBUG_LEVEL > 0
58 rc = DosQueryExtLIBPATH( (PSZ)szLibpath, BEGIN_LIBPATH);
59 fprintf( stderr, "1 BeginLibPath: %s\n", szLibpath);
60#endif
57 _splitpath( szApplicationName, szDrive, szDir, szFileName, szExt );
58 char* basedir = strstr( szDir, "\\PROGRAM\\");
59 if (basedir) *basedir = 0;
61 _splitpath( szApplicationName, szDrive, szDir, szFileName, szExt );
62 char* basedir = strstr( szDir, "\\PROGRAM\\");
63 if (basedir) *basedir = 0;
60 sprintf( szLibpath, "\"%s%s\\URE\\BIN\";\"%s%s\\BASIS\\PROGRAM\";%BeginLIBPATH%",
64 sprintf( szLibpath, "\"%s%s\\URE\\BIN\";\"%s%s\\BASIS\\PROGRAM\";%%BeginLIBPATH%%;",
61 szDrive, szDir, szDrive, szDir);
62 DosSetExtLIBPATH( (PCSZ)szLibpath, BEGIN_LIBPATH);
63 // make sure we load DLL from our path only, so multiple instances/versions
64 // can be loaded.
65#if 0
66 // YD this feature is not compatible with innowin b20,
67 // java cannot load with this flag enabled
68 DosSetExtLIBPATH( (PCSZ)"T", LIBPATHSTRICT);
69#endif
65 szDrive, szDir, szDrive, szDir);
66 DosSetExtLIBPATH( (PCSZ)szLibpath, BEGIN_LIBPATH);
67 // make sure we load DLL from our path only, so multiple instances/versions
68 // can be loaded.
69#if 0
70 // YD this feature is not compatible with innowin b20,
71 // java cannot load with this flag enabled
72 DosSetExtLIBPATH( (PCSZ)"T", LIBPATHSTRICT);
73#endif
74#if OSL_DEBUG_LEVEL > 0
75 rc = DosQueryExtLIBPATH( (PSZ)szLibpath, BEGIN_LIBPATH);
76 fprintf( stderr, "2 BeginLibPath: %s\n", szLibpath);
77#endif
70
71 // adjust exe name
72 _splitpath( szApplicationName, szDrive, szDir, szFileName, szExt );
73 _makepath( szApplicationName, szDrive, szDir, OFFICE_IMAGE_NAME, (".bin") );
74
75 // copy command line parameters
76 int i, len;
77 len = strlen(szApplicationName) + 1 + strlen( APPLICATION_SWITCH) + 1 + 1;

--- 41 unchanged lines hidden ---
78
79 // adjust exe name
80 _splitpath( szApplicationName, szDrive, szDir, szFileName, szExt );
81 _makepath( szApplicationName, szDrive, szDir, OFFICE_IMAGE_NAME, (".bin") );
82
83 // copy command line parameters
84 int i, len;
85 len = strlen(szApplicationName) + 1 + strlen( APPLICATION_SWITCH) + 1 + 1;

--- 41 unchanged lines hidden ---