Conversation
sweetppro
commented
Jan 8, 2023
- Updated for macOS Ventura and Xcode 14.2
- Apple Silicon compatible
- updated project to macOS 11+
- fixed most warnings and deprecations
- replaced ShortcutRecorder Framework with MASShortcut package
- general refactoring
- updated Preferences window layout
- replaced most static images with SF Symbols
- moved remaining images to Assets catalogue
- updated icon to user submitted icon New Icon for Big Sur + #203
- refreshed status menu icon
- refreshed .hst icon
- added support for restarting mDNSResponder via NSUserAppleScriptTask
- updated .gitignore to ignore .DS_Store files
- updated README to indicate support for macOS Big Sur and above
As mentioned in Issues 2ndalpha#160 and 2ndalpha#140, the list of hosts is not alphabetized in newer versions of macOS. This change is a feeble attempt by me to sort the `hostsFiles` array as it's populated. It seems to have built successfully on my machine but I'm extremely new to the world of Obj-C development so it would not surprise me in the least if this does something in a bad or easily improved way. That is, I added a way to Sort (`NSSortDescriptor`) and call it immediately after every time we `addObject` to `hostsFiles` during `loadFiles` in LocalHostsController.m. Doing this after every addition seems like it might be a poor choice from a performance perspective. Moreover, it may be wholly unnecessary when used in some environments where this issue doesn't present. I went with it anyway because I didn't know how else to approach this, nor how to conditionally use this logic only when I know it to be necessary.
* Updated for macOS Ventura and Xcode 14.2 * Apple Silicon compatible * updated project to macOS 11+ * fixed most warnings and deprecations * replaced ShortcutRecorder Framework with MASShortcut package * general refactoring * updated Preferences window layout * replaced most static images with SF Symbols * moved remaining images to Assets catalogue * updated icon to user submitted icon 2ndalpha#203 * refreshed status menu icon * refreshed .hst icon * added support for restarting mDNSResponder via NSUserAppleScriptTask * updated .gitignore to ignore .DS_Store files * updated README to indicate support for macOS Big Sur and above
|
Here's all the assets I used/created: |
add framework searchpath to build settings to fix Sparkle build
|
Wow, it is a big PR. |
I tested it today – but my conclusion is, that its not "production ready" yet. I tried it first with the configured Target platform settings (
Functionality + GUI issues
—> below are some screenshots Xcode issuesBuild ErrorsNone Build WarningsApplicationController.m
HostsListView.m
HostsMainController.m
LoginItem.m
PrivilegedActions.m
Util.m
ScreenshotsApp GUIXcode |
Move host file storage to "~/Library/Application Support/Gas Mask"
Sort Local hosts when loading
|
Thank you @oliveratgithub for testing. I will try to review it all. |
|
merge this! |
|
Hi @2ndalpha |
|
@tlogik I can review and test PR-s. The changes would need to be as small as possible. |
Replace NSImage-based tab icons (loose PNGs and NSImage.preferencesGeneralName) with SF Symbols matching PR #220: gearshape, square.and.pencil, globe, command.square.fill, arrow.triangle.2.circlepath.
Replace the outdated photorealistic gas mask icon with the community-contributed Big Sur rounded-rectangle icon from issue #203. Icon assets are cherry-picked from PR #220 which bundled the icon update with many other changes. Changes: - Add AppIcon.appiconset to asset catalog with all size variants (16-1024px) - Add AboutIcon.imageset and menuIcon.imageset to asset catalog - Update hosts.icns document type icon and help page icon - Migrate from legacy CFBundleIconFile (.icns) to ASSETCATALOG_COMPILER_APPICON_NAME - Remove dead pre-10.10 code paths in Menulet.m (deployment target is macOS 13.0) - Delete legacy icon files (applicationIcon.icns, About Box Image.png, menuIcon TIFFs) Icon by @chrissy-dev, drawn from scratch with no licensing issues. Closes #203
* feat: replace app icon with Big Sur style design (#203) Replace the outdated photorealistic gas mask icon with the community-contributed Big Sur rounded-rectangle icon from issue #203. Icon assets are cherry-picked from PR #220 which bundled the icon update with many other changes. Changes: - Add AppIcon.appiconset to asset catalog with all size variants (16-1024px) - Add AboutIcon.imageset and menuIcon.imageset to asset catalog - Update hosts.icns document type icon and help page icon - Migrate from legacy CFBundleIconFile (.icns) to ASSETCATALOG_COMPILER_APPICON_NAME - Remove dead pre-10.10 code paths in Menulet.m (deployment target is macOS 13.0) - Delete legacy icon files (applicationIcon.icns, About Box Image.png, menuIcon TIFFs) Icon by @chrissy-dev, drawn from scratch with no licensing issues. Closes #203 * chore: remove redundant template call and unused 3x image assets - Remove redundant [icon setTemplate:YES] in Menulet.m since the asset catalog already declares template-rendering-intent - Remove unused 3x scale entries from AboutIcon and menuIcon imagesets (macOS only uses 1x and 2x) - Delete backing files icon_512x512.png and menuIcon@3x.png






