]> git.wincent.com - login-tool.git/log
login-tool.git
13 years agoAdd simple "Distribution" target master 2.0
Wincent Colaiuta [Wed, 24 Jun 2009 17:12:04 +0000 (19:12 +0200)] 
Add simple "Distribution" target

For the time being this just zips up the built executable.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoUpdate Xcode project references to buildtools configurations
Wincent Colaiuta [Wed, 24 Jun 2009 16:56:16 +0000 (18:56 +0200)] 
Update Xcode project references to buildtools configurations

Update the configuration references to account for the new location of
the buildtools as a submodule rather than a relative directory.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoAdd buildtools as a submodule
Wincent Colaiuta [Wed, 24 Jun 2009 16:52:48 +0000 (18:52 +0200)] 
Add buildtools as a submodule

For the same reasons as those which justify the conversion of WOPublic
to a submodule, pull in buildtools as a submodule as well.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoUpdate project references to WOPublic submodule
Wincent Colaiuta [Wed, 24 Jun 2009 16:26:53 +0000 (18:26 +0200)] 
Update project references to WOPublic submodule

Update Xcode project references to WOPublic items which were broken in
the change from a symlink to a Git submodule.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoReplace WOPublic symlink with a submodule
Wincent Colaiuta [Wed, 24 Jun 2009 16:14:27 +0000 (18:14 +0200)] 
Replace WOPublic symlink with a submodule

Given that login-tool is soon to be released as an open source product I
don't want possible future refactorings in WOPublic to break its
buildability.

Use a Git submodule to peg WOPublic to a specific commit inside the
login-tool root directory.

The cost is that in order to propagate WOPublic updates I'll have to
explicitly update the submodule, but the corresponding benefit is that
unexpected updates can never occur (and never break a previously working
build).

Another benefit is that developers can clone the login-tool superproject
and automatically pull down one of its dependencies without having to
worry about performing multiple clones and ensuring that the project
folders are in the correct relative locations.

In a future commit will look at making a similar change to the Wincent
Build Tools (currently referenced via relative path).

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoReplace (unwritted) man page with (empty) README
Wincent Colaiuta [Wed, 24 Jun 2009 15:52:46 +0000 (17:52 +0200)] 
Replace (unwritted) man page with (empty) README

I don't really have any intention of whipping up a man page for this
tool right now, so dump the old file which was never used anyway in
favour of a simple README (content forthcoming).

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoRemove stale comment
Wincent Colaiuta [Wed, 24 Jun 2009 15:48:46 +0000 (17:48 +0200)] 
Remove stale comment

This feature is already implemented, so remove stale "TODO".

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoAdd -v switch to show version information at runtime
Wincent Colaiuta [Wed, 24 Jun 2009 15:44:46 +0000 (17:44 +0200)] 
Add -v switch to show version information at runtime

Produces output similar to:

  login-tool
  Version: 2.0
  Build date: Wed Jun 24 17:26:50 +0200 2009
  Build number: e1306c5+
  Copyright 2004-2009 Wincent Colaiuta

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoUse "entity" instead of "var" in stringification macros
Wincent Colaiuta [Wed, 24 Jun 2009 15:38:13 +0000 (17:38 +0200)] 
Use "entity" instead of "var" in stringification macros

This is just for consistency with the corresponding macros in WOPublic.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoMake what(1) produce meaningful output
Wincent Colaiuta [Wed, 24 Jun 2009 15:37:35 +0000 (17:37 +0200)] 
Make what(1) produce meaningful output

It's useful to know what version of the tool is installed without even
having to run it.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoAdd login-tool_Version.h file and corresponding target
Wincent Colaiuta [Wed, 24 Jun 2009 15:28:45 +0000 (17:28 +0200)] 
Add login-tool_Version.h file and corresponding target

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoGit: ignore com.wincent.buildtools.gitrev.h
Wincent Colaiuta [Wed, 24 Jun 2009 15:27:46 +0000 (17:27 +0200)] 
Git: ignore com.wincent.buildtools.gitrev.h

This is a temporary file that can be recreated on demand, and it will
change often, so keep it out of the repository so as to minimize noise.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoRemove WOCommon symlink
Wincent Colaiuta [Mon, 22 Jun 2009 20:28:47 +0000 (22:28 +0200)] 
Remove WOCommon symlink

All the dependent code previously in WOCommon has now been moved to
WOPublic, so get rid of the symbolic link.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoAdd BSD license info
Wincent Colaiuta [Mon, 22 Jun 2009 20:28:06 +0000 (22:28 +0200)] 
Add BSD license info

Add headers to main.m and also create a separate LICENSE.txt file.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoUse "foundation tool" configuration in Release builds
Wincent Colaiuta [Mon, 22 Jun 2009 20:26:18 +0000 (22:26 +0200)] 
Use "foundation tool" configuration in Release builds

For some reason this was only being used in the Debug build, so use it
in Release builds as well.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoRemove references to NSDictionary creation category
Wincent Colaiuta [Mon, 22 Jun 2009 20:25:24 +0000 (22:25 +0200)] 
Remove references to NSDictionary creation category

This is not used by any other part of the codebase so can be removed.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoRemove unused SystemEvents header
Wincent Colaiuta [Mon, 22 Jun 2009 20:22:06 +0000 (22:22 +0200)] 
Remove unused SystemEvents header

This is a remnant from a previous iteration of development, when the
Scripting Bridge was used. With the move to the Launch Services API this
is no longer required.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoSynch with changes in WOCommon and WOPublic
Wincent Colaiuta [Mon, 22 Jun 2009 20:20:14 +0000 (22:20 +0200)] 
Synch with changes in WOCommon and WOPublic

This fixes all compilation errors caused by the changes in the WOCommon
and WOPublic dependencies.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoUpdate SystemEvents header on Mac OS X 10.5.7
Wincent Colaiuta [Mon, 22 Jun 2009 20:19:40 +0000 (22:19 +0200)] 
Update SystemEvents header on Mac OS X 10.5.7

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoAccept multiple add and remove arguments
Wincent Colaiuta [Mon, 10 Dec 2007 10:55:30 +0000 (11:55 +0100)] 
Accept multiple add and remove arguments

Remove the limitation on the number of add and remove arguments that
are accepted by the tool (previously only the last argument was used
and previous arguments were silently discarded).

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoSwitch to new Launch Services code in WOCommon
Wincent Colaiuta [Mon, 10 Dec 2007 10:42:58 +0000 (11:42 +0100)] 
Switch to new Launch Services code in WOCommon

This is basically a total rewrite of the tool, throwing out all the old
code and instead relying on the new code in WOCommon.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoUse WOLoginManager API from WOCommon
Wincent Colaiuta [Sun, 9 Dec 2007 17:39:58 +0000 (18:39 +0100)] 
Use WOLoginManager API from WOCommon

Apple has a new API for managing login items in Leopard, so
I'm writing an Object-Oriented wrapper for it and sticking it
inside WOCommon. This commit is the first of an incremental
transition to the WOCommon API; the first function to be
converted is for the "list" command.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoAdd alternate methods for adding login items
Wincent Colaiuta [Fri, 7 Dec 2007 15:52:04 +0000 (16:52 +0100)] 
Add alternate methods for adding login items

It appears that System Events is broken on Leopard: telling it to add a
new login item fails in all three ways that I tried to do so (using the
scripting bridge, using raw Apple Events, and even trying from the
Script Editor using the script that Apple itself documents as being the
way to do it).

So this commit preprocesses the non-working solutions away and falls
back to old-fashioned direct manipulation of the loginwindow.plist. This
actually is supported by Apple and is listed in their docs as one of the
ways of adding login items.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoWhitespace fixes
Wincent Colaiuta [Wed, 5 Dec 2007 13:23:02 +0000 (14:23 +0100)] 
Whitespace fixes

Blow away trailing whitespace and some bad indentation.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoLose unnecessary curly braces
Wincent Colaiuta [Wed, 5 Dec 2007 13:20:38 +0000 (14:20 +0100)] 
Lose unnecessary curly braces

For a readability improvement (less vertical real estate needed for
function).

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoUse scripting bridge for adding login items
Wincent Colaiuta [Wed, 5 Dec 2007 13:15:47 +0000 (14:15 +0100)] 
Use scripting bridge for adding login items

This appears to be a correct translation of the old code, and saves many
lines. It doesn't work, however, so further troubleshooting will be
required.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoUse delete method provided by scripting bridge
Wincent Colaiuta [Wed, 5 Dec 2007 12:23:29 +0000 (13:23 +0100)] 
Use delete method provided by scripting bridge

This is slightly nicer and more concise than calling "removeObject:".

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoTeach removal function to use Scripting Bridge
Wincent Colaiuta [Wed, 5 Dec 2007 12:00:51 +0000 (13:00 +0100)] 
Teach removal function to use Scripting Bridge

This cleans up the old code considerably.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoRefactoring for further Scripting Bridge use
Wincent Colaiuta [Wed, 5 Dec 2007 11:35:43 +0000 (12:35 +0100)] 
Refactoring for further Scripting Bridge use

Extract the initial set up of the scripting bridge into a separate
function for easier reuse.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoMore efficient property iteration
Wincent Colaiuta [Wed, 5 Dec 2007 11:23:53 +0000 (12:23 +0100)] 
More efficient property iteration

Rather than getting properties on each login item one by one (each
property requiring an Apple Event round-trip) use the "properties"
method in conjunction with the arrayByApplyingSelector: method to
slurp down all the properties in a single transaction.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoTeach login-tool to list info about configured login items
Wincent Colaiuta [Wed, 5 Dec 2007 11:09:28 +0000 (12:09 +0100)] 
Teach login-tool to list info about configured login items

As a way of testing the scripting bridge support, add this new,
independent feature.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoAdd System Events target and header
Wincent Colaiuta [Wed, 5 Dec 2007 10:56:52 +0000 (11:56 +0100)] 
Add System Events target and header

The target consists of a shell script that updates the scripting bridge
header for the System Events application. A copy of the header itself
(as generated on 10.5.1) is included with this commit.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoReturn EXIT_FAILURE for unrecognized or illegal options
Wincent Colaiuta [Wed, 5 Dec 2007 10:45:24 +0000 (11:45 +0100)] 
Return EXIT_FAILURE for unrecognized or illegal options

Previously we returned EXIT_SUCCESS regardless.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoTarget clean-up
Wincent Colaiuta [Wed, 5 Dec 2007 10:43:38 +0000 (11:43 +0100)] 
Target clean-up

Remove redundant phases from target (there are no headers to copy, no
resource manager actions required, and we don't want to install the
man page).

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoUse shared configuration from buildtools
Wincent Colaiuta [Wed, 5 Dec 2007 10:41:42 +0000 (11:41 +0100)] 
Use shared configuration from buildtools

Note that at the same time upgraded the project bundle format to the
latest version; this causes Xcode to create an "index" directory in
the source root, so I added a top-level .gitignore file at the same
time to ignore that.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoSwitch to GC
Wincent Colaiuta [Wed, 5 Dec 2007 10:34:53 +0000 (11:34 +0100)] 
Switch to GC

Switch to Objective-C 2.0 and Garbage Collection.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoModernization and clean-up
Wincent Colaiuta [Wed, 5 Dec 2007 10:15:02 +0000 (11:15 +0100)] 
Modernization and clean-up

Various clean-ups which don't alter the compiled code but improve the
source:

- change date format in header for consistency with other projects
- remove Subversion buzz
- update and normalize copyright
- rewrap to 132-columns for better readability
- improve alignment for better readability
- use C99 for loops
- whitespace fixes (trailing whitespace, missing newline at end of file)
- use EXIT_SUCCESS rather than 0

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoUpgrade Xcode project bundle
Wincent Colaiuta [Wed, 5 Dec 2007 10:06:51 +0000 (11:06 +0100)] 
Upgrade Xcode project bundle

For Xcode 3.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
15 years agoInitial import
Wincent Colaiuta [Wed, 5 Dec 2007 09:52:49 +0000 (10:52 +0100)] 
Initial import

Corresponding to revision 1 of the old Subversion repository.

Signed-off-by: Wincent Colaiuta <win@wincent.com>