Closed matxpa closed 6 months ago
you're right. someone was very kind as to send me a DMG, but I forgot about the restrictions. I will switch back to a .app.
@0xCUB3 Hi I could (I can) provide a modified UpdateController.swift component (with dependent others, InitGlobalVariables.swift and a new one called SystemFunctions.swift). Modified UpdateController.swift 1) manage a ".dmg" from version >= 111 and a ".app" otherwise. 2) check Minimum OS version allowed --> v1.1.1 cant' be installed (copied) on High Sierra 3) Notifications (Apple Dev. components) between OS 10.13 and 10.14 are different, and it's managed and tested
Regards
I will be switching back to .apps, so there is no need.
@0xCUB3 @MDNich
Hi, F.Y.I
On High Sierra V1.1.1 Update (with a ".dmg" ) and update Minimum version vs current version comp
And on Monterey with Notifications (with UNUserNotificationCenter new class since 10.14) (NSUserNotification coded in v1.1.1 UpdateController.swift is deprecated since 10.14)
works both with a ".dmg" or ".app" extracted from ".zip"
And you could (if you would) get it from main branch (your v1.1.1 fork) on my repo.
Regards
@0xCUB3 @MDNich
Hi
Since v1.1.1 About.This.Hack.zip contains a "dmg" not an "app" as with v1.1.0
About.This.Hack.zip v1.1.1
And in "About This Hack.app" v1.1.1 "info.plist" "CFBundleShortVersionString" = 1.1.0
About.This.Hack.zip v1.1.0
Diff between UpdateController.swift v1.1.1 and v1.1.0 (no changes)
UpdateController.swift can't work fine, UpdateController needs an "app" not a "dmg" to update ATH in /Applications so UpdateController.swift needs changes like
1) run("/usr/bin/hdiutil attach (tempDirectory)/(thisApplicationName)v(latestVersion).dmg" -nobrowse -quiet") 2) run("/bin/cp -rf "/Volumes/(thisApplicationName)/(thisApplicationName).app \"(initGlobVar.thisAppliLocation)\/(thisApplicationName).app\"") 3) run("/usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep \"(thisApplicationName)\" | awk '{print $1}') -quiet")
\1) mount "dmg", 2) copy ATH.app to /Applications and 3) umount "dmg" when update is a "dmg" (ie. version > 110) and 2) could copy ATH.app from mounted "dmg" to (initGlobVar.tempDirectory) so it'll be like a previous version with the "app" extracted from à "zip".
Regards
and about previous issue N° 90 closed (Version.txt) : latest version Number could be obtained by latestVersion = run("GIT_TERMINAL_PROMPT=0 git ls-remote --tags --refs --sort=\"refname\" (initGlobVar.athrepositoryURL) | awk -F'/' '{print $NF}' | grep \"^[0-9]\" | tail -n1 | tr -d '\n'")
where "athrepositoryURL" is "https://github.com/0xCUB3/About-This-Hack"
so you didn't need a Version file containing the version number.