- Joined
- Nov 11, 2006
- Messages
- 7,591
Hey guys, this is a simple command line utility to export files from an MPQ on OS X. I don't really expect you to use this for actually MPQ editing though, I may make a GUI-based MPQ editor later. This is intended for tools that use an external exe to handle mpq handling. Let me know if there are any bugs; or if you want any extra commands. Check out the source on github:
https://github.com/PurgeGit/MacMoPaQ
The file is attached at the end of this post. I'll probably submit it to the tools section once I've gotten some feedback.
MacMoPaQ v.1.0.0
Command line utility for file injection, file extraction, and file removal for Blizzard's MPQ archives. Supports OS X.
Primarily intended for Warcraft III, but theoretically should be able to export from any StormLib-supported game.
Feel free to package this with other apps, use, share, etc. If you use it, hopefully you can shoot me a message with
feedback, comments, etc.
Use
[File Extraction]
[File Injection]
[File Deletion]
Extras
As a simple shortcut, you can use archivedir for extraction and injection <path_on_disk>.
For extraction, it will extract the path to the directory of the archive with the <path_of_file> appended.
For injection, it will inject the file located at the directory of the archive with <path_of_file> appended.
Is the same as:
Credits
- "Ladik" Ladislav Zezula - StormLib
http://www.zezula.net/en/mpq/stormlib.html
- Sam Wilkins - StormLib OS X Port
Notes
- Compiled with StormLib v.8.21
- Written in Objective-C through XCode
https://github.com/PurgeGit/MacMoPaQ
The file is attached at the end of this post. I'll probably submit it to the tools section once I've gotten some feedback.
MacMoPaQ v.1.0.0
Command line utility for file injection, file extraction, and file removal for Blizzard's MPQ archives. Supports OS X.
Primarily intended for Warcraft III, but theoretically should be able to export from any StormLib-supported game.
Feel free to package this with other apps, use, share, etc. If you use it, hopefully you can shoot me a message with
feedback, comments, etc.
Use
[File Extraction]
JASS:
exec <path_to_MacMoPaQ> extract <path_to_archive> <path_of_file_in_archive> <path_on_disk>
- Extracts a file from an archive and saves it on the disk. This will not remove the file from the archive.
- Paths can be enclosed in quotes "" to support spaces, parentheses, etc. Use forward slashes for directories.
- Example of extraction:
JASS:
exec /Applications/MacMoPaQ/MacMoPaQ extract "/Applications/Warcraft III/Maps/Scenario/(4)WarChasers.w3m" "war3map.j" "/Applications/Warcraft III/Maps/Scenario/war3map.j"
[File Injection]
JASS:
exec <path_to_MacMoPaQ> inject <path_to_archive> <path_of_file_in_archive> <path_on_disk>
exec <path_to_MacMoPaQ> replace <path_to_archive> <path_of_file_in_archive> <path_on_disk>
- Injects the file located at <path_on_disk> into the archive at <path_to_archive>.
- Paths can be enclosed in quotes "" to support spaces, parentheses, etc. Use forward slashes for directories.
- The keywords "inject" and "replace" do the same thing; they're interchangeable.
- Example of injection:
JASS:
exec /Applications/MacMoPaQ/MacMoPaQ inject "/Applications/Warcraft III/Maps/Scenario/(4)WarChasers.w3m" "war3map.j" "/Applications/Warcraft III/Maps/Scenario/war3map.j"
[File Deletion]
JASS:
exec <path_to_MacMoPaQ> delete <path_to_archive> <path_of_file_in_archive> <(optional) compact>
- Deletes a file from the archive. Paths can be enclosed in quotes.
- If you have "compact" written at the end, it will compact the archive after deleting the file.
- If you have anything else written, or nothing there, it will not compact the archive (soft delete).
JASS:
exec /Applications/MacMoPaQ/MacMoPaQ delete "/Applications/Warcraft III/Maps/Scenario/(4)WarChasers.w3m" "war3map.j" compact
Extras
As a simple shortcut, you can use archivedir for extraction and injection <path_on_disk>.
For extraction, it will extract the path to the directory of the archive with the <path_of_file> appended.
For injection, it will inject the file located at the directory of the archive with <path_of_file> appended.
JASS:
exec /Applications/MacMoPaQ/MacMoPaQ extract "/Applications/Warcraft III/Maps/Scenario/(4)WarChasers.w3m" "war3map.j" "/Applications/Warcraft III/Maps/Scenario/war3map.j"
Is the same as:
JASS:
exec /Applications/MacMoPaQ/MacMoPaQ extract "/Applications/Warcraft III/Maps/Scenario/(4)WarChasers.w3m" "war3map.j" archivedir
Credits
- "Ladik" Ladislav Zezula - StormLib
http://www.zezula.net/en/mpq/stormlib.html
- Sam Wilkins - StormLib OS X Port
Notes
- Compiled with StormLib v.8.21
- Written in Objective-C through XCode
Attachments
Last edited: