Skip to content

Commit

Permalink
tidying up
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraeven committed Oct 25, 2023
1 parent af71bf2 commit 713c8e9
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 40 deletions.
67 changes: 34 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ There are currently 5 volume levels that can be selected:

### Supported Platforms
- Linux
- Windows

### Sourcemod
- Version 1.10+
Expand Down Expand Up @@ -60,61 +61,61 @@ Add a configuration for the voice manager database to your `addons/sourcemod/con

## Building

### Build Extension
### Build Extension for Linux

<b>Requirements:</b>
- Docker / docker compose

<b>Windows</b>
*Requires Docker (with docker compose) using <b>Linux</b> containers
```
> .\build_ext.bat
```

<b>Linux</b>
```
$ ./build_ext.sh
```

### Build Plugin
<b>Requirements:</b>
- spcomp (1.10 or higher) added to your path or to the base directory
### Build Extension for Windows

<b>Windows</b>
*Requires Windows environment with Docker (with docker compose) using <b>Windows</b> containers
```
> .\build_ext_windows.bat
```

### Build Plugin
*Requires spcomp (1.10 or higher) added to your path or to the base directory
```
> .\build_plugin.bat
```
<b>Linux</b>
```
$ ./build_plugin.sh
```

### Build Both (same requirements as above)

<b>Windows</b>
### Build All (Windows environment only)
```
> .\build.bat
```

<b>Linux</b>
```
$ ./build.sh
```

## VS Code Setup
To setup C++ includes for VS Code, clone sourcemod, metamod, and the tf2 sdk. Include the following paths:
- ./
- ./include
- <sm_path>
- <sm_path>\public
- <sm_path>\public\extensions
- <sm_path>\sourcepawn\include
- <sm_path>\sourcepawn\third_party\amtl
- <sm_path>\sourcepawn\third_party\amtl\amtl
- <mm_path>\core
- <mm_path>\core\sourcehook
- <hl2sdk-tf2_path>\public
- <hl2sdk-tf2_path>\public\tier0
- <hl2sdk-tf2_path>\public\tier1
- `./`
- `./include`
- `<sm_path>`
- `<sm_path>\public`
- `<sm_path>\public\extensions`
- `<sm_path>\sourcepawn\include`
- `<sm_path>\sourcepawn\third_party\amtl`
- `<sm_path>\sourcepawn\third_party\amtl\amtl`
- `<mm_path>\core`
- `<mm_path>\core\sourcehook`
- `<hl2sdk-tf2_path>\public`
- `<hl2sdk-tf2_path>\public\tier0`
- `<hl2sdk-tf2_path>\public\tier1`

### Troubleshooting
- <b>Problem</b>: The VoiceManager plugin/extension did not load.
- <b>Potential Solution</b>: Check for any errors on startup and ensure that an empty `voicemanager.autoload` file exists under the `addons/sourcemod/extension` directory.

</br>

* <b>Problem</b>: When an adjustment is applied, there are no errors but the player does not have any voice output.
* <b>Potential Solution</b>: Make sure the server is using the `steam` voice codec (`sv_voicecodec steam`)

# Credits
- [Fraeven](https://fraeven.dev) (Extension Code, Plugin Code, Testing)
Expand Down
8 changes: 6 additions & 2 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
.\build_ext.bat
.\build_plugin.bat
"C:\Program Files\Docker\Docker\DockerCli.exe" -SwitchLinuxEngine
CALL .\build_ext.bat
"C:\Program Files\Docker\Docker\DockerCli.exe" -SwitchWindowsEngine
CALL .\build_ext_windows.bat

CALL .\build_plugin.bat
2 changes: 0 additions & 2 deletions build.sh

This file was deleted.

5 changes: 3 additions & 2 deletions build_ext.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ DEL addons\sourcemod\extensions\voicemanager.ext.2.sdk2013.so
DEL addons\sourcemod\extensions\voicemanager.ext.2.tf2.so

cd extension
rmdir .\build /s /q
rmdir build /s /q
docker compose build
docker compose run extension-build --remove-orphans

echo f | XCOPY build\voicemanager.ext.2.sdk2013\voicemanager.ext.2.sdk2013.so ..\addons\sourcemod\extensions\voicemanager.ext.2.sdk2013.so /Y
echo f | XCOPY build\voicemanager.ext.2.tf2\voicemanager.ext.2.tf2.so ..\addons\sourcemod\extensions\voicemanager.ext.2.tf2.so /Y
echo f | XCOPY build\voicemanager.ext.2.tf2\voicemanager.ext.2.tf2.so ..\addons\sourcemod\extensions\voicemanager.ext.2.tf2.so /Y
cd ..
2 changes: 1 addition & 1 deletion extension/AMBuilder
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ project.sources += sourceFiles

for sdk_name in Extension.sdks:
if sdk_name in ['sdk2013'] and builder.target_platform == 'linux':
project.sources += 'libc_compat.cpp'
project.sources += ['libc_compat.cpp']

sdk = Extension.sdks[sdk_name]

Expand Down

0 comments on commit 713c8e9

Please sign in to comment.