Skip to content

Instantly share code, notes, and snippets.

@ananace
Last active July 12, 2023 05:57
Show Gist options
  • Save ananace/de7f30454e99b3952405 to your computer and use it in GitHub Desktop.
Save ananace/de7f30454e99b3952405 to your computer and use it in GitHub Desktop.
OpenMW Windows Development Environment Setup - Appveyor scripts

NB; (An updated version of this guide can be found on the wiki)

OpenMW Windows Dev-Env

What you need?

  • Visual Studio 2013 or 2015 (Community edition is enough)
  • MSYSGit or Git for Windows as it's also called (cinst git.install if you have Chocolatey)
  • Note that WSL does not work for this, as it needs to execute windows executables.
  • 7-zip in your path (cinst 7zip.install works, if you have Chocolatey)
  • CMake in your path (cinst cmake.install for Chocolatey)
  • ~10GB of free space per build platform (32/64-bit), for all the build artefacts.
  • Time. An hour or two most likely for full release and debug builds.

What you do?

  • Clone the OpenMW repo. git://github.com/OpenMW/openmw.git
  • Open a Git Bash shell in the repo.
  • Run the following command: CI/before_script.msvc.sh -k -p Win64 -v 2015. (Substitute Win64 with Win32 if doing a 32-bit build, 2015 can also be substituted with 2013 for VS2013)
  • Wait for the build environment to be set up.
  • ???
  • Develop.
@mattwla
Copy link

mattwla commented Sep 5, 2017

@SaintMercury

How did you fix this? I'm having the same issue.

@BinToss
Copy link

BinToss commented Oct 23, 2017

@raisthewolf

So, I fixed the above issue by putting the variable after the cd in "" (double quotations)...

(SOLVED)
I had the same problem today while using before_script.msvc.sh from revision f8fec992. I had to put quotes around every $DEPS and $DEPS_INSTALL entry.

Edit: This is because I was building the environment in a subfolder of Program Files. I'm dumb. When in doubt, use quotation marks for anything referring to file/folder paths. Or just do it the right way in the first place.

New issue (SOLVED): While installing QT, Bash states the following:
Qt 5.7.0... (Installation might take a while) Unknown option: silent
Additionally, the installer would cancel if an error is detected. Installed manually following the qs script's instructions while ignoring any unspecified errors like error while installing creation tool after the tool is already installed.

(HELP!)
Next Issue: CMake fails to build project. Before_script.MSVC.sh stops after printing "- Configuring..."
Using CMake commands copied from the SH script to troubleshoot lead me to the error The imported project "J:\Microsoft.Cpp.Default.props" was not found.

@NullCascade
Copy link

@VoidsShadow Are you sure you have cmake in your path? What do you get when you run CI/before_script.msvc.sh with -V (must be capital V). Note that the suggested cinst cmake.install probably won't actually add cmake to path. You'll have better luck with cinst cmake.portable or adding it to the path yourself.

Copy link

ghost commented Nov 11, 2017

Hey so I am trying to install this and it works until "Setting up OpenMW Build -Copying Runtime DLLs-" Then the script exits and says CI/before_script.msvc.sh: line 704: BUILD_CONFIG: unbound variable
Do you guys have any idea of how I could fix this?

@NullCascade
Copy link

@R1ZR: Do you have spaces in your path? If so, that's probably why. Either change your paths, or go through the script and quote things. I'd suggest you use a simple, short path with no spaces (e.g. C:\Projects\openmw).

@Marthgun
Copy link

Marthgun commented Nov 24, 2017

when this creates a project, just looking at the cs project, it loses its organization (folders), and just dumps everything under Source Files , the project name folder, i.e. openmw-cs.

@AnyOldName3
Copy link

An updated version of this guide is available at https://wiki.openmw.org/index.php?title=Development_Environment_Setup#Visual_Studio_2013.2F2015.2F2017_scripted_way

Among other things:

  • It tells you not to do some things that break the script that these instructions don't mention.
  • It explains some things that were vague or absent in this guide, such as how to get configurations other than Debug working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment