mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-03-04 13:06:36 +00:00
Compare commits
2 Commits
v2.2.5
...
ceeec7ac9d
| Author | SHA1 | Date | |
|---|---|---|---|
| ceeec7ac9d | |||
|
|
68a8e1e910 |
2
.github/workflows/linux_meson.yml
vendored
2
.github/workflows/linux_meson.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
|||||||
sudo apt-get -y install mesa-common-dev clang libsdl2-2.0-0 libsdl2-dev build-essential libvulkan-dev
|
sudo apt-get -y install mesa-common-dev clang libsdl2-2.0-0 libsdl2-dev build-essential libvulkan-dev
|
||||||
|
|
||||||
- name: Python
|
- name: Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/macos_meson.yml
vendored
2
.github/workflows/macos_meson.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
|||||||
brew install SDL2
|
brew install SDL2
|
||||||
|
|
||||||
- name: Python
|
- name: Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
|
|
||||||
|
|||||||
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-latest]
|
os: [windows-latest]
|
||||||
arch: [x64, x86]
|
arch: [x64]
|
||||||
mode: [release]
|
mode: [release]
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|||||||
109
.github/workflows/windows_meson.yml
vendored
109
.github/workflows/windows_meson.yml
vendored
@@ -1,109 +0,0 @@
|
|||||||
name : Windows (Meson)
|
|
||||||
|
|
||||||
on:
|
|
||||||
repository_dispatch:
|
|
||||||
types: [create-pull-request]
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
paths-ignore:
|
|
||||||
- '.gitignore'
|
|
||||||
- 'LICENSE'
|
|
||||||
- 'README.md'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
VisualStudio:
|
|
||||||
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
|
||||||
runs-on: windows-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform: ['x64', 'x86']
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v5
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
# Install a 32-bit Python so building related stuff work.
|
|
||||||
- name: Setup x86 Python
|
|
||||||
if: matrix.platform == 'x86'
|
|
||||||
uses: actions/setup-python@v6
|
|
||||||
with:
|
|
||||||
architecture: 'x86'
|
|
||||||
python-version: '3.12'
|
|
||||||
|
|
||||||
- name: Install Meson & Ninja
|
|
||||||
run: |
|
|
||||||
python -m pip install meson ninja
|
|
||||||
- uses: ilammy/msvc-dev-cmd@v1
|
|
||||||
with:
|
|
||||||
arch: ${{matrix.platform}}
|
|
||||||
|
|
||||||
- name: Compile mlx
|
|
||||||
run: |
|
|
||||||
meson setup builddir
|
|
||||||
meson compile -C builddir
|
|
||||||
|
|
||||||
VisualStudio-clang-cl:
|
|
||||||
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
|
||||||
runs-on: windows-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
env:
|
|
||||||
CC: clang-cl
|
|
||||||
CXX: clang-cl
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v5
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Install Meson & Ninja
|
|
||||||
run: |
|
|
||||||
python -m pip install meson ninja
|
|
||||||
|
|
||||||
- uses: ilammy/msvc-dev-cmd@v1
|
|
||||||
|
|
||||||
- name: Compile mlx
|
|
||||||
run: |
|
|
||||||
meson setup builddir
|
|
||||||
meson compile -C builddir
|
|
||||||
|
|
||||||
MSYS2:
|
|
||||||
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
|
||||||
runs-on: windows-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform: ['UCRT64', 'CLANG64']
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v5
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- uses: msys2/setup-msys2@v2
|
|
||||||
with:
|
|
||||||
msystem: ${{matrix.platform}}
|
|
||||||
install: >-
|
|
||||||
bison
|
|
||||||
dos2unix
|
|
||||||
flex
|
|
||||||
git
|
|
||||||
pacboy: >-
|
|
||||||
cc:p
|
|
||||||
cmake:p
|
|
||||||
ninja:p
|
|
||||||
pkgconf:p
|
|
||||||
python-certifi:p
|
|
||||||
python-pip:p
|
|
||||||
# Make sure Python is updated to >=3.11 (fix https://github.com/msys2/MINGW-packages/issues/17415).
|
|
||||||
update: true
|
|
||||||
|
|
||||||
- name: Install Meson
|
|
||||||
shell: msys2 {0}
|
|
||||||
run: |
|
|
||||||
python -m pip install meson
|
|
||||||
|
|
||||||
- name: Compile mlx
|
|
||||||
shell: msys2 {0}
|
|
||||||
run: |
|
|
||||||
meson setup builddir
|
|
||||||
meson compile -C builddir
|
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -23,5 +23,3 @@
|
|||||||
objs/
|
objs/
|
||||||
build/
|
build/
|
||||||
example/Test
|
example/Test
|
||||||
subprojects/*/
|
|
||||||
subprojects/.wraplock
|
|
||||||
@@ -338,7 +338,7 @@ MLX_API mlx_image mlx_new_image(mlx_context mlx, int width, int height);
|
|||||||
* @param mlx Internal MLX application
|
* @param mlx Internal MLX application
|
||||||
* @param filename Path to the png file
|
* @param filename Path to the png file
|
||||||
* @param width Get the width of the image
|
* @param width Get the width of the image
|
||||||
* @param height Get the height of the image
|
* @param heigth Get the height of the image
|
||||||
*
|
*
|
||||||
* @return (mlx_image) An opaque handler to the internal image or MLX_NULL_HANDLE (0x0) in case of error
|
* @return (mlx_image) An opaque handler to the internal image or MLX_NULL_HANDLE (0x0) in case of error
|
||||||
*/
|
*/
|
||||||
@@ -407,6 +407,7 @@ MLX_API void mlx_string_put(mlx_context mlx, mlx_window win, int x, int y, mlx_c
|
|||||||
* @brief Loads a font to be used by `mlx_string_put`
|
* @brief Loads a font to be used by `mlx_string_put`
|
||||||
*
|
*
|
||||||
* @param mlx Internal MLX application
|
* @param mlx Internal MLX application
|
||||||
|
* @param win Internal window
|
||||||
* @param filepath Filepath to the font or "default" to reset to the embedded font
|
* @param filepath Filepath to the font or "default" to reset to the embedded font
|
||||||
*/
|
*/
|
||||||
MLX_API void mlx_set_font(mlx_context mlx, char* filepath);
|
MLX_API void mlx_set_font(mlx_context mlx, char* filepath);
|
||||||
@@ -415,6 +416,7 @@ MLX_API void mlx_set_font(mlx_context mlx, char* filepath);
|
|||||||
* @brief Loads a font to be used by `mlx_string_put` and scales it
|
* @brief Loads a font to be used by `mlx_string_put` and scales it
|
||||||
*
|
*
|
||||||
* @param mlx Internal MLX application
|
* @param mlx Internal MLX application
|
||||||
|
* @param win Internal window
|
||||||
* @param filepath Filepath to the font or "default" to reset to the embedded font
|
* @param filepath Filepath to the font or "default" to reset to the embedded font
|
||||||
* @param scale Scale to apply to the font
|
* @param scale Scale to apply to the font
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -55,17 +55,17 @@ namespace mlx
|
|||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void* VKAPI_PTR VulkanAllocationFunction(void*, std::size_t size, std::size_t alignment, VkSystemAllocationScope)
|
void* VulkanAllocationFunction(void*, std::size_t size, std::size_t alignment, VkSystemAllocationScope)
|
||||||
{
|
{
|
||||||
return MemManager::AlignedMalloc(alignment, size);
|
return MemManager::AlignedMalloc(alignment, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void* VKAPI_PTR VulkanReallocationFunction(void*, void* ptr, std::size_t size, std::size_t alignment, VkSystemAllocationScope)
|
void* VulkanReallocationFunction(void*, void* ptr, std::size_t size, std::size_t alignment, VkSystemAllocationScope)
|
||||||
{
|
{
|
||||||
return MemManager::AlignedRealloc(ptr, alignment, size);
|
return MemManager::AlignedRealloc(ptr, alignment, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VKAPI_PTR VulkanFreeFunction(void*, void* ptr)
|
void VulkanFreeFunction(void*, void* ptr)
|
||||||
{
|
{
|
||||||
MemManager::Free(ptr);
|
MemManager::Free(ptr);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
[wrap-file]
|
|
||||||
directory = SDL2-2.32.8
|
|
||||||
source_url = https://github.com/libsdl-org/SDL/releases/download/release-2.32.8/SDL2-2.32.8.tar.gz
|
|
||||||
source_filename = SDL2-2.32.8.tar.gz
|
|
||||||
source_hash = 0ca83e9c9b31e18288c7ec811108e58bac1f1bb5ec6577ad386830eac51c787e
|
|
||||||
patch_filename = sdl2_2.32.8-1_patch.zip
|
|
||||||
patch_url = https://wrapdb.mesonbuild.com/v2/sdl2_2.32.8-1/get_patch
|
|
||||||
patch_hash = 5df17ea39ca418826db20e96bd821fa52b5718dac64b6225119fb6588c2744f0
|
|
||||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sdl2_2.32.8-1/SDL2-2.32.8.tar.gz
|
|
||||||
wrapdb_version = 2.32.8-1
|
|
||||||
|
|
||||||
[provide]
|
|
||||||
sdl2 = sdl2_dep
|
|
||||||
sdl2main = sdl2main_dep
|
|
||||||
sdl2_test = sdl2_test_dep
|
|
||||||
Reference in New Issue
Block a user