<feed xmlns='http://www.w3.org/2005/Atom'>
<title>DomeKey/DomeKey.xcodeproj, branch master</title>
<subtitle>Control your computer with a pair of headphones</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/DomeKey/'/>
<entry>
<title>Add file size optimisations to Release build</title>
<updated>2018-11-06T05:00:11+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-11-06T05:00:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/DomeKey/commit/?id=e9b638521e7c450e4947090d3672aab852c8e758'/>
<id>e9b638521e7c450e4947090d3672aab852c8e758</id>
<content type='text'>
* Remove `dome-key-map/target/debug` from Release library search paths.
  This was causing the Release build to link against the debug version
  of dome-key-map, resulting in a 25 Mb binary.
* Strip debug symbols
* Turn on link-time optimisation

This takes the Release binary down to 1.5 Mb.

Added an `archive` target to the Makefile. This does additional
optimisations (maybe stripping symbols?), and gives us a final binary
size of 1.1 Mb. Much better.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Remove `dome-key-map/target/debug` from Release library search paths.
  This was causing the Release build to link against the debug version
  of dome-key-map, resulting in a 25 Mb binary.
* Strip debug symbols
* Turn on link-time optimisation

This takes the Release binary down to 1.5 Mb.

Added an `archive` target to the Makefile. This does additional
optimisations (maybe stripping symbols?), and gives us a final binary
size of 1.1 Mb. Much better.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove lib/char_to_key_code.*</title>
<updated>2018-11-05T03:47:47+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-11-05T03:47:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/DomeKey/commit/?id=2c4c9e9e750cfe8c78fc15e07a405cfeef46d5c8'/>
<id>2c4c9e9e750cfe8c78fc15e07a405cfeef46d5c8</id>
<content type='text'>
We don't need these functions any more now that key simulation is
handled by the Rust library. The files can be safely removed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't need these functions any more now that key simulation is
handled by the Rust library. The files can be safely removed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile: Use project-local build directory</title>
<updated>2018-11-05T00:19:55+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-11-05T00:19:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/DomeKey/commit/?id=c64bbfd6eb6c4485076265c8be3c28ff3c18fdab'/>
<id>c64bbfd6eb6c4485076265c8be3c28ff3c18fdab</id>
<content type='text'>
Set 'DerivedData' path in `xcodebuild` to give us a local build
directory.

Doing this because when the 'Debug', or 'Release' directories in
'Build/Products/' don't exist, Make doesn't build our recipes. Make
seems to prefer local files, and I don't imagine the wildcard in the
path does us any favours.

When I changed the DerivedData path, I ended up with this error:

    In file included from DomeKey/DomeKey/HeadphoneKey.m:9:
    DomeKey/DomeKey/HeadphoneKey.h:10:9: fatal error:
          'DDHidLib/DDHidAppleMikey.h' file not found
    #import &lt;DDHidLib/DDHidAppleMikey.h&gt;
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Couldn't figure out what the problem was, and what changed there when I
changed the DerivedData directory. So I just fixed it in the only way I
could think of: adding the DDHidLib 'lib' directory to
`HEADER_SEARCH_PATHS` and updating the `#import` to point to the new
location.

We also create a release target in this commit, which gives us a release
build of the program.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Set 'DerivedData' path in `xcodebuild` to give us a local build
directory.

Doing this because when the 'Debug', or 'Release' directories in
'Build/Products/' don't exist, Make doesn't build our recipes. Make
seems to prefer local files, and I don't imagine the wildcard in the
path does us any favours.

When I changed the DerivedData path, I ended up with this error:

    In file included from DomeKey/DomeKey/HeadphoneKey.m:9:
    DomeKey/DomeKey/HeadphoneKey.h:10:9: fatal error:
          'DDHidLib/DDHidAppleMikey.h' file not found
    #import &lt;DDHidLib/DDHidAppleMikey.h&gt;
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Couldn't figure out what the problem was, and what changed there when I
changed the DerivedData directory. So I just fixed it in the only way I
could think of: adding the DDHidLib 'lib' directory to
`HEADER_SEARCH_PATHS` and updating the `#import` to point to the new
location.

We also create a release target in this commit, which gives us a release
build of the program.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add `teprintf()` function</title>
<updated>2018-11-04T14:16:28+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-11-04T14:16:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/DomeKey/commit/?id=51509e3b212d6aeae8c946beb454e0ed74e048c7'/>
<id>51509e3b212d6aeae8c946beb454e0ed74e048c7</id>
<content type='text'>
A new function to print to stderr prefixed with a timestamp. The idea is
to make the printed line's format match the Rust logger's.

The Rust logger prints timestamps like this:

    2018-11-04T03:16:31.938+01:00

`teprintf` does:

    2018-11-04T15:02:21+0100

Unfortunately, I wasn't able to reproduce it exactly. It's missing the
milliseconds because I didn't want to deal with using `gettimeofday`,
and the time zone format isn't right because I didn't know how to format
it easily with a colon.

Resources:
Getting the time in C:
https://stackoverflow.com/questions/9596945/how-to-get-appropriate-timestamp-in-c-for-logs#9596994

Variadic functions in C:
https://stackoverflow.com/questions/205529/passing-variable-number-of-arguments-around

Getting milliseconds in C:
https://stackoverflow.com/questions/10192903/time-in-milliseconds#10192994
https://stackoverflow.com/questions/3673226/how-to-print-time-in-format-2009-08-10-181754-811
https://stackoverflow.com/questions/361363/how-to-measure-time-in-milliseconds-using-ansi-c

Concatenating strings in C:
https://stackoverflow.com/questions/308695/how-do-i-concatenate-const-literal-strings-in-c#308712
https://stackoverflow.com/questions/8465006/how-do-i-concatenate-two-strings-in-c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A new function to print to stderr prefixed with a timestamp. The idea is
to make the printed line's format match the Rust logger's.

The Rust logger prints timestamps like this:

    2018-11-04T03:16:31.938+01:00

`teprintf` does:

    2018-11-04T15:02:21+0100

Unfortunately, I wasn't able to reproduce it exactly. It's missing the
milliseconds because I didn't want to deal with using `gettimeofday`,
and the time zone format isn't right because I didn't know how to format
it easily with a colon.

Resources:
Getting the time in C:
https://stackoverflow.com/questions/9596945/how-to-get-appropriate-timestamp-in-c-for-logs#9596994

Variadic functions in C:
https://stackoverflow.com/questions/205529/passing-variable-number-of-arguments-around

Getting milliseconds in C:
https://stackoverflow.com/questions/10192903/time-in-milliseconds#10192994
https://stackoverflow.com/questions/3673226/how-to-print-time-in-format-2009-08-10-181754-811
https://stackoverflow.com/questions/361363/how-to-measure-time-in-milliseconds-using-ansi-c

Concatenating strings in C:
https://stackoverflow.com/questions/308695/how-do-i-concatenate-const-literal-strings-in-c#308712
https://stackoverflow.com/questions/8465006/how-do-i-concatenate-two-strings-in-c
</pre>
</div>
</content>
</entry>
<entry>
<title>Add `Sounds` class</title>
<updated>2018-10-29T17:45:02+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-10-29T17:45:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/DomeKey/commit/?id=399079234f7f029da9d4acad2bc38d85a4f28e1e'/>
<id>399079234f7f029da9d4acad2bc38d85a4f28e1e</id>
<content type='text'>
This will be used to play the mode activated &amp; deactivated sounds via
`NSSound` (hopefully).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will be used to play the mode activated &amp; deactivated sounds via
`NSSound` (hopefully).
</pre>
</div>
</content>
</entry>
<entry>
<title>Delete `KeyboardSimulator`</title>
<updated>2018-10-27T03:56:41+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-10-27T03:54:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/DomeKey/commit/?id=0155afd054d41b21f15c7048002ea99382360d81'/>
<id>0155afd054d41b21f15c7048002ea99382360d81</id>
<content type='text'>
We're no longer using this code. Keyboard simulation has been moved
since a long while ago to the Rust library using the 'autopilot'
library.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We're no longer using this code. Keyboard simulation has been moved
since a long while ago to the Rust library using the 'autopilot'
library.
</pre>
</div>
</content>
</entry>
<entry>
<title>Delete `DKApplication`</title>
<updated>2018-10-27T03:48:17+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-10-27T03:48:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/DomeKey/commit/?id=90e478bc477edd1b4f871f72ed29d4d1ae4a690b'/>
<id>90e478bc477edd1b4f871f72ed29d4d1ae4a690b</id>
<content type='text'>
This was a test to see if we could get Bluetooth headphone events using
media key events. I wasn't successful. Get rid of the code now that it
isn't being used.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was a test to see if we could get Bluetooth headphone events using
media key events. I wasn't successful. Get rid of the code now that it
isn't being used.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add an `XDG` class</title>
<updated>2018-10-24T05:34:54+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-10-24T05:34:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/DomeKey/commit/?id=40425fa0d211e879f93a282472b5a90906d9668f'/>
<id>40425fa0d211e879f93a282472b5a90906d9668f</id>
<content type='text'>
For interacting with XDG directories.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For interacting with XDG directories.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add `LicenseHandler`</title>
<updated>2018-10-24T01:26:27+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-10-24T01:26:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/DomeKey/commit/?id=03c06d9ab75ce794b30a75c7a6314ff8371f4b68'/>
<id>03c06d9ab75ce794b30a75c7a6314ff8371f4b68</id>
<content type='text'>
This class will encapsulate all license and trial handling.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This class will encapsulate all license and trial handling.
</pre>
</div>
</content>
</entry>
<entry>
<title>DomeKey.xcodeproj: Change deployment target to 10.7</title>
<updated>2018-10-24T00:18:38+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-10-24T00:18:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/DomeKey/commit/?id=0a423aa344c5e099efba3387c0ec7f50a4411f8c'/>
<id>0a423aa344c5e099efba3387c0ec7f50a4411f8c</id>
<content type='text'>
Turns out the build had failed previously because the linked Rust
library expects 10.7. Change the deployment target to match and now it
works.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Turns out the build had failed previously because the linked Rust
library expects 10.7. Change the deployment target to match and now it
works.
</pre>
</div>
</content>
</entry>
</feed>
