2 rem Copyright (C) 2007 The Android Open Source Project
4 rem Licensed under the Apache License, Version 2.0 (the "License");
5 rem you may not use this file except in compliance with the License.
6 rem You may obtain a copy of the License at
8 rem http://www.apache.org/licenses/LICENSE-2.0
10 rem Unless required by applicable law or agreed to in writing, software
11 rem distributed under the License is distributed on an "AS IS" BASIS,
12 rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 rem See the License for the specific language governing permissions and
14 rem limitations under the License.
16 rem don't modify the caller's environment
19 rem Set up prog to be the path of this script, including following symlinks,
20 rem and set up progdir to be the fully-qualified pathname of its directory.
23 rem Change current directory and drive to where the script is, to avoid
24 rem issues with directories containing whitespaces.
27 set jarfile=traceview.jar
30 if exist %frameworkdir%%jarfile% goto JarFileOk
33 if exist %frameworkdir%%jarfile% goto JarFileOk
34 set frameworkdir=..\framework\
38 set jarpath=%frameworkdir%%jarfile%
40 if not defined ANDROID_SWT goto QueryArch
41 set swt_path=%ANDROID_SWT%
46 for /f %%a in ('java -jar %frameworkdir%archquery.jar') do set swt_path=%frameworkdir%%%a
50 if exist %swt_path% goto SetPath
51 echo SWT folder '%swt_path%' does not exist.
52 echo Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.
56 set javaextdirs=%swt_path%;%frameworkdir%
58 call java -Djava.ext.dirs=%javaextdirs% -Dcom.android.traceview.toolsdir= -jar %jarpath% %*