Loading ...
Sorry, an error occurred while loading the content.

Re: [wpmac] Icon Help?

Expand Messages
  • Smokey Ardisson
    On Mon Feb 1, 2010 7:33 pm ((PST)), wordperfectmac-owner@yahoogroups.com ... Probably some Info.plist magic to make LaunchServices happy; I ll try to have a
    Message 1 of 5 , Feb 2, 2010
    • 0 Attachment
      On Mon Feb 1, 2010 7:33 pm ((PST)),
      "wordperfectmac-owner@yahoogroups.com"
      <wordperfectmac-owner@yahoogroups.com> wrote:

      >Everything works now except that I can't figure
      >out how to get WP files, viewed in the OSX
      >Finder, to assume a WP document icon.
      >
      >But – when I open the SS volume in OSX, so that
      >the WP application is visible (although it of
      >course won't open), and relaunch the Finder, all
      >WP docs on the computer have the correct
      >document icon. As soon as I close the SS volume
      >and open a new OSX Finder window that contains
      >WP files, the file icon reverts to the generic
      >(white rectangle) icon.
      >
      >The OSX part of my add-on is an Applescript
      >droplet. I've changed its file creator to WPC2,
      >used ResEdit to replace all its icons (ICN#
      >etc.) with WP icons, checked that the Bundle bit
      >is on and turned on the Sharing bit. It seems
      >that this droplet should provide the icon to WP
      >documents as the WP application does. No joy.
      >
      >Does anyone know what I'm overlooking?

      Probably some Info.plist magic to make
      LaunchServices happy; I'll try to have a look in
      the next day or so, because I've done this
      successfully with AppleScript apps on the Mac OS
      X side several times before.

      Smokey
    • sardisson
      ... I ve redone the app side of Open WP Files to make it very happy in Mac OS X; it s a Universal Binary, has a bundle ID
      Message 2 of 5 , Feb 5, 2010
      • 0 Attachment
        --- In wordperfectmac@yahoogroups.com, Smokey Ardisson <smokey.ardisson@...> wrote:
        >
        > On Mon Feb 1, 2010 7:33 pm ((PST)),
        > "wordperfectmac-owner@yahoogroups.com"
        > <wordperfectmac-owner@yahoogroups.com> wrote:
        >
        > >Does anyone know what I'm overlooking?
        >
        > Probably some Info.plist magic to make
        > LaunchServices happy; I'll try to have a look in
        > the next day or so, because I've done this
        > successfully with AppleScript apps on the Mac OS
        > X side several times before.

        I've redone the app side of Open WP Files to make it very happy in Mac OS X; it's a Universal Binary, has a bundle ID (com.yahoo.groups.tech.wordperfectmac.openwpfiles) to allow "Open With" bindings to stick (needed for Creator Code-less 10.6), has a proper .plist, and other fun things: http://www.ardisson.org/smokey/wpmac/OpenWPFiles0.9.2.zip

        One thing about the AppleScript side: since this is designed to run on Mac OS X, I wonder if it wouldn't be better to rework the UNIX Folder detection/storage code to write to the app's plist (com.yahoo.groups.tech.wordperfectmac.openwpfiles.plist)? That way you could avoid the problem of persistent AppleScript properties getting stored when writing and testing the app and make the UNIX Folder detection work correctly for everyone, out of the box--instead of throwing an error when their UNIX Folder isn't in the same location as yours ;-)

        System Events can only read plists on 10.4 (it can write them starting on 10.5), but you can accomplish the same tasks with "do shell script" and defaults read/write, if less elegantly.

        [disappears for a while and writes some AppleScript]

        I didn't realize how much more AppleScript it was going to be before I actually wrote it up; who knew checking for three possible error conditions would require so much code :P http://www.ardisson.org/smokey/wpmac/UNIXFolderPath.applescript
        I didn't try to integrate it with your code since it ended up being more than I expected (and I don't yet have a SS install on this Mac, anyway). I'm on 10.5, but everything was written to be 10.4-compatible, although it's always possible that something is buggy on 10.4....

        Anyway, these should work; everything that doesn't require SS itself I've tested. For the icon association, you'll need to delete any older versions of Open WP Files, ensure the new one is placed somewhere in the Applications folder to get LaunchServices to read the plist, and then you may need to restart the Finder to see the icons change (though the actual app binding should be updated right away).

        Hope this helps,
        Smokey
      • John R
        COOL! Thanks Smokey! John R.
        Message 3 of 5 , Feb 6, 2010
        • 0 Attachment
          COOL!

          Thanks Smokey!

          John R.



          --- In wordperfectmac@yahoogroups.com, "sardisson" <smokey.ardisson@...> wrote:
          >
          > I've redone the app side of Open WP Files to make it very happy in Mac OS X; it's a Universal Binary, has a bundle ID (com.yahoo.groups.tech.wordperfectmac.openwpfiles) to allow "Open With" bindings to stick (needed for Creator Code-less 10.6), has a proper .plist, and other fun things:
        • jrethorst
          ... One of my dumber moves. I meant to have the app read the SS prefs file when run, i.e. double-clicked, and for the instructions to have the user do that
          Message 4 of 5 , Feb 6, 2010
          • 0 Attachment
            --- In wordperfectmac@yahoogroups.com, "sardisson" <smokey.ardisson@...> wrote:

            >That way you could avoid the problem of persistent AppleScript properties getting stored when writing and testing the app and make the UNIX Folder detection work correctly for everyone, out of the box--instead of throwing an error when their UNIX Folder isn't in the same location as yours ;-)

            One of my dumber moves. I meant to have the app read the SS prefs file
            when run, i.e. double-clicked, and for the instructions to have the user
            do that after install. But I had the app read the file only if it hadn't read
            it before . . . but this was version .91, i.e., ahem, beta . . . :-)

            > Anyway, these should work; everything that doesn't require SS itself I've tested. For the icon association, you'll need to delete any older versions of Open WP Files, ensure the new one is placed somewhere in the Applications folder to get LaunchServices to read the plist, and then you may need to restart the Finder to see the icons change (though the actual app binding should be updated right away).

            Will the user domain's Applications folder work? The app works on my
            machine, but I had already done a bunch of things to try to get the binding
            to stick, e.g. the DefaultApp prefpane, and I don't know if I was able to get
            rid of everything before installing your masterpiece.

            > Hope this helps,
            > Smokey

            It helps us all a great deal. It greatly increases the integration and ease of
            use of SS/WP with OSX, meaning more people will continue to use (or even,
            dare I think it, when they consider the competition, start to use) WP.

            Thanks again!

            John R.
          • em315
            You could try creating another user account on your system and test it there - that would probably work.
            Message 5 of 5 , Feb 6, 2010
            • 0 Attachment
              You could try creating another user account on your system and test it there - that would probably work.

              --- In wordperfectmac@yahoogroups.com, jrethorst <no_reply@...> wrote:
              >
              > Will the user domain's Applications folder work? The app works on my
              > machine, but I had already done a bunch of things to try to get the binding
              > to stick, e.g. the DefaultApp prefpane, and I don't know if I was able to get
              > rid of everything before installing your masterpiece.
            Your message has been successfully submitted and would be delivered to recipients shortly.