-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from SouthernCrossGaming/windows-support
Windows Support
- Loading branch information
Showing
13 changed files
with
157 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
rmdir .\addons\sourcemod\extensions /s /q | ||
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 | ||
echo f | XCOPY build\voicemanager.ext.2.tf2\voicemanager.ext.2.tf2.so ..\addons\sourcemod\extensions\voicemanager.ext.2.tf2.so | ||
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 | ||
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
DEL addons\sourcemod\extensions\voicemanager.ext.2.sdk2013.dll | ||
DEL addons\sourcemod\extensions\voicemanager.ext.2.tf2.dll | ||
|
||
cd extension | ||
rmdir .\build /s /q | ||
docker compose -f docker-compose.windows.yml build | ||
docker compose -f docker-compose.windows.yml run extension-build-windows --remove-orphans | ||
|
||
echo f | XCOPY build\voicemanager.ext.2.sdk2013\voicemanager.ext.2.sdk2013.dll ..\addons\sourcemod\extensions\voicemanager.ext.2.sdk2013.dll /Y | ||
echo f | XCOPY build\voicemanager.ext.2.tf2\voicemanager.ext.2.tf2.dll ..\addons\sourcemod\extensions\voicemanager.ext.2.tf2.dll /Y | ||
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# escape=` | ||
|
||
FROM mcr.microsoft.com/windows/server:ltsc2022 | ||
|
||
# Reset the shell. | ||
SHELL ["cmd", "/S", "/C"] | ||
|
||
# Download channel for fixed install. | ||
ADD https://aka.ms/vs/17/release/channel C:\TEMP\VisualStudio.chman | ||
|
||
# Download and install Build Tools for Visual Studio 2022 for native desktop workload. | ||
ADD https://aka.ms/vs/17/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe | ||
RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache ` | ||
--channelUri C:\TEMP\VisualStudio.chman ` | ||
--installChannelUri C:\TEMP\VisualStudio.chman ` | ||
--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended` | ||
--installPath C:\BuildTools | ||
|
||
RUN PowerShell Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) | ||
RUN choco install -y ` | ||
git ` | ||
python | ||
|
||
RUN mkdir C:\sdks | ||
RUN git clone https://github.com/alliedmodders/sourcemod --recurse-submodules -b 1.11-dev | ||
RUN git clone https://github.com/alliedmodders/metamod-source --recurse-submodules -b 1.11-dev | ||
RUN git clone https://github.com/alliedmodders/hl2sdk --recurse-submodules -b tf2 C:\sdks\hl2sdk-tf2 | ||
RUN git clone https://github.com/alliedmodders/hl2sdk --recurse-submodules -b sdk2013 C:\sdks\hl2sdk-sdk2013 | ||
RUN git clone https://github.com/alliedmodders/ambuild --recurse-submodules | ||
|
||
COPY scripts\setup.py C:\ambuild\setup.py | ||
RUN pip install C:\ambuild | ||
|
||
ENTRYPOINT C:\BuildTools\Common7\Tools\VsDevCmd.bat && C:\extension\scripts\build.bat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: '3.9' | ||
|
||
services: | ||
extension-build-windows: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.windows | ||
image: extension-build-windows | ||
volumes: | ||
- .:C:\extension | ||
working_dir: C:\extension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
mkdir build | ||
cd build | ||
python ..\configure.py -s tf2,sdk2013 --sm-path C:\sourcemod --mms-path C:\metamod-source --hl2sdk-root C:\sdks --enable-optimize | ||
ambuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env python | ||
# vim: set ts=2 sw=2 tw=99 et: | ||
|
||
import sys | ||
|
||
def detect_distutils(): | ||
sys.path.pop(0) | ||
try: | ||
import ambuild2.util | ||
try: | ||
val = getattr(ambuild2.util, 'INSTALLED_BY_PIP_OR_SETUPTOOLS') | ||
except AttributeError: | ||
sys.exit(1) | ||
except ImportError: | ||
pass | ||
|
||
sys.exit(0) | ||
|
||
# This if statement is supposedly required by multiprocessing. | ||
if __name__ == '__main__': | ||
from setuptools import setup, find_packages | ||
try: | ||
import sqlite3 | ||
except: | ||
raise SystemError('py-sqlite3 must be installed') | ||
|
||
amb_scripts = [] | ||
if sys.platform != 'win32': | ||
if sys.platform == 'darwin': | ||
amb_scripts.append('scripts/ambuild_dsymutil_wrapper.sh') | ||
else: | ||
amb_scripts.append('scripts/ambuild_objcopy_wrapper.sh') | ||
|
||
setup(name = 'AMBuild', | ||
version = '2.0', | ||
description = 'AlliedModders Build System', | ||
author = 'David Anderson', | ||
author_email = '[email protected]', | ||
url = 'http://www.alliedmods.net/ambuild', | ||
packages = find_packages(), | ||
python_requires = '>=3.3', | ||
entry_points = {'console_scripts': ['ambuild = ambuild2.run:cli_run']}, | ||
scripts = amb_scripts, | ||
zip_safe = False) |