-
Notifications
You must be signed in to change notification settings - Fork 242
XNA Profiles
JSILc includes a set of profiles for XNA 3.1 and XNA 4.0. If it detects that the project you're building is an XNA game (you'll need to feed it your .sln file, not your executable), it will automatically load the appropriate profile and use it to process your game content.
JSILc looks for a project containing the targets from XNA Game Studio 3.1 or 4.0. This means that the Windows Game Project template should be detected.
The XNA profile scans your project for one or more content projects (.contentproj files) and processes the ones that your game project referenced. Each content project processed produces one or more browser-ready output files, along with a manifest (Foo.contentproj.manifest.js) that you can include into a page in order to give the JSIL preloader (JSIL.Browser.js) the information it needs to load that content.
When combined with the appropriate application manifests (Foo.exe.manifest.js, etc) and the right stub libraries (JSIL.XNACore.js followed by JSIL.XNA3.js or JSIL.XNA4.js, as appropriate) your application should work with no additional changes.
##Configuration In addition to the standard configuration options for JSILc, the XNA profiles have additional options that you can set by adding a 'ProfileSettings' key to your configuration file, like so:
{
"OutputDirectory": "%configpath%",
"ProfileSettings": {
...
}
}
The ProfileSettings dictionary can contain the following setting keys:
Key | Type | Default Value | Description |
---|---|---|---|
ContentOutputDirectory | String | null | If specified, sets the location for converted XNA content. If this is not set, no content will be converted! A good choice is "%configpath%/Content". |
JPEGQuality | Integer | 90 | The quality level to use when converting textures to JPEG. 1-100. |
MP3Quality | String | -V 3 | The quality parameter(s) to pass to LAME when generating MP3s. |
MP3Quality | String | -V 3 | The quality parameter(s) to pass to LAME when generating MP3s. |
##Dependencies MP3 conversion requires the console version of LAME to be located where JSILc can find it. Currently, it looks in ..\Upstream\LAME\lame.exe. OGG conversion requires the console version of OggEnc to be located where JSILc can find it. Currently, it looks in ..\Upstream\OggEnc\oggenc2.exe. If your sound files are not stored in .WAV (for example, if you added an .MP3 to your content project), JSILc will attempt to use FFMPEG to decode them before converting them to OGG and MP3. It currently looks in ..\Upstream\FFMPEG\ffmpeg.exe.