Jump to content
Sign in to follow this  
beton

Mikero´s Dos Tools - How do you use them?

Recommended Posts

Everyone who is into Modding will get in contact with this great toolset once in a while.

But... at least i have sometimes problems knowing how to use them or even more important what can be done with all these little dll´s and exe´s. Maybe some of the regular and more experienced users could describe how and when they use the toolset and let me and the other Dummies participate in their knowledge.

Thanks in advance ... :)

Share this post


Link to post
Share on other sites

While a bit late - and while I'm not even really into modding, but mission making/scripting - maybe this will give you some idea, on how Mikero's awesome tools can be used: you don't want to end up in your shell, manually passing parameters to Mikero's tools, pbo'ing stuff and what not. IMHO these little tools or programs aren't supposed to be directly operated by some human (use some GUI tools that rely on Mikero's tools for that...). And while cumbersome for humans, they're perfect for machines. And what you need to get things kicking is some sort of *glue*, that puts these tools together as needed.

In my case that tool is Apache Ant (see: http://ant.apache.org/), but any build tool will do. To give you some idea, what follows is my current ant script to build my RUBE library and my single player scenarios.

build.properties:

# libraries, tools
lib.antcontrib = C:/Program Files/Apache/ant-contrib-1.0b3
lib.antcontrib.jar = ${lib.antcontrib}/ant-contrib-1.0b3.jar
tool.makePBO = D:/arma2/tools/Mikero/bin/MakePbo.exe

# profile
profile.dir = D:/arma2/profiles/RUBE
profile.campaigns.dir = ${profile.dir}/Campaigns
profile.missions.dir = ${profile.dir}/Missions
profile.scripts.dir = ${profile.dir}/Scripts

# armaII game
arma2.dir = C:/Program Files/Bohemia Interactive/ArmA 2/
arma2.campaigns.dir = ${arma2.dir}/campaigns
arma2.missions.dir = ${arma2.dir}/missions
arma2.mpmissions.dir = ${arma2.dir}/mpmissions

arma2.rube.mod = ${arma2.dir}/@RUBE
arma2.rube.addons = ${arma2.rube.mod}/AddOns

# armaII workspace
arma2.workspace = D:/arma2/

# RUBE
rube.pboprefix = RUBE
rube.src = ${arma2.workspace}/RUBE
rube.out = ${arma2.workspace}/RUBE.out
rube.bat = ${rube.src}/x-build.bat

build.xml:

<project name="armaII" default="main" basedir=".">
<!-- read properties, define tasks -->
<property file="build.properties"/>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${lib.antcontrib.jar}" />

<!-- RUBE single player scenarios -->
<dirset id="single-player-scenarios" dir="${profile.missions.dir}">
	<include name="RUBE_fireants.Chernarus" />
	<include name="RUBE_fireants.Takistan" />
</dirset>

<!-- main/overview -->
<target name="main" depends="basic-tests">
	<echo>ArmAII RUBE build tools</echo>
	<echo />
	<echo> $ ant build:      build all</echo>
	<echo> $ ant build-rube: build RUBE library</echo>
	<echo> $ ant build-sp:   build RUBE single player scenarios</echo>
</target>

<!-- build all -->
<target name="build" depends="basic-tests, build-rube, build-sp">
</target>

<!-- some basic tests -->
<target name="basic-tests">
	<available type="dir" property="test.dir.1" file="${rube.src}" />
	<fail unless="test.dir.1">file not found: ${rube.src}</fail>

	<available type="dir" property="test.dir.2" file="${arma2.rube.addons}" />
	<fail unless="test.dir.2">file not found: ${arma2.rube.addons}</fail>
</target>

<!-- build RUBE library -->
<target name="build-rube">
	<!-- fix broken include system-->  
	<exec dir="${rube.src}" executable="cmd">
		<arg value="/c ${rube.bat}" />
	</exec>
	<!-- pack/pbo -->
	<exec executable="${tool.makePBO}" error="err.txt">
		<!-- options -->
		<arg value="-A" /> <!-- ArmA -->
		<arg value="-P" /> <!-- dont pause (bad status still reported) -->
		<!-- set pbo prefix -->
		<arg value="-@=${rube.pboprefix}" />
		<!-- full path to foldername -->
		<arg value="${rube.src}" />
	</exec>

	<available type="file" property="test.build.1" file="${arma2.workspace}/RUBE.pbo" />
	<fail unless="test.build.1">makePBO failed to create RUBE.pbo</fail>

	<!-- RUBE release version, simply based on current date -->
	<tstamp>
		<format property="releaseVersion" pattern="yyMMdd" locale="de,CH" />
	</tstamp>

	<!-- zip RUBE library, script version -->
	<zip destfile="${rube.out}/RUBE.${releaseVersion}.zip" basedir="${rube.src}" update="true" />

	<!-- zip RUBE library, addon version -->
	<zip destfile="${rube.out}/RUBE.${releaseVersion}-addon.zip" basedir="${arma2.workspace}" includes="RUBE.pbo" update="true" />

	<!-- copy to RUBE out, move to ARMA addons -->
	<move file="${arma2.workspace}/RUBE.pbo" tofile="${arma2.rube.addons}/RUBE.pbo" />
</target>

<!-- build all single player scenarios -->
<target name="build-sp">
	<resourcecount property="count.sp">
		<dirset refid="single-player-scenarios" />
	</resourcecount>
	<echo message="building ${count.sp} single player scenarios..." />

	<foreach param="mission" target="build-sp-scenario">
		<path><dirset refid="single-player-scenarios" /></path>
	</foreach>
</target>

<!-- build single player scenario -->
<target name="build-sp-scenario">
	<!-- get directory name from mission (which is the full path) -->
	<basename property="dirname" file="${mission}" />
	<echo message="building ${dirname}..." />
	<!-- pack/pbo -->
	<exec executable="${tool.makePBO}" error="err-sp.txt">
		<!-- options -->
		<arg value="-A" /> <!-- ArmA -->
		<arg value="-P" /> <!-- dont pause (bad status still reported) -->
		<!-- full path to foldername -->
		<arg value="${mission}" />
		<!-- dest path -->
		<arg value="${rube.out}/${dirname}.pbo" />
	</exec>

	<available type="file" property="test.build.${dirname}" file="${rube.out}/${dirname}.pbo" />
	<fail unless="test.build.${dirname}">makePBO failed to create ${dirname}.pbo</fail>

	<!-- copy to ARMA missions -->
	<copy file="${rube.out}/${dirname}.pbo" tofile="${arma2.missions.dir}/${dirname}.pbo" />
</target>

</project>

So... what does that do for me? Well, I open up a shell and enter:

ant build

...and then the build has either failed (bwahaha) or I end up with my RUBE library in two zip-files, once the script version and one for the addon version. And with all my missions pbo'ed and stuff deployed to the ArmAII game directory aswell.

To get the library built, ant first runs some batch script, since Arma's include-thingy is broken as heck (see: https://dev.withsix.com/issues/5121 - or wait.. no, better don't, ahaha :(). Next it runs MakePbo, zip's up the pbo and the source directory for the script version (to my rube.out directory) and finally moves the pbo to my addon directory.

Similar flow for the missions, which then get moved to directory for the single player scenarios (or what not).

Heck, you could aswell automate the publishing (e.g. deploy per ftp).

Anything goes.

I can't even imagine the time I'd have lost without such a build script. Manually starting that silly batch file, pushing files around and zipping stuff... booooring ;)

And now imagine if you're actually modding. Your build process will most likely include a dozen more tasks, that really, should be automated. -- Thanks to Mikero, you can do exactly that. However you need or fancy.

:yay:

PS. And yeah, I'd as well like to see/read about the workflow from other, more experienced members. Come on you guys, don't be shy. :p

Edited by ruebe

Share this post


Link to post
Share on other sites

blurb removed

Edited by Mikero

Share this post


Link to post
Share on other sites

Some use cases:

  • ExtractPbo: Extract a mission/campaign/addon pbo
  • MakePbo: Pack a mission/campaign folder to pbo (compression supported)
  • MakePbo: Pack a config only addon (folder) to pbo (compression supported)
  • Rapify: Check a config/rvmat for errors
  • PboProject: Check an addon for errors
  • ConvertWRP: Convert a WRP to PEW to be able to load it in visitor
  • PboProject: To binarize an infantry/vehicle/object/weapon addon
  • Arma2/3P: Create a P drive with the necessary unpacked data from A2:CO/A3
  • And much more!

Full list of tools today:

  • Arma2P
  • ArmA3p
  • BisCampaignMaker
  • ConvertWrp
  • DeFxy
  • DeKey
  • DeP3d
  • DePac
  • DePew
  • DeRap
  • DeRtm
  • DeTex
  • DeWrp
  • DeWss
  • DirPbo
  • Eliteness
  • ExtractPbo
  • GetDePboVersion
  • IsRap
  • LintCheckRap
  • MakePbo
  • mat14
  • MoveFolder
  • MoveObject
  • paxToTga
  • pboDeps
  • pboProject
  • QueryAddons
  • Rapify
  • SetVersion

Each tool comes with a readme.html that explains in detail all the magic. :bounce3:

Edited by .kju [PvPscene]

Share this post


Link to post
Share on other sites
blurb removed

Gesundheit!

;)

;2671118']Some use cases ... Full list of tools today ...

Sure, sure.

But the fun/interesting thing is how you actually put all these tools together.

Simply enumerating Mikero's tools doesn't really tell us much about your workflow, now does it?

-

Btw. Am I the only one that, as of latetely, has to pack his addons/missions with the "-N" option (do Nothing special. Make a pbo wysiwig) or otherwise makePbo fails/chokes on all my stupid fsm files (lintcheck says "No Token" :mad:), because there is always a comma too much at the end of the definition of the finalStates (since that's the way scriptedFSM.cfg likes to roll...)? :(

Share this post


Link to post
Share on other sites

ive had mutible problems using these tools, Ive used pbo manager latly, but theres no simple readme (for dummies)

to sign your addons,

though it deos tell you everything to do , it dosnt explain how to.

hope im not off topic.

Share this post


Link to post
Share on other sites

:butbut:' date=' nice.

Then again, GitHub/Jenkins (and keeping your own server running for that stuff too :D) might be kind of [i']a little wee bit[/i] overkill for us guys without any friends (i.e. not collaborating). But other than that; yep, that's exactly what I wanted to see (that buildscript isn't anything spectacular either though; but that's exactly the point. Using Mikero's tools with the build tool of your choice is no magic at all). :cool:

IMHO one of the more important aspects of a build tool is the part about self-documentation. Especially as a single hobby developer, you can give it a rest for a while and come back after some time... and just enter "ant build" and your stuff get's build as it did, last time you've checked (like a year ago or what not, haha). You don't need to remember to first run that silly batch file (which you wouldn't anyways) or other tricks and you don't need to worry about anything, once you've setup your stuff.

And then, once you're back in business, you get all the convenience too (well, of course...)!

What I'm trying to say is: there for sure is a middle ground - you know, somewhere below distributed version control and fully automated build processes - and an appropriate build tool/setup for smaller projects too. And really, you're quickly at such a point where it's absolutely worth it (say, once you start writing a campaign or once you make use of your Script directory in your profiles...). But somehow only "the big guys" use such stuff for "the big projects" and the ordinary small guy doesnt hear/know much about it.. At least that's my impression (and now tell me to go write about it over at the community wiki, :p).

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×