2008-06-13 06:29:43 -05:00
|
|
|
@echo off
|
|
|
|
REM **************************************************************************
|
2010-02-12 08:01:35 -06:00
|
|
|
REM *
|
2008-06-13 06:29:43 -05:00
|
|
|
REM * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
REM *
|
2010-02-12 08:01:35 -06:00
|
|
|
REM * Copyright 2000, 2010 Oracle and/or its affiliates.
|
2008-06-13 06:29:43 -05:00
|
|
|
REM *
|
|
|
|
REM * OpenOffice.org - a multi-platform office productivity suite
|
|
|
|
REM *
|
|
|
|
REM * This file is part of OpenOffice.org.
|
|
|
|
REM *
|
|
|
|
REM * OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
REM * it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
REM * only, as published by the Free Software Foundation.
|
|
|
|
REM *
|
|
|
|
REM * OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
REM * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
REM * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
REM * GNU Lesser General Public License version 3 for more details
|
|
|
|
REM * (a copy is included in the LICENSE file that accompanied this code).
|
|
|
|
REM *
|
|
|
|
REM * You should have received a copy of the GNU Lesser General Public License
|
|
|
|
REM * version 3 along with OpenOffice.org. If not, see
|
|
|
|
REM * <http://www.openoffice.org/license.html>
|
|
|
|
REM * for a copy of the LGPLv3 License.
|
2010-02-12 08:01:35 -06:00
|
|
|
REM *
|
2008-06-13 06:29:43 -05:00
|
|
|
REM ************************************************************************/
|
|
|
|
|
2009-07-03 05:14:57 -05:00
|
|
|
|
|
|
|
SET DESTPATH=%USERNAME%
|
|
|
|
SET DEBUG=false
|
|
|
|
SET OOO=false
|
|
|
|
SET PARAM=
|
|
|
|
|
|
|
|
for %opt in (%&%) DO (
|
|
|
|
iff "%opt%" == "-d" THEN
|
|
|
|
SET PARAM=%PARAM% -debug true
|
|
|
|
shift
|
|
|
|
|
|
|
|
elseiff "%opt%" == "-o" THEN
|
|
|
|
SET PARAM=%PARAM% -ooo true
|
|
|
|
shift
|
|
|
|
|
|
|
|
elseiff "%opt%" == "-c" THEN
|
|
|
|
SET PARAM=%PARAM% -cwscheckapi true
|
|
|
|
shift
|
|
|
|
|
|
|
|
elseiff "%opt%" == "-a" THEN
|
|
|
|
SET PARAM=%PARAM% -autorun true
|
|
|
|
shift
|
|
|
|
|
|
|
|
elseiff "%opt%" == "-i" THEN
|
|
|
|
SET PARAM=%PARAM% -autoimpress true
|
|
|
|
shift
|
|
|
|
|
|
|
|
elseiff "%opt%" == "-t" THEN
|
|
|
|
SET DESTPATH=%2
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
|
|
|
|
elseiff "%opt%" == "-h" THEN
|
|
|
|
goto usage
|
|
|
|
|
|
|
|
elseiff "%opt%" == "/h" THEN
|
|
|
|
goto usage
|
|
|
|
|
|
|
|
elseiff "%opt%" == "%DESTPATH%" THEN
|
|
|
|
shift
|
|
|
|
|
|
|
|
else
|
|
|
|
echo wrong param: %opt%
|
|
|
|
goto usage
|
|
|
|
endiff
|
|
|
|
)
|
|
|
|
|
|
|
|
iff "%DESTPATH%" == "%USERNAME%" THEN
|
2008-09-30 02:44:27 -05:00
|
|
|
iff EXIST e:\ then
|
|
|
|
iff EXIST e:\temp then
|
|
|
|
set temppath=e:\temp
|
|
|
|
elseiff EXIST e:\tmp then
|
|
|
|
set temppath=c:\tmp
|
|
|
|
else
|
|
|
|
mkdir e:\temp
|
|
|
|
set tmppath=c:\temp
|
|
|
|
endiff
|
|
|
|
elseiff EXIST c:\tmp then
|
|
|
|
set temppath=c:\tmp
|
|
|
|
elseiff EXIST c:\temp then
|
|
|
|
set temppath=c:\temp
|
|
|
|
else
|
|
|
|
set temppath=%TMP%
|
|
|
|
endiff
|
2009-07-03 05:14:57 -05:00
|
|
|
DESTPATH=%temppath%\%USERNAME%
|
|
|
|
endiff
|
2008-06-13 06:29:43 -05:00
|
|
|
|
|
|
|
SET LOCALINSTALLDIR=%DESTPATH%\office
|
|
|
|
SET LOCALUNPACKDIR=%DESTPATH%\unpack
|
2009-07-03 05:14:57 -05:00
|
|
|
echo LOCALINSTALLDIR=%LOCALINSTALLDIR%
|
|
|
|
echo LOCALUNPACKDIR=%LOCALUNPACKDIR%
|
2008-06-13 06:29:43 -05:00
|
|
|
|
2009-07-03 05:14:57 -05:00
|
|
|
echo call perl5 %SOLARENV%\bin\installoffice.pl -dest %LOCALINSTALLDIR% %PARAM% -cleanup true %&
|
2008-07-07 03:01:47 -05:00
|
|
|
call perl5 %SOLARENV%\bin\installoffice.pl -dest %LOCALINSTALLDIR% %PARAM% -cleanup true %&
|
2008-06-13 06:29:43 -05:00
|
|
|
|
2008-07-07 03:01:47 -05:00
|
|
|
quit %?
|
2008-06-13 06:29:43 -05:00
|
|
|
|
|
|
|
:usage
|
|
|
|
echo.
|
|
|
|
echo Usage: %0% [-t DESTPATH] [-o] [-d] >&2
|
|
|
|
echo.
|
|
|
|
echo [-d] installation with debug output>&2
|
|
|
|
echo.
|
|
|
|
echo [-o] force OpenOffice.org installation instead of StarOffice>&2
|
|
|
|
echo.
|
2009-07-03 05:14:57 -05:00
|
|
|
echo [-t] target path: path where the office should installed to. The default is '%DESTPATH%'>&2
|
2008-07-07 03:01:47 -05:00
|
|
|
echo.
|
|
|
|
echo [-a] the office will be patched to run without FirstStartWizard >&2
|
|
|
|
echo.
|
2009-07-03 05:14:57 -05:00
|
|
|
echo [-i] impress should open documents without autopilot
|
|
|
|
echo.
|
2008-06-13 06:29:43 -05:00
|
|
|
quit 1
|