Creating Component: Build from Source
This a part of the How-to: Create Components Guide
We are going to use SDL2TRS as an example and remember that each build is different from another.
Tip:
To avoid modifying your primary system, consider using a remote server, virtual machine (VM), or a containerized solution such as Distrobox.
Note:
This assumes you have read Creating Component: Guide.
Step 0: Make a testing folder
- Have a local copy of RetroDECK Cooker installed.
- Create a components directory for example:
~/retrodeck_dev/components/
Step 1: Clone / Download the Source
- Go to:
~/retrodeck_dev/components/. - Create a folder in
~/retrodeck_dev/components/<component_name>that matches the name of the component you want to add. - Open a terminal window from the component folder.
- Clone the repo or download the source files.
- You will now a repo folder under
~/retrodeck_dev/components/<source>.
Step 2: Create a Build Environment and Build
- Review the project’s official unique documentation for detailed build instructions and prerequisites.
- Configure your development environment according to the documented requirements.
- Build the binary for the target platform: Linux x86_64.
Example: Building SDL2TRS
Setup a Debian- or Ubuntu-based build environment and run:
sudo apt install libsdl2-dev libreadline-dev
Build with CMake (Recommended)
The resulting SDL2TRS binary will be created in the build/ directory.
Step 3: Testing
During this step, identify and document the following:
- Binary
- Dependencies
- Libraries
- Other important files
Testing Procedure
- Launch the binary from the RetroDECK Flatpak shell:
flatpak run --command=bash net.retrodeck.retrodeck --debug - Launch the application normally within your host OS environment (outside RetroDECK).
- Document the results in detail.
While testing, record:
- Fully functional features
- Partially functional features
- Non-functional components
- Errors, warnings, crashes, or unexpected behavior
Issue resolution will be handled later during the Alchemist and Hunter step.
Example Considerations
- Are all expected features functioning correctly?
- Does the application create directories or files in user locations (
~/Documents,~/.local,~/.config,~/, or other paths)? - Does the application report any missing libraries or dependencies, both outside and inside the Flatpak environment?
- Does it crash at startup or during normal operation, both outside and inside the Flatpak environment?
Step 4: Creating Component: Ingredient & Recipe Files
You now will need to move on to the next step:
Read more here: Creating Component: Ingredient Files Guide