Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
doc:macosx [28/06/2017 17:11] – [Compiler un programme C++/Qt : Qt 5.x] scorpio810 | doc:macosx [09/01/2024 16:01] (Version actuelle) – [Macports arm64 Apple silicon environments MAC Mini M2] scorpio810 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ~~NOCACHE~~ | ||
+ | ===== QElectroTech sous MacOSX ===== | ||
+ | |||
+ | ===== Macports arm64 Apple silicon environments MAC Mini M2 ===== | ||
+ | |||
+ | < | ||
+ | git clone https:// | ||
+ | cd digikam/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | index 41a75f247f..04307322bd 100755 | ||
+ | --- a/ | ||
+ | +++ b/ | ||
+ | @@ -107,7 +107,7 @@ function(InstallKDEComponent | ||
+ | |||
+ | | ||
+ | sed -i '' | ||
+ | - < | ||
+ | + < | ||
+ | |||
+ | | ||
+ | |||
+ | diff --git a/ | ||
+ | index 669ec675c1..82ac0ff093 100755 | ||
+ | --- a/ | ||
+ | +++ b/ | ||
+ | @@ -210,7 +210,7 @@ EOF | ||
+ | # No need to build with both architectures embeded (x86 and ARM) for Apple Silicon target | ||
+ | |||
+ | cat << EOF >> " | ||
+ | -+universal | ||
+ | +++arm64 | ||
+ | EOF | ||
+ | |||
+ | fi | ||
+ | @@ -275,25 +275,11 @@ port install \ | ||
+ | libpng \ | ||
+ | jpeg \ | ||
+ | tiff \ | ||
+ | - boost \ | ||
+ | - | ||
+ | gettext \ | ||
+ | libusb \ | ||
+ | - | ||
+ | - | ||
+ | - lcms2 \ | ||
+ | - expat \ | ||
+ | libxml2 \ | ||
+ | libxslt \ | ||
+ | libical \ | ||
+ | - | ||
+ | - bison \ | ||
+ | - | ||
+ | - x265 \ | ||
+ | - | ||
+ | - | ||
+ | - aom \ | ||
+ | - | ||
+ | wget +ssl \ | ||
+ | qt5-qtbase \ | ||
+ | qt5-qtdeclarative \ | ||
+ | @@ -305,22 +291,11 @@ port install \ | ||
+ | qt5-qttranslations \ | ||
+ | qt5-qtimageformats \ | ||
+ | qt5-qtnetworkauth \ | ||
+ | - | ||
+ | - | ||
+ | + | ||
+ | |||
+ | -port deactivate boost | ||
+ | +#port deactivate boost | ||
+ | |||
+ | -if [[ $DK_QTWEBENGINE = 1 ]] ; then | ||
+ | |||
+ | - port install qt5-qtwebengine | ||
+ | - | ||
+ | -else | ||
+ | - | ||
+ | - port install qt5-qtwebkit | ||
+ | - | ||
+ | -fi | ||
+ | - | ||
+ | -port activate boost | ||
+ | |||
+ | # port broken since a while. check later | ||
+ | # | ||
+ | @@ -360,18 +335,7 @@ cmake $ORIG_WD/ | ||
+ | -DKA_VERSION=$DK_KA_VERSION \ | ||
+ | -DKP_VERSION=$DK_KP_VERSION \ | ||
+ | -DKDE_VERSION=$DK_KDE_VERSION \ | ||
+ | - | ||
+ | - | ||
+ | - | ||
+ | - | ||
+ | -if [[ $DK_QTWEBENGINE = 0 ]] ; then | ||
+ | - cmake --build . --config RelWithDebInfo --target ext_qtwebkit | ||
+ | -fi | ||
+ | - | ||
+ | -cmake --build . --config RelWithDebInfo --target ext_opencv | ||
+ | -cmake --build . --config RelWithDebInfo --target ext_imagemagick -- -j$CPU_CORES | ||
+ | -cmake --build . --config RelWithDebInfo --target ext_libjxl | ||
+ | -cmake --build . --config RelWithDebInfo --target ext_libavif | ||
+ | + | ||
+ | |||
+ | ################################################################################################# | ||
+ | |||
+ | diff --git a/ | ||
+ | index a94632c1a6..ca39301c7f 100755 | ||
+ | --- a/ | ||
+ | +++ b/ | ||
+ | @@ -68,16 +68,15 @@ cmake $ORIG_WD/ | ||
+ | -DKA_VERSION=$DK_KA_VERSION \ | ||
+ | -DKP_VERSION=$DK_KP_VERSION \ | ||
+ | -DKDE_VERSION=$DK_KDE_VERSION \ | ||
+ | - | ||
+ | - | ||
+ | - | ||
+ | + | ||
+ | + | ||
+ | |||
+ | # NOTE: The order to compile each component here is very important. | ||
+ | |||
+ | # core KF5 frameworks dependencies | ||
+ | cmake --build . --config RelWithDebInfo --target ext_extra-cmake-modules -- -j$CPU_CORES | ||
+ | cmake --build . --config RelWithDebInfo --target ext_kconfig | ||
+ | -cmake --build . --config RelWithDebInfo --target ext_breeze-icons | ||
+ | +#cmake --build . --config RelWithDebInfo --target ext_breeze-icons | ||
+ | cmake --build . --config RelWithDebInfo --target ext_kcoreaddons | ||
+ | cmake --build . --config RelWithDebInfo --target ext_kwindowsystem | ||
+ | cmake --build . --config RelWithDebInfo --target ext_solid | ||
+ | @@ -106,10 +105,10 @@ cmake --build . --config RelWithDebInfo --target ext_kimageformats | ||
+ | # | ||
+ | |||
+ | # Calendar support | ||
+ | -cmake --build . --config RelWithDebInfo --target ext_kcalendarcore | ||
+ | +#cmake --build . --config RelWithDebInfo --target ext_kcalendarcore | ||
+ | |||
+ | # Breeze style support | ||
+ | -cmake --build . --config RelWithDebInfo --target ext_breeze | ||
+ | +#cmake --build . --config RelWithDebInfo --target ext_breeze | ||
+ | |||
+ | ################################################################################################# | ||
+ | |||
+ | diff --git a/ | ||
+ | index 37341eefb0..65c9e37442 100644 | ||
+ | --- a/ | ||
+ | +++ b/ | ||
+ | @@ -16,7 +16,7 @@ BUILDING_DIR=" | ||
+ | ######################################################################## | ||
+ | |||
+ | # Target macOS architecture: | ||
+ | -ARCH_TARGET=" | ||
+ | +ARCH_TARGET=" | ||
+ | |||
+ | if [[ $ARCH_TARGET = " | ||
+ | |||
+ | @@ -50,7 +50,7 @@ if [[ $ARCH_TARGET = " | ||
+ | elif [[ $ARCH_TARGET = " | ||
+ | |||
+ | # Apple Silicon is supported since macOS BigSur | ||
+ | - OSX_MIN_TARGET=" | ||
+ | + OSX_MIN_TARGET=" | ||
+ | |||
+ | else | ||
+ | |||
+ | @@ -128,7 +128,7 @@ DK_VERSION=master | ||
+ | | ||
+ | |||
+ | # Option to use QtWebEngine instead QtWebkit | ||
+ | -DK_QTWEBENGINE=1 | ||
+ | +DK_QTWEBENGINE=0 | ||
+ | |||
+ | # Sign bundles with GPG. Passphrase must be hosted in ~/ | ||
+ | | ||
+ | </ | ||
+ | |||
+ | Add in your .bash_profile or in zsh profile [[https:// | ||
+ | |||
+ | < | ||
+ | PATH="/ | ||
+ | PATH="/ | ||
+ | export PATH=/ | ||
+ | export PATH=/ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | Copy your libs KF5 *.pri / | ||
+ | Edit your libs KF5 *.pri files in / | ||
+ | |||
+ | QT.KCoreAddons.VERSION = 5.110.0 | ||
+ | QT.KCoreAddons.MAJOR_VERSION = 5 | ||
+ | QT.KCoreAddons.MINOR_VERSION = 110 | ||
+ | QT.KCoreAddons.PATCH_VERSION = 0 | ||
+ | QT.KCoreAddons.name = KF5CoreAddons | ||
+ | QT.KCoreAddons.module = KF5CoreAddons | ||
+ | QT.KCoreAddons.defines = | ||
+ | QT.KCoreAddons.includes = $$PWD/ | ||
+ | QT.KCoreAddons.private_includes = | ||
+ | QT.KCoreAddons.libs = $$PWD/ | ||
+ | QT.KCoreAddons.depends = core | ||
+ | QT.KCoreAddons.module_config = | ||
+ | |||
+ | To: | ||
+ | |||
+ | |||
+ | QT.KCoreAddons.VERSION = 5.110.0 | ||
+ | QT.KCoreAddons.MAJOR_VERSION = 5 | ||
+ | QT.KCoreAddons.MINOR_VERSION = 110 | ||
+ | QT.KCoreAddons.PATCH_VERSION = 0 | ||
+ | QT.KCoreAddons.name = KF5CoreAddons | ||
+ | QT.KCoreAddons.module = KF5CoreAddons | ||
+ | QT.KCoreAddons.defines = | ||
+ | QT.KCoreAddons.includes = / | ||
+ | QT.KCoreAddons.private_includes = | ||
+ | QT.KCoreAddons.libs = / | ||
+ | QT.KCoreAddons.depends = core | ||
+ | QT.KCoreAddons.module_config = | ||
+ | |||
+ | </ | ||
+ | | ||
+ | ===== MacOS Macports environment (new 2023) ===== | ||
+ | |||
+ | |||
+ | We use now Digikam scripts, for create Qt 5.15.X compile environment with qt5-sqlite-plugin (Sqilte3) for database project exporting.\\ | ||
+ | See: | ||
+ | https:// | ||
+ | First read the README file: \\ | ||
+ | https:// | ||
+ | |||
+ | We only use __01-build-macports.sh__ and __02-build-extralibs.sh script__ to build MacOS Macports environment for QET builds. | ||
+ | |||
+ | < | ||
+ | git clone https:// | ||
+ | cd digikam/ | ||
+ | |||
+ | //You can comment some packages which are not useful for QElectroTech \\ | ||
+ | like qt5-qtwebengine, | ||
+ | < | ||
+ | bash ./ | ||
+ | |||
+ | </ | ||
+ | |||
+ | //you can comment some packages which are not useful for QElectroTech, | ||
+ | but keep ext_kcoreaddons and ext_kwidgetsaddons!// | ||
+ | < | ||
+ | bash ./ | ||
+ | </ | ||
+ | Add in your .bash_profile or in zsh profile [[https:// | ||
+ | < | ||
+ | # Setting PATH for Qt5.15.x | ||
+ | PATH="/ | ||
+ | PATH="/ | ||
+ | export PATH=/ | ||
+ | export PATH=/ | ||
+ | |||
+ | </ | ||
+ | Note : On APPLE M1/2 chips replace in PATH / | ||
+ | but with Qt 5.15.8 environment can't compil like: | ||
+ | // | ||
+ | ............building for macOS-arm64 but attempting to link with file config macOS-x86_64..... For KF5 libs...// | ||
+ | |||
+ | |||
+ | Get GIT sources | ||
+ | < | ||
+ | git clone --recursive https:// | ||
+ | </ | ||
+ | Build bundle: | ||
+ | We need to add lang1 in qet_git directory with [[https:// | ||
+ | And create a MAC_OS_X directory in your home otherwise bundles builds was located in / | ||
+ | < | ||
+ | bash qet_git/ | ||
+ | </ | ||
+ | |||
+ | ===== MacOS Homebrew environment (old) ===== | ||
+ | |||
+ | * Note : we can't use Qt 5 sqlite3 plug-in without compile Qt 5 \\ | ||
+ | [[https:// | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | / | ||
+ | |||
+ | brew install qt@5 | ||
+ | |||
+ | brew untap kde-mac/kde 2> /dev/null | ||
+ | brew tap kde-mac/kde https:// | ||
+ | " | ||
+ | |||
+ | |||
+ | brew install kde-mac/ | ||
+ | brew install kde-mac/ | ||
+ | |||
+ | |||
+ | Copy your libs KF5 *.pri on / | ||
+ | |||
+ | cp / | ||
+ | cp / | ||
+ | |||
+ | </ | ||
+ | Edit KF5 .pri file $$PWD/.../ PATH like this | ||
+ | |||
+ | < | ||
+ | QT.KCoreAddons.MAJOR_VERSION = 5 | ||
+ | QT.KCoreAddons.MINOR_VERSION = 99 | ||
+ | QT.KCoreAddons.PATCH_VERSION = 0 | ||
+ | QT.KCoreAddons.name = KF5CoreAddons | ||
+ | QT.KCoreAddons.module = KF5CoreAddons | ||
+ | QT.KCoreAddons.defines = | ||
+ | QT.KCoreAddons.includes = $$PWD/ | ||
+ | QT.KCoreAddons.private_includes = | ||
+ | QT.KCoreAddons.libs = $$PWD/ | ||
+ | QT.KCoreAddons.depends = core | ||
+ | QT.KCoreAddons.module_config = | ||
+ | |||
+ | </ | ||
+ | |||
+ | to | ||
+ | < | ||
+ | |||
+ | QT.KCoreAddons.VERSION = 5.99.0 | ||
+ | QT.KCoreAddons.MAJOR_VERSION = 5 | ||
+ | QT.KCoreAddons.MINOR_VERSION = 99 | ||
+ | QT.KCoreAddons.PATCH_VERSION = 0 | ||
+ | QT.KCoreAddons.name = KF5CoreAddons | ||
+ | QT.KCoreAddons.module = KF5CoreAddons | ||
+ | QT.KCoreAddons.defines = | ||
+ | QT.KCoreAddons.includes = / | ||
+ | QT.KCoreAddons.private_includes = | ||
+ | QT.KCoreAddons.libs = / | ||
+ | QT.KCoreAddons.depends = core | ||
+ | QT.KCoreAddons.module_config = | ||
+ | </ | ||
+ | Same things for qt_KWidgetsAddons.pri | ||
+ | |||
+ | < | ||
+ | cat .bash_profile | ||
+ | # Setting PATH for Qt5.15.7 | ||
+ | PATH="/ | ||
+ | export PATH=/ | ||
+ | export PATH | ||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | git clone --recursive https:// | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | bash qet_git/ | ||
+ | </ | ||
+ | |||
+ | Or | ||
+ | < | ||
+ | cd qet_git/ | ||
+ | qmake -spec macx-clang | ||
+ | make -j24 | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Old Documentation ===== | ||
+ | |||
+ | |||
+ | Cette page regroupe l' | ||
+ | |||
+ | Testé sous El Capitan (10.11). | ||
+ | |||
+ | ==== Préparation de l' | ||
+ | |||
+ | ==== Compiler un programme C++ : XCode ==== | ||
+ | Pour disposer d'un compilateur C++ et de l' | ||
+ | [[https:// | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Vérifications : | ||
+ | < | ||
+ | # Ouvrir une console ; l' | ||
+ | NomDeLaMachine: | ||
+ | make: *** No targets specified and no makefile found. | ||
+ | </ | ||
+ | ==== Compiler un programme C++/Qt : Qt 5.x ==== | ||
+ | |||
+ | Téléchargez et installez Qt pour MacOS : | ||
+ | * Se rendre sur [[http:// | ||
+ | * Répondre aux questions : | ||
+ | - Is your application or device being developed for : Open source distribution under a LGPL or GPL licence | ||
+ | - Are you prepared to make your application source code publicly available : Yes | ||
+ | - Are you able to comply with the obligations of the LGPL (or GPL) and/or does your corporation allow open source usage ? Yes | ||
+ | - Get Started | ||
+ | - Download now (Le QT Online installer for OS X) | ||
+ | * Télécharger et installer le sdk de Qt5.x | ||
+ | |||
+ | PS : Si vous avez ce message d' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Aller dans / | ||
+ | |||
+ | Et sélectionner « N’importe où » : | ||
+ | |||
+ | {{: | ||
+ | |||
+ | < | ||
+ | |||
+ | ______________________________ | ||
+ | Indiquer les variables d’environnement Qt au bash : | ||
+ | - Afficher les fichiers cachés | ||
+ | < | ||
+ | - Ouvrir le fichier : / | ||
+ | - rajouter (en adaptant le numéro de version) : | ||
+ | < | ||
+ | # Setting PATH for Qt5.5 | ||
+ | PATH="/ | ||
+ | export PATH | ||
+ | </ | ||
+ | |||
+ | Vérifications dans la console du Terminal : | ||
+ | < | ||
+ | # les variables d' | ||
+ | NomDeLaMachine: | ||
+ | </ | ||
+ | On doit retrouver quelque chose avec : / | ||
+ | |||
+ | < | ||
+ | # L' | ||
+ | NomDeLaMachine: | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | # Vérification macdeployqt doit être présent : | ||
+ | NomDeLaMachine: | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
+ | / | ||
+ | brew install coreutils | ||
+ | </ | ||
+ | |||
+ | ==== Télécharger les sources : Subversion ==== | ||
+ | Pour télécharger et mettre à jour les sources de QElectroTech, | ||
+ | |||
+ | Vérifications : | ||
+ | < | ||
+ | # Ouvrez une console | ||
+ | NomDeLaMachine: | ||
+ | / | ||
+ | NomDeLaMachine: | ||
+ | svn, version 1.4.4 (r25188) | ||
+ | compiled Jun 23 2007, 08:53:30 | ||
+ | </ | ||
+ | |||
+ | |||
+ | Ouvrer le terminal, taper la commande | ||
+ | < | ||
+ | svn checkout svn:// | ||
+ | </ | ||
+ | Appuyer sur la touche « entrer » de votre clavier et patienter … | ||
+ | {{: | ||
+ | |||
+ | ===== Faire un package avec l' | ||
+ | Ouvrir le terminal, taper la commande, « bash » plus un espace, et glisser le fichier « MacQetDeploy.sh » se trouvant dans le dossier / | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Vérifier qu'il n’y a pas d’erreur : | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Si les erreurs suivantes se produisent, ignorer les, elles correspondent aux bibliothèques mysql et PostgreSQL qui ne sont pas utilisées : | ||
+ | < | ||
+ | ERROR: no file at "/ | ||
+ | ERROR: no file at "/ | ||
+ | </ | ||
+ | |||
+ | Le script vient de télécharger la dernière mise à jour des sources, les compiler, et placer l’application dans un fichier .dmg près à être distribué. L’image disque a comme nom, qelectrotech_ suivi du numéro de version puis du numéro de révision. | ||
+ | Elle se trouve dans : | ||
+ | / | ||
+ | |||
+ | Un lien vers la documentation, | ||
+ | |||
+ | {{: | ||
+ | ===== Problèmes connus, remarques, doléances ===== | ||
+ | |||
+ | < | ||
+ | * pas d’icon sur les sauvegardes de projet (fichier.qet), | ||
+ | * pas de possibilité de lancer l’application en cliquant sur une sauvegarde (fichier.qet), | ||
+ | | ||
+ | | ||
+ | | ||
+ | Voir -> info.plist[[https:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | |||
+ | [[https:// | ||
+ | |||
+ | |||
+ | Info.plist | ||
+ | < | ||
+ | <?xml version=" | ||
+ | < | ||
+ | <plist version=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | defaults write com.apple.LaunchServices LSHandlers -array-add "< | ||
+ | defaults write com.apple.LaunchServices LSHandlers -array-add "< | ||
+ | defaults write com.apple.LaunchServices LSHandlers -array-add "< | ||
+ | / | ||
+ | </ |