Problems setting up a dev environment on Windows

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
User avatar
Ace (SWE)
Posts: 887
Joined: 15 Aug 2011, 14:56

Re: Problems setting up a dev environment on Windows

Post by Ace (SWE) »

Hm, had a look through the code, and OpenMW actually wants the OpenAL include dir to be to incude/AL. Not really the way that's usually done, but I guess we're doing it that way.
Normally I would've just checked against my own CMake settings, but I'm at my parents at the moment so it's not as easy to get access to my windows machine.

I would suggest just going to a new, clean, folder and running 'git clone git://github.com/OpenMW/openmw'. That will get you a perfectly pristine copy of the code to play with.
User avatar
AnyOldName3
Posts: 2676
Joined: 26 Nov 2015, 03:25

Re: Problems setting up a dev environment on Windows

Post by AnyOldName3 »

So I cloned that into a new directory, and copied your setup script from your fork by hand, and then set it up. It still didn't actually run QtBinPatcher, so I had to do that myself, but after doing that, CMake succeeded, and Visual Studio gave me two errors and ten warnings:
Spoiler: Show
I did a search in that folder, and couldn't actually find the offending header file, and then when digging a little further, it seemed that the OpenAL zip was never actually extracted at all.

I'm going to extract it manually, regenerate stuff with CMake, and then set Visual Studio off compiling while I briefly go out. I'll report back with my findings.
User avatar
AnyOldName3
Posts: 2676
Joined: 26 Nov 2015, 03:25

Re: Problems setting up a dev environment on Windows

Post by AnyOldName3 »

Okay, so I know why it wasn't extracted - the archive is only 1 KB, and is actually an HTML file containing this:
Spoiler: Show
User avatar
Ace (SWE)
Posts: 887
Joined: 15 Aug 2011, 14:56

Re: Problems setting up a dev environment on Windows

Post by Ace (SWE) »

Ah, I guess I'll have to update the CI script then, I'll get right on that.

Edit:
Right, updated the OpenAL soft link, and tried to see if I could get the qtbinpatcher to run as well.
User avatar
AnyOldName3
Posts: 2676
Joined: 26 Nov 2015, 03:25

Re: Problems setting up a dev environment on Windows

Post by AnyOldName3 »

That helped - the ALL_BUILD project builds fine, although the INSTALL project complains it can't create a folder.
User avatar
AnyOldName3
Posts: 2676
Joined: 26 Nov 2015, 03:25

Re: Problems setting up a dev environment on Windows

Post by AnyOldName3 »

I ran VS as Admin, and the INSTALL project worked. However, it's now complaining that a bunch of DLLs (e.g. SDL2.dll) aren't installed. It's overwritten/deleted my previous install of 0.37, so I'll run the installer for that again (into a different folder) so that the existing registry entries (if any) point at something that exists. If that doesn't work, I'll just copy and paste the DLLs which the script downloaded into the install folder, and it should be able to see them...

EDIT: 0.37 was already in a different folder. It's just not copied the DLLs across...
Last edited by AnyOldName3 on 23 Dec 2015, 19:44, edited 2 times in total.
User avatar
Ace (SWE)
Posts: 887
Joined: 15 Aug 2011, 14:56

Re: Problems setting up a dev environment on Windows

Post by Ace (SWE) »

INSTALL has never worked properly on Windows to my knowledge, Windows does installation differently after all with the registry and all that. You can install a copy of NSIS though, make sure that all the DLLs are in the build folder (Debug/Release), and then build the PACKAGE project. That will give you an installer that you can use to install it on Windows.

I myself recommend just copying the config files and resources into the build folder and running from there though, much faster for development.
The CI script should copy all the DLLs over into the build folders, but if some are missing then you might want to try running it two times. First as 'CI/before_script.msvc.sh -c Debug' and then '-c Release' to get both Debug and Release DLLs
User avatar
AnyOldName3
Posts: 2676
Joined: 26 Nov 2015, 03:25

Re: Problems setting up a dev environment on Windows

Post by AnyOldName3 »

I did try running directly from the Debug/Release folders, but it moaned that settings-default.cfg didn't exist, so I gave up. Am I okay to just copy everything from 0.37's installation folder, choosing not to overwrite stuff when offered?
User avatar
AnyOldName3
Posts: 2676
Joined: 26 Nov 2015, 03:25

Re: Problems setting up a dev environment on Windows

Post by AnyOldName3 »

Also, I get 'unknown arg -c' when I attempt to run those commands. The script had already put the DLLs in the debug folder, but didn't do the release ones.
User avatar
Ace (SWE)
Posts: 887
Joined: 15 Aug 2011, 14:56

Re: Problems setting up a dev environment on Windows

Post by Ace (SWE) »

I added the -c and -p options just now basically, so you could grab a new copy of it from here https://github.com/ace13/openmw/blob/ap ... pt.msvc.sh
Or set CONFIGURATION as an environment variable when running the script.
'CONFIGURATION=Release CI/before_script.msvc.sh -k -e -d'
(-k keeps the old build directory, -e skips checking for redownloads, -d keeps the extracted deps without re-extracting them)

The files you need to copy into your Debug/Release folder are; (You'll find them in the build_32/build_64 folder)
gamecontrollerdb.txt
openmw.cfg (Copy the openmw.cfg.install one and just remove the .install extension)
openmw-cs.cfg
settings-default.cfg
resources/ (The entire folder)

So you'll have those config files and the resources folder next to your built binaries.
Locked