Skip to content

Commit e79822c

Browse files
committed
Update fmod to 2.02.11, Improve instructions, Added linux libs
1 parent 7ff2041 commit e79822c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4862
-15459
lines changed

.github/workflows/rust.yml

+21-21
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
name: Rust
2-
3-
on: [push]
4-
5-
jobs:
6-
build:
7-
runs-on: ubuntu-latest
8-
container:
9-
image: khonsulabs/build-rust:latest
10-
options: "--security-opt seccomp=unconfined"
11-
12-
steps:
13-
- uses: actions/checkout@v1
14-
- name: Install fmod library for linking.
15-
run: cp fmodapi/libs/* /usr/lib/
16-
17-
- name: Run tests on stable
18-
run: cargo test --all-features
19-
20-
- name: Run tests on nightly
21-
run: cargo test +nightly --all-features
1+
name: Rust
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
container:
9+
image: khonsulabs/build-rust:latest
10+
options: "--security-opt seccomp=unconfined"
11+
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: Install fmod library for linking.
15+
run: cp fmodapi/libs/* /usr/lib/
16+
17+
- name: Run tests on stable
18+
run: cargo test --all-features
19+
20+
- name: Run tests on nightly
21+
run: cargo test +nightly --all-features

.gitignore

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Generated by Cargo
2-
# will have compiled files and executables
3-
/target/
4-
5-
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
6-
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
7-
Cargo.lock
8-
9-
# These are backup files generated by rustfmt
10-
**/*.rs.bk
11-
.DS_Store
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
/target/
4+
5+
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
6+
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
7+
Cargo.lock
8+
9+
# These are backup files generated by rustfmt
10+
**/*.rs.bk
11+
.DS_Store

Cargo.toml

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
[package]
2-
authors = ["jestarray"]
3-
categories = ["external-ffi-bindings", "multimedia::audio"]
4-
description = "Bindgen wrappers around the FMOD Core and Studio libraries"
5-
edition = "2018"
6-
keywords = ["gamedev", "audio", "fmod"]
7-
license-file = "LICENSE"
8-
name = "fmod-sys"
9-
readme = "README.md"
10-
repository = "https://github.com/jestarray/fmod-sys"
11-
version = "0.1.1"
12-
13-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
14-
[features]
15-
debug = [] # link with the debug dlls instead
16-
default = []
17-
studio = []
18-
19-
[dependencies]
20-
21-
[build-dependencies]
22-
bindgen = "0.56.0"
1+
[package]
2+
authors = ["jestarray"]
3+
categories = ["external-ffi-bindings", "multimedia::audio"]
4+
description = "Bindgen wrappers around the FMOD Core and Studio libraries"
5+
edition = "2018"
6+
keywords = ["gamedev", "audio", "fmod"]
7+
license-file = "LICENSE"
8+
name = "fmod-sys"
9+
readme = "README.md"
10+
repository = "https://github.com/jestarray/fmod-sys"
11+
version = "0.1.1"
12+
13+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
14+
[features]
15+
debug = [] # link with the debug dlls instead
16+
default = []
17+
studio = []
18+
19+
[dependencies]
20+
21+
[build-dependencies]
22+
bindgen = "0.63.0"

LICENSE

+25-25
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
The files contained in the fmodapi/ directory are licensed under the FMOD END USER LICENCE AGREEMENT.
2-
3-
The remaining files are licensed as follows:
4-
5-
MIT License
6-
7-
Copyright (c) 2020 Khonsu Labs
8-
9-
Permission is hereby granted, free of charge, to any person obtaining a copy
10-
of this software and associated documentation files (the "Software"), to deal
11-
in the Software without restriction, including without limitation the rights
12-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13-
copies of the Software, and to permit persons to whom the Software is
14-
furnished to do so, subject to the following conditions:
15-
16-
The above copyright notice and this permission notice shall be included in all
17-
copies or substantial portions of the Software.
18-
19-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25-
SOFTWARE.
1+
The files contained in the fmodapi/ directory are licensed under the FMOD END USER LICENCE AGREEMENT.
2+
3+
The remaining files are licensed as follows:
4+
5+
MIT License
6+
7+
Copyright (c) 2020 Khonsu Labs
8+
9+
Permission is hereby granted, free of charge, to any person obtaining a copy
10+
of this software and associated documentation files (the "Software"), to deal
11+
in the Software without restriction, including without limitation the rights
12+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
copies of the Software, and to permit persons to whom the Software is
14+
furnished to do so, subject to the following conditions:
15+
16+
The above copyright notice and this permission notice shall be included in all
17+
copies or substantial portions of the Software.
18+
19+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25+
SOFTWARE.

README.md

+57-50
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,58 @@
1-
# fmod-sys
2-
3-
Bindgen generated wrappers for FMOD
4-
5-
This library is aiming to be an idiomatic "-sys" version of wrappers for [FMOD](https://fmod.com).
6-
7-
The library itself is licensed using the [MIT license](./LICENSE), but the `fmodapi` folder contains headers from the FMOD API download, and those files are licensed under the [FMOD License](./fmodapi/LICENSE.TXT).
8-
9-
# Usage
10-
11-
You **MUST** register your product with FMOD and comply with their licensing terms before shipping your commercial product.
12-
13-
While I'm still getting this testing, you can use the `git` feature of Cargo.toml dependencies to use this crate:
14-
15-
```toml
16-
[dependencies]
17-
fmod-sys = { git = "https://github.com/jestarray/fmod-sys.git" }
18-
```
19-
20-
You will need to put the fmod libraries in the root directory of your project.
21-
22-
# Enabling Studio APIs
23-
24-
By default, the core library and its API is all that is exported. If you want to enable the FMOD Studio API, enable the `studio` feature:
25-
26-
```toml
27-
[dependencies]
28-
fmod-sys = { git = "https://github.com/jestarray/fmod-sys.git", features = ["studio"] }
29-
```
30-
31-
# Enabling Debug logging features of fmod
32-
33-
```toml
34-
[dependencies]
35-
fmod-sys = { git = "https://github.com/jestarray/fmod-sys.git", features = ["Debug"] }
36-
```
37-
38-
39-
# Building
40-
41-
To update the headers, just copy them into the fmodapi folder, make sure the LICENSE.TXT doesn't need to be updated, and then the build.rs script should automatically generate the new bindings.
42-
43-
## Mac OS Notes
44-
45-
When attempting to run an application linking against libfmod.dylib without signing it, you will be prompted for a security warning. Find the file in the Finder, right click on it and choose Open. It makes no sense to do this, but it will prompt you just like it would an unsigned application -- Click open and it will launch the Terminal app and do nothing.
46-
47-
However, once you've done this step, you can run the application until you replace the library wth a new version.
48-
49-
# todo
50-
- put all the fmod.dlls into a lib folder. For some reason I can't get bindgen to look in the folder(seems like we cant really for windows?)
1+
# fmod-sys
2+
3+
Bindgen generated wrappers for FMOD
4+
5+
This library is aiming to be an idiomatic "-sys" version of wrappers for [FMOD](https://fmod.com).
6+
7+
The library itself is licensed using the [MIT license](./LICENSE), but the `fmodapi` folder contains headers from the FMOD API download, and those files are licensed under the [FMOD License](./fmodapi/LICENSE.TXT).
8+
9+
# Usage
10+
11+
You **MUST** register your product with FMOD and comply with their licensing terms before shipping your commercial product.
12+
13+
While I'm still getting this testing, you can use the `git` feature of Cargo.toml dependencies to use this crate:
14+
15+
```toml
16+
[dependencies]
17+
fmod-sys = { git = "https://github.com/jestarray/fmod-sys.git" }
18+
```
19+
20+
You will need to put the fmod libraries in the root directory of your project.
21+
22+
# Enabling Studio APIs
23+
24+
By default, the core library and its API is all that is exported. If you want to enable the FMOD Studio API, enable the `studio` feature:
25+
26+
```toml
27+
[dependencies]
28+
fmod-sys = { git = "https://github.com/jestarray/fmod-sys.git", features = ["studio"] }
29+
```
30+
31+
# Enabling Debug logging features of fmod
32+
33+
```toml
34+
[dependencies]
35+
fmod-sys = { git = "https://github.com/jestarray/fmod-sys.git", features = ["Debug"] }
36+
```
37+
38+
39+
# Building
40+
41+
To update the headers, just copy them into the fmodapi folder, make sure the LICENSE.TXT doesn't need to be updated, and then the build.rs script should automatically generate the new bindings.
42+
43+
## Mac OS Notes
44+
45+
When attempting to run an application linking against libfmod.dylib without signing it, you will be prompted for a security warning. Find the file in the Finder, right click on it and choose Open. It makes no sense to do this, but it will prompt you just like it would an unsigned application -- Click open and it will launch the Terminal app and do nothing.
46+
47+
However, once you've done this step, you can run the application until you replace the library wth a new version.
48+
49+
## Windows Notes:
50+
The `_vc` suffix on the `.lib` files for windows need to be removed. Stick all the `.dll` and `.lib` in the root folder of your project. For shipping your game you only need to include `fmod.dll` and `fmodstudio.dll`
51+
52+
## Linux Notes:
53+
For linux you may need to tell rust where to look for the libfmod files. Add where to find it in `.bash_profile`
54+
`export LD_LIBRARY_PATH="PATH/TO/FMODLIBS"`
55+
56+
# todo
57+
- put all the fmod.dlls into a lib folder. For some reason I can't get bindgen to look in the folder(seems like we cant really for windows?)
5158
- examples

0 commit comments

Comments
 (0)