aboutsummaryrefslogtreecommitdiff
path: root/Src/external_dependencies/openmpt-trunk/build/auto
diff options
context:
space:
mode:
Diffstat (limited to 'Src/external_dependencies/openmpt-trunk/build/auto')
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/appveyor_set_version.cmd18
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_android.sh33
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_args.cmd37
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_retro_winxp.cmd35
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_test_args.cmd29
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_winrt.cmd31
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_args.cmd31
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_release_manual.cmd37
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_release_packages_multiarch.cmd51
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_release_packages_multiarch.py348
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_update_information.cmd37
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/check_clang-format.sh18
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/check_libopenmpt_args.cmd37
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/check_libopenmpt_test_args.cmd29
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/check_libopenmpt_winrt.cmd31
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/check_openmpt_args.cmd31
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/clean-js.sh11
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/clean.sh20
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/clean_libopenmpt_args.cmd39
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/clean_libopenmpt_retro_winxp.cmd39
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/clean_libopenmpt_winrt.cmd33
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/clean_openmpt_args.cmd31
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/cppcheck_openmpt.sh37
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/dist-js.sh42
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/dist.sh124
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/helper_get_openmpt_version.cmd52
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/helper_get_openmpt_version.cpp71
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/helper_get_svnversion.cmd48
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/package_libopenmpt_multi_args.cmd313
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/package_libopenmpt_retro_winxp.cmd117
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/package_openmpt_args.cmd98
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/package_openmpt_installer_args.cmd48
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/package_openmpt_installer_multiarch_args.cmd75
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/readme.txt1
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/setup_arguments.cmd161
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/setup_arguments_winrt.cmd22
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/setup_vs2017.cmd16
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/setup_vs2019.cmd16
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/setup_vs2022.cmd11
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/setup_vs_any.cmd26
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/test_libopenmpt_args.cmd37
-rw-r--r--Src/external_dependencies/openmpt-trunk/build/auto/update_package_template.cmd48
42 files changed, 2369 insertions, 0 deletions
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/appveyor_set_version.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/appveyor_set_version.cmd
new file mode 100644
index 00000000..7b727098
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/appveyor_set_version.cmd
@@ -0,0 +1,18 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call build\auto\setup_vs_any.cmd
+
+call build\auto\helper_get_svnversion.cmd
+call build\auto\helper_get_openmpt_version.cmd
+
+set MPT_REVISION=%OPENMPT_VERSION%-%SVNVERSION%
+
+appveyor UpdateBuild -Version "%OPENMPT_VERSION%-%SVNVERSION%-appveyor%APPVEYOR_BUILD_NUMBER%"
+
+cd "%MY_DIR%"
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_android.sh b/Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_android.sh
new file mode 100644
index 00000000..38276e9a
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_android.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+
+set -e
+
+MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+cd "${MY_DIR}"
+cd ../..
+
+SVN_INFO=$( svn info . > /dev/null 2>&1 ; echo $? )
+if [ $SVN_INFO -eq 0 ] ; then
+ MPT_SVNURL="$( svn info --xml | grep '^<url>' | sed 's/<url>//g' | sed 's/<\/url>//g' )"
+ MPT_SVNVERSION="$( svnversion -n . | tr ':' '-' )"
+ MPT_SVNDATE="$( svn info --xml | grep '^<date>' | sed 's/<date>//g' | sed 's/<\/date>//g' )"
+else
+ MPT_SVNURL=
+ MPT_SVNVERSION=
+ MPT_SVNDATE=
+fi
+
+cd build/android_ndk/
+
+rm -f jni
+ln -s ../.. jni
+cd jni
+rm -f Application.mk
+ln -s build/android_ndk/Application.mk Application.mk
+rm -f Android.mk
+ln -s build/android_ndk/Android.mk Android.mk
+cd ..
+
+ndk-build MPT_SVNURL="$MPT_SVNURL" MPT_SVNVERSION="$MPT_SVNVERSION" MPT_SVNDATE="$MPT_SVNDATE" "$@" clean
+ndk-build MPT_SVNURL="$MPT_SVNURL" MPT_SVNVERSION="$MPT_SVNVERSION" MPT_SVNDATE="$MPT_SVNDATE" "$@"
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_args.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_args.cmd
new file mode 100644
index 00000000..37e84648
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_args.cmd
@@ -0,0 +1,37 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments.cmd" %1 %2 %3 %4 %5 %6
+
+call "build\auto\setup_%MPT_VS_VER%.cmd"
+
+
+
+cd "build\%MPT_VS_WITHTARGET%" || goto error
+
+ msbuild libopenmpt.sln /target:Build /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ msbuild openmpt123.sln /target:Build /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ if "%MPT_VS_ARCH%" == "Win32" (
+ msbuild in_openmpt.sln /target:Build /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ msbuild xmp-openmpt.sln /target:Build /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ )
+ msbuild libopenmpt.sln /target:Build /property:Configuration=ReleaseShared;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+
+cd ..\.. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_retro_winxp.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_retro_winxp.cmd
new file mode 100644
index 00000000..f633219a
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_retro_winxp.cmd
@@ -0,0 +1,35 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments.cmd" %1 %2 %3 %4 %5 %6
+
+call "build\auto\setup_%MPT_VS_VER%.cmd"
+
+
+
+cd "build\%MPT_VS_WITHTARGET%" || goto error
+
+ msbuild openmpt123.sln /target:Build /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ if "%MPT_VS_ARCH%" == "Win32" (
+ msbuild in_openmpt.sln /target:Build /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ msbuild xmp-openmpt.sln /target:Build /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ )
+
+cd ..\.. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_test_args.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_test_args.cmd
new file mode 100644
index 00000000..9f3f8179
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_test_args.cmd
@@ -0,0 +1,29 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments.cmd" %1 %2 %3 %4 %5 %6
+
+call "build\auto\setup_%MPT_VS_VER%.cmd"
+
+
+
+cd "build\%MPT_VS_WITHTARGET%" || goto error
+ msbuild libopenmpt_test.sln /target:Build /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+cd ..\.. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_winrt.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_winrt.cmd
new file mode 100644
index 00000000..e9a55947
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/build_libopenmpt_winrt.cmd
@@ -0,0 +1,31 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments_winrt.cmd" %1 %2 %3 %4 %5 %6
+
+call "build\auto\setup_%MPT_VS_VER%.cmd"
+
+
+
+cd "build\%MPT_VS_TARGET%" || goto error
+
+ msbuild libopenmpt.sln /target:Build /property:Configuration=%MPT_VS_CONF%;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+
+cd ..\.. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_args.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_args.cmd
new file mode 100644
index 00000000..22abe544
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_args.cmd
@@ -0,0 +1,31 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments.cmd" %1 %2 %3 %4 %5 %6
+
+call "build\auto\setup_%MPT_VS_VER%.cmd"
+
+
+
+cd "build\%MPT_VS_WITHTARGET%" || goto error
+
+msbuild OpenMPT%MPT_VS_FLAVOUR%.sln /target:Build /property:Configuration=%MPT_VS_CONF%;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+
+cd ..\.. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_release_manual.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_release_manual.cmd
new file mode 100644
index 00000000..182c397b
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_release_manual.cmd
@@ -0,0 +1,37 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+
+
+cmd /c build\download_externals.cmd auto nodownload || goto error
+cmd /c build\auto\update_package_template.cmd || goto error
+cmd /c build\auto\build_openmpt_args.cmd vs2019 win10 Win32 Release 7z default || goto error
+cmd /c build\auto\build_openmpt_args.cmd vs2019 win10 x64 Release 7z default || goto error
+cmd /c build\auto\build_openmpt_args.cmd vs2019 win10 ARM Release 7z default || goto error
+cmd /c build\auto\build_openmpt_args.cmd vs2019 win10 ARM64 Release 7z default || goto error
+cmd /c build\auto\build_openmpt_args.cmd vs2019 win7 Win32 Release 7z default || goto error
+cmd /c build\auto\build_openmpt_args.cmd vs2019 win7 x64 Release 7z default || goto error
+cmd /c build\auto\build_openmpt_release_packages_multiarch.cmd auto sign || goto error
+cmd /c build\auto\build_openmpt_update_information.cmd auto || goto error
+cmd /c build\auto\package_openmpt_installer_multiarch_args.cmd vs2019 win10 Win32 Release 7z default || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+echo "FAILED."
+pause
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+echo "ALL OK."
+pause
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_release_packages_multiarch.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_release_packages_multiarch.cmd
new file mode 100644
index 00000000..561936a8
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_release_packages_multiarch.cmd
@@ -0,0 +1,51 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+
+set MY_DIR=%CD%
+
+cd ..\.. || goto error
+
+call build\auto\setup_vs_any.cmd
+
+call build\auto\helper_get_svnversion.cmd
+call build\auto\helper_get_openmpt_version.cmd
+
+cd build\auto || goto error
+
+set BUILD_PARAMS=--localtools --singlethreaded
+if "x%1" == "xauto" (
+ set BUILD_PARAMS=%BUILD_PARAMS% --noninteractive
+ if "x%2" == "xsign" (
+ set BUILD_PARAMS=%BUILD_PARAMS% --sign-binaries --sign-installer
+ )
+) else (
+ if "x%1" == "xsign" (
+ set BUILD_PARAMS=%BUILD_PARAMS% --sign-binaries --sign-installer
+ )
+)
+
+..\..\build\tools\python3\python.exe ..\..\build\auto\build_openmpt_release_packages_multiarch.py %BUILD_PARAMS% || goto error
+
+set BUILD_PARAMS=
+
+cd "%MY_DIR%"
+
+goto ok
+
+:ok
+echo "All OK."
+if "x%1" == "xauto" (
+ exit 0
+)
+goto end
+:error
+echo "Error!"
+if "x%1" == "xauto" (
+ exit 1
+)
+goto end
+:end
+cd %MY_DIR%
+pause
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_release_packages_multiarch.py b/Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_release_packages_multiarch.py
new file mode 100644
index 00000000..90e307aa
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_release_packages_multiarch.py
@@ -0,0 +1,348 @@
+#!/usr/bin/env python3
+# OpenMPT packaging script
+# https://openmpt.org/
+
+from pathlib import Path
+from subprocess import Popen
+from sys import executable
+import os, shutil, hashlib
+import sys
+
+path7z = "C:\\Program Files\\7-Zip\\7z.exe"
+pathISCC = "C:\\Program Files (x86)\\Inno Setup\\ISCC.exe"
+singleThreaded = False
+interactive = True
+signBinaries = False
+signInstaller = False
+
+for arg in sys.argv:
+ if arg == '--localtools':
+ path7z = "build\\tools\\7zip\\7z.exe"
+ pathISCC = "build\\tools\\innosetup\\{app}\\ISCC.exe"
+ if arg == '--singlethreaded':
+ singleThreaded = True
+ if arg == '--noninteractive':
+ interactive = False
+ if arg == '--sign-binaries':
+ signBinaries = True
+ if arg == '--sign-installer':
+ signInstaller = True
+
+def get_version_number():
+ with open('common/versionNumber.h', 'r') as f:
+ lines = f.readlines()
+ majormajor = 0
+ major = 0
+ minor = 0
+ minorminor = 0
+ for line in lines:
+ tokens = line.split()
+ if len(tokens) == 3:
+ if tokens[0] == '#define':
+ if tokens[1] == 'VER_MAJORMAJOR':
+ majormajor = int(tokens[2])
+ if tokens[1] == 'VER_MAJOR':
+ major = int(tokens[2])
+ if tokens[1] == 'VER_MINOR':
+ minor = int(tokens[2])
+ if tokens[1] == 'VER_MINORMINOR':
+ minorminor = int(tokens[2])
+ if majormajor < 1:
+ raise Exception("Could not parse version!")
+ if major < 1:
+ raise Exception("Could not parse version!")
+ if minor == 0 and minorminor == 0:
+ raise Exception("Could not parse version!")
+ return ("%d.%02d.%02d.%02d" % (majormajor, major, minor, minorminor), "%d.%02d" % (majormajor, major))
+
+os.chdir(os.path.dirname(os.path.abspath(__file__)))
+os.chdir("../..")
+
+(openmpt_version, openmpt_version_short) = get_version_number()
+
+def remove_file(filename):
+ if os.path.isfile(filename):
+ os.remove(filename)
+
+def remove_dir(dirname):
+ if os.path.isdir(dirname):
+ shutil.rmtree(dirname)
+
+openmpt_version_name = "OpenMPT-" + openmpt_version
+openmpt_zip_x86_basepath = "installer/OpenMPT-" + openmpt_version + "-x86/"
+openmpt_zip_x86_legacy_basepath = "installer/OpenMPT-" + openmpt_version + "-x86-legacy/"
+openmpt_zip_amd64_basepath = "installer/OpenMPT-" + openmpt_version + "-amd64/"
+openmpt_zip_amd64_legacy_basepath = "installer/OpenMPT-" + openmpt_version + "-amd64-legacy/"
+openmpt_zip_arm_basepath = "installer/OpenMPT-" + openmpt_version + "-arm/"
+openmpt_zip_arm64_basepath = "installer/OpenMPT-" + openmpt_version + "-arm64/"
+openmpt_zip_symbols_basepath = "installer/OpenMPT-" + openmpt_version + "-symbols/"
+openmpt_zip_x86_path = openmpt_zip_x86_basepath
+openmpt_zip_x86_legacy_path = openmpt_zip_x86_legacy_basepath
+openmpt_zip_amd64_path = openmpt_zip_amd64_basepath
+openmpt_zip_amd64_legacy_path = openmpt_zip_amd64_legacy_basepath
+openmpt_zip_arm_path = openmpt_zip_arm_basepath
+openmpt_zip_arm64_path = openmpt_zip_arm64_basepath
+openmpt_zip_symbols_path = openmpt_zip_symbols_basepath
+
+def copy_file(from_path, to_path, filename):
+ shutil.copyfile(from_path + filename, to_path + filename)
+
+def copy_tree(from_path, to_path, pathname):
+ shutil.copytree(from_path + pathname, to_path + pathname)
+
+def copy_binaries(from_path, to_path):
+ os.makedirs(to_path)
+ copy_file(from_path, to_path, "OpenMPT.exe")
+ copy_file(from_path, to_path, "openmpt-lame.dll")
+ copy_file(from_path, to_path, "openmpt-mpg123.dll")
+ copy_file(from_path, to_path, "openmpt-soundtouch.dll")
+ copy_file(from_path, to_path, "openmpt-wine-support.zip")
+
+def copy_pluginbridge(from_path, arch, to_path):
+ copy_file(from_path + arch + "/", to_path, "PluginBridge-" + arch + ".exe")
+ copy_file(from_path + arch + "/", to_path, "PluginBridgeLegacy-" + arch + ".exe")
+
+def copy_symbols(from_path, to_path):
+ os.makedirs(to_path)
+ copy_file(from_path, to_path, "OpenMPT.pdb")
+ copy_file(from_path, to_path, "openmpt-lame.pdb")
+ copy_file(from_path, to_path, "openmpt-mpg123.pdb")
+ copy_file(from_path, to_path, "openmpt-soundtouch.pdb")
+
+def copy_symbols_pluginbridge(from_path, to_path, arch):
+ copy_file(from_path, to_path, "PluginBridge-" + arch + ".pdb")
+ copy_file(from_path, to_path, "PluginBridgeLegacy-" + arch + ".pdb")
+
+def copy_other(to_path, openmpt_version_short):
+ copy_tree("packageTemplate/", to_path, "ExampleSongs")
+ copy_tree("packageTemplate/", to_path, "extraKeymaps")
+ copy_tree("packageTemplate/", to_path, "ReleaseNotesImages")
+ copy_tree("packageTemplate/", to_path, "Licenses")
+ copy_file("packageTemplate/", to_path, "History.txt")
+ copy_file("packageTemplate/", to_path, "License.txt")
+ copy_file("packageTemplate/", to_path, "OpenMPT Issue Tracker.url")
+ copy_file("packageTemplate/", to_path, "OpenMPT Support and Community Forum.url")
+ copy_file("packageTemplate/", to_path, "OpenMPT File Icon.ico")
+ copy_file("packageTemplate/", to_path, "Release Notes.html")
+ copy_file("packageTemplate/", to_path, "OpenMPT Manual.chm")
+ copy_file("packageTemplate/", to_path, "readme.txt")
+
+remove_dir(openmpt_zip_x86_basepath)
+remove_dir(openmpt_zip_amd64_basepath)
+remove_dir(openmpt_zip_arm_basepath)
+remove_dir(openmpt_zip_arm64_basepath)
+remove_dir(openmpt_zip_symbols_basepath)
+
+remove_file("installer/" + openmpt_version_name + "-Setup.exe")
+remove_file("installer/" + openmpt_version_name + "-Setup.update.json")
+remove_file("installer/" + openmpt_version_name + "-portable-x86.zip")
+remove_file("installer/" + openmpt_version_name + "-portable-x86.update.json")
+remove_file("installer/" + openmpt_version_name + "-portable-x86-legacy.zip")
+remove_file("installer/" + openmpt_version_name + "-portable-x86-legacy.update.json")
+remove_file("installer/" + openmpt_version_name + "-portable-amd64.zip")
+remove_file("installer/" + openmpt_version_name + "-portable-amd64.update.json")
+remove_file("installer/" + openmpt_version_name + "-portable-amd64-legacy.zip")
+remove_file("installer/" + openmpt_version_name + "-portable-amd64-legacy.update.json")
+remove_file("installer/" + openmpt_version_name + "-portable-arm.zip")
+remove_file("installer/" + openmpt_version_name + "-portable-arm.update.json")
+remove_file("installer/" + openmpt_version_name + "-portable-arm64.zip")
+remove_file("installer/" + openmpt_version_name + "-portable-arm64.update.json")
+remove_file("installer/" + openmpt_version_name + "-symbols.7z")
+remove_file("installer/" + openmpt_version_name + "-Setup.exe.digests")
+remove_file("installer/" + openmpt_version_name + "-portable-x86.zip.digests")
+remove_file("installer/" + openmpt_version_name + "-portable-x86-legacy.zip.digests")
+remove_file("installer/" + openmpt_version_name + "-portable-amd64.zip.digests")
+remove_file("installer/" + openmpt_version_name + "-portable-amd64-legacy.zip.digests")
+remove_file("installer/" + openmpt_version_name + "-portable-arm.zip.digests")
+remove_file("installer/" + openmpt_version_name + "-portable-arm64.zip.digests")
+remove_file("installer/" + openmpt_version_name + "-symbols.7z.digests")
+remove_file("installer/" + openmpt_version_name + "-update.json")
+
+print("Generating manual...")
+pManual = Popen([executable, "wiki.py"], cwd="mptrack/manual_generator/")
+if singleThreaded:
+ pManual.communicate()
+ if(pManual.returncode != 0):
+ raise Exception("Something went wrong during manual creation!")
+
+
+sourcePathModern = "bin/release/vs2019-win10-static/"
+sourcePathLegacy = "bin/release/vs2019-win7-static/"
+
+signToolCmdLine = ["signtool", "sign", "/fd", "sha256", "/a", "/tr", "http://time.certum.pl", "/td", "sha256"]
+
+def list_binaries(path):
+ binaries = []
+ for f in os.listdir(path):
+ if f.endswith((".exe", ".dll")):
+ binaries.append(path + f)
+ return binaries
+
+if(signBinaries):
+ print("Signing binaries...")
+
+ signDirs = [sourcePathModern + "x86/", sourcePathLegacy + "x86/", sourcePathModern + "amd64/", sourcePathLegacy + "amd64/", sourcePathModern + "arm/", sourcePathModern + "arm64/"]
+ signFiles = []
+ for dir in signDirs:
+ signFiles = signFiles + list_binaries(dir)
+
+ pSigntool = Popen(signToolCmdLine + signFiles)
+ pSigntool.communicate()
+ if(pSigntool.returncode != 0):
+ raise Exception("Something went wrong during signing!")
+
+print("Copying x86 binaries...")
+shutil.rmtree(openmpt_zip_x86_basepath, ignore_errors=True)
+copy_binaries(sourcePathModern + "x86/", openmpt_zip_x86_path)
+copy_pluginbridge(sourcePathModern, "x86", openmpt_zip_x86_path)
+copy_pluginbridge(sourcePathModern, "amd64", openmpt_zip_x86_path)
+copy_pluginbridge(sourcePathModern, "arm", openmpt_zip_x86_path)
+copy_pluginbridge(sourcePathModern, "arm64", openmpt_zip_x86_path)
+Path(openmpt_zip_x86_path + "OpenMPT.portable").touch()
+print("Copying x86 legacy binaries...")
+shutil.rmtree(openmpt_zip_x86_legacy_basepath, ignore_errors=True)
+copy_binaries(sourcePathLegacy + "x86/", openmpt_zip_x86_legacy_path)
+copy_pluginbridge(sourcePathLegacy, "x86", openmpt_zip_x86_legacy_path)
+copy_pluginbridge(sourcePathLegacy, "amd64", openmpt_zip_x86_legacy_path)
+Path(openmpt_zip_x86_legacy_path + "OpenMPT.portable").touch()
+print("Copying amd64 binaries...")
+shutil.rmtree(openmpt_zip_amd64_basepath, ignore_errors=True)
+copy_binaries(sourcePathModern + "amd64/", openmpt_zip_amd64_path)
+copy_pluginbridge(sourcePathModern, "x86", openmpt_zip_amd64_path)
+copy_pluginbridge(sourcePathModern, "amd64", openmpt_zip_amd64_path)
+copy_pluginbridge(sourcePathModern, "arm", openmpt_zip_amd64_path)
+copy_pluginbridge(sourcePathModern, "arm64", openmpt_zip_amd64_path)
+Path(openmpt_zip_amd64_path + "OpenMPT.portable").touch()
+print("Copying amd64 legacy binaries...")
+shutil.rmtree(openmpt_zip_amd64_legacy_basepath, ignore_errors=True)
+copy_binaries(sourcePathLegacy + "amd64/", openmpt_zip_amd64_legacy_path)
+copy_pluginbridge(sourcePathLegacy, "x86", openmpt_zip_amd64_legacy_path)
+copy_pluginbridge(sourcePathLegacy, "amd64", openmpt_zip_amd64_legacy_path)
+Path(openmpt_zip_amd64_legacy_path + "OpenMPT.portable").touch()
+print("Copying arm binaries...")
+shutil.rmtree(openmpt_zip_arm_basepath, ignore_errors=True)
+copy_binaries(sourcePathModern + "arm/", openmpt_zip_arm_path)
+copy_pluginbridge(sourcePathModern, "x86", openmpt_zip_arm_path)
+copy_pluginbridge(sourcePathModern, "amd64", openmpt_zip_arm_path)
+copy_pluginbridge(sourcePathModern, "arm", openmpt_zip_arm_path)
+copy_pluginbridge(sourcePathModern, "arm64", openmpt_zip_arm_path)
+Path(openmpt_zip_arm_path + "OpenMPT.portable").touch()
+print("Copying arm64 binaries...")
+shutil.rmtree(openmpt_zip_arm64_basepath, ignore_errors=True)
+copy_binaries(sourcePathModern + "arm64/", openmpt_zip_arm64_path)
+copy_pluginbridge(sourcePathModern, "x86", openmpt_zip_arm64_path)
+copy_pluginbridge(sourcePathModern, "amd64", openmpt_zip_arm64_path)
+copy_pluginbridge(sourcePathModern, "arm", openmpt_zip_arm64_path)
+copy_pluginbridge(sourcePathModern, "arm64", openmpt_zip_arm64_path)
+Path(openmpt_zip_arm64_path + "OpenMPT.portable").touch()
+
+print("Copying symbols...")
+shutil.rmtree(openmpt_zip_symbols_basepath, ignore_errors=True)
+copy_symbols(sourcePathModern + "x86/", openmpt_zip_symbols_path + "x86/")
+copy_symbols(sourcePathLegacy + "x86/", openmpt_zip_symbols_path + "x86-legacy/")
+copy_symbols(sourcePathModern + "amd64/", openmpt_zip_symbols_path + "amd64/")
+copy_symbols(sourcePathLegacy + "amd64/", openmpt_zip_symbols_path + "amd64-legacy/")
+copy_symbols(sourcePathModern + "arm/", openmpt_zip_symbols_path + "arm/")
+copy_symbols(sourcePathModern + "arm64/", openmpt_zip_symbols_path + "arm64/")
+copy_symbols_pluginbridge(sourcePathModern + "x86/", openmpt_zip_symbols_path + "x86/", "x86")
+copy_symbols_pluginbridge(sourcePathLegacy + "x86/", openmpt_zip_symbols_path + "x86-legacy/", "x86")
+copy_symbols_pluginbridge(sourcePathModern + "amd64/", openmpt_zip_symbols_path + "amd64/", "amd64")
+copy_symbols_pluginbridge(sourcePathLegacy + "amd64/", openmpt_zip_symbols_path + "amd64-legacy/", "amd64")
+copy_symbols_pluginbridge(sourcePathModern + "arm/", openmpt_zip_symbols_path + "arm/", "arm")
+copy_symbols_pluginbridge(sourcePathModern + "arm64/", openmpt_zip_symbols_path + "arm64/", "arm64")
+
+if not singleThreaded:
+ pManual.communicate()
+ if(pManual.returncode != 0):
+ raise Exception("Something went wrong during manual creation!")
+
+print("Updating package template...")
+pTemplate = Popen(["build\\auto\\update_package_template.cmd"], cwd="./")
+pTemplate.communicate()
+if(pTemplate.returncode != 0):
+ raise Exception("Something went wrong during updating package template!")
+
+print("Other package contents...")
+copy_other(openmpt_zip_x86_path, openmpt_version_short)
+copy_other(openmpt_zip_x86_legacy_path, openmpt_version_short)
+copy_other(openmpt_zip_amd64_path, openmpt_version_short)
+copy_other(openmpt_zip_amd64_legacy_path, openmpt_version_short)
+copy_other(openmpt_zip_arm_path, openmpt_version_short)
+copy_other(openmpt_zip_arm64_path, openmpt_version_short)
+
+print("Creating zip files and installers...")
+
+isccParams = ["install-multi-arch.iss"]
+if signInstaller:
+ isccParams = ["/Ssigntool=" + (" ".join(signToolCmdLine)) + " $f", "install-multi-arch-signed.iss"]
+
+pInno = Popen([pathISCC] + isccParams, cwd="installer/")
+if singleThreaded:
+ pInno.communicate()
+
+p7zx86 = Popen([path7z, "a", "-tzip", "-mx=9", "../" + openmpt_version_name + "-portable-x86.zip", "."], cwd=openmpt_zip_x86_basepath)
+if singleThreaded:
+ p7zx86.communicate()
+p7zx86legacy = Popen([path7z, "a", "-tzip", "-mx=9", "../" + openmpt_version_name + "-portable-x86-legacy.zip", "."], cwd=openmpt_zip_x86_legacy_basepath)
+if singleThreaded:
+ p7zx86legacy.communicate()
+p7zamd64 = Popen([path7z, "a", "-tzip", "-mx=9", "../" + openmpt_version_name + "-portable-amd64.zip", "."], cwd=openmpt_zip_amd64_basepath)
+if singleThreaded:
+ p7zamd64.communicate()
+p7zamd64legacy = Popen([path7z, "a", "-tzip", "-mx=9", "../" + openmpt_version_name + "-portable-amd64-legacy.zip", "."], cwd=openmpt_zip_amd64_legacy_basepath)
+if singleThreaded:
+ p7zamd64legacy.communicate()
+p7zarm = Popen([path7z, "a", "-tzip", "-mx=9", "../" + openmpt_version_name + "-portable-arm.zip", "."], cwd=openmpt_zip_arm_basepath)
+if singleThreaded:
+ p7zarm.communicate()
+p7zarm64 = Popen([path7z, "a", "-tzip", "-mx=9", "../" + openmpt_version_name + "-portable-arm64.zip", "."], cwd=openmpt_zip_arm64_basepath)
+if singleThreaded:
+ p7zarm64.communicate()
+
+p7zsymbols = Popen([path7z, "a", "-t7z", "-mx=9", "../" + openmpt_version_name + "-symbols.7z", "."], cwd=openmpt_zip_symbols_basepath)
+if singleThreaded:
+ p7zsymbols.communicate()
+
+if not singleThreaded:
+ pInno.communicate()
+ p7zx86.communicate()
+ p7zx86legacy.communicate()
+ p7zamd64.communicate()
+ p7zamd64legacy.communicate()
+ p7zarm.communicate()
+ p7zarm64.communicate()
+ p7zsymbols.communicate()
+
+if(p7zx86.returncode != 0 or p7zx86legacy.returncode != 0 or p7zamd64.returncode != 0 or p7zamd64legacy.returncode != 0 or p7zarm.returncode != 0 or p7zarm64.returncode != 0 or pInno.returncode != 0):
+ raise Exception("Something went wrong during packaging!")
+
+def hash_file(filename):
+ sha3_512 = hashlib.sha3_512()
+ sha256 = hashlib.sha256()
+ with open(filename, "rb") as f:
+ buf = f.read()
+ sha3_512.update(buf)
+ sha256.update(buf)
+ with open(filename + ".digests", "wb") as f:
+ f.write(("SHA3-512: " + sha3_512.hexdigest() + "\nSHA256: " + sha256.hexdigest() + "\n").encode('utf-8'))
+ f.close()
+
+hash_file("installer/" + openmpt_version_name + "-Setup.exe")
+hash_file("installer/" + openmpt_version_name + "-portable-x86.zip")
+hash_file("installer/" + openmpt_version_name + "-portable-x86-legacy.zip")
+hash_file("installer/" + openmpt_version_name + "-portable-amd64.zip")
+hash_file("installer/" + openmpt_version_name + "-portable-amd64-legacy.zip")
+hash_file("installer/" + openmpt_version_name + "-portable-arm.zip")
+hash_file("installer/" + openmpt_version_name + "-portable-arm64.zip")
+hash_file("installer/" + openmpt_version_name + "-symbols.7z")
+
+shutil.rmtree(openmpt_zip_x86_basepath)
+shutil.rmtree(openmpt_zip_x86_legacy_basepath)
+shutil.rmtree(openmpt_zip_amd64_basepath)
+shutil.rmtree(openmpt_zip_amd64_legacy_basepath)
+shutil.rmtree(openmpt_zip_arm_basepath)
+shutil.rmtree(openmpt_zip_arm64_basepath)
+shutil.rmtree(openmpt_zip_symbols_basepath)
+
+if interactive:
+ input(openmpt_version_name + " has been packaged successfully.")
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_update_information.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_update_information.cmd
new file mode 100644
index 00000000..d650a66c
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/build_openmpt_update_information.cmd
@@ -0,0 +1,37 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+
+set MY_DIR=%CD%
+
+cd ..\.. || goto error
+
+call build\auto\setup_vs_any.cmd
+
+call build\auto\helper_get_svnversion.cmd
+call build\auto\helper_get_openmpt_version.cmd
+
+cd build\auto || goto error
+
+..\..\build\tools\python3\python.exe ..\..\installer\generate_update_json.py || goto error
+
+cd "%MY_DIR%"
+
+goto ok
+
+:ok
+echo "All OK."
+if "x%1" == "xauto" (
+ exit 0
+)
+goto end
+:error
+echo "Error!"
+if "x%1" == "xauto" (
+ exit 1
+)
+goto end
+:end
+cd %MY_DIR%
+pause
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/check_clang-format.sh b/Src/external_dependencies/openmpt-trunk/build/auto/check_clang-format.sh
new file mode 100644
index 00000000..c4758479
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/check_clang-format.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+
+set -e
+
+function checkclean {
+ if [ $(svn status | wc -l) -ne 0 ]; then
+ return 1
+ fi
+ return 0
+}
+
+checkclean || ( echo "error: Working copy not clean" ; exit 1 )
+
+./build/svn/run_clang-format.sh
+
+checkclean || ( echo "warning: Formatting does not adhere to enforced clang-format rules." ; svn diff )
+
+svn revert -R .
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/check_libopenmpt_args.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/check_libopenmpt_args.cmd
new file mode 100644
index 00000000..7dce0629
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/check_libopenmpt_args.cmd
@@ -0,0 +1,37 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments.cmd" %1 %2 %3 %4 %5 %6
+
+call "build\auto\setup_%MPT_VS_VER%.cmd"
+
+
+
+cd "build\%MPT_VS_WITHTARGET%" || goto error
+
+ msbuild libopenmpt.sln /target:Build /p:RunCodeAnalysis=true /p:EnableCppCoreCheck=false /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ msbuild openmpt123.sln /target:Build /p:RunCodeAnalysis=true /p:EnableCppCoreCheck=false /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ if "%MPT_VS_ARCH%" == "Win32" (
+ msbuild in_openmpt.sln /target:Build /p:RunCodeAnalysis=true /p:EnableCppCoreCheck=false /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ msbuild xmp-openmpt.sln /target:Build /p:RunCodeAnalysis=true /p:EnableCppCoreCheck=false /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ )
+ msbuild libopenmpt.sln /target:Build /p:RunCodeAnalysis=true /p:EnableCppCoreCheck=false /property:Configuration=ReleaseShared;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+
+cd ..\.. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/check_libopenmpt_test_args.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/check_libopenmpt_test_args.cmd
new file mode 100644
index 00000000..15cb15e3
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/check_libopenmpt_test_args.cmd
@@ -0,0 +1,29 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments.cmd" %1 %2 %3 %4 %5 %6
+
+call "build\auto\setup_%MPT_VS_VER%.cmd"
+
+
+
+cd "build\%MPT_VS_WITHTARGET%" || goto error
+ msbuild libopenmpt_test.sln /target:Build /p:RunCodeAnalysis=true /p:EnableCppCoreCheck=false /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+cd ..\.. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/check_libopenmpt_winrt.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/check_libopenmpt_winrt.cmd
new file mode 100644
index 00000000..d9b19688
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/check_libopenmpt_winrt.cmd
@@ -0,0 +1,31 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments_winrt.cmd" %1 %2 %3 %4 %5 %6
+
+call "build\auto\setup_%MPT_VS_VER%.cmd"
+
+
+
+cd "build\%MPT_VS_TARGET%" || goto error
+
+ msbuild libopenmpt.sln /target:Build /p:RunCodeAnalysis=true /p:EnableCppCoreCheck=false /property:Configuration=%MPT_VS_CONF%;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+
+cd ..\.. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/check_openmpt_args.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/check_openmpt_args.cmd
new file mode 100644
index 00000000..e92a720f
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/check_openmpt_args.cmd
@@ -0,0 +1,31 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments.cmd" %1 %2 %3 %4 %5 %6
+
+call "build\auto\setup_%MPT_VS_VER%.cmd"
+
+
+
+cd "build\%MPT_VS_WITHTARGET%" || goto error
+
+msbuild OpenMPT%MPT_VS_FLAVOUR%.sln /target:Build /p:RunCodeAnalysis=true /p:EnableCppCoreCheck=false /property:Configuration=%MPT_VS_CONF%;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+
+cd ..\.. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/clean-js.sh b/Src/external_dependencies/openmpt-trunk/build/auto/clean-js.sh
new file mode 100644
index 00000000..79dbddfe
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/clean-js.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+set -e
+
+rm -rf bin/stage
+
+make CONFIG=emscripten VERBOSE=1 clean-dist
+make CONFIG=emscripten EMSCRIPTEN_TARGET=wasm VERBOSE=1 clean
+make CONFIG=emscripten EMSCRIPTEN_TARGET=asmjs128m VERBOSE=1 clean
+make CONFIG=emscripten EMSCRIPTEN_TARGET=asmjs VERBOSE=1 clean
+make CONFIG=emscripten EMSCRIPTEN_TARGET=js VERBOSE=1 clean
+
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/clean.sh b/Src/external_dependencies/openmpt-trunk/build/auto/clean.sh
new file mode 100644
index 00000000..21938316
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/clean.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+set -e
+
+#
+# Dist clean script for libopenmpt.
+#
+# This is meant to be run by the libopenmpt maintainers.
+#
+# WARNING: The script expects the be run from the root of an OpenMPT svn
+# checkout. It invests no effort in verifying this precondition.
+#
+
+# We want ccache
+export PATH="/usr/lib/ccache:$PATH"
+
+# Clean dist
+make NO_SDL=1 NO_SDL2=1 clean-dist
+
+# Clean
+make NO_SDL=1 NO_SDL2=1 clean
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/clean_libopenmpt_args.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/clean_libopenmpt_args.cmd
new file mode 100644
index 00000000..cb30e736
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/clean_libopenmpt_args.cmd
@@ -0,0 +1,39 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments.cmd" %1 %2 %3 %4 %5 %6
+
+call "build\auto\setup_%MPT_VS_VER%.cmd"
+
+
+
+cd "build\%MPT_VS_WITHTARGET%" || goto error
+
+ msbuild libopenmpt_test.sln /target:Clean /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+
+ msbuild libopenmpt.sln /target:Clean /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ msbuild openmpt123.sln /target:Clean /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ if "%MPT_VS_ARCH%" == "Win32" (
+ msbuild in_openmpt.sln /target:Clean /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ msbuild xmp-openmpt.sln /target:Clean /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ )
+ msbuild libopenmpt.sln /target:Clean /property:Configuration=ReleaseShared;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+
+cd ..\.. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/clean_libopenmpt_retro_winxp.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/clean_libopenmpt_retro_winxp.cmd
new file mode 100644
index 00000000..cb30e736
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/clean_libopenmpt_retro_winxp.cmd
@@ -0,0 +1,39 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments.cmd" %1 %2 %3 %4 %5 %6
+
+call "build\auto\setup_%MPT_VS_VER%.cmd"
+
+
+
+cd "build\%MPT_VS_WITHTARGET%" || goto error
+
+ msbuild libopenmpt_test.sln /target:Clean /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+
+ msbuild libopenmpt.sln /target:Clean /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ msbuild openmpt123.sln /target:Clean /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ if "%MPT_VS_ARCH%" == "Win32" (
+ msbuild in_openmpt.sln /target:Clean /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ msbuild xmp-openmpt.sln /target:Clean /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+ )
+ msbuild libopenmpt.sln /target:Clean /property:Configuration=ReleaseShared;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+
+cd ..\.. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/clean_libopenmpt_winrt.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/clean_libopenmpt_winrt.cmd
new file mode 100644
index 00000000..4760ff98
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/clean_libopenmpt_winrt.cmd
@@ -0,0 +1,33 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments_winrt.cmd" %1 %2 %3 %4 %5 %6
+
+call "build\auto\setup_%MPT_VS_VER%.cmd"
+
+
+
+cd "build\%MPT_VS_TARGET%" || goto error
+
+ msbuild libopenmpt.sln /target:Clean /property:Configuration=Release;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+
+ msbuild libopenmpt.sln /target:Clean /property:Configuration=ReleaseShared;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+
+cd ..\.. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/clean_openmpt_args.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/clean_openmpt_args.cmd
new file mode 100644
index 00000000..94e6d04e
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/clean_openmpt_args.cmd
@@ -0,0 +1,31 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments.cmd" %1 %2 %3 %4 %5 %6
+
+call "build\auto\setup_%MPT_VS_VER%.cmd"
+
+
+
+cd "build\%MPT_VS_WITHTARGET%" || goto error
+
+msbuild OpenMPT%MPT_VS_FLAVOUR%.sln /target:Clean /property:Configuration=%MPT_VS_CONF%;Platform=%MPT_VS_ARCH% /maxcpucount /verbosity:minimal || goto error
+
+cd ..\.. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/cppcheck_openmpt.sh b/Src/external_dependencies/openmpt-trunk/build/auto/cppcheck_openmpt.sh
new file mode 100644
index 00000000..b61f1718
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/cppcheck_openmpt.sh
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+
+# Usage: build/auto/cppcheck_openmpt.sh [win32W|win64|win32A] [options]
+
+set -e
+
+CPPCHECK_INCLUDES="-Isrc -Iinclude -Iinclude/vstsdk2.4 -Iinclude/ASIOSDK2/common -Iinclude/flac/include -Iinclude/lame/include -Iinclude/lhasa/lib/public -Iinclude/mpg123/ports/MSVC++ -Iinclude/mpg123/src/libmpg123 -Iinclude/ogg/include -Iinclude/opus/include -Iinclude/opusenc/include -Iinclude/opusfile/include -Iinclude/portaudio/include -Iinclude/rtaudio -Iinclude/vorbis/include -Iinclude/zlib -Icommon -Isoundlib -Ibuild/svn_version"
+
+CPPCHECK_DEFINES="-DMODPLUG_TRACKER -DMPT_BUILD_MSVC -DMPT_BUILD_MSVC_STATIC"
+
+case ${1} in
+win32W)
+ CPPCHECK_PLATFORM="--platform=win32W -D_WIN32 -DWIN32 -D_UNICODE -DUNICODE -D_WINDOWS -DWINDOWS -D_MFC_VER"
+ ;;
+win64)
+ CPPCHECK_PLATFORM="--platform=win64 -D_WIN32 -DWIN32 -D_WIN64 -DWIN64 -D_UNICODE -DUNICODE -D_WINDOWS -DWINDOWS -D_MFC_VER"
+ ;;
+win32A)
+ CPPCHECK_PLATFORM="--platform=win32A -D_WIN32 -DWIN32 -D_WINDOWS -DWINDOWS -D_MFC_VER"
+ ;;
+*)
+ CPPCHECK_PLATFORM=""
+ ;;
+esac
+
+CPPCHECK_OPTIONS=${2}
+
+CPPCHECK_FILES="common/ soundbase/ sounddev/ sounddsp/ soundlib/ test/ unarchiver/ mptrack/ pluginBridge/"
+
+NPROC=$(nproc)
+
+echo "Platform: $CPPCHECK_PLATFORM"
+
+echo "Checking config ..."
+cppcheck -j $NPROC -DCPPCHECK -DMPT_CPPCHECK_CUSTOM $CPPCHECK_PLATFORM --std=c99 --std=c++17 --library=windows.cfg --library=microsoft_atl.cfg --library=mfc.cfg --library=build/cppcheck/nlohmann-json.cfg --suppressions-list=build/cppcheck/nlohmann-json.suppressions.txt --suppressions-list=build/cppcheck/r8brain.suppressions.txt --enable=warning --inline-suppr --template='{file}:{line}: warning: {severity}: {message} [{id}]' --suppress=missingIncludeSystem --suppress=uninitMemberVar $CPPCHECK_OPTIONS $CPPCHECK_DEFINES $CPPCHECK_INCLUDES --check-config --suppress=unmatchedSuppression $CPPCHECK_FILES
+echo "Checking C++ ..."
+cppcheck -j $NPROC -DCPPCHECK -DMPT_CPPCHECK_CUSTOM $CPPCHECK_PLATFORM --std=c99 --std=c++17 --library=windows.cfg --library=microsoft_atl.cfg --library=mfc.cfg --library=build/cppcheck/nlohmann-json.cfg --suppressions-list=build/cppcheck/nlohmann-json.suppressions.txt --suppressions-list=build/cppcheck/r8brain.suppressions.txt --enable=warning --inline-suppr --template='{file}:{line}: warning: {severity}: {message} [{id}]' --suppress=missingIncludeSystem --suppress=uninitMemberVar $CPPCHECK_OPTIONS $CPPCHECK_DEFINES $CPPCHECK_INCLUDES $CPPCHECK_FILES
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/dist-js.sh b/Src/external_dependencies/openmpt-trunk/build/auto/dist-js.sh
new file mode 100644
index 00000000..6b8bcc87
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/dist-js.sh
@@ -0,0 +1,42 @@
+#!/usr/bin/env bash
+set -e
+
+mkdir -p bin
+rm -rf bin/stage
+mkdir -p bin/stage
+
+make CONFIG=emscripten VERBOSE=1 clean-dist
+make CONFIG=emscripten EMSCRIPTEN_TARGET=all VERBOSE=1 clean
+make CONFIG=emscripten EMSCRIPTEN_TARGET=wasm VERBOSE=1 clean
+make CONFIG=emscripten EMSCRIPTEN_TARGET=js VERBOSE=1 clean
+
+mkdir -p bin/stage/all
+make CONFIG=emscripten EMSCRIPTEN_TARGET=all VERBOSE=1 clean
+make CONFIG=emscripten TEST=1 ONLY_TEST=1 EMSCRIPTEN_TARGET=all VERBOSE=1
+make CONFIG=emscripten TEST=1 ONLY_TEST=1 EMSCRIPTEN_TARGET=all VERBOSE=1 check
+make CONFIG=emscripten TEST=0 EMSCRIPTEN_TARGET=all VERBOSE=1
+cp bin/libopenmpt.js bin/stage/all/
+cp bin/libopenmpt.js.mem bin/stage/all/
+cp bin/libopenmpt.wasm bin/stage/all/
+cp bin/libopenmpt.wasm.js bin/stage/all/
+make CONFIG=emscripten EMSCRIPTEN_TARGET=all VERBOSE=1 clean
+
+mkdir -p bin/stage/wasm
+make CONFIG=emscripten EMSCRIPTEN_TARGET=wasm VERBOSE=1 clean
+make CONFIG=emscripten TEST=1 ONLY_TEST=1 EMSCRIPTEN_TARGET=wasm VERBOSE=1
+make CONFIG=emscripten TEST=1 ONLY_TEST=1 EMSCRIPTEN_TARGET=wasm VERBOSE=1 check
+make CONFIG=emscripten TEST=0 EMSCRIPTEN_TARGET=wasm VERBOSE=1
+cp bin/libopenmpt.js bin/stage/wasm/
+cp bin/libopenmpt.wasm bin/stage/wasm/
+make CONFIG=emscripten EMSCRIPTEN_TARGET=wasm VERBOSE=1 clean
+
+mkdir -p bin/stage/js
+make CONFIG=emscripten EMSCRIPTEN_TARGET=js VERBOSE=1 clean
+make CONFIG=emscripten TEST=1 ONLY_TEST=1 EMSCRIPTEN_TARGET=js VERBOSE=1
+make CONFIG=emscripten TEST=1 ONLY_TEST=1 EMSCRIPTEN_TARGET=js VERBOSE=1 check
+make CONFIG=emscripten TEST=0 EMSCRIPTEN_TARGET=js VERBOSE=1
+cp bin/libopenmpt.js bin/stage/js/
+cp bin/libopenmpt.js.mem bin/stage/js/
+make CONFIG=emscripten EMSCRIPTEN_TARGET=js VERBOSE=1 clean
+
+make CONFIG=emscripten VERBOSE=1 dist-js
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/dist.sh b/Src/external_dependencies/openmpt-trunk/build/auto/dist.sh
new file mode 100644
index 00000000..9d503571
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/dist.sh
@@ -0,0 +1,124 @@
+#!/usr/bin/env bash
+set -e
+
+#
+# Dist script for libopenmpt.
+#
+# This is meant to be run by the libopenmpt maintainers.
+#
+# WARNING: The script expects the be run from the root of an OpenMPT svn
+# checkout. It invests no effort in verifying this precondition.
+#
+
+# We want ccache
+export PATH="/usr/lib/ccache:$PATH"
+
+# Create bin directory
+mkdir -p bin
+
+# Check that the API headers are standard compliant
+echo "Checking C header ..."
+echo '#include <stddef.h>' > bin/empty.c
+echo '' > bin/headercheck.c
+echo '#include "libopenmpt/libopenmpt.h"' >> bin/headercheck.c
+echo 'int main() { return 0; }' >> bin/headercheck.c
+echo " cc"
+cc -pedantic -Wall -Wextra -Werror -I. bin/headercheck.c -o bin/headercheck.cc.out
+echo " cc 89"
+cc -std=c89 -pedantic -Wall -Wextra -Werror -I. bin/headercheck.c -o bin/headercheck.cc89.out
+echo " cc 99"
+cc -std=c99 -pedantic -Wall -Wextra -Werror -I. bin/headercheck.c -o bin/headercheck.cc99.out
+echo " cc 11"
+cc -std=c11 -pedantic -Wall -Wextra -Werror -I. bin/headercheck.c -o bin/headercheck.cc11.out
+if cc -std=c18 -c bin/empty.c -o bin/empty.cc18.out > /dev/null 2>&1 ; then
+echo " cc 18"
+cc -std=c18 -pedantic -Wall -Wextra -Werror -I. bin/headercheck.c -o bin/headercheck.cc18.out
+fi
+echo " gcc 89"
+gcc -std=c89 -pedantic -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.c -o bin/headercheck.gcc89.out
+echo " gcc 99"
+gcc -std=c99 -pedantic -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.c -o bin/headercheck.gcc99.out
+echo " gcc 11"
+gcc -std=c11 -pedantic -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.c -o bin/headercheck.gcc11.out
+if gcc -std=c18 -c bin/empty.c -o bin/empty.gcc18.out > /dev/null 2>&1 ; then
+echo " gcc 18"
+gcc -std=c18 -pedantic -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.c -o bin/headercheck.gcc18.out
+fi
+echo " clang 89"
+clang -std=c89 -pedantic -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.c -o bin/headercheck.clang89.out
+echo " clang 99"
+clang -std=c99 -pedantic -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.c -o bin/headercheck.clang99.out
+echo " clang 11"
+clang -std=c11 -pedantic -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.c -o bin/headercheck.clang11.out
+if clang -std=c18 -c bin/empty.c -o bin/empty.clang18.out > /dev/null 2>&1 ; then
+echo " clang 18"
+clang -std=c18 -pedantic -Wall -Wextra -Wpedantic -Werror -I. bin/headercheck.c -o bin/headercheck.clang18.out
+fi
+if [ `uname -s` != "Darwin" ] ; then
+if [ `uname -m` == "x86_64" ] ; then
+echo " tcc"
+tcc -Wall -Wunusupported -Wwrite-strings -Werror -I. bin/headercheck.c -o bin/headercheck.tcc.out
+fi
+fi
+rm bin/headercheck.*.out
+rm bin/headercheck.c
+echo "Checking C++ header ..."
+echo '#include <array>' > bin/empty.cpp
+touch bin/empty.dummy.out
+echo '' > bin/headercheck.cpp
+echo '#include "libopenmpt/libopenmpt.hpp"' >> bin/headercheck.cpp
+echo 'int main() { return 0; }' >> bin/headercheck.cpp
+#echo " c++"
+#c++ -pedantic -Wall -Wextra -Werror -I. bin/headercheck.cpp -o bin/headercheck.cpp.out
+echo " c++ 17"
+c++ -std=c++17 -pedantic -Wall -Wextra -Werror -I. bin/headercheck.cpp -o bin/headercheck.cpp17.out
+if c++ -std=c++20 -c bin/empty.cpp -o bin/empty.cpp20.out > /dev/null 2>&1 ; then
+echo " c++ 20"
+c++ -std=c++20 -pedantic -Wall -Wextra -Werror -I. bin/headercheck.cpp -o bin/headercheck.cpp20.out
+fi
+echo " g++ 17"
+g++ -std=c++17 -pedantic -Wall -Wextra -Werror -I. bin/headercheck.cpp -o bin/headercheck.gpp17.out
+if g++ -std=c++20 -c bin/empty.cpp -o bin/empty.gpp20.out > /dev/null 2>&1 ; then
+echo " g++ 20"
+g++ -std=c++20 -pedantic -Wall -Wextra -Werror -I. bin/headercheck.cpp -o bin/headercheck.gpp20.out
+fi
+echo " clang++ 17"
+clang++ -std=c++17 -pedantic -Wall -Wextra -Werror -I. bin/headercheck.cpp -o bin/headercheck.clangpp17.out
+if clang++ -std=c++20 -c bin/empty.cpp -o bin/empty.clangpp20.out > /dev/null 2>&1 ; then
+echo " clang++ 20"
+clang++ -std=c++20 -pedantic -Wall -Wextra -Werror -I. bin/headercheck.cpp -o bin/headercheck.clangpp20.out
+fi
+rm bin/headercheck.*.out
+rm bin/headercheck.cpp
+rm bin/empty.*.out
+rm bin/empty.cpp
+rm bin/empty.c
+
+echo "Checking version helper ..."
+c++ -Wall -Wextra -I. -Isrc -Icommon build/auto/helper_get_openmpt_version.cpp -o bin/helper_get_openmpt_version
+rm bin/helper_get_openmpt_version
+
+# Clean dist
+make NO_SDL=1 NO_SDL2=1 clean-dist
+
+# Check the build
+make NO_SDL=1 NO_SDL2=1 STRICT=1 clean
+make NO_SDL=1 NO_SDL2=1 STRICT=1
+make NO_SDL=1 NO_SDL2=1 STRICT=1 check
+make NO_SDL=1 NO_SDL2=1 STRICT=1 clean
+
+# Build Unix-like tarball, Windows zipfile and docs tarball
+if `svn info . > /dev/null 2>&1` ; then
+make NO_SDL=1 NO_SDL2=1 SILENT_DOCS=1 dist
+fi
+
+# Clean
+make NO_SDL=1 NO_SDL2=1 clean
+
+# Build autoconfiscated tarball
+./build/autotools/autoconfiscate.sh
+
+# Test autotools tarball
+./build/autotools/test_tarball.sh
+
+
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/helper_get_openmpt_version.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/helper_get_openmpt_version.cmd
new file mode 100644
index 00000000..f4bdba9a
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/helper_get_openmpt_version.cmd
@@ -0,0 +1,52 @@
+@echo off
+
+cd build\auto
+cl /I..\.. /I..\..\src /I..\..\common /EHsc helper_get_openmpt_version.cpp
+cd ..\..
+
+build\auto\helper_get_openmpt_version.exe openmpt > openmpt_version.txt
+set /p OPENMPT_VERSION=<openmpt_version.txt
+del /f openmpt_version.txt
+
+build\auto\helper_get_openmpt_version.exe openmpt-version-majormajor > openmpt_version.txt
+set /p OPENMPT_VERSION_MAJORMAJOR=<openmpt_version.txt
+del /f openmpt_version.txt
+
+build\auto\helper_get_openmpt_version.exe openmpt-version-major > openmpt_version.txt
+set /p OPENMPT_VERSION_MAJOR=<openmpt_version.txt
+del /f openmpt_version.txt
+
+build\auto\helper_get_openmpt_version.exe openmpt-version-minor > openmpt_version.txt
+set /p OPENMPT_VERSION_MINOR=<openmpt_version.txt
+del /f openmpt_version.txt
+
+build\auto\helper_get_openmpt_version.exe openmpt-version-minorminor > openmpt_version.txt
+set /p OPENMPT_VERSION_MINORMINOR=<openmpt_version.txt
+del /f openmpt_version.txt
+
+build\auto\helper_get_openmpt_version.exe libopenmpt-version-major > openmpt_version.txt
+set /p LIBOPENMPT_VERSION_MAJOR=<openmpt_version.txt
+del /f openmpt_version.txt
+
+build\auto\helper_get_openmpt_version.exe libopenmpt-version-minor > openmpt_version.txt
+set /p LIBOPENMPT_VERSION_MINOR=<openmpt_version.txt
+del /f openmpt_version.txt
+
+build\auto\helper_get_openmpt_version.exe libopenmpt-version-patch > openmpt_version.txt
+set /p LIBOPENMPT_VERSION_PATCH=<openmpt_version.txt
+del /f openmpt_version.txt
+
+build\auto\helper_get_openmpt_version.exe libopenmpt-version-prerel > openmpt_version.txt
+set /p LIBOPENMPT_VERSION_PREREL=<openmpt_version.txt
+del /f openmpt_version.txt
+
+build\auto\helper_get_openmpt_version.exe libopenmpt-version-string > openmpt_version.txt
+set /p LIBOPENMPT_VERSION_STRING=<openmpt_version.txt
+del /f openmpt_version.txt
+
+cd build\auto
+del /f helper_get_openmpt_version.obj
+del /f helper_get_openmpt_version.exe
+cd ..\..
+
+rem echo %OPENMPT_VERSION%
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/helper_get_openmpt_version.cpp b/Src/external_dependencies/openmpt-trunk/build/auto/helper_get_openmpt_version.cpp
new file mode 100644
index 00000000..12e0d786
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/helper_get_openmpt_version.cpp
@@ -0,0 +1,71 @@
+
+#define LIBOPENMPT_BUILD
+#include "common/BuildSettings.h"
+
+#include <iostream>
+#include <string>
+#include <vector>
+
+#include "common/versionNumber.h"
+#include "libopenmpt/libopenmpt_version.h"
+
+#define VER_HELPER_STRINGIZE(x) #x
+#define VER_STRINGIZE(x) VER_HELPER_STRINGIZE(x)
+
+int main( int argc, char * argv [] ) {
+ std::vector<std::string> args = std::vector<std::string>( argv, argv + argc );
+ for ( std::vector<std::string>::const_iterator i = args.begin(); i != args.end(); ++i ) {
+ if ( i == args.begin() ) {
+ // skip program name
+ continue;
+ }
+ std::string arg = *i;
+ if ( arg == "" ) {
+ std::cout << "unknown" << std::endl;
+
+ } else if ( arg == "openmpt" ) {
+ std::cout << VER_STRINGIZE(VER_MAJORMAJOR) << "." << VER_STRINGIZE(VER_MAJOR) << "." << VER_STRINGIZE(VER_MINOR) << "." << VER_STRINGIZE(VER_MINORMINOR) << std::endl;
+
+ } else if ( arg == "openmpt-version-majormajor" ) {
+ std::cout << VER_STRINGIZE(VER_MAJORMAJOR) << std::endl;
+
+ } else if ( arg == "openmpt-version-major" ) {
+ std::cout << VER_STRINGIZE(VER_MAJOR) << std::endl;
+
+ } else if ( arg == "openmpt-version-minor" ) {
+ std::cout << VER_STRINGIZE(VER_MINOR) << std::endl;
+
+ } else if ( arg == "openmpt-version-minorminor" ) {
+ std::cout << VER_STRINGIZE(VER_MINORMINOR) << std::endl;
+
+#ifdef OPENMPT_API_VERSION_MAJOR
+ } else if ( arg == "libopenmpt-version-major" ) {
+ std::cout << OPENMPT_API_VERSION_MAJOR << std::endl;
+#endif
+
+#ifdef OPENMPT_API_VERSION_MINOR
+ } else if ( arg == "libopenmpt-version-minor" ) {
+ std::cout << OPENMPT_API_VERSION_MINOR << std::endl;
+#endif
+
+#ifdef OPENMPT_API_VERSION_PATCH
+ } else if ( arg == "libopenmpt-version-patch" ) {
+ std::cout << OPENMPT_API_VERSION_PATCH << std::endl;
+#endif
+
+#ifdef OPENMPT_API_VERSION_PREREL
+ } else if ( arg == "libopenmpt-version-prerel" ) {
+ std::cout << OPENMPT_API_VERSION_PREREL << std::endl;
+#endif
+
+#ifdef OPENMPT_API_VERSION_STRING
+ } else if ( arg == "libopenmpt-version-string" ) {
+ std::cout << OPENMPT_API_VERSION_STRING << std::endl;
+#endif
+
+ } else {
+ std::cout << "unknown" << std::endl;
+ }
+ }
+ return 0;
+}
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/helper_get_svnversion.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/helper_get_svnversion.cmd
new file mode 100644
index 00000000..3f6635ce
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/helper_get_svnversion.cmd
@@ -0,0 +1,48 @@
+@echo off
+
+set SVNVERSION=unknown
+
+set SVNVERSION_VALID=false
+del /f svnversion.txt
+if "x%SVNVERSION%" == "xunknown" (
+ set SVNVERSION_VALID=true
+ svnversion > svnversion.txt
+ if errorlevel 1 (
+ set SVNVERSION_VALID=false
+ )
+)
+if "x%SVNVERSION_VALID%" == "xtrue" (
+ set /p %RAWSVNVERSION=<svnversion.txt
+)
+if "x%SVNVERSION_VALID%" == "xtrue" (
+ if "%RAWSVNVERSION%" == "Unversioned directory" (
+ set SVNVERSION_VALID=false
+ )
+)
+if "x%SVNVERSION_VALID%" == "xtrue" (
+ set SVNVERSION=r%RAWSVNVERSION::=-%
+)
+del /f svnversion.txt
+
+set GITVERSION_VALID=false
+del /f gitversion.txt
+if "x%SVNVERSION%" == "xunknown" (
+ set GITVERSION_VALID=true
+ git log --date=format:%%Y%%m%%d%%H%%M%%S --format=format:%%cd -n 1 > gitversion.txt
+ if errorlevel 1 (
+ set GITVERSION_VALID=false
+ )
+)
+if "x%GITVERSION_VALID%" == "xtrue" (
+ set /p %RAWGITVERSION=<gitversion.txt
+)
+if "x%GITVERSION_VALID%" == "xtrue" (
+ set SVNVERSION=d%RAWGITVERSION%
+)
+del /f gitversion.txt
+
+set RAWSVNVERSION=
+set SVNVERSION_VALID=
+set GITVERSION_VALID=
+
+echo %SVNVERSION%
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/package_libopenmpt_multi_args.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/package_libopenmpt_multi_args.cmd
new file mode 100644
index 00000000..a0c039ab
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/package_libopenmpt_multi_args.cmd
@@ -0,0 +1,313 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments.cmd" %1 %2 %3 %4 %5 %6
+
+call build\auto\setup_vs_any.cmd
+
+call build\auto\helper_get_svnversion.cmd
+call build\auto\helper_get_openmpt_version.cmd
+
+set MPT_REVISION=%LIBOPENMPT_VERSION_STRING%+%SVNVERSION%
+if "x%LIBOPENMPT_VERSION_PREREL%" == "x" (
+ set MPT_REVISION=%LIBOPENMPT_VERSION_STRING%+release
+)
+
+
+set MPT_PKG_TAG=%MPT_DIST_VARIANT_OS%
+
+
+
+cd bin || goto error
+rmdir /s /q libopenmpt
+mkdir libopenmpt || goto error
+mkdir libopenmpt\bin.windows
+mkdir libopenmpt\bin.windows\%LIBOPENMPT_VERSION_STRING%
+rmdir /s /q libopenmpt-windows
+del /f /q libopenmpt-windows.tar
+del /f /q libopenmpt-%MPT_REVISION%.bin.windows.%MPT_PKG_FORMAT%
+mkdir libopenmpt-windows
+cd libopenmpt-windows || goto error
+mkdir openmpt123
+mkdir openmpt123\x86
+mkdir openmpt123\amd64
+mkdir openmpt123\x86-legacy
+mkdir openmpt123\amd64-legacy
+mkdir openmpt123\arm
+mkdir openmpt123\arm64
+mkdir XMPlay
+mkdir Winamp
+mkdir XMPlay-legacy
+mkdir Winamp-legacy
+rmdir /s /q Licenses
+mkdir Licenses
+copy /y ..\..\src\mpt\LICENSE.BSD-3-Clause.txt .\Licenses\License.mpt.BSD-3-Clause.txt || goto error
+copy /y ..\..\src\mpt\LICENSE.BSL-1.0.txt .\Licenses\License.mpt.BSL-1.0.txt || goto error
+rem copy /y ..\..\include\ancient\LICENSE .\Licenses\License.ancient.txt || goto error
+rem copy /y ..\..\include\ancient\src\BZIP2Table.hpp .\Licenses\License.ancient.bzip2.txt || goto error
+copy /y ..\..\include\flac\COPYING.Xiph .\Licenses\License.FLAC.txt || goto error
+rem copy /y ..\..\include\lame\COPYING .\Licenses\License.lame.txt || goto error
+rem copy /y ..\..\include\lhasa\COPYING .\Licenses\License.lhasa.txt || goto error
+rem copy /y ..\..\include\minimp3\LICENSE .\Licenses\License.minimp3.txt || goto error
+rem copy /y ..\..\include\miniz\miniz.c .\Licenses\License.miniz.txt || goto error
+copy /y ..\..\include\mpg123\COPYING .\Licenses\License.mpg123.txt || goto error
+copy /y ..\..\include\mpg123\AUTHORS .\Licenses\License.mpg123.Authors.txt || goto error
+rem copy /y ..\..\include\nlohmann-json\LICENSE.MIT .\Licenses\License.nlohmann-json.txt || goto error
+copy /y ..\..\include\ogg\COPYING .\Licenses\License.ogg.txt || goto error
+rem copy /y ..\..\include\opus\COPYING .\Licenses\License.Opus.txt || goto error
+rem copy /y ..\..\include\opusenc\COPYING .\Licenses\License.Opusenc.txt || goto error
+rem copy /y ..\..\include\opusenc\AUTHORS .\Licenses\License.Opusenc.Authors.txt || goto error
+rem copy /y ..\..\include\opusfile\COPYING .\Licenses\License.Opusfile.txt || goto error
+copy /y ..\..\include\portaudio\LICENSE.txt .\Licenses\License.PortAudio.txt || goto error
+copy /y ..\..\include\portaudio\bindings\cpp\COPYING .\Licenses\License.portaudiocpp.txt || goto error
+copy /y ..\..\include\pugixml\LICENSE.md .\Licenses\License.PugiXML.txt || goto error
+rem copy /y ..\..\include\r8brain\LICENSE .\Licenses\License.R8Brain.txt || goto error
+rem copy /y ..\..\include\rtaudio\README.md .\Licenses\License.RtAudio.txt || goto error
+rem copy /y ..\..\include\rtmidi\License.txt .\Licenses\License.RtMidi.txt || goto error
+rem copy /y ..\..\include\smbPitchShift\smbPitchShift.cpp .\Licenses\License.smbPitchShift.txt || goto error
+rem copy /y ..\..\include\soundtouch\COPYING.TXT .\Licenses\License.SoundTouch.txt || goto error
+rem copy /y ..\..\include\stb_vorbis\stb_vorbis.c .\Licenses\License.stb_vorbis.txt || goto error
+rem copy /y ..\..\include\unrar\license.txt .\Licenses\License.UnRAR.txt || goto error
+copy /y ..\..\include\vorbis\COPYING .\Licenses\License.Vorbis.txt || goto error
+copy /y ..\..\include\zlib\README .\Licenses\License.zlib.txt || goto error
+rem copy /y ..\..\include\zlib\contrib\minizip\MiniZip64_info.txt .\Licenses\License.minizip.txt || goto error
+copy /y ..\..\LICENSE .\LICENSE.txt || goto error
+copy /y ..\..\libopenmpt\dox\changelog.md .\ || goto error
+copy /y ..\..\libopenmpt\doc\xmp-openmpt.txt .\XMPlay\ || goto error
+copy /y ..\..\libopenmpt\doc\in_openmpt.txt .\Winamp\ || goto error
+copy /y ..\..\libopenmpt\doc\xmp-openmpt.txt .\XMPlay-legacy\ || goto error
+copy /y ..\..\libopenmpt\doc\in_openmpt.txt .\Winamp-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-static\x86\openmpt123.exe .\openmpt123\x86\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-static\x86\openmpt-mpg123.dll .\openmpt123\x86\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-static\amd64\openmpt123.exe .\openmpt123\amd64\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-static\amd64\openmpt-mpg123.dll .\openmpt123\amd64\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win10-static\arm\openmpt123.exe .\openmpt123\arm\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win10-static\arm\openmpt-mpg123.dll .\openmpt123\arm\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win10-static\arm64\openmpt123.exe .\openmpt123\arm64\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win10-static\arm64\openmpt-mpg123.dll .\openmpt123\arm64\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-static\x86\openmpt123.exe .\openmpt123\x86-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-static\x86\openmpt-mpg123.dll .\openmpt123\x86-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-static\amd64\openmpt123.exe .\openmpt123\amd64-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-static\amd64\openmpt-mpg123.dll .\openmpt123\amd64-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-static\x86\xmp-openmpt.dll .\XMPlay\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-static\x86\openmpt-mpg123.dll .\XMPlay\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-static\x86\in_openmpt.dll .\Winamp\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-static\x86\openmpt-mpg123.dll .\Winamp\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-static\x86\xmp-openmpt.dll .\XMPlay-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-static\x86\openmpt-mpg123.dll .\XMPlay-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-static\x86\in_openmpt.dll .\Winamp-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-static\x86\openmpt-mpg123.dll .\Winamp-legacy\ || goto error
+..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT% -mx=9 ..\libopenmpt\bin.windows\%LIBOPENMPT_VERSION_STRING%\libopenmpt-%MPT_REVISION%.bin.windows.%MPT_PKG_FORMAT% ^
+ LICENSE.txt ^
+ Licenses ^
+ changelog.md ^
+ openmpt123\x86\openmpt123.exe ^
+ openmpt123\x86\openmpt-mpg123.dll ^
+ openmpt123\amd64\openmpt123.exe ^
+ openmpt123\amd64\openmpt-mpg123.dll ^
+ openmpt123\arm\openmpt123.exe ^
+ openmpt123\arm\openmpt-mpg123.dll ^
+ openmpt123\arm64\openmpt123.exe ^
+ openmpt123\arm64\openmpt-mpg123.dll ^
+ openmpt123\x86-legacy\openmpt123.exe ^
+ openmpt123\x86-legacy\openmpt-mpg123.dll ^
+ openmpt123\amd64-legacy\openmpt123.exe ^
+ openmpt123\amd64-legacy\openmpt-mpg123.dll ^
+ XMPlay\xmp-openmpt.txt ^
+ XMPlay\xmp-openmpt.dll ^
+ XMPlay\openmpt-mpg123.dll ^
+ Winamp\in_openmpt.txt ^
+ Winamp\in_openmpt.dll ^
+ Winamp\openmpt-mpg123.dll ^
+ XMPlay-legacy\xmp-openmpt.txt ^
+ XMPlay-legacy\xmp-openmpt.dll ^
+ XMPlay-legacy\openmpt-mpg123.dll ^
+ Winamp-legacy\in_openmpt.txt ^
+ Winamp-legacy\in_openmpt.dll ^
+ Winamp-legacy\openmpt-mpg123.dll ^
+ || goto error
+cd .. || goto error
+rmdir /s /q libopenmpt-windows
+..\build\tools\7zip\7z.exe a -r -ttar libopenmpt-windows.tar libopenmpt || goto error
+del /f /q libopenmpt\bin.windows\%LIBOPENMPT_VERSION_STRING%\libopenmpt-%MPT_REVISION%.bin.windows.%MPT_PKG_FORMAT%
+rmdir /s /q libopenmpt
+cd .. || goto error
+
+cd bin || goto error
+rmdir /s /q libopenmpt
+mkdir libopenmpt || goto error
+mkdir libopenmpt\dev.windows.%MPT_VS_VER%
+mkdir libopenmpt\dev.windows.%MPT_VS_VER%\%LIBOPENMPT_VERSION_STRING%
+rmdir /s /q libopenmpt-dev-windows-%MPT_VS_VER%
+del /f /q libopenmpt-dev-windows-%MPT_VS_VER%.tar
+del /f /q libopenmpt-%MPT_REVISION%.dev.windows.%MPT_VS_VER%.%MPT_PKG_FORMAT%
+mkdir libopenmpt-dev-windows-%MPT_VS_VER%
+cd libopenmpt-dev-windows-%MPT_VS_VER% || goto error
+mkdir inc
+mkdir inc\libopenmpt
+mkdir lib
+mkdir lib\x86
+mkdir lib\amd64
+mkdir lib\arm
+mkdir lib\arm64
+mkdir lib\x86-legacy
+mkdir lib\amd64-legacy
+mkdir bin
+mkdir bin\x86
+mkdir bin\amd64
+mkdir bin\arm
+mkdir bin\arm64
+mkdir bin\x86-legacy
+mkdir bin\amd64-legacy
+copy /y ..\..\LICENSE .\LICENSE.txt || goto error
+rmdir /s /q Licenses
+mkdir Licenses
+copy /y ..\..\src\mpt\LICENSE.BSD-3-Clause.txt .\Licenses\License.mpt.BSD-3-Clause.txt || goto error
+copy /y ..\..\src\mpt\LICENSE.BSL-1.0.txt .\Licenses\License.mpt.BSL-1.0.txt || goto error
+rem copy /y ..\..\include\ancient\LICENSE .\Licenses\License.ancient.txt || goto error
+rem copy /y ..\..\include\ancient\src\BZIP2Table.hpp .\Licenses\License.ancient.bzip2.txt || goto error
+rem copy /y ..\..\include\flac\COPYING.Xiph .\Licenses\License.FLAC.txt || goto error
+rem copy /y ..\..\include\lame\COPYING .\Licenses\License.lame.txt || goto error
+rem copy /y ..\..\include\lhasa\COPYING .\Licenses\License.lhasa.txt || goto error
+rem copy /y ..\..\include\minimp3\LICENSE .\Licenses\License.minimp3.txt || goto error
+rem copy /y ..\..\include\miniz\LICENSE .\Licenses\License.miniz.txt || goto error
+copy /y ..\..\include\mpg123\COPYING .\Licenses\License.mpg123.txt || goto error
+copy /y ..\..\include\mpg123\AUTHORS .\Licenses\License.mpg123.Authors.txt || goto error
+rem copy /y ..\..\include\nlohmann-json\LICENSE.MIT .\Licenses\License.nlohmann-json.txt || goto error
+copy /y ..\..\include\ogg\COPYING .\Licenses\License.ogg.txt || goto error
+rem copy /y ..\..\include\opus\COPYING .\Licenses\License.Opus.txt || goto error
+rem copy /y ..\..\include\opusenc\COPYING .\Licenses\License.Opusenc.txt || goto error
+rem copy /y ..\..\include\opusenc\AUTHORS .\Licenses\License.Opusenc.Authors.txt || goto error
+rem copy /y ..\..\include\opusfile\COPYING .\Licenses\License.Opusfile.txt || goto error
+rem copy /y ..\..\include\portaudio\LICENSE.txt .\Licenses\License.PortAudio.txt || goto error
+rem copy /y ..\..\include\portaudio\bindings\cpp\COPYING .\Licenses\License.portaudiocpp.txt || goto error
+rem copy /y ..\..\include\pugixml\LICENSE.md .\Licenses\License.PugiXML.txt || goto error
+rem copy /y ..\..\include\r8brain\LICENSE .\Licenses\License.R8Brain.txt || goto error
+rem copy /y ..\..\include\rtaudio\README.md .\Licenses\License.RtAudio.txt || goto error
+rem copy /y ..\..\include\rtmidi\License.txt .\Licenses\License.RtMidi.txt || goto error
+rem copy /y ..\..\include\smbPitchShift\smbPitchShift.cpp .\Licenses\License.smbPitchShift.txt || goto error
+rem copy /y ..\..\include\soundtouch\COPYING.TXT .\Licenses\License.SoundTouch.txt || goto error
+rem copy /y ..\..\include\stb_vorbis\stb_vorbis.c .\Licenses\License.stb_vorbis.txt || goto error
+rem copy /y ..\..\include\unrar\license.txt .\Licenses\License.UnRAR.txt || goto error
+copy /y ..\..\include\vorbis\COPYING .\Licenses\License.Vorbis.txt || goto error
+copy /y ..\..\include\zlib\README .\Licenses\License.zlib.txt || goto error
+rem copy /y ..\..\include\zlib\contrib\minizip\MiniZip64_info.txt .\Licenses\License.minizip.txt || goto error
+copy /y ..\..\libopenmpt\dox\changelog.md .\changelog.md || goto error
+copy /y ..\..\libopenmpt\libopenmpt.h inc\libopenmpt\ || goto error
+copy /y ..\..\libopenmpt\libopenmpt.hpp inc\libopenmpt\ || goto error
+copy /y ..\..\libopenmpt\libopenmpt_config.h inc\libopenmpt\ || goto error
+copy /y ..\..\libopenmpt\libopenmpt_version.h inc\libopenmpt\ || goto error
+copy /y ..\..\libopenmpt\libopenmpt_ext.h inc\libopenmpt\ || goto error
+copy /y ..\..\libopenmpt\libopenmpt_ext.hpp inc\libopenmpt\ || goto error
+copy /y ..\..\libopenmpt\libopenmpt_stream_callbacks_buffer.h inc\libopenmpt\ || goto error
+copy /y ..\..\libopenmpt\libopenmpt_stream_callbacks_fd.h inc\libopenmpt\ || goto error
+copy /y ..\..\libopenmpt\libopenmpt_stream_callbacks_file.h inc\libopenmpt\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-shared\x86\libopenmpt.lib lib\x86\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-shared\x86\libopenmpt.dll bin\x86\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-shared\x86\openmpt-mpg123.dll bin\x86\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-shared\x86\openmpt-ogg.dll bin\x86\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-shared\x86\openmpt-vorbis.dll bin\x86\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-shared\x86\openmpt-zlib.dll bin\x86\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-shared\amd64\libopenmpt.lib lib\amd64\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-shared\amd64\libopenmpt.dll bin\amd64\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-shared\amd64\openmpt-mpg123.dll bin\amd64\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-shared\amd64\openmpt-ogg.dll bin\amd64\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-shared\amd64\openmpt-vorbis.dll bin\amd64\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win81-shared\amd64\openmpt-zlib.dll bin\amd64\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win10-shared\arm\libopenmpt.lib lib\arm\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win10-shared\arm\libopenmpt.dll bin\arm\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win10-shared\arm\openmpt-mpg123.dll bin\arm\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win10-shared\arm\openmpt-ogg.dll bin\arm\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win10-shared\arm\openmpt-vorbis.dll bin\arm\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win10-shared\arm\openmpt-zlib.dll bin\arm\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win10-shared\arm64\libopenmpt.lib lib\arm64\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win10-shared\arm64\libopenmpt.dll bin\arm64\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win10-shared\arm64\openmpt-mpg123.dll bin\arm64\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win10-shared\arm64\openmpt-ogg.dll bin\arm64\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win10-shared\arm64\openmpt-vorbis.dll bin\arm64\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win10-shared\arm64\openmpt-zlib.dll bin\arm64\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-shared\x86\libopenmpt.lib lib\x86-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-shared\x86\libopenmpt.dll bin\x86-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-shared\x86\openmpt-mpg123.dll bin\x86-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-shared\x86\openmpt-ogg.dll bin\x86-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-shared\x86\openmpt-vorbis.dll bin\x86-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-shared\x86\openmpt-zlib.dll bin\x86-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-shared\amd64\libopenmpt.lib lib\amd64-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-shared\amd64\libopenmpt.dll bin\amd64-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-shared\amd64\openmpt-mpg123.dll bin\amd64-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-shared\amd64\openmpt-ogg.dll bin\amd64-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-shared\amd64\openmpt-vorbis.dll bin\amd64-legacy\ || goto error
+copy /y ..\..\bin\release\%MPT_VS_VER%-win7-shared\amd64\openmpt-zlib.dll bin\amd64-legacy\ || goto error
+..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT% -mx=9 ..\libopenmpt\dev.windows.%MPT_VS_VER%\%LIBOPENMPT_VERSION_STRING%\libopenmpt-%MPT_REVISION%.dev.windows.%MPT_VS_VER%.%MPT_PKG_FORMAT% ^
+ LICENSE.txt ^
+ Licenses ^
+ changelog.md ^
+ inc\libopenmpt\libopenmpt.h ^
+ inc\libopenmpt\libopenmpt.hpp ^
+ inc\libopenmpt\libopenmpt_config.h ^
+ inc\libopenmpt\libopenmpt_version.h ^
+ inc\libopenmpt\libopenmpt_ext.h ^
+ inc\libopenmpt\libopenmpt_ext.hpp ^
+ inc\libopenmpt\libopenmpt_stream_callbacks_buffer.h ^
+ inc\libopenmpt\libopenmpt_stream_callbacks_fd.h ^
+ inc\libopenmpt\libopenmpt_stream_callbacks_file.h ^
+ lib\x86\libopenmpt.lib ^
+ lib\amd64\libopenmpt.lib ^
+ lib\arm\libopenmpt.lib ^
+ lib\arm64\libopenmpt.lib ^
+ lib\x86-legacy\libopenmpt.lib ^
+ lib\amd64-legacy\libopenmpt.lib ^
+ bin\x86\libopenmpt.dll ^
+ bin\x86\openmpt-mpg123.dll ^
+ bin\x86\openmpt-ogg.dll ^
+ bin\x86\openmpt-vorbis.dll ^
+ bin\x86\openmpt-zlib.dll ^
+ bin\amd64\libopenmpt.dll ^
+ bin\amd64\openmpt-mpg123.dll ^
+ bin\amd64\openmpt-ogg.dll ^
+ bin\amd64\openmpt-vorbis.dll ^
+ bin\amd64\openmpt-zlib.dll ^
+ bin\arm\libopenmpt.dll ^
+ bin\arm\openmpt-mpg123.dll ^
+ bin\arm\openmpt-ogg.dll ^
+ bin\arm\openmpt-vorbis.dll ^
+ bin\arm\openmpt-zlib.dll ^
+ bin\arm64\libopenmpt.dll ^
+ bin\arm64\openmpt-mpg123.dll ^
+ bin\arm64\openmpt-ogg.dll ^
+ bin\arm64\openmpt-vorbis.dll ^
+ bin\arm64\openmpt-zlib.dll ^
+ bin\x86-legacy\libopenmpt.dll ^
+ bin\x86-legacy\openmpt-mpg123.dll ^
+ bin\x86-legacy\openmpt-ogg.dll ^
+ bin\x86-legacy\openmpt-vorbis.dll ^
+ bin\x86-legacy\openmpt-zlib.dll ^
+ bin\amd64-legacy\libopenmpt.dll ^
+ bin\amd64-legacy\openmpt-mpg123.dll ^
+ bin\amd64-legacy\openmpt-ogg.dll ^
+ bin\amd64-legacy\openmpt-vorbis.dll ^
+ bin\amd64-legacy\openmpt-zlib.dll ^
+ || goto error
+cd .. || goto error
+rmdir /s /q libopenmpt-dev-windows-%MPT_VS_VER%
+..\build\tools\7zip\7z.exe a -r -ttar libopenmpt-dev-windows-%MPT_VS_VER%.tar libopenmpt || goto error
+del /f /q libopenmpt\dev.windows.%MPT_VS_VER%\%LIBOPENMPT_VERSION_STRING%\libopenmpt-%MPT_REVISION%.dev.windows.%MPT_VS_VER%.%MPT_PKG_FORMAT%
+rmdir /s /q libopenmpt
+cd .. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/package_libopenmpt_retro_winxp.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/package_libopenmpt_retro_winxp.cmd
new file mode 100644
index 00000000..b57f0938
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/package_libopenmpt_retro_winxp.cmd
@@ -0,0 +1,117 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments.cmd" %1 %2 %3 %4 %5 %6
+
+call build\auto\setup_vs_any.cmd
+
+call build\auto\helper_get_svnversion.cmd
+call build\auto\helper_get_openmpt_version.cmd
+
+set MPT_REVISION=%LIBOPENMPT_VERSION_STRING%+%SVNVERSION%
+if "x%LIBOPENMPT_VERSION_PREREL%" == "x" (
+ set MPT_REVISION=%LIBOPENMPT_VERSION_STRING%+release
+)
+
+
+set MPT_PKG_TAG=%MPT_DIST_VARIANT_OS%
+
+
+
+cd bin || goto error
+rmdir /s /q libopenmpt
+mkdir libopenmpt || goto error
+mkdir libopenmpt\bin.retro.winxp
+mkdir libopenmpt\bin.retro.winxp\%LIBOPENMPT_VERSION_STRING%
+rmdir /s /q libopenmpt-retro-winxp
+del /f /q libopenmpt-retro-winxp.tar
+del /f /q libopenmpt-%MPT_REVISION%.bin.retro.winxp.%MPT_PKG_FORMAT%
+mkdir libopenmpt-retro-winxp
+cd libopenmpt-retro-winxp || goto error
+mkdir openmpt123
+mkdir openmpt123\x86
+mkdir openmpt123\amd64
+mkdir XMPlay
+mkdir Winamp
+rmdir /s /q Licenses
+mkdir Licenses
+copy /y ..\..\src\mpt\LICENSE.BSD-3-Clause.txt .\Licenses\License.mpt.BSD-3-Clause.txt || goto error
+copy /y ..\..\src\mpt\LICENSE.BSL-1.0.txt .\Licenses\License.mpt.BSL-1.0.txt || goto error
+rem copy /y ..\..\include\ancient\LICENSE .\Licenses\License.ancient.txt || goto error
+rem copy /y ..\..\include\ancient\src\BZIP2Table.hpp .\Licenses\License.ancient.bzip2.txt || goto error
+copy /y ..\..\include\flac\COPYING.Xiph .\Licenses\License.FLAC.txt || goto error
+rem copy /y ..\..\include\lame\COPYING .\Licenses\License.lame.txt || goto error
+rem copy /y ..\..\include\lhasa\COPYING .\Licenses\License.lhasa.txt || goto error
+rem copy /y ..\..\include\minimp3\LICENSE .\Licenses\License.minimp3.txt || goto error
+rem copy /y ..\..\include\miniz\miniz.c .\Licenses\License.miniz.txt || goto error
+copy /y ..\..\include\mpg123\COPYING .\Licenses\License.mpg123.txt || goto error
+copy /y ..\..\include\mpg123\AUTHORS .\Licenses\License.mpg123.Authors.txt || goto error
+rem copy /y ..\..\include\nlohmann-json\LICENSE.MIT .\Licenses\License.nlohmann-json.txt || goto error
+copy /y ..\..\include\ogg\COPYING .\Licenses\License.ogg.txt || goto error
+rem copy /y ..\..\include\opus\COPYING .\Licenses\License.Opus.txt || goto error
+rem copy /y ..\..\include\opusenc\COPYING .\Licenses\License.Opusenc.txt || goto error
+rem copy /y ..\..\include\opusenc\AUTHORS .\Licenses\License.Opusenc.Authors.txt || goto error
+rem copy /y ..\..\include\opusfile\COPYING .\Licenses\License.Opusfile.txt || goto error
+copy /y ..\..\include\portaudio\LICENSE.txt .\Licenses\License.PortAudio.txt || goto error
+copy /y ..\..\include\portaudio\bindings\cpp\COPYING .\Licenses\License.portaudiocpp.txt || goto error
+copy /y ..\..\include\pugixml\LICENSE.md .\Licenses\License.PugiXML.txt || goto error
+rem copy /y ..\..\include\r8brain\LICENSE .\Licenses\License.R8Brain.txt || goto error
+rem copy /y ..\..\include\rtaudio\README.md .\Licenses\License.RtAudio.txt || goto error
+rem copy /y ..\..\include\rtmidi\License.txt .\Licenses\License.RtMidi.txt || goto error
+rem copy /y ..\..\include\smbPitchShift\smbPitchShift.cpp .\Licenses\License.smbPitchShift.txt || goto error
+rem copy /y ..\..\include\soundtouch\COPYING.TXT .\Licenses\License.SoundTouch.txt || goto error
+rem copy /y ..\..\include\stb_vorbis\stb_vorbis.c .\Licenses\License.stb_vorbis.txt || goto error
+rem copy /y ..\..\include\unrar\license.txt .\Licenses\License.UnRAR.txt || goto error
+copy /y ..\..\include\vorbis\COPYING .\Licenses\License.Vorbis.txt || goto error
+copy /y ..\..\include\zlib\README .\Licenses\License.zlib.txt || goto error
+rem copy /y ..\..\include\zlib\contrib\minizip\MiniZip64_info.txt .\Licenses\License.minizip.txt || goto error
+copy /y ..\..\LICENSE .\LICENSE.txt || goto error
+copy /y ..\..\libopenmpt\dox\changelog.md .\ || goto error
+copy /y ..\..\libopenmpt\doc\xmp-openmpt.txt .\XMPlay\ || goto error
+copy /y ..\..\libopenmpt\doc\in_openmpt.txt .\Winamp\ || goto error
+copy /y ..\..\bin\release\vs2017-winxp-static\x86\openmpt123.exe .\openmpt123\x86\ || goto error
+copy /y ..\..\bin\release\vs2017-winxp-static\x86\openmpt-mpg123.dll .\openmpt123\x86\ || goto error
+copy /y ..\..\bin\release\vs2017-winxp-static\amd64\openmpt123.exe .\openmpt123\amd64\ || goto error
+copy /y ..\..\bin\release\vs2017-winxp-static\amd64\openmpt-mpg123.dll .\openmpt123\amd64\ || goto error
+copy /y ..\..\bin\release\vs2017-winxp-static\x86\xmp-openmpt.dll .\XMPlay\ || goto error
+copy /y ..\..\bin\release\vs2017-winxp-static\x86\openmpt-mpg123.dll .\XMPlay\ || goto error
+copy /y ..\..\bin\release\vs2017-winxp-static\x86\in_openmpt.dll .\Winamp\ || goto error
+copy /y ..\..\bin\release\vs2017-winxp-static\x86\openmpt-mpg123.dll .\Winamp\ || goto error
+..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT% -mx=9 ..\libopenmpt\bin.retro.winxp\%LIBOPENMPT_VERSION_STRING%\libopenmpt-%MPT_REVISION%.bin.retro.winxp.%MPT_PKG_FORMAT% ^
+ LICENSE.txt ^
+ Licenses ^
+ changelog.md ^
+ openmpt123\x86\openmpt123.exe ^
+ openmpt123\x86\openmpt-mpg123.dll ^
+ openmpt123\amd64\openmpt123.exe ^
+ openmpt123\amd64\openmpt-mpg123.dll ^
+ XMPlay\xmp-openmpt.txt ^
+ XMPlay\xmp-openmpt.dll ^
+ XMPlay\openmpt-mpg123.dll ^
+ Winamp\in_openmpt.txt ^
+ Winamp\in_openmpt.dll ^
+ Winamp\openmpt-mpg123.dll ^
+ || goto error
+cd .. || goto error
+rmdir /s /q libopenmpt-retro-winxp
+..\build\tools\7zip\7z.exe a -r -ttar libopenmpt-retro-winxp.tar libopenmpt || goto error
+del /f /q libopenmpt\bin.retro.winxp\%LIBOPENMPT_VERSION_STRING%\libopenmpt-%MPT_REVISION%.bin.retro.winxp.%MPT_PKG_FORMAT%
+rmdir /s /q libopenmpt
+cd .. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/package_openmpt_args.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/package_openmpt_args.cmd
new file mode 100644
index 00000000..1dcc504c
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/package_openmpt_args.cmd
@@ -0,0 +1,98 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments.cmd" %1 %2 %3 %4 %5 %6
+
+call build\auto\setup_vs_any.cmd
+
+call build\auto\helper_get_svnversion.cmd
+call build\auto\helper_get_openmpt_version.cmd
+
+set MPT_REVISION=%OPENMPT_VERSION%-%SVNVERSION%
+
+
+
+cmd /c build\auto\update_package_template.cmd || goto error
+cd bin || goto error
+rmdir /s /q openmpt
+mkdir openmpt || goto error
+mkdir openmpt\bin.%MPT_DIST_VARIANT_TRK%
+mkdir openmpt\bin.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%
+mkdir openmpt\dbg.%MPT_DIST_VARIANT_TRK%
+mkdir openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%
+rmdir /s /q openmpt-%MPT_DIST_VARIANT_TRK%
+del /f /q openmpt-%MPT_DIST_VARIANT_TRK%.tar
+del /f /q openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%.%MPT_PKG_FORMAT%
+del /f /q openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols.%MPT_PKG_FORMAT_SYMBOLS%
+mkdir openmpt-%MPT_DIST_VARIANT_TRK%
+cd openmpt-%MPT_DIST_VARIANT_TRK% || goto error
+copy /y ..\..\LICENSE .\License.txt || goto error
+rmdir /s /q Licenses
+mkdir Licenses
+copy /y ..\..\packageTemplate\Licenses\*.* .\Licenses\ || goto error
+rmdir /s /q extraKeymaps
+mkdir extraKeymaps
+copy /y ..\..\packageTemplate\extraKeymaps\*.* .\extraKeymaps\ || goto error
+copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\OpenMPT%MPT_VS_FLAVOUR%.exe .\ || goto error
+copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\OpenMPT%MPT_VS_FLAVOUR%.pdb .\ || goto error
+copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\openmpt-lame.dll .\ || goto error
+copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\openmpt-lame.pdb .\ || goto error
+copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\openmpt-mpg123.dll .\ || goto error
+copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\openmpt-mpg123.pdb .\ || goto error
+copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\openmpt-soundtouch.dll .\ || goto error
+copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\openmpt-soundtouch.pdb .\ || goto error
+copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\x86\PluginBridge-x86.exe .\ || goto error
+copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\x86\PluginBridge-x86.pdb .\ || goto error
+copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\amd64\PluginBridge-amd64.exe .\ || goto error
+copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\amd64\PluginBridge-amd64.pdb .\ || goto error
+copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\x86\PluginBridgeLegacy-x86.exe .\ || goto error
+copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\x86\PluginBridgeLegacy-x86.pdb .\ || goto error
+copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\amd64\PluginBridgeLegacy-amd64.exe .\ || goto error
+copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\amd64\PluginBridgeLegacy-amd64.pdb .\ || goto error
+copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\openmpt-wine-support.zip .\ || goto error
+..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT% -mx=9 ..\openmpt\bin.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%.%MPT_PKG_FORMAT% ^
+ License.txt ^
+ Licenses ^
+ OpenMPT%MPT_VS_FLAVOUR%.exe ^
+ openmpt-lame.dll ^
+ openmpt-mpg123.dll ^
+ openmpt-soundtouch.dll ^
+ PluginBridge-x86.exe ^
+ PluginBridge-amd64.exe ^
+ PluginBridgeLegacy-x86.exe ^
+ PluginBridgeLegacy-amd64.exe ^
+ openmpt-wine-support.zip ^
+ extraKeymaps ^
+ || goto error
+mkdir ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols || goto error
+..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT_SYMBOLS% -mx=9 ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols\OpenMPT%MPT_VS_FLAVOUR%.pdb.%MPT_PKG_FORMAT_SYMBOLS% OpenMPT%MPT_VS_FLAVOUR%.pdb || goto error
+..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT_SYMBOLS% -mx=9 ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols\openmpt-lame.pdb.%MPT_PKG_FORMAT_SYMBOLS% openmpt-lame.pdb || goto error
+..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT_SYMBOLS% -mx=9 ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols\openmpt-mpg123.pdb.%MPT_PKG_FORMAT_SYMBOLS% openmpt-mpg123.pdb || goto error
+..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT_SYMBOLS% -mx=9 ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols\openmpt-soundtouch.pdb.%MPT_PKG_FORMAT_SYMBOLS% openmpt-soundtouch.pdb || goto error
+..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT_SYMBOLS% -mx=9 ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols\PluginBridge-x86.pdb.%MPT_PKG_FORMAT_SYMBOLS% PluginBridge-x86.pdb || goto error
+..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT_SYMBOLS% -mx=9 ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols\PluginBridge-amd64.pdb.%MPT_PKG_FORMAT_SYMBOLS% PluginBridge-amd64.pdb || goto error
+..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT_SYMBOLS% -mx=9 ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols\PluginBridgeLegacy-x86.pdb.%MPT_PKG_FORMAT_SYMBOLS% PluginBridgeLegacy-x86.pdb || goto error
+..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT_SYMBOLS% -mx=9 ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols\PluginBridgeLegacy-amd64.pdb.%MPT_PKG_FORMAT_SYMBOLS% PluginBridgeLegacy-amd64.pdb || goto error
+cd .. || goto error
+..\build\tools\7zip\7z.exe a -ttar openmpt-%MPT_DIST_VARIANT_TRK%.tar openmpt || goto error
+del /f /q openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%.%MPT_PKG_FORMAT%
+del /f /q openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols.%MPT_PKG_FORMAT_SYMBOLS%
+rmdir /s /q openmpt-%MPT_DIST_VARIANT_TRK%
+cd .. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/package_openmpt_installer_args.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/package_openmpt_installer_args.cmd
new file mode 100644
index 00000000..2dacff74
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/package_openmpt_installer_args.cmd
@@ -0,0 +1,48 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments.cmd" %1 %2 %3 %4 %5 %6
+
+call build\auto\setup_vs_any.cmd
+
+call build\auto\helper_get_svnversion.cmd
+call build\auto\helper_get_openmpt_version.cmd
+
+set MPT_REVISION=%OPENMPT_VERSION%-%SVNVERSION%
+
+
+
+cd bin || goto error
+rmdir /s /q openmpt
+del /f /q openmpt-pkg.win.tar
+mkdir openmpt
+mkdir openmpt\pkg.win
+mkdir openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-Setup.exe openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%OPENMPT_VERSION%-%SVNVERSION%-Setup.exe
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-Setup.exe.digests openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%OPENMPT_VERSION%-%SVNVERSION%-Setup.exe.digests
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-Setup-x64.exe openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%OPENMPT_VERSION%-%SVNVERSION%-Setup-x64.exe
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-Setup-x64.exe.digests openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%OPENMPT_VERSION%-%SVNVERSION%-Setup-x64.exe.digests
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable.zip openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%OPENMPT_VERSION%-%SVNVERSION%-portable.zip
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable.zip.digests openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%OPENMPT_VERSION%-%SVNVERSION%-portable.zip.digests
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-x64.zip openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%OPENMPT_VERSION%-%SVNVERSION%-portable-x64.zip
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-x64.zip.digests openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%OPENMPT_VERSION%-%SVNVERSION%-portable-x64.zip.digests
+..\build\tools\7zip\7z.exe a -ttar openmpt-pkg.win.tar openmpt || goto error
+rmdir /s /q openmpt
+cd .. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/package_openmpt_installer_multiarch_args.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/package_openmpt_installer_multiarch_args.cmd
new file mode 100644
index 00000000..ac3079b8
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/package_openmpt_installer_multiarch_args.cmd
@@ -0,0 +1,75 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call build\auto\setup_vs_any.cmd
+
+call build\auto\helper_get_svnversion.cmd
+call build\auto\helper_get_openmpt_version.cmd
+
+set MPT_REVISION=%OPENMPT_VERSION%-%SVNVERSION%
+if "x%OPENMPT_VERSION_MINORMINOR%" == "x00" (
+ set MPT_REVISION=%OPENMPT_VERSION%
+)
+
+
+
+cd bin || goto error
+rmdir /s /q openmpt
+del /f /q openmpt-pkg.win-multi.tar
+mkdir openmpt
+mkdir openmpt\pkg.win
+mkdir openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%
+mkdir openmpt\dbg.win
+mkdir openmpt\dbg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-Setup.exe openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-Setup.exe
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-Setup.exe.digests openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-Setup.exe.digests
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-Setup.update.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-Setup.update.json
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-Setup.update.json.jws.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-Setup.update.json.jws.json
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-x86.zip openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-x86.zip
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-x86.zip.digests openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-x86.zip.digests
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-x86.update.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-x86.update.json
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-x86.update.json.jws.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-x86.update.json.jws.json
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-x86-legacy.zip openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-x86-legacy.zip
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-x86-legacy.zip.digests openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-x86-legacy.zip.digests
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-x86-legacy.update.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-x86-legacy.update.json
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-x86-legacy.update.json.jws.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-x86-legacy.update.json.jws.json
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-amd64.zip openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-amd64.zip
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-amd64.zip.digests openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-amd64.zip.digests
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-amd64.update.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-amd64.update.json
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-amd64.update.json.jws.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-amd64.update.json.jws.json
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-amd64-legacy.zip openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-amd64-legacy.zip
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-amd64-legacy.zip.digests openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-amd64-legacy.zip.digests
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-amd64-legacy.update.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-amd64-legacy.update.json
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-amd64-legacy.update.json.jws.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-amd64-legacy.update.json.jws.json
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm.zip openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm.zip
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm.zip.digests openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm.zip.digests
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm.update.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm.update.json
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm.update.json.jws.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm.update.json.jws.json
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm64.zip openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm64.zip
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm64.zip.digests openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm64.zip.digests
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm64.update.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm64.update.json
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-portable-arm64.update.json.jws.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-portable-arm64.update.json.jws.json
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-symbols.7z openmpt\dbg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-symbols.7z
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-symbols.7z.digests openmpt\dbg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-symbols.7z.digests
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-update.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-update.json
+copy /y ..\installer\OpenMPT-%OPENMPT_VERSION%-update-publickey.jwk.json openmpt\pkg.win\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\OpenMPT-%MPT_REVISION%-update-publickey.jwk.json
+..\build\tools\7zip\7z.exe a -ttar openmpt-pkg.win-multi.tar openmpt || goto error
+rmdir /s /q openmpt
+cd .. || goto error
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/readme.txt b/Src/external_dependencies/openmpt-trunk/build/auto/readme.txt
new file mode 100644
index 00000000..805bd0b9
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/readme.txt
@@ -0,0 +1 @@
+Automated build scripts that are used for automated builds and packaging.
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/setup_arguments.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/setup_arguments.cmd
new file mode 100644
index 00000000..156f2140
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/setup_arguments.cmd
@@ -0,0 +1,161 @@
+@echo off
+
+set MPT_VS_VER=%1
+set MPT_VS_TARGET=%2
+set MPT_VS_ARCH=%3
+set MPT_VS_CONF=%4
+set MPT_PKG_FORMAT=%5
+set MPT_VS_FLAVOUR=%6
+
+if "%MPT_VS_VER%" == "" goto setupargumentserror
+if "%MPT_VS_TARGET%" == "" goto setupargumentserror
+if "%MPT_VS_ARCH%" == "" goto setupargumentserror
+if "%MPT_VS_CONF%" == "" goto setupargumentserror
+if "%MPT_PKG_FORMAT%" == "" goto setupargumentserror
+
+goto setupargumentsstart
+
+:setupargumentserror
+echo "Usage: foo.cmd vs2019 xp Win32 Release 7z default"
+rem vs2019 winxp Win32 Release x86-32 winxp release static
+rem MPT_VS_VER MPT_VS_TARGET MPT_VS_ARCH MPT_VS_CONF MPT_BIN_ARCH MPT_BIN_TARGET MPT_BIN_CONF MPT_BIN_RUNTIME
+exit 1
+
+:setupargumentsstart
+
+
+if "%MPT_VS_TARGET%" == "winxp" set MPT_VS_WITHTARGET=%MPT_VS_VER%winxp
+if "%MPT_VS_TARGET%" == "vista" set MPT_VS_WITHTARGET=%MPT_VS_VER%winvista
+if "%MPT_VS_TARGET%" == "win7" set MPT_VS_WITHTARGET=%MPT_VS_VER%win7
+if "%MPT_VS_TARGET%" == "win81" set MPT_VS_WITHTARGET=%MPT_VS_VER%win81
+if "%MPT_VS_TARGET%" == "win10" set MPT_VS_WITHTARGET=%MPT_VS_VER%win10
+if "%MPT_VS_TARGET%" == "default" set MPT_VS_WITHTARGET=%MPT_VS_VER%win81
+if "%MPT_VS_TARGET%" == "win10clang" set MPT_VS_WITHTARGET=%MPT_VS_VER%win10clang
+
+
+if "%MPT_VS_ARCH%" == "Win32" (
+ if "%MPT_VS_TARGET%" == "winxp" set MPT_BIN_TARGET=winxp
+ if "%MPT_VS_TARGET%" == "vista" set MPT_BIN_TARGET=vista
+ if "%MPT_VS_TARGET%" == "win7" set MPT_BIN_TARGET=win7
+ if "%MPT_VS_TARGET%" == "win81" set MPT_BIN_TARGET=win81
+ if "%MPT_VS_TARGET%" == "win10" set MPT_BIN_TARGET=win10
+ if "%MPT_VS_TARGET%" == "default" set MPT_BIN_TARGET=win81
+ if "%MPT_VS_TARGET%" == "win10clang" set MPT_BIN_TARGET=win10clang
+)
+if "%MPT_VS_ARCH%" == "x64" (
+ if "%MPT_VS_TARGET%" == "winxp" set MPT_BIN_TARGET=winxp
+ if "%MPT_VS_TARGET%" == "vista" set MPT_BIN_TARGET=vista
+ if "%MPT_VS_TARGET%" == "win7" set MPT_BIN_TARGET=win7
+ if "%MPT_VS_TARGET%" == "win81" set MPT_BIN_TARGET=win81
+ if "%MPT_VS_TARGET%" == "win10" set MPT_BIN_TARGET=win10
+ if "%MPT_VS_TARGET%" == "default" set MPT_BIN_TARGET=win81
+ if "%MPT_VS_TARGET%" == "win10clang" set MPT_BIN_TARGET=win10clang
+)
+if "%MPT_VS_ARCH%" == "ARM" (
+ if "%MPT_VS_TARGET%" == "winxp" set MPT_BIN_TARGET=winxp
+ if "%MPT_VS_TARGET%" == "vista" set MPT_BIN_TARGET=vista
+ if "%MPT_VS_TARGET%" == "win7" set MPT_BIN_TARGET=win7
+ if "%MPT_VS_TARGET%" == "win81" set MPT_BIN_TARGET=win81
+ if "%MPT_VS_TARGET%" == "win10" set MPT_BIN_TARGET=win10
+ if "%MPT_VS_TARGET%" == "default" set MPT_BIN_TARGET=win81
+ if "%MPT_VS_TARGET%" == "win10clang" set MPT_BIN_TARGET=win10clang
+)
+if "%MPT_VS_ARCH%" == "ARM64" (
+ if "%MPT_VS_TARGET%" == "winxp" set MPT_BIN_TARGET=winxp
+ if "%MPT_VS_TARGET%" == "vista" set MPT_BIN_TARGET=vista
+ if "%MPT_VS_TARGET%" == "win7" set MPT_BIN_TARGET=win7
+ if "%MPT_VS_TARGET%" == "win81" set MPT_BIN_TARGET=win81
+ if "%MPT_VS_TARGET%" == "win10" set MPT_BIN_TARGET=win10
+ if "%MPT_VS_TARGET%" == "default" set MPT_BIN_TARGET=win81
+ if "%MPT_VS_TARGET%" == "win10clang" set MPT_BIN_TARGET=win10clang
+)
+
+if "%MPT_VS_TARGET%" == "winxp" set MPT_BIN_TARGET32=winxp
+if "%MPT_VS_TARGET%" == "vista" set MPT_BIN_TARGET32=vista
+if "%MPT_VS_TARGET%" == "win7" set MPT_BIN_TARGET32=win7
+if "%MPT_VS_TARGET%" == "win81" set MPT_BIN_TARGET32=win81
+if "%MPT_VS_TARGET%" == "win10" set MPT_BIN_TARGET32=win10
+if "%MPT_VS_TARGET%" == "default" set MPT_BIN_TARGET32=win81
+if "%MPT_VS_TARGET%" == "win10clang" set MPT_BIN_TARGET32=win10clang
+
+if "%MPT_VS_TARGET%" == "winxp" set MPT_BIN_TARGET64=winxp
+if "%MPT_VS_TARGET%" == "vista" set MPT_BIN_TARGET64=vista
+if "%MPT_VS_TARGET%" == "win7" set MPT_BIN_TARGET64=win7
+if "%MPT_VS_TARGET%" == "win81" set MPT_BIN_TARGET64=win81
+if "%MPT_VS_TARGET%" == "win10" set MPT_BIN_TARGET64=win10
+if "%MPT_VS_TARGET%" == "default" set MPT_BIN_TARGET64=win81
+if "%MPT_VS_TARGET%" == "win10clang" set MPT_BIN_TARGET64=win10clang
+
+if "%MPT_VS_ARCH%" == "Win32" set MPT_BIN_ARCH_TRK=x86
+if "%MPT_VS_ARCH%" == "x64" set MPT_BIN_ARCH_TRK=amd64
+if "%MPT_VS_ARCH%" == "ARM" set MPT_BIN_ARCH_TRK=arm
+if "%MPT_VS_ARCH%" == "ARM64" set MPT_BIN_ARCH_TRK=arm64
+
+if "%MPT_VS_ARCH%" == "Win32" set MPT_BIN_ARCH=x86
+if "%MPT_VS_ARCH%" == "x64" set MPT_BIN_ARCH=amd64
+if "%MPT_VS_ARCH%" == "ARM" set MPT_BIN_ARCH=arm
+if "%MPT_VS_ARCH%" == "ARM64" set MPT_BIN_ARCH=arm64
+
+if "%MPT_VS_CONF%" == "Release" set MPT_BIN_CONF=release
+if "%MPT_VS_CONF%" == "ReleaseShared" set MPT_BIN_CONF=release
+
+if "%MPT_VS_CONF%" == "Release" set MPT_BIN_RUNTIME=static
+if "%MPT_VS_CONF%" == "ReleaseShared" set MPT_BIN_RUNTIME=shared
+
+
+if "%MPT_VS_ARCH%" == "Win32" set MPT_DIST_VARIANT_ARCH=x86
+if "%MPT_VS_ARCH%" == "x64" set MPT_DIST_VARIANT_ARCH=amd64
+if "%MPT_VS_ARCH%" == "ARM" set MPT_DIST_VARIANT_ARCH=arm
+if "%MPT_VS_ARCH%" == "ARM64" set MPT_DIST_VARIANT_ARCH=arm64
+
+if "%MPT_VS_TARGET%" == "winxp" set MPT_DIST_VARIANT_OS=winxp
+if "%MPT_VS_TARGET%" == "vista" set MPT_DIST_VARIANT_OS=winvista
+if "%MPT_VS_TARGET%" == "win7" set MPT_DIST_VARIANT_OS=win7
+if "%MPT_VS_TARGET%" == "win81" set MPT_DIST_VARIANT_OS=win81
+if "%MPT_VS_TARGET%" == "win10" set MPT_DIST_VARIANT_OS=win10
+if "%MPT_VS_TARGET%" == "default" set MPT_DIST_VARIANT_OS=win81
+if "%MPT_VS_TARGET%" == "win10clang" set MPT_DIST_VARIANT_OS=win10clang
+
+set MPT_DIST_VARIANT=%MPT_DIST_VARIANT_OS%-%MPT_DIST_VARIANT_ARCH%
+
+
+if "%MPT_VS_TARGET%" == "winxp" set MPT_DIST_VARIANT_PREFIX=retro-winxp
+if "%MPT_VS_TARGET%" == "vista" set MPT_DIST_VARIANT_PREFIX=retro-winvista
+if "%MPT_VS_TARGET%" == "win7" set MPT_DIST_VARIANT_PREFIX=win7
+if "%MPT_VS_TARGET%" == "win81" set MPT_DIST_VARIANT_PREFIX=win81
+if "%MPT_VS_TARGET%" == "win10" set MPT_DIST_VARIANT_PREFIX=win10
+if "%MPT_VS_TARGET%" == "default" set MPT_DIST_VARIANT_PREFIX=
+if "%MPT_VS_TARGET%" == "win10clang" set MPT_DIST_VARIANT_PREFIX=win10clang
+
+if "%MPT_VS_ARCH%" == "Win32" set MPT_DIST_VARIANT_SUFFIX=x86
+if "%MPT_VS_ARCH%" == "x64" set MPT_DIST_VARIANT_SUFFIX=amd64
+if "%MPT_VS_ARCH%" == "ARM" set MPT_DIST_VARIANT_SUFFIX=arm
+if "%MPT_VS_ARCH%" == "ARM64" set MPT_DIST_VARIANT_SUFFIX=arm64
+
+set MPT_DIST_VARIANT_TRK=%MPT_DIST_VARIANT_PREFIX%-%MPT_DIST_VARIANT_SUFFIX%
+
+
+rem Environment Variable \ Program Bitness 32bit Native 64bit Native WOW64
+rem PROCESSOR_ARCHITECTURE x86 AMD64 x86
+rem PROCESSOR_ARCHITEW6432 undefined undefined AMD64
+
+set MPT_HOST_BITNESS=32
+if "%PROCESSOR_ARCHITECTURE%" == "x86" (
+ if "%PROCESSOR_ARCHITEW6432%" == "AMD64" (
+ set MPT_HOST_BITNESS=64
+ ) else (
+ set MPT_HOST_BITNESS=32
+ )
+)
+if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
+ set MPT_HOST_BITNESS=64
+)
+
+
+if "%MPT_PKG_FORMAT%" == "" set MPT_PKG_FORMAT=zip
+if "%MPT_PKG_FORMAT%" == "7z" set MPT_PKG_FORMAT_SYMBOLS=xz
+if "%MPT_PKG_FORMAT%" == "zip" set MPT_PKG_FORMAT_SYMBOLS=zip
+if "%MPT_PKG_FORMAT_SYMBOLS%" == "" set MPT_PKG_FORMAT_SYMBOLS=zip
+
+
+if "%MPT_VS_FLAVOUR%" == "default" set MPT_VS_FLAVOUR=
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/setup_arguments_winrt.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/setup_arguments_winrt.cmd
new file mode 100644
index 00000000..27719cc7
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/setup_arguments_winrt.cmd
@@ -0,0 +1,22 @@
+@echo off
+
+set MPT_VS_VER=%1
+set MPT_VS_TARGET=%2
+set MPT_VS_ARCH=%3
+set MPT_VS_CONF=%4
+set MPT_PKG_FORMAT=%5
+set MPT_VS_FLAVOUR=%6
+
+if "%MPT_VS_VER%" == "" goto setupargumentserror
+if "%MPT_VS_TARGET%" == "" goto setupargumentserror
+if "%MPT_VS_ARCH%" == "" goto setupargumentserror
+if "%MPT_VS_CONF%" == "" goto setupargumentserror
+if "%MPT_PKG_FORMAT%" == "" goto setupargumentserror
+
+goto setupargumentsstart
+
+:setupargumentserror
+echo "Usage: foo.cmd vs2019 winstore82 Win32 Release 7z default"
+exit 1
+
+:setupargumentsstart
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/setup_vs2017.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/setup_vs2017.cmd
new file mode 100644
index 00000000..9bf5ee69
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/setup_vs2017.cmd
@@ -0,0 +1,16 @@
+@echo off
+
+if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" goto win64
+if exist "C:\Program Files\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" goto win32
+
+goto setupdone
+
+:win32
+call "C:\Program Files\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
+goto setupdone
+
+:win64
+call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
+goto setupdone
+
+:setupdone
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/setup_vs2019.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/setup_vs2019.cmd
new file mode 100644
index 00000000..ede6655f
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/setup_vs2019.cmd
@@ -0,0 +1,16 @@
+@echo off
+
+if exist "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" goto win64
+if exist "C:\Program Files\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" goto win32
+
+goto setupdone
+
+:win32
+call "C:\Program Files\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"
+goto setupdone
+
+:win64
+call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"
+goto setupdone
+
+:setupdone
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/setup_vs2022.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/setup_vs2022.cmd
new file mode 100644
index 00000000..6a1ee3d6
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/setup_vs2022.cmd
@@ -0,0 +1,11 @@
+@echo off
+
+if exist "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" goto win64
+
+goto setupdone
+
+:win64
+call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat"
+goto setupdone
+
+:setupdone
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/setup_vs_any.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/setup_vs_any.cmd
new file mode 100644
index 00000000..d8df35d9
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/setup_vs_any.cmd
@@ -0,0 +1,26 @@
+@echo off
+
+if exist "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" (
+ call %~dp0\setup_vs2022.cmd
+ goto vsdone
+)
+
+if exist "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" (
+ call %~dp0\setup_vs2019.cmd
+ goto vsdone
+)
+if exist "C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" (
+ call %~dp0\setup_vs2019.cmd
+ goto vsdone
+)
+
+if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" (
+ call %~dp0\setup_vs2017.cmd
+ goto vsdone
+)
+if exist "C:\Program Files\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" (
+ call %~dp0\setup_vs2017.cmd
+ goto vsdone
+)
+
+:vsdone
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/test_libopenmpt_args.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/test_libopenmpt_args.cmd
new file mode 100644
index 00000000..a2abd868
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/test_libopenmpt_args.cmd
@@ -0,0 +1,37 @@
+@echo off
+
+set BATCH_DIR=%~dp0
+cd %BATCH_DIR%
+cd ..\..
+
+set MY_DIR=%CD%
+
+call "build\auto\setup_arguments.cmd" %1 %2 %3 %4 %5 %6
+
+call "build\auto\setup_%MPT_VS_VER%.cmd"
+
+
+
+if "%MPT_BIN_ARCH%" == "x86" (
+ "bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET32%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH%\libopenmpt_test.exe" || goto error
+)
+
+if "%MPT_BIN_ARCH%" == "amd64" (
+ if "%MPT_HOST_BITNESS%" == "64" (
+ "bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET64%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH%\libopenmpt_test.exe" || goto error
+ ) else (
+ echo "Warning: Host is not 64 bit. Skipping 64 bit test suite."
+ )
+)
+
+
+
+goto noerror
+
+:error
+cd "%MY_DIR%"
+exit 1
+
+:noerror
+cd "%MY_DIR%"
+exit 0
diff --git a/Src/external_dependencies/openmpt-trunk/build/auto/update_package_template.cmd b/Src/external_dependencies/openmpt-trunk/build/auto/update_package_template.cmd
new file mode 100644
index 00000000..da6727b6
--- /dev/null
+++ b/Src/external_dependencies/openmpt-trunk/build/auto/update_package_template.cmd
@@ -0,0 +1,48 @@
+@echo off
+
+cd packageTemplate || goto error
+copy /y ..\LICENSE .\License.txt || goto error
+choice /C y /N /T 1 /D y
+rmdir /s /q Licenses
+choice /C y /N /T 1 /D y
+mkdir Licenses
+copy /y ..\src\mpt\LICENSE.BSD-3-Clause.txt .\Licenses\License.mpt.BSD-3-Clause.txt || goto error
+copy /y ..\src\mpt\LICENSE.BSL-1.0.txt .\Licenses\License.mpt.BSL-1.0.txt || goto error
+copy /y ..\include\ancient\LICENSE .\Licenses\License.ancient.txt || goto error
+copy /y ..\include\ancient\src\BZIP2Table.hpp .\Licenses\License.ancient.bzip2.txt || goto error
+copy /y ..\include\flac\COPYING.Xiph .\Licenses\License.FLAC.txt || goto error
+copy /y ..\include\lame\COPYING .\Licenses\License.lame.txt || goto error
+copy /y ..\include\lhasa\COPYING .\Licenses\License.lhasa.txt || goto error
+rem copy /y ..\include\minimp3\LICENSE .\Licenses\License.minimp3.txt || goto error
+rem copy /y ..\include\miniz\LICENSE .\Licenses\License.miniz.txt || goto error
+copy /y ..\include\mpg123\COPYING .\Licenses\License.mpg123.txt || goto error
+copy /y ..\include\mpg123\AUTHORS .\Licenses\License.mpg123.Authors.txt || goto error
+copy /y ..\include\nlohmann-json\LICENSE.MIT .\Licenses\License.nlohmann-json.txt || goto error
+copy /y ..\include\ogg\COPYING .\Licenses\License.ogg.txt || goto error
+copy /y ..\include\opus\COPYING .\Licenses\License.Opus.txt || goto error
+copy /y ..\include\opusenc\COPYING .\Licenses\License.Opusenc.txt || goto error
+copy /y ..\include\opusenc\AUTHORS .\Licenses\License.Opusenc.Authors.txt || goto error
+copy /y ..\include\opusfile\COPYING .\Licenses\License.Opusfile.txt || goto error
+copy /y ..\include\portaudio\LICENSE.txt .\Licenses\License.PortAudio.txt || goto error
+rem copy /y ..\include\portaudio\bindings\cpp\COPYING .\Licenses\License.portaudiocpp.txt || goto error
+rem copy /y ..\include\pugixml\LICENSE.md .\Licenses\License.PugiXML.txt || goto error
+copy /y ..\include\r8brain\LICENSE .\Licenses\License.R8Brain.txt || goto error
+copy /y ..\include\rtaudio\README.md .\Licenses\License.RtAudio.txt || goto error
+copy /y ..\include\rtkit\rtkit.h .\Licenses\License.RealtimeKit.txt || goto error
+copy /y ..\include\rtmidi\License.txt .\Licenses\License.RtMidi.txt || goto error
+copy /y ..\include\smbPitchShift\smbPitchShift.cpp .\Licenses\License.smbPitchShift.txt || goto error
+copy /y ..\include\soundtouch\COPYING.TXT .\Licenses\License.SoundTouch.txt || goto error
+rem copy /y ..\include\stb_vorbis\stb_vorbis.c .\Licenses\License.stb_vorbis.txt || goto error
+copy /y ..\include\unrar\license.txt .\Licenses\License.UnRAR.txt || goto error
+copy /y ..\include\vorbis\COPYING .\Licenses\License.Vorbis.txt || goto error
+copy /y ..\include\zlib\README .\Licenses\License.zlib.txt || goto error
+copy /y ..\include\zlib\contrib\minizip\MiniZip64_info.txt .\Licenses\License.minizip.txt || goto error
+cd .. || goto error
+
+goto noerror
+
+:error
+exit 1
+
+:noerror
+exit 0