Merge branch 'master' of github.com:Wargus/stratagus
This commit is contained in:
commit
4251a93e18
7 changed files with 84 additions and 3 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -27,6 +27,11 @@ obj-*
|
|||
./tolua.cpp
|
||||
./tolua.cpp.rule
|
||||
build
|
||||
.vscode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/scripts
|
||||
.clangd
|
||||
compile_commands.json
|
||||
|
|
0
.vscode/extensions.json
vendored
Normal file
0
.vscode/extensions.json
vendored
Normal file
28
.vscode/launch.json
vendored
Normal file
28
.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Stratagus",
|
||||
"type": "cppvsdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/Debug/stratagus.exe",
|
||||
"args": ["-d", "${env:APPDATA}/Stratagus/data.${input:game}"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/../${input:game}",
|
||||
"environment": [{"name": "PATH", "value": "${workspaceFolder}\\..\\dependencies\\bin;${env:PATH}"}],
|
||||
"externalConsole": true
|
||||
}
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"type": "pickString",
|
||||
"id": "game",
|
||||
"description": "Which game to launch?",
|
||||
"options": [
|
||||
"wargus",
|
||||
"war1gus",
|
||||
"stargus",
|
||||
],
|
||||
"default": "wargus"
|
||||
},
|
||||
]
|
||||
}
|
16
.vscode/scripts/download.ps1
vendored
Normal file
16
.vscode/scripts/download.ps1
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
if (-not (Test-Path "$args[0]/../dependencies")) {
|
||||
if (-not (Test-Path "$args[0]/../dependencies.zip")) {
|
||||
Invoke-WebRequest https://github.com/Wargus/win32-stratagus-dependencies/releases/download/master-builds/dependencies.zip -OutFile "$args[0]/../dependencies.zip"
|
||||
}
|
||||
Expand-Archive "$args[0]/../dependencies.zip"
|
||||
Move-Item "$args[0]/../dependencies/dependencies/"* "$args[0]/../dependencies/"
|
||||
}
|
||||
if (-not (Test-Path "$args[0]/../dependencies/bin/ffmpeg.exe")) {
|
||||
Invoke-WebRequest https://github.com/Wargus/stratagus/releases/download/2015-30-11/ffmpeg.exe -OutFile "$args[0]/../dependencies/bin/ffmpeg.exe"
|
||||
}
|
||||
if (-not (Test-Path "$args[0]/../wargus")) {
|
||||
git clone https://github.com/Wargus/wargus "$args[0]/../wargus"
|
||||
}
|
||||
if (-not (Test-Path "$args[0]/../war1gus")) {
|
||||
git clone https://github.com/Wargus/wargus "$args[0]/../war1gus"
|
||||
}
|
16
.vscode/settings.json
vendored
Normal file
16
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"cmake.configureEnvironment": {
|
||||
"CMAKE_PREFIX_PATH": "${workspaceFolder}\\..\\dependencies",
|
||||
},
|
||||
"cmake.configureArgs": [
|
||||
"-DENABLE_STDIO_REDIRECT=ON",
|
||||
//"-G", "Visual Studio 16 2019",
|
||||
//"-T", "v141_xp",
|
||||
//"-A", "win32",
|
||||
],
|
||||
"cmake.generator": "Visual Studio 16 2019",
|
||||
"cmake.toolset": "v141_xp",
|
||||
"cmake.platform": "win32",
|
||||
"cmake.copyCompileCommands": "${workspaceFolder}",
|
||||
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
|
||||
}
|
16
.vscode/tasks.json
vendored
Normal file
16
.vscode/tasks.json
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Download games and dependencies",
|
||||
"type": "shell",
|
||||
"command": "PowerShell.exe -ExecutionPolicy Bypass -File ${workspaceFolder}/.vscode/scripts/download.ps1 '${workspaceFolder}'",
|
||||
"problemMatcher": [],
|
||||
"group": "build",
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "new"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -715,8 +715,8 @@ int ReadDataDirectory(const char *dirname, std::vector<FileList> &fl)
|
|||
#else
|
||||
strcat_s(buffer, sizeof(buffer), "*.*");
|
||||
struct _finddata_t fileinfo;
|
||||
long hFile = _findfirst(buffer, &fileinfo);
|
||||
if (hFile != -1L) {
|
||||
intptr_t hFile = _findfirst(buffer, &fileinfo);
|
||||
if (hFile != -1) {
|
||||
do {
|
||||
filename = fileinfo.name;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue