Hi,
I’ve installed Unreal Engine via the process of…
Downloading the Source
Then from…
https://wiki.archlinux.org/title/Unreal_Engine_4#Compile_manually_from_source_code
Install via
$ ./Setup.sh
Generate project files:
$ ./GenerateProjectFiles.sh
Then compile:
$ make -j6
This installed Unreal Engine and placed a shortcut in the menu.
Unfortunately the shortcut is broken because the drive I compiled it on is labelled with spaces in it, i.e Project Resources 1. My bad, I should have renamed them to use underscores or periods, these are Windows NTFS drives.
I think it might be sensible to remove the install and start again, but I don’t know how to uninstall this now
What I want to do is compile and install UE 4.6, 4.7 and 5 and have them as three separate icons on my desktop linking to the three separate builds in three separate folders, in a manner that will allow me to uninstall them easily if I want to.
From doing some reading up on this I get the impression that I could write a PKGBUILD, i.e a shell script containing the build information required by Arch Linux packages. This will allow me to use pacman to easily install and uninstall packages.
I’m struggling to grasp how I can go from the compilation/installation process above to one that uses a PKGBUILD file.
From Creating a PKGBUILD to Make Packages for Arch Linux - It's FOSS and PKGBUILD - ArchWiki
- Write a PKGBUILD within which you write exactly how you installed the program inside the build() function.
Go into the UE4.6 source code folder and create two files
touch PKGBUILD UE4.26.sh
Edit PKGBUILD
pkgname="UnrealEngine4.26"
pkgver="4.26.0"
pkgdesc="Unreal Engine 4.26"
arch=("x86_64")
license=("custom")
Fine so far, but after this bit in the guide though I’m getting confused with the next bit that’s meant to go in the PKGBUILD so would really appreciate some guidance. I was hoping to get some guidance from looking at the PKGBUILD in the AUR for 4.26 but that looks extremely confusing. Would anyone be able to tell me what the paragraph below should look like?
PKGBUILD
file.txt
src/file.sh
source=("UE4.26.sh"
sha512sums=("SKIP")
package() {
echo 'Hello to you!' > "${srcdir}/hello-world.sh"
mkdir -p "${pkgdir}/usr/bin"
cp "${srcdir}/hello-world.sh" "${pkgdir}/usr/bin/hello-world"
chmod +x "${pkgdir}/usr/bin/hello-world"
}
Stage 2 seems pretty straightforward to follow.
- makepkg
This will create a pkgname.pkg.tar.zst file that can then be installed with pacman.
(Install a ‘local’ package that is not from a remote repository (e.g. the package is from the AUR)
pacman -Uf <pkg.tar.gz>
To remove a single package, leaving all of its dependencies installed
pacman -R <pkgname>
To remove a package and its dependencies which are not required by any other installed package:
pacman -Rs package_name
Sorry if this is long winded. I’ve just started with Manjaro, and my first attempt at compiling anything was a couple of weeks ago on Ubuntu, so I’m still learning.
Thanks