Portable Adium

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Gand
Muffin
Posts: 40
Joined: Sun Jan 15, 2006 4:59 pm
Location: Milano, IT
Contact:

Portable Adium

Postby Gand » Sun Jan 15, 2006 5:07 pm

I'm working on OS X portable applications and I wish release Adium one.
On wiky page I've read about manually edit info.plist:

Code: Select all

<key>Preference Folder Location</key>
<string>/Volumes/YourDiskName/</string>


I can determine working directory with:

Code: Select all

here="`dirname \"$0\"`"


Is there a way to make a script that automatically edit info.plist, before Adium start, with:

Code: Select all

</string>"$here</string>

so that Adium can be easily launch from any external device with a double click.
Thanks in advance.
FreeSMUG-Free/opensource Software Mac User Group

Gand
Muffin
Posts: 40
Joined: Sun Jan 15, 2006 4:59 pm
Location: Milano, IT
Contact:

Postby Gand » Mon Jan 16, 2006 10:44 pm

Thanks to Caius's clues, here is the script:

Code: Select all

#!/bin/sh
here="`dirname \"$0\"`"
echo "Starting AdiumX from '$here'."
defaults write "$here/app/Adium.app/Contents/info" 'Preference Folder Location' "$here/profile"
open "$here/app/Adium.app"
echo "Done!"
FreeSMUG-Free/opensource Software Mac User Group

User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Postby evands » Tue Jan 17, 2006 12:44 pm

Gand wrote:Thanks to Caius's clues, here is the script:

Code: Select all

#!/bin/sh
here="`dirname "$0"`"
echo "Starting AdiumX from '$here'."
defaults write "$here/app/Adium.app/Contents/info" 'Preference Folder Location' "$here/profile"
open "$here/app/Adium.app"
echo "Done!"

Neat. Can I add this to the PortableAdium wiki page?
The duck still burns.
--
My company: Saltatory Software. Check it out :)

Gand
Muffin
Posts: 40
Joined: Sun Jan 15, 2006 4:59 pm
Location: Milano, IT
Contact:

Re: Portable Adium

Postby Gand » Mon Jan 23, 2006 10:22 am

Gand wrote:On wiky page I've read about manually edit info.plist:

Code: Select all

<key>Preference Folder Location</key>
<string>/Volumes/YourDiskName/</string>


Something is going wrong.
I try to start portable Adium (from an USB thumb) on machines where it was never installed.
Before testing my script I follow the wiky How-to adding manually these lines to info.plist file:

Code: Select all

<key>Preference Folder Location</key>
<string>/Volumes/PortableMac/PortableAdium/profile/</string>


Where the tree of USB thumb is:
PortableMac:
/PortableAdium
/PortableAdium/profile
/PortableAdium/app/Adium.app
all folders are chmod 777

When I launch Adium.app I get errors message that these folders cannot be created:
Contact List, Emoticons, PlugIns, Scripts, Sounds, Message Styles.

Adium start but only "User" folder and "Login Preferences.plist" file are created in my "profile" folder.
It happens on 3 different machine all running 10.4.4.
The error message appears only the first time I start Adium, and never appears if Adium.app was already installed on the internal HD.

What is wrong? I did some mistake?
Thanks.
FreeSMUG-Free/opensource Software Mac User Group

User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Postby evands » Mon Jan 23, 2006 10:12 pm

I've never tried portable adium before.

I have no idea how resources ever worked for it :) Now fixed for Adium 0.88. A new beta (beta.adiumx.com) will hopefully be up soon and will include the fix for your testing.
The duck still burns.

--

My company: Saltatory Software. Check it out :)

Gand
Muffin
Posts: 40
Joined: Sun Jan 15, 2006 4:59 pm
Location: Milano, IT
Contact:

Postby Gand » Tue Jan 24, 2006 11:08 am

evands wrote:I've never tried portable adium before.
I have no idea how resources ever worked for it :) Now fixed for Adium 0.88. A new beta (beta.adiumx.com) will hopefully be up soon and will include the fix for your testing.

Thanks, I've dowloaded Adium X 0.88b6 and manually editing info.plist work fine.
Now second step with the script, from man defaults:

Code: Select all

write domain key 'value'
                  Writes value as the value for key in domain.  value must be
                  a property list, and must be enclosed in single quotes.  For
                  example:

                        defaults write com.companyname.appname "Default Color" '(255, 0, 0)'

                  sets the value for Default Color to an array containing the
                  strings 255, 0, 0 (the red, green, and blue components).
                  Note that the key is enclosed in quotation marks because it
                  contains a space.

I've try all these solutions:

Code: Select all

defaults write "$here/app/Adium.app/Contents/info" 'Preference Folder Location' "$here/profile"

Code: Select all

defaults write "$here/app/Adium.app/Contents/info" "Preference Folder Location" '"$here/profile"'

Code: Select all

defaults write "$here/app/Adium.app/Contents/info" "Preference Folder Location" -string '"$here/profile"'


and may other variants with single and double quotes (also Info and info), but the Info.plist file is completely messed up:

Code: Select all

bplist00ß   

 !@A_CFBundleVersion_CFBundleHelpBookFolder_CFBundleSignature_CFBundleIdentifier_
CFBundleExecutable_CFBundleGetInfoString_CFBundleShortVersionString\CFBundleNam


Any idea? Thanks in advance, C.
FreeSMUG-Free/opensource Software Mac User Group

engla
Harmless
Posts: 16
Joined: Tue Sep 13, 2005 12:13 am

Postby engla » Tue Jan 24, 2006 7:16 pm

That's the binary format for plists. Convert it with 'plutil'

Gand
Muffin
Posts: 40
Joined: Sun Jan 15, 2006 4:59 pm
Location: Milano, IT
Contact:

Postby Gand » Wed Jan 25, 2006 7:56 pm

engla wrote:That's the binary format for plists. Convert it with 'plutil'

Thats mean that "default write" convert xml file to binary than it has o be reconverted to xml to work!
Well thank, I'll try.
FreeSMUG-Free/opensource Software Mac User Group

Gand
Muffin
Posts: 40
Joined: Sun Jan 15, 2006 4:59 pm
Location: Milano, IT
Contact:

Postby Gand » Thu Jan 26, 2006 12:44 am

Gand wrote:
engla wrote:That's the binary format for plists. Convert it with 'plutil'

Thats mean that "default write" convert xml file to binary than it has o be reconverted to xml to work!
Well thank, I'll try.

Yes, it work with this line:

Code: Select all

plutil -convert xml1 "$here/app/Adium.app/Contents/Info.plist"


Thanks, now Portable Adium is out:
http://www.freesmug.org/portableapps/adium/

P.S. Update wiki.
FreeSMUG-Free/opensource Software Mac User Group

User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Postby evands » Thu Jan 26, 2006 1:26 am

Gand wrote:P.S. Update wiki.

Cool, done.
The duck still burns.

--

My company: Saltatory Software. Check it out :)

User avatar
memark
Frappa
Posts: 163
Joined: Sat May 28, 2005 8:44 am
Location: Sweden, Göteborg
Contact:

Postby memark » Thu Jan 26, 2006 10:04 am

Gand wrote:Thanks, now Portable Adium is out:
http://www.freesmug.org/portableapps/adium/
Looks good, though you've forgotten to remove "Firefox" here:
2. Clicking "START Portable Adium.command" will launch a script that launch Firefox from your portable device.


evands wrote:
Gand wrote:P.S. Update wiki.

Cool, done.
The 'plutil' line is still absent from the wiki page.
Regards
Magnus Erik Markling

Gand
Muffin
Posts: 40
Joined: Sun Jan 15, 2006 4:59 pm
Location: Milano, IT
Contact:

Postby Gand » Thu Jan 26, 2006 11:33 am

memark wrote:
Gand wrote:Thanks, now Portable Adium is out:
http://www.freesmug.org/portableapps/adium/
Looks good, though you've forgotten to remove "Firefox" here:
2. Clicking "START Portable Adium.command" will launch a script that launch Firefox from your portable device.

Thanks, done.
memark wrote:
evands wrote:
Gand wrote:P.S. Update wiki.

Cool, done.
The 'plutil' line is still absent from the wiki page.

The script is:

Code: Select all

#!/bin/sh

here="`dirname "$0"`"
echo "Starting Adium from '$here'."
defaults write "$here/app/Adium.app/Contents/info" "Preference Folder Location" "$here/profile"
plutil -convert xml1 "$here/app/Adium.app/Contents/Info.plist"
open "$here/app/Adium.app"
echo "Done!"
echo "When finish, quit Terminal.app before eject your portable device."


P.S. FYI, next pApps to be done: Colloquy, Abiword, NeoOffice/OpenOffice.
FreeSMUG-Free/opensource Software Mac User Group

David Munch
Grandé
Posts: 869
Joined: Sun Dec 05, 2004 3:41 pm
Location: Denmark
Contact:

Postby David Munch » Thu Jan 26, 2006 2:59 pm

Do Xchat Aqua if you got a spare week please.. Would be awesome! :)

Gand
Muffin
Posts: 40
Joined: Sun Jan 15, 2006 4:59 pm
Location: Milano, IT
Contact:

Postby Gand » Thu Jan 26, 2006 7:33 pm

Know issues
Portable Adium will not copy on Mac OS standard (HFS) and File System MS-DOS formatted volume.
Could Mac OS standard issue solved?
Last edited by Gand on Thu Jan 26, 2006 7:35 pm, edited 1 time in total.
FreeSMUG-Free/opensource Software Mac User Group

Gand
Muffin
Posts: 40
Joined: Sun Jan 15, 2006 4:59 pm
Location: Milano, IT
Contact:

Postby Gand » Thu Jan 26, 2006 7:34 pm

David Munch wrote:Do Xchat Aqua if you got a spare week please.. Would be awesome! :)

Each app that have the profile folder path setted via script could be portable.
I'll ask to Xchat Aqua dev. Also Colloquy could be nice.
FreeSMUG-Free/opensource Software Mac User Group

User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Postby evands » Thu Jan 26, 2006 7:58 pm

Gand wrote:Know issues
Portable Adium will not copy on Mac OS standard (HFS) and File System MS-DOS formatted volume.
Could Mac OS standard issue solved?

What are the problems?
The duck still burns.

--

My company: Saltatory Software. Check it out :)

Gand
Muffin
Posts: 40
Joined: Sun Jan 15, 2006 4:59 pm
Location: Milano, IT
Contact:

Postby Gand » Thu Jan 26, 2006 10:15 pm

evands wrote:
Gand wrote:Know issues
Portable Adium will not copy on Mac OS standard (HFS) and File System MS-DOS formatted volume.
Could Mac OS standard issue solved?

What are the problems?

Adium.app can't be copied over a USB thumb formatted as Mac OS standard (HFS), it can be copied only on Mac OS extended format (HFS+)

See also this thread on MacUpdate
FreeSMUG-Free/opensource Software Mac User Group

User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Postby evands » Thu Jan 26, 2006 11:08 pm

I don't know what would be the problem. If you can point out what file or files within the bundle cause the error, we'll try to correct the situation if possible.

Why would you ever use HFS over HFS+ anyways?
The duck still burns.

--

My company: Saltatory Software. Check it out :)

Gand
Muffin
Posts: 40
Joined: Sun Jan 15, 2006 4:59 pm
Location: Milano, IT
Contact:

Postby Gand » Thu Jan 26, 2006 11:55 pm

evands wrote:I don't know what would be the problem. If you can point out what file or files within the bundle cause the error, we'll try to correct the situation if possible.

Why would you ever use HFS over HFS+ anyways?


User report that HFS is needed to use same USB thumb between Mac and win.
Also deleting two broken alias in framework folder don't solve the problem.
No message about wich files cause the error, just "one or more items can't be copied" :(
I've formatted my USB thumb as HFS+, Unix, HFS and DOS. On HFS and DOS copy don't work.
FreeSMUG-Free/opensource Software Mac User Group

chagrins
Muffin
Posts: 41
Joined: Fri Jan 27, 2006 5:58 pm

Postby chagrins » Fri Jan 27, 2006 6:00 pm

You might want to use HFS over HFS+ on a small USB flash drive to save a few megabytes of space.


Return to “Adium”

Who is online

Users browsing this forum: No registered users