Ignore:
Timestamp:
03/17/03 09:56:42 (18 years ago)
Author:
Nicholas Riley
Message:

svn:ignore: added .DS_Store, not used for command-line apps.

README: Fixed install instructions, updated for 1.0b2.

VERSION: Updated for 1.0b2.

main.c: Updated copyright statement. Updated for 1.0b2. Provided
better explanation of error 1001. Added version information to -l,
partially descended from ICeCoffEE 1.3.

Location:
trunk/launch
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/launch

    • Property svn:ignore
      •  

        old new  
        33openUp
        44launch-*
         5.DS_Store
  • trunk/launch/launch/main.c

    r52 r127  
    33 Nicholas Riley <launchsw@sabi.net>
    44
    5  Copyright (c) 2002, Nicholas Riley
     5 Copyright (c) 2001-03, Nicholas Riley
    66 All rights reserved.
    77
     
    5656const char *APP_NAME;
    5757
    58 #define VERSION "1.0b1"
     58#define VERSION "1.0b2"
    5959
    6060#define STRBUF_LEN 1024
     
    101101    // Misc. errors
    102102    { procNotFound, "unable to connect to system service.\nAre you logged in?" },
    103     { 1001, "SystemConfiguration nonspecific failure.\nAre you logged in?" },
     103    { kCGErrorIllegalArgument, "window server error.\nAre you logged in?" },
    104104    { fnfErr, "file not found" },
    105105    { 0, NULL }
     
    131131        "'document' may be a file, folder, or disk - whatever the application can open.\n"
    132132        "'item' may be a file, folder, disk, or URL.\n\n");
    133     fprintf(stderr, "launch "VERSION" (c) 2001-02 Nicholas Riley <http://web.sabi.net/nriley/software/>.\n"
     133    fprintf(stderr, "launch "VERSION" (c) 2001-03 Nicholas Riley <http://web.sabi.net/nriley/software/>.\n"
    134134                    "Please send bugs, suggestions, etc. to <launchsw@sabi.net>.\n");
    135135
     
    678678                    printf("\tbundle ID: %s\n", tmpBuffer);
    679679                }
     680                // prefer a short version string, e.g. "1.0 Beta" instead of "51" for Safari
     681                CFStringRef appVersion = CFBundleGetValueForInfoDictionaryKey(bundle, CFSTR("CFBundleShortVersionString"));
     682                if (appVersion == NULL)
     683                    appVersion = CFBundleGetValueForInfoDictionaryKey(bundle, kCFBundleVersionKey);
     684                if (appVersion != NULL) {
     685                    UInt32 intVersion = CFBundleGetVersionNumber(bundle);
     686                    CFStringGetCString(appVersion, tmpBuffer, STRBUF_LEN, CFStringGetSystemEncoding());
     687                    printf("\tversion: %s", tmpBuffer);
     688                    if (intVersion != 0) printf(" [0x%lx = %lu]", intVersion, intVersion);
     689                    putchar('\n');
     690                }
    680691                CFRelease(bundle);
    681692            }
Note: See TracChangeset for help on using the changeset viewer.