From Wiki96
Jump to: navigation, search
m (Added image)
(Adding Directives part)
 
Line 58: Line 58:
|''Not implemented yet''
|''Not implemented yet''
|}
|}
== Preprocessor Directives & Macros ==
Directives are preprocessor statements used to guide the compilation process by providing instructions to the preprocessor. In the context of WDT, a directive is defined using two dollar signs, followed by the directive name.
Here are the currently supported macros in WDT:
{| class="wikitable"
|+
!Definition
!Description
|-
|<code>$$Include("./file.js")</code>
|Include a file
|-
|<code>$$IncludeOnce("./file.js")</code>
|Include a file enable checks to ensure its only included once
|-
|<code>$$Define("Macro")</code>
| rowspan="2" |Define a macro
|-
|<code>$$Define("MacroName", "OptionalValue")</code>
|-
|<code>$$Undef("Name")</code>
|undefine a macro
|}
It's important to note that preprocessing directives must be terminated by a newline for proper parsing and execution during the compilation process. <code>$[("MacroName")]</code> allows to get a macro value.

Latest revision as of 18:20, 12 October 2023

The Windows 96 Development Toolchain running in Windows96.

The Windows 96 Development Toolchain (WDT) is a build system developed by the Windows 96 Team in 2023. It addresses the need for an efficient build system for system apps within the Windows 96 environment. This toolchain was created to overcome limitations of the old builder, providing enhanced performance, project management, and portability. WDT follows the principle of "eating your own dog food" where the system is used to build itself.

WDT runs on Windows, MacOS, Linux and Windows 96 itself.

Features

WDT offers a range of features designed to streamline the app development process within the Windows 96 ecosystem:

  • Project Management: Create, manage, and compile app projects seamlessly.
  • Preprocessing: Perform operations like handling includes and defining directives.
  • Portability: Build projects on various systems without strict location or OS constraints.
  • Concurrency: Leverage CPU concurrency to accelerate project builds.
  • Task Management: Manage the build process using WMakefiles.
  • Modernization: Replaces the outdated previous build system with a more efficient and user-friendly solution.

Commands

Here are all the WDT commands:

Command Name Argument(s) Description
build Project Path Output Path Builds a project
version Gets the current toolchain version
preproc In Path Out Path Runs a file through the source preprocessor
help Command Gets command help (or general CLI help without the command parameter)
make Path Runs a makefile (WMakefile) in the current directory or the specified path
minify Input Output Minifies JavaScript code
project init Project Path --template Template Name Inits a project at the path (from a template if specified)
project import Not implemented yet

Preprocessor Directives & Macros

Directives are preprocessor statements used to guide the compilation process by providing instructions to the preprocessor. In the context of WDT, a directive is defined using two dollar signs, followed by the directive name.

Here are the currently supported macros in WDT:

Definition Description
$$Include("./file.js") Include a file
$$IncludeOnce("./file.js") Include a file enable checks to ensure its only included once
$$Define("Macro") Define a macro
$$Define("MacroName", "OptionalValue")
$$Undef("Name") undefine a macro

It's important to note that preprocessing directives must be terminated by a newline for proper parsing and execution during the compilation process. $[("MacroName")] allows to get a macro value.