#!/bin/bash # rizitis # create a zoom-linux AppImage for Slackware64-current, what else? # THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # NOTE: You should NOT run AppImage from everyone (like me), only from official creators. # This script will download and create an AppImage in a Slackware64-current system. # The reason is that official zoom.us dont provide AppImages for zoom...so far. # zoom.us has nothing to do with this script. Use it at your own risk. cd "$(dirname "$0")" || exit CWD=$(pwd) WORKSPACE_DIR="$CWD/work-space" LOG_FILE="$WORKSPACE_DIR/installation.log" ZOOM_VERSION="6.3.1.5673" # Zoom binary URL ZOOM_BINARY_URL="https://cdn.zoom.us/prod/$ZOOM_VERSION/zoom_x86_64.pkg.tar.xz" ZOOM_BINARY_FILE="zoom_x86_64.pkg.tar.xz" PKG="AppDir" CWD2="work-space" rm -r "$CWD2" echo "Creating $CWD2" sleep 1 mkdir -p "$CWD2" log() { echo "$(date): $1" >> "$LOG_FILE" } # Error handling handle_error() { log "Error: $1" echo "Error: $1" exit 1 } # Create log file echo "" > "$LOG_FILE" log "Change to workspace." cd "$CWD2" || exit 1 echo "Downloading Zoom binary" sleep 1 log "Downloading Zoom binary." wget "$ZOOM_BINARY_URL" -O "$ZOOM_BINARY_FILE" || handle_error "Failed to download Zoom binary." echo "Extracting Zoom binary and removing archive" sleep 1 log "Extracting Zoom binary." tar -xvf "$ZOOM_BINARY_FILE" || handle_error "Failed to extract Zoom binary." rm "$ZOOM_BINARY_FILE" || handle_error "Failed to remove Zoom binary archive." log "Creating AppDir." echo "Creating $PKG" sleep 1 mkdir -p "$PKG" || handle_error "Failed to create AppDir." cd "$PKG" || exit 1 echo "Moving the extracted binary to $PKG" log "Copying files from Zoom binary." cp ../usr/share/applications/*.desktop . cp ../usr/share/pixmaps/* . mv ../opt . mkdir -p usr/lib64 cp /usr/lib64/libstdc++.so.* usr/lib64/ || handle_error "Failed to copy libstdc++." cp /usr/lib64/libQt6* usr/lib64/ || handle_error "Failed to copy Qt libraries." echo "Creating AppRun script" sleep 1 log "Creating AppRun script." cat < AppRun #!/bin/bash HERE="\$(dirname "\$(readlink -f "\${0}")")" export PATH="\${HERE}/usr/bin/:\${PATH}" export LD_LIBRARY_PATH="\${HERE}/opt/zoom/cef:\${HERE}/usr/lib64:\${HERE}/usr/lib64/qt6:\${LD_LIBRARY_PATH}" exec "\${HERE}/opt/zoom/ZoomLauncher" "\$@" EOL chmod +x AppRun || handle_error "Failed to make AppRun executable." cd .. || exit 1 echo "Downloading AppImageKit" sleep 1 log "Downloading AppImageKit." wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" || handle_error "Failed to download AppImageKit." chmod +x appimagetool-x86_64.AppImage || handle_error "Failed to make AppImageKit executable." echo "Running AppImageKit to create AppImage" sleep 1 log "Running AppImageKit to create AppImage." ARCH=x86_64 ./appimagetool-x86_64.AppImage "$PKG" || handle_error "Failed to run AppImageTool." log "Make executable Zoom_Workplace-x86_64.AppImage" chmod +x Zoom_Workplace-x86_64.AppImage || handle_error "Failed to make AppImage executable." wait clear log "Question to run AppImage or quit" echo "" echo -e "\033[1mDo you want to run Zoom.AppImage? (yes/no)\033[0m" read answer if [[ "$answer" =~ ^[Yy][Ee][Ss]$ ]]; then echo "Start AppImage..." ./Zoom_Workplace-x86_64.AppImage & exit else echo "Exiting the script." exit 0 fi