[1353773.415012] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[1717914.743513] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[1723402.978913] mocp[23166]: segfault at 0 ip 00007fb77d367414 sp 00007fffb13e1890 error 4 in libc-2.23.so[7fb77d32c000+1c0000]
[1723517.951390] mocp[24536]: segfault at 0 ip 00007fc0a1ba3414 sp 00007ffe36b981b0 error 4 in libc-2.23.so[7fc0a1b68000+1c0000]
[1723796.295052] mocp[26449]: segfault at 0 ip 00007fc9e2869414 sp 00007ffe62e2d6d0 error 4 in libc-2.23.so[7fc9e282e000+1c0000]
[1724374.530637] mocp[29504]: segfault at 0 ip 00007fdd72321414 sp 00007ffce40e7810 error 4 in libc-2.23.so[7fdd722e6000+1c0000]
[1724577.869046] mocp[30596]: segfault at 0 ip 00007fd33af82414 sp 00007ffe91355710 error 4 in libc-2.23.so[7fd33af47000+1c0000]
[1724597.233037] mocp[30725]: segfault at 0 ip 00007ff32f4db414 sp 00007ffd8134cd00 error 4 in libc-2.23.so[7ff32f4a0000+1c0000]
[1724611.901296] mocp[30816]: segfault at 0 ip 00007f7b285a7414 sp 00007fff9875ecb0 error 4 in libc-2.23.so[7f7b2856c000+1c0000]
[1724639.114351] mocp[30970]: segfault at 0 ip 00007fec465d2414 sp 00007ffc03ced160 error 4 in libc-2.23.so[7fec46597000+1c0000]
[1724656.178450] mocp[31068]: segfault at 0 ip 00007f3d5a85d414 sp 00007ffd9bba2eb0 error 4 in libc-2.23.so[7f3d5a822000+1c0000]
[1767912.183623] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[2128531.801117] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[2206519.119045] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[2212439.559272] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[2213906.671638] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[2253510.242385] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[2343792.133507] traps: calcurse[30413] general protection ip:7ff97c20fbf2 sp:7ffdb88c0d70 error:0 in libc-2.23.so[7ff97c18c000+1c0000]
[2347667.866567] test-delnull[10242]: segfault at 8 ip 0000000000400e14 sp 00007ffd2bc96250 error 4 in test-delnull[400000+2000]
[2397722.989999] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[2645607.338408] conntrack: generic helper won't handle protocol 132. Please consider loading the specific helper module.
[2653214.415785] zita-n2j[27952]: segfault at 10 ip 00000000004042b7 sp 00007fc1ebd53ca8 error 4 in zita-n2j[400000+9000]
[2653464.107565] zita-n2j[31250]: segfault at 10 ip 00000000004042b7 sp 00007f1e32669ca8 error 4 in zita-n2j[400000+9000]
[2653537.443720] zita-n2j[31965]: segfault at 10 ip 00000000004042b7 sp 00007f9145258ca8 error 4 in zita-n2j[400000+9000]
[2653579.100637] zita-n2j[32360]: segfault at 10 ip 00000000004042b7 sp 00007f36e450dca8 error 4 in zita-n2j[400000+9000]
[2654107.988611] zita-n2j[319]: segfault at 10 ip 00000000004042b7 sp 00007ff97e581ca8 error 4 in zita-n2j[400000+9000]
[2654379.273795] zita-n2j[5524]: segfault at 10 ip 00000000004042b7 sp 00007f795f498ca8 error 4 in zita-n2j[400000+9000]
[2654419.977851] zita-n2j[7740]: segfault at 10 ip 00000000004042b7 sp 00007f57eb951ca8 error 4 in zita-n2j[400000+9000]
[2655843.229255] zita-n2j[8190]: segfault at 10 ip 00000000004042b7 sp 00007f9a40f90ca8 error 4 in zita-n2j[400000+9000]
[2805201.874813] test-delnull[20960]: segfault at 8 ip 0000000000400e14 sp 00007ffee86fd560 error 4 in test-delnull[400000+2000]
[2867563.247055] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[3147249.715461] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[3186219.458841] ucc-bin[18288]: segfault at a6c ip 00000000f731a407 sp 00000000ffa37e90 error 4 in Core.so[f7299000+af000]
[3186220.503112] ucc-bin[18308]: segfault at a6c ip 00000000f73f3407 sp 00000000ffd05ed0 error 4 in Core.so[f7372000+af000]
[3186221.545644] ucc-bin[18342]: segfault at a6c ip 00000000f7360407 sp 00000000ffd9c0d0 error 4 in Core.so[f72df000+af000]
[3186222.593100] ucc-bin[18349]: segfault at a6c ip 00000000f73c3407 sp 00000000ffe1f210 error 4 in Core.so[f7342000+af000]
[3186223.639743] ucc-bin[18370]: segfault at a6c ip 00000000f730e407 sp 00000000fffa9f50 error 4 in Core.so[f728d000+af000]
[3186224.682263] ucc-bin[18391]: segfault at a6c ip 00000000f73cc407 sp 00000000ff8a5090 error 4 in Core.so[f734b000+af000]
[3186225.724623] ucc-bin[18399]: segfault at a6c ip 00000000f73a6407 sp 00000000fffd18d0 error 4 in Core.so[f7325000+af000]
[3186226.767128] ucc-bin[18433]: segfault at a6c ip 00000000f736f407 sp 00000000ff9d6bd0 error 4 in Core.so[f72ee000+af000]
[3186227.810560] ucc-bin[18440]: segfault at a6c ip 00000000f73d7407 sp 00000000ffab7c90 error 4 in Core.so[f7356000+af000]
[3186228.853257] ucc-bin[18462]: segfault at a6c ip 00000000f733d407 sp 00000000ffd8ad10 error 4 in Core.so[f72bc000+af000]
[3186229.896376] ucc-bin[18496]: segfault at a6c ip 00000000f73fd407 sp 00000000ffa18550 error 4 in Core.so[f737c000+af000]
[3186230.939045] ucc-bin[18507]: segfault at a6c ip 00000000f73df407 sp 00000000ff9e4490 error 4 in Core.so[f735e000+af000]
[3186231.981709] ucc-bin[18515]: segfault at a6c ip 00000000f73b1407 sp 00000000ffe31290 error 4 in Core.so[f7330000+af000]
[3186233.024479] ucc-bin[18563]: segfault at a6c ip 00000000f7353407 sp 00000000fffe10d0 error 4 in Core.so[f72d2000+af000]
[3186471.356999] ucc-bin[21871]: segfault at a6c ip 00000000f732d407 sp 00000000fffc2810 error 4 in Core.so[f72ac000+af000]
[3186500.075160] ucc-bin[22300]: segfault at a6c ip 00000000f73ba407 sp 00000000ffb4ac50 error 4 in Core.so[f7339000+af000]
[3186556.996819] ucc-bin[23119]: segfault at a6c ip 00000000f73a2407 sp 00000000ff9bc750 error 4 in Core.so[f7321000+af000]
[3186616.454231] ucc-bin[23972]: segfault at a6c ip 00000000f7367407 sp 00000000ff894210 error 4 in Core.so[f72e6000+af000]
[3186632.375856] ucc-bin[24251]: segfault at a6c ip 00000000f73b0407 sp 00000000ffac1f90 error 4 in Core.so[f732f000+af000]
[3186702.224654] ucc-bin[25222]: segfault at a6c ip 00000000f73f9407 sp 00000000ffe37b90 error 4 in Core.so[f7378000+af000]
[3186762.442605] ucc-bin[26154]: segfault at a6c ip 00000000f73db407 sp 00000000ffce8c50 error 4 in Core.so[f735a000+af000]
[3186779.811682] ucc-bin[26428]: segfault at a6c ip 00000000f73ac407 sp 00000000ffdaa850 error 4 in Core.so[f732b000+af000]
[3186804.883950] ucc-bin[26814]: segfault at a6c ip 00000000f7385407 sp 00000000ffebdcd0 error 4 in Core.so[f7304000+af000]
[3186826.124721] ucc-bin[27175]: segfault at a6c ip 00000000f734f407 sp 00000000ff93c550 error 4 in Core.so[f72ce000+af000]
[3186850.984788] ucc-bin[27590]: segfault at a6c ip 00000000f73c1407 sp 00000000fff16610 error 4 in Core.so[f7340000+af000]
[3186883.927370] ucc-bin[28109]: segfault at a6c ip 00000000f73cb407 sp 00000000ffde2bd0 error 4 in Core.so[f734a000+af000]
[3186897.450197] ucc-bin[28321]: segfault at a6c ip 00000000f73d5407 sp 00000000ffd93990 error 4 in Core.so[f7354000+af000]
[3186909.873250] ucc-bin[28520]: segfault at a6c ip 00000000f7304407 sp 00000000fff0b490 error 4 in Core.so[f7283000+af000]
[3187248.043862] ucc-bin[790]: segfault at a6c ip 00000000f7358407 sp 00000000ffa52fd0 error 4 in Core.so[f72d7000+af000]
[3187251.221196] ucc-bin[849]: segfault at a6c ip 00000000f73b6407 sp 00000000ffecdad0 error 4 in Core.so[f7335000+af000]
[3187252.447746] ucc-bin[859]: segfault at a6c ip 00000000f73a1407 sp 00000000ffe75450 error 4 in Core.so[f7320000+af000]
[3187253.711835] ucc-bin[895]: segfault at a6c ip 00000000f73ba407 sp 00000000ffafc4d0 error 4 in Core.so[f7339000+af000]
[3187254.977037] ucc-bin[910]: segfault at a6c ip 00000000f73ea407 sp 00000000ffe6af10 error 4 in Core.so[f7369000+af000]
[3187256.242617] ucc-bin[948]: segfault at a6c ip 00000000f7336407 sp 00000000ff991390 error 4 in Core.so[f72b5000+af000]
[3187257.507531] ucc-bin[969]: segfault at a6c ip 00000000f7358407 sp 00000000ffb8f390 error 4 in Core.so[f72d7000+af000]
[3187258.773626] ucc-bin[1009]: segfault at a6c ip 00000000f73e4407 sp 00000000ff9748d0 error 4 in Core.so[f7363000+af000]
[3187260.002233] ucc-bin[1019]: segfault at a6c ip 00000000f73e5407 sp 00000000ff81ac50 error 4 in Core.so[f7364000+af000]
[3187261.272280] ucc-bin[1057]: segfault at a6c ip 00000000f73f7407 sp 00000000ffc65510 error 4 in Core.so[f7376000+af000]
[3187313.882545] ucc-bin[1850]: segfault at a6c ip 00000000f73b1407 sp 00000000ff82fed0 error 4 in Core.so[f7330000+af000]
[3187344.476709] ucc-bin[2296]: segfault at a6c ip 00000000f7343407 sp 00000000ffd73a90 error 4 in Core.so[f72c2000+af000]
[3187377.911535] ucc-bin[2775]: segfault at a6c ip 00000000f7347407 sp 00000000ffd816d0 error 4 in Core.so[f72c6000+af000]
[3187462.274216] ucc-bin[3947]: segfault at a6c ip 00000000f73f7407 sp 00000000ffb83890 error 4 in Core.so[f7376000+af000]
[3187519.859206] ucc-bin[4792]: segfault at a6c ip 00000000f732d407 sp 00000000fff36fd0 error 4 in Core.so[f72ac000+af000]
[3187599.174741] ucc-bin[5912]: segfault at a6c ip 00000000f73d6407 sp 00000000ffcea610 error 4 in Core.so[f7355000+af000]
[3187615.430626] ucc-bin[6178]: segfault at a6c ip 00000000f730a407 sp 00000000ffb49810 error 4 in Core.so[f7289000+af000]
[3187686.101745] ucc-bin[7227]: segfault at a6c ip 00000000f7336407 sp 00000000ffbf8f10 error 4 in Core.so[f72b5000+af000]
[3187699.301827] ucc-bin[7451]: segfault at a6c ip 00000000f73a6407 sp 00000000ffad41d0 error 4 in Core.so[f7325000+af000]
[3193285.562158] ucc-bin[26895]: segfault at a6c ip 00000000f736c407 sp 00000000ffc88f80 error 4 in Core.so[f72eb000+af000]
[3193287.321397] ucc-bin[26939]: segfault at a6c ip 00000000f73ba407 sp 00000000ffb01c80 error 4 in Core.so[f7339000+af000]
[3193289.084178] ucc-bin[26953]: segfault at a6c ip 00000000f73e3407 sp 00000000ffa8dc80 error 4 in Core.so[f7362000+af000]
[3193290.848513] ucc-bin[26993]: segfault at a6c ip 00000000f730f407 sp 00000000ff8f49c0 error 4 in Core.so[f728e000+af000]
[3193525.366602] ucc-bin[30334]: segfault at a6c ip 00000000f7323407 sp 00000000ffe3a0c0 error 4 in Core.so[f72a2000+af000]
[3193531.782499] ucc-bin[30468]: segfault at a6c ip 00000000f73bc407 sp 00000000fff73300 error 4 in Core.so[f733b000+af000]
[3246233.663668] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[3322604.931484] ucc-bin[15547]: segfault at a6c ip 00000000f7380407 sp 00000000ffba3130 error 4 in Core.so[f72ff000+af000]
[3486853.852231] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[3671154.839239] ucc-bin[32066]: segfault at a6c ip 00000000f73d3407 sp 00000000ffcf8670 error 4 in Core.so[f7352000+af000]
[3862809.609859] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[3930227.759058] sd 0:0:0:0: Attached scsi generic sg0 type 0
[3930227.759139] sr 4:0:0:0: Attached scsi generic sg1 type 5
[3930227.759294] sd 8:0:0:0: Attached scsi generic sg2 type 0
[4040352.408769] ucc-bin[2548]: segfault at a6c ip 00000000f73c3407 sp 00000000ffcce230 error 4 in Core.so[f7342000+af000]
[4045993.449418] ucc-bin[16323]: segfault at a6c ip 00000000f7382407 sp 00000000fffdd7b0 error 4 in Core.so[f7301000+af000]
[4192978.837166] ucc-bin[12127]: segfault at a6c ip 00000000f73b2407 sp 00000000ffa51cf0 error 4 in Core.so[f7331000+af000]
[4225828.292016] calcurse[3184]: segfault at 7fee9728d0f0 ip 00007fee93e6d58b sp 00007fff2137b6a0 error 4 in libc-2.23.so[7fee93def000+1c0000]
[4264697.685901] ucc-bin[7594]: segfault at a6c ip 00000000f73d7407 sp 00000000ff9987f0 error 4 in Core.so[f7356000+af000]
[4294191.337598] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[4341659.716899] test-delnull[21889]: segfault at 8 ip 0000000000400e14 sp 00007ffc40ceff90 error 4 in test-delnull[400000+2000]

RANDOM FORTUNE:

"Don't come back until you have him", the Tick-Tock Man said quietly, sincerely, extremely dangerously. They used dogs. They used probes. They used cardio plate crossoffs. They used teepers. They used bribery. They used stick tites. They used intimidation. They used torment. They used torture. They used finks. They used cops. They used search and seizure. They used fallaron. They used betterment incentives. They used finger prints. They used the bertillion system. They used cunning. They used guile. They used treachery. They used Raoul-Mitgong but he wasn't much help. They used applied physics. They used techniques of criminology. And what the hell, they caught him.
          -- Harlan Ellison, "Repent, Harlequin, said the Tick-Tock Man"

Compiling UScript in Linux

Tools That You Need

First of all, you cannot compile or export UScript with the native Linux UCC. You need the DLLs and EXEs from the Windows version of the game and Wine.

Head over to http://www.winehq.com and look for a package for your distro or else get the source and compile and install manually.

You will also need to be running either a 32bit OS, or 64bit with multilib (sometimes known as compat32) libraries installed. This is because UT was only ever released as a 32bit application.

alienBob has multilib libraries for Slackware: link.

When Wine is installed, open up winecfg (type winecfg in a terminal) and have a look at your drive letters. The reason for this is we will need to tell Wine where UT is installed later on. You may likely need a path like Z:\path\to\ut... or you may want to manually add the partition on the drives tab. E.G. mine is in H:\

Next you will need UCC.EXE and the DLLs from the Windows UT disk, so copy them from the CD into your ut/System folder.

A Quick Test

cd into your ut/System folder and type wine ucc 2>/dev/null. You should see a message:

=======================================
ucc.exe: UnrealOS execution environment
Copyright 1999 Epic Games Inc
=======================================

Use "ucc help" for help

The 2>/dev/null will suppress any wine errors. So long as you get the welcome message above, all is well.

Exporting Code

The command line is:

wine ucc batchexport PACKAGE class .uc \ UTDir\\PACKAGE\\Classes

You need double \\ or wine will not find the directories. So for example to export all scripts in BotPack do:

wine ucc batchexport BotPack.u class .uc \ h:\\ut\\BotPack\\Classes

Replace h:\\ut with the path to UT you noted from winecfg earlier.

The Command Line Explained

Batchexport tells ucc we want to export something
BotPack.u is the name of the package we want to export
Class tells ucc that we want classes
.uc is the file extension we want
h:\\ut\\BotPack\\Classes tells ucc where to save files to

After issuing this command you should see a list of classes fly past and finally at the end:

Success - 0 error(s), 0 warnings

Now we can cd up a directory and check that there is in fact a BotPack directory with a subdirectory of Classes, containing all the .uc files from BotPack. So far, so good.

Compiling Code

OK so you have some code that you want to compile. It must be in a subdirectory 'Classes' of a subdirectory of your package name, which is a subdirectory of the main UT directory. For example:

ut/MyPackage/Classes/MyScript.uc

Also, you must rename/delete any older compiled package from the System directory before compiling, or your new code will not compile.

Next add your package to the bottom of the EditPackages= list in UnrealTournament.ini e.g.

EditPackages=MyPackage

Now we are good to go. The command line is:

wine ucc make

Now you should either have a success message, or a load of errors. If you get errors ucc is usually kind enough to point you to where they are in the code. If everything went OK you can boot up UT and play with your new toy.

Automating

Wouldn't it be nice not to have to type a whole lot of commands to do this? Yes it would. So I have a few scripts that make decompiling and compiling a lot easier.

My uccmake script:

#!/bin/sh
rm -f /path/to/ut/System/PackageName.u
wine /path/to/ut/System/ucc make 2>/dev/null

Now when I'm working on a package I edit the script with the package name, and then I can just run uccmake in a terminal.

I also have a uccexport script:

#!/bin/sh
wine h:\\ut\\System\\ucc batchexport $1.u class .uc \
h:\\ut\\$1\\Classes 2>/dev/null

Typing uccexport PackageName will export the classes for PackageName, passed as an argument to the script. Note that I have used normal Linux paths in one script, and Windows style paths in the other. Using Linux paths has limited success with ucc.exe, so if one way doesn't work, try the other method.