Age | Commit message (Collapse) | Author |
|
Since this is intended to be template code upon which to build a full
application, I didn't like that the prior license required the full
license text to be reproduced in distributions.
I want the code to be a base for developers to use when starting a Cocoa
application, like the template code that's generated in a new Xcode
project. As such, I want people to be allowed to remove my license when
distributing the code.
|
|
Set a BSD-3-Clause license on all the application code so that it can be
freely used as a base template for an application.
Use the GNU GPLv3+ for the log script as it's a helper utility that
isn't compiled into the application.
|
|
Switch to a constant-stored application name from the Makefile-defined
one. This makes it easier to render the application name without
worrying about escaping differences between the Makefile and
Objective-C. But I still don't like it compared to what I had before.
|
|
This isn't working with the spaces handling. Not sure if I want to keep
going with this approach as it feels like spaces and escaping is going
to get hairy to deal with.
|
|
These are useful to have active to highlight easy to catch mistakes.
|
|
This target no longer really makes sense with the .app bundle build.
|
|
|
|
Previously I had changed the build rules to use the *.lproj directories,
but that doesn't copy the *.strings files when they change. Update the
targets so that the updated strings files do get copied into the .app
bundle.
|
|
* Remove some old commented targets
* Move the space-specific code to a single place
|
|
Add some conditionals to remove the targets that rename the bundle the
application name has spaces in it. This fixes the warnings and circular
dependency problems we had when building an application bundle with no
spaces where `APP_NAME` and `APP_NAME_NOSPACE` are the same.
The rules and organisation definitely need to be cleaned up, but the
idea works. We should eliminate one of these conditions and put all the
related rules together under a single `ifneq`.
|
|
It technically works, but with a lot of cruft:
$ make app
find: build/Nospace.app: No such file or directory
Makefile:52: warning: overriding commands for target `build/Nospace.app'
Makefile:40: warning: ignoring old commands for target `build/Nospace.app'
Makefile:62: warning: overriding commands for target `build/Nospace.app/Contents/MacOS/Nospace'
Makefile:44: warning: ignoring old commands for target `build/Nospace.app/Contents/MacOS/Nospace'
mkdir -p build/Nospace.app
mkdir -p build/Nospace.app/Contents
mkdir -p build/Nospace.app/Contents/MacOS
make: Circular build/Nospace.app/Contents/MacOS/Nospace <- build/Nospace.app/Contents/MacOS/Nospace dependency dropped.
cc \
-framework Cocoa \
-o "build/Nospace.app/Contents/MacOS/Nospace" \
src/MainMenu.o src/main.o src/AppDelegate.o
cp Info.plist "build/Nospace.app/Contents/Info.plist"
mkdir -p build/Nospace.app/Contents/Resources
cp -R Internationalization/en.lproj "build/Nospace.app/Contents/Resources/en.lproj"
cp -R Internationalization/fr.lproj "build/Nospace.app/Contents/Resources/fr.lproj"
I'd like to make it work without the warnings, or at least without the
circular dependency.
|
|
Now, `make app` doesn't error and says "Nothing to be done" when there
are no changes.
I adjusted the recipes to make the final bundle with spaces dependent on
all files in the no-space bundle.
Switch to `rsync` from `cp` so only the files that did change are
copied.
When updating the MacOS binary file, don't move it, otherwise that
triggers a recompile. Instead copy it to the with-spaces .app bundle. We
also need to remove the no-spaces version of the executable from the
with-spaces .app bundle.
Now I need to work out how to make all this work on application names
that don't have spaces in them.
|
|
Keep the temporary .app bundle with substituted spaces around and copy
the bundle directory so we don't end up rebuilding the executable file
when `make` is re-executed.
This does fail on `make` re-execution because the space-substituted
binary file was moved and no longer exists. Might have to think about
how to make that cleaner later.
The more pressing concern is that the final .app bundle with spaces in
it reports an error when I try to open it:
$ open build/Base\ Windowed\ Application.app
The application cannot be opened because its executable is missing.
Not sure what the problem is there yet.
|
|
This gets us the dependencies set up so they can use paths without
spaces, but creates a .app bundle with spaces as a final product.
It does so by moving the files where we substituted spaces with a
non-space character to file names with spaces.
I don't like this yet because `make app` builds a whole new binary and
everything else, but the resulting bundle is what we want.
|
|
Turns out my substitution wasn't working because I had used `ls` in the
`LPROJS` shell command, meaning there was no match to replace.
Fix the substitution and copy the whole directories to fix the problem.
|
|
Replace `APP_NAME` with the substituted `APP_NAME_NOSPACE`.
|
|
My idea is to use the no-space version of the app name in the Make
targets, and mv the files to the with-spaces version when everything is
built.
Decided to use the Unicode ZERO WIDTH NO-BREAK SPACE character U+FEFF as
the sentinel replacement character. We can always change it to something
else (like a string of unique characters) later if needed.
I took the Perl command from penguin359
(https://unix.stackexchange.com/users/6167/penguin359) on Stack
Exchange:
https://unix.stackexchange.com/questions/12273/in-bash-how-can-i-convert-a-unicode-codepoint-0-9a-f-into-a-printable-charact/12279#12279
|
|
I'm trying to set up the Make targets to build a .app bundle, but I'm
having trouble handling file names with spaces.
I sort of managed to do it using the strategy articulated by andrewdotn
(https://stackoverflow.com/users/14558/andrewdotn) with "${@}" in this
Stack Overflow answer:
https://stackoverflow.com/questions/14639906/can-gnu-make-handle-spaces/14640047#14640047
However, it doesn't seem to be working in the `subst` or `patsubst`
calls using "%" for the localisation files. I get the error:
make: *** No rule to make target `en.lproj', needed by `app'. Stop.
The error looks like it's saying that the
`build/$(APP_NAME).app/Contents/Resources/%.lproj` rule couldn't be
found, even though it is declared.
It looks like I'm going to have to explore other options to handle file
names, or at least application names, with spaces.
I copied the Info.plist file from Mass-menu and updated some fields to
work with this project. I also copied and modified the Make rules from
Mass-menu, but that project doesn't need to handle spaces in file names.
|
|
The `genstrings` command only outputs in UTF-16LE character encoding.
However, it's perfectly acceptable to use UTF-8 for a
Localizable.strings file. convert the output file to UTF-8.
|
|
|
|
Makes it cleaner and easier to ignore from revision control.
|
|
Create a simple windowed Cocoa application with an application menu and
a "Quit" menu item.
|