I've put a perl script together for my own use to fetch addons and libraries from SVN. It's specifically targeted towards mac users that aren't afraid of the terminal, though should work under Windows also. Anyways I figured I'd share it incase it might be useful to anyone else.
Features:
Downloads addons to a stage area so you can see what has changed before installing them.
Per-addon embed setting. Can figure out which libraries to fetch for disembedded addons.
Can fetch/update individual addons or all of the ones you have installed.
Automatically splits BigWigs, oRA2 and similar addons when installing them from the staging area. (Currently uses heuristics for this, not scripts or .pkgmeta files.)
Can show the difference between addons in your staging area and what's installed.
Copy the script from the archive to some place in your path. For example ~/bin. ((You can check your path by running the command "echo $PATH" if your are confused I will try to help you through this.))
Update /etc/profile (bash users 10.4 default) and /etc/csh.login (tcsh I believe default shell for < 10.4) if you need to add either the script or one of the tools such as svn to your path.
To download to the staging area
Command: addonpkg -fetchaddonnames...
This will download all the named addons to the staging directory. Specify the -libs option to download all of the needed libraries at the same time!!!StandaloneLibraries. If you do not specify any addons or the library flag all the addons in your staging directory will be fetched. Specify the -all to update everything you've already fetched once.
To compare addons in the staging area with addons that are in the World of Warcraft addon directory.
Command: addonpkg -diffaddonnames...
This will compare dump out differences. Again -libs may be used to check the libraries, and if you do not specify any addons or use the -all option, all of the addons in your staging directory will be compared.
To install addons from the staging area.
Command: addonpkg -installaddonnames...
Install the addons from the staging area into the game. It will split addons such as BigWigs and oRA2 into multiple addons automatically. If you do not specify any addons it will install all of them. You must use -all or list the addons if you wish to install all of the addons.
Partial list of actions:
-fetch -- Download addons from SVN
-diff or -compare -- Compare addons in your staging directory with the files installed in WOW.
-install -- Copies addons from your staging directory into WOW.
-list or -details or -describe -- Describes the addons.
-help -- Displays brief usage guide.
-man -- DIsplays complete documentation.
-archivefile -- Archives addons into file
Partial list of Options, use -help or -man to get full list:
-all -- All the addons in your staging directory.
-branchbranch -- Sets the branch off the root server. Combined with -root and the addon name forms the complete URL used for the initial fetch from SVN
-ddir -- Destination dir. Defaults to /Applications/World of Warcraft/Interface/Addons or C:\Program Files\World Of Warcraft\Interface\Addons for -install/-diff and your staging directory for -fetch
-fontfont -- If you have figlet installed, it will use the figlet font to print the names of addons when showing differences.
-force -- Download addons from SVN, removes and replaces directories that were not from SVN
-libs -- Fetch/compare or install all the libraries needed by any of the listed addons.
-lineslines -- Height of your terminal screen, defaults to 24. Used for -diff. If more than this many lines would be displayed, the output is piped through your pager.
-n -- Only print the commands that would be run, does not download or fetch any addons.
-rootserver -- Sets the root svn server.
-revisionrevision -- When downloading from SVN only fetch revision revision.
-sdir -- Source directory for -install and -diff. Defaults to your staging directory.
-svnurl -- Fetchs addons from matching url. This URL can contain patterns. %Name% is replaced with the addon name. Use %NAME% if the name should be all uppercase, and %name% if it should be lower case.
-giturl -- Fetchs addons from matching url. This URL can contain patterns. %Name% is replaced with the addon name. Use %NAME% if the name should be all uppercase, and %name% if it should be lower case.
-v -- Prints any commands as they are run.
-wcolumns -- Width of your terminal screen, defaults to 80. Used for -diff.
Some examples:
Fetch revision 19515 of BigWigs, and all the libraries it uses, then compare them against the ones currently installed.
Compare an addon you manually downloaded to your desktop with the version installed in WoW. Works with normal folders, zip files (requires the command line unzip command), and tar, tar.gz files (requires gnu tar)
I'm having trouble getting it to update my libs using the -libs flag, though. First I run
% acecmd -fetch -libs
and it installs !!!StandaloneLibraries into my staging directory. I copy the (empty) library folders up into my staging directory and try both
% acecmd -fetch libs
% acecmd -fetch
Neither command will fill the library folders. They each get skipped saying that they're already at the proper revision, even though the folders are empty.
I am able to get it to work by first deleting all the library folders from my staging directory, and running
% acecmd -fetch `ls !!!StandaloneLibraries`
I'm happy to use it as I am since it works, but please tell me if it can be done with the -libs flag and I'm just using it wrong.
Thanks, i was waiting for that but i'll continue updateing manually since i like my Raidgfroup to be all at the same version without having to update to often.
But for those who are a little bit Terminal afraid, just open Apple script and make an Application which does run the perl script. I did it rather easily for updating my DKPTable like this:
tell application "Terminal"
do shell script "perl /Users/XXX/path/getdkp.pl"
end tell
of course /Users/XXX/path/ is the path to get to getdkp.pl in my example.
save as Application and done.
of course everyone will have to edit the Script by their needs, but only done once after that it will be easy updating
I'm having trouble getting it to update my libs using the -libs flag, though. First I run
% acecmd -fetch -libs
I must have broke the -libs flag when I was making a last couple of changes. Give me a bit and I'll fix this.
Edit: I've updated it so that -libs should work correctly now. I've also added a -force option that will cause it to discard directories that were not fetched by svn and refetch them.
Renaming to addonpkg and added options to specify the svn root and branch. I've also laid the ground work for putting in a database that knows to pull specific addons from other svn servers or branches.
BTW with WoW 2.0, the "-interface 20000" option is very useful for the -compare and -install commands. You can easy ignore non 2.0 ready addons with this.
The new features are really nice. I like especially like the -man option so's I don't have to check the forums each time I use it. ;)
I had a weird issue with the new script, though. It has OS 9 newlines (\015) rather than Unix newlines. I had to convert them to regular newlines before perl would interpret it. I didn't have this issue with the old script. Did you play with the new version in OS 9 before uploading it to the forums?
The new features are really nice. I like especially like the -man option so's I don't have to check the forums each time I use it. ;)
I'm glad you like it. I've been working on another update but have to finish adding additional documentation as some minor fixes. I also plan on making my Finder comment script available so that you will be able to look at addon information directly in finder, as well as have out of date addons labeled.
Quote from beesknees »
I had a weird issue with the new script, though. It has OS 9 newlines (\015) rather than Unix newlines. I had to convert them to regular newlines before perl would interpret it. I didn't have this issue with the old script. Did you play with the new version in OS 9 before uploading it to the forums?
It's probably a side effect of how I uploaded the files. I had been copying the script into a .txt file before uploading to this forum. I probably need to just host the script somewhere, maybe even in svn.
Update: I've attached an beta of my latest changes to this message. I still have some updates I want to make. I've also include a folder action script for automatically updating finder comments. Place it in /Library/Scripts/Folder Action Scripts/ and then attach it to your addons directory. You can also save it as an application using the script editor in your Applications folder and the addonpkg script should use it to update finder comments on the fly. Only a few new features from the previous version. Use the -man option to see the documentation.
Edit: Removed attachment. Beta is now attached to first message.
I seem to have ran into a small snag using the most recent version you uploaded (the one containing the folder action as well).
I created an Ace2 folder in my Interface folder (full path is /Applications/World of Warcraft/Interface/Ace2)
whenever I try and use addonpkg -fetch Ace2 (for example)... it seems to ignore the Ace2 folder I've created, and try and drop the Ace2 folder its pulling from the svn into a new folder in my home directory:
Checked out revision 20612.
2006-12-14 14:00:01.334 open[2547] Couldn't open file: /Users/jackofspades/Ace2
I seem to have ran into a small snag using the most recent version you uploaded (the one containing the folder action as well).
I created an Ace2 folder in my Interface folder (full path is /Applications/World of Warcraft/Interface/Ace2)
whenever I try and use addonpkg -fetch Ace2 (for example)... it seems to ignore the Ace2 folder I've created, and try and drop the Ace2 folder its pulling from the svn into a new folder in my home directory:
Checked out revision 20612.
2006-12-14 14:00:01.334 open[2547] Couldn't open file: /Users/jackofspades/Ace2
What does it output if you run:
addonpkg -n -fetch Ace2
I'm also working on an update that uses a new staging directory /Applications/World of Warcraft/Interface/StageArea which it should create automatically as well as move files from the old stage area automatically. I have a couple more changes to finish, but will post it soon.
Edit: Staging changes are done, also the verbose option -v should now note where it thinks addons are going.
I get the error "Unable to locate svn command, make sure you have svn installed!" even when I have a SVN client installed and open, is there anything that needs to be configured, or a specific client I should be using?
I get the error "Unable to locate svn command, make sure you have svn installed!" even when I have a SVN client installed and open, is there anything that needs to be configured, or a specific client I should be using?
addonpkg -n -fetch Ace2
/usr/local/bin/svn update --ignore-externals /Users/jackofspades/Ace2
open -a {5 /Users/jackofspades/Ace2
2006-12-14 23:05:49.908 open[2611] Couldn't open file: /Users/jackofspades/Ace2
Quote from Nayala »
I'm also working on an update that uses a new staging directory /Applications/World of Warcraft/Interface/StageArea which it should create automatically as well as move files from the old stage area automatically. I have a couple more changes to finish, but will post it soon.
Edit: Staging changes are done, also the verbose option -v should now note where it thinks addons are going.
I'm currently at work, I'll try updating when I get home and see what happens
EDIT:
At home, just tried using the updated addonpkg, and I get this:
addonpkg -v -n -fetch Ace2
/usr/local/bin/svn update --ignore-externals /Users/jackofspades/Ace2
open -a {5 /Users/jackofspades/Ace2
2006-12-15 00:55:42.407 open[2667] Couldn't open file: /Users/jackofspades/Ace2
I tried changing the permissions on the /Ace2 folder, and had the same result.
Removing the Ace2 folder from my home folder gives me this:
Hmm...interestingly enough.. if I run it without the -n flag, it runs and autocreates the new Stagearea folder... only.. it put it in the interface folder of my Burning Crusade Beta install (presumably, because as its looking for the wow.app.. the TBC folder is going to be found first inside the applications folder)
addonpkg -n -fetch Ace2
/usr/local/bin/svn update --ignore-externals /Users/jackofspades/Ace2
open -a {5 /Users/jackofspades/Ace2
2006-12-14 23:05:49.908 open[2611] Couldn't open file: /Users/jackofspades/Ace2
Okay it sounds like it's not recognizing the staging directory. The old version would default using the current directory if it couldn't find the stage directory. The open error is something else. It looks like the code that looks for the "Comment WoW Addon.app" is getting an invalid path name. Did you create an application from that script? If so where did you put it? What version of OS X are you running?
Okay it sounds like it's not recognizing the staging directory. The old version would default using the current directory if it couldn't find the stage directory. The open error is something else. It looks like the code that looks for the "Comment WoW Addon.app" is getting an invalid path name. Did you create an application from that script? If so where did you put it? What version of OS X are you running?
No, I'm using it as a folder action, /Library/Scripts/Folder Action Scripts/Comment Wow Addon (and its "attached" to my AddOns Folder)
I actually had the command line SVN installed, your script just wasn't finding it, but this newest version works perfectly. Thanks a ton.
Cool, glad it works for you.
BTW Just wanted to share another cool thing you can do with addonpkg since it might not be obvious. If you want to know what Non-ace addons you are using you should be able to run:
addonpkg -describe -d %INSTALL% -nowowace
(Note this only works if all the ace addons you have were installed using SVN or addonpkg.)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Also documentation is at the wiki at the same code project It is more up to date then the information in this post, but addonpkg -help should always be the most up to date
I've put a perl script together for my own use to fetch addons and libraries from SVN. It's specifically targeted towards mac users that aren't afraid of the terminal, though should work under Windows also. Anyways I figured I'd share it incase it might be useful to anyone else.
Features:
Requirements
Limitations / Bugs -- see built in help for this.
Set up and installation:
To download to the staging area
Command: addonpkg -fetch addonnames...
This will download all the named addons to the staging directory. Specify the -libs option to download all of the needed libraries at the same time!!!StandaloneLibraries. If you do not specify any addons or the library flag all the addons in your staging directory will be fetched. Specify the -all to update everything you've already fetched once.
To compare addons in the staging area with addons that are in the World of Warcraft addon directory.
Command: addonpkg -diff addonnames...
This will compare dump out differences. Again -libs may be used to check the libraries, and if you do not specify any addons or use the -all option, all of the addons in your staging directory will be compared.
To install addons from the staging area.
Command: addonpkg -install addonnames...
Install the addons from the staging area into the game. It will split addons such as BigWigs and oRA2 into multiple addons automatically. If you do not specify any addons it will install all of them. You must use -all or list the addons if you wish to install all of the addons.
Partial list of actions:
Partial list of Options, use -help or -man to get full list:
Some examples:
Fetch revision 19515 of BigWigs, and all the libraries it uses, then compare them against the ones currently installed.
Command: addonpkg -fetch -revision 19515 -libs BigWigs
Compare changes for any addon for WoW 2.0 from the ones you have already fetched.
Command: addonpkg -compare -interface ">=2.0.0"
Fetch any addon from wowace that you have that is older that revision 26151 and print out the ones that failed to update.
Command: addonpkg -fetch -details -wowace -revision '<26151'
Install BigWigs and all the libraries that are version WoW 2.0 ready.
Command: addonpkg -install -interface ">=20000" -libs BigWigs
Compare an addon you manually downloaded to your desktop with the version installed in WoW. Works with normal folders, zip files (requires the command line unzip command), and tar, tar.gz files (requires gnu tar)
Command: addonpkg -compare ~/Desktop/SomeAddon.zip
Install that addon.
Command: addonpkg -install ~/Desktop/SomeAddon.zip
Archive all the installed addons to give to a friend.
Command: addonpkg -archive ~/Desktop/MyAddons.zip -s "%INSTALL%"
Install all the addons in an archive
Command: addonpkg -install ~/Desktop/MyAddons.zip
List all the addons in an archive
Command: addonpkg -describe ~/Desktop/MyAddons.zip
I'm having trouble getting it to update my libs using the -libs flag, though. First I run
% acecmd -fetch -libs
and it installs !!!StandaloneLibraries into my staging directory. I copy the (empty) library folders up into my staging directory and try both
% acecmd -fetch libs
% acecmd -fetch
Neither command will fill the library folders. They each get skipped saying that they're already at the proper revision, even though the folders are empty.
I am able to get it to work by first deleting all the library folders from my staging directory, and running
% acecmd -fetch `ls !!!StandaloneLibraries`
I'm happy to use it as I am since it works, but please tell me if it can be done with the -libs flag and I'm just using it wrong.
But for those who are a little bit Terminal afraid, just open Apple script and make an Application which does run the perl script. I did it rather easily for updating my DKPTable like this:
of course /Users/XXX/path/ is the path to get to getdkp.pl in my example.
save as Application and done.
of course everyone will have to edit the Script by their needs, but only done once after that it will be easy updating
I must have broke the -libs flag when I was making a last couple of changes. Give me a bit and I'll fix this.
Edit: I've updated it so that -libs should work correctly now. I've also added a -force option that will cause it to discard directories that were not fetched by svn and refetch them.
This script saves me so much time. Thanks for posting it!
BTW with WoW 2.0, the "-interface 20000" option is very useful for the -compare and -install commands. You can easy ignore non 2.0 ready addons with this.
I had a weird issue with the new script, though. It has OS 9 newlines (\015) rather than Unix newlines. I had to convert them to regular newlines before perl would interpret it. I didn't have this issue with the old script. Did you play with the new version in OS 9 before uploading it to the forums?
I'm glad you like it. I've been working on another update but have to finish adding additional documentation as some minor fixes. I also plan on making my Finder comment script available so that you will be able to look at addon information directly in finder, as well as have out of date addons labeled.
It's probably a side effect of how I uploaded the files. I had been copying the script into a .txt file before uploading to this forum. I probably need to just host the script somewhere, maybe even in svn.
Update: I've attached an beta of my latest changes to this message. I still have some updates I want to make. I've also include a folder action script for automatically updating finder comments. Place it in /Library/Scripts/Folder Action Scripts/ and then attach it to your addons directory. You can also save it as an application using the script editor in your Applications folder and the addonpkg script should use it to update finder comments on the fly. Only a few new features from the previous version. Use the -man option to see the documentation.
Edit: Removed attachment. Beta is now attached to first message.
I seem to have ran into a small snag using the most recent version you uploaded (the one containing the folder action as well).
I created an Ace2 folder in my Interface folder (full path is /Applications/World of Warcraft/Interface/Ace2)
whenever I try and use addonpkg -fetch Ace2 (for example)... it seems to ignore the Ace2 folder I've created, and try and drop the Ace2 folder its pulling from the svn into a new folder in my home directory:
What does it output if you run:
I'm also working on an update that uses a new staging directory /Applications/World of Warcraft/Interface/StageArea which it should create automatically as well as move files from the old stage area automatically. I have a couple more changes to finish, but will post it soon.
Edit: Staging changes are done, also the verbose option -v should now note where it thinks addons are going.
My first guess is you have a GUI only SVN client. You will need the command line SVN client to use this script. Check out http://metissian.com/projects/macosx/subversion/ for precompiled SVN binaries which when installed place the binaries in /usr/local/bin/svn. ((I use svn from darwinports/macports myself. http://trac.macosforge.org/projects/macports/wiki/InstallingMacPorts))
Where do you have the svn commands installed. Is it in your path? What do you see if you run:
Assuming you have svn installed as /usr/local/bin/svn, otherwise change the following to match the directory where your svn command is.
If you use bash or another sh based shell:
If you use csh or tcsh:
I'll make sure the script automatically also looks in /usr/local/bin with my next update.
Edit: New beta version is attached to main message, that looks in /usr/local/bin.
with that flag I get this:
I'm currently at work, I'll try updating when I get home and see what happens
EDIT:
At home, just tried using the updated addonpkg, and I get this:
I tried changing the permissions on the /Ace2 folder, and had the same result.
Removing the Ace2 folder from my home folder gives me this:
Hmm...interestingly enough.. if I run it without the -n flag, it runs and autocreates the new Stagearea folder... only.. it put it in the interface folder of my Burning Crusade Beta install (presumably, because as its looking for the wow.app.. the TBC folder is going to be found first inside the applications folder)
Okay it sounds like it's not recognizing the staging directory. The old version would default using the current directory if it couldn't find the stage directory. The open error is something else. It looks like the code that looks for the "Comment WoW Addon.app" is getting an invalid path name. Did you create an application from that script? If so where did you put it? What version of OS X are you running?
What is output if you run:
No, I'm using it as a folder action, /Library/Scripts/Folder Action Scripts/Comment Wow Addon (and its "attached" to my AddOns Folder)
That returns:
{5
Thanks. I'm going to replace the zip file with version addonpkg-061215.zip. Let me know if that fixes the error for you.
addonpkg -fetch Ace2
runs and successfully completes. No error messages about being unable to open anything.
Thanks again for the work you've put into this!
Cool, glad it works for you.
BTW Just wanted to share another cool thing you can do with addonpkg since it might not be obvious. If you want to know what Non-ace addons you are using you should be able to run:
(Note this only works if all the ace addons you have were installed using SVN or addonpkg.)