mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 02:58:02 -06:00
Linux: implement automatic creation of AppImage bundle during build of generic binaries
This commit is contained in:
@@ -58,6 +58,7 @@ fi
|
|||||||
make WXSTATIC=1 clean || exit 1
|
make WXSTATIC=1 clean || exit 1
|
||||||
make WXSTATIC=1 || exit 1
|
make WXSTATIC=1 || exit 1
|
||||||
make WXSTATIC=1 package || exit 1
|
make WXSTATIC=1 package || exit 1
|
||||||
|
make WXSTATIC=1 appimage || exit 1
|
||||||
|
|
||||||
echo "Building console version of VeraCrypt"
|
echo "Building console version of VeraCrypt"
|
||||||
|
|
||||||
|
|||||||
@@ -314,6 +314,9 @@ ifndef TC_NO_GUI
|
|||||||
cp $(BASE_DIR)/Resources/Icons/VeraCrypt-256x256.xpm $(BASE_DIR)/Setup/Linux/usr/share/pixmaps/$(APPNAME).xpm
|
cp $(BASE_DIR)/Resources/Icons/VeraCrypt-256x256.xpm $(BASE_DIR)/Setup/Linux/usr/share/pixmaps/$(APPNAME).xpm
|
||||||
cp $(BASE_DIR)/Setup/Linux/$(APPNAME).desktop $(BASE_DIR)/Setup/Linux/usr/share/applications/$(APPNAME).desktop
|
cp $(BASE_DIR)/Setup/Linux/$(APPNAME).desktop $(BASE_DIR)/Setup/Linux/usr/share/applications/$(APPNAME).desktop
|
||||||
cp $(BASE_DIR)/Setup/Linux/$(APPNAME).xml $(BASE_DIR)/Setup/Linux/usr/share/mime/packages/$(APPNAME).xml
|
cp $(BASE_DIR)/Setup/Linux/$(APPNAME).xml $(BASE_DIR)/Setup/Linux/usr/share/mime/packages/$(APPNAME).xml
|
||||||
|
|
||||||
|
cp $(BASE_DIR)/Resources/Icons/VeraCrypt-256x256.xpm $(BASE_DIR)/Setup/Linux/veracrypt.AppDir/$(APPNAME).xpm
|
||||||
|
cp -r $(BASE_DIR)/Setup/Linux/usr $(BASE_DIR)/Setup/Linux/veracrypt.AppDir/.
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
@@ -344,6 +347,48 @@ package: prepare
|
|||||||
cp $(INTERNAL_INSTALLER_NAME) $(BASE_DIR)/Setup/Linux/packaging/.
|
cp $(INTERNAL_INSTALLER_NAME) $(BASE_DIR)/Setup/Linux/packaging/.
|
||||||
makeself $(BASE_DIR)/Setup/Linux/packaging $(BASE_DIR)/Setup/Linux/$(INSTALLER_NAME) "VeraCrypt $(TC_VERSION) Installer" ./$(INTERNAL_INSTALLER_NAME)
|
makeself $(BASE_DIR)/Setup/Linux/packaging $(BASE_DIR)/Setup/Linux/$(INSTALLER_NAME) "VeraCrypt $(TC_VERSION) Installer" ./$(INTERNAL_INSTALLER_NAME)
|
||||||
|
|
||||||
|
appimage: prepare
|
||||||
|
@set -e; \
|
||||||
|
_appimagetool_arch_suffix=""; \
|
||||||
|
_final_appimage_arch_suffix=""; \
|
||||||
|
case "$(CPU_ARCH)" in \
|
||||||
|
x86) \
|
||||||
|
_appimagetool_arch_suffix="i686"; \
|
||||||
|
_final_appimage_arch_suffix="i686"; \
|
||||||
|
;; \
|
||||||
|
x64) \
|
||||||
|
_appimagetool_arch_suffix="x86_64"; \
|
||||||
|
_final_appimage_arch_suffix="x86_64"; \
|
||||||
|
;; \
|
||||||
|
arm64) \
|
||||||
|
_appimagetool_arch_suffix="aarch64"; \
|
||||||
|
_final_appimage_arch_suffix="aarch64"; \
|
||||||
|
;; \
|
||||||
|
arm7) \
|
||||||
|
_appimagetool_arch_suffix="armhf"; \
|
||||||
|
_final_appimage_arch_suffix="armhf"; \
|
||||||
|
;; \
|
||||||
|
*) \
|
||||||
|
echo "Error: Unsupported CPU_ARCH for AppImage: $(CPU_ARCH). Supported: x86, x64, arm64, arm7" >&2; \
|
||||||
|
exit 1; \
|
||||||
|
;; \
|
||||||
|
esac; \
|
||||||
|
_appimagetool_executable_name="appimagetool-$${_appimagetool_arch_suffix}.AppImage"; \
|
||||||
|
_appimagetool_executable_path="$(BASE_DIR)/Setup/Linux/$${_appimagetool_executable_name}"; \
|
||||||
|
_appimagetool_url="https://github.com/AppImage/appimagetool/releases/download/continuous/$${_appimagetool_executable_name}"; \
|
||||||
|
_final_appimage_filename="VeraCrypt-$(TC_VERSION)-$${_final_appimage_arch_suffix}.AppImage"; \
|
||||||
|
_final_appimage_path="$(BASE_DIR)/Setup/Linux/$${_final_appimage_filename}"; \
|
||||||
|
\
|
||||||
|
echo "Preparing AppImage for $(CPU_ARCH) (using $${_appimagetool_arch_suffix})..."; \
|
||||||
|
echo "Downloading appimagetool from $${_appimagetool_url}..."; \
|
||||||
|
wget --quiet -O "$${_appimagetool_executable_path}" "$${_appimagetool_url}"; \
|
||||||
|
chmod +x "$${_appimagetool_executable_path}"; \
|
||||||
|
echo "Creating AppImage $${_final_appimage_path}..."; \
|
||||||
|
ARCH="$${_final_appimage_arch_suffix}" "$${_appimagetool_executable_path}" "$(BASE_DIR)/Setup/Linux/veracrypt.AppDir" "$${_final_appimage_path}"; \
|
||||||
|
echo "AppImage created: $${_final_appimage_path}"; \
|
||||||
|
echo "Cleaning up appimagetool..."; \
|
||||||
|
rm -f "$${_appimagetool_executable_path}";
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -602,6 +602,9 @@ install:
|
|||||||
package:
|
package:
|
||||||
$(MAKE) -C Main -f Main.make NAME=Main package
|
$(MAKE) -C Main -f Main.make NAME=Main package
|
||||||
|
|
||||||
|
appimage:
|
||||||
|
$(MAKE) -C Main -f Main.make NAME=Main appimage
|
||||||
|
|
||||||
#------ wxWidgets build ------
|
#------ wxWidgets build ------
|
||||||
|
|
||||||
ifeq "$(MAKECMDGOALS)" "wxbuild"
|
ifeq "$(MAKECMDGOALS)" "wxbuild"
|
||||||
|
|||||||
6
src/Setup/Linux/veracrypt.AppDir/AppRun
Executable file
6
src/Setup/Linux/veracrypt.AppDir/AppRun
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Get the directory where AppRun is located
|
||||||
|
APPDIR=$(dirname "$(readlink -f "$0")")
|
||||||
|
|
||||||
|
# Execute the main VeraCrypt application
|
||||||
|
exec "${APPDIR}/usr/bin/veracrypt" "$@"
|
||||||
11
src/Setup/Linux/veracrypt.AppDir/veracrypt.desktop
Normal file
11
src/Setup/Linux/veracrypt.AppDir/veracrypt.desktop
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=VeraCrypt
|
||||||
|
GenericName=VeraCrypt volume manager
|
||||||
|
Comment=Create and mount VeraCrypt encrypted volumes
|
||||||
|
Icon=veracrypt
|
||||||
|
Exec=AppRun
|
||||||
|
Categories=System;Security;Utility;Filesystem;
|
||||||
|
Keywords=encryption,filesystem
|
||||||
|
Terminal=false
|
||||||
|
MimeType=application/x-veracrypt-volume;application/x-truecrypt-volume;
|
||||||
Reference in New Issue
Block a user