Skip to content
kevingadd edited this page Apr 14, 2012 · 12 revisions

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.

How it works

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 Default Value Description
ContentOutputDirectory 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".
Clone this wiki locally