Commands
This extension adds the following commands to the Visual Studio Code Command Palette:
- Raylib: Create New Project - This command allows you to create a new Raylib project using the Raylib Project Creator (RPC). It will prompt you for the project name and location, and then generate the necessary files and folder structure for your new project.
- Raylib: Build Project - This command compiles the current Raylib project using the configured C/C++ compiler. It will display any compilation errors or warnings in the output panel.
- Raylib: Build with Extra Parameters - This command allows you to build the current Raylib project with additional parameters. You can specify custom compiler flags or options to modify the build process.
- Raylib: Clean Project - This command cleans the build artifacts of the current Raylib project. It removes any compiled files and resets the build state, allowing you to start fresh.
- Raylib: Rebuild Project - This command performs a clean and build of the current Raylib project. It first cleans the build artifacts and then compiles the project from scratch.
- Raylib: Compìle and Run Project - This command compiles the current Raylib project and runs the resulting executable. It is a convenient way to quickly test your game after making changes.
Build Command
The build command is used to compile the current Raylib project. It utilizes the configured C/C++ compiler and any specified build parameters. The output of the build process, including any errors or warnings, will be displayed in the output panel of Visual Studio Code.
Windows Users
To use this command on Windows, ensure that you have the MinGW compiler installed and properly configured in the extension settings. The build command will invoke the MinGW compiler to compile your Raylib project.
Build With Extra Parameters Command
The "Build with Extra Parameters" command allows you to customize the build process by specifying additional compiler flags or options. This can be useful for enabling specific features, optimizing performance, or debugging your Raylib project.
When you execute this command, you will be prompted to enter the extra parameters you wish to use for the build. These parameters will be passed to the compiler during the build process.
NOTE: If you need a permanent configuration for extra parameters, you can set them in the extension settings under "Raylib: Extra Build Parameters". This way, you won't have to enter them each time you build your project.
Windows Users
To use this command on Windows, ensure that you have the MinGW compiler installed and properly configured in the extension settings. The build command will invoke the MinGW compiler to compile your Raylib project.
Clean Command
The "Clean Project" command is used to remove all build artifacts from the current Raylib project. This includes any compiled files, object files, and temporary files generated during the build process. Cleaning the project allows you to start fresh and ensures that there are no leftover files that could interfere with the build.
When you execute this command, it will delete the build artifacts and reset the build state of your project. This is particularly useful if you encounter issues during the build process or if you want to ensure that your project is built from scratch.
Windows Users
To use this command on Windows, ensure that you have the MinGW compiler installed and properly configured in the extension settings. The build command will invoke the MinGW compiler to compile your Raylib project.
Rebuild Command
The "Rebuild Project" command combines the functionality of the "Clean Project" and "Build Project" commands. It first cleans the build artifacts of the current Raylib project and then compiles the project from scratch. This ensures that you have a fresh build without any leftover files from previous builds.
Windows Users
To use this command on Windows, ensure that you have the MinGW compiler installed and properly configured in the extension settings. The build command will invoke the MinGW compiler to compile your Raylib project.
Compile and Run Command
The "Compile and Run Project" command is a convenient way to quickly test your Raylib game after making changes. It compiles the current Raylib project and then runs the resulting executable. This allows you to see the effects of your code changes in real-time.
When you execute this command, it will first compile the project using the configured C/C++ compiler. If the compilation is successful, it will automatically launch the executable, allowing you to play or test your game immediately.
Windows Users
To use this command on Windows, ensure that you have the MinGW compiler installed and properly configured in the extension settings. The build command will invoke the MinGW compiler to compile your Raylib project.
Status Bar Integration
This extension also integrates with the Visual Studio Code status bar to provide quick access to the build and run commands. You can click on the status bar items to execute the corresponding commands without having to open the Command Palette.