summaryrefslogtreecommitdiff
path: root/solenv/bin/installoffice.btm
blob: 983ee9e3df02ccbe3c9374b236dac7258394bc53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
@echo off
REM **************************************************************************
REM * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
REM * 
REM * Copyright 2008 by Sun Microsystems, Inc.
REM *
REM * OpenOffice.org - a multi-platform office productivity suite
REM *
REM * $RCSfile: installoffice.btm,v $
REM *
REM * $Revision: 1.3.6.1 $
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.
REM ************************************************************************/

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

SET DESTPATH=%temppath%\%USERNAME%
SET DEBUG=false
SET OOO=false
SET PARAM=

for %opt in (%&%) DO (
    if "%opt%" == "-d" (SET PARAM=%PARAM% -debug true ^ shift)
    if "%opt%" == "-o" (SET PARAM=%PARAM% -ooo true ^ shift)
    if "%opt%" == "-c" (SET PARAM=%PARAM% -cwscheckapi true ^ shift)
    if "%opt%" == "-a" (SET PARAM=%PARAM% -autorun true ^ shift)
    if "%opt%" == "-t" (SET DESTPATH=%2  ^ shift ^ shift)
    if "%opt%" == "-h" goto usage
    if "%opt%" == "/h" goto usage
)

SET LOCALINSTALLDIR=%DESTPATH%\office
SET LOCALUNPACKDIR=%DESTPATH%\unpack

call perl5 %SOLARENV%\bin\installoffice.pl -dest %LOCALINSTALLDIR% %PARAM% -cleanup true %&

quit %?

: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. 
    echo [-t] target path: path wehre tho office should installed to. The default is '%DESTPATH%'>&2
    echo.
    echo [-a] the office will be patched to run without FirstStartWizard >&2
   echo. 
    quit 1