Sorry about that, I misinterpreted something I read on how to prevent a Bash SC2115 warning:
Search Criteria
Package Details: unreal-engine 5.5.0-0
Package Actions
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 |
Last Packager: | Neko-san |
Votes: | 76 |
Popularity: | 0.029182 |
First Submitted: | 2016-05-01 18:37 (UTC) |
Last Updated: | 2024-11-16 03:10 (UTC) |
Dependencies (29)
- coreutils (coreutils-gitAUR, coreutils-selinuxAUR, coreutils-uutilsAUR, coreutils-uutils-symlinkAUR)
- dos2unix (dos2unix-gitAUR)
- dotnet-runtime (dotnet-runtime-2.2AUR, dotnet-runtime-3.0AUR, dotnet-runtime-2.1AUR, dotnet-runtime-5.0-binAUR, dotnet-runtime-7.0-binAUR, dotnet-runtime-6.0-binAUR, dotnet-runtime-8.0.300-binAUR, dotnet-runtime-preview-binAUR, dotnet-runtime-binAUR, dotnet-runtime-8.0-binAUR)
- dotnet-sdk (dotnet-sdk-2.2AUR, dotnet-sdk-2.2-vs2017AUR, dotnet-sdk-3.0AUR, dotnet-sdk-2.1AUR, dotnet-sdk-5.0-binAUR, dotnet-sdk-6.0.110-binAUR, dotnet-sdk-7.0-binAUR, dotnet-sdk-6.0-binAUR, dotnet-sdk-8.0.300-binAUR, dotnet-sdk-preview-binAUR, dotnet-sdk-binAUR, dotnet-sdk-8.0-binAUR)
- findutils (findutils-gitAUR, findutils-selinuxAUR)
- icu63AUR (icu-shimAUR)
- lld (llvm-gitAUR)
- openssl (openssl-gitAUR, openssl-staticAUR)
- python (python37AUR, python311AUR, python310AUR)
- sdl2AUR (sdl2-compat-gitAUR, sdl2-gitAUR, sdl2-compat)
- steam
- vulkan-icd-loader (vulkan-icd-loader-gitAUR)
- xdg-user-dirs
- git (git-gitAUR, git-glAUR) (make)
- glibc (glibc-gitAUR, glibc-linux4AUR, glibc-eacAUR) (make)
- grep (grep-gitAUR, grep-compatAUR) (make)
- openssh (openssh-gitAUR, openssh-dnatAUR, openssh-gssapiAUR, openssh-hpn-shimAUR, openssh-selinuxAUR) (make)
- sed (sed-gitAUR) (make)
- wget (wget-gitAUR, wurlAUR) (make)
- clionAUR (optional) – IDE for projects
- cmake (cmake3AUR, cmake-gitAUR) (optional) – build system for projects
- codeliteAUR (codeliteAUR, codelite-unstableAUR, codelite-gitAUR, codelite-binAUR) (optional) – IDE for projects
- fake-ms-fontsAUR (optional) – Font support for "demo/free/sample/example/tutorial" projects
- kdevelop (kdevelop-gitAUR) (optional) – IDE for projects
- pacman-contrib (pacman-contrib-gitAUR) (optional) – for the paccache cleaning hook
- polly (llvm-gitAUR) (optional) – for potentially increased performance
- qt5-base (qt5-base-gitAUR, qt5-base-headlessAUR) (optional) – qmake build system for projects
- qtcreator (qtcreator-prereleaseAUR, qtcreator-patchesAUR) (optional) – IDE for projects
- ttf-ms-fontsAUR (ttf-win7-fontsAUR, ttf-ms-win8AUR, ttf-ms-win8-arabicAUR, ttf-ms-win8-hebrewAUR, ttf-ms-win8-seaAUR, ttf-ms-win8-indicAUR, ttf-ms-win8-japaneseAUR, ttf-ms-win8-koreanAUR, ttf-ms-win8-zh_cnAUR, ttf-ms-win8-zh_twAUR, ttf-ms-win8-thaiAUR, ttf-ms-win8-otherAUR, ttf-ms-win10AUR, fake-ms-fontsAUR, ttf-ms-win10-autoAUR, ttf-ms-win10-cdnAUR, ttf-ms-win11AUR, ttf-ms-win11-autoAUR) (optional) – Font support for "demo/free/sample/example/tutorial" projects
Required by (1)
Sources (6)
Neko-san commented on 2022-12-09 10:12 (UTC)
juancarlospaco commented on 2022-12-09 09:39 (UTC)
pkgrel=24
Errors:
rm: cannot remove 'unreal-engine/src/unreal-engine/*$': No such file or directory
shawarden commented on 2022-12-09 09:37 (UTC) (edited on 2022-12-09 09:38 (UTC) by shawarden)
Looks like a stray $
found its way onto the end of L217
Neko-san commented on 2022-12-09 01:38 (UTC)
Interesting, I didn't know that. I wasn't really familiar with hardlinks, only symlinks.
I'll use that, then; I'll update it in a moment
shawarden commented on 2022-12-09 01:28 (UTC)
cp -l
creates hardlinks so no data duplication occurs. rm
ing the file's duplicate inode does not remove the file, only that inode.
Neko-san commented on 2022-12-09 01:16 (UTC)
I was already aware that using cp
was a "better" alternative here for packaging than mv
in this circumstance, but I can't permit it to be what's used for everyone by default because the engine is massive as-is and doing this would quickly cause people with "just enough" storage space to compile the engine to suddenly not have enough just because the packaging function doubles the engine size before makepkg
is done. Unfortunately, there needs to be a better solution.
Also, thanks for pointing out the issue with the launching mechanism; that's what I get for being half-asleep when I wrote that... Lol
shawarden commented on 2022-12-08 19:16 (UTC) (edited on 2022-12-08 19:16 (UTC) by shawarden)
Depending on how you feel about replacing the mv
s with cp
and rm
since mv
does not merge, if you replace the entire for
loop from L207 to L218 with...
# Copy LocalBuilds to pkg...
cp -flr "${srcdir}"/"${pkgname}"/LocalBuilds/Engine/Linux/* "${pkgdir}"/"${_install_dir}"/
if [ -f "${srcdir}"/"${pkgname}"/LocalBuilds/Engine/Linux/Engine/Binaries/Linux/UnrealEditor ]; then
# Can never be too careful with recursive rm...
rm -r "${srcdir}"/"${pkgname}"/LocalBuilds
fi
# Copy the rest of it to pkg... Should we be overwriting LocalBuilds?
cp -flr "${srcdir}"/"${pkgname}"/* "${pkgdir}"/"${_install_dir}"/
if [ -f "${srcdir}"/"${pkgname}"/Engine/Binaries/Linux/UnrealEditor ]; then
rm -r "${srcdir}"/"${pkgname}"/*
fi
...it produces a working install. Someone else will need to test it as my system is mine, yours is yours.
I have also tweaked L254 & L255 because they were sed
ing the .desktop file instead of the unreal-engine-5.sh
script. The user's .desktop should now work as expected instead of opening itself in an editor. Additionally on L255 the substitution needs to be more specific as there is a second UnrealEditor binary in .../Engine/Saved/...
which would break the script's search of the base install directory.
# Replaced .desktop file with launch script
sed -i "s/ChecksumPlaceholder/${DesktopFileChecksum}/" "${pkgdir}/usr/bin/unreal-engine-5.sh"
# Searching install_dir finds multiple binaries (in Saved) so limit the scope
sed -i "s|InstalledLocationPlaceholder|/${_install_dir}/Engine/Binaries|" "${pkgdir}/usr/bin/unreal-engine-5.sh"
juancarlospaco commented on 2022-12-07 09:08 (UTC)
Any updates about a fix?, I am using only git
and makepkg -si
.
shawarden commented on 2022-12-06 01:39 (UTC) (edited on 2022-12-06 01:41 (UTC) by shawarden)
Still need to prune ${dir}
's excessive expansion, but not from ${dir}
itself:
for dir in "${srcdir}"/"${pkgname}"/*; do
if [ -d "${dir}" ]; then
# Prune leading path.
dest=$(basename $dir)
if [ "${dest}" == "LocalBuilds" ]; then
if [ -d "${dir}"/Engine/Linux/ ]; then
mv "${dir}"/Engine/Linux/* "${pkgdir}/${_install_dir}/"
fi
else
mkdir -p "${pkgdir}/${_install_dir}/${dest}"
mv "${dir}"/* "${pkgdir}/${_install_dir}/${dest}/"
fi
fi
done
Could also rename dir
to source
to remove any ambiguity.
I'm running it at the moment but it takes a few hours...
Neko-san commented on 2022-12-06 00:50 (UTC)
@shawarden You're right about me missing a bash blob there; I often personally make the mistake of assuming bash understands what I mean when I write lines like that and would explain why it's not doing what I expected
Going by that, I'm guessing ${dir}
is interpreted as an entire path rather than a single folder name, which would explain why it appends the path to ${srcdir}
and causes this weird home/user directory nonsense
That said, do you think this would be more in line with what's intended?
(I would test this myself but I need a new storage drive and I won't be able to install the drive to do this until later this week)
for dir in "${srcdir}"/"${pkgname}"/*; do
if [ -d "${dir}" ]; then
if [ "${dir}" == "LocalBuilds" ]; then
if [ -d "${srcdir}/${pkgname}"/LocalBuilds/Engine/Linux/ ]; then
mv "${srcdir}/${pkgname}"/LocalBuilds/Engine/Linux/* "${pkgdir}/${_install_dir}/"
fi
else
mkdir -p "${pkgdir}/${_install_dir}/${dir}"
mv "${dir}"/* "${pkgdir}/${_install_dir}/${dir}"
fi
fi
done
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:
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.