1
0
This repository has been archived on 2024-10-30. You can view files and clone it, but cannot push or open issues or pull requests.
SEm-ExamMidterm2024/hdl_designer.bash
2024-03-22 13:16:48 +01:00

67 lines
1.9 KiB
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
#================================================================================
# hdl_designer.bash - Starts HDL designer from the "Prefs" folder
#
SEPARATOR='--------------------------------------------------------------------------------'
INDENT=' '
#--------------------------------------------------------------------------------
# Parse command line options
#
usage='Usage: hdl_designer.bash [-v] [-h]'
usage="$usage\n\t[-d designDirectory] [-u userPrefsDirectory]"
design_directory=`pwd`
design_directory="$design_directory/Prefs"
user_prefs_directory="$design_directory/hds_user-linux"
while getopts "d:u:vh" options; do
case $options in
d ) design_directory=$OPTARG;;
u ) user_prefs_directory=$OPTARG;;
v ) verbose=1;;
h ) echo -e $usage
exit 1;;
* ) echo -e $usage
exit 1;;
esac
done
#================================================================================
# Main script
#
if [ -n "$verbose" ] ; then
echo "$SEPARATOR"
echo "Launching HDL Designer"
echo "${INDENT}Start directory is $design_directory"
echo "${INDENT}User prefs directory is $user_prefs_directory"
fi
#-------------------------------------------------------------------------------
# System environment variables
#
export HDS_HOME=/usr/opt/HDS
export LC_ALL=C
export LD_LIBRARY_PATH=/usr/openwin/lib:/usr/lib:/usr/dt/lib:/usr/opt/HDS/ezwave/lib:/usr/opt/HDS/bin
export MGLS_HOME=/usr/opt/HDS/license/mgls
#-------------------------------------------------------------------------------
# Project environment variables
#
export HDS_LIBS="$design_directory/hds.hdp"
export HDS_USER_HOME="$user_prefs_directory"
export HDS_TEAM_HOME="$user_prefs_directory/../hds_team"
export SIMULATION_DIR="$design_directory/../Simulation"
export SCRATCH_DIR='/tmp'
#-------------------------------------------------------------------------------
# Launch application
#
hdldesigner &