Update FreeCAD app to deb version

pull/438/head
Botspot 3 years ago
parent fea8f5e2e6
commit 0b18031e02

@ -1,4 +0,0 @@
This version of FreeCAD has already been compiled for Raspberry Pi.
Botspot followed Scruss's compilation instructions for FreeCAD 0.18.4, on a Raspberry Pi 4B4, on 9/21/2020.
To run: Menu -> Graphics -> FreeCAD
To run in a terminal: FreeCAD

Binary file not shown.

Before

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

@ -1,24 +0,0 @@
#!/bin/bash
DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")"
function error {
echo -e "\\e[91m$1\\e[39m"
exit 1
}
# Get dependencies
"${DIRECTORY}/pkg-install" "cmake build-essential libtool lsb-release swig libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-graph-dev libboost-iostreams-dev libboost-program-options-dev libboost-python-dev libboost-regex-dev libboost-serialization-dev libboost-signals-dev libboost-thread-dev libcoin-dev libeigen3-dev libgts-bin libgts-dev libkdtree++-dev libmedc-dev libopencv-dev libproj-dev libvtk6-dev libx11-dev libxerces-c-dev libzipios++-dev qt4-dev-tools libqt4-dev libqt4-opengl-dev libqtwebkit-dev libshiboken-dev libpyside-dev pyside-tools python-dev python-matplotlib python-pivy python-ply python-pyside libocct*-dev occt-draw libocct-data-exchange-dev libocct-draw-dev libocct-visualization-dev libsimage-dev doxygen libcoin-doc dh-exec libspnav-dev" "$(dirname "$0")" || exit 1
#download from google drive
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=10zsGG86z2iCN4bIfs4D4wg2hZJ4J5hGF' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=10zsGG86z2iCN4bIfs4D4wg2hZJ4J5hGF" -O freecad-precompiled.zip || error "failed to download archive from Google Drive!"
rm -f /tmp/cookies.txt || echo "Warning: failed to remove cookies.txt."
rm -rf freecad-build FreeCAD-0.18.4 || error "Failed to delete freecad-build and FreeCAD-0.18.4 folders!"
unzip -q ~/freecad-precompiled.zip || error "Failed to extract archive!"
rm -f ~/freecad-precompiled.zip || error "Failed to delete archive!"
cd freecad-build || error "Failed to enter directory!"
sudo make install || error "sudo make install failed!"

@ -1,13 +0,0 @@
#!/bin/bash
DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")"
function error {
echo -e "\\e[91m$1\\e[39m"
exit 1
}
"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1
sudo rm -f $(cat ~/freecad-build/install_manifest.txt) ~/.local/share/applications/org.freecadweb.FreeCAD.desktop || error "failed to remove every installed file!"
rm -rf ~/freecad-precompiled ~/FreeCAD-0.18.4 || error "failed to remove both installation folders!"

@ -1 +0,0 @@
https://github.com/Botspot/FreeCAD-precompiled

@ -1,4 +1,4 @@
3D designer software. Unlike the repository's version of FreeCAD, this one actually works.
Warning: Takes several hours to compile! Compiling consumes 100% of the CPU, and 4GB of RAM.
Thanks to @chunky-milk, the FreeCAD app is now a deb, and installs in a few minutes instead of many hours!
To run: Menu -> Graphics -> FreeCAD
To run in a terminal: FreeCAD

@ -7,33 +7,15 @@ function error {
exit 1
}
echo -e '\e[103m\e[30mThis will take more than 1 hour to compile. It will max out the CPU the whole time. Continue? [Y/n]\e[39m\e[49m'
read answer
if [ "$answer" == 'n' ];then
exit 0
fi
#ensure uninstalled already
sudo apt purge -y freecad || error "apt failed to purge the freecad package!"
"${DIRECTORY}/pkg-install" "cmake build-essential libtool lsb-release swig libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-graph-dev libboost-iostreams-dev libboost-program-options-dev libboost-python-dev libboost-regex-dev libboost-serialization-dev libboost-signals-dev libboost-thread-dev libcoin-dev libeigen3-dev libgts-bin libgts-dev libkdtree++-dev libmedc-dev libopencv-dev libproj-dev libvtk6-dev libx11-dev libxerces-c-dev libzipios++-dev qt4-dev-tools libqt4-dev libqt4-opengl-dev libqtwebkit-dev libshiboken-dev libpyside-dev pyside-tools python-dev python-matplotlib python-pivy python-ply python-pyside libocct*-dev occt-draw libocct-data-exchange-dev libocct-draw-dev libocct-visualization-dev libsimage-dev doxygen libcoin-doc dh-exec libspnav-dev" "$(dirname "$0")" || exit 1
#remove file ahead of time, just in case it exists
rm -f ~/freecad.deb
wget https://github.com/FreeCAD/FreeCAD/archive/0.18.4.zip || error "failed to download ZIP file!"
#download file
wget -O ~/freecad.deb https://github.com/chunky-milk/freecad-rpi/releases/download/0.18.6/freecad_0.18.6-1_armhf.deb || error "Failed to download freecad.deb"
#ensure there's no directory in there already
rm -rf ~/FreeCAD-0.18.4 ~/freecad-build 2>/dev/null
unzip -q 0.18.4.zip || error "failed to extract ZIP file!"
rm 0.18.4.zip || error "failed to delete ZIP file!"
mkdir freecad-build || error "failed to create folder freecad-build!"
cd freecad-build || error "failed to enter directory freecad-build!"
cmake -DPYTHON_EXECUTABLE=/usr/bin/python2.7 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/arm-linux-gnueabihf/libpython2.7.so -DPYTHON_PACKAGES_PATH=/usr/local/lib/python2.7/dist-packages/ ../FreeCAD-0.18.4/ || error "failed to generate make file!"
make -j8 || error "failed to compile!"
sudo make install || error "sudo make install failed!"
if [ ! -z "$(cat "${DIRECTORY}/installed-packages" | grep 'qt4-dev-tools')" ];then
sudo apt purge -y qt4-dev-tools qt4-designer || error "purging qt4-dev-tools failed!"
fi
#install freecad
sudo apt install -y --fix-broken ~/freecad.deb || error "apt failed to install freecad.deb"
rm -f ~/freecad.deb

@ -7,8 +7,4 @@ function error {
exit 1
}
"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1
sudo rm -f $(cat ~/freecad-build/install_manifest.txt) ~/.local/share/applications/org.freecadweb.FreeCAD.desktop || error "failed to remove every installed file!"
rm -rf ~/freecad-build ~/FreeCAD-0.18.4 || error "failed to remove both installation folders!"
sudo apt purge -y freecad || error "apt failed to purge the freecad package!"

@ -21,8 +21,6 @@ Doom 3|Games
Eagle CAD|Editors
eDEX-UI|Eyecandy
Email Checker|Internet
FreeCAD|Editors/FreeCAD
FreeCAD (precompiled)|Editors/FreeCAD
FreeTube|Internet
Geany Dark Mode|Eyecandy
Intellij IDEA|Editors
@ -51,6 +49,7 @@ QEMU|Tools
Raspi2png|Tools
Remarkable|Editors
Scrcpy|Tools
Simplenote|
Snapdrop|
Snap Store|Tools
Sonic Pi 3.2|Editors
@ -79,3 +78,4 @@ Wine (x86)|Tools
WPS Office|Editors
YouTubuddy|Internet
Zoom|Internet
FreeCAD|Editors

4
gui

@ -28,6 +28,10 @@ fi
"${DIRECTORY}/install"
fi) &
rm -rf "${DIRECTORY}/apps/FreeCAD (precompiled)"
"${DIRECTORY}/etc/categoryedit" 'FreeCAD' Editors >/dev/null
install() {
app="$1"
#terminal title text

Loading…
Cancel
Save