source: snovis/trunk/obuild/setup.bat

Last change on this file was 276, checked in by barrand, 17 years ago
File size: 2.5 KB
Line 
1@ECHO OFF
2
3REM #
4REM # File produced by the obuild tool version 1.0
5REM # for the package snovis with version v1r1.
6REM #
7
8REM #////////////////////////////////////////////////
9REM # Usage :
10REM #   DOS> setup
11REM # or :
12REM #   DOS> setup.bat
13REM # or :
14REM #   DOS> call setup.bat
15REM #////////////////////////////////////////////////
16
17SET obuild_snovis_path=%~dp0
18REM # Remove ending \obuild\
19SET obuild_snovis_path=%obuild_snovis_path:~0,-8%
20
21IF "%OBUILD_PLATFORM%" == "" (
22  IF "%OS%" == "" ECHO Environment variable OS not found. & GOTO obuild_return
23  SET obuild_platform=%OS%
24) ELSE (
25  SET obuild_platform=%OBUILD_PLATFORM%
26)
27
28IF "%obuild_platform%" == "" (
29  ECHO obuild_platform variable not defined.
30  GOTO obuild_return
31)
32
33IF "%OBUILD_DIR_BIN%" == "" (
34  SET obuild_dir_bin=bin_obuild
35) ELSE (
36  SET obuild_dir_bin=%OBUILD_DIR_BIN%
37)
38
39IF "%obuild_dir_bin%" == "" (
40  ECHO obuild_dir_bin variable not defined.
41  GOTO obuild_return
42)
43
44IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
45IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" (
46  cl.exe /nologo /DWIN32 /MD /O2 /W3 /GX /GR /Fe"%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" "%obuild_snovis_path%\obuild\cpp\obuild_find.cpp" 1> NUL
47  IF EXIST obuild_find.obj DEL obuild_find.obj
48)
49FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
50cd "%obuild_snovis_path%\%obuild_dir_bin%"
51IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
52FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
53cd "%obuild_pwd_snovis_0%"
54SET obuild_pwd_snovis_0=
55IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
56
57REM # Execute setup of used packages :
58IF NOT EXIST "%obuild_snova_path%\obuild\setup.bat"  ECHO setup.bat not found for package snova.  && GOTO obuild_return
59CALL "%obuild_snova_path%\obuild\setup.bat"
60@ECHO OFF
61
62REM # Set environment variables of this package :
63SET SNOVISROOT=%obuild_snovis_path%
64SET ONXROOT=%OSC_home%\Resources\OnX
65SET ONXLABROOT=%OSC_home%\Resources\OnXLab
66SET G4LABROOT=%obuild_snovis_path%\Resources\G4Lab
67
68IF DEFINED PATH GOTO else_if_path_snovis_4
69  SET PATH=%obuild_snovis_path%\%obuild_dir_bin%
70  GOTO end_if_path_snovis_4
71:else_if_path_snovis_4
72  SET PATH=%PATH%;%obuild_snovis_path%\%obuild_dir_bin%
73:end_if_path_snovis_4
74
75:obuild_return
76
77SET obuild_snovis_path=
78
79REM # FIXME SET obuild_platform=
80REM # FIXME SET obuild_dir_bin=
81
82@ECHO ON
Note: See TracBrowser for help on using the repository browser.