Skip to content

Commit

Permalink
fix(snap): move files to snap/local [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
daiyam committed Feb 7, 2024
1 parent 55037ab commit a502d08
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions stores/snapcraft/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ fi
# Unpacking .deb
dpkg -x "${DEB_ARCHIVE}" out/deb

mkdir -p out/snap/usr/share
mv "out/deb/usr/share/${BINARY_NAME}" "out/snap/usr/share/${BINARY_NAME}"
mkdir -p out/snap/local/usr/share
mv "out/deb/usr/share/${BINARY_NAME}" "out/snap/local/usr/share/${BINARY_NAME}"

# Prepare snapcraft.yaml
cp ${VSCODE_QUALITY}/snapcraft.yaml out/snap/snapcraft.yaml
Expand All @@ -47,7 +47,7 @@ replace "s|@@SNAP_NAME@@|${BINARY_NAME}|g" out/snap/snapcraft.yaml
replace "s|@@SNAP_VERSION@@|${SNAP_VERSION}|g" out/snap/snapcraft.yaml

# Prepare electron-launch
cp ${VSCODE_QUALITY}/electron-launch out/snap/electron-launch
cp ${VSCODE_QUALITY}/electron-launch out/snap/local/electron-launch

# Prepare GUI
cp "../../src/${VSCODE_QUALITY}/resources/linux/code.png" "out/snap/gui/${BINARY_NAME}.png"
Expand Down
8 changes: 4 additions & 4 deletions stores/snapcraft/insider/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ parts:
- patchelf
override-build: |
snapcraftctl build
patchelf --force-rpath --set-rpath '$ORIGIN/../../lib/x86_64-linux-gnu:$ORIGIN:/snap/core20/current/lib/x86_64-linux-gnu' $SNAPCRAFT_PART_INSTALL/snap/usr/share/@@SNAP_NAME@@/chrome_crashpad_handler
patchelf --force-rpath --set-rpath '$ORIGIN/../../lib/x86_64-linux-gnu:$ORIGIN:/snap/core20/current/lib/x86_64-linux-gnu' $SNAPCRAFT_PART_INSTALL/snap/local/usr/share/@@SNAP_NAME@@/chrome_crashpad_handler
cleanup:
after:
Expand All @@ -70,12 +70,12 @@ parts:
for snap in "core20"; do
cd "/snap/$snap/current" && find . -type f,l -exec rm -f "$SNAPCRAFT_PRIME/{}" \;
done
patchelf --print-rpath $SNAPCRAFT_PRIME/snap/usr/share/@@SNAP_NAME@@/chrome_crashpad_handler
patchelf --print-rpath $SNAPCRAFT_PRIME/snap/local/usr/share/@@SNAP_NAME@@/chrome_crashpad_handler
apps:
@@SNAP_NAME@@:
command: electron-launch $SNAP/snap/usr/share/@@SNAP_NAME@@/bin/@@SNAP_NAME@@ --no-sandbox
command: electron-launch $SNAP/snap/local/usr/share/@@SNAP_NAME@@/bin/@@SNAP_NAME@@ --no-sandbox
common-id: @@SNAP_NAME@@.desktop

url-handler:
command: electron-launch $SNAP/snap/usr/share/@@SNAP_NAME@@/bin/@@SNAP_NAME@@ --open-url --no-sandbox
command: electron-launch $SNAP/snap/local/usr/share/@@SNAP_NAME@@/bin/@@SNAP_NAME@@ --open-url --no-sandbox
8 changes: 4 additions & 4 deletions stores/snapcraft/stable/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ parts:
- patchelf
override-build: |
snapcraftctl build
patchelf --force-rpath --set-rpath '$ORIGIN/../../lib/x86_64-linux-gnu:$ORIGIN:/snap/core20/current/lib/x86_64-linux-gnu' $SNAPCRAFT_PART_INSTALL/snap/usr/share/@@SNAP_NAME@@/chrome_crashpad_handler
patchelf --force-rpath --set-rpath '$ORIGIN/../../lib/x86_64-linux-gnu:$ORIGIN:/snap/core20/current/lib/x86_64-linux-gnu' $SNAPCRAFT_PART_INSTALL/snap/local/usr/share/@@SNAP_NAME@@/chrome_crashpad_handler
cleanup:
after:
Expand All @@ -70,12 +70,12 @@ parts:
for snap in "core20"; do
cd "/snap/$snap/current" && find . -type f,l -exec rm -f "$SNAPCRAFT_PRIME/{}" \;
done
patchelf --print-rpath $SNAPCRAFT_PRIME/snap/usr/share/@@SNAP_NAME@@/chrome_crashpad_handler
patchelf --print-rpath $SNAPCRAFT_PRIME/snap/local/usr/share/@@SNAP_NAME@@/chrome_crashpad_handler
apps:
@@SNAP_NAME@@:
command: electron-launch $SNAP/snap/usr/share/@@SNAP_NAME@@/bin/@@SNAP_NAME@@ --no-sandbox
command: electron-launch $SNAP/snap/usr/local/share/@@SNAP_NAME@@/bin/@@SNAP_NAME@@ --no-sandbox
common-id: @@SNAP_NAME@@.desktop

url-handler:
command: electron-launch $SNAP/snap/usr/share/@@SNAP_NAME@@/bin/@@SNAP_NAME@@ --open-url --no-sandbox
command: electron-launch $SNAP/snap/usr/local/share/@@SNAP_NAME@@/bin/@@SNAP_NAME@@ --open-url --no-sandbox

0 comments on commit a502d08

Please sign in to comment.