mirror of
https://gitea.tendokyu.moe/TeamTofuShop/taitools.git
synced 2026-09-22 22:28:06 +03:00
add MSVC compiler, remove precompiled headers
This commit is contained in:
Vendored
+11
-1
@@ -14,6 +14,16 @@
|
||||
"aime-dll.h": "c",
|
||||
"sg-reader.h": "c",
|
||||
"reg.h": "c",
|
||||
"type_traits": "c"
|
||||
"type_traits": "c",
|
||||
"stdlib.h": "c",
|
||||
"clock.h": "c",
|
||||
"cert.h": "c",
|
||||
"stddef.h": "c",
|
||||
"misc.h": "c",
|
||||
"windows.h": "c",
|
||||
"assert.h": "c",
|
||||
"io4.h": "c",
|
||||
"jvs-bus.h": "c",
|
||||
"jvs.h": "c"
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "board/io3.h"
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <windows.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
enum {
|
||||
/* System buttons in button[0] */
|
||||
|
||||
@@ -2,7 +2,6 @@ board_lib = static_library(
|
||||
'board',
|
||||
include_directories : inc,
|
||||
implicit_include_directories : false,
|
||||
c_pch : '../precompiled.h',
|
||||
dependencies : [
|
||||
capnhook.get_variable('hook_dep'),
|
||||
],
|
||||
|
||||
@@ -2,7 +2,6 @@ gfxhook_lib = static_library(
|
||||
'gfxhook',
|
||||
include_directories : inc,
|
||||
implicit_include_directories : false,
|
||||
c_pch : '../precompiled.h',
|
||||
dependencies : [
|
||||
capnhook.get_variable('hook_dep'),
|
||||
dxguid_lib,
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "hook/table.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
@@ -2,7 +2,6 @@ hooklib_lib = static_library(
|
||||
'hooklib',
|
||||
include_directories : inc,
|
||||
implicit_include_directories : false,
|
||||
c_pch : '../precompiled.h',
|
||||
dependencies : [
|
||||
capnhook.get_variable('hook_dep'),
|
||||
],
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "hook/pe.h"
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ iccard_lib = static_library(
|
||||
'iccard',
|
||||
include_directories : inc,
|
||||
implicit_include_directories : false,
|
||||
c_pch : '../precompiled.h',
|
||||
dependencies : [
|
||||
capnhook.get_variable('hook_dep'),
|
||||
],
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <windows.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "idmac/idmac.h"
|
||||
#include "idmac/jvs.h"
|
||||
|
||||
@@ -2,7 +2,6 @@ idmac_lib = static_library(
|
||||
'idmac',
|
||||
include_directories : inc,
|
||||
implicit_include_directories : false,
|
||||
c_pch : '../precompiled.h',
|
||||
dependencies : [
|
||||
capnhook.get_variable('hook_dep'),
|
||||
],
|
||||
|
||||
@@ -4,7 +4,6 @@ shared_library(
|
||||
include_directories: inc,
|
||||
vs_module_defs : 'idmac_stub.def',
|
||||
implicit_include_directories : false,
|
||||
c_pch : '../precompiled.h',
|
||||
link_with : [
|
||||
util_lib,
|
||||
],
|
||||
|
||||
@@ -2,7 +2,6 @@ jvs_lib = static_library(
|
||||
'jvs',
|
||||
include_directories : inc,
|
||||
implicit_include_directories : false,
|
||||
c_pch : '../precompiled.h',
|
||||
dependencies : [
|
||||
capnhook.get_variable('hook_dep'),
|
||||
],
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "ll3hook/config.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "board/io4.h"
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ shared_library(
|
||||
include_directories : inc,
|
||||
implicit_include_directories : false,
|
||||
vs_module_defs : 'll3hook.def',
|
||||
c_pch : '../precompiled.h',
|
||||
dependencies : [
|
||||
capnhook.get_variable('hook_dep'),
|
||||
capnhook.get_variable('hooklib_dep'),
|
||||
|
||||
@@ -3,7 +3,6 @@ ll3io_lib = static_library(
|
||||
name_prefix : '',
|
||||
include_directories : inc,
|
||||
implicit_include_directories : false,
|
||||
c_pch : '../precompiled.h',
|
||||
dependencies : [
|
||||
xinput_lib,
|
||||
],
|
||||
|
||||
@@ -3,7 +3,6 @@ shared_library(
|
||||
name_prefix : '',
|
||||
include_directories: inc,
|
||||
implicit_include_directories : false,
|
||||
c_pch : '../precompiled.h',
|
||||
dependencies : [
|
||||
capnhook.get_variable('hook_dep'),
|
||||
],
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
@echo off
|
||||
set BUILD_DIR=build
|
||||
set BUILD_DIR_32=%BUILD_DIR%\build32
|
||||
set BUILD_DIR_64=%BUILD_DIR%\build64
|
||||
set BUILD_DIR_ZIP=%BUILD_DIR%\zip
|
||||
set DIST_DIR=dist
|
||||
set DOC_DIR=doc
|
||||
|
||||
REM Set Your Visual Studio install path if this one was wrong
|
||||
if "%VS_INSTALLATION%"=="" set VS_INSTALLATION=C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools
|
||||
|
||||
if /I "%1"=="build" (
|
||||
call :build
|
||||
exit /b
|
||||
)
|
||||
if /I "%1"=="zip" (
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command "& './package.ps1'"
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo %~nx0 [action]
|
||||
echo build: Build the for both x86 and x64
|
||||
echo zip: Make zip file
|
||||
exit /b
|
||||
|
||||
:build (
|
||||
REM Check VC++
|
||||
set VSVARALL="%VS_INSTALLATION%\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
if not exist %VSVARALL% (
|
||||
echo Build tools for Microsoft Visual C++ 2022 is not Installed
|
||||
echo Edit this file to change the VS_INSTALLATION if you are installed the Visual Studio in other path
|
||||
goto end
|
||||
)
|
||||
|
||||
REM Check Meson
|
||||
for /f "tokens=* usebackq" %%i in (`where meson`) do set MESON="%%i"
|
||||
if not exist %MESON% (
|
||||
echo Meson is not Installed
|
||||
goto end
|
||||
)
|
||||
|
||||
:build_x64 (
|
||||
call %VSVARALL% x64
|
||||
|
||||
if exist %BUILD_DIR_64% (
|
||||
%MESON% setup %BUILD_DIR_64% --backend vs --buildtype release --reconfigure
|
||||
) else (
|
||||
%MESON% setup %BUILD_DIR_64% --backend vs --buildtype release
|
||||
)
|
||||
|
||||
pushd %BUILD_DIR_64%
|
||||
msbuild /m /p:Configuration=release /p:Platform=x64 segatools.sln
|
||||
popd
|
||||
)
|
||||
|
||||
:build_x86 (
|
||||
call %VSVARALL% x86
|
||||
|
||||
if exist %BUILD_DIR_32% (
|
||||
%MESON% setup %BUILD_DIR_32% --backend vs --buildtype release --reconfigure
|
||||
) else (
|
||||
%MESON% setup %BUILD_DIR_32% --backend vs --buildtype release
|
||||
)
|
||||
|
||||
pushd %BUILD_DIR_32%
|
||||
msbuild /m /p:Configuration=release /p:Platform=Win32 segatools.sln
|
||||
popd
|
||||
)
|
||||
|
||||
:end (
|
||||
endlocal
|
||||
)
|
||||
)
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
if ($null -eq $env:BUILD_DIR) {
|
||||
$BUILD_DIR="build"
|
||||
$BUILD_DIR_32="$BUILD_DIR\build32"
|
||||
$BUILD_DIR_64="$BUILD_DIR\build64"
|
||||
$BUILD_DIR_ZIP="$BUILD_DIR\zip"
|
||||
$DIST_DIR="dist"
|
||||
$DOC_DIR="doc"
|
||||
} else {
|
||||
$BUILD_DIR = $env:BUILD_DIR;
|
||||
$BUILD_DIR_32 = $env:BUILD_DIR_32;
|
||||
$BUILD_DIR_64 = $env:BUILD_DIR_64;
|
||||
$BUILD_DIR_ZIP = $env:BUILD_DIR_ZIP;
|
||||
$DIST_DIR = $env:DIST_DIR;
|
||||
$DOC_DIR = $env:DOC_DIR;
|
||||
}
|
||||
|
||||
$target = $null;
|
||||
$line = '';
|
||||
[System.Collections.ArrayList]$files = @();
|
||||
$folder = Get-Location
|
||||
|
||||
cat .\Package.mk | % {
|
||||
$trimmed = $_.TrimEnd('\').
|
||||
TrimStart("`t ").
|
||||
Replace('$(V)', '').
|
||||
Replace('$(BUILD_DIR)', $BUILD_DIR).
|
||||
Replace('$(BUILD_DIR_32)', $BUILD_DIR_32).
|
||||
Replace('$(BUILD_DIR_64)', $BUILD_DIR_64).
|
||||
Replace('$(BUILD_DIR_ZIP)', $BUILD_DIR_ZIP).
|
||||
Replace('$(DIST_DIR)', $DIST_DIR).
|
||||
Replace('$(DOC_DIR)', $DOC_DIR).
|
||||
Replace('$@', $target).
|
||||
Replace('/', '\');
|
||||
|
||||
if ($trimmed.EndsWith(': ') -or $trimmed.EndsWith(':')) {
|
||||
$target = $trimmed.TrimEnd(': ');
|
||||
$line = '';
|
||||
$files.Clear();
|
||||
cd $folder;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (-not $trimmed.StartsWith('|')) {
|
||||
$line += $trimmed;
|
||||
|
||||
if ($_.EndsWith('\')) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$line.Split(';') | % {
|
||||
$cmd = $_.Trim(' ');
|
||||
if ($cmd.StartsWith('echo')) {
|
||||
echo $cmd.TrimStart('echo ')
|
||||
} elseif ($cmd.StartsWith('mkdir')) {
|
||||
$cmd = $cmd.Replace('-p', '-Force')
|
||||
echo " - $cmd"
|
||||
Invoke-Expression $cmd | Out-Null
|
||||
} elseif ($cmd.StartsWith('cp')) {
|
||||
$tokens = $cmd.Replace('cp ', '').Split(' ');
|
||||
$srcs = $tokens[0..($tokens.Count - 2)];
|
||||
$dest = $tokens[$tokens.Count - 1];
|
||||
echo " - cp -Path $srcs -Destination $dest";
|
||||
cp -Path $srcs -Destination $dest
|
||||
} elseif ($cmd.StartsWith('cd')) {
|
||||
echo " - $cmd"
|
||||
Invoke-Expression $cmd | Out-Null
|
||||
} elseif ($cmd.StartsWith('zip ')) {
|
||||
$tokens = $cmd.Substring(4, $cmd.Length - 4).Replace('-r ', '').Replace('-j ', '').Replace('*', '.\*');
|
||||
$tokens = $tokens.Split(' ');
|
||||
$target = $tokens[0]
|
||||
|
||||
if (-not $tokens.Contains('$^')) {
|
||||
$files.AddRange($tokens[1..($tokens.Count - 1)]);
|
||||
}
|
||||
|
||||
echo " - Compress-Archive -Path $files -DestinationPath $target -Force"
|
||||
Compress-Archive -Path $files -DestinationPath $target -Force
|
||||
} else {
|
||||
$allExists = $true
|
||||
$args = $cmd.Split(' ');
|
||||
$args | ? { -not $_ -eq '' } | % {
|
||||
if (-not (Test-Path $_)) {
|
||||
$allExists = $false
|
||||
}
|
||||
}
|
||||
|
||||
if ($allExists) {
|
||||
$files.AddRange($args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$line = '';
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
struct cert_config {
|
||||
bool enable;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "hook/table.h"
|
||||
#include "hook/procaddr.h"
|
||||
|
||||
@@ -2,7 +2,6 @@ platform_lib = static_library(
|
||||
'platform',
|
||||
include_directories : inc,
|
||||
implicit_include_directories : false,
|
||||
c_pch : '../precompiled.h',
|
||||
dependencies : [
|
||||
capnhook.get_variable('hook_dep'),
|
||||
shlwapi_lib,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
struct misc_config {
|
||||
bool enable;
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <wincrypt.h>
|
||||
#include <iphlpapi.h>
|
||||
#include <assert.h>
|
||||
#include <icmpapi.h>
|
||||
#include <winternl.h>
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <windows.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "hooklib/reg.h"
|
||||
#include "platform/syscfg.h"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "sivahook/config.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "board/io4.h"
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ shared_library(
|
||||
include_directories : inc,
|
||||
implicit_include_directories : false,
|
||||
vs_module_defs : 'sivahook.def',
|
||||
c_pch : '../precompiled.h',
|
||||
dependencies : [
|
||||
capnhook.get_variable('hook_dep'),
|
||||
capnhook.get_variable('hooklib_dep'),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <windows.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "jvs/jvs-bus.h"
|
||||
#include "idmac/jvs.h"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "hook/table.h"
|
||||
#include "hook/iohook.h"
|
||||
|
||||
@@ -3,7 +3,6 @@ sivaio_lib = static_library(
|
||||
name_prefix : '',
|
||||
include_directories : inc,
|
||||
implicit_include_directories : false,
|
||||
c_pch : '../precompiled.h',
|
||||
dependencies : [
|
||||
xinput_lib,
|
||||
],
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <windows.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
wchar_t *module_file_name(HMODULE module)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@ util_lib = static_library(
|
||||
'util',
|
||||
include_directories : inc,
|
||||
implicit_include_directories : false,
|
||||
c_pch : '../precompiled.h',
|
||||
dependencies : [
|
||||
capnhook.get_variable('hook_dep'),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user