Alternative file layout

From MSX Game Library

Revision as of 13:52, 31 October 2023 by Aoineko (talk | contribs)

By default, projects using MSXGL are placed inside the library tree in the projects directory. This allows all projects to share the same library source and data, and common build options (in /projects/default_config.js).

Default layout:

πŸ“ MSXgl
β”œβ”€πŸ“ engine
β”œβ”€πŸ“ projects
β”‚ β””β”€πŸ“ MyProject
β””β”€πŸ“ tools

Having said that, some users might prefer the opposite: to have one directory per project and the MSXgl directory inside (which is more classic and doesn't generate duplication if you only have one project).

Alternative layout:

πŸ“ MyProject
β””β”€πŸ“ MSXgl
  β”œβ”€πŸ“ engine
  β”œβ”€πŸ“ projects
  β””β”€πŸ“ tools

Here are the steps to follow:

  • Create your MyProject directory wherever you want.
  • Install MSXgl in it (in MyProject/MSXgl for example).
  • Create your source files in the MyProject directory. For example, copy all the files from the MSXgl/projects/template directory to the root of your project.
  • Modify the build.bat (Windows) or build.sh (Linux/macOS) to indicate the path to Node.js (in MSXgl/tools/build/Node<tt>) and to the build script (<tt>MSXgl/engine/script/js<tt>).
  • You're done :) You can now build your project from the root of your directory.