Package Details: unreal-engine 5.5.0-0

Git Clone URL: https://aur.archlinux.org/unreal-engine.git (read-only, click to copy)
Package Base: unreal-engine
Description: A 3D game engine by Epic Games which can be used non-commercially for free.
Upstream URL: https://www.unrealengine.com/
Keywords: 3D engine game ue5 Unreal
Licenses: GPL3, custom:UnrealEngine
Submitter: acerix
Maintainer: Shatur (Neko-san)
Last Packager: Neko-san
Votes: 76
Popularity: 1.03
First Submitted: 2016-05-01 18:37 (UTC)
Last Updated: 2024-11-16 03:10 (UTC)

Dependencies (29)

Required by (1)

Sources (6)

Pinned Comments

Neko-san commented on 2022-11-01 02:32 (UTC) (edited on 2023-06-25 01:19 (UTC) by Neko-san)

@juancarlospaco this is easily done on your own system, not in a PKGBUILD, given that building packages runs as root:

sudo groupadd unrealengine-users
sudo usermod -aG unrealengine-users (your-username)
sudo chown -R root:unrealengine-users /opt/unreal-engine
sudo chmod -R 775 /opt/unreal-engine

Permission issues like this are already mentioned on the UE Arch wiki page: https://wiki.archlinux.org/title/Unreal_Engine_4#Installing_from_the_AUR

This is a user system problem; I already did what I could without needing users to do the above by giving the 777 permissions. If it still gives you trouble, you'll have to use the example to solve it or change the install location to somewhere you have user permissions by default (as I cannot do this for you).

zerophase commented on 2021-05-27 08:15 (UTC) (edited on 2021-05-30 08:41 (UTC) by zerophase)

Will update to 5.0 when it is released.

Latest Comments

« First ‹ Previous 1 .. 23 24 25 26 27 28 29 30 31 32 33 .. 81 Next › Last »

chovy commented on 2022-04-17 01:41 (UTC)

5.0 is out now

OdinVex commented on 2022-04-16 17:51 (UTC) (edited on 2022-04-16 17:52 (UTC) by OdinVex)

@Pulec, It compiles for me take 20 minutes, but I run on an NVMe 3GB/s read/2.5GB/s write, Ryzen 7 1700 (this is a laptop). Comes to ~93GB with extra plugins, too. Hm. Edit: I manually build, I don't use the AUR.

Pulec commented on 2022-04-16 16:47 (UTC)

Thanks @ Neko-san!

Things to note: src can swell up to 150GB, then another 50GB is duplicated when the build is finished, which is then moved to pkg. Amazingly the package gets compressed to 15GB. So prepare plenty of space. On R5 3600 no OC, 32GB DDR4 2400, and SSD it took ~6 hours.

I ran out of space (or canceled the process) during git clone in prepare() and when I tried to continue I got from git: fatal: Invalid refspec '+refs/heads/:refs/remotes/:origin/'. I suspect something funky with 'rm -f .git/index.lock' goes on.

BTW: Be careful when changing _install_dir. I had a silly link /d/$drive/ where /d is a link to -> /run/media/$user. So it was _install_dir="d/toshiba_512/${pkgname}", the package was built fine but it didn't sit well with pacman. Luckily my foolishness was stopped by not having 50GB free on /. I fixed that using hard mount /toshiba_512 so _install_dir="toshiba_512/${pkgname}".

To get these pkg changes I tried --repackage but that just quickly went through and done. So I had to run --build again... Twice.

The first re-run was just over an hour as the build() focused on UnrealGame and not on UnrealEditor, second re-run basically rebuilt the whole thing, so 6 hours, yay.

I put the whole uncleaned 200GB folder to 7z archive, will see how 'fun' will be to build updates.

Tak2Hu commented on 2022-04-12 13:26 (UTC)

Thanks @ Neko-san!

Kamack38 commented on 2022-04-06 18:34 (UTC)

Unreal Engine 5.0 has been finally released!

Neko-san commented on 2022-04-06 17:57 (UTC) (edited on 2022-04-29 20:51 (UTC) by Neko-san)

This updated PKGBUILD should be fine for the new officially released UE5 source; just compiled it myself

# Maintainer: Dylan Ferris <dylan@psilly.com>
# Maintainer: Michael Lojkovic <mikelojkovic@gmail.com>
# Maintainer: Shatur95 <genaloner@gmail.com>

# The source is about 200 MiB, with an extra ~11 GiB of dependencies downloaded in Setup.sh, and may take several hours to compile.
# If you want to turn on additional patches there are switches below.
pkgname=unreal-engine
pkgver=5.0
pkgrel=1
pkgdesc='A 3D game engine by Epic Games which can be used non-commercially for free.'
arch=('x86_64' 'x86_64_v3')
url=https://www.unrealengine.com/
makedepends=('git' 'openssh')
depends=('icu' 'sdl2' 'python' 'lld' 'xdg-user-dirs' 'dos2unix')
optdepends=('qt5-base: qmake build system for projects'
            'cmake: build system for projects'
            'qtcreator: IDE for projects'
            'codelite: IDE for projects'
            'kdevelop: IDE for projects'
            'clion: IDE for projects')
license=('custom:UnrealEngine')
source=('com.unrealengine.UE4Editor.desktop'
        'ccache_executor.patch'
        'stop_mono_clone.patch')
sha256sums=('15e9f9d8dc8bd8513f6a5eca990e2aab21fd38724ad57d213b06a6610a951d58'
            '33982486f7fafac35a33dfa37c85cfba8543aa78b5fe13c395d9cccf691ef4b3'
            'aa9eb83c9f58c539d3cd43e919a4ebd6714c0aa2d32eb9b320049cf04dd01587')
            #'960c5a100e0c3732f3c73fb645d3989d39acf4576d74615bbef38ebeee008b90')
# Not sure if compiling Unreal with LTO is legal? Lot's of different proprietary software goes into Unreal
options=('!strip' 'staticlibs' '!lto') # Package is 3 Gib smaller with "strip" but it takes a long time and generates many warnings

## Uncomment this if you prefer opendoas; the benefit here is that doas won't time out on you if you wait too long to authenticate after compilation
#PACMAN_AUTH=(doas)

## Set this value to "true"" if the CPU architecture named for the build is desired.
## IF MORE THAN ONE is listed below, ONLY select ONE architecture type.

## Note: the resulting package will still be named containing "x86_64" unless the build was done with an "official" Arch distro for that architecture (like Arch ARM - [I don't advise using Arch ARM though])
## or if you manage to trick your Arch installation to accept other architecture extensions by fiddling with the $CARCH variable and /etc/pacman.conf - this method has flaws, namely:
## that it doesn't work with "makechrootpkg" - though, this PKGBUILD doesn't work in with this method anyway because of Github SSH Agent nonsense

x86_64_v3=false

if [[ ${x86_64_v3} == true ]]
then
  export CFLAGS="-march=x86-64-v3 -mtune=x86-64-v3 -O3 -pipe -fno-plt -minline-all-stringops -fexceptions -Wall \
          -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
          -fstack-clash-protection -fcf-protection"
  export CXXFLAGS="${CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS"
  export LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now"
fi

## Patches probably don't work for this build
#_ccache_support=false # Patches for ccache. More optimizations might be needed.
#_system_mono=false # Uses System mono for unreal. Must set UE_USE_SYSTEM_MONO in your environment for it to work after install.
_install_dir="opt/${pkgname}" # Default engine installation directory. Can be useful if you do not have a lot of space in /opt directory.

if [[ ${_ccache_support} == true ]]
then
  depends+=(ccache)
fi

if [[ ${_system_mono} == true ]]
then
  depends+=(mono mono-msbuild)
fi

prepare() {
  # Check access to the repository
  if ! git ls-remote git@github.com:EpicGames/UnrealEngine &>/dev/null
  then
    error 'You must register at unrealengine.com and link your github account to access this private repo. See the wiki for more info: https://wiki.archlinux.org/index.php/Unreal_Engine_4'
    exit 1
  fi

  # Download Unreal Engine source or update if the folder exists
  if [[ ! -d ${pkgname} ]]
  then
    #git clone --depth=1 --branch=ue5-main git@github.com:EpicGames/UnrealEngine {$pkgname}
    git clone --depth=1 --branch=5.0.0-release git@github.com:EpicGames/UnrealEngine ${pkgname}
    cd ${pkgname}
  else
    cd ${pkgname}
    rm -f .git/index.lock
    git fetch --depth=1 origin tag @{upstream}
    git reset --hard @{upstream}
  fi

  # Apply custom patches
  #patch -p1 -i "$srcdir/clang_path_fix.patch" # Replace Windows specific search with the correct path (used for -mode=GenerateClangDatabase in UBT)
  if [[ ${_system_mono} == true ]]
  then
    export UE_USE_SYSTEM_MONO=1
    patch -p1 -i "$srcdir/stop_mono_clone.patch"
  fi
  if [[ ${_ccache_support} == true ]]
  then
    patch -p1 -i "$srcdir/ccache_executor.patch"
  fi

  # Qt Creator source code access
  if [[ ! -d Engine/Plugins/Developer/QtCreatorSourceCodeAccess ]]
  then
    git -C Engine/Plugins/Developer clone --depth=1 git@github.com:fire/QtCreatorSourceCodeAccess
  fi

  # For some reason, despite this file explicitly asking not to be removed, it was removed from the UE5 source; it has to be re-added or the build will fail
  if [[ ! -f ${pkgname}/Engine/Source/ThirdParty/Linux/HaveLinuxDependencies ]]
  then
    mkdir -p ${pkgname}/Engine/Source/ThirdParty/Linux/
    touch ${pkgname}/Engine/Source/ThirdParty/Linux/HaveLinuxDependencies
    sed -i "1c\This file must have no extension so that GitDeps considers it a binary dependency - it will only be pulled by the Setup script if Linux is enabled. Please do not remove this file." ${pkgname}/Engine/Source/ThirdParty/Linux/HaveLinuxDependencies
  fi

  ./Setup.sh
}

build() {
  cd ${pkgname}
  Engine/Build/BatchFiles/RunUAT.sh BuildGraph -target="Make Installed Build Linux" -script=Engine/Build/InstalledEngineBuild.xml -set:WithDDC=false -set:HostPlatformOnly=false -set:WithLinux=true -set:WithWin64=true -set:WithWin32=false -set:WithMac=false -set:WithAndroid=false -set:WithIOS=false -set:WithTVOS=false -set:WithLumin=false -set:WithHTML5=false
}

package() {
# Desktop entry
if [[ -f com.unrealengine.UE4Editor.desktop ]] || [[ -f com.unrealengine.UE5Editor.desktop ]] && [[ "${_install_dir}" != "opt/${pkgname}" ]] 
then
  sed -i "5c\Path=/${_install_dir}/Engine/Binaries/Linux/" com.unrealengine.UE4Editor.desktop
  sed -i "6c\Exec=/${_install_dir}/Engine/Binaries/Linux/UnrealEditor %F" com.unrealengine.UE4Editor.desktop
  sed -i 's/Unreal Engine 4 Editor/Unreal Engine 5 Editor/g' com.unrealengine.UE4Editor.desktop
  sed -i 's/Icon=ue4editor/Icon=ue5editor/g' com.unrealengine.UE4Editor.desktop
  if [[ -f com.unrealengine.UE4Editor.desktop ]]
  then
    mv com.unrealengine.UE4Editor.desktop com.unrealengine.UE5Editor.desktop
  fi
  install -Dm775 com.unrealengine.UE5Editor.desktop "${pkgdir}/usr/share/applications/com.unrealengine.UE5Editor.desktop"
else
  if [[ -f com.unrealengine.UE4Editor.desktop ]] || [[ -f com.unrealengine.UE5Editor.desktop ]] && [[ "${_install_dir}" == "opt/${pkgname}" ]]
  then
    sed -i "5c\Path=/opt/${pkgname}/Engine/Binaries/Linux/" com.unrealengine.UE4Editor.desktop
    sed -i "6c\Exec=/opt/${pkgname}/Engine/Binaries/Linux/UnrealEditor %F" com.unrealengine.UE4Editor.desktop
    sed -i 's/Unreal Engine 4 Editor/Unreal Engine 5 Editor/g' com.unrealengine.UE4Editor.desktop
    sed -i 's/Icon=ue4editor/Icon=ue5editor/g' com.unrealengine.UE4Editor.desktop
    if [[ -f com.unrealengine.UE4Editor.desktop ]]
    then
      mv com.unrealengine.UE4Editor.desktop com.unrealengine.UE5Editor.desktop
    fi
    install -Dm775 com.unrealengine.UE5Editor.desktop "${pkgdir}/usr/share/applications/com.unrealengine.UE5Editor.desktop"
  fi
fi

  cd ${pkgname}

  # Icon for Desktop entry
  install -Dm770 Engine/Source/Programs/UnrealVS/UnrealVS.2022/Resources/Preview.png "${pkgdir}/usr/share/pixmaps/ue5editor.png"

  # License
  install -Dm770 LICENSE.md "${pkgdir}/usr/share/licenses/UnrealEngine/LICENSE.md"

  # Engine
  install -dm770 "${pkgdir}/${_install_dir}/Engine"
  mv LocalBuilds/Engine/Linux/* "${pkgdir}/${_install_dir}"
}

Sematre commented on 2022-04-05 19:22 (UTC)

Unreal Engine 5 was released today

Neko-san commented on 2022-01-18 16:05 (UTC)

@Galaxy That folder is a product of Unreal; delete it at your own consequence

In addition, that's just how fat Unreal normally is; if you don't like it, I advise not using Unreal Lmao

Galaxy commented on 2022-01-18 12:01 (UTC)

@Neko-san, I find many files are not necessary, like this pkg/unreal-engine/opt/unreal-engine/Engine/Plugins/ScriptPlugin/Intermediate/Build/LinuxArm64/93821A52/UnrealGame/Development/ScriptPlugin/Module.ScriptPlugin.cpp.o.

Would you add some command to delete those Intermediate dir ?

I got a Installed Size of 47344.48 MiB, which is too huge.

Neko-san commented on 2022-01-18 04:41 (UTC)

@Galaxy For now, just delete any excess folders in your building folder to clone it fresh from the source; I'll check that out when I have a moment

Another way to basically do this is using: makepkg -sfcCr or makepkg -sfcCri instead of makepkg -si

If you use a AUR helper, you may have to find the equivalent settings or flags for it to reproduce that automatic behavior