Jump to content
OGXbox.com

Recommended Posts

A bit late to the party as it's been floating around for ages..

The past few months I have been tinkering with the Xbox tree seeing how it works..
and much like my work with the NT 5 tree, Environment Variables will totally change a build.

 

I'm making this thread to list down what environment variables I know (most will already know this),
as a reference for me and anyone interested..

Also citation on errors or misinformation is greatly welcomed,
I won't be putting the standard "_NT386TREE" kind of ones..
Anything with a * I am unsure about..

These are related to targeting "Retail" and trigger quite a few changes during build.
• RETAILXM3=1
• OFFICIAL_BUILD=1     *
or
• RETAILXM3P=1
• OFFICIAL_BUILD=1     *

This one caused a load of errors, I didnt look much into this one yet.
• COVERAGE_BUILD=1     *
 

For some reason this one was never set for the tree I work with,
some postbuild scripts require this.
• _BUILDVER=4400

This one seems to affect more 'closer to production' build options,
several postbuild scripts rely on this set.
• COMPUTERNAME=XBuilds

This one needs to be set before razzle gets to "ntuser.cmd" as it specifies build options.
• NTDEBUG=release
Causes:
• 'ltcg ~dm' to be added to %BUILD_OPTIONS%
• sets NTDEBUG=ntsdnodbg
• sets NODEVKIT=1
But setting to:
• NTDEBUG=free
Causes:
• 'ltcg profile' to be added to %BUILD_OPTIONS%
• NODEVKIT=1

These are related to Checked builds.
• BUILD_ALT_DIR=d
• CHECKED_ALT_DIR=     *
• FREEBUILD=0     *

This one is presumably set on retail builds
• FREEBUILD=0      *

This one in theory enables some alternative textures and model placements for the dashboard,
most likely used during testing.
• COOL_DASH=1    *

This one I am unsure about its purpose, it's referenced throughout the code..
• SILVER=


I will add more as I find them, if anyone else knows any worth noting please add!

Link to comment
Share on other sites

  • 2 weeks later...

I can't edit the main thread (still getting used to the forum) a revised list of above takes from the wiki I set up:

 

Default set variables

This section will have a very brief overview of default variables set when loading the env

These are almost always the same for each person, the main one is BUILD_DEFAULT that may differ if you add any compiler or nmake flags and the ones with %USERNAME% are literally your user name

BUILD_DEFAULT=ntoskrnl ntkrnlmp xbox daytona -e -nmake -i -w -P //The default 'options' the build env uses

BUILD_DEFAULT_TARGETS=-386 //Default target ARCH, usually x86 (Intel 386)

BUILD_MAKE_PROGRAM=nmake.exe //The chosen 'make' tool for the buld

BUILD_MULTIPROCESSOR=1 //Multiprocessor Builds enabled

BUILD_PRODUCT=NT //Xbox OS is NT derived so this tells the env

BUILD_PRODUCT_VER=500 //Tells the env it's NT5 Based target

IDW_DIR=$:\xbox\public\idw //This tells the env where the IDW folder is

INIT=$:\xbox\private\developr\%USERNAME% //Where your Dev Profile is and loaded from

MSTOOLS_DIR=$:\xbox\public\mstools //MS Build Tools location

NTMAKEENV=$:\xbox\PUBLIC\OAK\BIN //Default location for the NT Makefile

NTPROJECTS=public //Related to Projects enlisted to

NTTESTENV=$:\xbox\NTTEST //Related to Projects/NT Test items

_BINPLACE_ROOT=$:\xbox\xboxbuilds //Main location holding FRE and CHK Built files

_BINPLACE_SUBDIR=fre //The folder set for output files (Build type)

_NT386TREE=$:\xbox\xboxbuilds\fre //Where the current built files are placed

_NTBINDIR=$:\xbox //Source Tree root location

_NTDrive=$: //Source Drive

_NTRoot=\xbox //Name of the source root

_NTUSER=%USERNAME% //Current Build User

Non-Default set variables

Ones with a * need more information/confirming

These are related to targeting "Retail" and trigger quite a few changes during build.

RETAILXM3=1

OFFICIAL_BUILD=1

or

RETAILXM3P=1

MCP_MODE3P=1 *

OFFICIAL_BUILD=1 *

This one is to do with targeting DevKits

DEVKIT=1

This one caused a load of errors, I didn't look much into this one yet.

COVERAGE_BUILD=1 *

For some reason this one was never set for the tree I work with, some postbuild scripts require this.

_BUILDVER=4400

This one seems to affect more 'closer to production' build options, several postbuild scripts rely on this set.

COMPUTERNAME=XBuilds

This one needs to be set before razzle gets to "ntuser.cmd" as it specifies build options.

NTDEBUG=release

Causes:`

ltcg ~dm to be added to %BUILD_OPTIONS%NTDEBUG=ntsdnodbgNODEVKIT=1

But setting to:

NTDEBUG=free

Causes:

ltcg profile to be added to %BUILD_OPTIONS%

NODEVKIT=1

These are related to Checked builds.

BUILD_ALT_DIR=d

CHECKED_ALT_DIR= *

DBG=1 *

FREEBUILD=0 *

This one is presumably set on retail builds

FREEBUILD=1 *

I think this is related to Retail Builds

SYS_QT=1 *

This one in theory enables some alternative textures and model placements for the dashboard, most likely used during testing. ONLY AFFECTS XAPP/DASH

COOL_DASH=1 *

This one sets targeting the FOCUS video encoder based machines

FOCUS=1

Variables Needing Exploring

This one I am not sure on but it causes unresolved exceptions, most likely relating to profiling and testing parts of the xbox system

_XBOX_ENABLE_PROFILING=1 *

This one I am unsure about its purpose, it's referenced throughout the code..

SILVER=1 *

These ones I personally have no idea yet what they do, please add info if you know

USE_VC7

ENABLE_LINK_TIME_CODE_GENERATION

MSC_OPTIMIZATION

MCP_B02XM3

MCP_XMODE2 //I think this is related to actual Debug Kits

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

Board Life Status


Board startup date: April 23, 2017 12:45:48
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.