vscode-with-extensions: respect macos package bundle's CFBundleExecutable value when generating the wrapper

This commit is contained in:
Charterino
2026-04-08 03:20:26 +03:00
parent 2bba87e628
commit 1479900db1

View File

@@ -92,12 +92,14 @@ runCommand "${wrappedPkgName}-with-extensions-${wrappedPkgVersion}"
mkdir -p $out/bin/
mkdir -p "$out/Applications/${longName}.app/Contents/MacOS"
binary_name="$(awk -F'[<>]' '/CFBundleExecutable/{getline; print $3}' '${vscode}/Applications/${longName}.app/Contents/Info.plist')"
for path in PkgInfo Frameworks Resources _CodeSignature Info.plist; do
ln -s "${vscode}/Applications/${longName}.app/Contents/$path" "$out/Applications/${longName}.app/Contents/"
done
makeWrapper "${vscode}/bin/${executableName}" "$out/bin/${executableName}" ${extensionsFlag}
makeWrapper "${vscode}/Applications/${longName}.app/Contents/MacOS/Electron" "$out/Applications/${longName}.app/Contents/MacOS/Electron" ${extensionsFlag}
makeWrapper "${vscode}/Applications/${longName}.app/Contents/MacOS/$binary_name" "$out/Applications/${longName}.app/Contents/MacOS/$binary_name" ${extensionsFlag}
''
else
''