Explorar el Código

Merge branch 'floooh:master' into feature/bindgen-docs

Alexander Arvidsson hace 8 meses
padre
commit
3cb0ddb539
Se han modificado 2 ficheros con 14 adiciones y 5 borrados
  1. 7 3
      .github/workflows/gen_bindings.yml
  2. 7 2
      bindgen/gen_odin.py

+ 7 - 3
.github/workflows/gen_bindings.yml

@@ -119,7 +119,9 @@ jobs:
       - uses: actions/checkout@main
         with:
           repository: floooh/sokol-zig
-      - uses: goto-bus-stop/setup-zig@default
+      - uses: mlugg/setup-zig@v1
+        with:
+          version: master
       - uses: actions/download-artifact@main
         with:
           name: ignore-me-zig
@@ -282,7 +284,9 @@ jobs:
       - uses: actions/checkout@main
         with:
           repository: kassane/sokol-d
-      - uses: goto-bus-stop/setup-zig@default
+      - uses: mlugg/setup-zig@v1
+        with:
+          version: 0.13.0
       - uses: dlang-community/setup-dlang@v1
         with:
           compiler: ldc-master
@@ -451,4 +455,4 @@ jobs:
           git config user.name "GH Action"
           git add -A
           git diff-index --quiet HEAD || git commit -m "updated (https://github.com/floooh/sokol/commit/${{ github.sha }})"
-          git push
+          git push

+ 7 - 2
bindgen/gen_odin.py

@@ -403,8 +403,13 @@ def gen_c_imports(inp, c_prefix, prefix):
     l( '        }')
     l( '    }')
     l( '} else when ODIN_OS == .Linux {')
-    l(f'    when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_debug.a"{linux_gl_libs} }} }}')
-    l(f'    else       {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_release.a"{linux_gl_libs} }} }}')
+    l( '    when USE_DLL {')
+    l(f'        when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_debug.so"{linux_gl_libs} }} }}')
+    l(f'        else       {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_release.so"{linux_gl_libs} }} }}')
+    l( '    } else {')
+    l(f'        when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_debug.a"{linux_gl_libs} }} }}')
+    l(f'        else       {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_release.a"{linux_gl_libs} }} }}')
+    l( '    }')
     l( '} else {')
     l( '    #panic("This OS is currently not supported")')
     l( '}')