*: Add CMake build system

I haven't yet:
- Ensured CMake is generating the same cl flags as Developer Studio (ditto..)

The old IDE makefiles are left in attic/ if anyone wants to try matching flags

Source structure has been slightly modified:

Uppercase directories moved to lowercase

isle/res -> isle/src/res (I'm a bit dubious of this myself but eh)
isle/*.{cpp, h} -> isle/src

lego1/*.h -> lego1/include
lego1/*.cpp -> lego1/src

All mixed/upper includes have additionally been changed to lowercase,
for compatibility with building on both Windows and Linux.
This commit is contained in:
modeco80 2023-06-13 03:54:30 -04:00
parent eaca69716e
commit 2dc554e83b
87 changed files with 400 additions and 53 deletions

View File

@ -13,50 +13,51 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: 'itsmattkc/msvc420'
path: msvc420
- name: Restore cached DX5 SDK
id: cache-dx5
- name: Restore cached kit
id: cache-kit
uses: actions/cache/restore@v3
with:
path: dx5sdk
key: dx5sdk
path: C:\islekit
key: islekit
- name: Download DX5 SDK
if: steps.cache-dx5.outputs.cache-hit != 'true'
if: steps.cache-kit.outputs.cache-hit != 'true'
run: |
cd dx5sdk
C:\msys64\usr\bin\wget.exe https://archive.org/download/idx5sdk/idx5sdk.exe
curl -LO https://archive.org/download/idx5sdk/idx5sdk.exe
7z x .\idx5sdk.exe
7z x .\DX5SDK.EXE
cd cdrom
- name: Setup MSVC 4.20
if: steps.cache-kit.outputs.cache-hit != 'true'
run: |
git clone --depth 1 https://github.com/itsmattkc/msvc420 c:\islekit\msvc420
- name: Cache DX5 SDK
if: steps.cache-dx5.outputs.cache-hit != 'true'
- name: Setup DX5 SDK
if: steps.cache-kit.outputs.cache-hit != 'true'
run: |
cd dx5sdk
move cdrom c:\islekit\dx5sdk
- name: Cache kit
if: steps.cache-kit.outputs.cache-hit != 'true'
id: save-dx5
uses: actions/cache/save@v3
with:
path: dx5sdk
key: dx5sdk
- name: Setup DX5 SDK
run: |
cd dx5sdk
cd cdrom
.\SETUP.EXE /s
path: C:\islekit
key: islekit
- name: Build
shell: cmd
run: |
call .\msvc420\bin\VCVARS32.BAT x86
mkdir Release
.\msvc420\bin\NMAKE.EXE /f isle.mak CFG="ISLE - Win32 Release"
set ISLE_KIT_ROOT=C:/islekit
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
cmake -GNinja -Bbuild --toolchain cmake/Toolchain/msvc42.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build build -j 1
- name: Upload Artifact
uses: actions/upload-artifact@master
with:
name: Win32
path: Release
path: build/isle/isle.exe

4
.gitignore vendored
View File

@ -1,3 +1 @@
Debug/
Release/
*.ncb
build/

14
CMakeLists.txt Normal file
View File

@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 3.10) # just for sanity's sake
project(
isle
LANGUAGES C CXX
)
include(${PROJECT_SOURCE_DIR}/cmake/dx5sdk.cmake)
if(ISLE_BUILD_LEGO1)
add_subdirectory(lego1)
endif()
add_subdirectory(isle)

View File

@ -12,30 +12,21 @@ Currently `ISLE.EXE` is completely decompiled, however there are some known inac
## Building
LEGO Island was compiled with Microsoft Visual C++ 4.20, so that's what this decompilation targets. However it should compile with NMAKE on newer versions of Visual Studio too.
LEGO Island was compiled with Microsoft Visual C++ 4.20, so that's what this decompilation targets. However, building with newer versions of Visual C++ using CMake should also work.
### Recommended Instructions:
### Assembling Kit
These instructions use the development IDE from Visual C++ 4.20. By modern standards, it can be a little clunky to use, especially on newer versions of Windows, however it's still relatively straightforward. If you prefer a command line process that can fit into a modern workflow/IDE, see the instructions below.
Pick a directory without spaces to use as the root of your kit. Set this as the `ISLE_KIT_ROOT` in your preferred shell (on Windows, for instance `set ISLE_KIT_ROOT=X:/path/to/kit`).
1. Install Microsoft Visual C++ 4.20. This can be found on many abandonware sites, but the installer can be a little iffy on modern versions of Windows. For convenience, I made a [portable version](https://github.com/itsmattkc/msvc420) that can be downloaded and used quickly instead.
2. Download and install the DirectX 5 SDK. Similarly, this can be found on many abandonware sites.
3. Open "Microsoft Developer Studio" (`BIN/MSDEV.EXE` for those using the portable).
4. `File` > `Open Workspace`
5. Select `ISLE.MDP` from this repository.
6. Select a build configuration. `ISLE - Win32 Release` is recommended because, at this point in time, you'll almost certainly be pairing it with the retail `LEGO1.DLL`, which is also a release build.
7. `Build` > `Build ISLE.EXE`. This will build `ISLE.EXE` in a folder called `Release`. It will also build `LEGO1.DLL` since it's listed as a dependency, however the `LEGO1.DLL` produced is too incomplete to be usable at this time.
Clone [MSVC420](https://github.com/itsmattkc/msvc420) to your kit root.
### Command Line Instructions
Install the DirectX 5 SDK, changing the location to [kit root]/dx5sdk.
For some users, this may be preferable to using an obsolete graphical IDE. Any modern IDE should support custom command line build steps, making this potentially easier to fit into a familiar contemporary workflow. This guide assumes a general familiarity with the Windows command prompt.
### Configuring CMake
1. Acquire Visual Studio/Visual C++. Any version after 4.20 should work here, but 4.20 is the only one guaranteed to work. If you wish to use 4.20, it can be found on many abandonware sites, but the installer can be a little iffy on modern versions of Windows. For convenience, I made a [portable version](https://github.com/itsmattkc/msvc420) that can be downloaded and used quickly instead.
2. Download and install the DirectX 5 SDK. Similarly, this can be found on many abandonware sites, but later versions of Visual Studio include the DirectX SDK by default, so this step may be skippable (you definitely need it for MSVC 4.20).
3. Open an x86/32-bit developer command prompt. Depending on the version of VS you're using, you may have a start menu item for it already (e.g. `x86 Native Tools Command Prompt`). Alternatively, you can start a normal command prompt (`cmd`) and run `vcvars32.bat` from the Visual Studio folder (run `BIN/VCVARS32.BAT x86` if you're using the portable 4.20).
4. `cd` to the folder you cloned this repository to.
5. `mkdir Release` if the folder doesn't already exist. Some versions of NMAKE may make this folder by itself, but some don't.
6. Run `nmake /f isle.mak CFG="ISLE - Win32 Release"`. This will build `ISLE.EXE` in the `Release` folder you just made. It will also build `LEGO1.DLL` since it's listed as a dependency, however the `LEGO1.DLL` produced is too incomplete to be usable at this time.
`cmake -Bbuild --toolchain cmake/Toolchain/msvc42.cmake -DCMAKE_BUILD_TYPE=Release`
On Linux, you need to use `scripts/cm420` to configure the build.
## Usage

View File

@ -0,0 +1,19 @@
# Common place for msvc42 toolchain stuff that Doesn't change
# these don't seem to actually be listened to but in the rare case they are
# set them anyways
set(MSVC_INCREMENTAL_DEFAULT OFF CACHE STRING "")
set(CMAKE_COMPILER_SUPPORTS_PDBTYPE OFF CACHE STRING "")
foreach(lang C CXX)
set(CMAKE_${lang}_FLAGS "/DWIN32 /D_WINDOWS /W3 /Zm1000 /I$ENV{ISLE_KIT_ROOT}/msvc420/include" CACHE STRING "")
set(CMAKE_${lang}_FLAGS_DEBUG "/MDd /Zi /Ob0 /Od" CACHE STRING "")
set(CMAKE_${lang}_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /I$ENV{ISLE_KIT_ROOT}/msvc420/include" CACHE STRING "")
set(CMAKE_${lang}_FLAGS_INIT_DEBUG "/MDd /Zi /Ob0 /Od" CACHE STRING "")
endforeach()
set(CMAKE_EXE_LINKER_FLAGS "/LIBPATH:$ENV{ISLE_KIT_ROOT}/msvc420/lib /incremental:no")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/debug /incremental:no")
set(CMAKE_SHARED_LINKER_FLAGS "/LIBPATH:$ENV{ISLE_KIT_ROOT}/msvc420/lib /incremental:no")

View File

@ -0,0 +1,14 @@
set(CMAKE_SYSTEM_NAME Windows)
include(${CMAKE_CURRENT_LIST_DIR}/msvc42-common.cmake)
set(CMAKE_C_COMPILER ${CMAKE_SOURCE_DIR}/cmake/Toolchain/wrappers/cl)
set(CMAKE_CXX_COMPILER ${CMAKE_C_COMPILER})
set(CMAKE_RC_COMPILER ${CMAKE_SOURCE_DIR}/cmake/Toolchain/wrappers/rc)
set(CMAKE_AR ${CMAKE_SOURCE_DIR}/cmake/Toolchain/wrappers/lib)
set(CMAKE_LINKER ${CMAKE_SOURCE_DIR}/cmake/Toolchain/wrappers/link)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

View File

@ -0,0 +1,17 @@
set(CMAKE_SYSTEM_NAME Windows)
include(${CMAKE_CURRENT_LIST_DIR}/msvc42-common.cmake)
set(CMAKE_C_COMPILER $ENV{ISLE_KIT_ROOT}/msvc420/bin/cl.exe)
set(CMAKE_CXX_COMPILER ${CMAKE_C_COMPILER})
set(CMAKE_RC_COMPILER $ENV{ISLE_KIT_ROOT}/msvc420/bin/rc.exe)
set(CMAKE_AR $ENV{ISLE_KIT_ROOT}/msvc420/bin/lib.exe)
set(CMAKE_LINKER $ENV{ISLE_KIT_ROOT}/msvc420/bin/link.exe)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_C_COMPILER_WORKS ON)
set(CMAKE_CXX_COMPILER_WORKS ON)

View File

@ -0,0 +1,2 @@
#!/bin/bash
i686-w64-mingw32-g++ -O3 -fno-ident -fno-stack-protector -static msvctricks.cpp -municode -lshlwapi -o msvctricks.exe

1
cmake/Toolchain/wrappers/cl Executable file
View File

@ -0,0 +1 @@
$(dirname $0)/wine-msvc.sh ${ISLE_KIT_ROOT}/msvc420/bin/cl.exe "$@"

1
cmake/Toolchain/wrappers/lib Executable file
View File

@ -0,0 +1 @@
$(dirname $0)/wine-msvc.sh ${ISLE_KIT_ROOT}/msvc420/bin/lib.exe "$@"

1
cmake/Toolchain/wrappers/link Executable file
View File

@ -0,0 +1 @@
$(dirname $0)/wine-msvc.sh ${ISLE_KIT_ROOT}/msvc420/bin/link.exe "$@"

View File

@ -0,0 +1,132 @@
/*
* Copyright (c) 2023 Huang Qinjin
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <windows.h>
#include <shlwapi.h>
//#pragma comment(lib, "shell32.lib")
//#pragma comment(lib, "shlwapi.lib")
//#pragma comment(linker, "/ENTRY:wWinMainCRTStartup")
//#pragma comment(linker, "/SUBSYSTEM:CONSOLE")
static HANDLE hStdIn = INVALID_HANDLE_VALUE;
static HANDLE hStdOut = INVALID_HANDLE_VALUE;
static HANDLE hStdErr = INVALID_HANDLE_VALUE;
static DWORD run(LPWSTR lpCmdLine)
{
STARTUPINFOW si = {};
si.cb = sizeof(si);
si.dwFlags = STARTF_USESTDHANDLES;
si.hStdInput = hStdIn;
si.hStdOutput = hStdOut;
si.hStdError = hStdErr;
PROCESS_INFORMATION pi = {};
DWORD dwExitCode;
if (CreateProcessW(nullptr, lpCmdLine, nullptr, nullptr, TRUE, 0, nullptr, nullptr, &si, &pi))
{
WaitForSingleObject(pi.hProcess, INFINITE);
if (!GetExitCodeProcess(pi.hProcess, &dwExitCode))
{
dwExitCode = GetLastError();
}
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}
else
{
dwExitCode = GetLastError();
}
return dwExitCode;
}
static DWORD mt(LPWSTR lpCmdLine)
{
DWORD dwExitCode = run(lpCmdLine);
// https://gitlab.kitware.com/cmake/cmake/-/blob/v3.26.0/Source/cmcmd.cxx#L2405
if (dwExitCode == 0x41020001)
dwExitCode = 0xbb;
return dwExitCode;
}
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
{
(void) hInstance;
(void) hPrevInstance;
(void) nCmdShow;
int argc = 0;
wchar_t** argv = CommandLineToArgvW(lpCmdLine, &argc);
if (argc <= 0) return 0;
wchar_t buf[32768];
if (GetEnvironmentVariableW(L"WINE_MSVC_STDIN", buf, ARRAYSIZE(buf)))
{
SECURITY_ATTRIBUTES attr = {};
attr.nLength = sizeof(attr);
attr.bInheritHandle = TRUE;
hStdIn = CreateFileW(buf, GENERIC_READ,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
&attr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
}
if (GetEnvironmentVariableW(L"WINE_MSVC_STDOUT", buf, ARRAYSIZE(buf)))
{
SECURITY_ATTRIBUTES attr = {};
attr.nLength = sizeof(attr);
attr.bInheritHandle = TRUE;
hStdOut = CreateFileW(buf, GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
&attr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
}
if (GetEnvironmentVariableW(L"WINE_MSVC_STDERR", buf, ARRAYSIZE(buf)))
{
SECURITY_ATTRIBUTES attr = {};
attr.nLength = sizeof(attr);
attr.bInheritHandle = TRUE;
hStdErr = CreateFileW(buf, GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
&attr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
}
if (hStdIn == INVALID_HANDLE_VALUE)
{
hStdIn = GetStdHandle(STD_INPUT_HANDLE);
}
if (hStdOut == INVALID_HANDLE_VALUE)
{
hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
}
if (hStdErr == INVALID_HANDLE_VALUE)
{
hStdErr = GetStdHandle(STD_ERROR_HANDLE);
}
LPCWSTR const exe = PathFindFileNameW(argv[0]);
if (PathMatchSpecW(exe, L"mt.exe"))
return mt(lpCmdLine);
return run(lpCmdLine);
}

Binary file not shown.

1
cmake/Toolchain/wrappers/rc Executable file
View File

@ -0,0 +1 @@
$(dirname $0)/wine-msvc.sh ${ISLE_KIT_ROOT}/msvc420/bin/rc.exe "$@"

View File

@ -0,0 +1,59 @@
#!/bin/bash
#
# Copyright (c) 2018 Martin Storsjo
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
EXE=$(dirname $0)/msvctricks.exe
HAS_MSVCTRICKS=true
ARGS=()
while [ $# -gt 0 ]; do
a=$1
case $a in
[-/][A-Za-z][A-Za-z]/*)
opt=${a:0:3}
path=${a:3}
if [ -d "$(dirname "$path")" ] && [ "$(dirname "$path")" != "/" ]; then
a=${opt}z:$path
fi
;;
/*)
if [ -d "$(dirname "$a")" ] && [ "$(dirname "$a")" != "/" ]; then
a=z:$a
fi
;;
*)
;;
esac
ARGS+=("$a")
shift
done
unixify_path='s/\r// ; s/z:\([\\/]\)/\1/i ; /^Note:/s,\\,/,g'
export WINE_MSVC_STDOUT=${TMPDIR:-/tmp}/wine-msvc.stdout.$$
export WINE_MSVC_STDERR=${TMPDIR:-/tmp}/wine-msvc.stderr.$$
cleanup() {
wait
rm -f $WINE_MSVC_STDOUT $WINE_MSVC_STDERR
}
trap cleanup EXIT
cleanup && mkfifo $WINE_MSVC_STDOUT $WINE_MSVC_STDERR || exit 1
sed -e "$unixify_path" <$WINE_MSVC_STDOUT &
sed -e "$unixify_path" <$WINE_MSVC_STDERR >&2 &
WINEDEBUG=-all wine64 "$EXE" "${ARGS[@]}" &>/dev/null

36
cmake/dx5sdk.cmake Normal file
View File

@ -0,0 +1,36 @@
# Make sure the user provided a valid kit root.
if("$ENV{ISLE_KIT_ROOT}" STREQUAL "")
message(FATAL_ERROR "ISLE_KIT_ROOT needs to be set to build")
endif()
set(__DX5_SDK_PATH "$ENV{ISLE_KIT_ROOT}/dx5sdk/sdk")
# There are no seperated includes, so for nicity just define a common interface target
# that nets us includes, that all DX5 targets include from.
# This techinically means a project can do a no-no and use, say D3D apis w/o linking D3D,
# but that's a footgun that requires knowledge of this so I'm not particulary.. worried about it?
add_library(__DX5_Inc INTERFACE)
target_include_directories(__DX5_Inc INTERFACE ${__DX5_SDK_PATH}/inc)
# Bootstrapping problems are fun.
add_library(DX5::Guid STATIC IMPORTED)
set_property(TARGET DX5::Guid PROPERTY
IMPORTED_LOCATION $ENV{ISLE_KIT_ROOT}/dx5sdk/sdk/lib/dxguid.lib
)
macro(__add_dx5_lib name libname)
add_library(DX5::${name} SHARED IMPORTED)
target_link_libraries(DX5::${name} INTERFACE __DX5_Inc DX5::Guid)
set_property(TARGET DX5::${name} PROPERTY
IMPORTED_IMPLIB ${__DX5_SDK_PATH}/lib/${libname}
)
endmacro()
__add_dx5_lib(D3DRM d3drm.lib)
__add_dx5_lib(DDraw ddraw.lib)
__add_dx5_lib(DInput dinput.lib)
__add_dx5_lib(DSound dsound.lib)

View File

@ -17,7 +17,7 @@ Result=1
[SdSetupTypeEx-0]
Result=Compact
[SdAskDestPath-0]
szDir=C:\dxsdk
szDir=C:\islekit\dxsdk
Result=1
[SdSelectFolder-0]
szFolder=Microsoft DirectX 5 SDK

28
isle/CMakeLists.txt Normal file
View File

@ -0,0 +1,28 @@
add_executable(isle WIN32
src/define.cpp
src/main.cpp
src/isle.cpp
src/res/isle.rc
../lego1/src/mxomnicreateparambase.cpp
)
# Left for when lego1 is featured enough to be bootstrappable.
#if(ISLE_BUILD_LEGO1)
# target_link_libraries(isle PRIVATE lego1)
#else()
target_include_directories(isle PRIVATE ${PROJECT_SOURCE_DIR}/lego1/include)
target_link_libraries(isle PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/ext/lego1.lib
)
#endif()
target_include_directories(isle PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
)
target_link_libraries(isle PRIVATE
DX5::DSound
winmm
)

View File

@ -5,7 +5,7 @@
#include "mxdirectdraw.h"
#include "mxdsaction.h"
#include "mxomni.h"
#include "res/resource.h"
#include "resource.h"
RECT windowRect = {0, 0, 640, 480};

View File

@ -1,7 +1,7 @@
#ifndef ISLE_H
#define ISLE_H
#include <Windows.h>
#include <windows.h>
#include "mxresult.h"
#include "mxvideoparam.h"

View File

@ -1,5 +1,5 @@
#include <DSOUND.H>
#include <Windows.h>
#include <dsound.h>
#include <windows.h>
#include "define.h"
#include "isle.h"

View File

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

View File

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

24
lego1/CMakeLists.txt Normal file
View File

@ -0,0 +1,24 @@
add_library(lego1 SHARED
src/dllmain.cpp
# OMNI source
src/mxcore.cpp
src/mxcriticalsection.cpp
src/mxomnicreateparambase.cpp
# legoomni source
src/legoomni.cpp
)
target_include_directories(lego1 PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
)
target_include_directories(lego1 PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
)
target_link_libraries(lego1 PRIVATE
DX5::DSound
winmm
)

View File

@ -1,7 +1,7 @@
#ifndef MXOMNICREATEPARAM_H
#define MXOMNICREATEPARAM_H
#include <Windows.h>
#include <windows.h>
#include "mxomnicreateflags.h"
#include "mxomnicreateparambase.h"

8
scripts/cm420 Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
# Helper wrapper to use the Linux MSVC4.2 toolchain
# This requires ISLE_KIT_ROOT to be set properly.
cmake \
--toolchain cmake/Toolchain/msvc42-linux.cmake \
-DCMAKE_CROSSCOMPILING_EMULATOR=/usr/bin/wine \
$@