From f1ed20b2c53b635e5369efe71000ab8b43bbf81b Mon Sep 17 00:00:00 2001 From: Tom Steer Date: Sun, 22 Feb 2026 10:30:18 +0000 Subject: [PATCH 01/10] Update for Qt6 Fix deprecated/removed methods from Qt5 to Qt6 --- .gitignore | 2 ++ plugins/coretools/src/escformat.cpp | 4 ++-- src/textformat.cpp | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2a91a99..f9f29c5 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,5 @@ Makefile* #MacOS stuff .DS_Store + +build/ \ No newline at end of file diff --git a/plugins/coretools/src/escformat.cpp b/plugins/coretools/src/escformat.cpp index 85fd630..5db4f2b 100644 --- a/plugins/coretools/src/escformat.cpp +++ b/plugins/coretools/src/escformat.cpp @@ -45,7 +45,7 @@ void EscFormat::escapeChars(QByteArray &data) { for (int i=0; i < escTableSize; i++) { - data.replace(escTable[i].value, escTable[i].label); + data.replace(escTable[i].value, escTable[i].label.toLatin1()); } } @@ -53,6 +53,6 @@ void EscFormat::unEscapeChars(QByteArray &data) { for (int i=0; i < escTableSize; i++) { - data.replace(escTable[i].label, &escTable[i].value); + data.replace(escTable[i].label.toLatin1(), &escTable[i].value); } } diff --git a/src/textformat.cpp b/src/textformat.cpp index f07ab5d..7b043ef 100644 --- a/src/textformat.cpp +++ b/src/textformat.cpp @@ -61,7 +61,7 @@ void TextFormat::setByteArray(const QByteArray data) { QByteArray tmpData = data; // Put final char into the spinbox - char finalChar = tmpData.at(tmpData.count()-1); + char finalChar = tmpData.at(tmpData.size()-1); ui->spinTermChar->setValue(finalChar); tmpData.chop(1); // Erase all unprintables @@ -81,6 +81,6 @@ void TextFormat::replaceUnprintableChars(QByteArray &data) { for (int i=0; i < asciiTableSize; i++) { - data.replace(asciiTable[i].value, asciiTable[i].label); + data.replace(asciiTable[i].value, asciiTable[i].label.toLatin1()); } } From 52d8997346a7e341379ae86e4a8a708e1c28fa97 Mon Sep 17 00:00:00 2001 From: Tom Steer Date: Sun, 22 Feb 2026 10:19:55 +0000 Subject: [PATCH 02/10] Remove deprecated QRegExp --- plugins/coretools/network/ping.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/coretools/network/ping.cpp b/plugins/coretools/network/ping.cpp index 03779dd..a4dad2b 100644 --- a/plugins/coretools/network/ping.cpp +++ b/plugins/coretools/network/ping.cpp @@ -10,7 +10,7 @@ #ifdef Q_OS_MAC #include -#include +#include #endif Ping::Ping(QObject *parent) : @@ -115,11 +115,11 @@ void Ping::ping(QString host, int timeout) if(pingProcess.exitCode()==0) { // Successful Ping - QRegExp fromHostRegex("from (.*):.*time=(.*)ms"); - fromHostRegex.setMinimal(true); - fromHostRegex.indexIn(data); - QString replyHost = fromHostRegex.cap(1); - QString rtt = fromHostRegex.cap(2); + QRegularExpression fromHostRegex("from (.*):.*time=(.*)ms"); + const auto match = fromHostRegex.match(data); + + QString replyHost = match.captured(1); + QString rtt = match.captured(2); emit pingSuccess(replyHost, rtt.toInt()); } From e44961beee3281eb58f472a0de261e9150d3a6fd Mon Sep 17 00:00:00 2001 From: Tom Steer Date: Sun, 22 Feb 2026 10:20:17 +0000 Subject: [PATCH 03/10] Ignore built app --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f9f29c5..6da03f6 100644 --- a/.gitignore +++ b/.gitignore @@ -50,4 +50,5 @@ Makefile* #MacOS stuff .DS_Store -build/ \ No newline at end of file +build/ +app/ From 29d0dbcabbca06aaf8f12ffac83a32f164b8f7df Mon Sep 17 00:00:00 2001 From: Tom Steer Date: Sun, 22 Feb 2026 10:20:58 +0000 Subject: [PATCH 04/10] Add Multiarch support for MacOS Add MultiArch support for universal binary --- Application.pro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Application.pro b/Application.pro index ec5aafd..751c293 100644 --- a/Application.pro +++ b/Application.pro @@ -120,9 +120,10 @@ win32 { DEPLOY_INSTALLER = makensis /DPRODUCT_VERSION="$${PRODUCT_VERSION}" $$shell_quote($$system_path($${_PRO_FILE_PWD_}/install/win/install.nsi)) } macx { + QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64 + VERSION = $$system(echo $$GIT_VERSION | sed 's/[a-zA-Z]//') - PLUGINS_SRC = $$system_path($${OUT_PWD}/app/stPlugin_*) PLUGINS_DST = $$system_path($${OUT_PWD}/app/StringTheory.app/Contents/MacOS/) From 285eca35f9963a29bb204de7dacbd6818da2b99a Mon Sep 17 00:00:00 2001 From: Tom Steer Date: Sun, 22 Feb 2026 10:30:27 +0000 Subject: [PATCH 05/10] Move CI builds to GH Actions Move CI builds from Travis/Appveyor to Github actions: - Remove Travis and Appveyor, add Github action file - Switch create-dmg to submodule and update to run on Apple Silicon --- .github/workflows/build.yml | 56 ++++++ .gitmodules | 3 + .travis.yml | 16 -- Application.pro | 4 +- appveyor.yml | 58 ------ install/mac/LICENSE | 21 --- install/mac/README.md | 77 -------- install/mac/builder/create-dmg.builder | 26 --- install/mac/create-dmg | 230 ----------------------- install/mac/createdmg | 1 + install/mac/sample | 3 - install/mac/support/dmg-license.py | 163 ---------------- install/mac/support/template.applescript | 79 -------- 13 files changed, 62 insertions(+), 675 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .gitmodules delete mode 100644 .travis.yml delete mode 100644 appveyor.yml delete mode 100644 install/mac/LICENSE delete mode 100644 install/mac/README.md delete mode 100644 install/mac/builder/create-dmg.builder delete mode 100755 install/mac/create-dmg create mode 160000 install/mac/createdmg delete mode 100644 install/mac/sample delete mode 100644 install/mac/support/dmg-license.py delete mode 100644 install/mac/support/template.applescript diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d3f56e7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,56 @@ +name: Build StringTheory + +on: + push: + pull_request: + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, windows-latest] + qt-version: ["6.9.3"] + include: + - os: macos-latest + artifact: "./install/mac/*.dmg" + - os: windows-latest + artifact: "./install/win/*.exe" + steps: + - name: Checkout source + uses: actions/checkout@v6 + with: + submodules: 'true' + + - name: Set up Qt + uses: jurplel/install-qt-action@v4 + with: + version: ${{ matrix.qt-version }} + modules: qtserialport + + - name: Configure MSVC Environment + if: matrix.os == 'windows-latest' + uses: ilammy/msvc-dev-cmd@v1 + + - name: Install NSIS + if: matrix.os == 'windows-latest' + uses: negrutiu/nsis-install@v2 + + - name: Configure project + run: qmake StringTheory.pro + + - name: Build (Windows) + if: matrix.os == 'windows-latest' + run: nmake + + - name: Build (macOS) + if: matrix.os == 'macos-latest' + shell: bash + run: make -j$(sysctl -n hw.ncpu) + + - name: Upload Artifact(s) + if: matrix.artifact + uses: actions/upload-artifact@v6 + with: + name: ${{ runner.os }} + path: ${{ matrix.artifact }} diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..21d3418 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "install/mac/createdmg"] + path = install/mac/createdmg + url = git@github.com:create-dmg/create-dmg.git diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9105507..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: cpp -os: osx -osx_image: xcode8.3 -before_install: - - brew update -install: - # QT - - brew install qt - - brew link --force qt -script: - - qmake - - make -j4 -after_success: - - FILE=$(echo `pwd`/`ls install/mac/*.dmg`) - - BASENAME=$(basename $FILE) - - echo "Uploading $BASENAME to file.io..." && curl -sF "file=@$FILE" https://file.io | xargs printf "$BASENAME uploaded - %s\n" diff --git a/Application.pro b/Application.pro index 751c293..ce48aa4 100644 --- a/Application.pro +++ b/Application.pro @@ -121,7 +121,7 @@ win32 { } macx { QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64 - + VERSION = $$system(echo $$GIT_VERSION | sed 's/[a-zA-Z]//') PLUGINS_SRC = $$system_path($${OUT_PWD}/app/stPlugin_*) @@ -135,7 +135,7 @@ macx { DEPLOY_COMMAND = macdeployqt DEPLOY_CLEANUP = $${QMAKE_DEL_FILE} $${DEPLOY_DIR}/StringTheory*.dmg - DEPLOY_INSTALLER = $${_PRO_FILE_PWD_}/install/mac/create-dmg --volname "StringTheory_Installer" --volicon "$${_PRO_FILE_PWD_}/res/icon.icns" + DEPLOY_INSTALLER = $${_PRO_FILE_PWD_}/install/mac/createdmg/create-dmg --volname "StringTheory_Installer" --volicon "$${_PRO_FILE_PWD_}/res/icon.icns" DEPLOY_INSTALLER += --background "$${_PRO_FILE_PWD_}/res/mac_install_bg.png" --window-pos 200 120 --window-size 800 400 --icon-size 100 --icon $${TARGET}$${TARGET_CUSTOM_EXT} 200 190 --hide-extension $${TARGET}$${TARGET_CUSTOM_EXT} --app-drop-link 600 185 DEPLOY_INSTALLER += $${DEPLOY_DIR}/StringTheory_$${VERSION}.dmg $${OUT_PWD}/app/$${TARGET}$${TARGET_CUSTOM_EXT} } diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index c1d1f92..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,58 +0,0 @@ -#---------------------------------# -# general configuration # -#---------------------------------# - -# branches to build -#branches: -# # whitelist -# only: -# - master - -# Start builds on tags only -#skip_non_tags: true - -# Build worker image (VM template) -image: Visual Studio 2017 - -#---------------------------------# -# build configuration # -#---------------------------------# - -version: '{build}' - -environment: - QT_Ver: 5.12 - -# build platform, i.e. x86, x64, Any CPU. This setting is optional. -platform: x86 - -# build Configuration, i.e. Debug, Release, etc. -configuration: Release - -build: - parallel: true # enable MSBuild parallel builds - - # MSBuild verbosity level - verbosity: detailed - -install: - # MSVC Paths - # https://www.appveyor.com/docs/lang/cpp/#visual-studio - - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat" - - # QT Paths - # https://www.appveyor.com/docs/build-environment/#qt - - set QTDIR=C:\Qt\%QT_Ver%\msvc2017 - - set PATH=%PATH%;%QTDIR%\bin - - # NSIS Paths - # https://www.appveyor.com/docs/build-environment/#tools - - set PATH=%PATH%;C:\Program Files (x86)\NSIS - -build_script: - - qmake - - nmake - -artifacts: - - path: install\win\*.exe - - path: app\*.pdb \ No newline at end of file diff --git a/install/mac/LICENSE b/install/mac/LICENSE deleted file mode 100644 index 349b6d8..0000000 --- a/install/mac/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2008-2014 Andrey Tarantsov - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/install/mac/README.md b/install/mac/README.md deleted file mode 100644 index 153b56c..0000000 --- a/install/mac/README.md +++ /dev/null @@ -1,77 +0,0 @@ -create-dmg -========== - -A shell script to build fancy DMGs. - - -Status and contribution policy ------------------------------- - -This project is maintained thanks to the contributors who send pull requests. The original author has no use for the project, so his only role is reviewing and merging pull requests. - -I will merge any pull request that adds something useful and does not break existing things. - -Starting in January 2015, everyone who gets a pull request merged gets commit access to the repository. - - -Installation ------------- - -By being a shell script, yoursway-create-dmg installation is very simple. Simply download and run. - -> git clone https://github.com/andreyvit/yoursway-create-dmg.git -> cd yoursway-create-dmg -> ./create-dmg [options] - - -Usage ------ - -> create-dmg [options...] [output\_name.dmg] [source\_folder] - -All contents of source\_folder will be copied into the disk image. - -**Options:** - -* **--volname [name]:** set volume name (displayed in the Finder sidebar and window title) -* **--volicon [icon.icns]:** set volume icon -* **--background [pic.png]:** set folder background image (provide png, gif, jpg) -* **--window-pos [x y]:** set position the folder window -* **--window-size [width height]:** set size of the folder window -* **--text-size [text size]:** set window text size (10-16) -* **--icon-size [icon size]:** set window icons size (up to 128) -* **--icon [file name] [x y]:** set position of the file's icon -* **--hide-extension [file name]:** hide the extension of file -* **--custom-icon [file name]/[custom icon]/[sample file] [x y]:** set position and custom icon -* **--app-drop-link [x y]:** make a drop link to Applications, at location x, y -* **--eula [eula file]:** attach a license file to the dmg -* **--no-internet-enable:** disable automatic mount© -* **--version:** show tool version number -* **-h, --help:** display the help - - -Example -------- - -> \#!/bin/sh -> test -f Application-Installer.dmg && rm Application-Installer.dmg -> create-dmg \ -> --volname "Application Installer" \ -> --volicon "application\_icon.icns" \ -> --background "installer\_background.png" \ -> --window-pos 200 120 \ -> --window-size 800 400 \ -> --icon-size 100 \ -> --icon Application.app 200 190 \ -> --hide-extension Application.app \ -> --app-drop-link 600 185 \ -> Application-Installer.dmg \ -> source\_folder/ - - -Alternatives ------------- - -* [node-appdmg](https://github.com/LinusU/node-appdmg) -* [dmgbuild](https://pypi.python.org/pypi/dmgbuild) -* see the [StackOverflow question](http://stackoverflow.com/questions/96882/how-do-i-create-a-nice-looking-dmg-for-mac-os-x-using-command-line-tools) diff --git a/install/mac/builder/create-dmg.builder b/install/mac/builder/create-dmg.builder deleted file mode 100644 index d428528..0000000 --- a/install/mac/builder/create-dmg.builder +++ /dev/null @@ -1,26 +0,0 @@ -SET app_name create-dmg - -VERSION create-dmg.cur create-dmg heads/master - -NEWDIR build.dir temp %-build - - -NEWFILE create-dmg.zip featured %.zip % - - -COPYTO [build.dir] - INTO create-dmg [create-dmg.cur]/create-dmg - INTO sample [create-dmg.cur]/sample - INTO support [create-dmg.cur]/support - -SUBSTVARS [build.dir]/create-dmg [[]] - - -ZIP [create-dmg.zip] - INTO [build-files-prefix] [build.dir] - - -PUT megabox-builds create-dmg.zip -PUT megabox-builds build.log - -PUT s3-builds create-dmg.zip -PUT s3-builds build.log diff --git a/install/mac/create-dmg b/install/mac/create-dmg deleted file mode 100755 index 3e55dd9..0000000 --- a/install/mac/create-dmg +++ /dev/null @@ -1,230 +0,0 @@ -#! /bin/bash - -# Create a read-only disk image of the contents of a folder - -set -e; - -function pure_version() { - echo '1.0.0.2' -} - -function version() { - echo "create-dmg $(pure_version)" -} - -function usage() { - version - echo "Creates a fancy DMG file." - echo "Usage: $(basename $0) options... image.dmg source_folder" - echo "All contents of source_folder will be copied into the disk image." - echo "Options:" - echo " --volname name" - echo " set volume name (displayed in the Finder sidebar and window title)" - echo " --volicon icon.icns" - echo " set volume icon" - echo " --background pic.png" - echo " set folder background image (provide png, gif, jpg)" - echo " --window-pos x y" - echo " set position the folder window" - echo " --window-size width height" - echo " set size of the folder window" - echo " --text-size text_size" - echo " set window text size (10-16)" - echo " --icon-size icon_size" - echo " set window icons size (up to 128)" - echo " --icon file_name x y" - echo " set position of the file's icon" - echo " --hide-extension file_name" - echo " hide the extension of file" - echo " --custom-icon file_name custom_icon_or_sample_file x y" - echo " set position and custom icon" - echo " --app-drop-link x y" - echo " make a drop link to Applications, at location x,y" - echo " --eula eula_file" - echo " attach a license file to the dmg" - echo " --no-internet-enable" - echo " disable automatic mount©" - echo " --version show tool version number" - echo " -h, --help display this help" - exit 0 -} - -WINX=10 -WINY=60 -WINW=500 -WINH=350 -ICON_SIZE=128 -TEXT_SIZE=16 - -while test "${1:0:1}" = "-"; do - case $1 in - --volname) - VOLUME_NAME="$2" - shift; shift;; - --volicon) - VOLUME_ICON_FILE="$2" - shift; shift;; - --background) - BACKGROUND_FILE="$2" - BACKGROUND_FILE_NAME="$(basename $BACKGROUND_FILE)" - BACKGROUND_CLAUSE="set background picture of opts to file \".background:$BACKGROUND_FILE_NAME\"" - REPOSITION_HIDDEN_FILES_CLAUSE="set position of every item to {theBottomRightX + 100, 100}" - shift; shift;; - --icon-size) - ICON_SIZE="$2" - shift; shift;; - --text-size) - TEXT_SIZE="$2" - shift; shift;; - --window-pos) - WINX=$2; WINY=$3 - shift; shift; shift;; - --window-size) - WINW=$2; WINH=$3 - shift; shift; shift;; - --icon) - POSITION_CLAUSE="${POSITION_CLAUSE}set position of item \"$2\" to {$3, $4} -" - shift; shift; shift; shift;; - --hide-extension) - HIDING_CLAUSE="${HIDING_CLAUSE}set the extension hidden of item \"$2\" to true -" - shift; shift;; - --custom-icon) - shift; shift; shift; shift; shift;; - -h | --help) - usage;; - --version) - version; exit 0;; - --pure-version) - pure_version; exit 0;; - --app-drop-link) - APPLICATION_LINK=$2 - APPLICATION_CLAUSE="set position of item \"Applications\" to {$2, $3} -" - shift; shift; shift;; - --eula) - EULA_RSRC=$2 - shift; shift;; - --no-internet-enable) - NOINTERNET=1 - shift;; - -*) - echo "Unknown option $1. Run with --help for help." - exit 1;; - esac -done - -test -z "$2" && { - echo "Not enough arguments. Invoke with --help for help." - exit 1 -} - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -DMG_PATH="$1" -DMG_DIRNAME="$(dirname "$DMG_PATH")" -DMG_DIR="$(cd "$DMG_DIRNAME" > /dev/null; pwd)" -DMG_NAME="$(basename "$DMG_PATH")" -DMG_TEMP_NAME="$DMG_DIR/rw.${DMG_NAME}" -SRC_FOLDER="$(cd "$2" > /dev/null; pwd)" -test -z "$VOLUME_NAME" && VOLUME_NAME="$(basename "$DMG_PATH" .dmg)" - -AUX_PATH="$SCRIPT_DIR/support" - -test -d "$AUX_PATH" || { - echo "Cannot find support directory: $AUX_PATH" - exit 1 -} - -if [ -f "$SRC_FOLDER/.DS_Store" ]; then - echo "Deleting any .DS_Store in source folder" - rm "$SRC_FOLDER/.DS_Store" -fi - -# Create the image -echo "Creating disk image..." -test -f "${DMG_TEMP_NAME}" && rm -f "${DMG_TEMP_NAME}" -ACTUAL_SIZE=`du -sm "$SRC_FOLDER" | sed -e 's/ .*//g'` -DISK_IMAGE_SIZE=$(expr $ACTUAL_SIZE + 20) -hdiutil create -srcfolder "$SRC_FOLDER" -volname "${VOLUME_NAME}" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size ${DISK_IMAGE_SIZE}m "${DMG_TEMP_NAME}" - -# mount it -echo "Mounting disk image..." -MOUNT_DIR="/Volumes/${VOLUME_NAME}" - -# try unmount dmg if it was mounted previously (e.g. developer mounted dmg, installed app and forgot to unmount it) -echo "Unmounting disk image..." -DEV_NAME=$(hdiutil info | egrep '^/dev/' | sed 1q | awk '{print $1}') -test -d "${MOUNT_DIR}" && hdiutil detach "${DEV_NAME}" - -echo "Mount directory: $MOUNT_DIR" -DEV_NAME=$(hdiutil attach -readwrite -noverify -noautoopen "${DMG_TEMP_NAME}" | egrep '^/dev/' | sed 1q | awk '{print $1}') -echo "Device name: $DEV_NAME" - -if ! test -z "$BACKGROUND_FILE"; then - echo "Copying background file..." - test -d "$MOUNT_DIR/.background" || mkdir "$MOUNT_DIR/.background" - cp "$BACKGROUND_FILE" "$MOUNT_DIR/.background/$BACKGROUND_FILE_NAME" -fi - -if ! test -z "$APPLICATION_LINK"; then - echo "making link to Applications dir" - echo $MOUNT_DIR - ln -s /Applications "$MOUNT_DIR/Applications" -fi - -if ! test -z "$VOLUME_ICON_FILE"; then - echo "Copying volume icon file '$VOLUME_ICON_FILE'..." - cp "$VOLUME_ICON_FILE" "$MOUNT_DIR/.VolumeIcon.icns" - SetFile -c icnC "$MOUNT_DIR/.VolumeIcon.icns" -fi - -# run applescript -APPLESCRIPT=$(mktemp -t createdmg) -cat "$AUX_PATH/template.applescript" | sed -e "s/WINX/$WINX/g" -e "s/WINY/$WINY/g" -e "s/WINW/$WINW/g" -e "s/WINH/$WINH/g" -e "s/BACKGROUND_CLAUSE/$BACKGROUND_CLAUSE/g" -e "s/REPOSITION_HIDDEN_FILES_CLAUSE/$REPOSITION_HIDDEN_FILES_CLAUSE/g" -e "s/ICON_SIZE/$ICON_SIZE/g" -e "s/TEXT_SIZE/$TEXT_SIZE/g" | perl -pe "s/POSITION_CLAUSE/$POSITION_CLAUSE/g" | perl -pe "s/APPLICATION_CLAUSE/$APPLICATION_CLAUSE/g" | perl -pe "s/HIDING_CLAUSE/$HIDING_CLAUSE/" >"$APPLESCRIPT" - -echo "Running Applescript: /usr/bin/osascript \"${APPLESCRIPT}\" \"${VOLUME_NAME}\"" -"/usr/bin/osascript" "${APPLESCRIPT}" "${VOLUME_NAME}" || true -echo "Done running the applescript..." -sleep 4 - -rm "$APPLESCRIPT" - -# make sure it's not world writeable -echo "Fixing permissions..." -chmod -Rf go-w "${MOUNT_DIR}" &> /dev/null || true -echo "Done fixing permissions." - -# make the top window open itself on mount: -echo "Blessing started" -bless --folder "${MOUNT_DIR}" --openfolder "${MOUNT_DIR}" -echo "Blessing finished" - -if ! test -z "$VOLUME_ICON_FILE"; then - # tell the volume that it has a special file attribute - SetFile -a C "$MOUNT_DIR" -fi - -# unmount -echo "Unmounting disk image..." -hdiutil detach "${DEV_NAME}" - -# compress image -echo "Compressing disk image..." -hdiutil convert "${DMG_TEMP_NAME}" -format UDZO -imagekey zlib-level=9 -o "${DMG_DIR}/${DMG_NAME}" -rm -f "${DMG_TEMP_NAME}" - -# adding EULA resources -if [ ! -z "${EULA_RSRC}" -a "${EULA_RSRC}" != "-null-" ]; then - echo "adding EULA resources" - "${AUX_PATH}/dmg-license.py" "${DMG_DIR}/${DMG_NAME}" "${EULA_RSRC}" -fi - -if [ ! -z "${NOINTERNET}" -a "${NOINTERNET}" == 1 ]; then - echo "not setting 'internet-enable' on the dmg" -else - hdiutil internet-enable -yes "${DMG_DIR}/${DMG_NAME}" -fi - -echo "Disk image done" -exit 0 diff --git a/install/mac/createdmg b/install/mac/createdmg new file mode 160000 index 0000000..994a036 --- /dev/null +++ b/install/mac/createdmg @@ -0,0 +1 @@ +Subproject commit 994a036532d3ac1bb1cd5a425a0d5d796ecbed83 diff --git a/install/mac/sample b/install/mac/sample deleted file mode 100644 index 92697a9..0000000 --- a/install/mac/sample +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/bash -test -f test2.dmg && rm test2.dmg -./create-dmg --window-size 500 300 --background ~/Projects/eclipse-osx-repackager/build/background.gif --icon-size 96 --volname "Hyper Foo" --app-drop-link 380 205 --icon "Eclipse OS X Repackager" 110 205 test2.dmg /Users/andreyvit/Projects/eclipse-osx-repackager/temp/Eclipse\ OS\ X\ Repackager\ r10/ diff --git a/install/mac/support/dmg-license.py b/install/mac/support/dmg-license.py deleted file mode 100644 index 9003a7c..0000000 --- a/install/mac/support/dmg-license.py +++ /dev/null @@ -1,163 +0,0 @@ -#! /usr/bin/env python -""" -This script adds a license file to a DMG. Requires Xcode and a plain ascii text -license file. -Obviously only runs on a Mac. - -Copyright (C) 2011-2013 Jared Hobbs - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -""" -import os -import sys -import tempfile -import optparse - - -class Path(str): - def __enter__(self): - return self - - def __exit__(self, type, value, traceback): - os.unlink(self) - - -def mktemp(dir=None, suffix=''): - (fd, filename) = tempfile.mkstemp(dir=dir, suffix=suffix) - os.close(fd) - return Path(filename) - - -def main(options, args): - dmgFile, license = args - with mktemp('.') as tmpFile: - with open(tmpFile, 'w') as f: - f.write("""data 'TMPL' (128, "LPic") { - $"1344 6566 6175 6C74 204C 616E 6775 6167" - $"6520 4944 4457 5244 0543 6F75 6E74 4F43" - $"4E54 042A 2A2A 2A4C 5354 430B 7379 7320" - $"6C61 6E67 2049 4444 5752 441E 6C6F 6361" - $"6C20 7265 7320 4944 2028 6F66 6673 6574" - $"2066 726F 6D20 3530 3030 4457 5244 1032" - $"2D62 7974 6520 6C61 6E67 7561 6765 3F44" - $"5752 4404 2A2A 2A2A 4C53 5445" -}; - -data 'LPic' (5000) { - $"0000 0002 0000 0000 0000 0000 0004 0000" -}; - -data 'STR#' (5000, "English buttons") { - $"0006 0D45 6E67 6C69 7368 2074 6573 7431" - $"0541 6772 6565 0844 6973 6167 7265 6505" - $"5072 696E 7407 5361 7665 2E2E 2E7A 4966" - $"2079 6F75 2061 6772 6565 2077 6974 6820" - $"7468 6520 7465 726D 7320 6F66 2074 6869" - $"7320 6C69 6365 6E73 652C 2063 6C69 636B" - $"2022 4167 7265 6522 2074 6F20 6163 6365" - $"7373 2074 6865 2073 6F66 7477 6172 652E" - $"2020 4966 2079 6F75 2064 6F20 6E6F 7420" - $"6167 7265 652C 2070 7265 7373 2022 4469" - $"7361 6772 6565 2E22" -}; - -data 'STR#' (5002, "English") { - $"0006 0745 6E67 6C69 7368 0541 6772 6565" - $"0844 6973 6167 7265 6505 5072 696E 7407" - $"5361 7665 2E2E 2E7B 4966 2079 6F75 2061" - $"6772 6565 2077 6974 6820 7468 6520 7465" - $"726D 7320 6F66 2074 6869 7320 6C69 6365" - $"6E73 652C 2070 7265 7373 2022 4167 7265" - $"6522 2074 6F20 696E 7374 616C 6C20 7468" - $"6520 736F 6674 7761 7265 2E20 2049 6620" - $"796F 7520 646F 206E 6F74 2061 6772 6565" - $"2C20 7072 6573 7320 2244 6973 6167 7265" - $"6522 2E" -};\n\n""") - with open(license, 'r') as l: - kind = 'RTF ' if license.lower().endswith('.rtf') else 'TEXT' - f.write('data \'%s\' (5000, "English") {\n' % kind) - def escape(s): - return s.strip().replace('\\', '\\\\').replace('"', '\\"') - - for line in l: - if len(line) < 1000: - f.write(' "' + escape(line) + '\\n"\n') - else: - for liner in line.split('.'): - f.write(' "' + escape(liner) + '. \\n"\n') - f.write('};\n\n') - f.write("""data 'styl' (5000, "English") { - $"0003 0000 0000 000C 0009 0014 0000 0000" - $"0000 0000 0000 0000 0027 000C 0009 0014" - $"0100 0000 0000 0000 0000 0000 002A 000C" - $"0009 0014 0000 0000 0000 0000 0000" -};\n""") - os.system('hdiutil unflatten -quiet "%s"' % dmgFile) - ret = os.system('%s -a %s -o "%s"' % - (options.rez, tmpFile, dmgFile)) - os.system('hdiutil flatten -quiet "%s"' % dmgFile) - if options.compression is not None: - os.system('cp %s %s.temp.dmg' % (dmgFile, dmgFile)) - os.remove(dmgFile) - if options.compression == "bz2": - os.system('hdiutil convert %s.temp.dmg -format UDBZ -o %s' % - (dmgFile, dmgFile)) - elif options.compression == "gz": - os.system('hdiutil convert %s.temp.dmg -format ' % dmgFile + - 'UDZO -imagekey zlib-devel=9 -o %s' % dmgFile) - os.remove('%s.temp.dmg' % dmgFile) - if ret == 0: - print "Successfully added license to '%s'" % dmgFile - else: - print "Failed to add license to '%s'" % dmgFile - -if __name__ == '__main__': - parser = optparse.OptionParser() - parser.set_usage("""%prog [OPTIONS] - This program adds a software license agreement to a DMG file. - It requires Xcode and either a plain ascii text - or a with the RTF contents. - - See --help for more details.""") - parser.add_option( - '--rez', - '-r', - action='store', - default='/Applications/Xcode.app/Contents/Developer/Tools/Rez', - help='The path to the Rez tool. Defaults to %default' - ) - parser.add_option( - '--compression', - '-c', - action='store', - choices=['bz2', 'gz'], - default=None, - help='Optionally compress dmg using specified compression type. ' - 'Choices are bz2 and gz.' - ) - options, args = parser.parse_args() - cond = len(args) != 2 - if not os.path.exists(options.rez): - print 'Failed to find Rez at "%s"!\n' % options.rez - cond = True - if cond: - parser.print_usage() - sys.exit(1) - main(options, args) diff --git a/install/mac/support/template.applescript b/install/mac/support/template.applescript deleted file mode 100644 index 2a7f2aa..0000000 --- a/install/mac/support/template.applescript +++ /dev/null @@ -1,79 +0,0 @@ -on run (volumeName) - tell application "Finder" - tell disk (volumeName as string) - open - - set theXOrigin to WINX - set theYOrigin to WINY - set theWidth to WINW - set theHeight to WINH - - set theBottomRightX to (theXOrigin + theWidth) - set theBottomRightY to (theYOrigin + theHeight) - set dsStore to "\"" & "/Volumes/" & volumeName & "/" & ".DS_STORE\"" - - tell container window - set current view to icon view - set toolbar visible to false - set statusbar visible to false - set the bounds to {theXOrigin, theYOrigin, theBottomRightX, theBottomRightY} - set statusbar visible to false - REPOSITION_HIDDEN_FILES_CLAUSE - end tell - - set opts to the icon view options of container window - tell opts - set icon size to ICON_SIZE - set text size to TEXT_SIZE - set arrangement to not arranged - end tell - BACKGROUND_CLAUSE - - -- Positioning - POSITION_CLAUSE - - -- Hiding - HIDING_CLAUSE - - -- Application Link Clause - APPLICATION_CLAUSE - close - open - - update without registering applications - -- Force saving of the size - delay 1 - - tell container window - set statusbar visible to false - set the bounds to {theXOrigin, theYOrigin, theBottomRightX - 10, theBottomRightY - 10} - end tell - - update without registering applications - end tell - - delay 1 - - tell disk (volumeName as string) - tell container window - set statusbar visible to false - set the bounds to {theXOrigin, theYOrigin, theBottomRightX, theBottomRightY} - end tell - - update without registering applications - end tell - - --give the finder some time to write the .DS_Store file - delay 3 - - set waitTime to 0 - set ejectMe to false - repeat while ejectMe is false - delay 1 - set waitTime to waitTime + 1 - - if (do shell script "[ -f " & dsStore & " ]; echo $?") = "0" then set ejectMe to true - end repeat - log "waited " & waitTime & " seconds for .DS_STORE to be created." - end tell -end run From 7d5546aa1f65431387c3f48be28c2c3e49ebca48 Mon Sep 17 00:00:00 2001 From: Tom Steer Date: Fri, 1 May 2026 12:23:16 +0100 Subject: [PATCH 06/10] Use HTTPS to clone submodule Using HTTPS avoids the need for github SSH keys when cloning. --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 21d3418..32ed46c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "install/mac/createdmg"] path = install/mac/createdmg - url = git@github.com:create-dmg/create-dmg.git + url = https://github.com/create-dmg/create-dmg.git From f88907fd1e394622a02473dcb816f8bb8e7b42d9 Mon Sep 17 00:00:00 2001 From: Tom Steer Date: Fri, 1 May 2026 12:36:09 +0100 Subject: [PATCH 07/10] Switch regex to non-greedy capture --- plugins/coretools/network/ping.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/coretools/network/ping.cpp b/plugins/coretools/network/ping.cpp index a4dad2b..fe3f9b8 100644 --- a/plugins/coretools/network/ping.cpp +++ b/plugins/coretools/network/ping.cpp @@ -115,7 +115,7 @@ void Ping::ping(QString host, int timeout) if(pingProcess.exitCode()==0) { // Successful Ping - QRegularExpression fromHostRegex("from (.*):.*time=(.*)ms"); + QRegularExpression fromHostRegex("from (.*?):.*?time=(.*?)ms"); const auto match = fromHostRegex.match(data); QString replyHost = match.captured(1); From 44b41bbea5af014e4eb31b1a60542ed43622498d Mon Sep 17 00:00:00 2001 From: Tom Steer Date: Fri, 1 May 2026 12:30:42 +0100 Subject: [PATCH 08/10] Switch to Qt 6.8.3 6.8.x is a QT LTS release. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d3f56e7..d63b57e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: os: [macos-latest, windows-latest] - qt-version: ["6.9.3"] + qt-version: ["6.8.3"] include: - os: macos-latest artifact: "./install/mac/*.dmg" From f150d5dde3212e0581aec0c02413ea48c5ed1c30 Mon Sep 17 00:00:00 2001 From: Tom Steer Date: Fri, 1 May 2026 12:54:33 +0100 Subject: [PATCH 09/10] Remove `ilammy/msvc-dev-cmd` The `ilammy/msvc-dev-cmd` repository is abandoned. Replace with more currently maintained version. This updates the workflow to load the MSVC environment variables directly via `vcvars64.bat`. --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d63b57e..7a59169 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,8 +30,9 @@ jobs: - name: Configure MSVC Environment if: matrix.os == 'windows-latest' - uses: ilammy/msvc-dev-cmd@v1 - + uses: TheMrMilchmann/setup-msvc-dev@v4 + with: + arch: x64 - name: Install NSIS if: matrix.os == 'windows-latest' uses: negrutiu/nsis-install@v2 From cc235aab83c604ae61f875d5f0a267462cc91268 Mon Sep 17 00:00:00 2001 From: Tom Steer Date: Fri, 1 May 2026 15:55:36 +0100 Subject: [PATCH 10/10] Check regex result Fix possible case where invalid pingSuccess could be signalled. --- plugins/coretools/network/ping.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/plugins/coretools/network/ping.cpp b/plugins/coretools/network/ping.cpp index fe3f9b8..7da467d 100644 --- a/plugins/coretools/network/ping.cpp +++ b/plugins/coretools/network/ping.cpp @@ -118,13 +118,16 @@ void Ping::ping(QString host, int timeout) QRegularExpression fromHostRegex("from (.*?):.*?time=(.*?)ms"); const auto match = fromHostRegex.match(data); - QString replyHost = match.captured(1); - QString rtt = match.captured(2); + if(match.hasMatch()) + { + QString replyHost = match.captured(1); + QString rtt = match.captured(2); - emit pingSuccess(replyHost, rtt.toInt()); - } - else { - emit pingFailure(host, tr("Host Unreachable")); + emit pingSuccess(replyHost, rtt.toInt()); + return; + } } + + emit pingFailure(host, tr("Host Unreachable")); #endif }