From 9dfd3ab971deadd3cd1cbfbfb573a687ee4c1a36 Mon Sep 17 00:00:00 2001
From: killian <26600206+xtrm-en@users.noreply.github.com>
Date: Mon, 30 Oct 2023 01:26:35 +0100
Subject: [PATCH 1/3] Rework README.md and add better formatting and form
---
README.md | 94 ++++++++++++++++++++++++++++++++++++-------------------
1 file changed, 61 insertions(+), 33 deletions(-)
diff --git a/README.md b/README.md
index 799cf21..59ca340 100644
--- a/README.md
+++ b/README.md
@@ -1,52 +1,80 @@
-# MacroLibX
+# MacroLibX [![linux clang workflow][linux-clang_badge]][linux-clang_wf] [![linux gcc workflow][linux-gcc_badge]][linux-gcc_wf] [![macos workflow][macos_badge]][macos_wf]
+###### A rewrite of 42 School's MiniLibX using SDL2 and Vulkan.
-[](https://github.com/420verfl0w/MacroLibX/actions/workflows/linux_clang.yml)
-[](https://github.com/420verfl0w/MacroLibX/actions/workflows/linux_gcc.yml)
-[](https://github.com/420verfl0w/MacroLibX/actions/workflows/macos_x86.yml)
+The goal of this version is to provide a light, fast, and modern graphical tool while keeping the same API the same.
-A rewrite of School 42's MiniLibX using SDL2 and Vulkan. The goal of this version is to give a light, fast and modern graphical tool while keeping the same API as the version currently used at 42.
+## 🖥️ Installation
-# Installation
+### Dependencies
-## Linux
-Dependances :
+You first need to install the proper dependencies for your operating-system.
-For Ubuntu/Debian
-```bash
-~ sudo apt update
-~ sudo apt install libsdl2-2.0-0 libsdl2-dev build-essential
+#### 🐧 Linux
+
+Here are a few common cases for different Linux distributions:
+
+
+
+ For Ubuntu/Debian-based distros:
+
+
+
+
+#### 🍎 macOS
+
+[MacroLibX](#) on macOS requires [SDL2](#) and [MoltenVK](https://github.com/KhronosGroup/MoltenVK). You can install both using the [Homebrew](https://brew.sh) package manager:
+```sh
+brew install molten-vk
+brew install SDL2
```
-For Arch based distros
+### Clone and Build
+
+Finally, you can clone the Git repository. When inside it, run the GNU `make` command to compile MacroLibX.
```bash
-~ sudo pacman -S sdl2
+git clone https://github.com/420verfl0w/MacroLibX.git
+cd MacroLibX
+make
```
-### MacOS
-Dependances :
-* [MoltenVK](https://github.com/KhronosGroup/MoltenVK/)
-* SDL2 `brew install SDL2`
+## 🔨 Compile your project
-# Get MacroLibX
+To compile your project with MacroLibX, you just provide the shared library path in your compilation/linking command:
-```bash
-~ git clone https://github.com/420verfl0w/MacroLibX.git
-~ cd MacroLibX
-~ make
+```sh
+clang myApp.c /path/to/MacroLibX/libmlx.so -lSDL2
```
-# Compile your project
+### ⚠️ Troubleshooting
-```bash
-clang myApp.c MacroLibX/libmlx.so -lSDL2
+#### If you run into glitches when writing or reading pixels from images
+
+You need to add `IMAGES_OPTIMIZED=false` to your `make` command:
+
+```sh
+# In your cloned environment, inside the MacroLibX folder
+make IMAGES_OPTIMIZED=false
```
-## /!\ If you run into glitches when writing or reading pixels from images /!\
+## License
-You need to add `IMAGES_OPTIMIZED=false` to your make mlx command
+This project and all its files, except the [`third_party`](./third_party) directory or unless otherwise mentionned, are licenced under the [GNU GPL v2.0](./LICENSE).
-```bash
-~ git clone https://github.com/420verfl0w/MacroLibX.git
-~ cd MacroLibX
-~ make IMAGES_OPTIMIZED=false
-```
+
+
+[linux-clang_badge]: https://github.com/420verfl0w/MacroLibX/actions/workflows/linux_clang.yml/badge.svg
+[linux-gcc_badge]: https://github.com/420verfl0w/MacroLibX/actions/workflows/linux_gcc.yml/badge.svg
+[macos_badge]: https://github.com/420verfl0w/MacroLibX/actions/workflows/macos_x86.yml/badge.svg
+[linux-clang_wf]: https://github.com/420verfl0w/MacroLibX/actions/workflows/linux_clang.yml
+[linux-gcc_wf]: https://github.com/420verfl0w/MacroLibX/actions/workflows/linux_gcc.yml
+[macos_wf]: https://github.com/420verfl0w/MacroLibX/actions/workflows/macos_x86.yml
From 5108134a5f8674823fd932b61bc27f34114ddea3 Mon Sep 17 00:00:00 2001
From: xtrm
Date: Mon, 30 Oct 2023 01:28:00 +0100
Subject: [PATCH 2/3] Change the names of the workflows to look better in the
README
Signed-off-by: xtrm
---
.github/workflows/linux_clang.yml | 2 +-
.github/workflows/linux_gcc.yml | 2 +-
.github/workflows/macos_x86.yml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/linux_clang.yml b/.github/workflows/linux_clang.yml
index 4f8a434..d868fbc 100644
--- a/.github/workflows/linux_clang.yml
+++ b/.github/workflows/linux_clang.yml
@@ -1,4 +1,4 @@
-name: Linux build(clang)
+name: Linux (clang)
on:
pull_request:
diff --git a/.github/workflows/linux_gcc.yml b/.github/workflows/linux_gcc.yml
index 298d4bc..2662cf4 100644
--- a/.github/workflows/linux_gcc.yml
+++ b/.github/workflows/linux_gcc.yml
@@ -1,4 +1,4 @@
-name: Linux build(gcc)
+name: Linux (gcc)
on:
pull_request:
diff --git a/.github/workflows/macos_x86.yml b/.github/workflows/macos_x86.yml
index b033ba7..ba4361d 100644
--- a/.github/workflows/macos_x86.yml
+++ b/.github/workflows/macos_x86.yml
@@ -1,4 +1,4 @@
-name: MacOS build
+name: macOS
on:
pull_request:
From 735f748b79dd4e69ffb5fcb6e8f7a497904b1d7f Mon Sep 17 00:00:00 2001
From: kbz_8
Date: Mon, 30 Oct 2023 14:10:48 +0100
Subject: [PATCH 3/3] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 59ca340..a7f4091 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# MacroLibX [![linux clang workflow][linux-clang_badge]][linux-clang_wf] [![linux gcc workflow][linux-gcc_badge]][linux-gcc_wf] [![macos workflow][macos_badge]][macos_wf]
###### A rewrite of 42 School's MiniLibX using SDL2 and Vulkan.
-The goal of this version is to provide a light, fast, and modern graphical tool while keeping the same API the same.
+The goal of this version is to provide a light, fast, and modern graphical tool while keeping the same API.
## 🖥️ Installation