-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #7: Tim Cook sucks and Apple sucks and macOS sucks and Macs su…
…ck and Catalina was a nice island until Apple decided to use the name for their latest piece of crap
- Loading branch information
Showing
4 changed files
with
98 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleExecutable</key> | ||
<string>onyx-inst</string> | ||
<key>CFBundleGetInfoString</key> | ||
<string>OverbiteNX Onyx for macOS</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.floodgap.onyx</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>en</string> | ||
<key>CFBundleExecutable</key> | ||
<string>onyx-inst</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.floodgap.onyx</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>Onyx</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>0.9.2.0</string> | ||
<key>CFBundleVersion</key> | ||
<string>902.0.0</string> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>10.9</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>0.9.2.1</string> | ||
<key>CFBundleVersion</key> | ||
<string>902.1.0</string> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>10.9</string> | ||
<key>LSUIElement</key> | ||
<false/> | ||
<key>NSAppTransportSecurity</key> | ||
<dict> | ||
<key>NSAllowsArbitraryLoads</key> | ||
<true/> | ||
</dict> | ||
<key>NSHumanReadableCopyright</key> | ||
<string>© 2019 Cameron Kaiser</string> | ||
<key>NSMainNibFile</key> | ||
<string>MainMenu</string> | ||
<key>NSPrincipalClass</key> | ||
<string>NSApplication</string> | ||
</dict> | ||
</plist> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,54 @@ | ||
CP=/bin/cp | ||
MV=/bin/mv | ||
RM=/bin/rm | ||
MKDIR=/bin/mkdir | ||
DITTO=/usr/bin/ditto | ||
PLUTIL=/usr/bin/plutil | ||
HDIUTIL=/usr/bin/hdiutil | ||
WHEREDIR=mac | ||
WHERE=$(WHEREDIR)/Onyx.app/Contents | ||
PLATYPUS=/usr/local/bin/platypus | ||
|
||
WHERE=mac | ||
APP=$(WHERE)/Onyx.app | ||
APPCON=$(APP)/Contents | ||
APPOBJ=$(APPCON)/MacOS | ||
|
||
.PHONY: default clean | ||
|
||
# This Makefile requires Makefile.generic to have already run, since it | ||
# just packages that binary. | ||
|
||
Onyx.dmg: onyx clean | ||
$(MKDIR) -p $(WHERE)/MacOS | ||
$(CP) Info.plist $(WHERE) | ||
$(CP) mac-onyx-inst $(WHERE)/MacOS/onyx-inst | ||
$(CP) onyx $(WHERE)/MacOS | ||
$(DITTO) "Mac Read Me.rtf" $(WHEREDIR) | ||
$(MKDIR) -p $(WHERE) | ||
$(PLATYPUS) -a Onyx \ | ||
-I com.floodgap.onyx \ | ||
-i '' \ | ||
-c mac-onyx-inst \ | ||
-o "Progress Bar" \ | ||
-p /bin/sh \ | ||
-V 0.9.2.1 \ | ||
-u "Cameron Kaiser" \ | ||
-y $(APP) | ||
# | ||
# Manually fix the bundle so that everything is in the same | ||
# places as prior versions for backwards compatibility. This means | ||
# using a custom Info.plist and moving a few things around. | ||
# | ||
$(MV) $(APPOBJ)/Onyx $(APPOBJ)/onyx-inst | ||
$(DITTO) Info.plist $(APPCON) | ||
$(PLUTIL) -convert binary1 $(APPCON)/Info.plist | ||
$(DITTO) onyx $(APP)/Contents/MacOS | ||
# | ||
# Build disk image. | ||
# | ||
$(DITTO) "Mac Read Me.rtf" $(WHERE) | ||
$(HDIUTIL) create -sectors 6000 \ | ||
-fs HFS+ -fsargs "-c c=64,a=16,e=16" \ | ||
-volname "Overbite Onyx for macOS" \ | ||
-srcfolder $(WHEREDIR) \ | ||
-srcfolder $(WHERE) \ | ||
-format UDBZ \ | ||
Onyx.dmg | ||
|
||
onyx: | ||
$(MAKE) -f Makefile.generic | ||
|
||
clean: | ||
$(RM) -rf mac Onyx.dmg | ||
$(RM) -rf $(WHERE) Onyx.dmg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,36 @@ | ||
#!/usr/bin/perl | ||
#!/bin/sh | ||
|
||
# Copyright 2018 Cameron Kaiser. | ||
# Copyright 2019 Cameron Kaiser. | ||
# All rights reserved. | ||
# | ||
# This script was originally written in Perl, but now is written in sh to | ||
# prepare for the new sucky world of Catalina where scripting languages | ||
# are deprecated and Tim Cook smiles his mysterious venomous smile. In | ||
# particular, prepare for zsh instead of bash actually being /bin/sh. | ||
if [ -n "$ZSH_VERSION" ]; then emulate -L ksh; fi | ||
|
||
$JSON_DIR = "$ENV{'HOME'}/Library/Application Support/Mozilla/NativeMessagingHosts"; | ||
JSON_DIR="$HOME/Library/Application Support/Mozilla/NativeMessagingHosts" | ||
echo "Onyx Installer Tool (C)2019 Cameron Kaiser" | ||
echo "Installing to: $JSON_DIR" | ||
echo " " | ||
|
||
if (! -x "/Applications/Onyx.app/Contents/MacOS/onyx") { | ||
&dialog("Onyx.app must be in /Applications."); | ||
} | ||
if (-e "${JSON_DIR}/onyx.json") { | ||
&dialog("Onyx appears to be already installed for this user."); | ||
} | ||
if [ ! -x "/Applications/Onyx.app/Contents/MacOS/onyx" ]; then | ||
echo "Onyx.app must be in /Applications." | ||
exit 255 | ||
fi | ||
if [ -e "$JSON_DIR/onyx.json" ]; then | ||
echo "Onyx appears to be already installed for this user." | ||
exit 254 | ||
fi | ||
|
||
system("/bin/mkdir", "-p", $JSON_DIR); | ||
if (open(K, ">", "${JSON_DIR}/onyx.json")) { | ||
print K <<'EOF'; | ||
echo "Creating destination directory." | ||
/bin/mkdir -p "$JSON_DIR" | ||
if [ ! -d "$JSON_DIR" ]; then | ||
echo "Unable to create Onyx connection file." | ||
exit 253 | ||
fi | ||
echo "Creating connector file." | ||
cat <<EOF >"$JSON_DIR/onyx.json" | ||
{ | ||
"name": "onyx", | ||
"description": "OverbiteNX Gopher system component", | ||
|
@@ -23,19 +39,11 @@ if (open(K, ">", "${JSON_DIR}/onyx.json")) { | |
"allowed_extensions": [ "[email protected]" ] | ||
} | ||
EOF | ||
close(K); | ||
&dialog("Onyx was successfully installed for this user."); | ||
} else { | ||
&dialog("Onyx was unable to install: $!\n"); | ||
} | ||
|
||
sub dialog { | ||
exec("/usr/bin/osascript", "-e", <<"EOF"); | ||
if [ -e "$JSON_DIR/onyx.json" ]; then | ||
echo "Onyx was successfully installed for this user." | ||
exit 0 | ||
fi | ||
|
||
tell application "SystemUIServer" | ||
activate | ||
display dialog "@_" buttons ("OK") default button "OK" | ||
end tell | ||
EOF | ||
|
||
} | ||
echo "Onyx was unable to install its connector to Firefox." | ||
exit 128 |