Skip to content

Commit 86f2700

Browse files
finduraffinduraf
finduraf
authored and
finduraf
committed
doc: INSTALL with VS 2022
1 parent d5027f1 commit 86f2700

File tree

1 file changed

+32
-16
lines changed

1 file changed

+32
-16
lines changed

INSTALL

+32-16
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ cd build
1919
cmake .. # ".." refers to the parent directory of "build"
2020
make
2121
make install
22-
Note: This will make changes to /usr/bin, and you have to either run "sudo make install" instead, or log in as root.
22+
23+
Note: This will make changes to /usr/bin, and you have to either run "sudo make install" instead, or log in as root.
2324
Note: Wizard Mode is disabled by default. To enable it run:
2425

2526
mkdir build
@@ -40,19 +41,19 @@ like this: CMAKE_CXX_FLAGS="-DFELIST_WAITKEYUP"
4041

4142
Under DOS:
4243

43-
If you have DJGPP 2.03+ and gcc 2.952+
44-
installed, type:
44+
If you have DJGPP 2.03+ and gcc 2.952+ installed, type:
4545

4646
make -f ivandj.mak
4747

4848
--------------------------------------
4949

50-
Under Windows - Microsoft Visual Studio 2017 (or better):
50+
Under Windows - Microsoft Visual Studio 2022:
5151

52-
You will need to install the C++ tools with CMake support, along with Git integrations from the Visual Studio Installer.
53-
We will not be using Visual Studio in the traditional way with everything squished into a solution file.
54-
Instead we will use Visual Studio to open a repo folder with a top-level CMakeLists.txt, in conjunction with a CMakeSettings.json file to create the cmake build files.
55-
Then we will use msvc to compile ivan.exe, with the help of libraries we install from vcpkg using Powershell (PS).
52+
You will need to install the C++ tools with CMake support, along with Git integrations from the Visual Studio Installer.
53+
We will not be using Visual Studio in the traditional way with everything squished into a solution file.
54+
Instead we will use Visual Studio to open a repo folder with a top-level CMakeLists.txt, in conjunction with
55+
a CMakeSettings.json file to create the cmake build files.
56+
Then we will use msvc to compile ivan.exe, with the help of libraries we install from vcpkg using Powershell (PS).
5657

5758
Install vcpkg and install the needed libraries using Powershell:
5859
Here is a condensed summary of applicable instructions from https://github.com/microsoft/vcpkg
@@ -76,15 +77,16 @@ zlib:x86-windows 1.2.11-5 A compressio
7677

7778
Clone attnam/ivan into a directory (for example C:\Users\yourname\source\repos\ivan)
7879

79-
Open Microsoft Visual Studio (2017)
80+
Open Microsoft Visual Studio 2022
8081

8182
Go File->Open Folder
8283

8384
Select C:\Users\yourname\source\repos\ivan
8485

8586
Some stuff will happen automatically. The CMakeSettings.json file will be found, and the CMake cache will be generated.
8687

87-
Next to the green "play" button is some text (Select Startup Item...) in a gray dropdown menu. Select "ivan.exe (Install) (ivan\ivan.exe)".
88+
Next to the green "play" button is some text (Select Startup Item...) in a gray dropdown menu.
89+
Select "ivan.exe (Install) (ivan\ivan.exe)".
8890

8991
"Build" will appear in the menu next to "CMake". Click Build->ivan.exe (Install) (ivan\ivan.exe) F7
9092

@@ -93,6 +95,14 @@ This will build ivan.exe and install all the components, automatically copying t
9395
The build folder is located in C:\Users\yourname\CMakeBuilds\some-long-code-here-abcdef123456\install\x86-Release\ivan
9496
Go there and hit ivan.exe, and you're playing IVAN built using Microsoft Visual Studio!!!
9597

98+
--------------------------------------
99+
100+
Under Windows - Microsoft Visual Studio OTHER THAN 2022:
101+
102+
Instructions are the same as for Microsoft Visual Studio 2022, except that you must open CMakeSettings.json
103+
in the project folder and change the generator to your version of VS. For example:
104+
105+
"generator": "Visual Studio 15 2017"
96106

97107
--------------------------------------
98108

@@ -136,11 +146,13 @@ Follow instructions on the page to install correctly.
136146

137147
Run MSYS2.exe from either the "-msys64" or "-msys32" folder, depending on your system, and type these commands
138148
$ pacman -Syu
139-
Proceed with installation (option Y), then exit by closing the terminal window. The terminal window will crash and burn eventually but may take some time to do so.
149+
Proceed with installation (option Y), then exit by closing the terminal window.
150+
The terminal window will crash and burn eventually but may take some time to do so.
140151

141152
Run MSYS2.exe again:
142153
$ pacman -Su
143-
proceed with installation (option Y). This will take a long time to download all the packages, depending on your download speed
154+
Proceed with installation (option Y).
155+
This will take a long time to download all the packages, depending on your download speed.
144156

145157
$ pacman -S git
146158
Proceed with installation (option Y) etcetera
@@ -159,18 +171,20 @@ $ pacman -S mingw-w64-i686-SDL2_mixer
159171

160172
$ pacman -S mingw-w64-i686-pkg-config
161173

162-
Now the MSYS2 build system is installed, you only need to follow the instructions below to keep IVAN up to date
174+
Now the MSYS2 build system is installed, you only need to follow the instructions below to keep IVAN up to date.
163175

164176
Create an empty folder in \ivan\ called msys2
165-
run MinGW32.exe (from your "-msys64" or "-msys32" folder, whichever is applicable) and change directory to your newly created \ivan\msys2\ folder
177+
Run MinGW32.exe (from your "-msys64" or "-msys32" folder, whichever is applicable) and change directory to your
178+
newly created \ivan\msys2\ folder.
166179

167180
In MinGW32.exe type the following commands, respecting the direction of the slashes:
168181
$ cmake .. -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=C:/ivan/inst_msys2
169182
$ make -j4 install
170183

171184
Navigate to \ivan\inst_msys2\ivan and you will find the ivan.exe executable!
172185

173-
You will probably need to copy a bunch of DLLs into the directory where ivan.exe is located. These may include the following, likely not an exhaustive list, but they can be found under for example C:\-msys64\mingw32\bin:
186+
You will probably need to copy a bunch of DLLs into the directory where ivan.exe is located. These may include
187+
the following, likely not an exhaustive list, but they can be found under for example C:\-msys64\mingw32\bin:
174188
libpng16-16.dll
175189
libstdc++-6.dll
176190
libwinpthread-1.dll
@@ -180,7 +194,9 @@ libSDL2_mixer-2-0-0.dll
180194
libmad-0.dll
181195

182196

183-
Use dependencywalker if you need to check for missing libraries, and if you get the message: "error cannot find entrypoint inflateValidate (in dll libpng16-16.dll)" then you need to include zlib1.dll
197+
Use dependencywalker if you need to check for missing libraries, and if you get the message:
198+
"error cannot find entrypoint inflateValidate (in dll libpng16-16.dll)"
199+
then you need to include zlib1.dll
184200

185201
--------------------------------------
186202

0 commit comments

Comments
 (0)