From eccc02895ddb5aa8a4edcbb6ea4e46790d6a7962 Mon Sep 17 00:00:00 2001 From: Tom Dewey Date: Tue, 23 Jul 2024 14:52:48 +0100 Subject: [PATCH] Readme: Update for QT6 --- README.md | 87 +++++++++++++------------------------------------------ 1 file changed, 20 insertions(+), 67 deletions(-) diff --git a/README.md b/README.md index ae5d4bf..de4c906 100644 --- a/README.md +++ b/README.md @@ -1,48 +1,37 @@ -# rpi-imager +# Raspberry Pi Imager Raspberry Pi Imaging Utility -- Download the latest version for Windows, macOS and Ubuntu from the [Raspberry Pi downloads page](https://www.raspberrypi.com/software/). - To install on Raspberry Pi OS, use `sudo apt update && sudo apt install rpi-imager`. +- Download the latest version for Windows, macOS and Ubuntu from the [Raspberry Pi downloads page](https://www.raspberrypi.com/software/). # How to use Raspberry Pi Imager Please see our [official documentation](https://www.raspberrypi.com/documentation/computers/getting-started.html#raspberry-pi-imager). -## License -The main code of the Imaging Utility is made available under the terms of the Apache license. -See license.txt and files in "src/dependencies" folder for more information about the various open source licenses that apply to the third-party dependencies used such as Qt, libarchive, drivelist, mountutils and libcurl. -For the embedded (netboot) build see also "embedded/legal-info" for more information about the extra system software included in that. -## How to rebuild +## Contributing -### Debian/Ubuntu Linux +### Raspberry Pi OS/Debian/Ubuntu Linux #### Get dependencies -Install the build dependencies: +- Install the build dependencies: ``` -sudo apt install --no-install-recommends build-essential devscripts debhelper cmake git libarchive-dev libcurl4-gnutls-dev liblzma-dev \ - qtbase5-dev qtbase5-dev-tools qtdeclarative5-dev libqt5svg5-dev qttools5-dev libgnutls28-dev \ - qml-module-qtquick2 qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qtquick-templates2 qml-module-qtquick-window2 qml-module-qtgraphicaleffects +sudo apt install --no-install-recommends build-essential cmake git libgnutls28-dev ``` +- Get the Qt online installer from: https://www.qt.io/download-open-source +- During installation, choose Qt 6.7, CMake and Qt Creator. + #### Get the source ``` git clone --depth 1 https://github.com/raspberrypi/rpi-imager ``` -#### Building on the Pi - -If building on a device with limited memory (e.g. 1 GB Pi), disable parallel build or it may run out of memory: - -``` -export DEB_BUILD_OPTIONS="parallel=1" -``` - #### Build the Debian package ``` @@ -62,66 +51,35 @@ It should create an icon in the start menu under "Utilities" or "Accessories". The imaging utility will normally be run as regular user, and will call udisks2 over DBus to perform privileged operations like opening the disk device for writing. If udisks2 is not functional on your Linux distribution, you can alternatively start it as "root" with sudo and similar tools. -### Fedora/RHEL/CentOS Linux - -#### Get dependencies - -Install the build dependencies: - -``` -sudo yum install git gcc gcc-c++ make cmake libarchive-devel libcurl-devel lzma-sdk-devel openssl-devel qt5-qtbase-devel qt5-qtquickcontrols2-devel qt5-qtsvg-devel qt5-linguist xz-devel -``` - -#### Get the source - -``` -git clone --depth 1 https://github.com/raspberrypi/rpi-imager -``` - -#### Build and install the software - -``` -cd rpi-imager -mkdir -p build -cd build -cmake ../src -make -sudo make install -``` - ### Windows #### Get dependencies - Get the Qt online installer from: https://www.qt.io/download-open-source -During installation, choose a Qt 5.x with Mingw32 32-bit toolchain and CMake. +During installation, choose Qt 6.7 with Mingw32 32-bit toolchain, CMake and Qt Creator. -- If using the official Qt distribution that does NOT have schannel (Windows native SSL library) support, compile OpenSSL libraries ( https://wiki.qt.io/Compiling_OpenSSL_with_MinGW ) and copy the libssl/crypto DLLs to C:\qt\5.x\mingw73_32\bin the include files to C:\qt\5.x\mingw73_32\include and the import library files to C:\qt\5.x\mingw73_32\lib - -- For building installer get Nullsoft scriptable install system: https://nsis.sourceforge.io/Download +- For building the installer, get Nullsoft scriptable install system: https://nsis.sourceforge.io/Download - It is assumed you already have a proper code signing certificate, and signtool.exe from the Windows SDK installed. If NOT and are you only compiling for your own personal use, comment out all lines mentioning signtool from CMakelists.txt and the .nsi installer script. #### Building -Building can be done manually using the command-line, using "cmake", "make", etc., but if you are not that familar with setting up a proper Windows build environment (setting paths, etc.), it is easiest to use the Qt creator GUI instead. +Building Raspberry Pi Imager on Windows is best done with the Qt Creator GUI. - Download source .zip from github and extract it to a folder on disk -- Open src/CMakeLists.txt in Qt creator. -- For builds you distribute to others, make sure you choose "Release" in the toolchain settings and not the debug flavour. +- Open src/CMakeLists.txt in Qt Creator. +- For builds you distribute to others, make sure you choose "Release" in the toolchain settings and not the Debug configuration. - Menu "Build" -> "Build all" - Result will be in build_rpi-imager_someversion - Go to the BUILD folder, right click on the .nsi script "Compile NSIS script", to create installer. -Note: the CMake integration in Qt Creator is a bit flaky at times. If you made any custom changes to the CMakeLists.txt file and it subsequently gets in an endless loop where it never finishes the "configures" stage while re-processing the file, delete "build_rpi-imager_someversion" directory and try again. - ### macOS #### Get dependencies - Get the Qt online installer from: https://www.qt.io/download-open-source -During installation, choose a Qt 5.x edition and CMake. +During installation, choose Qt 6.7, CMake and Qt Creator. - For creating a .DMG for distribution you can use an utility like: https://github.com/sindresorhus/create-dmg - It is assumed you have an Apple developer subscription, and already have a "Developer ID" code signing certificate for distribution outside the Mac Store. (Privileged apps are not allowed in the Mac store) @@ -136,7 +94,7 @@ During installation, choose a Qt 5.x edition and CMake. E.g.: ``` -cd build-rpi-imager-Desktop_Qt_5_14_1_clang_64bit-Release/ +cd build-rpi-imager-Desktop_Qt_6_7_2_clang_64bit-Release/ codesign --deep --force --verify --verbose --sign "YOUR KEYID" --options runtime rpi-imager.app mv rpi-imager.app "Raspberry Pi Imager.app" create-dmg Raspberry\ Pi\ Imager.app @@ -164,11 +122,6 @@ If you would like to build a (signed) netboot image there are tools for that at: ## Other notes -### Debugging - -On Linux and Mac the application will print debug messages to console by default if started from console. -On Windows start the application with the command-line option --debug to let it open a console window. - ### Custom repository If the application is started with "--repo [your own URL]" it will use a custom image repository. @@ -201,8 +154,8 @@ On macOS, disable it by editing the property list for the application: defaults write org.raspberrypi.Imager.plist telemetry -bool NO ``` -### OS Customization +### License -When using the app, press CTRL + SHIFT + X to reveal the **OS Customization** dialog. - -In here, you can specify several things you would otherwise set in the boot configuration files. For example, you can enable SSH, set the Wi-Fi login, and specify your locale settings for the system image. +The main code of the Imaging Utility is made available under the terms of the Apache license. +See license.txt and files in "src/dependencies" folder for more information about the various open source licenses that apply to the third-party dependencies used such as Qt, libarchive, drivelist, mountutils and libcurl. +For the embedded (netboot) build see also "embedded/legal-info" for more information about the extra system software included in that. \ No newline at end of file