Skip to content

Commit

Permalink
Merge pull request #44 from Dirk-/master
Browse files Browse the repository at this point in the history
"Validates immediately" for ip address and hostname
  • Loading branch information
specialunderwear authored Sep 9, 2020
2 parents 3065997 + 4d77a9b commit 8548ab7
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 28 deletions.
14 changes: 11 additions & 3 deletions Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<connections>
<binding destination="572" name="value" keyPath="arrangedObjects.address" id="Smp-tC-3HS"/>
<binding destination="572" name="value" keyPath="arrangedObjects.address" id="8zC-SE-WcV">
<dictionary key="options">
<bool key="NSValidatesImmediately" value="YES"/>
</dictionary>
</binding>
<binding destination="715" name="enabled" keyPath="authenticated" id="aCp-mj-vJv"/>
</connections>
</tableColumn>
Expand All @@ -267,7 +271,11 @@
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<connections>
<binding destination="572" name="value" keyPath="arrangedObjects.hostnames" id="ow6-tU-bhH"/>
<binding destination="572" name="value" keyPath="arrangedObjects.hostnames" id="DkW-Oz-Ukx">
<dictionary key="options">
<bool key="NSValidatesImmediately" value="YES"/>
</dictionary>
</binding>
<binding destination="715" name="enabled" keyPath="authenticated" id="1F6-JH-GZI"/>
</connections>
</tableColumn>
Expand All @@ -280,7 +288,7 @@
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="QaE-Fa-w9m">
<rect key="frame" x="1" y="207" width="591" height="16"/>
<rect key="frame" x="1" y="196" width="581" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="FOT-ni-igH">
Expand Down
6 changes: 3 additions & 3 deletions BuildNotices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ Sign the pane:
codesign -v -f -s "Developer ID Application: Your Name (ABCDEFG1234)" Hosts.prefPane

Build Package (pane in folder "build"):
pkgbuild --root build --identifier "nl.your-domain.hosts" --version "1.4.3" --install-location "/Library/PreferencePanes" --sign "Developer ID Installer: Your Name (ABCDEFG1234)" Hosts-PrefPane-1.4.3.pkg
pkgbuild --root build --identifier "nl.your-domain.hosts" --version "1.4.4" --install-location "/Library/PreferencePanes" --sign "Developer ID Installer: Your Name (ABCDEFG1234)" Hosts-PrefPane-1.4.4.pkg

To certify the installer, you need your ProviderShortname. For this, you have to give altool its app-specific password:
xcrun altool --list-providers -u "[email protected]" -p "@keychain:Developer-altool"

Certify package:
xcrun altool --notarize-app --primary-bundle-id "nl.your-domain.hosts" --username "[email protected]" --password "@keychain:Developer-altool" --asc-provider "YourName123456" --file "Hosts-PrefPane-1.4.3.pkg"
xcrun altool --notarize-app --primary-bundle-id "nl.your-domain.hosts" --username "[email protected]" --password "@keychain:Developer-altool" --asc-provider "YourName123456" --file "Hosts-PrefPane-1.4.4.pkg"

Wait, check status:
xcrun altool --notarization-info "YourRequestUUID" --username "[email protected]" --password "@keychain:Developer-altool"

Staple notarization ticket to package for offline installation:
xcrun stapler staple Hosts-PrefPane-1.4.3.pkg
xcrun stapler staple Hosts-PrefPane-1.4.4.pkg


Issue with Check Box disabling:
Expand Down
2 changes: 0 additions & 2 deletions Hosts-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSRequiresAquaSystemAppearance</key>
<string>false</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
Expand Down
18 changes: 9 additions & 9 deletions Hosts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 8;
DEBUG_INFORMATION_FORMAT = dwarf;
DEPLOYMENT_POSTPROCESSING = NO;
DEVELOPMENT_TEAM = PZV4XW8XL7;
Expand All @@ -668,7 +668,7 @@
HEADER_SEARCH_PATHS = $SRCROOT;
INFOPLIST_FILE = "Hosts-Info.plist";
MACOSX_DEPLOYMENT_TARGET = 10.8;
MARKETING_VERSION = 1.4.3;
MARKETING_VERSION = 1.4.4;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "de.dirk-froehling.hosts";
PRODUCT_NAME = Hosts;
Expand All @@ -683,7 +683,7 @@
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 8;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEPLOYMENT_POSTPROCESSING = NO;
DEVELOPMENT_TEAM = PZV4XW8XL7;
Expand All @@ -693,7 +693,7 @@
HEADER_SEARCH_PATHS = $SRCROOT;
INFOPLIST_FILE = "Hosts-Info.plist";
MACOSX_DEPLOYMENT_TARGET = 10.8;
MARKETING_VERSION = 1.4.3;
MARKETING_VERSION = 1.4.4;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "de.dirk-froehling.hosts";
Expand Down Expand Up @@ -827,7 +827,7 @@
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 8;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = PZV4XW8XL7;
GCC_DYNAMIC_NO_PIC = NO;
Expand All @@ -845,7 +845,7 @@
INFOPLIST_FILE = "HostsPrefpane/HostsPrefpane-Info.plist";
INSTALL_PATH = "$(HOME)/Library/PreferencePanes";
MACOSX_DEPLOYMENT_TARGET = 10.8;
MARKETING_VERSION = 1.4.3;
MARKETING_VERSION = 1.4.4;
PRODUCT_BUNDLE_IDENTIFIER = "de.dirk-froehling.hosts";
PRODUCT_NAME = Hosts;
PROVISIONING_PROFILE = "";
Expand All @@ -861,9 +861,9 @@
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "Mac Developer";
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 8;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = W8E6G8GZYW;
DEVELOPMENT_TEAM = PZV4XW8XL7;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "HostsPrefpane/HostsPrefpane-Prefix.pch";
Expand All @@ -873,7 +873,7 @@
INFOPLIST_FILE = "HostsPrefpane/HostsPrefpane-Info.plist";
INSTALL_PATH = "$(HOME)/Library/PreferencePanes";
MACOSX_DEPLOYMENT_TARGET = 10.8;
MARKETING_VERSION = 1.4.3;
MARKETING_VERSION = 1.4.4;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "de.dirk-froehling.hosts";
PRODUCT_NAME = Hosts;
Expand Down
18 changes: 13 additions & 5 deletions HostsPrefpane/Base.lproj/HostsPrefpane.xib
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn width="52" minWidth="40" maxWidth="1000" id="PJ8-A3-VaR">
<tableColumn width="52.5" minWidth="40" maxWidth="1000" id="PJ8-A3-VaR">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Use">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -107,7 +107,7 @@
<binding destination="102" name="enabled" keyPath="authenticated" id="uyG-4I-zRZ"/>
</connections>
</tableColumn>
<tableColumn width="300.5" minWidth="40" maxWidth="1000" id="2cX-DG-ekV">
<tableColumn width="300" minWidth="40" maxWidth="1000" id="2cX-DG-ekV">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="IP Address">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -120,7 +120,11 @@
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<connections>
<binding destination="99" name="value" keyPath="arrangedObjects.address" id="LWj-EQ-T5L"/>
<binding destination="99" name="value" keyPath="arrangedObjects.address" id="soD-tL-BWc">
<dictionary key="options">
<bool key="NSValidatesImmediately" value="YES"/>
</dictionary>
</binding>
<binding destination="102" name="enabled" keyPath="authenticated" id="Zlb-m3-jvd"/>
</connections>
</tableColumn>
Expand All @@ -137,7 +141,11 @@
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<connections>
<binding destination="99" name="value" keyPath="arrangedObjects.hostnames" id="BWN-AI-Ova"/>
<binding destination="99" name="value" keyPath="arrangedObjects.hostnames" id="hFJ-nX-1fq">
<dictionary key="options">
<bool key="NSValidatesImmediately" value="YES"/>
</dictionary>
</binding>
<binding destination="102" name="enabled" keyPath="authenticated" id="BEe-06-4bW"/>
</connections>
</tableColumn>
Expand All @@ -150,7 +158,7 @@
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="k4L-0E-amu">
<rect key="frame" x="1" y="354" width="591" height="15"/>
<rect key="frame" x="1" y="336" width="581" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="kyz-xf-jqH">
Expand Down
2 changes: 0 additions & 2 deletions HostsPrefpane/HostsPrefpane-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSRequiresAquaSystemAppearance</key>
<string>false</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
Expand Down
6 changes: 2 additions & 4 deletions README.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@ called *hosts.orig* and each session a backup is made called *hosts.session*.
The default host entries that are needed by the OS are hidden and can not be
edited using Hosts.prefpane.

Much thanks to the [contributors](https://github.com/specialunderwear/Hosts.prefpane/graphs/contributors)
Many thanks to the [contributors](https://github.com/specialunderwear/Hosts.prefpane/graphs/contributors)
for helping getting the latest release done!

![](https://github.com/specialunderwear/Hosts.prefpane/raw/master/screenshots/locked.png)
![](https://github.com/specialunderwear/Hosts.prefpane/raw/master/screenshots/edit.png)

## Download
For now you'll find the latest pre-built preference pane and the app on [Dirk-'s website](https://www.dirk-froehling.de/downloads/downloads.html). ``Hosts App 1.4.3.zip`` includes the app which can be used from any location on your disk. ``Hosts PrefPane 1.4.3.pkg`` is an installer for the preference pane. It will get installed into ``/Library/PreferencePanes``, so you have to enter your admin credentials during installation. The installer is neccessary for macOS Catalina, since all executables have to be notarized, and you cannot notarize a preference pane.

Download the 1.4.1 release from here: https://permanentmarkers.nl/hosts-1.4.1.zip
For now you'll find the latest pre-built preference pane and the app on [Dirk-'s website](https://www.dirk-froehling.de/downloads/downloads.html). ``Hosts App 1.4.4.zip`` includes the app which can be used from any location on your disk. ``Hosts PrefPane 1.4.4.pkg`` is an installer for the preference pane. It will get installed into ``/Library/PreferencePanes``, so you have to enter your admin credentials during installation. The installer is neccessary for macOS Catalina, since all executables have to be notarized, and you cannot notarize a preference pane.

## Development hints
### Compiling the parser
Expand Down

0 comments on commit 8548ab7

Please sign in to comment.