Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- Encoding=UTF-8
- echo '******************************************************************'
- echo 'Unreal Engine 4 installer'
- echo 'Tested on Ubuntu 14.04'
- echo
- echo 'Based on: https://wiki.unrealengine.com/Building_On_Linux#Foreword_before_building'
- echo '******************************************************************'
- #---******************************************---
- ptbr_msg[0]='Iniciando a instalação !!'
- ptbr_msg[1]='Será necessário fazer a instalação de diversas dependências pelo apt-get e, em seguida o sistema precisará ser reiniciado.'
- ptbr_msg[2]='Caso essa seja a primeira vez que você instala a UE4 em seu sistema, digite "S" (sem áspas). Caso já tenha previamente executado a instalação das dependências e reiniciado o sistema, digite "n" (sem áspas)'
- ptbr_msg[3]='Deseja prosseguir com a instalação das dependências !? (S / n):'
- ptbr_msg[4]='O sistema precisa ser reiniciado. Deseja prosseguir !? (S / n):'
- ptbr_msg[5]='O sistema será reiniciado agora. Lembre-se: Após a reinicialização, execute novamente este script e digite "n" (sem áspas) quando questionado sobre as dependências.'
- ptbr_msg[6]='Encerrando a execução do script'
- ptbr_msg[7]='Seguindo com a instalação da Unreal Engine 4'
- ptbr_msg[8]='A instalação deverá ser feita na "/home" de seu usuário'
- ptbr_msg[9]='Digite o nome de seu usuário padrão (não o root):'
- ptbr_msg[10]='Gerando os ícones para o menu do Ubuntu'
- ptbr_msg[11]='Instalação finalizada. Forte abraço !!'
- ptbr_msg[12]='Usuário inexistente. Tentar novamente !? (S / n):'
- eng_msg[0]='Starting the installation !!'
- eng_msg[1]='Will need to install several dependencies by apt-get, and then the system must be restarted.'
- eng_msg[2]='If this is the first time you install the EU4 on your system, type "Y" (without quotes). If you have previously run the installation dependencies and restarted the system, type "n" (without quotes)'
- eng_msg[3]='Wish to proceed with the installation of dependencies!? (Y / n):'
- eng_msg[4]='The system must be restarted. Want to keep up!? (Y / n):'
- eng_msg[5]='The system will reboot now. Remember: After reboot, run this script again and type "n" (without quotes) when asked about the dependencies.'
- eng_msg[6]='Closing the script execution'
- eng_msg[7]='Following the installation of the Unreal Engine 4'
- eng_msg[8]='The installation should be done in the "/ home" of your user'
- eng_msg[9]='Enter the name of your default user (not root):'
- eng_msg[10]='Generating the icons to the Ubuntu menu'
- eng_msg[11]='Installation completed. Best regards !!'
- eng_msg[12]='User nonexistent. Try again!? (Y / n):'
- #---******************************************---
- echo
- echo 'Encolha uma linguagem para rodar este script:
- Chose a language to run this script: (p / e)'
- echo 'Digite "p" (sem áspas) para português.
- Type "e" (without quotes) for english.'
- read lang
- lng=${lang,,}
- echo
- if [ $lng == "p" ]; then
- echo ${ptbr_msg[0]}
- else
- echo ${eng_msg[0]}
- fi
- echo
- if [ $lng == "p" ]; then
- echo ${ptbr_msg[1]}
- else
- echo ${eng_msg[1]}
- fi
- if [ $lng == "p" ]; then
- echo ${ptbr_msg[2]}
- else
- echo ${eng_msg[2]}
- fi
- if [ $lng == "p" ]; then
- echo ${ptbr_msg[3]}
- else
- echo ${eng_msg[3]}
- fi
- read depend
- dpd=${depend,,}
- if [[ $dpd == +(s|sim|y|yes) ]]; then
- sudo apt-add-repository ppa:oibaf/graphics-drivers -y && sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get install mono-gmcs mono-xbuild mono-dmcs libmono-corlib4.0-cil libmono-system-data-datasetextensions4.0-cil libmono-system-web-extensions4.0-cil libmono-system-management4.0-cil libmono-system-xml-linq4.0-cil cmake dos2unix clang-3.3 libfreetype6-dev libsdl2-dev libgtk-3-dev libmono-microsoft-build-tasks-v4.0-4.0-cil kdevelop
- echo
- if [ $lng == "p" ]; then
- echo ${ptbr_msg[4]}
- else
- echo ${eng_msg[4]}
- fi
- read resp
- rsp=${resp,,}
- if [[ $rsp == +(s|sim|y|yes) ]]; then
- if [ $lng == "p" ]; then
- echo ${ptbr_msg[5]}
- else
- echo ${eng_msg[5]}
- fi
- sudo reboot
- else
- if [ $lng == "p" ]; then
- echo ${ptbr_msg[6]}
- else
- echo ${eng_msg[6]}
- fi
- exit
- fi
- else
- if [ $lng == "p" ]; then
- echo ${ptbr_msg[7]}
- else
- echo ${eng_msg[7]}
- fi
- fi
- HomeInstall() {
- echo
- if [ $lng == "p" ]; then
- echo ${ptbr_msg[8]}
- else
- echo ${eng_msg[8]}
- fi
- if [ $lng == "p" ]; then
- echo ${ptbr_msg[9]}
- else
- echo ${eng_msg[9]}
- fi
- read user
- usr=${user,,}
- if [ ! -z `cat /etc/passwd|grep $usr` ]; then
- clear
- hdir=/home/$usr
- cd $hdir
- git clone git@github.com:EpicGames/UnrealEngine.git
- cd UnrealEngine
- ./Setup.sh
- git pull
- ./GenerateProjectFiles.sh
- make SlateViewer
- make ShaderCompileWorker UnrealLightmass UnrealPak UE4Editor
- if [ $lng == "p" ]; then
- echo
- echo ${ptbr_msg[10]}
- else
- echo
- echo ${eng_msg[10]}
- fi
- GScript=$'#!/bin/bash\rcd /home/'$usr$'/UnrealEngine/Engine/Binaries/Linux && ./UE4Editor'
- GMenu=$'[Desktop Entry]\rName=UE4Editor\rComment=Unreal Engine 4 - game build engine\rExec=UE4Editor\rGenericName=UE4Editor\rCategories=IDE;Development;Utility;\rIcon='$hdir$'/UnrealEngine/Engine/Content/Slate/Testing/UE4Icon.png\rGenericName=UE4Editor\rNoDisplay=false\rStartupNotify=false\rTerminal=0\rTerminalOptions=\rType=Application'
- SDir=/usr/local/bin
- DDir=/usr/share/applications
- mkdir cdicon
- touch cdicon/UE4Editor
- touch cdicon/UE4Editor.desktop
- echo $GScript >> cdicon/UE4Editor
- echo $GMenu >> cdicon/UE4Editor.desktop
- chmod +x cdicon/UE4Editor
- sudo mv cdicon/UE4Editor $SDir
- sudo mv cdicon/UE4Editor.desktop $DDir
- rm -rf cdicon/
- if [ $lng == "p" ]; then
- echo
- echo ${ptbr_msg[11]}
- else
- echo
- echo ${eng_msg[11]}
- fi
- else
- if [ $lng == "p" ]; then
- echo
- echo ${ptbr_msg[12]}
- else
- echo
- echo ${eng_msg[12]}
- fi
- read resp
- rsp=${resp,,}
- if [[ $rsp == +(s|sim|y|yes) ]]; then
- HomeInstall
- else
- if [ $lng == "p" ]; then
- echo ${ptbr_msg[6]}
- else
- echo ${eng_msg[6]}
- fi
- exit
- fi
- fi
- }
- HomeInstall
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement