@echo off
rem Copyright 2014 Hiroyuki Tominaga
rem
rem Licensed under the Apache License, Version 2.0 (the "License");
rem you may not use this file except in compliance with the License.
rem You may obtain a copy of the License at
rem
rem    http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.

rem   REVISION LOG ENTRY
rem
rem	File name    : launch_propedit.bat
rem 	Revision By  : (C) Copyright 2013 Hiroyuki Tominaga, All Rights Reserved.
rem
rem		Revised on: 2013-12-23 01:08:48
rem		Summary   :

set SCRIPT_DIR=%~dp0
rem awt.useSystemAAFontSettings: off on lcd lcd_hrgb
rem off は設定しなかった場合と同様, on では すべてに antialias がかかる.
rem lcd などでは text にかかるが, 日本語など multi byte 文字にはかからない?
set JAVA_OPTIONs=-Dswing.boldMetal=false -Dawt.useSystemAAFontSettings=
rem for application debug flag.
set DEBUG=

if not "%DEBUG%"=="" (
rem
rem [debug trace order tokens]
rem afx.debug      =afx.swing afx.plugin dnd util util.base64
rem propedit.debug =afx.plugin
rem
set JAVA_OPTIONs=%JAVA_OPTIONs% ^
	-DISO8859_1Reader_base=%SCRIPT_DIR% ^
	-DLog4jLogEventFactory=com.mylyane.afx.logging.log4j2.CustomLogEventFactory ^
	-Dafx.debug="afx.swing afx.plugin dnd" ^
	-Dpropedit.debug="afx.plugin"
)

set CLASS_ROOT=propedit-1.15.2904.jar& rem classes

rem jmx 接続を無効にするには以下を使用.
rem set XX_OPTIONs=-XX:+DisableAttachMechanism
set XX_OPTIONs=

rem echo extension is: %~x1
if not "%~x1"==".jar" (
	set CLASS_ROOT=%SCRIPT_DIR%%CLASS_ROOT%
) else (
	set CLASS_ROOT=%SCRIPT_DIR%%1
	shift
)

set CLASSPATH=%CLASS_ROOT%;log4j2.jar
if "%DEBUG%"=="" goto :LAUNCH

set LOG4J2_HOME=F:\ext_prg\develp\apache-log4j-2.0
set CLASSPATH=%CLASSPATH%;%LOG4J2_HOME%\log4j-api-2.0.jar;%LOG4J2_HOME%\log4j-core-2.0.jar

:LAUNCH
echo.
echo *******************************************************************************************
echo.
echo   Launch directory: %SCRIPT_DIR%
echo   app classes root: %CLASS_ROOT%
echo   java options    : %JAVA_OPTIONs%
echo.
echo   start properties editor application!
echo.
echo *******************************************************************************************
echo.

java -cp %CLASSPATH% %JAVA_OPTIONs% %XX_OPTIONs% ActivatorHook "%1" "%2" "%3" "%4" "%5" "%6"

pause.
