Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions content/post/raylib-appimage.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
title: "AppImage for raylib projects"
url: "raylib-appimage"
titleHtml: "<small>Creating a linux</small><br><b>AppImage for raylib projects</b>"
license: ccby4.0
author: The Science of Code
date: 2025-04-16
categories:
- raylib
tags:
- raylib
- linux
- appimage
- tutorial
keywords:
- raylib
- linux
- appimage
- tutorial
autoThumbnail: true
autoThumbnailText: <i class="fab fa-linux"></i>
autoThumbnailStyle: background:linear-gradient(35deg,#7ded4d,#edde55);color:#000;
coverImage: /images/posts/raylib-tutorial.png
coverSize: min
coverStyle: background:linear-gradient(35deg,#ed4d4d,#ed9140);color:#fff
coverMetaClass: post-meta-white
thumbnailImagePosition: left
---

This practical guide shows how to build an **AppImage** for a **raylib** project.
<!--more-->

This tutorial is a quickstart for Linux **AppImages**. You can use these steps on any distribution. There are three main parts: *installing appimage-buidler*, *getting raylib and a base project* and finally, *building the **AppImage***.


## Installing AppImage-builder

Use these commands to install appimage-builder:

```sh
wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
chmod +x appimage-builder-x86_64.AppImage

# Install
sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder
```

## Getting raylib and a base project

> **Requirements**:
> * Install **raylib** and clone base project by [following this tutorial](/raylib-vscode-c-cpp-debug).

After installing **raylib** and cloning the repository, just open the project folder using the **vscode** IDE and press **ctrl + shift + b** to build for **Linux**. Then press **ctrl + shift + d** to Debug, just double check that you are choosing the right OS. You should see a window containing a text.

![raylib tutorial vscode linux windows mac debug](/images/posts/raylib_tutorial.png)

## Building the AppImage

After building the base project, run these commands:

```sh
cd build/linux

# Create directory structure
mkdir -p AppDir/lib
# Copy executable into AppDir/
cp main AppDir/
```

Now, we are going to run a utility to generate our appimage recipe:

```sh
appimage-builder --generate
```

Follow these answers to generate a right recipe:

* ID: raylibc (could be anything)
* Application name: raylibc (could be anything)
* Icon: application-vnd.appimage (customize or use default value)
* Executable path: **main** (executable filename)
* Arguments: $@ (use default value)
* Version: latest (use default value)
* Update information: guess (use default value)
* Architecture: x86_64 (select a value according to your target CPU)

Due to the structure of the default **raylib** installation, we need to add manually the shared executables into our AppDir directory:

```sh
# This is the path for raylib x64 5.5.0
# You can customize this commands as required
cp /usr/local/lib64/libraylib.so.5.5.0 AppDir/lib/
mv AppDir/lib/libraylib.so.5.5.0 AppDir/lib/libraylib.so.550
```

Finally, we can run the command to generate our **AppImage**:

```sh
appimage-builder --recipe AppImageBuilder.yml
```
100 changes: 100 additions & 0 deletions content/post/raylib-appimage.es.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
title: "AppImage para proyectos de raylib"
url: "raylib-appimage"
titleHtml: "<small>Creando en Linux</small><br><b>Una AppImage para proyectos de raylib</b>"
license: ccby4.0
author: The Science of Code
date: 2025-04-16
categories:
- raylib
tags:
- raylib
- linux
- appimage
- tutorial
keywords:
- raylib
- linux
- appimage
- tutorial
autoThumbnail: true
autoThumbnailText: <i class="fab fa-linux"></i>
autoThumbnailStyle: background:linear-gradient(35deg,#7ded4d,#edde55);color:#000;
coverImage: /images/posts/raylib-tutorial.png
coverSize: min
coverStyle: background:linear-gradient(35deg,#ed4d4d,#ed9140);color:#fff
coverMetaClass: post-meta-white
thumbnailImagePosition: left
---

Esta guía práctica muestra cómo construir una **AppImage** para un proyecto de **raylib**.
<!--more-->

Este tutorial es una iniciación rápida para **AppImages** en Linux. Estos pasos pueden usarse en cualquier distribución. Hay tres partes principales: *instalando el appimage-buidler*, *obteniendo raylib y un base project* y finalmente, *construyendo la **AppImage***.


## Instalando el AppImage-builder

Usar estos comandos para instalar el appimage-builder:

```sh
wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
chmod +x appimage-builder-x86_64.AppImage

# Instalar
sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder
```

## Obteniendo raylib y un proyecto base

> **Requisitos**:
> * Instalar **raylib** y clonar el proyecto base [siguiendo este tutorial](/raylib-vscode-c-cpp-debug).

Luego de instalar **raylib** y clonar el repositorio, basta con abrir la carpeta del proyecto usando el IDE **vscode**, presionar **ctrl + shift + b** y compilar para **Linux**. Luego presionar **ctrl + shift + d** para depurar, verificar que si estemos escogiendo el SO correcto. Debería verse una ventana que contiene un texto.

![raylib tutorial vscode linux windows mac debug](/images/posts/raylib_tutorial.png)

## Construyendo la AppImage

Luego de compilar el proyecto base, ejecutamos estos comandos:

```sh
cd build/linux

# Crear la estructura de directorios
mkdir -p AppDir/lib
# Copiar el ejecutable en AppDir/
cp main AppDir/
```

Ahora vamos a correr una utilidad para generar la *receta* (recipe), de nuestra appimage:

```sh
appimage-builder --generate
```

Estas respuestas pueden usarse como guía para obtener una receta correcta:

* ID: raylibc (puede ser cualquier cosa)
* Application name: raylibc (puede ser cualquier cosa)
* Icon: application-vnd.appimage (personalizar o usar el valor por defecto)
* Executable path: **main** (nombre de archivo del ejecutable)
* Arguments: $@ (usar el valor por defecto)
* Version: latest (usar el valor por defecto)
* Update information: guess (usar el valor por defecto)
* Architecture: x86_64 (seleccionar un valor acorde a la CPU objetivo)

Debido a la estructura de la instalación por defecto de **raylib**, necesitamos añadir manualmente los ejecutables de la librería compartida a nuestro directorio AppDir:

```sh
# Esta es la ruta para raylib x64 5.5.0
# Usted puede customizar estos comandos segun lo requiera
cp /usr/local/lib64/libraylib.so.5.5.0 AppDir/lib/
mv AppDir/lib/libraylib.so.5.5.0 AppDir/lib/libraylib.so.550
```

Finalmente, podemos ejecutar el comando para generar nuestra **AppImage**:

```sh
appimage-builder --recipe AppImageBuilder.yml
```
4 changes: 2 additions & 2 deletions content/post/raylib-vscode-c-cpp-debug.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ keywords:
- windows
autoThumbnail: true
autoThumbnailText: <i class="fas fa-gamepad"></i>
autoThumbnailStyle: background:linear-gradient(35deg,#ed4d4d,#ed9140);color:#fff;
autoThumbnailStyle: background:linear-gradient(35deg,#a63333,#c7385e);color:#fff;
coverImage: /images/posts/raylib-tutorial.png
coverSize: min
coverStyle: background:linear-gradient(35deg,#ed4d4d,#ed9140);color:#fff
Expand Down Expand Up @@ -214,7 +214,7 @@ Beforehand, let's have an overview of the base project's main files and folders:

> If you are planning to use other libraries feel free to modify build files.

Now, just open the project folder using the IDE and press **ctrl + shift + b** to build for **Linux**, **Windows** or **Mac**. Then press **ctrl + shift + d** to Debug, just double check that you are choosing the right OS. You should see a window containing a pixelart character. You may also add debug breakpoints as required.
Now, just open the project folder using the IDE and press **ctrl + shift + b** to build for **Linux**, **Windows** or **Mac**. Then press **ctrl + shift + d** to Debug, just double check that you are choosing the right OS. You should see a window containing a text. You may also add debug breakpoints as required.

![raylib tutorial vscode linux windows mac debug](/images/posts/raylib_tutorial.png)

Expand Down
2 changes: 1 addition & 1 deletion content/post/raylib-vscode-c-cpp-debug.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ De antemano, revisemos los principales archivos y carpetas del proyecto base:

> Si se planea usar otras librerías, estos archivos pueden modificarse libremente para ajustarse a cada caso en particular.

Ahora, sólo abriendo la carpeta del proyecto en el IDE y presionando **ctrl + shift + b** vamos a poder compilar para **Linux**, **Windows** o **Mac**. Luego, presionando **ctrl + shift + d** podremos iniciar la depuración (debugging), revisando que hayamos seleccionado el sistema operativo correcto. Debería verse una ventana que contiene un personaje pixelart. También podríamos agregar puntos de parada en el depurador, si así lo quisiéramos.
Ahora, sólo abriendo la carpeta del proyecto en el IDE y presionando **ctrl + shift + b** vamos a poder compilar para **Linux**, **Windows** o **Mac**. Luego, presionando **ctrl + shift + d** podremos iniciar la depuración (debugging), revisando que hayamos seleccionado el sistema operativo correcto. Debería verse una ventana que contiene un texto. También podríamos agregar puntos de parada en el depurador, si así lo quisiéramos.

![raylib tutorial vscode linux windows mac debug](/images/posts/raylib_tutorial.png)

Expand Down
2 changes: 1 addition & 1 deletion themes/tranquilpeak