phase 1: copy Kindred-only files onto upstream/main (FreeCAD 1.2.0-dev)

Wholesale copy of all Kindred Create additions that don't conflict with
upstream FreeCAD code:

- kindred-icons/ (1444 Catppuccin Mocha SVG icon overrides)
- src/Mod/Create/ (Kindred Create workbench)
- src/Gui/ Kindred source files (FileOrigin, OriginManager,
  OriginSelectorWidget, CommandOrigin, BreadcrumbToolBar, EditingContext)
- src/Gui/Icons/ (Kindred branding and silo icons)
- src/Gui/PreferencePacks/KindredCreate/
- src/Gui/Stylesheets/ (KindredCreate.qss, images_dark-light/)
- package/ (rattler-build recipe)
- docs/ (architecture, guides, specifications)
- .gitea/ (CI workflows, issue templates)
- mods/silo, mods/ztools submodules
- .gitmodules (Kindred submodule URLs)
- resources/ (kindred-create.desktop, kindred-create.xml)
- banner-logo-light.png, CONTRIBUTING.md
This commit is contained in:
forbes
2026-02-13 14:03:58 -06:00
parent 5d81f8ac16
commit 87a0af0b0f
1566 changed files with 32071 additions and 6155 deletions

View File

@@ -64,8 +64,7 @@ ${LangFileString} SecUnPreferencesDescription 'Deletes FreeCAD$\'s configuration
$AppSuff\$\r$\n\
${APP_DIR_USERDATA}$\")$\r$\n\
for you or for all users (if you are admin).'
${LangFileString} DialogUnPreferences 'You chose to delete the FreeCAD user configuration.$\r$\n\
This will also delete all installed FreeCAD addons, and will affect the$\r$\n\
preferences for all versions of FreeCAD.$\r$\n\
Are you sure you want to proceed?'
${LangFileString} DialogUnPreferences 'You chose to delete the FreeCADs user configuration.$\r$\n\
This will also delete all installed FreeCAD addons.$\r$\n\
Do you agree with this?'
${LangFileString} SecUnProgramFilesDescription "Uninstall FreeCAD and all of its components."

400
package/debian/build-deb.sh Executable file
View File

@@ -0,0 +1,400 @@
#!/bin/bash
# SPDX-License-Identifier: LGPL-2.1-or-later
# Build a .deb package from the installed build directory
#
# This script creates a Debian binary package following Debian Policy Manual guidelines.
# See: https://www.debian.org/doc/debian-policy/
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
# Parse arguments
INSTALL_DIR="${1:-}"
OUTPUT_DIR="${2:-}"
VERSION="${3:-}"
if [ -z "$INSTALL_DIR" ] || [ -z "$OUTPUT_DIR" ]; then
echo "Usage: $0 <install-dir> <output-dir> [version]"
echo " install-dir: Directory containing installed build (e.g., build/release/install)"
echo " output-dir: Directory to write the .deb file"
echo " version: Package version (default: from git describe)"
exit 1
fi
# Validate install directory exists
if [ ! -d "$INSTALL_DIR" ]; then
echo "Error: Install directory does not exist: $INSTALL_DIR"
exit 1
fi
# Get version from git if not provided
if [ -z "$VERSION" ]; then
VERSION=$(cd "$PROJECT_ROOT" && git describe --tags --always 2>/dev/null || echo "0.1.0")
fi
# Convert version to Debian-compatible format
# Debian Policy Manual 5.6.12: version must start with a digit
# Format: [epoch:]upstream_version[-debian_revision]
convert_to_debian_version() {
local ver="$1"
# Remove leading 'v' if present (common in git tags)
ver="${ver#v}"
# Replace hyphens with dots (hyphens have special meaning in Debian versions)
ver="${ver//-/.}"
# If version starts with a letter (e.g., 'weekly'), prefix with '0~'
# The ~ character sorts before anything else, ensuring:
# 0~weekly.2025.01.01 < 0.1.0 < 1.0.0
if [[ "$ver" =~ ^[a-zA-Z] ]]; then
ver="0~${ver}"
fi
echo "$ver"
}
VERSION=$(convert_to_debian_version "$VERSION")
PACKAGE_NAME="kindred-create"
ARCH="amd64"
# Debian package naming: <name>_<version>_<arch>.deb
DEB_NAME="${PACKAGE_NAME}_${VERSION}_${ARCH}"
echo "========================================"
echo "Building Debian package"
echo "========================================"
echo " Package: ${PACKAGE_NAME}"
echo " Version: ${VERSION}"
echo " Arch: ${ARCH}"
echo " Source: ${INSTALL_DIR}"
echo " Output: ${OUTPUT_DIR}/${DEB_NAME}.deb"
echo "========================================"
# Create staging directory
STAGING_DIR=$(mktemp -d)
trap "rm -rf ${STAGING_DIR}" EXIT
# Create debian package structure following Filesystem Hierarchy Standard
mkdir -p "${STAGING_DIR}/DEBIAN"
mkdir -p "${STAGING_DIR}/opt/${PACKAGE_NAME}"
mkdir -p "${STAGING_DIR}/usr/bin"
mkdir -p "${STAGING_DIR}/usr/share/applications"
mkdir -p "${STAGING_DIR}/usr/share/icons/hicolor/scalable/apps"
mkdir -p "${STAGING_DIR}/usr/share/icons/hicolor/48x48/apps"
mkdir -p "${STAGING_DIR}/usr/share/icons/hicolor/256x256/apps"
mkdir -p "${STAGING_DIR}/usr/share/mime/packages"
mkdir -p "${STAGING_DIR}/usr/share/metainfo"
mkdir -p "${STAGING_DIR}/usr/share/doc/${PACKAGE_NAME}"
# Copy installed files
echo "Copying installed files..."
cp -a "${INSTALL_DIR}"/* "${STAGING_DIR}/opt/${PACKAGE_NAME}/"
# Create wrapper scripts in /usr/bin that set up the environment
# The binaries need LD_LIBRARY_PATH to find bundled libraries
cat > "${STAGING_DIR}/usr/bin/kindred-create" << 'WRAPPER'
#!/bin/bash
export KINDRED_CREATE_HOME="/opt/kindred-create"
export LD_LIBRARY_PATH="${KINDRED_CREATE_HOME}/lib:${LD_LIBRARY_PATH:-}"
export QT_PLUGIN_PATH="${KINDRED_CREATE_HOME}/lib/qt6/plugins:${QT_PLUGIN_PATH:-}"
export QT_QPA_PLATFORM_PLUGIN_PATH="${KINDRED_CREATE_HOME}/lib/qt6/plugins/platforms:${QT_QPA_PLATFORM_PLUGIN_PATH:-}"
export PYTHONHOME="${KINDRED_CREATE_HOME}"
export PYTHONPATH="${KINDRED_CREATE_HOME}/lib/python3.11:${KINDRED_CREATE_HOME}/lib/python3.11/site-packages:${PYTHONPATH:-}"
export XDG_DATA_DIRS="${KINDRED_CREATE_HOME}/share:${XDG_DATA_DIRS:-/usr/share}"
export GI_TYPELIB_PATH="${KINDRED_CREATE_HOME}/lib/girepository-1.0:${GI_TYPELIB_PATH:-}"
# XKB keyboard configuration - use bundled data to avoid hardcoded CI paths in libxkbcommon
export XKB_CONFIG_ROOT="${KINDRED_CREATE_HOME}/share/X11/xkb"
# Fontconfig - use bundled configuration to avoid missing default config
export FONTCONFIG_FILE="${KINDRED_CREATE_HOME}/etc/fonts/fonts.conf"
export FONTCONFIG_PATH="${KINDRED_CREATE_HOME}/etc/fonts"
# Qt Wayland fractional scaling — force integer rounding to avoid blurry text
export QT_SCALE_FACTOR_ROUNDING_POLICY=RoundPreferFloor
export QT_ENABLE_HIGHDPI_SCALING=1
# Use system CA certificates so bundled Python trusts internal CAs (e.g. FreeIPA)
# The bundled openssl has a hardcoded cafile from the build environment which
# does not exist on the target system.
if [ -z "${SSL_CERT_FILE:-}" ]; then
for ca in /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt; do
if [ -f "$ca" ]; then
export SSL_CERT_FILE="$ca"
break
fi
done
fi
# Try different binary names (FreeCAD or freecad depending on build)
if [ -x "${KINDRED_CREATE_HOME}/bin/FreeCAD" ]; then
exec "${KINDRED_CREATE_HOME}/bin/FreeCAD" "$@"
elif [ -x "${KINDRED_CREATE_HOME}/bin/freecad" ]; then
exec "${KINDRED_CREATE_HOME}/bin/freecad" "$@"
else
echo "Error: Cannot find FreeCAD binary in ${KINDRED_CREATE_HOME}/bin/" >&2
exit 1
fi
WRAPPER
chmod 755 "${STAGING_DIR}/usr/bin/kindred-create"
cat > "${STAGING_DIR}/usr/bin/kindred-create-cmd" << 'WRAPPER'
#!/bin/bash
export KINDRED_CREATE_HOME="/opt/kindred-create"
export LD_LIBRARY_PATH="${KINDRED_CREATE_HOME}/lib:${LD_LIBRARY_PATH:-}"
export PYTHONHOME="${KINDRED_CREATE_HOME}"
export PYTHONPATH="${KINDRED_CREATE_HOME}/lib/python3.11:${KINDRED_CREATE_HOME}/lib/python3.11/site-packages:${PYTHONPATH:-}"
# Use system CA certificates (see kindred-create wrapper for details)
if [ -z "${SSL_CERT_FILE:-}" ]; then
for ca in /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt; do
if [ -f "$ca" ]; then
export SSL_CERT_FILE="$ca"
break
fi
done
fi
# Try different binary names (FreeCADCmd or freecadcmd depending on build)
if [ -x "${KINDRED_CREATE_HOME}/bin/FreeCADCmd" ]; then
exec "${KINDRED_CREATE_HOME}/bin/FreeCADCmd" "$@"
elif [ -x "${KINDRED_CREATE_HOME}/bin/freecadcmd" ]; then
exec "${KINDRED_CREATE_HOME}/bin/freecadcmd" "$@"
else
echo "Error: Cannot find FreeCADCmd binary in ${KINDRED_CREATE_HOME}/bin/" >&2
exit 1
fi
WRAPPER
chmod 755 "${STAGING_DIR}/usr/bin/kindred-create-cmd"
# Create desktop entry following freedesktop.org specification
cat > "${STAGING_DIR}/usr/share/applications/kindred-create.desktop" << 'EOF'
[Desktop Entry]
Version=1.1
Type=Application
Name=Kindred Create
GenericName=CAD Application
Comment=Engineering-focused parametric 3D CAD platform
Exec=/usr/bin/kindred-create %F
Icon=kindred-create
Terminal=false
Categories=Graphics;Science;Engineering;
MimeType=application/x-extension-fcstd;application/x-freecad;
Keywords=CAD;3D;modeling;engineering;design;parametric;FreeCAD;
StartupNotify=true
StartupWMClass=FreeCAD
EOF
# Copy Kindred branding icons (prefer Kindred logo over FreeCAD default)
if [ -f "${PROJECT_ROOT}/resources/branding/kindred-logo.svg" ]; then
cp "${PROJECT_ROOT}/resources/branding/kindred-logo.svg" \
"${STAGING_DIR}/usr/share/icons/hicolor/scalable/apps/kindred-create.svg"
elif [ -f "${INSTALL_DIR}/share/icons/hicolor/scalable/apps/org.freecad.FreeCAD.svg" ]; then
cp "${INSTALL_DIR}/share/icons/hicolor/scalable/apps/org.freecad.FreeCAD.svg" \
"${STAGING_DIR}/usr/share/icons/hicolor/scalable/apps/kindred-create.svg"
fi
# Generate PNG icons from the Kindred SVG for better desktop integration
if command -v rsvg-convert > /dev/null 2>&1 && \
[ -f "${STAGING_DIR}/usr/share/icons/hicolor/scalable/apps/kindred-create.svg" ]; then
for size in 48 256; do
rsvg-convert -w "$size" -h "$size" \
"${STAGING_DIR}/usr/share/icons/hicolor/scalable/apps/kindred-create.svg" \
-o "${STAGING_DIR}/usr/share/icons/hicolor/${size}x${size}/apps/kindred-create.png" \
2>/dev/null || true
done
else
# Fallback: copy FreeCAD PNGs if available
for size in 48 256; do
if [ -f "${INSTALL_DIR}/share/icons/hicolor/${size}x${size}/apps/org.freecad.FreeCAD.png" ]; then
cp "${INSTALL_DIR}/share/icons/hicolor/${size}x${size}/apps/org.freecad.FreeCAD.png" \
"${STAGING_DIR}/usr/share/icons/hicolor/${size}x${size}/apps/kindred-create.png"
fi
done
fi
# Create MIME type definition for .fcstd files
cat > "${STAGING_DIR}/usr/share/mime/packages/kindred-create.xml" << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-freecad">
<comment>FreeCAD Document</comment>
<glob pattern="*.fcstd"/>
<glob pattern="*.FCStd"/>
<icon name="kindred-create"/>
</mime-type>
</mime-info>
EOF
# Create AppStream metainfo for software centers
cat > "${STAGING_DIR}/usr/share/metainfo/kindred-create.metainfo.xml" << EOF
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>kindred-create</id>
<name>Kindred Create</name>
<summary>Engineering-focused parametric 3D CAD platform</summary>
<metadata_license>CC0-1.0</metadata_license>
<project_license>LGPL-2.1-or-later</project_license>
<description>
<p>
Kindred Create is an engineering-focused parametric 3D CAD platform
built on FreeCAD 1.0+. It provides a streamlined interface for
mechanical engineering and product design.
</p>
<p>Features include:</p>
<ul>
<li>Parametric modeling with constraint-based sketcher</li>
<li>Part Design workbench for solid modeling</li>
<li>Assembly workbench for multi-part designs</li>
<li>TechDraw workbench for 2D technical drawings</li>
<li>FEM workbench for finite element analysis</li>
<li>CAM workbench for CNC machining</li>
</ul>
</description>
<launchable type="desktop-id">kindred-create.desktop</launchable>
<url type="homepage">https://gitea.kindred.internal/kindred/create</url>
<url type="bugtracker">https://gitea.kindred.internal/kindred/create/issues</url>
<provides>
<binary>kindred-create</binary>
<binary>kindred-create-cmd</binary>
</provides>
<content_rating type="oars-1.1"/>
<releases>
<release version="${VERSION}" date="$(date +%Y-%m-%d)"/>
</releases>
</component>
EOF
# Create basic copyright file (required by Debian policy)
cat > "${STAGING_DIR}/usr/share/doc/${PACKAGE_NAME}/copyright" << 'EOF'
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Kindred Create
Upstream-Contact: Kindred Team <team@kindred.internal>
Source: https://gitea.kindred.internal/kindred/create
Files: *
Copyright: 2024-2026 Kindred
2001-2024 FreeCAD Contributors
License: LGPL-2.1-or-later
License: LGPL-2.1-or-later
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
.
On Debian systems, the complete text of the GNU Lesser General Public
License can be found in `/usr/share/common-licenses/LGPL-2.1'.
EOF
# Generate control file with actual version
sed "s/\${VERSION}/${VERSION}/" "${SCRIPT_DIR}/control" > "${STAGING_DIR}/DEBIAN/control"
# Calculate and append installed size (in KiB, as required by Debian policy)
INSTALLED_SIZE=$(du -sk "${STAGING_DIR}" | cut -f1)
echo "Installed-Size: ${INSTALLED_SIZE}" >> "${STAGING_DIR}/DEBIAN/control"
# Create postinst script for post-installation setup
cat > "${STAGING_DIR}/DEBIAN/postinst" << 'EOF'
#!/bin/sh
set -e
case "$1" in
configure)
# Update desktop database
if command -v update-desktop-database > /dev/null 2>&1; then
update-desktop-database -q /usr/share/applications 2>/dev/null || true
fi
# Update icon cache
if command -v gtk-update-icon-cache > /dev/null 2>&1; then
gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor 2>/dev/null || true
fi
# Update MIME database
if command -v update-mime-database > /dev/null 2>&1; then
update-mime-database /usr/share/mime 2>/dev/null || true
fi
;;
esac
exit 0
EOF
chmod 755 "${STAGING_DIR}/DEBIAN/postinst"
# Create postrm script for post-removal cleanup
cat > "${STAGING_DIR}/DEBIAN/postrm" << 'EOF'
#!/bin/sh
set -e
case "$1" in
remove|purge)
# Update desktop database
if command -v update-desktop-database > /dev/null 2>&1; then
update-desktop-database -q /usr/share/applications 2>/dev/null || true
fi
# Update icon cache
if command -v gtk-update-icon-cache > /dev/null 2>&1; then
gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor 2>/dev/null || true
fi
# Update MIME database
if command -v update-mime-database > /dev/null 2>&1; then
update-mime-database /usr/share/mime 2>/dev/null || true
fi
;;
esac
exit 0
EOF
chmod 755 "${STAGING_DIR}/DEBIAN/postrm"
# Set proper permissions following Debian policy
# Directories: 755, Files: 644, Executables: 755
echo "Setting file permissions..."
find "${STAGING_DIR}" -type d -exec chmod 755 {} \;
find "${STAGING_DIR}/opt" -type f -exec chmod 644 {} \;
# Make binaries executable
if [ -d "${STAGING_DIR}/opt/${PACKAGE_NAME}/bin" ]; then
find "${STAGING_DIR}/opt/${PACKAGE_NAME}/bin" -type f -exec chmod 755 {} \;
fi
# Make shared libraries executable (required for proper loading)
find "${STAGING_DIR}/opt/${PACKAGE_NAME}" -name "*.so" -type f -exec chmod 755 {} \;
find "${STAGING_DIR}/opt/${PACKAGE_NAME}" -name "*.so.*" -type f -exec chmod 755 {} \;
# Ensure DEBIAN scripts have correct permissions (must be 0555 to 0775)
chmod 755 "${STAGING_DIR}/DEBIAN/postinst"
chmod 755 "${STAGING_DIR}/DEBIAN/postrm"
# Build the .deb package
# --root-owner-group ensures all files are owned by root:root (standard practice)
# -Zxz with -z1 uses fast compression (large packages can take very long with default settings)
mkdir -p "${OUTPUT_DIR}"
echo "Building package (this may take a few minutes for large packages)..."
echo "Staging directory size: $(du -sh "${STAGING_DIR}" | cut -f1)"
dpkg-deb -Zxz -z1 --build --root-owner-group "${STAGING_DIR}" "${OUTPUT_DIR}/${DEB_NAME}.deb"
# Verify the package
echo "Verifying package..."
dpkg-deb --info "${OUTPUT_DIR}/${DEB_NAME}.deb"
# Generate checksums
cd "${OUTPUT_DIR}"
sha256sum "${DEB_NAME}.deb" > "${DEB_NAME}.deb.sha256"
echo ""
echo "========================================"
echo "Package built successfully!"
echo "========================================"
echo " File: ${OUTPUT_DIR}/${DEB_NAME}.deb"
echo " Size: $(ls -lh "${DEB_NAME}.deb" | awk '{print $5}')"
echo " SHA256: $(cat "${DEB_NAME}.deb.sha256" | cut -d' ' -f1)"
echo "========================================"
echo ""
echo "Install with: sudo dpkg -i ${DEB_NAME}.deb"
echo " sudo apt-get install -f # to resolve dependencies"

23
package/debian/control Normal file
View File

@@ -0,0 +1,23 @@
Package: kindred-create
Version: ${VERSION}
Section: science
Priority: optional
Architecture: amd64
Maintainer: Kindred Team <team@kindred.internal>
Homepage: https://gitea.kindred.internal/kindred/create
Description: Engineering-focused parametric 3D CAD platform
Kindred Create is an engineering-focused parametric 3D CAD platform
built on FreeCAD 1.0+. It provides a streamlined interface for
mechanical engineering and product design.
.
Features include:
* Parametric modeling with constraint-based sketcher
* Part Design workbench for solid modeling
* Assembly workbench for multi-part designs
* TechDraw workbench for 2D technical drawings
* FEM workbench for finite element analysis
* CAM workbench for CNC machining
* Import/export of STEP, IGES, STL, and other formats
Depends: libc6 (>= 2.31), libstdc++6 (>= 10), libgl1, libglu1-mesa, libx11-6, libxcb1, libxext6, libxi6, libxmu6, libxrender1, libfreetype6, libfontconfig1
Recommends: calculix-ccx, gmsh, graphviz
Suggests: openscad, povray

View File

@@ -29,6 +29,7 @@ cmake ^
-D Python3_EXECUTABLE:FILEPATH="%PYTHON%" ^
-D SMESH_INCLUDE_DIR:FILEPATH="%LIBRARY_PREFIX%/include/smesh" ^
-D SMESH_LIBRARY:FILEPATH="%LIBRARY_PREFIX%/lib/SMESH.lib" ^
-D PACKAGE_VERSION_SUFFIX:STRING="" ^
-B build ^
-S .
if %ERRORLEVEL% neq 0 exit 1

View File

@@ -1,3 +1,16 @@
# Configure ccache to use a shared cache directory that persists across CI runs.
# The workflow caches /tmp/ccache-kindred-create between builds.
export CCACHE_DIR="${CCACHE_DIR:-/tmp/ccache-kindred-create}"
export CCACHE_BASEDIR="${SRC_DIR:-$(pwd)}"
export CCACHE_COMPRESS="${CCACHE_COMPRESS:-true}"
export CCACHE_COMPRESSLEVEL="${CCACHE_COMPRESSLEVEL:-6}"
export CCACHE_MAXSIZE="${CCACHE_MAXSIZE:-4G}"
export CCACHE_SLOPPINESS="${CCACHE_SLOPPINESS:-include_file_ctime,include_file_mtime,pch_defines,time_macros}"
export CCACHE_COMPILERCHECK="${CCACHE_COMPILERCHECK:-content}"
mkdir -p "$CCACHE_DIR"
echo "ccache config: CCACHE_DIR=$CCACHE_DIR CCACHE_BASEDIR=$CCACHE_BASEDIR"
ccache -z || true
if [[ ${HOST} =~ .*linux.* ]]; then
CMAKE_PRESET=conda-linux-release
fi
@@ -8,9 +21,7 @@ if [[ ${HOST} =~ .*darwin.* ]]; then
# add hacks for osx here!
echo "adding hacks for osx"
# Install 3DConnexion (SpaceMouse) driver
# Note: For local builds, comment out the following lines if you encounter issues
# installing the driver or don't need SpaceMouse support
# install space-mouse
/usr/bin/curl -o /tmp/3dFW.dmg -L 'https://download.3dconnexion.com/drivers/mac/10-7-0_B564CC6A-6E81-42b0-82EC-418EA823B81A/3DxWareMac_v10-7-0_r3411.dmg'
hdiutil attach -readonly /tmp/3dFW.dmg
sudo installer -package /Volumes/3Dconnexion\ Software/Install\ 3Dconnexion\ software.pkg -target /
@@ -19,31 +30,6 @@ if [[ ${HOST} =~ .*darwin.* ]]; then
CMAKE_PLATFORM_FLAGS+=(-D3DCONNEXIONCLIENT_FRAMEWORK:FILEPATH="/Library/Frameworks/3DconnexionClient.framework")
CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY"
# Use MACOS_DEPLOYMENT_TARGET from environment, default to 11.0 for backwards compat.
# Note that CI sets this per target: 10.13 (Intel), 11.0 (ARM legacy), 15.0 (ARM modern)
# - macOS 10.13+ Intel: legacy QuickLook generator (.qlgenerator)
# - macOS 11-14 ARM: legacy QuickLook generator (.qlgenerator)
# - macOS 15+ ARM: modern QuickLook App Extensions (.appex)
DEPLOY_TARGET="${MACOS_DEPLOYMENT_TARGET:-11.0}"
CMAKE_PLATFORM_FLAGS+=(-DCMAKE_OSX_DEPLOYMENT_TARGET=${DEPLOY_TARGET})
# Patch Qt6's FindWrapOpenGL.cmake to not link AGL on macOS 10.15+
# AGL framework was removed in macOS 10.15 Catalina and Qt6's cmake
# unconditionally tries to link it on Apple platforms, causing build failures.
# Only apply this patch for deployment targets >= 10.15.
# See: https://github.com/conda-forge/qt-main-feedstock/issues/240
DEPLOY_MAJOR=$(echo "$DEPLOY_TARGET" | cut -d. -f1)
DEPLOY_MINOR=$(echo "$DEPLOY_TARGET" | cut -d. -f2)
if [[ "$DEPLOY_MAJOR" -gt 10 ]] || [[ "$DEPLOY_MAJOR" -eq 10 && "$DEPLOY_MINOR" -ge 15 ]]; then
FIND_WRAP_OPENGL="$PREFIX/lib/cmake/Qt6/FindWrapOpenGL.cmake"
if [[ -f "$FIND_WRAP_OPENGL" ]]; then
echo "Patching Qt6 FindWrapOpenGL.cmake to remove AGL linkage (not available on macOS 10.15+)..."
sed -i.bak \
-e '/find_library(WrapOpenGL_AGL/,/target_link_libraries.*__opengl_agl_fw_path/d' \
"$FIND_WRAP_OPENGL"
fi
fi
fi
unset CMAKE_GENERATOR
@@ -51,7 +37,6 @@ unset CMAKE_GENERATOR_PLATFORM
cmake \
${CMAKE_ARGS} \
${CMAKE_PLATFORM_FLAGS[@]} \
--preset ${CMAKE_PRESET} \
-D CMAKE_IGNORE_PREFIX_PATH="/opt/homebrew;/usr/local/homebrew" \
-D CMAKE_INCLUDE_PATH:FILEPATH="$PREFIX/include" \
@@ -66,11 +51,15 @@ cmake \
-D Python_EXECUTABLE:FILEPATH="$PYTHON" \
-D Python3_EXECUTABLE:FILEPATH="$PYTHON" \
-D BUILD_DYNAMIC_LINK_PYTHON:BOOL=OFF \
-D PACKAGE_VERSION_SUFFIX:STRING="" \
-B build \
-S .
cmake --build build
cmake --build build -j${CPU_COUNT:-16}
cmake --install build
mv ${PREFIX}/bin/FreeCAD ${PREFIX}/bin/freecad || true
mv ${PREFIX}/bin/FreeCADCmd ${PREFIX}/bin/freecadcmd || true
echo "=== ccache statistics ==="
ccache -s || true

View File

@@ -9,8 +9,9 @@ export PATH_TO_FREECAD_LIBDIR=${HERE}/usr/lib
export FONTCONFIG_FILE=/etc/fonts/fonts.conf
export FONTCONFIG_PATH=/etc/fonts
# Fix: Use X to run on Wayland
export QT_QPA_PLATFORM=xcb
# Qt HiDPI scaling — force integer rounding to avoid blurry text on fractional scales
export QT_SCALE_FACTOR_ROUNDING_POLICY=RoundPreferFloor
export QT_ENABLE_HIGHDPI_SCALING=1
# Show packages info if DEBUG env variable is set
if [ "$DEBUG" = 1 ]; then

View File

@@ -59,6 +59,10 @@ sed -i "1s/.*/\nLIST OF PACKAGES:/" AppDir/packages.txt
curl -LO https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$(uname -m).AppImage
chmod a+x appimagetool-$(uname -m).AppImage
# Extract appimagetool so it works in containers without FUSE
./appimagetool-$(uname -m).AppImage --appimage-extract > /dev/null 2>&1
APPIMAGETOOL=squashfs-root/AppRun
if [ "${UPLOAD_RELEASE}" == "true" ]; then
case "${BUILD_TAG}" in
*weekly*)
@@ -76,7 +80,7 @@ fi
echo -e "\nCreate the appimage"
# export GPG_TTY=$(tty)
chmod a+x ./AppDir/AppRun
./appimagetool-$(uname -m).AppImage \
${APPIMAGETOOL} \
--comp zstd \
--mksquashfs-opt -Xcompression-level \
--mksquashfs-opt 22 \

View File

@@ -48,11 +48,7 @@ mkdir -p FreeCAD.app/Contents/MacOS
cp build/FreeCAD FreeCAD.app/Contents/MacOS/FreeCAD
python_version=$(${conda_env}/bin/python -c 'import platform; print("py" + platform.python_version_tuple()[0] + platform.python_version_tuple()[1])')
# Add deployment target suffix to artifact name (e.g., "-macOS11" or "-macOS15")
deploy_target="${MACOS_DEPLOYMENT_TARGET:-11.0}"
deploy_suffix="-macOS${deploy_target%%.*}"
version_name="FreeCAD_${BUILD_TAG}-macOS-$(uname -m)${deploy_suffix}-${python_version}"
version_name="FreeCAD_${BUILD_TAG}-macOS-$(uname -m)-${python_version}"
application_menu_name="FreeCAD_${BUILD_TAG}"
echo -e "\################"
@@ -66,37 +62,14 @@ sed -i "s/APPLICATION_MENU_NAME/${application_menu_name}/" ${conda_env}/../Info.
pixi list -e default > FreeCAD.app/Contents/packages.txt
sed -i '1s/.*/\nLIST OF PACKAGES:/' FreeCAD.app/Contents/packages.txt
# move plugins into their final location (Library only exists for macOS < 15.0 builds)
if [ -d "${conda_env}/Library" ]; then
mv ${conda_env}/Library ${conda_env}/..
fi
# move App Extensions (PlugIns) to the correct location for macOS registration
if [ -d "${conda_env}/PlugIns" ]; then
mv ${conda_env}/PlugIns ${conda_env}/..
fi
# copy the plugin into its final location
cp -a ${conda_env}/Library ${conda_env}/..
rm -rf ${conda_env}/Library
if [[ "${SIGN_RELEASE}" == "true" ]]; then
# create the signed dmg
../../scripts/macos_sign_and_notarize.zsh -p "FreeCAD" -k ${SIGNING_KEY_ID} -o "${version_name}.dmg"
else
# Ad-hoc sign for local builds (required for QuickLook extensions to register)
if [ -d "FreeCAD.app/Contents/PlugIns" ]; then
echo "Ad-hoc signing App Extensions with entitlements..."
codesign --force --sign - \
--entitlements ../../../src/MacAppBundle/QuickLook/modern/ThumbnailExtension.entitlements \
FreeCAD.app/Contents/PlugIns/FreeCADThumbnailExtension.appex
codesign --force --sign - \
--entitlements ../../../src/MacAppBundle/QuickLook/modern/PreviewExtension.entitlements \
FreeCAD.app/Contents/PlugIns/FreeCADPreviewExtension.appex
fi
echo "Ad-hoc signing app bundle..."
codesign --force --sign - FreeCAD.app/Contents/packages.txt
if [ -f "FreeCAD.app/Contents/Library/QuickLook/QuicklookFCStd.qlgenerator/Contents/MacOS/QuicklookFCStd" ]; then
codesign --force --sign - FreeCAD.app/Contents/Library/QuickLook/QuicklookFCStd.qlgenerator/Contents/MacOS/QuicklookFCStd
fi
codesign --force --sign - FreeCAD.app
# create the dmg
dmgbuild -s dmg_settings.py "FreeCAD" "${version_name}.dmg"
fi

View File

@@ -1,12 +1,7 @@
cmake_minimum_required(VERSION 3.20)
project(freecad-launcher LANGUAGES CXX)
# Use MACOS_DEPLOYMENT_TARGET from environment if set, otherwise keep original default
if(DEFINED ENV{MACOS_DEPLOYMENT_TARGET})
set(CMAKE_OSX_DEPLOYMENT_TARGET "$ENV{MACOS_DEPLOYMENT_TARGET}" CACHE STRING "Minimum OS X deployment version" FORCE)
else()
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment version" FORCE)
endif()
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment version" FORCE)
set(CMAKE_CXX_STANDARD 17)
add_executable(FreeCAD FreeCAD.cpp)

File diff suppressed because it is too large Load Diff

View File

@@ -28,12 +28,10 @@ create_bundle = 'bash -c "cd $(bash scripts/get_os.bash) && bash create_bundle.s
## Linux (x86-64)
[feature.package.target.linux-64.dependencies]
coreutils = "*"
xcb-util-cursor = "==0.1.5" ## hack to address https://github.com/FreeCAD/FreeCAD/issues/26726
## Linux (aarch64)
[feature.package.target.linux-aarch64.dependencies]
coreutils = "*"
xcb-util-cursor = "==0.1.5" ## hack to address https://github.com/FreeCAD/FreeCAD/issues/26726
## macOS (Intel)
[feature.package.target.osx-64.dependencies]

View File

@@ -18,11 +18,16 @@ requirements:
- cmake
- compilers>=1.10,<1.11
- doxygen
- icu>=75,<76
- ninja
- noqt5
- python>=3.11,<3.12
- qt6-main>=6.8,<6.9
- swig>=4.3,<4.4
- swig >=4.0,<4.4
- if: linux
then:
- patchelf
- if: linux and x86_64
then:
@@ -52,7 +57,6 @@ requirements:
- pixman-cos7-x86_64
- sed
- sysroot_linux-64
- xcb-util-cursor==0.1.5 ## hack to address https://github.com/FreeCAD/FreeCAD/issues/26726
- xorg-x11-server-common-cos7-x86_64
- xorg-x11-server-xvfb-cos7-x86_64
- xorg-xproto
@@ -85,7 +89,6 @@ requirements:
- pixman-cos7-aarch64
- sed
- sysroot_linux-aarch64
- xcb-util-cursor==0.1.5 ## hack to address https://github.com/FreeCAD/FreeCAD/issues/26726
- xorg-x11-server-common-cos7-aarch64
- xorg-x11-server-xvfb-cos7-aarch64
- xorg-xproto
@@ -104,6 +107,7 @@ requirements:
- fmt
- freetype
- hdf5
- icu>=75,<76
- lark
- libboost-devel
- matplotlib-base
@@ -178,5 +182,3 @@ requirements:
- if: linux
then:
- libspnav
- qt6-wayland
- xcb-util-cursor==0.1.5 ## hack to address https://github.com/FreeCAD/FreeCAD/issues/26726

View File

@@ -123,11 +123,7 @@ done
# Two additional files that must be signed that aren't caught by the above searches:
run_codesign "${CONTAINING_FOLDER}/${APP_NAME}/Contents/packages.txt"
# Sign legacy QuickLook generator if present (not built for macOS 15.0+)
if [ -f "${CONTAINING_FOLDER}/${APP_NAME}/Contents/Library/QuickLook/QuicklookFCStd.qlgenerator/Contents/MacOS/QuicklookFCStd" ]; then
run_codesign "${CONTAINING_FOLDER}/${APP_NAME}/Contents/Library/QuickLook/QuicklookFCStd.qlgenerator/Contents/MacOS/QuicklookFCStd"
fi
run_codesign "${CONTAINING_FOLDER}/${APP_NAME}/Contents/Library/QuickLook/QuicklookFCStd.qlgenerator/Contents/MacOS/QuicklookFCStd"
# Sign new Swift QuickLook extensions (macOS 15.0+) with their specific entitlements
# These must be signed before the app itself to avoid overriding the extension signatures