Better build script
This commit is contained in:
parent
2eb2a0c047
commit
07ff7f3ad1
|
@ -0,0 +1,29 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
if exist "crosswalks.obj" del crosswalks.obj
|
||||||
|
|
||||||
|
if exist "FBX2OBJ.exe" (
|
||||||
|
if exist "%1.fbx" (
|
||||||
|
rem convert FBX to OBJ
|
||||||
|
FBX2OBJ.exe %1.fbx %1.obj
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist "%1.xodr" (
|
||||||
|
rem parse openDRIVE crosswalks (generate crosswalks.obj)
|
||||||
|
python get_xodr_crosswalks.py -f %1.xodr
|
||||||
|
) else (
|
||||||
|
echo "XODR file doesn't exist, ignoring crosswalks from openDRIVE"
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist "crosswalks.obj" (
|
||||||
|
rem join both OBJ
|
||||||
|
python addOBJ.py %1.obj crosswalks.obj
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist "%1.obj" (
|
||||||
|
if exist "RecastBuilder.exe" (
|
||||||
|
rem calculate the BIN file (result is same name .BIN)
|
||||||
|
RecastBuilder.exe %1.obj
|
||||||
|
)
|
||||||
|
)
|
|
@ -1,21 +1,18 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
# check if the FBX file exist
|
if [ -f "crosswalks.obj" ]; then
|
||||||
if [ ! -f "$1.fbx" ]; then
|
rm crosswalks.obj
|
||||||
echo Nothing to do: there is no FBX file
|
|
||||||
exit
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# check if the FBX file exist
|
||||||
|
if [ -f "FBX2OBJ" ]; then
|
||||||
|
if [ -f "$1.fbx" ]; then
|
||||||
# prepare to load .SO from current folder
|
# prepare to load .SO from current folder
|
||||||
export LD_LIBRARY_PATH="./"
|
export LD_LIBRARY_PATH="./"
|
||||||
# convert FBX to OBJ
|
# convert FBX to OBJ
|
||||||
chmod +x FBX2OBJ
|
chmod +x FBX2OBJ
|
||||||
./FBX2OBJ "$1.fbx" "$1.obj"
|
./FBX2OBJ "$1.fbx" "$1.obj"
|
||||||
|
fi
|
||||||
# check if the OBJ file exist
|
|
||||||
if [ ! -f "$1.obj" ]; then
|
|
||||||
echo Nothing to do: conversion from FBX to OBJ failed
|
|
||||||
exit
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check if the XODR file exist
|
# check if the XODR file exist
|
||||||
|
@ -30,11 +27,12 @@ fi
|
||||||
if [ -f "crosswalks.obj" ]; then
|
if [ -f "crosswalks.obj" ]; then
|
||||||
# join both OBJ
|
# join both OBJ
|
||||||
python addOBJ.py "$1.obj" crosswalks.obj
|
python addOBJ.py "$1.obj" crosswalks.obj
|
||||||
rm crosswalks.obj
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f "$1.obj" ]; then
|
||||||
|
if [ -f "RecastBuilder" ]; then
|
||||||
# calculate the BIN file (result is same name .BIN)
|
# calculate the BIN file (result is same name .BIN)
|
||||||
chmod +x RecastBuilder
|
chmod +x RecastBuilder
|
||||||
./RecastBuilder "$1.obj"
|
./RecastBuilder "$1.obj"
|
||||||
|
fi
|
||||||
echo Success!
|
fi
|
||||||
|
|
Loading…
Reference in New Issue