6 Commits

Author SHA1 Message Date
362558c877 Use darwin_amd64 built by mac 10.15 2022-01-27 05:22:58 +04:00
7e82370f34 Edit text 2022-01-27 04:58:35 +04:00
58e13d1c5a Add badge 2022-01-27 04:58:03 +04:00
bfa7357ea2 Add github action to run on intel mac 2022-01-27 04:55:58 +04:00
dd346de9de Add intel mac assimp dylib 2022-01-27 04:24:08 +04:00
babf9c3926 Fix readme typo 2022-01-27 03:31:03 +04:00
5 changed files with 27 additions and 3 deletions

20
.github/workflows/run-assimp-go.yml vendored Executable file
View File

@ -0,0 +1,20 @@
name: Build-AssImp
on:
create:
jobs:
Run-assimp-go-macos:
runs-on: macos-10.15
steps:
- name: Install golang 1.17
uses: actions/setup-go@v2
with:
go-version: '^1.17'
- name: Clone assimp-go
run: git clone https://github.com/bloeys/assimp-go
- name: Copy dylib
working-directory: assimp-go
run: sudo mkdir -p /usr/local/lib && sudo cp asig/libs/libassimp_darwin_amd64.dylib /usr/local/lib/libassimp.5.dylib
- name: Run assimp-go
working-directory: assimp-go
run: go run .

1
.gitignore vendored
View File

@ -19,3 +19,4 @@ vendor/
*.fbx
*.glb
!libassimp_darwin_arm64.dylib
!libassimp_darwin_amd64.dylib

View File

@ -1,5 +1,7 @@
# assimp-go
[![Build](https://github.com/bloeys/assimp-go/actions/workflows/run-assimp-go.yml/badge.svg)](https://github.com/bloeys/assimp-go/actions/workflows/run-assimp-go.yml)
A Handcrafted Open Asset Import Library (AssImp) wrapper for Go.
## Features
@ -43,7 +45,7 @@ Download the **.dll** of the release you want, and place it in the **root** of y
First, download the appropriate **.dylib** for your device (`_amd64` for Intel CPUs and `_arm64` for Apple CPUs).
Next you will need to rename the lib to `libassimp.5.dylib` and move it to `/usr/local/lib` or `/usr/lib`.
You can use this command to do it: `sudo mkdir -p /usr/local/lib && sudo cp libassimp_*.5.dylib /usr/local/lib/libassimp.5.dylib`
You can use this command to do it: `sudo mkdir -p /usr/local/lib && sudo cp libassimp_darwin*.dylib /usr/local/lib/libassimp.5.dylib`
### Running assimp-go
@ -128,4 +130,4 @@ Now assuming you are using MinGW on windows:
* Clone wanted release of assimp and run `cmake CMakeLists.txt -D ASSIMP_BUILD_ZLIB=ON -D ASSIMP_BUILD_ASSIMP_TOOLS=OFF` in the root folder
* Run `cmake --build . --parallel 6`
* Copy the generated `*.dylib` files from the `bin` folder and into both `asig/libs` and `/usr/local/lob`
* Copy the generated `*.dylib` files from the `bin` folder and into both `asig/libs` and `/usr/local/lib`

View File

@ -4,6 +4,7 @@ package asig
#cgo CFLAGS: -I .
#cgo LDFLAGS: -L libs
#cgo windows,amd64 LDFLAGS: -l assimp_windows_amd64
#cgo darwin,amd64 LDFLAGS: -l assimp_darwin_amd64
#cgo darwin,arm64 LDFLAGS: -l assimp_darwin_arm64
#include "wrap.c"

Binary file not shown.