You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fop.bat 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. @ECHO OFF
  2. REM Licensed to the Apache Software Foundation (ASF) under one or more
  3. REM contributor license agreements. See the NOTICE file distributed with
  4. REM this work for additional information regarding copyright ownership.
  5. REM The ASF licenses this file to You under the Apache License, Version 2.0
  6. REM (the "License"); you may not use this file except in compliance with
  7. REM the License. You may obtain a copy of the License at
  8. REM
  9. REM http://www.apache.org/licenses/LICENSE-2.0
  10. REM
  11. REM Unless required by applicable law or agreed to in writing, software
  12. REM distributed under the License is distributed on an "AS IS" BASIS,
  13. REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. REM See the License for the specific language governing permissions and
  15. REM limitations under the License.
  16. REM $Id$
  17. SETLOCAL ENABLEDELAYEDEXPANSION
  18. rem %~dp0 is the expanded pathname of the current script under NT
  19. set LOCAL_FOP_HOME=
  20. if "%OS%"=="Windows_NT" set LOCAL_FOP_HOME="%~dp0"
  21. rem Code from Apache Ant project
  22. rem Slurp the command line arguments. This loop allows for an unlimited number
  23. rem of arguments (up to the command line limit, anyway).
  24. rem Could also do a "shift" and "%*" for all params, but apparently doesn't work
  25. rem with Win9x.
  26. set FOP_CMD_LINE_ARGS=%1
  27. if ""%1""=="""" goto doneStart
  28. shift
  29. :setupArgs
  30. if ""%1""=="""" goto doneStart
  31. set FOP_CMD_LINE_ARGS=%FOP_CMD_LINE_ARGS% %1
  32. shift
  33. goto setupArgs
  34. rem This label provides a place for the argument list loop to break out
  35. rem and for NT handling to skip to.
  36. :doneStart
  37. set LOGCHOICE=
  38. rem The default commons logger for JDK1.4 is JDK1.4Logger.
  39. rem To use a different logger, uncomment the one desired below
  40. rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
  41. rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
  42. rem set LOGCHOICE=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
  43. set LOGLEVEL=
  44. rem Logging levels
  45. rem Below option is only if you are using SimpleLog instead of the default JDK1.4 Logger.
  46. rem To set logging levels for JDK 1.4 Logger, edit the %JAVA_HOME%\JRE\LIB\logging.properties
  47. rem file instead.
  48. rem Possible SimpleLog values: "trace", "debug", "info" (default), "warn", "error", or "fatal".
  49. rem set LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=INFO
  50. set LIBDIR=%LOCAL_FOP_HOME%lib
  51. set LOCALCLASSPATH=%FOP_HYPHENATION_PATH%
  52. for %%l in (%LOCAL_FOP_HOME%build\*.jar %LIBDIR%\*.jar) do set LOCALCLASSPATH=!LOCALCLASSPATH!;%%l
  53. set JAVAOPTS=-Denv.windir=%WINDIR% -Djava.awt.headless=true
  54. if "%JAVA_HOME%" == "" goto noJavaHome
  55. if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
  56. if "%JAVACMD%" == "" set JAVACMD=%JAVA_HOME%\bin\java
  57. goto runFop
  58. :noJavaHome
  59. if "%JAVACMD%" == "" set JAVACMD=java
  60. :runFop
  61. rem echo "%JAVACMD%" %LOGCHOICE% %LOGLEVEL% -cp "%LOCALCLASSPATH%" org.apache.fop.cli.Main %FOP_CMD_LINE_ARGS%
  62. "%JAVACMD%" %JAVAOPTS% %LOGCHOICE% %LOGLEVEL% -cp "%LOCALCLASSPATH%" %FOP_OPTS% org.apache.fop.cli.Main %FOP_CMD_LINE_ARGS%
  63. ENDLOCAL