ModInstaller is basically an applescript app that installs your mods
How To Use:
-Place mods in mods folder (class files)
-Run the Script
Keep In Mind:
-After you run the Script it will automatically close
-for MAC ONLY
-The Installer doen't really install the mods, The installer places the class files in the minecraft.jar
-Doesn't work with 1.5 I think...
MCInstall : Terminal based Download
works same way as Modinstaller does it just opens terminal then installs
use this if Modinstaller doesn't work for you.(I have no idea why it wouldn't work)
If you want I could show you how to convert that to an AppleScript Application so you can add drag and drop support, or simply make it fit better into the standard OS work flow.
Rollback Post to RevisionRollBack
Mod Installing Hack for Mac
Just add a folder name “MCPatches” to your ~/Documents/ folder.
Open inside AppleScript Editor for gritty details.
If you want I could show you how to convert that to an AppleScript Application so you can add drag and drop support, or simply make it fit better into the standard OS work flow.
Yeah I would like to know how to make that into an applescript App
before I made the command I tried using the applescript editor to do terminal commands O_o
Well, that's actually exactly what I do. Download my mod installing hack, then open up applescript editor and then open the hack from inside applescript editor(yes I know it's a pain, but right-clicking in finder won't work).
I use other tricks when I want to talk about something being in a relative location to where the script lives, but let's wait on that until after you see how to make a basic shell command into an applescript call.
This is a wrapper I used to use to maintain my texture pack and to unlink and relink worlds. It is retired, and this is an old version, but it may give some insight into how to write a rather complex hybrid script.
Rollback Post to RevisionRollBack
Mod Installing Hack for Mac
Just add a folder name “MCPatches” to your ~/Documents/ folder.
Open inside AppleScript Editor for gritty details.
mkdir minecraft && cd minecraft && jar xf ../minecraft.jar ;
creates the temporary folder named minecraft (and if successful) goes there (and if successful) uses jar to extract.
cp ~/Documents/MCPatches/* . ; does this open up the folder we needed to place the mods in?
Im pretty sure it does. now how does it take all the stuff in mcpatches and puts it in the new folder it made
mkdir minecraft && cd minecraft && jar xf ../minecraft.jar ;
creates the temporary folder named minecraft (and if successful) goes there (and if successful) uses jar to extract.
cp ~/Documents/MCPatches/* . ; does this open up the folder we needed to place the mods in?
Im pretty sure it does. now how does it take all the stuff in mcpatches and puts it in the new folder it made
hmm that was stupid. im guessing cp means to extract everything in that location to the current one
mkdir minecraft && cd minecraft && jar xf ../minecraft.jar ;
creates the temporary folder named minecraft (and if successful) goes there (and if successful) uses jar to extract.
cp ~/Documents/MCPatches/* . ; does this open up the folder we needed to place the mods in?
Im pretty sure it does. now how does it take all the stuff in mcpatches and puts it in the new folder it made
Actually, not quite, cp is short for copy and it copies from "~/Documents/MCPatches/*" to ".", in Unix parlance "." is the name of the current working directory. Which was set in the line quoted above. "cd" stands for "change directory".
Rollback Post to RevisionRollBack
Mod Installing Hack for Mac
Just add a folder name “MCPatches” to your ~/Documents/ folder.
Open inside AppleScript Editor for gritty details.
now we are talking about some trickier stuff.
Application bundles are secretly folders, something you can find out by right clicking an app and selecting "Show Package Contents" this is important, because when you ask applescript to give you your current location it will be the location of the script itself.
set myPath to POSIX path of (path to me)
will place the path of the application bundle(if it is one) as the variable myPath. Or if it is not an application bundle the path to the script.
Assuming you are writing it as an app bundle remember that the folder indicated by that variable is the bundle itself, NOT it's containing folder.
As a shell command is just a string (prefaced with "do shell script") you can use & to concatenate. Full examples of this sort of complex manipulation of shell and applescript are available in that other package I linked you to. Happy to answer any questions you have. The more expert mac users we have the better.
EDIT: BTW ¬ is generated by pressing <option>-l and is applescript's line continuation character.
Edit2: for clarity
Rollback Post to RevisionRollBack
Mod Installing Hack for Mac
Just add a folder name “MCPatches” to your ~/Documents/ folder.
Open inside AppleScript Editor for gritty details.
set myPath to POSIX path of (path to me)
do shell script ¬
"cd ~/Library/Application\\ Support/minecraft/bin ;
mkdir Temporary && cd Temporary && jar xf ../minecraft.jar ;
rm -r meta-inf || rm -r META-INF;
cp \"" & myPath & "../Mods/\"* .;
jar cMf ../minecraft.jar ./ && cd .. ;
rm -rf Temporary"
minor mistake :smile.gif: had to play minecraft for a while and I am about to be gone for the day.
I told you that was going to happen but i forgot it myself.
.. stands for directory below me, which since modinstaller.app is one level too high this is the solution.
the \" are to avoid escaping spaces.
Rollback Post to RevisionRollBack
Mod Installing Hack for Mac
Just add a folder name “MCPatches” to your ~/Documents/ folder.
Open inside AppleScript Editor for gritty details.
How To Use:
-Place mods in mods folder (class files)
-Run the Script
Keep In Mind:
-After you run the Script it will automatically close
-for MAC ONLY
-The Installer doen't really install the mods, The installer places the class files in the minecraft.jar
-Doesn't work with 1.5 I think...
DOWNLOAD
MCInstall : Terminal based
Download
works same way as Modinstaller does it just opens terminal then installs
use this if Modinstaller doesn't work for you.(I have no idea why it wouldn't work)
PLEASE NOTE: I'm a beginner at coding
AdventureCraft|SP Commands
Just add a folder name “MCPatches” to your ~/Documents/ folder.
Open inside AppleScript Editor for gritty details.
I borrowed some from Risugami for his mac one.
Then I took a look at Zan's minimap installer.
My original commands before looking at Zan's Installer made it so you needed to place the mods into a Jar which wasnt that easy IMO.
AdventureCraft|SP Commands
Just add a folder name “MCPatches” to your ~/Documents/ folder.
Open inside AppleScript Editor for gritty details.
Yeah I would like to know how to make that into an applescript App
before I made the command I tried using the applescript editor to do terminal commands O_o
AdventureCraft|SP Commands
I use other tricks when I want to talk about something being in a relative location to where the script lives, but let's wait on that until after you see how to make a basic shell command into an applescript call.
This is a wrapper I used to use to maintain my texture pack and to unlink and relink worlds. It is retired, and this is an old version, but it may give some insight into how to write a rather complex hybrid script.
Just add a folder name “MCPatches” to your ~/Documents/ folder.
Open inside AppleScript Editor for gritty details.
opens the bin folder
does some kind of backup
deletes the meta inf
my question: how does it open the jar?
AdventureCraft|SP Commands
creates the temporary folder named minecraft (and if successful) goes there (and if successful) uses jar to extract.
Just add a folder name “MCPatches” to your ~/Documents/ folder.
Open inside AppleScript Editor for gritty details.
cp ~/Documents/MCPatches/* . ; does this open up the folder we needed to place the mods in?
Im pretty sure it does. now how does it take all the stuff in mcpatches and puts it in the new folder it made
AdventureCraft|SP Commands
hmm that was stupid. im guessing cp means to extract everything in that location to the current one
AdventureCraft|SP Commands
Actually, not quite, cp is short for copy and it copies from "~/Documents/MCPatches/*" to ".", in Unix parlance "." is the name of the current working directory. Which was set in the line quoted above. "cd" stands for "change directory".
Just add a folder name “MCPatches” to your ~/Documents/ folder.
Open inside AppleScript Editor for gritty details.
AdventureCraft|SP Commands
Thats what im using for the code.
if possible how would i make it so that the mods folder has to be in the same directory as the script app?
AdventureCraft|SP Commands
Application bundles are secretly folders, something you can find out by right clicking an app and selecting "Show Package Contents" this is important, because when you ask applescript to give you your current location it will be the location of the script itself.
will place the path of the application bundle(if it is one) as the variable myPath. Or if it is not an application bundle the path to the script.
Assuming you are writing it as an app bundle remember that the folder indicated by that variable is the bundle itself, NOT it's containing folder.
As a shell command is just a string (prefaced with "do shell script") you can use & to concatenate. Full examples of this sort of complex manipulation of shell and applescript are available in that other package I linked you to. Happy to answer any questions you have. The more expert mac users we have the better.
EDIT: BTW ¬ is generated by pressing <option>-l and is applescript's line continuation character.
Edit2: for clarity
Just add a folder name “MCPatches” to your ~/Documents/ folder.
Open inside AppleScript Editor for gritty details.
so after placing the code in
what do i do now?
AdventureCraft|SP Commands
fix'd :smile.gif:
I think.
Just add a folder name “MCPatches” to your ~/Documents/ folder.
Open inside AppleScript Editor for gritty details.
AdventureCraft|SP Commands
AdventureCraft|SP Commands
minor mistake :smile.gif: had to play minecraft for a while and I am about to be gone for the day.
I told you that was going to happen but i forgot it myself.
.. stands for directory below me, which since modinstaller.app is one level too high this is the solution.
the \" are to avoid escaping spaces.
Just add a folder name “MCPatches” to your ~/Documents/ folder.
Open inside AppleScript Editor for gritty details.
AdventureCraft|SP Commands