<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Re-Good-Catalina-Invert-Colours/Makefile, branch v0.0.1</title>
<subtitle>Fix "Invert Display Colour" on Mac OS X Catalina</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Re-Good-Catalina-Invert-Colours/'/>
<entry>
<title>Makefile: Add rules to build a distribution tarball</title>
<updated>2021-03-07T17:24:12+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-03-07T17:24:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Re-Good-Catalina-Invert-Colours/commit/?id=8f09695671d5678262a9a778ca64db21ac9620ed'/>
<id>8f09695671d5678262a9a778ca64db21ac9620ed</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add license (GNU GPLv3+)</title>
<updated>2021-03-07T15:26:59+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-03-07T15:26:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Re-Good-Catalina-Invert-Colours/commit/?id=4a60b69cefa5d9053dc33f667ad908a68590a54c'/>
<id>4a60b69cefa5d9053dc33f667ad908a68590a54c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile: Add a `clean` target</title>
<updated>2021-03-07T15:01:12+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-03-07T15:01:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Re-Good-Catalina-Invert-Colours/commit/?id=60f881910ff9f19f73283ae2e1c01b8dd851bfe4'/>
<id>60f881910ff9f19f73283ae2e1c01b8dd851bfe4</id>
<content type='text'>
Give us a way to remove all build files.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Give us a way to remove all build files.
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile: Annotate `all` target as phony</title>
<updated>2021-03-07T15:00:29+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-03-07T14:57:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Re-Good-Catalina-Invert-Colours/commit/?id=6f7678106abc7deccc5f7d01c40b000a19e31aeb'/>
<id>6f7678106abc7deccc5f7d01c40b000a19e31aeb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile: Finalise the executable name</title>
<updated>2021-03-07T15:00:29+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-03-07T14:55:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Re-Good-Catalina-Invert-Colours/commit/?id=6c1f9f85b4428e8c64a006ab65333db094348562'/>
<id>6c1f9f85b4428e8c64a006ab65333db094348562</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile: Create build directories</title>
<updated>2021-03-07T14:59:57+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-03-07T14:52:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Re-Good-Catalina-Invert-Colours/commit/?id=9039f04a51180e21791fd061acee89d5f1e507d6'/>
<id>9039f04a51180e21791fd061acee89d5f1e507d6</id>
<content type='text'>
Ensure the build directories are available when building.

Read up on techniques for creating directories in prerequisites here:
https://www.cmcrossroads.com/article/making-directories-gnu-make
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure the build directories are available when building.

Read up on techniques for creating directories in prerequisites here:
https://www.cmcrossroads.com/article/making-directories-gnu-make
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile: Fix link error for `UCKeyTranslate`</title>
<updated>2021-03-07T14:21:42+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-03-07T14:21:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Re-Good-Catalina-Invert-Colours/commit/?id=0f38b2e3925b5d8f8e314db8c68ebbeb272423a5'/>
<id>0f38b2e3925b5d8f8e314db8c68ebbeb272423a5</id>
<content type='text'>
The linker complained about `_UCKeyTranslate` being undefined. It's used
by DDHotKey, and is defined in `CoreServices.framework`, so we need to
link CoreServices.

Here's the error I was getting:

    clang -x objective-c \
        -mmacosx-version-min=10.7 \
        -framework Carbon \
        -framework Cocoa \
        -framework CoreGraphics \
        -framework Foundation \
        -fno-objc-arc \
        -I./build/include \
        -L./build \
        -lddhotkey \
        -o invert-catalina-invert \
        Invert.h Invert.m main.m
    Undefined symbols for architecture x86_64:
      "_UCKeyTranslate", referenced from:
          _DDStringFromKeyCode in libddhotkey.a(DDHotKeyUtilities.o)
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The linker complained about `_UCKeyTranslate` being undefined. It's used
by DDHotKey, and is defined in `CoreServices.framework`, so we need to
link CoreServices.

Here's the error I was getting:

    clang -x objective-c \
        -mmacosx-version-min=10.7 \
        -framework Carbon \
        -framework Cocoa \
        -framework CoreGraphics \
        -framework Foundation \
        -fno-objc-arc \
        -I./build/include \
        -L./build \
        -lddhotkey \
        -o invert-catalina-invert \
        Invert.h Invert.m main.m
    Undefined symbols for architecture x86_64:
      "_UCKeyTranslate", referenced from:
          _DDStringFromKeyCode in libddhotkey.a(DDHotKeyUtilities.o)
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile: Set minimum Mac OS X version to 10.7</title>
<updated>2021-03-07T14:17:56+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-03-07T14:17:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Re-Good-Catalina-Invert-Colours/commit/?id=a0ec0a479163122ba4facef38b8b527229a1b8ca'/>
<id>a0ec0a479163122ba4facef38b8b527229a1b8ca</id>
<content type='text'>
Build for as early a Mac OS X version as we can. Can't build for 10.5
because only 10.6+ supports ARC. Can't build for 10.6 because DDHotKey
requires weak references, and these are only supported starting in 10.7:
https://en.wikipedia.org/w/index.php?title=Weak_reference&amp;oldid=1000364515#Objective-C_2.0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Build for as early a Mac OS X version as we can. Can't build for 10.5
because only 10.6+ supports ARC. Can't build for 10.6 because DDHotKey
requires weak references, and these are only supported starting in 10.7:
https://en.wikipedia.org/w/index.php?title=Weak_reference&amp;oldid=1000364515#Objective-C_2.0
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile: Don't copy DDHotKey headers multiple times</title>
<updated>2021-03-07T14:14:11+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-03-07T14:14:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Re-Good-Catalina-Invert-Colours/commit/?id=e1cdd8cbde46d8610e05d9a79c3e90b7f2a75c0a'/>
<id>e1cdd8cbde46d8610e05d9a79c3e90b7f2a75c0a</id>
<content type='text'>
Previously, the rule was copying all header files for every header file:

    cp lib/DDHotKey/Compatibility.h lib/DDHotKey/DDHotKeyAppDelegate.h lib/DDHotKey/DDHotKeyCenter.h lib/DDHotKey/DDHotKeyTextField.h lib/DDHotKey/DDHotKeyUtilities.h build/include/
    cp lib/DDHotKey/Compatibility.h lib/DDHotKey/DDHotKeyAppDelegate.h lib/DDHotKey/DDHotKeyCenter.h lib/DDHotKey/DDHotKeyTextField.h lib/DDHotKey/DDHotKeyUtilities.h build/include/
    cp lib/DDHotKey/Compatibility.h lib/DDHotKey/DDHotKeyAppDelegate.h lib/DDHotKey/DDHotKeyCenter.h lib/DDHotKey/DDHotKeyTextField.h lib/DDHotKey/DDHotKeyUtilities.h build/include/
    cp lib/DDHotKey/Compatibility.h lib/DDHotKey/DDHotKeyAppDelegate.h lib/DDHotKey/DDHotKeyCenter.h lib/DDHotKey/DDHotKeyTextField.h lib/DDHotKey/DDHotKeyUtilities.h build/include/
    cp lib/DDHotKey/Compatibility.h lib/DDHotKey/DDHotKeyAppDelegate.h lib/DDHotKey/DDHotKeyCenter.h lib/DDHotKey/DDHotKeyTextField.h lib/DDHotKey/DDHotKeyUtilities.h build/include/

Change it to only copy once per header:

    cp lib/DDHotKey/Compatibility.h build/include/
    cp lib/DDHotKey/DDHotKeyAppDelegate.h build/include/
    cp lib/DDHotKey/DDHotKeyCenter.h build/include/
    cp lib/DDHotKey/DDHotKeyTextField.h build/include/
    cp lib/DDHotKey/DDHotKeyUtilities.h build/include/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the rule was copying all header files for every header file:

    cp lib/DDHotKey/Compatibility.h lib/DDHotKey/DDHotKeyAppDelegate.h lib/DDHotKey/DDHotKeyCenter.h lib/DDHotKey/DDHotKeyTextField.h lib/DDHotKey/DDHotKeyUtilities.h build/include/
    cp lib/DDHotKey/Compatibility.h lib/DDHotKey/DDHotKeyAppDelegate.h lib/DDHotKey/DDHotKeyCenter.h lib/DDHotKey/DDHotKeyTextField.h lib/DDHotKey/DDHotKeyUtilities.h build/include/
    cp lib/DDHotKey/Compatibility.h lib/DDHotKey/DDHotKeyAppDelegate.h lib/DDHotKey/DDHotKeyCenter.h lib/DDHotKey/DDHotKeyTextField.h lib/DDHotKey/DDHotKeyUtilities.h build/include/
    cp lib/DDHotKey/Compatibility.h lib/DDHotKey/DDHotKeyAppDelegate.h lib/DDHotKey/DDHotKeyCenter.h lib/DDHotKey/DDHotKeyTextField.h lib/DDHotKey/DDHotKeyUtilities.h build/include/
    cp lib/DDHotKey/Compatibility.h lib/DDHotKey/DDHotKeyAppDelegate.h lib/DDHotKey/DDHotKeyCenter.h lib/DDHotKey/DDHotKeyTextField.h lib/DDHotKey/DDHotKeyUtilities.h build/include/

Change it to only copy once per header:

    cp lib/DDHotKey/Compatibility.h build/include/
    cp lib/DDHotKey/DDHotKeyAppDelegate.h build/include/
    cp lib/DDHotKey/DDHotKeyCenter.h build/include/
    cp lib/DDHotKey/DDHotKeyTextField.h build/include/
    cp lib/DDHotKey/DDHotKeyUtilities.h build/include/
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile: Stop suppressing warnings when compiling `DDHotKey`</title>
<updated>2021-03-07T13:56:32+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-03-07T13:56:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Re-Good-Catalina-Invert-Colours/commit/?id=5644398e848cb593de95095dbbafb80025fcaa6b'/>
<id>5644398e848cb593de95095dbbafb80025fcaa6b</id>
<content type='text'>
Fixed the warnings in a fork.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed the warnings in a fork.
</pre>
</div>
</content>
</entry>
</feed>
