Scripting aligned to the linuxdeploy plugin conda
This commit is contained in:
parent
4c849948af
commit
539f68d198
2 changed files with 18 additions and 13 deletions
12
Dockerfile
12
Dockerfile
|
@ -21,16 +21,10 @@ RUN apt-get update -q && \
|
|||
# Download and install linuxdeploy tool
|
||||
RUN curl -O -J -L https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && \
|
||||
chmod +x linuxdeploy-x86_64.AppImage && \
|
||||
./linuxdeploy-x86_64.AppImage --appimage-extract && \
|
||||
mv squashfs-root /usr/lib/linuxdeploy && \
|
||||
ln -s /usr/lib/linuxdeploy/AppRun /bin/linuxdeploy && \
|
||||
chmod -R 775 /usr/lib/linuxdeploy/ && \
|
||||
mv linuxdeploy-x86_64.AppImage /usr/bin/linuxdeploy && \
|
||||
curl -O -J -L https://raw.githubusercontent.com/TheAssassin/linuxdeploy-plugin-conda/master/linuxdeploy-plugin-conda.sh && \
|
||||
mkdir -p /usr/lib/linuxdeploy/plugins/linuxdeploy-plugin-conda && \
|
||||
mv linuxdeploy-plugin-conda.sh /usr/lib/linuxdeploy/plugins/linuxdeploy-plugin-conda/ && \
|
||||
chmod +x /usr/lib/linuxdeploy/plugins/linuxdeploy-plugin-conda/linuxdeploy-plugin-conda.sh && \
|
||||
ln -s /usr/lib/linuxdeploy/plugins/linuxdeploy-plugin-conda/linuxdeploy-plugin-conda.sh /usr/lib/linuxdeploy/usr/bin/linuxdeploy-plugin-conda && \
|
||||
rm -rf *.AppImage /tmp/* /var/tmp/*
|
||||
mv linuxdeploy-plugin-conda.sh /usr/bin/linuxdeploy-plugin-conda && \
|
||||
chmod +x /usr/bin/linuxdeploy-plugin-conda
|
||||
|
||||
COPY build-docker.sh /build-docker.sh
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
cd "$1"
|
||||
|
||||
|
@ -7,9 +7,10 @@ if [ -z "$BUILD_TYPE" ]; then
|
|||
BUILD_TYPE="Debug"
|
||||
fi
|
||||
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
rm -rf AppDir
|
||||
|
||||
cmake \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
|
@ -35,9 +36,19 @@ cp -r /usr/lib/python3/dist-packages/wx \
|
|||
|
||||
mv AppDir/usr/bin/kicad AppDir/usr/bin/kicad_bin
|
||||
|
||||
echo -ne '#!/bin/sh\nHERE="$(dirname "$(readlink -f "${0}")")/../../"\nexport PYTHON_PATH="${HERE}"/usr/lib/python3:${PYTHON_PATH}\nexec "${HERE}/usr/bin/kicad_bin" "$@"\n' > AppDir/usr/bin/kicad
|
||||
cat << "EOF" > AppDir/usr/bin/kicad
|
||||
#!/bin/sh
|
||||
HERE="$(dirname "$(readlink -f "${0}")")/../../"
|
||||
export PYTHON_PATH="${HERE}"/usr/lib/python3:${PYTHON_PATH}
|
||||
exec "${HERE}/usr/bin/kicad_bin" "$@"
|
||||
EOF
|
||||
|
||||
chmod +x AppDir/usr/bin/kicad
|
||||
|
||||
LD_LIBRARY_PATH=$(pwd)/AppDir/usr/lib/x86_64-linux-gnu/ linuxdeploy --appdir AppDir -d $(pwd)/AppDir/usr/share/applications/kicad.desktop --output appimage
|
||||
LD_LIBRARY_PATH=$(pwd)/AppDir/usr/lib/x86_64-linux-gnu/ linuxdeploy \
|
||||
--appimage-extract-and-run \
|
||||
--appdir AppDir \
|
||||
-d $(pwd)/AppDir/usr/share/applications/kicad.desktop \
|
||||
--output appimage
|
||||
|
||||
mv KiCad*.AppImage ../KiCad-$(git describe).AppImage
|
||||
|
|
Reference in a new issue