@@ -50,15 +50,15 @@ env LD_LIBRARY_PATH=. ldd $(which kwin_x11) | grep '\./'
5050echo " Deploying into bundle"
5151rm -rf KWin.app || true
5252mkdir -p KWin.app/Resources/lib
53- cp $( which kwin_x11) KWin.app/Resources/KWin
53+ cp $( which kwin_x11) KWin.app/Resources/kwin_x11 # Needs to retain its name in order for correct mesa configs to apply
5454mv lib* KWin.app/Resources/lib/
55- patchelf --set-rpath ' $ORIGIN:' $( patchelf --print-rpath KWin.app/Resources/KWin ) KWin.app/Resources/KWin
55+ patchelf --set-rpath ' $ORIGIN:' $( patchelf --print-rpath KWin.app/Resources/kwin_x11 ) KWin.app/Resources/kwin_x11
5656
5757# Also bundle the rest of KF5 that is not stubbed
58- cp -n $( ldd ' ./KWin.app/Resources/KWin ' | grep KF5 | awk ' {print $3}' | xargs) ./KWin.app/Resources/lib 2> /dev/null
58+ cp -n $( ldd ' ./KWin.app/Resources/kwin_x11 ' | grep KF5 | awk ' {print $3}' | xargs) ./KWin.app/Resources/lib 2> /dev/null
5959# Also bundle kwin libraries
60- cp -n $( ldd ' ./KWin.app/Resources/KWin ' | grep libkwin | awk ' {print $3}' | xargs) ./KWin.app/Resources/lib 2> /dev/null
61- cp -n $( ldd ' ./KWin.app/Resources/KWin ' | grep libkdecorations | awk ' {print $3}' | xargs) ./KWin.app/Resources/lib 2> /dev/null
60+ cp -n $( ldd ' ./KWin.app/Resources/kwin_x11 ' | grep libkwin | awk ' {print $3}' | xargs) ./KWin.app/Resources/lib 2> /dev/null
61+ cp -n $( ldd ' ./KWin.app/Resources/kwin_x11 ' | grep libkdecorations | awk ' {print $3}' | xargs) ./KWin.app/Resources/lib 2> /dev/null
6262
6363# Bundle /usr/local/lib/qt5/plugins/org.kde.kwin.platforms/KWinX11Platform.so
6464mkdir -p ./KWin.app/Resources/plugins/org.kde.kwin.platforms
@@ -68,7 +68,7 @@ cat > ./KWin.app/KWin <<\EOF
6868
6969HERE="$( dirname " $( readlink -f " ${0} " ) " ) "
7070
71- exec env XDG_DATA_DIRS="${HERE} /Resources/share/:${XDG_DATA_DIRS} " env QT_PLUGIN_PATH="${HERE} /Resources/plugins:/usr/local/lib/qt5/plugins/" LD_LIBRARY_PATH="${HERE} /Resources/lib:$LD_LIBRARY_PATH " "${HERE} /Resources/KWin " --replace --lock --no-kactivities "$@ "
71+ exec env XDG_DATA_DIRS="${HERE} /Resources/share/:${XDG_DATA_DIRS} " env QT_PLUGIN_PATH="${HERE} /Resources/plugins:/usr/local/lib/qt5/plugins/" LD_LIBRARY_PATH="${HERE} /Resources/lib:$LD_LIBRARY_PATH " "${HERE} /Resources/kwin_x11 " --replace --lock --no-kactivities "$@ "
7272
7373pkill -f kglobalaccel5
7474kglobalaccel5 &
0 commit comments