From f7dca65739afb812cbf5f0c8096c262442d6e0a8 Mon Sep 17 00:00:00 2001 From: sheldonmlee Date: Sat, 6 Mar 2021 22:05:59 +0800 Subject: [PATCH] Added unreal compile script. --- .custom_bash_scripts | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.custom_bash_scripts b/.custom_bash_scripts index 1051256..df5f375 100644 --- a/.custom_bash_scripts +++ b/.custom_bash_scripts @@ -1,6 +1,6 @@ #!/bin/bash -#screenshots using scrot +# screenshots using scrot scrot_dir=$HOME/screenshots/ date_format='%Y-%m-%d_%H-%M-%S' s_scrot() { @@ -17,13 +17,13 @@ f_scrot() { xclip -sel clip $path -t image/png } -#cd into config dir +# cd into config dir cfdir() { cd $HOME/.config/$1 } -#sshfs into newnumyspace +# sshfs into newnumyspace nnms_fs() { dir_name="newnumyspace" @@ -40,8 +40,22 @@ nnms_fs() fi } -#pacman list sizes +# pacman list sizes pacsizes() { pacman -Qi $1 | awk '/^Name/{name=$3} /^Installed Size/{size=$4$5; print size, name;}' | sort -h } + +# unreal compile +# Courtesy of mrzapp from https://forums.unrealengine.com/development-discussion/c-gameplay-programming/97022-linux-how-to-compile-c-scripts-from-terminal + +function unrealbuild { + UNR_PATH=/opt/UnrealEngine; + RANDNUM=$(( ( RANDOM % 1000 ) + 1000 )); + CURR_DIR=`pwd`; + PROJ_NAME=$(basename ${1%.uproject}); + + echo $RANDNUM + + ${UNR_PATH}/Engine/Build/BatchFiles/Linux/RunMono.sh ${UNR_PATH}/Engine/Binaries/DotNET/UnrealBuildTool.exe $PROJ_NAME -ModuleWithSuffix $PROJ_NAME Linux Development -editorrecompile -canskiplink "${CURR_DIR}/${PROJ_NAME}.uproject" -progress +}