diff --git a/.github/workflows/Windows.yml b/.github/workflows/Windows.yml
index 283f20f5c..34a2a1b64 100644
--- a/.github/workflows/Windows.yml
+++ b/.github/workflows/Windows.yml
@@ -2,9 +2,16 @@ name: OpenHD Image Writer Windows
on:
push:
- branches: [ master ]
- pull_request:
- branches: [ master ]
+ branches:
+ - "2.5-evo"
+ - "dev-release"
+ - "release"
+ paths-ignore:
+ - '**.md'
+ - '**.asciidoc'
+ - '**.adoc'
+ - '.gitignore'
+ - 'LICENSE'
env:
BUILD_TYPE: Release
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 5e2ce9af6..6ae32bd90 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -2,7 +2,17 @@ name: Build MacOS
on:
push:
-
+ branches:
+ - "2.5-evo"
+ - "dev-release"
+ - "release"
+ paths-ignore:
+ - '**.md'
+ - '**.asciidoc'
+ - '**.adoc'
+ - '.gitignore'
+ - 'LICENSE'
+
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
@@ -33,6 +43,7 @@ jobs:
- name: Build
# Build your program with the given configuration
run: |
+ cmake --version
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
cd ../build/
ls -a
diff --git a/.github/workflows/ubuntu20.04.yml b/.github/workflows/ubuntu20.04.yml
index dd01ca4cc..8f7b03267 100644
--- a/.github/workflows/ubuntu20.04.yml
+++ b/.github/workflows/ubuntu20.04.yml
@@ -4,13 +4,17 @@ name: OpenHD Image Writer
# Controls when the workflow will run
on:
- # Triggers the workflow on push or pull request events but only for the "qml" branch
push:
- branches: [ "master" ]
- paths-ignore:
- - '**/Windows.yml'
- pull_request:
- branches: [ "master" ]
+ branches:
+ - "2.5-evo"
+ - "dev-release"
+ - "release"
+ paths-ignore:
+ - '**.md'
+ - '**.asciidoc'
+ - '**.adoc'
+ - '.gitignore'
+ - 'LICENSE'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
@@ -43,16 +47,16 @@ jobs:
*.deb
if-no-files-found: error
- - name: Push
- id: push
- uses: cloudsmith-io/action@master
- with:
- api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
- command: "push"
- format: "deb"
- owner: "openhd"
- repo: "openhd-2-3-evo"
- distro: "ubuntu"
- release: "focal"
- republish: "true" # needed ONLY if version is not changing
- file: "*.deb"
+ # - name: Push
+ # id: push
+ # uses: cloudsmith-io/action@master
+ # with:
+ # api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
+ # command: "push"
+ # format: "deb"
+ # owner: "openhd"
+ # repo: "openhd-2-3-evo"
+ # distro: "ubuntu"
+ # release: "focal"
+ # republish: "true" # needed ONLY if version is not changing
+ # file: "*.deb"
diff --git a/.github/workflows/ubuntu22.04.yml b/.github/workflows/ubuntu22.04.yml
new file mode 100644
index 000000000..57c4532db
--- /dev/null
+++ b/.github/workflows/ubuntu22.04.yml
@@ -0,0 +1,63 @@
+# This is a basic workflow to help you get started with Actions
+
+name: OpenHD Image Writer
+
+on:
+ push:
+ branches:
+ - "2.5-evo"
+ - "dev-release"
+ - "release"
+ - "2.0"
+ paths-ignore:
+ - '**.md'
+ - '**.asciidoc'
+ - '**.adoc'
+ - '.gitignore'
+ - 'LICENSE'
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+ # This workflow contains a single job called "build"
+ build:
+ # The type of runner that the job will run on
+ runs-on: ubuntu-22.04
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - uses: actions/checkout@v2
+
+ # Runs a set of commands using the runners shell
+ - name: Build
+ run: |
+ sudo apt update
+ sudo apt upgrade -y
+ sudo apt install -y --no-install-recommends libgnutls28-dev build-essential devscripts debhelper cmake git libarchive-dev libcurl4-openssl-dev qtbase5-dev qtbase5-dev-tools qtdeclarative5-dev libqt5svg5-dev qttools5-dev libssl-dev qml-module-qtquick2 qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qtquick-templates2 qml-module-qtquick-window2 qml-module-qtgraphicaleffects
+ mkdir build
+ mv `ls -A | grep -v "build"` build
+ cd build
+ debuild -uc -us
+ cd ..
+
+ - name: Upload to Github
+ uses: 'actions/upload-artifact@v2'
+ with:
+ name: "OpenHD Image Writer"
+ path: |
+ *.deb
+ if-no-files-found: error
+
+ - name: Push
+ id: push
+ uses: cloudsmith-io/action@master
+ with:
+ api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
+ command: "push"
+ format: "deb"
+ owner: "openhd"
+ repo: ${{ github.ref_name }}
+ distro: "ubuntu"
+ release: "jammy"
+ republish: "true" # needed ONLY if version is not changing
+ file: "*.deb"
diff --git a/.github/workflows/ubuntu23.04.yml b/.github/workflows/ubuntu23.04.yml
index 3e5a21648..e8aad584d 100644
--- a/.github/workflows/ubuntu23.04.yml
+++ b/.github/workflows/ubuntu23.04.yml
@@ -4,13 +4,17 @@ name: OpenHD Image Writer lunar
# Controls when the workflow will run
on:
- # Triggers the workflow on push or pull request events but only for the "qml" branch
push:
- branches: [ "master" ]
- paths-ignore:
- - '**/Windows.yml'
- pull_request:
- branches: [ "master" ]
+ branches:
+ - "2.5-evo"
+ - "dev-release"
+ - "release"
+ paths-ignore:
+ - '**.md'
+ - '**.asciidoc'
+ - '**.adoc'
+ - '.gitignore'
+ - 'LICENSE'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
@@ -61,7 +65,7 @@ jobs:
command: "push"
format: "deb"
owner: "openhd"
- repo: "openhd-x86-evo"
+ repo: ${{ github.ref_name }}
distro: "ubuntu"
release: "lunar"
republish: "true" # needed ONLY if version is not changing
diff --git a/debian/changelog b/debian/changelog
index 97f53f418..b3e0a1451 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,31 @@
+openhdimagewriter (2.0.2) stable; urgency=high
+
+ * add camera selection for about all boards
+
+ -- Raphael Scholle Sat, 02 Sep 2023 02:06:52 +0100
+openhdimagewriter (2.0.1) stable; urgency=high
+
+ * TODO
+
+ -- Raphael Scholle Sat, 02 Sep 2023 02:06:52 +0100
+openhdimagewriter (1.9.2) stable; urgency=high
+
+ * refactor a lot of settings to QSettings
+ * refactor all settings
+ * remove a few bugs with it
+
+ -- Raphael Scholle Sat, 02 Sep 2023 02:06:52 +0100
+openhdimagewriter (1.9.1) stable; urgency=high
+
+ * refactor a lot of settings to QSettings
+ * add wifi-hotspot
+ * add details page
+ * add camera-selection
+ * add wifi-hotspot
+ * add debug mode
+
+ -- Raphael Scholle Sat, 02 Sep 2023 02:06:52 +0100
+
openhdimagewriter (1.9.0) stable; urgency=high
* add bindphrase
diff --git a/debian/control b/debian/control
index 5945a7239..d0d6038b9 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,7 @@ Package: openhdimagewriter
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends},
qml-module-qtquick2, qml-module-qtquick-controls2, qml-module-qtquick-layouts, qml-module-qtquick-templates2, qml-module-qtquick-window2, qml-module-qtgraphicaleffects,
- dosfstools, fdisk
+ dosfstools, fdisk, qml-module-qt-labs-settings
Recommends: udisks2
Description: OpenHD Image Writer
Graphical user-interface to write disk images and format SD cards.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f6b21ea7f..a0e3e8def 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -10,10 +10,10 @@ OPTION (ENABLE_CHECK_VERSION "Check for version updates" ON)
OPTION (ENABLE_TELEMETRY "Enable sending telemetry" ON)
project(OpenHDImageWriter LANGUAGES CXX C)
-set(IMAGER_VERSION_MAJOR 1)
-set(IMAGER_VERSION_MINOR 9)
-set(IMAGER_VERSION_STR "${IMAGER_VERSION_MAJOR}.${IMAGER_VERSION_MINOR}.0")
-set(IMAGER_VERSION_CSV "${IMAGER_VERSION_MAJOR},${IMAGER_VERSION_MINOR},0,0")
+set(IMAGER_VERSION_MAJOR 2)
+set(IMAGER_VERSION_MINOR 0)
+set(IMAGER_VERSION_STR "${IMAGER_VERSION_MAJOR}.${IMAGER_VERSION_MINOR}.2")
+set(IMAGER_VERSION_CSV "${IMAGER_VERSION_MAJOR},${IMAGER_VERSION_MINOR},2,0")
add_definitions(-DIMAGER_VERSION_STR="${IMAGER_VERSION_STR}")
add_definitions(-DIMAGER_VERSION_CSV=${IMAGER_VERSION_CSV})
diff --git a/src/MsgPopup.qml b/src/MsgPopup.qml
index 8772482f8..a39348c68 100644
--- a/src/MsgPopup.qml
+++ b/src/MsgPopup.qml
@@ -21,6 +21,7 @@ Popup {
property alias title: msgpopupheader.text
property alias text: msgpopupbody.text
property bool continueButton: true
+ property bool detailsButton: false
property bool quitButton: false
property bool yesButton: false
property bool noButton: false
@@ -93,6 +94,19 @@ Popup {
Layout.alignment: Qt.AlignCenter | Qt.AlignBottom
spacing: 20
+
+ ImButton {
+ visible: msgpopup.detailsButton
+ text: qsTr("Details")
+ onClicked:{
+ onClicked: {
+ detailsPopup.visible = !detailsPopup.visible;
+ }
+ }
+ Material.foreground: activeFocus ? "#d1dcfb" : "#ffffff"
+ Material.background: "#2C3E50"
+ }
+
ImButton {
text: qsTr("NO")
onClicked: {
@@ -124,7 +138,6 @@ Popup {
Material.foreground: activeFocus ? "#d1dcfb" : "#ffffff"
Material.background: "#2C3E50"
}
-
ImButton {
text: qsTr("QUIT")
onClicked: {
@@ -138,22 +151,6 @@ Popup {
Text { text: " " }
}
- RowLayout {
- Layout.alignment: Qt.AlignLeft | Qt.AlignBottom
- Layout.leftMargin: 20
- Layout.bottomMargin: 10
- Text {
- id: changelog
- text: "changelogs FIRST BOOT MAY TAKE UP TO 5 MINUTES! "
- font.family: roboto.name
- font.pointSize: 10
- visible: msgpopup.continueButton
- MouseArea {
- anchors.fill: parent
- onClicked: Qt.openUrlExternally("https://openhdfpv.org/changelogs")
- }
- }
- }
}
function openPopup() {
@@ -162,3 +159,4 @@ Popup {
msgpopupbody.forceActiveFocus()
}
}
+
diff --git a/src/OpenHD-download-index.json b/src/OpenHD-download-index.json
new file mode 100644
index 000000000..7fbd20cf2
--- /dev/null
+++ b/src/OpenHD-download-index.json
@@ -0,0 +1,343 @@
+{
+ "imager": {
+ "latest_version": "2.0.1-OpenHD",
+ "url": "https://openhdfpv.org/#downloads"
+ },
+ "os_list": [
+ {
+ "name": "OpenHD Evo Raspberry",
+ "description": "Images for Raspberry-Pi SBC's",
+ "icon": "https://upload.wikimedia.org/wikipedia/de/thumb/c/cb/Raspberry_Pi_Logo.svg/570px-Raspberry_Pi_Logo.svg.png",
+ "subitems": [
+ {
+ "name": "OpenHD-2.5.3",
+ "description": "Improved OS, frequencies,...",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/ImageWriter/rpi-ohd.png",
+ "url": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/OpenHD-image-pi-bullseye-configurable-release-2024-01-08_1550.img.xz",
+ "extract_size": 2866950656,
+ "extract_sha256": "b6dafb8cf2c3e3c9e4f3e3ad427a2f25a02b55b45334863b6bd595c71b37bda5",
+ "image_download_size": 754596864,
+ "release_date": "2024-01-08",
+ "init_format": "systemd"
+ },
+ {
+ "name": "OpenHD-2.4.1-evo",
+ "description": "Expose more camera setting, enable Gpio switching, performance and bugfixes",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/ImageWriter/rpi-ohd.png",
+ "url": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/OpenHD-image-pi-bullseye-configurable-2.4-evo-2023-06-30_2230.img.xz",
+ "extract_size": 3452678656,
+ "extract_sha256": "7c24543a3b075e773ae51fcb53c768efea4a740d1c6e3eef30463e9140c1d247",
+ "image_download_size": 928471500,
+ "release_date": "2023-06-30",
+ "init_format": "systemd"
+ },
+ {
+ "name": "OpenHD-2.4-evo-beta ",
+ "description": "Adds 6.x Kernel, IMX708 support, more Camera settings, MCS via RC,...",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/ImageWriter/rpi-ohd.png",
+ "url": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/OpenHD-image-pi-bullseye-configurable-2.4-evo-2023-06-23_1731.img.xz",
+ "extract_size": 3452572160,
+ "extract_sha256": "2dcfcc440ce6f4ae6c81afe7124b743b6df4aba060c35d1329533abc3c513d1c",
+ "image_download_size": 946835456,
+ "release_date": "2023-06-23",
+ "init_format": "systemd"
+ },
+ {
+ "name": "OpenHD-2.3.6-evo ",
+ "description": "OpenHD Evo for Raspberry",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/ImageWriter/rpi-ohd.png",
+ "url": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/OpenHD-image-pi-bullseye-release--2.3-evo-2023-06-04_2201-configurable.img.xz",
+ "extract_size": 3473338880,
+ "extract_sha256": "711b71b461e3d1f245b04737bfabd53bf89569b523d06f23f03144753b8c69b6",
+ "image_download_size": 908356600,
+ "release_date": "2023-06-04",
+ "init_format": "systemd"
+ },
+ {
+
+ "name": "OpenHD-2.3.5-evo-beta ",
+ "description": "OpenHD Evo for Raspberry",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/ImageWriter/rpi-ohd.png",
+ "url": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/OpenHD-image-pi-bullseye-configurable-2.3-evo-2023-05-18_1031.zip",
+ "extract_size": 3416003072,
+ "extract_sha256": "d2018a810260a47c9c98bdc2f0ab28eb21dd0a4e261210d49d68268cfa0eace0",
+ "image_download_size": 1181022536,
+ "release_date": "2023-05-18",
+ "init_format": "systemd"
+ },
+ {
+
+ "name": "OpenHD-2.3.3-evo-beta ",
+ "description": "OpenHD Evo for Raspberry",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/ImageWriter/rpi-ohd.png",
+ "url": "https://openhd-images.fra1.cdn.digitaloceanspaces.com/Downloader/OpenHD-image-pi-bullseye-release--2.3-evo-2023-03-10_2127-configurable.img.xz",
+ "extract_size": 3416003072,
+ "extract_sha256": "7e4cc3adfccb982471bac209b80c6fa0634026d37a766093ce77775c81f79d0a",
+ "image_download_size": 1181022536,
+ "release_date": "2023-03-10",
+ "init_format": "systemd"
+ }
+ ]
+ },
+ {
+ "name": "OpenHD Evo Radxa",
+ "description": "Images for Radxa SBC's",
+ "icon": "https://forum.radxa.com/uploads/default/original/1X/afb83a5d13f03ccc5f26a0c5800a02e320b06468.png",
+ "subitems": [
+ {
+ "name": "OpenHD-2.5.2-beta",
+ "description": "Radxa Zero 3W EMMC",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/OpenHD-advanced.png",
+ "url": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/2.5/OpenHD-EMMC-radxa-zero3w--release.img.xz",
+ "extract_size": 9500000256,
+ "extract_sha256": "1e6b37af103ee90868bcbd8e4cb0dab92c26a9768d092b9b42d3eb57e46a9efa",
+ "image_download_size": 3579883260,
+ "release_date": "2023-12-12",
+ "init_format": "systemd"
+ },
+ {
+ "name": "OpenHD-2.5.2-beta",
+ "description": "Radxa CM3",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/OpenHD-advanced.png",
+ "url": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/2.5/OpenHD-image-radxa-cm3--release-2023-12-12_1737.img.xz",
+ "extract_size": 5999997952,
+ "extract_sha256": "436585538dd0a0095f682c7f7e1d5e141349b2b16ad0ffdb182e9ffb96cc4052",
+ "image_download_size": 1458197624,
+ "release_date": "2023-12-12",
+ "init_format": "systemd"
+ },
+ {
+ "name": "OpenHD-2.5.2-beta",
+ "description": "Radxa Rock5 A",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/OpenHD-advanced.png",
+ "url": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/2.5/OpenHD-image-rock5a--release-2023-12-12_1736.img.xz",
+ "extract_size": 6800000000,
+ "extract_sha256": "1add63e53aa418bffa2dbe3ae1d84cdbb6fa7a1747002b54d99ffa370532232d",
+ "image_download_size": 1525008004,
+ "release_date": "2023-12-12",
+ "init_format": "systemd"
+ },
+ {
+ "name": "OpenHD-2.5.2-beta",
+ "description": "Radxa Rock5 B",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/OpenHD-advanced.png",
+ "url": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/2.5/OpenHD-image-rock5b--release-2023-12-12_1736.img.xz",
+ "extract_size": 6800000000,
+ "extract_sha256": "c43ad90e6bc6dfade597849b8e9f37174c90de99fcc376372af38f907f513aa4",
+ "image_download_size": 1621560708,
+ "release_date": "2023-12-12",
+ "init_format": "systemd"
+ },
+ {
+ "name": "OpenHD-2.4.1-evo Rock5B",
+ "description": "Added custom kernel and 8812bu support, only Ground",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/OpenHD-advanced.png",
+ "url": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/OpenHD-image-rock5b--2.4-evo-2023-06-30_2230.img.xz",
+ "extract_size": 14500000256,
+ "extract_sha256": "399ba04a68a7f0872a9239f096fc0da8c2aacb56b5d0d028fe3e8822f971fa2d",
+ "image_download_size": 1698576940,
+ "release_date": "2023-30-06",
+ "init_format": "systemd"
+ },
+ {
+ "name": "OpenHD-2.4.1-evo Rock5A",
+ "description": "Added custom kernel and 8812bu support, only Ground",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/OpenHD-advanced.png",
+ "url": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/OpenHD-image-rock5a--2.4-evo-2023-06-30_2231.img.xz",
+ "extract_size": 14500000256,
+ "extract_sha256": "628d2af56d11a27058401089a02979e1b5932a2d452c88e922d21db588d565cd",
+ "image_download_size": 1647829508,
+ "release_date": "2023-30-06",
+ "init_format": "systemd"
+ },
+ {
+ "name": "OpenHD-2.4-evo-beta Rock5B",
+ "description": "Initial Radxa Rock5B support, only Ground",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/OpenHD-advanced.png",
+ "url": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/OpenHD-ground-rock5b--2.4-evo-2023-06-23_1731.img.xz",
+ "extract_size": 14500000256,
+ "extract_sha256": "edffe76325aa19c4a11fa462599f9d84487df1376e3a24d716299bcb720dd621",
+ "image_download_size": 1410447972,
+ "release_date": "2023-23-06",
+ "init_format": "systemd"
+ },
+ {
+ "name": "OpenHD-2.4-evo-beta Rock5A",
+ "description": "Initial Radxa Rock5A support, only Ground",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/OpenHD-advanced.png",
+ "url": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/OpenHD-ground-rock5a--2.4-evo-2023-06-23_1731.img.xz",
+ "extract_size": 14500000256,
+ "extract_sha256": "dcbc281452122a3046a0631a6d80e5fe2ddbe0976138933345fa5dec8fbdd393",
+ "image_download_size": 1404092244,
+ "release_date": "2023-23-06",
+ "init_format": "systemd"
+ }
+ ]
+ },
+ {
+ "name": "OpenHD Evo X86",
+ "description": "Images for normal Computers",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/ImageWriter/x86.png",
+ "subitems": [
+ {
+ "name": "OpenHD-2.4.1-evo",
+ "description": "updated to latest OpenHD/QOpenHD",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/ImageWriter/x86-ohd.png",
+ "url": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/OpenHD-image-x86-jammy--2.4-evo-2023-06-30_2230.img.xz",
+ "extract_size": 16500000256,
+ "extract_sha256": "8cecff8366272328694382dc5f644b5c962e9876a11428090256379170396253",
+ "image_download_size": 5616280016,
+ "release_date": "2023-30-06",
+ "init_format": "systemd"
+ },
+ {
+ "name": "OpenHD-2.4-evo-beta ",
+ "description": "updated to latest OpenHD/QOpenHD",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/ImageWriter/x86-ohd.png",
+ "url": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/OpenHD-image-x86-jammy--2.4-evo-2023-06-23_1731.img.xz",
+ "extract_size": 16500000256,
+ "extract_sha256": "aa65dbbe24308d318df977710bcc70620fe988f9499d83fe6b1d2e2547032b31",
+ "image_download_size": 5691925560,
+ "release_date": "2023-23-06",
+ "init_format": "systemd"
+ },
+ {
+ "name": "OpenHD-2.3.6-evo ",
+ "description": "OpenHD Evo for x86",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/ImageWriter/x86-ohd.png",
+ "url": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/OpenHD-image-x86-jammy-testing--2.3-evo-2023-06-04_2201.img.xz",
+ "extract_size": 16500000256,
+ "extract_sha256": "98097d16c15a02f9025b4baee3416421a3e20c8112dfc76b51c295409f91a064",
+ "image_download_size": 6143738016,
+ "release_date": "2023-06-04"
+ },
+ {
+ "name": "OpenHD-2.3.5-evo-beta ",
+ "description": "OpenHD Evo for x86",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/ImageWriter/x86-ohd.png",
+ "url": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/OpenHD-image-x86-jammy--2.3-evo-2023-05-18_1030.img.xz",
+ "extract_size": 16500000256,
+ "extract_sha256": "fb722a0b3f25576c96cfb0e514e6128b01ee48b90163d29cbcad32f77adc1797",
+ "image_download_size": 5769245024,
+ "release_date": "2023-03-10"
+ },
+ {
+ "name": "OpenHD-2.3.3-evo-beta ",
+ "description": "OpenHD Evo for x86",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/ImageWriter/x86-ohd.png",
+ "url": "https://openhd-images.fra1.cdn.digitaloceanspaces.com/Downloader/OpenHD-image-x86-jammy-testing--2.3-evo-2023-03-10_2126.img.xz",
+ "extract_size": 15728640000,
+ "extract_sha256": "da0495dfd3a6f2e662a65207ee8f84695869cb4137e6059d133e681cd9d12045",
+ "image_download_size": 6194596280,
+ "release_date": "2023-03-10"
+ }
+ ]
+ },
+ {
+ "name": "OpenHD 2.0",
+ "description": "OpenHD 2.0 Images",
+ "icon": "https://openhd-images.fra1.cdn.digitaloceanspaces.com/Downloader/OpenHD-old.png",
+ "subitems": [
+ {
+ "name": "OpenHD 2.0.12 Raspberry Pi",
+ "description": "Raspberry Pi Buster",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/ImageWriter/rpi-ohd.png",
+ "url": "https://openhd-images.fra1.cdn.digitaloceanspaces.com/Downloader/Open.HD-2.0.12b-buster.zip",
+ "extract_size": 4001370112,
+ "extract_sha256": "3d0e3cea1972ad99cc5aa33c549ec0c7a3f1747e65eb8c853fb12a880f00c511",
+ "image_download_size": 1596698624,
+ "release_date": "2021-23-09"
+ },
+ {
+ "name": "OpenHD 2.0.8 B",
+ "description": "Raspberry Pi Buster",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/ImageWriter/rpi-ohd.png",
+ "url": "https://openhd-images.fra1.cdn.digitaloceanspaces.com/Downloader/Open.HD-2.0.8-buster.img.gz",
+ "extract_size": 4001370112,
+ "extract_sha256": "3fc94dc9871a3fda65900c40dfc7a3fbaabf25204023be8b6da07cb47fbb8151",
+ "image_download_size": 1569824768,
+ "release_date": "2020-17-12"
+ },
+ {
+ "name": "OpenHD 2.0.8 S",
+ "description": "Raspberry Pi Stretch",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/ImageWriter/rpi-ohd.png",
+ "url": "https://openhd-images.fra1.cdn.digitaloceanspaces.com/Downloader/Open.HD-2.0.8-stretch.img.gz",
+ "extract_size": 4013953024,
+ "extract_sha256": "7b59470ef660d10ae2928ad3b86a08eb69f978ddeeab6d66ef79cb5b9ce645ef",
+ "image_download_size": 1351294976,
+ "release_date": "2020-17-12"
+ }
+ ]
+ },
+ {
+
+ "name": "Mirrors in case of Downtime",
+ "description": "Emergency backups of the latest Images",
+ "icon": "https://www.nicepng.com/png/detail/58-589511_emergency-alert-icon.png",
+ "subitems": [
+ {
+ "name": "OpenHD-2.4.1-evo",
+ "description": "OpenHD Evo for Raspberry",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/release/ImageWriter/rpi-ohd.png",
+ "url": "https://github.com/OpenHD/OpenHD-ImageBuilder/releases/download/2.4.1/OpenHD-image-pi-bullseye-configurable-2.4-evo-2023-06-30_2230.img.xz",
+ "extract_size": 3473338880,
+ "extract_sha256": "7c24543a3b075e773ae51fcb53c768efea4a740d1c6e3eef30463e9140c1d247",
+ "image_download_size": 908356600,
+ "release_date": "2023-06-04",
+ "init_format": "systemd"
+ }
+ ]
+ },
+ {
+ "name": "OpenHD Evo Depricated",
+ "description": "OpenHD Images for depricated SBC's",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/OpenHD-advanced.png",
+ "subitems": [
+ {
+ "name": "OpenHD-2.3.3-evo-beta ",
+ "description": "OpenHD Evo for Jetson 2GB",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/OpenHD-advanced.png",
+ "url": "https://openhd-images.fra1.cdn.digitaloceanspaces.com/Downloader/OpenHD-image-jetson-nano-2gb-bionic-testing--2.3-evo-2023-03-10_2145.img.xz",
+ "extract_size": 15732310016,
+ "extract_sha256": "eb124811b86c72d56db26738fc73c5fdec9ab361e6f387c4e02fe668f8cca127",
+ "image_download_size": 6617753600,
+ "release_date": "2023-03-10"
+ },
+ {
+ "name": "OpenHD-2.3.3-evo-beta ",
+ "description": "OpenHD Evo for Jetson 4GB",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/OpenHD-advanced.png",
+ "url": "https://openhd-images.fra1.cdn.digitaloceanspaces.com/Downloader/OpenHD-image-jetson-nano-4gb-bionic-testing--2.3-evo-2023-03-10_2145.img.xz",
+ "extract_size": 15367929856,
+ "extract_sha256": "6e74f071fa078810c1acf06917124e0e9b0314697e3d2782dc1982653bacc5da",
+ "image_download_size": 6434877512,
+ "release_date": "2023-03-10"
+ },
+ {
+ "name": "OpenHD-2.3.2-beta ",
+ "description": "OpenHD Evo for Jetson 2GB",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/OpenHD-advanced.png",
+ "url": "https://openhd-images.fra1.cdn.digitaloceanspaces.com/Downloader/OpenHD-image-jetson-nano-2gb-bionic-testing--2.3-evo-2023-03-06_2007.img.xz",
+ "extract_size": 14838903296,
+ "extract_sha256": "a4795fede6412f22e31f234b381ea378798d4f62d01346b39108f66f61ec8f7f",
+ "image_download_size": 6389115840,
+ "release_date": "2023-03-06",
+ "init_format": "systemd"
+ },
+ {
+ "name": "OpenHD-2.3.2-beta ",
+ "description": "OpenHD Evo for Jetson 4GB",
+ "icon": "https://fra1.digitaloceanspaces.com/openhd-images/Downloader/OpenHD-advanced.png",
+ "url": "https://openhd-images.fra1.cdn.digitaloceanspaces.com/Downloader/OpenHD-image-jetson-nano-4gb-bionic-testing--2.3-evo-2023-03-06_2007.img.xz",
+ "extract_size": 14885933568,
+ "extract_sha256": "cb3fa7aceda4de2b9159dbfbb8226f186b75d5ca3aa7cec378f59398fc8bba40",
+ "image_download_size": 6346920140,
+ "release_date": "2023-03-06",
+ "init_format": "systemd"
+ }
+
+ ]
+ }
+ ]
+}
diff --git a/src/OptionsPopup.qml b/src/OptionsPopup.qml
index 945c136c2..16a3af748 100644
--- a/src/OptionsPopup.qml
+++ b/src/OptionsPopup.qml
@@ -21,16 +21,25 @@ Popup {
padding: 0
closePolicy: Popup.CloseOnEscape
property bool initialized: false
- property bool hasSavedSettings: false
- property string config
- property string cmdline
- property string openHDAir
- property string openHDIp
- property string openHDGround
- property string cloudinit
- property string cloudinitrun
- property string cloudinitwrite
- property string cloudinitnetwork
+
+ // refactored settings
+ property string bootType
+ property string fileName
+ property string sbc
+ property string camera
+ property string bindPhrase
+ property bool bindPhrase_used
+ property string mode
+ property string hotSpot
+ property string beep
+ property string eject
+ property bool rock3
+ property bool rock5
+ property bool rpi
+ property bool useSettings:true
+
+
+
// background of title
Rectangle {
@@ -74,179 +83,315 @@ Popup {
clip: true
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
- ColumnLayout {
- GroupBox {
- title: qsTr(" Necessary Settings")
-
- label: RowLayout {
- Label {
- text: parent.parent.title
- }
- }
-
- Layout.fillWidth: true
-
- ColumnLayout {
- spacing: -10
-
- ImCheckBox {
- id: setAir
- text: qsTr("Set SBC to AIR")
- onCheckedChanged: {
- if (checked) {
- setGround.checked = false
- bootAsAir();
- var fileName = imageWriter.srcFileName();
- if (fileName.includes("pi")) {
- imageWriter.setSetting("SBC", "rpi");
- cameraSettingsRpi.visible=false
- cameraSettingsRock5.visible=false
- }
- if (fileName.includes("rock")) {
- cameraSettingsRock5.visible=true
- cameraSettingsRpi.visible=false
- }
- if (fileName.includes("rock5a")) {
- imageWriter.setSetting("SBC", "rock-5a");
- }
- if (fileName.includes("rock5b")) {
- imageWriter.setSetting("SBC", "rock-5b");
- }
- }
- }
- }
- ImCheckBox {
- id: setGround
- text: qsTr("Set SBC to GROUND")
- onCheckedChanged: {
- if (checked) {
- setAir.checked = false
- bootAsGround();
- cameraSettingsRpi.visible=false
- cameraSettingsRock5.visible=false
- }
- }
- }
- ImCheckBox {
- id: setIp
- visible: false
- text: qsTr("DUMMY setting")
- onCheckedChanged: {
- if (checked) {
- //setGround.checked = false
- //bootAsIp();
- }
- }
- }
- }
- }
- GroupBox {
- title: qsTr("Camera Settings")
- id: cameraSettingsRock5
- Layout.fillWidth: true
- visible: false
-
- ColumnLayout {
- spacing: -10
- // Add a ComboBox to select between cameras
- ComboBox {
- id: cameraSelectorRock
- textRole: "displayText"
- model: ListModel {
- ListElement { displayText: "NONE" }
- ListElement { displayText: "IMX415" }
- ListElement { displayText: "IMX462" }
- ListElement { displayText: "HDMI" }
- }
- onCurrentIndexChanged: {
- var selectedCamera = model.get(currentIndex).displayText;
- if (selectedCamera !== "NONE") {
- imageWriter.setSetting("camera", selectedCamera);
- }
- }
- }
- }
- }
- GroupBox {
- title: qsTr("Camera Settings")
- id: cameraSettingsRpi
- Layout.fillWidth: true
- visible:false
- ColumnLayout {
- spacing: -10
- // Add a ComboBox to select between cameras
- ComboBox {
- id: cameraSelectorRpi
- textRole: "displayText"
- width:300
- model: ListModel {
- ListElement { displayText: "NONE" }
- ListElement { displayText: "IMX708" }
- ListElement { displayText: "IMX462" }
- ListElement { displayText: "IMX519" }
- ListElement { displayText: "IMX477" }
- ListElement { displayText: "IMX219" }
- }
- onCurrentIndexChanged: {
- var selectedCamera = model.get(currentIndex).displayText;
- if (selectedCamera !== "NONE") {
- imageWriter.setSetting("camera", selectedCamera);
- }
- }
- }
- }
- }
- GroupBox {
- title: qsTr("Bind Settings")
- Layout.fillWidth: true
- visible: true
-
- ColumnLayout {
- spacing: -10
-
- ImCheckBox {
- id: bndKey
- text: qsTr("Set binding phrase")
- checkable: false
- onCheckedChanged: {
- cloudinit=(bndPhrase.text)
- }
- }
- TextField {
- id: bndPhrase
- maximumLength:10
- width:10
- color: bndPhrase.text.length >= 4 ? "green" : "red"
- text: imageWriter.getValue("bindPhrase")
- selectByMouse: true
- placeholderTextColor: "blue"
- placeholderText: "OpenHD"
- onTextChanged: {
- bndKey.checkable = bndPhrase.text.length >= 4
- }
-
- }
- }
- }
-
- GroupBox {
- title: qsTr("Imager settings")
- Layout.fillWidth: true
-
- ColumnLayout {
- spacing: -10
-
- ImCheckBox {
- id: chkBeep
- text: qsTr("Play sound when finished")
+ ColumnLayout {
+ GroupBox {
+ label: RowLayout {
+ Label {
+ text: parent.parent.title
+ }
+ }
+
+ Layout.fillWidth: true
+
+ ColumnLayout {
+ spacing: -10
+
+ ImCheckBox {
+ id: setAir
+ text: qsTr("Set SBC to AIR")
+ onCheckedChanged: {
+ if (checked) {
+ setGround.checked = false
+ bootType="Air";
+ }
+ }
+ }
+ ImCheckBox {
+ id: setGround
+ text: qsTr("Set SBC to GROUND")
+ onCheckedChanged: {
+ if (checked) {
+ setAir.checked = false
+ bootType = "Ground";
+ }
+ }
+ }
+ }
+ }
+ GroupBox {
+ title: qsTr("Camera Settings")
+ id: cameraSettingsRock5
+ Layout.fillWidth: true
+ visible: rock5 && (bootType === "Air")
+
+ ColumnLayout {
+ spacing: -10
+ // Add a ComboBox to select between cameras
+ ComboBox {
+ id: cameraSelectorRock5
+ textRole: "displayText"
+ model: ListModel {
+ ListElement { displayText: "NONE" }
+ ListElement { displayText: "HDMI" }
+ ListElement { displayText: "OV5647" }
+ ListElement { displayText: "IMX219" }
+ ListElement { displayText: "IMX415" }
+ ListElement { displayText: "IMX462" }
+ ListElement { displayText: "IMX708" }
+ // ListElement { displayText: "OHD-JAGUAR" }
+ }
+ onCurrentIndexChanged: {
+ var selectedCamera = model.get(currentIndex).displayText;
+ if (selectedCamera !== "NONE") {
+ camera = selectedCamera;
+ }
+ }
+ }
+ }
+ }
+ GroupBox {
+ title: qsTr("Camera Settings")
+ id: cameraSettingsRock3
+ Layout.fillWidth: true
+ visible: rock3 && (bootType === "Air")
+
+
+ ColumnLayout {
+ spacing: -10
+ ComboBox {
+ id: cameraSelectorRock3
+ textRole: "displayText"
+ model: ListModel {
+ ListElement { displayText: "NONE" }
+ ListElement { displayText: "IMX219" }
+ ListElement { displayText: "OV5647" }
+ ListElement { displayText: "IMX708" }
+ // ListElement { displayText: "OHD-JAGUAR" }
+ }
+ onCurrentIndexChanged: {
+ var selectedCamera = model.get(currentIndex).displayText;
+ if (selectedCamera !== "NONE") {
+ camera = selectedCamera;
+ }
+ }
+ }
+ }
+ }
+ GroupBox {
+ title: qsTr("Camera Settings")
+ id: cameraSettingsRpi
+ Layout.fillWidth: true
+ visible: rpi && (bootType === "Air")
+ ColumnLayout {
+ // Add a ComboBox to select between cameras
+ ComboBox {
+ id: cameraVendorSelectorRpi
+ textRole: "displayText"
+ model: ListModel {
+ ListElement { displayText: "Raspberry" }
+ ListElement { displayText: "Arducam" }
+ ListElement { displayText: "Veye" }
+ ListElement { displayText: "Advanced" }
+ }
+ Layout.minimumWidth: 200
+ Layout.maximumHeight: 40
+ onCurrentIndexChanged: {
+ var selectedCameraVendor = model.get(currentIndex).displayText;
+ if (selectedCameraVendor !== "Raspberry" && selectedCameraVendor !== "Veye" && selectedCameraVendor !== "Advanced") {
+ cameraSelectorArducam.visible=true
+ cameraSelectorVeye.visible=false
+ cameraSelectorAdvanced.visible=false
+ cameraSelectorRpiOriginal.visible=false
+ }
+ else if (selectedCameraVendor !== "Raspberry" && selectedCameraVendor !== "Arducam" && selectedCameraVendor !== "Advanced") {
+ cameraSelectorVeye.visible=true
+ cameraSelectorArducam.visible=false
+ cameraSelectorAdvanced.visible=false
+ cameraSelectorRpiOriginal.visible=false
+ }
+ else if (selectedCameraVendor !== "Raspberry" && selectedCameraVendor !== "Arducam"&& selectedCameraVendor !== "Veye") {
+ cameraSelectorVeye.visible=false
+ cameraSelectorArducam.visible=false
+ cameraSelectorAdvanced.visible=true
+ cameraSelectorRpiOriginal.visible=false
+ }
+ else if (selectedCameraVendor !== "Advanced" && selectedCameraVendor !== "Arducam"&& selectedCameraVendor !== "Veye") {
+ cameraSelectorVeye.visible=false
+ cameraSelectorArducam.visible=false
+ cameraSelectorAdvanced.visible=false
+ cameraSelectorRpiOriginal.visible=true
+ }
+ }
+ }
+ ComboBox {
+ id: cameraSelectorAdvanced
+ visible:false
+ textRole: "displayText"
+ model: ListModel {
+ ListElement { displayText: "None" }
+ ListElement { displayText: "USB" }
+ ListElement { displayText: "FILESRC" }
+ ListElement { displayText: "IP-CAMERA" }
+ ListElement { displayText: "EXTERNAL" }
+ ListElement { displayText: "TESTPATTERN" }
+ }
+ Layout.minimumWidth: 200
+ Layout.maximumHeight: 40
+ onCurrentIndexChanged: {
+ var selectedCamera = model.get(currentIndex).displayText;
+ if (selectedCamera !== "None") {
+ camera = selectedCamera;
+ }
+ }
+ }
+ ComboBox {
+
+ id: cameraSelectorRpiOriginal
+ visible:false
+ textRole: "displayText"
+ model: ListModel {
+ ListElement { displayText: "None" }
+ ListElement { displayText: "HDMI" }
+ ListElement { displayText: "OV5647" }
+ ListElement { displayText: "IMX219" }
+ ListElement { displayText: "IMX477" }
+ ListElement { displayText: "IMX708" }
+
+ }
+ Layout.minimumWidth: 200
+ Layout.maximumHeight: 40
+ onCurrentIndexChanged: {
+ var selectedCamera = model.get(currentIndex).displayText;
+ if (selectedCamera !== "None") {
+ camera = selectedCamera;
+ }
+ }
+ }
+ ComboBox {
+
+ id: cameraSelectorArducam
+ visible:false
+ textRole: "displayText"
+ model: ListModel {
+ ListElement { displayText: "None" }
+ ListElement { displayText: "SkyMasterHDR708" }
+ ListElement { displayText: "SkyVisionPro519" }
+ ListElement { displayText: "IMX462MINI" }
+ ListElement { displayText: "IMX477" }
+ ListElement { displayText: "IMX477m" }
+ ListElement { displayText: "IMX462" }
+ ListElement { displayText: "IMX327" }
+ ListElement { displayText: "IMX290" }
+ }
+ Layout.minimumWidth: 200
+ Layout.maximumHeight: 40
+ onCurrentIndexChanged: {
+ var selectedCamera = model.get(currentIndex).displayText;
+ if (selectedCamera !== "None") {
+ camera = selectedCamera;
+ }
+ }
+ }
+ ComboBox {
+
+ id: cameraSelectorVeye
+ visible:false
+ textRole: "displayText"
+ model: ListModel {
+ ListElement { displayText: "None" }
+ ListElement { displayText: "2MPCAMERAS" }
+ ListElement { displayText: "CSIMX307" }
+ ListElement { displayText: "CSSC137" }
+ ListElement { displayText: "MVCAM" }
+ }
+ Layout.minimumWidth: 200
+ Layout.maximumHeight: 40
+ onCurrentIndexChanged: {
+ var selectedCamera = model.get(currentIndex).displayText;
+ if (selectedCamera !== "None") {
+ camera = selectedCamera;
+ }
+ }
+ }
+
+ }
+ }
+ GroupBox {
+ title: qsTr("Bind Settings")
+ Layout.fillWidth: true
+ visible: true
+
+ ColumnLayout {
+ spacing: 0
+
+ Text {
+ text: qsTr(" Must match on Air and Ground!")
+ font.pixelSize: 12
+ color: "gray"
+ Layout.alignment: Qt.AlignHCenter
+ }
+
+ ImCheckBox {
+ id: bndKey
+ text: qsTr("Set binding phrase")
+ checkable: true
+ onCheckedChanged: {
+ if (!checked) {
+ bindPhrase=""
+ bndPhrase.visible=false;
+ }
+ bndPhrase.visible=true;
+ }
+ }
+ TextField {
+ id: bndPhrase
+ visible: bindPhrase_used
+ maximumLength:10
+ width:10
+ color: bndPhrase.text.length >= 4 ? "green" : "red"
+ text: bindPhrase
+ selectByMouse: true
+ placeholderTextColor: "blue"
+ placeholderText: "openhd"
+ onTextChanged: {
+ bindPhrase = bndPhrase.text;
+ }
+
+ }
+ }
+ }
+
+ GroupBox {
+ title: qsTr("Misc Settings")
+ id: miscSettings
+ Layout.fillWidth: true
+ ColumnLayout {
+ spacing: -10
+
+ ImCheckBox {
+ id: setDebug
+ visible: true
+ text: qsTr("Debug Mode")
+ onCheckedChanged: {
+ if (checked) {
+ mode = "debug";
+ }
+ }
}
- ImCheckBox {
- id: chkEject
- text: qsTr("Do not flash config files")
+
+ ImCheckBox {
+ id: setWifiHotspot
+ visible: false
+ text: qsTr("WifiHotspot")
+ onCheckedChanged: {
+ if (checked) {
+ hotSpot = "wifi";
+ }
+ }
+ }
}
}
}
- }
}
RowLayout {
@@ -258,7 +403,6 @@ Popup {
text: qsTr("SAVE")
onClicked: {
applySettings()
- saveSettings()
popup.close()
}
Material.foreground: activeFocus ? "#d1dcfb" : "#ffffff"
@@ -270,42 +414,80 @@ Popup {
}
function initialize() {
- chkBeep.checked = imageWriter.getBoolSetting("beep")
- chkEject.checked = false
var settings = imageWriter.getSavedCustomizationSettings()
- if (Object.keys(settings).length) {
- comboSaveSettings.currentIndex = 1
- hasSavedSettings = true
- }
- var tz;
- if (imageWriter.isEmbeddedMode()) {
- /* For some reason there is no password mask character set by default on Embedded edition */
- var bulletCharacter = String.fromCharCode(0x2022);
- fieldUserPassword.passwordCharacter = bulletCharacter;
- fieldWifiPassword.passwordCharacter = bulletCharacter;
+ // initialise settings
+ bootType = imageWriter.getValue("bootType")
+ fileName = imageWriter.srcFileName();
+ sbc = imageWriter.getValue("sbc")
+ camera= imageWriter.getValue("camera")
+ bindPhrase = imageWriter.getValue("bindPhrase")
+ mode = imageWriter.getValue("mode")
+ hotSpot = imageWriter.getValue("hotSpot")
+ beep = imageWriter.getBoolSetting("beep")
+ eject = imageWriter.getBoolSetting("eject")
+
+ // set session settings
+ if (bootType==="Air") {
+ setAir.checked=true
+ setGround.checked=false
+ }
+ else if (bootType==="Ground") {
+ setAir.checked=false
+ setGround.checked=true
+ }
+ if (bindPhrase) {
+ bndKey.checked=true
+ }
+ else{
+ bndKey.checked=false
+ }
+ if (mode) {
+ setDebug.checked=true
+ }
+ else{
+ setDebug.checked=false
+ }
+ if (hotSpot) {
+ setWifiHotspot.checked=true
+ }
+ else{
+ setWifiHotspot.checked=false
}
- initialized = true
- }
-
- //Consti10
- function check_air_or_ground_set_by_user(){
- console.log("check_air_or_ground_set_by_user,current: ground:"+openHDGround+" air:"+openHDAir);
- //return openHDGround.length>=1;
- return openHDAir.length>=1;
- }
- function check_air(){
- if (openHDAir == "air") {
- console.log("Image type:"+openHDAir);
- return openHDAir.length>=1;
- }
- }
- function check_ground(){
- if (openHDAir == "ground") {
- console.log("Image type:"+openHDAir);
- return openHDAir.length>=1;
- }
+ //get SBC
+ imageWriter.setSetting("fileName", fileName)
+ console.log(fileName)
+ if (fileName.includes("pi")) {
+ imageWriter.setSetting("sbc", "rpi");
+ rpi=true;
+ rock5=false;
+ rock3=false;
+ }
+ else if (fileName.includes("rock5a")) {
+ imageWriter.setSetting("sbc", "rock-5a");
+ rpi=false;
+ rock5=true;
+ rock3=false;
+ }
+ else if (fileName.includes("rock5b")) {
+ imageWriter.setSetting("sbc", "rock-5b");
+ rpi=false;
+ rock5=true;
+ rock3=false;
+ }
+ else if (fileName.includes("zero3w")) {
+ imageWriter.setSetting("sbc", "zero3w");
+ rpi=false;
+ rock5=false;
+ rock3=true;
+ }
+ else{
+ imageWriter.setSetting("sbc", "unknown");
+ rpi=false;
+ rock5=false;
+ rock3=false;
+ }
}
function openPopup() {
@@ -317,66 +499,17 @@ Popup {
popupbody.forceActiveFocus()
}
- function addCmdline(s) {
- cmdline += " "+s
- }
- function addConfig(s) {
- config += s+""
- }
- function bootAsGround(s) {
- openHDGround += s+""
- }
- function bootAsAir(s) {
- openHDAir += s+""
- }
- function bootAsIp(s) {
- openHDIp += s+""
- }
- //
- function escapeshellarg(arg) {
- return "'"+arg.replace(/'/g, "\\'")+"'"
- }
-
function applySettings()
{
- openHDGround = ""
- openHDAir = ""
- openHDIp = ""
+ imageWriter.setSetting("bootType", bootType)
+ imageWriter.setSetting("camera", camera)
+ imageWriter.setSetting("bindPhrase" , bindPhrase)
+ imageWriter.setSetting("mode", mode)
+ imageWriter.setSetting("hotSpot" , hotSpot)
+ imageWriter.setSetting("beep", beep)
+ imageWriter.setSetting("eject", eject)
+ imageWriter.setSetting("useSettings", useSettings)
-
- if (setAir.checked) {
- bootAsAir("air")
- }
- if (setIp.checked) {
- bootAsAir("IP")
- }
- if (setGround.checked) {
- bootAsAir("ground")
- }
-
- if (openHDGround.length) {
- openHDGround = ""+openHDGround
- }
-
- if (openHDAir.length) {
- openHDAir = ""+openHDAir
- }
-
- if (cloudinitwrite !== "") {
- addCloudInit("write_files:\n"+cloudinitwrite+"\n")
- }
-
- if (cloudinitrun !== "") {
- addCloudInit("runcmd:\n"+cloudinitrun+"\n")
- }
-
- imageWriter.setImageCustomization(config, cmdline, openHDAir, openHDGround, cloudinit, cloudinitnetwork)
- }
-
- function saveSettings()
- {
- imageWriter.setSetting("beep", chkBeep.checked)
- imageWriter.setSetting("eject", chkEject.checked)
}
}
diff --git a/src/cli.cpp b/src/cli.cpp
index 7a26f834a..2ff8c1ad4 100644
--- a/src/cli.cpp
+++ b/src/cli.cpp
@@ -29,9 +29,9 @@ Cli::Cli(int &argc, char *argv[]) : QObject(nullptr)
}
#endif
_app = new QCoreApplication(argc, argv);
- _app->setOrganizationName("Raspberry Pi");
- _app->setOrganizationDomain("raspberrypi.org");
- _app->setApplicationName("Imager");
+ _app->setOrganizationName("OpenHD");
+ _app->setOrganizationDomain("openhdfpv.org");
+ _app->setApplicationName("ImageWriter");
_imageWriter = new ImageWriter;
connect(_imageWriter, &ImageWriter::success, this, &Cli::onSuccess);
connect(_imageWriter, &ImageWriter::error, this, &Cli::onError);
diff --git a/src/config.h b/src/config.h
index 5d44da651..25b15beb5 100644
--- a/src/config.h
+++ b/src/config.h
@@ -8,7 +8,7 @@
/* Repository URL */
-#define OSLIST_URL "https://github.com/OpenHD/OpenHD-ImageWriter/releases/download/Json/OpenHD-Images.json"
+#define OSLIST_URL "https://github.com/OpenHD/OpenHD-ImageWriter/releases/download/Json/OpenHD-dev-download-index.json"
/* Time synchronization URL (only used on eglfs QPA platform, URL must be HTTP) */
#define TIME_URL "https://github.com/OpenHD/OpenHD-ImageWriter/releases/download/Json/OpenHD-Images.json?time_synchronization"
diff --git a/src/downloadthread.cpp b/src/downloadthread.cpp
index 7ee17feb3..62d246f7c 100644
--- a/src/downloadthread.cpp
+++ b/src/downloadthread.cpp
@@ -30,9 +30,14 @@
using namespace std;
+bool useSettings;
+bool justUpdate;
+
QByteArray DownloadThread::_proxy;
int DownloadThread::_curlCount = 0;
+QSettings settings;
+
DownloadThread::DownloadThread(const QByteArray &url, const QByteArray &localfilename, const QByteArray &expectedHash, QObject *parent) :
QThread(parent), _startOffset(0), _lastDlTotal(0), _lastDlNow(0), _verifyTotal(0), _lastVerifyNow(0), _bytesWritten(0), _lastFailureOffset(0), _sectorsStart(-1), _url(url), _filename(localfilename), _expectedHash(expectedHash),
_firstBlock(nullptr), _cancelled(false), _successful(false), _verifyEnabled(false), _cacheEnabled(false), _lastModified(0), _serverTime(0), _lastFailureTime(0),
@@ -41,9 +46,7 @@ DownloadThread::DownloadThread(const QByteArray &url, const QByteArray &localfil
if (!_curlCount)
curl_global_init(CURL_GLOBAL_DEFAULT);
_curlCount++;
-
- QSettings settings;
- _ejectEnabled = settings.value("eject", true).toBool();
+ _ejectEnabled = false;
}
DownloadThread::~DownloadThread()
@@ -111,8 +114,22 @@ QByteArray DownloadThread::_fileGetContentsTrimmed(const QString &filename)
bool DownloadThread::_openAndPrepareDevice()
{
+ QSettings settings_;
+ std::cout << "_____________________________-DEBUG-_______________________________________" << std::endl;
+
+ if (settings_.value("justUpdate").toBool())
+ {
+ std::cout << "running update procedure without modifying the image" << std::endl;
+ return true;
+ }
+
emit preparationStatusUpdate(tr("opening drive"));
+ if (_filename.startsWith("/dev/update-"))
+ {
+ std::cout << "running update procedure without modifying the image" << std::endl;
+ }
+
if (_filename.startsWith("/dev/"))
{
unmount_disk(_filename.constData());
@@ -128,6 +145,7 @@ bool DownloadThread::_openAndPrepareDevice()
if (std::regex_match(_filename.constData(), m, windriveregex))
{
+
_nr = QByteArray::fromStdString(m[1]);
if (!_nr.isEmpty()) {
@@ -137,8 +155,8 @@ bool DownloadThread::_openAndPrepareDevice()
proc.start("diskpart");
proc.waitForStarted();
proc.write("select disk "+_nr+"\r\n"
- "clean\r\n"
- "rescan\r\n");
+ "clean\r\n"
+ "rescan\r\n");
proc.closeWriteChannel();
proc.waitForFinished();
@@ -293,9 +311,9 @@ bool DownloadThread::_openAndPrepareDevice()
if (knownsize > emptyMB.size())
{
if (!_file.seek(knownsize-emptyMB.size())
- || !_file.write(emptyMB.data(), emptyMB.size())
- || !_file.flush()
- || !::fsync(_file.handle()))
+ || !_file.write(emptyMB.data(), emptyMB.size())
+ || !_file.flush()
+ || !::fsync(_file.handle()))
{
emit error(tr("Write error while trying to zero out last part of card.
"
"Card could be advertising wrong capacity (possible counterfeit)."));
@@ -418,49 +436,49 @@ void DownloadThread::run()
switch (ret)
{
- case CURLE_OK:
- _successful = true;
- qDebug() << "Download done in" << _timer.elapsed() / 1000 << "seconds";
- _onDownloadSuccess();
- break;
- case CURLE_WRITE_ERROR:
- deleteDownloadedFile();
+ case CURLE_OK:
+ _successful = true;
+ qDebug() << "Download done in" << _timer.elapsed() / 1000 << "seconds";
+ _onDownloadSuccess();
+ break;
+ case CURLE_WRITE_ERROR:
+ deleteDownloadedFile();
#ifdef Q_OS_WIN
- if (_file.errorCode() == ERROR_ACCESS_DENIED)
+ if (_file.errorCode() == ERROR_ACCESS_DENIED)
+ {
+ QString msg = tr("Access denied error while writing file to disk.");
+ QSettings registry("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Defender\\Windows Defender Exploit Guard\\Controlled Folder Access",
+ QSettings::Registry64Format);
+ if (registry.value("EnableControlledFolderAccess").toInt() == 1)
{
- QString msg = tr("Access denied error while writing file to disk.");
- QSettings registry("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Defender\\Windows Defender Exploit Guard\\Controlled Folder Access",
- QSettings::Registry64Format);
- if (registry.value("EnableControlledFolderAccess").toInt() == 1)
- {
- msg += "
"+tr("Controlled Folder Access seems to be enabled. Please add both openhdimagewriter.exe and fat32format.exe to the list of allowed apps and try again.");
- }
- _onDownloadError(msg);
+ msg += "
"+tr("Controlled Folder Access seems to be enabled. Please add both openhdimagewriter.exe and fat32format.exe to the list of allowed apps and try again.");
}
- else
+ _onDownloadError(msg);
+ }
+ else
#endif
if (!_cancelled)
_onDownloadError(tr("Error writing file to disk"));
- break;
- case CURLE_ABORTED_BY_CALLBACK:
- deleteDownloadedFile();
- break;
- default:
- deleteDownloadedFile();
- QString errorMsg;
-
- if (!errorBuf[0])
- /* No detailed error message text provided, use standard text for libcurl result code */
- errorMsg += curl_easy_strerror(ret);
- else
- errorMsg += errorBuf;
+ break;
+ case CURLE_ABORTED_BY_CALLBACK:
+ deleteDownloadedFile();
+ break;
+ default:
+ deleteDownloadedFile();
+ QString errorMsg;
+
+ if (!errorBuf[0])
+ /* No detailed error message text provided, use standard text for libcurl result code */
+ errorMsg += curl_easy_strerror(ret);
+ else
+ errorMsg += errorBuf;
- char *ipstr;
- if (curl_easy_getinfo(_c, CURLINFO_PRIMARY_IP, &ipstr) == CURLE_OK && ipstr && ipstr[0])
- errorMsg += QString(" - Server IP: ")+ipstr;
+ char *ipstr;
+ if (curl_easy_getinfo(_c, CURLINFO_PRIMARY_IP, &ipstr) == CURLE_OK && ipstr && ipstr[0])
+ errorMsg += QString(" - Server IP: ")+ipstr;
- _onDownloadError(tr("Error downloading: %1").arg(errorMsg));
+ _onDownloadError(tr("Error downloading: %1").arg(errorMsg));
}
}
@@ -730,11 +748,18 @@ void DownloadThread::_writeComplete()
QThread::sleep(1);
_filename.replace("/dev/rdisk", "/dev/disk");
#endif
+ QSettings settings_;
- if (_ejectEnabled && _config.isEmpty() && _cmdline.isEmpty() && !_openHDGround.isEmpty() && _openHDAir.isEmpty())
+ useSettings = settings_.value("useSettings").toBool();
+ justUpdate = settings_.value("justUpdate").toBool();
+ // qDebug() << "This is the Debug Filename" << _filename;
+ // qDebug() << "This is the Debug Settings" << useSettings;
+ // qDebug() << "This is the Debug Update" << justUpdate;
+
+ if (!useSettings)
eject_disk(_filename.constData());
- if (!_config.isEmpty() || !_cmdline.isEmpty()|| !_openHDGround.isEmpty() || !_openHDAir.isEmpty())
+ if (useSettings)
{
if (!_customizeImage())
return;
@@ -836,17 +861,6 @@ qint64 DownloadThread::_sectorsWritten()
return -1;
}
-void DownloadThread::setImageCustomization(const QByteArray &config, const QByteArray &cmdline, const QByteArray &openHDGround, const QByteArray &openHDAir, const QByteArray &cloudinit, const QByteArray &cloudInitNetwork, const QByteArray &initFormat)
-{
- _config = config;
- _cmdline = cmdline;
- _openHDAir = openHDAir;
- _openHDGround = openHDGround;
- _cloudinit = cloudinit;
- _cloudinitNetwork = cloudInitNetwork;
- _initFormat = initFormat;
-}
-
bool DownloadThread::_customizeImage()
{
QString folder;
@@ -888,8 +902,8 @@ bool DownloadThread::_customizeImage()
proc.start("diskpart");
proc.waitForStarted();
proc.write("select disk "+_nr+"\r\n"
- "select partition 1\r\n"
- "assign\r\n");
+ "select partition 1\r\n"
+ "assign\r\n");
proc.closeWriteChannel();
proc.waitForFinished();
qDebug() << proc.readAll();
@@ -922,12 +936,12 @@ bool DownloadThread::_customizeImage()
if (::access(devlower.constData(), W_OK) != 0)
{
/* Not running as root, try to outsource mounting to udisks2 */
- #ifndef QT_NO_DBUS
+#ifndef QT_NO_DBUS
UDisks2Api udisks2;
QString mp = udisks2.mountDevice(fatpartition);
if (!mp.isEmpty())
mountpoints.push_back(mp.toStdString());
- #endif
+#endif
}
else
{
@@ -1074,152 +1088,261 @@ bool DownloadThread::_customizeImage()
}
}
- if (!_cloudinit.isEmpty() && _initFormat == "systemd")
- {
- QFile key(folder+"/openhd"+"/password.txt");
- if (key.open(key.WriteOnly) && key.write(_cloudinit) == _cloudinit.length())
- {
- qDebug() << "Key:" << key;
- QSettings settings;
- settings.setValue("bindPhrase", _cloudinit);
- settings.sync();
- qDebug() << "SavedSettings" << settings.value("bindPhrase").toString();
- }
- else
- {
- emit error(tr("Error creating key.txt on FAT partition"));
- return false;
- }
- }
-
- if (!_openHDAir.isEmpty() && _initFormat == "systemd")
- {
-
- /* Something is horibly wrong here .. I'll hack it right now, but this should be fixed in later releases
+ /* Here is the start of the OpenHD settings routine
*/
- qDebug() << "isAir";
- QFile d(folder+"/openhd"+"/ground.txt");
- d.remove();
- QFile f(folder+"/openhd"+"/air.txt");
- if (f.open(f.WriteOnly) && f.write(_openHDAir) == _openHDAir.length())
- {
- qDebug() << "folder:" << f;
- }
- else
- {
- emit error(tr("Error creating air.txt on FAT partition"));
- return false;
- }
-
+ if (justUpdate) {
+ qDebug() << "Writing OpenHD-Update";
+ qDebug() << justUpdate;
}
- if (!_openHDGround.isEmpty() && _initFormat == "systemd")
- {
- QSettings settings;
- QString cameraValue = settings.value("camera").toString();
- QString sbcValue = settings.value("SBC").toString();
+ if (useSettings) {
+ qDebug() << "Writing OpenHD-Settings";
+ QSettings settings_;
- qDebug() << "_openHDGround" << _openHDGround ;
- if (_openHDGround == "IP")
- {
- QFile Ip(folder+"/openhd"+"/force_ip_camera.txt");
- if (Ip.open(Ip.WriteOnly) && Ip.write(_openHDGround) == _openHDGround.length())
+
+ QString cameraName = settings_.value("camera").toString();
+ QString sbcValue = settings_.value("sbc").toString();
+ QString modeValue = settings_.value("mode").toString();
+ QString bindPhraseSaved = settings_.value("bindPhrase").toString();
+ QString hotspot = settings_.value("hotspot").toString();
+ QString bootType = settings_.value("bootType").toString();
+
+ if (!bindPhraseSaved.isEmpty()){
+ qDebug() << "BindPhrase found" << bindPhraseSaved;
+ QFile Bp(folder+"/openhd"+"/password.txt");
+ if (Bp.open(QIODevice::WriteOnly))
{
- Ip.close();
+ // Convert bindPhrase to UTF-8 bytes and write to the file
+ QByteArray bindPhraseBytes = bindPhraseSaved.toUtf8();
+ qint64 bytesWritten = Bp.write(bindPhraseBytes);
+ Bp.close();
+
+ if (bytesWritten == bindPhraseBytes.length())
+ {
+ // Successfully wrote the password to the file
+ }
+ else
+ {
+ emit error(tr("Error writing password to password.txt on FAT partition"));
+ return false;
+ }
}
else
{
- emit error(tr("Error creating force_ip_camera.txt on FAT partition"));
+ emit error(tr("Error creating password.txt on FAT partition"));
return false;
}
- if (!sbcValue.isEmpty()) {
- QFile sbc(folder+"/openhd"+"/"+sbcValue+".txt");
- if (sbc.open(sbc.WriteOnly) && sbc.write(_openHDGround) == _openHDGround.length())
+ }
+ if (!cameraName.isEmpty()){
+ QString cameraValue;
+ qDebug() << "Camera found" << cameraName;
+ QFile cam(folder+"/openhd/camera1.txt");
+ //Encode camera name to Cam-int
+ if (cam.open(QIODevice::WriteOnly))
{
- sbc.close();
+ if (sbcValue == "rpi"){
+ //RaspberryPi
+ if (cameraName == "OV5647"){
+ cameraValue="30";
+ }
+ else if (cameraName == "IMX219"){
+ cameraValue="31";
+ }
+ else if (cameraName == "IMX708"){
+ cameraValue="32";
+ }
+ else if (cameraName == "IMX477"){
+ cameraValue="33";
+ }
+ else if (cameraName == "HDMI"){
+ cameraValue="20";
+ }
+ //Arducam
+ else if (cameraName == "SkyMasterHDR708"){
+ cameraValue="40";
+ }
+ else if (cameraName == "SkyVisionPro519"){
+ cameraValue="41";
+ }
+ else if (cameraName == "IMX477m"){
+ cameraValue="42";
+ }
+ else if (cameraName == "IMX462"){
+ cameraValue="43";
+ }
+ else if (cameraName == "IMX327"){
+ cameraValue="44";
+ }
+ else if (cameraName == "IMX290"){
+ cameraValue="45";
+ }
+ else if (cameraName == "IMX462MINI"){
+ cameraValue="46";
+ }
+ //Veye
+ else if (cameraName == "2MPCAMERAS"){
+ cameraValue="60";
+ }
+ else if (cameraName == "CSIMX307"){
+ cameraValue="61";
+ }
+ else if (cameraName == "CSSC137"){
+ cameraValue="62";
+ }
+ else if (cameraName == "MVCAM"){
+ cameraValue="63";
+ }
+ }
+ else if (sbcValue == "zero3w"){
+ if (cameraName == "HDMI"){
+ cameraValue="90";
+ }
+ if (cameraName == "IMX219"){
+ cameraValue="92";
+ }
+ else if (cameraName == "OV5647"){
+ cameraValue="91";
+ }
+ else if (cameraName == "IMX708"){
+ cameraValue="93";
+ }
+ else if (cameraName == "OHD-JAGUAR"){
+ cameraValue="94";
+ }
+ }
+ else if ((sbcValue == "rock-5b") || (sbcValue == "rock-5a")) {
+ if (cameraName == "HDMI"){
+ cameraValue="80";
+ }
+ if (cameraName == "IMX219"){
+ cameraValue="82";
+ }
+ else if (cameraName == "OV5647"){
+ cameraValue="81";
+ }
+ else if (cameraName == "IMX708"){
+ cameraValue="83";
+ }
+ else if (cameraName == "IMX462"){
+ cameraValue="84";
+ }
+ else if (cameraName == "IMX415"){
+ cameraValue="85";
+ }
+ else if (cameraName == "OHD-JAGUAR"){
+ cameraValue="86";
+ }
+ }
+
+ if (cameraName == "FILESRC"){
+ cameraValue="4";
+ }
+ else if (cameraName == "IP-CAMERA"){
+ cameraValue="3";
+ }
+ else if (cameraName == "EXTERNAL"){
+ cameraValue="2";
+ }
+ else if (cameraName == "USB"){
+ cameraValue="1";
+ }
+ else if (cameraName == "TESTPATTERN"){
+ cameraValue="0";
+ }
+
+ QByteArray camBytes = cameraValue.toUtf8();
+ qint64 bytesWritten = cam.write(camBytes);
+ cam.close();
+
+
+ if (bytesWritten == camBytes.length())
+ {
+ // Successfully wrote the camera to the file
+ }
+ else
+ {
+ emit error(tr("Error writing camera to camera1.txt on FAT partition"));
+ return false;
+ }
}
else
{
- emit error(tr("Error creating sbc file on FAT partition"));
+ emit error(tr("Error creating camera1.txt on FAT partition"));
return false;
}
- }
}
- if (_openHDGround == "air")
- {
- QFile Air(folder+"/openhd"+"/air.txt");
- if (Air.open(Air.WriteOnly) && Air.write(_openHDGround) == _openHDGround.length())
- {
- Air.close();
- }
- else
- {
- emit error(tr("Error creating air.txt on FAT partition"));
+ if (!sbcValue.isEmpty()){
+ QFile sbc(folder + "/openhd" + "/" + sbcValue + ".txt");
+ if (sbc.open(QIODevice::WriteOnly)) {
+ QTextStream stream(&sbc);
+ sbc.close();
+ } else {
+ emit error(tr("This Image does not support settings, yet !"));
return false;
}
- if (!cameraValue.isEmpty()) {
- QFile Camera(folder+"/openhd"+"/"+cameraValue+".txt");
- if (Camera.open(Camera.WriteOnly) && Camera.write(_openHDGround) == _openHDGround.length())
- {
- Camera.close();
- }
- else
- {
- emit error(tr("Error creating Camera file on FAT partition"));
+ }
+ // if (!hotspot.isEmpty()){
+ // QFile Hs(folder+"/openhd"+"/wifi_hotspot.txt");
+ // if (Hs.open(QIODevice::WriteOnly)) {
+ // QTextStream stream(&Hs);
+ // Hs.close();
+ // } else {
+ // emit error(tr("Error creating hotspot.txt file on FAT partition"));
+ // return false;
+ // }
+ // }
+ if (modeValue == "debug"){
+ QFile Db(folder+"/openhd"+"/debug.txt");
+ if (Db.open(QIODevice::WriteOnly)) {
+ QTextStream stream(&Db);
+ Db.close();
+ } else {
+ emit error(tr("Error creating debug.txt file on FAT partition"));
return false;
}
- }
- if (!sbcValue.isEmpty()) {
+ }
+ if (!sbcValue.isEmpty()) {
QFile sbc(folder+"/openhd"+"/"+sbcValue+".txt");
- if (sbc.open(sbc.WriteOnly) && sbc.write(_openHDGround) == _openHDGround.length())
- {
+ if (sbc.open(QIODevice::WriteOnly)) {
+ QTextStream stream(&sbc);
sbc.close();
- }
- else
- {
- emit error(tr("Error creating sbc file on FAT partition"));
+ } else {
+ emit error(tr("This Image does not support settings, yet !"));
return false;
}
- }
}
- if (_openHDGround == "ground")
- {
- QFile Ground(folder+"/openhd"+"/ground.txt");
- if (Ground.open(Ground.WriteOnly) && Ground.write(_openHDGround) == _openHDGround.length())
- {
- Ground.close();
- }
- else
- {
- emit error(tr("Error creating ground.txt on FAT partition"));
+ if (bootType == "Air"){
+ QFile air(folder+"/openhd"+"/air.txt");
+ if (air.open(QIODevice::WriteOnly)) {
+ QTextStream stream(&air);
+ air.close();
+ } else {
+ emit error(tr("Error creating air.txt file on FAT partition"));
return false;
}
}
- }
-
- if (!_cmdline.isEmpty())
- {
- QByteArray cmdline;
-
- QFile f(folder+"/cmdline.txt");
- if (f.exists() && f.open(f.ReadOnly))
- {
- cmdline = f.readAll().trimmed();
- f.close();
- }
-
- cmdline += _cmdline;
- if (f.open(f.WriteOnly) && f.write(cmdline) == cmdline.length())
- {
- f.close();
- }
- else
- {
- emit error(tr("Error writing to cmdline.txt on FAT partition"));
- return false;
+ else if(bootType == "Ground"){
+ QFile ground(folder+"/openhd"+"/ground.txt");
+ if (ground.open(QIODevice::WriteOnly)) {
+ QTextStream stream(&ground);
+ ground.close();
+ } else {
+ emit error(tr("Error creating air.txt file on FAT partition"));
+ return false;
+ }
}
+ // if (!cameraName.isEmpty()) {
+ // QFile cam(folder+"/openhd"+"/+camera1+.txt");
+ // if (cam.open(QIODevice::WriteOnly)) {
+ // QTextStream stream(&cam);
+ // cam.close();
+ // } else {
+ // emit error(tr("Error creating Camera file on FAT partition"));
+ // return false;
+ // }
+ // }
}
emit finalizing();
@@ -1229,10 +1352,10 @@ bool DownloadThread::_customizeImage()
{
if (::access(devlower.constData(), W_OK) != 0)
{
- #ifndef QT_NO_DBUS
+#ifndef QT_NO_DBUS
UDisks2Api udisks2;
udisks2.unmountDrive(devlower);
- #endif
+#endif
}
else
{
diff --git a/src/downloadthread.h b/src/downloadthread.h
index a7eb0a77b..c6ae624b5 100644
--- a/src/downloadthread.h
+++ b/src/downloadthread.h
@@ -109,12 +109,7 @@ class DownloadThread : public QThread
*/
void setInputBufferSize(int len);
- /*
- * Enable image customization
- */
- void setImageCustomization(const QByteArray &config, const QByteArray &cmdline, const QByteArray &openHDAir, const QByteArray &openHDGround, const QByteArray &cloudinit, const QByteArray &cloudinitNetwork, const QByteArray &initFormat);
-
- /*
+ /*
* Thread safe download progress query functions
*/
uint64_t dlNow();
@@ -165,7 +160,7 @@ class DownloadThread : public QThread
std::atomic _lastDlTotal, _lastDlNow, _verifyTotal, _lastVerifyNow, _bytesWritten;
std::uint64_t _lastFailureOffset;
qint64 _sectorsStart;
- QByteArray _url, _useragent, _buf, _filename, _lastError, _expectedHash, _config, _cmdline, _openHDAir, _openHDGround, _cloudinit, _cloudinitNetwork, _initFormat;
+ QByteArray _url, _useragent, _buf, _filename, _lastError, _expectedHash, _config, _cmdline, _initFormat;
char *_firstBlock;
size_t _firstBlockSize;
static QByteArray _proxy;
diff --git a/src/imagewriter.cpp b/src/imagewriter.cpp
index 55e57df2d..e784a5cb3 100644
--- a/src/imagewriter.cpp
+++ b/src/imagewriter.cpp
@@ -61,6 +61,7 @@
#endif
#include
+#include
ImageWriter::ImageWriter(QObject *parent)
@@ -232,6 +233,8 @@ bool ImageWriter::readyToWrite()
/* Start writing */
void ImageWriter::startWrite()
{
+ qDebug() << "Write function executed.";
+
if (!readyToWrite())
return;
@@ -244,9 +247,25 @@ void ImageWriter::startWrite()
return;
}
- QByteArray urlstr = _src.toString(_src.FullyEncoded).toLatin1();
- QString lowercaseurl = urlstr.toLower();
- bool compressed = lowercaseurl.endsWith(".zip") || lowercaseurl.endsWith(".xz") || lowercaseurl.endsWith(".bz2") || lowercaseurl.endsWith(".gz") || lowercaseurl.endsWith(".7z") || lowercaseurl.endsWith(".zst") || lowercaseurl.endsWith(".cache");
+ QByteArray urlstr = _src.toString(_src.FullyEncoded).toLatin1();
+ QString lowercaseurl = urlstr.toLower();
+ bool containsUpdate = lowercaseurl.contains("update");
+ bool compressed = lowercaseurl.endsWith(".zip") || lowercaseurl.endsWith(".xz") || lowercaseurl.endsWith(".bz2") || lowercaseurl.endsWith(".gz") || lowercaseurl.endsWith(".7z") || lowercaseurl.endsWith(".zst") || lowercaseurl.endsWith(".cache");
+
+ _settings.setValue("justUpdate", containsUpdate);
+ _settings.sync();
+
+if (lowercaseurl.endsWith(".zip"))
+{
+ if (containsUpdate == true)
+ {
+ qDebug() << "This is an OpenHD UpdateFile";
+ }
+ else
+ {
+ emit error(tr("Please extract your Image before flashing"));
+ }
+}
if (!_extrLen && _src.isLocalFile())
{
if (!compressed)
@@ -299,7 +318,6 @@ void ImageWriter::startWrite()
connect(_thread, SIGNAL(preparationStatusUpdate(QString)), SLOT(onPreparationStatusUpdate(QString)));
_thread->setVerifyEnabled(_verifyEnabled);
_thread->setUserAgent(QString("Mozilla/5.0 rpi-imager/%1").arg(constantVersion()).toUtf8());
- _thread->setImageCustomization(_config, _cmdline, _openHDAir, _openHDGround, _cloudinit, _cloudinitNetwork, _initFormat);
if (!_expectedHash.isEmpty() && _cachedFileHash != _expectedHash && _cachingEnabled)
{
@@ -396,6 +414,7 @@ QString ImageWriter::fileNameFromUrl(const QUrl &url)
{
//return QFileInfo(url.toLocalFile()).fileName();
return url.fileName();
+
}
QString ImageWriter::srcFileName()
@@ -612,7 +631,6 @@ void ImageWriter::onFileSelected(QString filename)
settings.setValue("lastpath", path);
settings.sync();
}
-
emit fileSelected(QUrl::fromLocalFile(filename));
}
else
@@ -1029,19 +1047,6 @@ void ImageWriter::setSetting(const QString &key, const QVariant &value)
}
-void ImageWriter::setImageCustomization(const QByteArray &config, const QByteArray &cmdline, const QByteArray &openHDAir, const QByteArray &openHDGround, const QByteArray &cloudinit, const QByteArray &cloudinitNetwork)
-{
- _config = config;
- _cmdline = cmdline;
- _openHDAir = openHDAir;
- _openHDGround = openHDGround;
- _cloudinit = cloudinit;
- _cloudinitNetwork = cloudinitNetwork;
-
- qDebug() << "boot as:" << openHDAir;
- qDebug() << "binding phrase:" << cloudinit;
-}
-
QString ImageWriter::crypt(const QByteArray &password)
{
QByteArray salt = "$5$";
@@ -1062,17 +1067,6 @@ QString ImageWriter::pbkdf2(const QByteArray &psk, const QByteArray &ssid)
return QPasswordDigestor::deriveKeyPbkdf2(QCryptographicHash::Sha1, psk, ssid, 4096, 32).toHex();
}
-void ImageWriter::setSavedCustomizationSettings(const QVariantMap &map)
-{
- _settings.beginGroup("imagecustomization");
- _settings.remove("");
- const QStringList keys = map.keys();
- for (const QString &key : keys) {
- _settings.setValue(key, map.value(key));
- }
- _settings.endGroup();
-}
-
QVariantMap ImageWriter::getSavedCustomizationSettings()
{
QVariantMap result;
diff --git a/src/imagewriter.h b/src/imagewriter.h
index b2da74b78..ef5a0697f 100644
--- a/src/imagewriter.h
+++ b/src/imagewriter.h
@@ -105,8 +105,6 @@ class ImageWriter : public QObject
Q_INVOKABLE bool getBoolSetting(const QString &key);
Q_INVOKABLE QString getValue(const QString &key);
Q_INVOKABLE void setSetting(const QString &key, const QVariant &value);
- Q_INVOKABLE void setImageCustomization(const QByteArray &config, const QByteArray &cmdline, const QByteArray &openHDAir, const QByteArray &openHDGround, const QByteArray &cloudinit, const QByteArray &cloudinitNetwork);
- Q_INVOKABLE void setSavedCustomizationSettings(const QVariantMap &map);
Q_INVOKABLE QVariantMap getSavedCustomizationSettings();
Q_INVOKABLE void clearSavedCustomizationSettings();
Q_INVOKABLE bool hasSavedCustomizationSettings();
@@ -158,7 +156,7 @@ protected slots:
protected:
QUrl _src, _repo;
QString _dst, _cacheFileName, _parentCategory, _osName, _currentLang, _currentLangcode, _currentKeyboard;
- QByteArray _expectedHash, _cachedFileHash, _cmdline, _config, _openHDAir, _openHDGround, _cloudinit, _cloudinitNetwork, _initFormat;
+ QByteArray _expectedHash, _cachedFileHash, _cmdline, _config, _initFormat;
quint64 _downloadLen, _extrLen, _devLen, _dlnow, _verifynow;
DriveListModel _drivelist;
QQmlApplicationEngine *_engine;
diff --git a/src/linux/openhdimagewriter.metainfo.xml.in b/src/linux/openhdimagewriter.metainfo.xml.in
index 7fea97b14..06214660a 100644
--- a/src/linux/openhdimagewriter.metainfo.xml.in
+++ b/src/linux/openhdimagewriter.metainfo.xml.in
@@ -3,11 +3,11 @@
org.raspberrypi.openhdimagewriter
CC0-1.0
Apache-2.0
- OpenHD Pi Imager
+ OpenHD Pi ImageWriter
OpenHD imaging utility
- OpenHD Imager downloads a .JSON file from the OpenHD
+ OpenHD ImageWriter downloads a .JSON file from the OpenHD
website with a list of all current download options, ensuring you are
always installing the most up-to-date version.
@@ -21,7 +21,7 @@
to the SD card.
- During this process, OpenHD Imager also caches the downloaded
+ During this process, OpenHD ImageWriter also caches the downloaded
operating system image – that is to say, it saves a local copy on your
computer, so you can program additional SD cards without having to
download the file again and includes OpenHD settings into the image.
diff --git a/src/mac/Info.plist.in b/src/mac/Info.plist.in
index fb2ec96cc..665ecf39d 100644
--- a/src/mac/Info.plist.in
+++ b/src/mac/Info.plist.in
@@ -17,7 +17,7 @@
CFBundleLongVersionString
CFBundleName
- Raspberry Pi Imager
+ OpenHD ImageWriter
CFBundlePackageType
APPL
CFBundleShortVersionString
diff --git a/src/main.qml b/src/main.qml
index d68ec2886..cfb84d56d 100644
--- a/src/main.qml
+++ b/src/main.qml
@@ -8,6 +8,7 @@ import QtQuick.Window 2.2
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.0
import QtQuick.Controls.Material 2.2
+import Qt.labs.settings 1.0
import "qmlcomponents"
@@ -24,7 +25,7 @@ ApplicationWindow {
minimumHeight: imageWriter.isEmbeddedMode() ? -1 : 420
//maximumHeight: imageWriter.isEmbeddedMode() ? -1 : 420
- title: qsTr("OpenHD Imager v%1").arg(imageWriter.constantVersion())
+ title: qsTr("OpenHD ImageWriter v%1").arg(imageWriter.constantVersion())
FontLoader {id: roboto; source: "fonts/Roboto-Regular.ttf"}
FontLoader {id: robotoLight; source: "fonts/Roboto-Light.ttf"}
@@ -55,6 +56,172 @@ ApplicationWindow {
}
}
+ Popup {
+ id: detailsPopup
+ x: 75
+ y: (parent.height - height) / 2
+ width: parent.width - 150
+ height: parent.implicitHeight + 275
+ padding: 0
+ modal: true
+ property bool objectVisible: false
+ visible: objectVisible
+
+ Rectangle {
+ color: "#f5f5f5"
+ anchors.right: parent.right
+ anchors.top: parent.top
+ height: 35
+ width: parent.width
+ }
+ Rectangle {
+ color: "#afafaf"
+ width: parent.width
+ y: 35
+ implicitHeight: 1
+ }
+ Settings {
+ id: appSettings
+ }
+ Text {
+ id: msgx
+ text: "X"
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.rightMargin: 25
+ anchors.topMargin: 10
+ font.family: roboto.name
+ font.bold: true
+
+ MouseArea {
+ anchors.fill: parent
+ cursorShape: Qt.PointingHandCursor
+ onClicked: {
+ detailsPopup.close()
+ }
+ }
+ }
+
+ ColumnLayout {
+ spacing: 20
+ anchors.fill: parent
+
+ Text {
+ id: detailsPopupHeader
+ text: "List of applied settings and variables"
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ Layout.fillWidth: true
+ font.family: roboto.name
+ font.bold: true
+ }
+ Button{
+ id:refresh
+ visible:false
+ text: "button"
+ onClicked: {
+ console.log(imageWriter.getValue("fileName"))
+ }
+ }
+
+ ColumnLayout {
+ id: detailsArea
+ spacing: 10
+ Layout.alignment: Qt.AlignVCenter
+ Layout.topMargin: -30
+ Layout.leftMargin: 20
+
+ RowLayout {
+ Text {
+ text: "Image Name:"
+ font.bold: true
+ }
+
+ Text {
+ text: {
+ if (typeof optionspopup.fileName !== "undefined" && optionspopup.fileName.length > 45) {
+ return optionspopup.fileName.substring(0, optionspopup.fileName.length - 7);
+ }else if (typeof optionspopup.fileName !== "undefined" && optionspopup.fileName.length > 1){
+ return optionspopup.fileName.substring(0, optionspopup.fileName.length);
+ }else {
+ return "Error";
+ }
+ }
+ font.bold: false
+ color: "grey"
+ }
+ }
+
+
+ // RowLayout {
+ // Text {
+ // text: "sbc:"
+ // font.bold: true
+ // }
+
+ // Text {
+ // text: optionspopup.sbc
+ // font.bold: false
+ // color: "grey"
+
+ // }
+ // }
+
+ RowLayout {
+ Text {
+ text: "Boot Type:"
+ font.bold: true
+ }
+ Text {
+ text: optionspopup.bootType + " " + optionspopup.mode
+ font.bold: false
+ color: "grey"
+ }
+ }
+
+ RowLayout {
+ Text {
+ text: "Camera:"
+ font.bold: true
+ }
+ Text {
+ text: optionspopup.camera
+ font.bold: false
+ color: "grey"
+ }
+ }
+
+ RowLayout {
+ Text {
+ text: "Bind Phrase:"
+ font.bold: true
+ }
+ Text {
+ text: optionspopup.bindPhrase
+ font.bold: false
+ color: "grey"
+ }
+ }
+ RowLayout {
+ Text {
+ text: "Changelog:"
+ font.bold: true
+ }
+ Text {
+ text: "changelogs"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: Qt.openUrlExternally("https://openhdfpv.org/2.5-evo.html")
+ }
+ font.bold:false
+ color: "grey"
+ }
+ }
+ }
+ }
+ }
+
+
ColumnLayout {
id: bg
spacing: 0
@@ -62,13 +229,25 @@ ApplicationWindow {
Rectangle {
+ Component.onCompleted: {
+ // Reset all saved settings but the bindPhrase
+ imageWriter.setSetting("sbc", "")
+ imageWriter.setSetting("bootType", "")
+ imageWriter.setSetting("fileName", "")
+ imageWriter.setSetting("camera", "")
+ imageWriter.setSetting("mode", "")
+ imageWriter.setSetting("hotSpot" , "")
+ imageWriter.setSetting("beep", "")
+ imageWriter.setSetting("eject", "")
+ imageWriter.setSetting("justUpdate", "")
+ }
implicitHeight: window.height/2
ImButton {
padding: 5
id: donatebutton
onClicked: {
- Qt.openUrlExternally("https://opencollective.com/openhd");
+ Qt.openUrlExternally("https://opencollective.com/openhd");
}
visible: true
Accessible.description: qsTr("Donate")
@@ -137,6 +316,16 @@ ApplicationWindow {
onClicked: {
ospopup.open()
osswipeview.currentItem.forceActiveFocus()
+ customizebutton.visible=true
+ // reset all saved settings but the bindPhrase
+ imageWriter.setSetting("sbc", "")
+ imageWriter.setSetting("bootType", "")
+ imageWriter.setSetting("fileName", "")
+ imageWriter.setSetting("camera", "")
+ imageWriter.setSetting("mode", "")
+ imageWriter.setSetting("hotSpot" , "")
+ imageWriter.setSetting("beep", "")
+ imageWriter.setSetting("eject", "")
}
Accessible.ignored: ospopup.visible || dstpopup.visible
Accessible.description: qsTr("Select this button to change the operating system")
@@ -189,7 +378,11 @@ ApplicationWindow {
ImButton {
id: writebutton
+ visible: !updateButton.visible
property var image_name
+ property var use_settings
+ property var bootType
+ property string camera:""
text: qsTr("WRITE")
Layout.minimumHeight: 40
Layout.fillWidth: true
@@ -201,16 +394,52 @@ ApplicationWindow {
return
}
image_name=imageWriter.srcFileName();
- console.log("Image name:"+image_name);
- //Consti10
+ bootType=imageWriter.getValue("bootType");
+ camera=imageWriter.getValue("camera");
if(image_name.includes("configurable")){
- if(!optionspopup.check_air_or_ground_set_by_user()){
+ if(bootType!=="Air" && bootType!=="Ground" ){
console.log("Cannot write yet, air or ground not set yet");
onError("Cannot write yet, air or ground not set yet - please open settings and select air or ground")
return;
- }
- }
+ }
+ }
+ use_settings=imageWriter.getValue("useSettings")
+ if (!optionspopup.initialized && imageWriter.imageSupportsCustomization() && imageWriter.hasSavedCustomizationSettings()) {
+ usesavedsettingspopup.openPopup()
+ } else {
+ confirmwritepopup.askForConfirmation()
+ }
+ }
+ }
+ ImButton {
+ id: updateButton
+ visible:ospopup.visible
+ property var image_name
+ property var use_settings
+ property var bootType
+ property string camera:""
+ text: qsTr("UPDATE")
+ Layout.minimumHeight: 40
+ Layout.fillWidth: true
+ Accessible.ignored: ospopup.visible || dstpopup.visible
+ Accessible.description: qsTr("Select this button to start writing the image")
+ enabled: false
+ onClicked: {
+ if (!imageWriter.readyToWrite()) {
+ return
+ }
+ image_name=imageWriter.srcFileName();
+ bootType=imageWriter.getValue("bootType");
+ camera=imageWriter.getValue("camera");
+ if(image_name.includes("configurable")){
+ if(bootType!=="Air" && bootType!=="Ground" ){
+ console.log("Cannot write yet, air or ground not set yet");
+ onError("Cannot write yet, air or ground not set yet - please open settings and select air or ground")
+ return;
+ }
+ }
+ use_settings=imageWriter.getValue("useSettings")
if (!optionspopup.initialized && imageWriter.imageSupportsCustomization() && imageWriter.hasSavedCustomizationSettings()) {
usesavedsettingspopup.openPopup()
} else {
@@ -218,6 +447,7 @@ ApplicationWindow {
}
}
}
+
}
ColumnLayout {
@@ -272,7 +502,7 @@ ApplicationWindow {
onClicked: {
optionspopup.openPopup()
}
- visible: true
+ visible: false
Accessible.description: qsTr("Select this button to configure Settings")
contentItem: Image {
source: "icons/ic_cog_red.svg"
@@ -384,7 +614,7 @@ ApplicationWindow {
width: parent.width-100
height: parent.height-50
padding: 0
- closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
+ closePolicy: Popup.NoAutoClose
property string categorySelected : ""
// background of title
@@ -580,18 +810,18 @@ ApplicationWindow {
}
Rectangle {
- id: bgrect
- anchors.fill: parent
- color: "#f5f5f5"
- visible: mouseOver && parent.ListView.view.currentIndex !== index
- property bool mouseOver: false
+ id: bgrect
+ anchors.fill: parent
+ color: "#f5f5f5"
+ visible: mouseOver && parent.ListView.view.currentIndex !== index
+ property bool mouseOver: false
}
Rectangle {
- id: borderrect
- implicitHeight: 1
- implicitWidth: parent.width
- color: "#dcdcdc"
- y: parent.height
+ id: borderrect
+ implicitHeight: 1
+ implicitWidth: parent.width
+ color: "#dcdcdc"
+ y: parent.height
}
RowLayout {
@@ -663,11 +893,11 @@ ApplicationWindow {
font.weight: Font.Light
visible: typeof(url) == "string" && url != "" && url != "internal://format"
text: !url ? "" :
- typeof(extract_sha256) != "undefined" && imageWriter.isCached(url,extract_sha256)
- ? qsTr("Cached on your computer")
- : url.startsWith("file://")
- ? qsTr("Local file")
- : qsTr("Online - %1 GB download").arg((image_download_size/1073741824).toFixed(1))
+ typeof(extract_sha256) != "undefined" && imageWriter.isCached(url,extract_sha256)
+ ? qsTr("Cached on your computer")
+ : url.startsWith("file://")
+ ? qsTr("Local file")
+ : qsTr("Online - %1 GB download").arg((image_download_size/1073741824).toFixed(1))
}
ToolTip {
@@ -779,7 +1009,7 @@ ApplicationWindow {
Keys.onReturnPressed: Keys.onSpacePressed(event)
}
- }
+ }
}
}
@@ -800,20 +1030,20 @@ ApplicationWindow {
property string size: model.size
Rectangle {
- id: dstbgrect
- anchors.fill: parent
- color: "#f5f5f5"
- visible: mouseOver && parent.ListView.view.currentIndex !== index
- property bool mouseOver: false
+ id: dstbgrect
+ anchors.fill: parent
+ color: "#f5f5f5"
+ visible: mouseOver && parent.ListView.view.currentIndex !== index
+ property bool mouseOver: false
}
Rectangle {
- id: dstborderrect
- implicitHeight: 1
- implicitWidth: parent.width
- color: "#dcdcdc"
- y: parent.height
+ id: dstborderrect
+ implicitHeight: 1
+ implicitWidth: parent.width
+ color: "#dcdcdc"
+ y: parent.height
}
Row {
@@ -884,14 +1114,13 @@ ApplicationWindow {
MsgPopup {
id: msgpopup
}
-
MsgPopup {
id: quitpopup
continueButton: false
yesButton: true
noButton: true
title: qsTr("Are you sure you want to quit?")
- text: qsTr("OpenHD Imager is still busy.
Are you sure you want to quit?")
+ text: qsTr("OpenHD ImageWriter is still busy.
Are you sure you want to quit?")
onYes: {
Qt.quit()
}
@@ -923,8 +1152,19 @@ ApplicationWindow {
function askForConfirmation()
{
- text = qsTr("All existing data on '%1' will be erased.
Are you sure you want to continue?").arg(dstbutton.text)
+ var bootType=imageWriter.getValue("bootType");
+ if(bootType==="Ground"){
+ text = qsTr("All existing data on %1 will be erased.
This Device will boot as Groundstation!
Are you sure you want to continue?").arg(dstbutton.text)
+ openPopup()
+ }
+ else if(bootType==="Air"){
+ text = qsTr("All existing data on %1 will be erased.
This Device will boot as Air!
Are you sure you want to continue?").arg(dstbutton.text)
+ openPopup()
+ }
+ else{
+ text = qsTr("All existing data on %1 will be erased.
Are you sure you want to continue?").arg(dstbutton.text)
openPopup()
+ }
}
}
@@ -935,7 +1175,7 @@ ApplicationWindow {
noButton: true
property url url
title: qsTr("Update available")
- text: qsTr("There is a newer version of Imager available.
Would you like to visit the website to download it?")
+ text: qsTr("There is a newer version of the ImageWriter is available.
Would you like to visit the website to download it?")
onYes: {
Qt.openUrlExternally(url)
}
@@ -1050,23 +1290,17 @@ ApplicationWindow {
function onSuccess() {
msgpopup.title = qsTr("Image was written successfully!")
- if (osbutton.text === qsTr("Erase"))
- msgpopup.text = qsTr("%1 has been erased
You can now remove the SD card from the reader").arg(dstbutton.text)
+ if (osbutton.text === qsTr("Erase"))
+ msgpopup.text = qsTr("%1 has been erased
You can now remove the SD card from the reader").arg(dstbutton.text)
else if (imageWriter.isEmbeddedMode()) {
//msgpopup.text = qsTr("%1 has been written to %2").arg(osbutton.text).arg(dstbutton.text)
/* Just reboot to the installed OS */
Qt.quit()
}
else
- if(optionspopup.check_air())
- msgpopup.text = qsTr("%1 has been written to %2 It was flashed as AIR!
You can now remove the SD card from the reader").arg(osbutton.text).arg(dstbutton.text)
- else if(optionspopup.check_ground())
- msgpopup.text = qsTr("%1 has been written to %2 It was flashed as GROUND!
You can now remove the SD card from the reader").arg(osbutton.text).arg(dstbutton.text)
- else if(writebutton.image_name.includes("configurable"))
- msgpopup.text = qsTr("%1 has been written to %2 Air/Ground wasn't selected !
You can now remove the SD card from the reader").arg(osbutton.text).arg(dstbutton.text)
- else
- msgpopup.text = qsTr("%1 has been written to %2!
You can now remove the SD card from the reader").arg(osbutton.text).arg(dstbutton.text)
-
+ msgpopup.text = qsTr("%1 has been written to %2! You can now remove the SD card from the reader").arg(osbutton.text).arg(dstbutton.text)
+ msgpopup.continueButton = false
+ msgpopup.detailsButton = true
if (imageWriter.isEmbeddedMode()) {
msgpopup.continueButton = false
msgpopup.quitButton = true
@@ -1217,11 +1451,11 @@ ApplicationWindow {
fetch data by numeric role number */
if (driveListModel.data(driveListModel.index(i,0), 0x101) === drive) {
selectDstItem({
- device: drive,
- description: driveListModel.data(driveListModel.index(i,0), 0x102),
- size: driveListModel.data(driveListModel.index(i,0), 0x103),
- readonly: false
- })
+ device: drive,
+ description: driveListModel.data(driveListModel.index(i,0), 0x102),
+ size: driveListModel.data(driveListModel.index(i,0), 0x103),
+ readonly: false
+ })
break
}
}
diff --git a/src/windows/openhdimagewriter.manifest b/src/windows/openhdimagewriter.manifest
index 439fefc8f..4cb2077d1 100644
--- a/src/windows/openhdimagewriter.manifest
+++ b/src/windows/openhdimagewriter.manifest
@@ -1,7 +1,7 @@
- Raspberry Pi Imager
+ OpenHD ImageWriter
diff --git a/src/windows/openhdimagewriter.nsi.in b/src/windows/openhdimagewriter.nsi.in
index fdf0c0b9a..7183bf160 100644
--- a/src/windows/openhdimagewriter.nsi.in
+++ b/src/windows/openhdimagewriter.nsi.in
@@ -4,12 +4,13 @@
# by Vlasis K. Barkas aka Red Wine red_wine@freemail.gr Sep 2006
############################################################################################
-!define APP_NAME "OpenHD Imager"
+!define APP_NAME "OpenHD ImageWriter"
+!define OLD_APP_NAME "OpenHD imager"
!define COMP_NAME "OpenHD"
!define VERSION "@IMAGER_VERSION_STR@"
-!define INSTALLER_NAME "imager-${VERSION}.exe"
+!define INSTALLER_NAME "OpenHD-ImageWriter-${VERSION}.exe"
!define COPYRIGHT "OpenHD"
-!define DESCRIPTION "OpenHD Imager"
+!define DESCRIPTION "OpenHD ImageWriter"
!define MAIN_APP_EXE "openhdimagewriter.exe"
!define INSTALL_TYPE "SetShellVarContext current"
!define REG_ROOT "HKCU"
@@ -37,7 +38,7 @@ OutFile "${INSTALLER_NAME}"
BrandingText "${APP_NAME}"
XPStyle on
InstallDirRegKey "${REG_ROOT}" "${REG_APP_PATH}" ""
-InstallDir "$PROGRAMFILES\OpenHD Imager"
+InstallDir "$PROGRAMFILES\OpenHD ImageWriter"
######################################################################
@@ -84,14 +85,14 @@ InstallDir "$PROGRAMFILES\OpenHD Imager"
!insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "Italian"
-LangString termMsg ${LANG_ENGLISH} "OpenHD Imager seems to be running and busy.$\nDo you want to terminate process?"
-LangString stopMsg ${LANG_ENGLISH} "Stopping OpenHD Imager"
+LangString termMsg ${LANG_ENGLISH} "OpenHD ImageWriter seems to be running and busy.$\nDo you want to terminate process?"
+LangString stopMsg ${LANG_ENGLISH} "Stopping OpenHD ImageWriter"
LangString win7Msg ${LANG_ENGLISH} "Windows 7 or above required"
-LangString termMsg ${LANG_DUTCH} "OpenHD Imager is momenteel actief.$\nWilt u het programma afsluiten?"
-LangString stopMsg ${LANG_DUTCH} "Bezig met afsluiten OpenHD Imager"
+LangString termMsg ${LANG_DUTCH} "OpenHD ImageWriter is momenteel actief.$\nWilt u het programma afsluiten?"
+LangString stopMsg ${LANG_DUTCH} "Bezig met afsluiten OpenHD ImageWriter"
LangString win7Msg ${LANG_DUTCH} "Minimaal Windows 7 is vereist"
-LangString termMsg ${LANG_ITALIAN} "OpenHD Imager sembra essere in esecuzione e occupato.$\nVuoi terminare il processo OpenHD Imager?"
-LangString stopMsg ${LANG_ITALIAN} "Chiusura processo OpenHD Imager"
+LangString termMsg ${LANG_ITALIAN} "OpenHD ImageWriter sembra essere in esecuzione e occupato.$\nVuoi terminare il processo OpenHD ImageWriter?"
+LangString stopMsg ${LANG_ITALIAN} "Chiusura processo OpenHD ImageWriter"
LangString win7Msg ${LANG_ITALIAN} "Per l'esecuzione del programma è richiesto Windows 7 o versioni successive"
######################################################################
@@ -590,12 +591,12 @@ SetOutPath "$INSTDIR\iconengines"
File "deploy\iconengines\qsvgicon.dll"
SetOutPath "$INSTDIR\bearer"
File "deploy\bearer\qgenericbearer.dll"
+Delete "$SMPROGRAMS\OpenHD\${OLD_APP_NAME}.lnk"
SectionEnd
######################################################################
Section -Icons_Reg
-
!ifndef INNER
SetOutPath "$INSTDIR"
!endif
@@ -637,7 +638,7 @@ WriteRegStr SHCTX "Software\Classes\.gz\OpenWithProgIds" "RPI_IMAGINGUTILITY" ""
WriteRegStr SHCTX "Software\Classes\.xz\OpenWithProgIds" "RPI_IMAGINGUTILITY" ""
WriteRegStr SHCTX "Software\Classes\.img\OpenWithProgIds" "RPI_IMAGINGUTILITY" ""
WriteRegStr SHCTX "Software\Classes\.zstd\OpenWithProgIds" "RPI_IMAGINGUTILITY" ""
-WriteRegStr SHCTX "Software\Classes\RPI_IMAGINGUTILITY\shell\open" "FriendlyAppName" "OpenHD Imager"
+WriteRegStr SHCTX "Software\Classes\RPI_IMAGINGUTILITY\shell\open" "FriendlyAppName" "OpenHD ImageWriter"
WriteRegStr SHCTX "Software\Classes\RPI_IMAGINGUTILITY\shell\open\command" "" '"$INSTDIR\openhdimagewriter.exe" "%1"'
SectionEnd
diff --git a/src/windows/openhdimagewriter.nsi.in.bak b/src/windows/openhdimagewriter.nsi.in.bak
index 15c898952..43af1274f 100644
--- a/src/windows/openhdimagewriter.nsi.in.bak
+++ b/src/windows/openhdimagewriter.nsi.in.bak
@@ -4,12 +4,12 @@
# by Vlasis K. Barkas aka Red Wine red_wine@freemail.gr Sep 2006
############################################################################################
-!define APP_NAME "OpenHD Imager"
+!define APP_NAME "OpenHD ImageWriter"
!define COMP_NAME "OpenHD"
!define VERSION "@IMAGER_VERSION_STR@"
!define INSTALLER_NAME "imager-${VERSION}.exe"
!define COPYRIGHT "OpenHD"
-!define DESCRIPTION "OpenHD Imager"
+!define DESCRIPTION "OpenHD ImageWriter"
!define MAIN_APP_EXE "openhdimagewriter.exe"
!define INSTALL_TYPE "SetShellVarContext current"
!define REG_ROOT "HKCU"
@@ -37,7 +37,7 @@ OutFile "${INSTALLER_NAME}"
BrandingText "${APP_NAME}"
XPStyle on
InstallDirRegKey "${REG_ROOT}" "${REG_APP_PATH}" ""
-InstallDir "$PROGRAMFILES\OpenHD Imager"
+InstallDir "$PROGRAMFILES\OpenHD ImageWriter"
######################################################################
@@ -84,14 +84,14 @@ InstallDir "$PROGRAMFILES\OpenHD Imager"
!insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "Italian"
-LangString termMsg ${LANG_ENGLISH} "OpenHD Imager seems to be running and busy.$\nDo you want to terminate process?"
-LangString stopMsg ${LANG_ENGLISH} "Stopping OpenHD Imager"
+LangString termMsg ${LANG_ENGLISH} "OpenHD ImageWriter seems to be running and busy.$\nDo you want to terminate process?"
+LangString stopMsg ${LANG_ENGLISH} "Stopping OpenHD ImageWriter"
LangString win7Msg ${LANG_ENGLISH} "Windows 7 or above required"
-LangString termMsg ${LANG_DUTCH} "OpenHD Imager is momenteel actief.$\nWilt u het programma afsluiten?"
-LangString stopMsg ${LANG_DUTCH} "Bezig met afsluiten OpenHD Imager"
+LangString termMsg ${LANG_DUTCH} "OpenHD ImageWriter is momenteel actief.$\nWilt u het programma afsluiten?"
+LangString stopMsg ${LANG_DUTCH} "Bezig met afsluiten OpenHD ImageWriter"
LangString win7Msg ${LANG_DUTCH} "Minimaal Windows 7 is vereist"
-LangString termMsg ${LANG_ITALIAN} "OpenHD Imager sembra essere in esecuzione e occupato.$\nVuoi terminare il processo OpenHD Imager?"
-LangString stopMsg ${LANG_ITALIAN} "Chiusura processo OpenHD Imager"
+LangString termMsg ${LANG_ITALIAN} "OpenHD ImageWriter sembra essere in esecuzione e occupato.$\nVuoi terminare il processo OpenHD ImageWriter?"
+LangString stopMsg ${LANG_ITALIAN} "Chiusura processo OpenHD ImageWriter"
LangString win7Msg ${LANG_ITALIAN} "Per l'esecuzione del programma è richiesto Windows 7 o versioni successive"
######################################################################
@@ -635,7 +635,7 @@ WriteRegStr SHCTX "Software\Classes\.gz\OpenWithProgIds" "RPI_IMAGINGUTILITY" ""
WriteRegStr SHCTX "Software\Classes\.xz\OpenWithProgIds" "RPI_IMAGINGUTILITY" ""
WriteRegStr SHCTX "Software\Classes\.img\OpenWithProgIds" "RPI_IMAGINGUTILITY" ""
WriteRegStr SHCTX "Software\Classes\.zstd\OpenWithProgIds" "RPI_IMAGINGUTILITY" ""
-WriteRegStr SHCTX "Software\Classes\RPI_IMAGINGUTILITY\shell\open" "FriendlyAppName" "OpenHD Imager"
+WriteRegStr SHCTX "Software\Classes\RPI_IMAGINGUTILITY\shell\open" "FriendlyAppName" "OpenHD ImageWriter"
WriteRegStr SHCTX "Software\Classes\RPI_IMAGINGUTILITY\shell\open\command" "" '"$INSTDIR\rpi-imager.exe" "%1"'
SectionEnd