Beginners' questions: Understanding OpenMW/OpenCS code

Everything about development and the OpenMW source code.
User avatar
AnyOldName3
Posts: 1191
Joined: 26 Nov 2015, 03:25

Re: Beginners' questions: Understanding OpenMW/OpenCS code

Post by AnyOldName3 » 07 Jul 2018, 11:55

If I'm using something a bazillion times in the same function, I'll consider a typedef, but usually it's not necessary.
AnyOldName3, Master of Shadows

User avatar
Zini
Posts: 5533
Joined: 06 Aug 2011, 15:16

Re: Beginners' questions: Understanding OpenMW/OpenCS code

Post by Zini » 08 Jul 2018, 09:38

Fully qualified names. Period. Being able to clearly see at the first glance what you are dealing with is more important than brevity (at least in C++).

btw. we probably should remove the section about using declarations at some point. That was a nod towards people who preferred this feature, done at a time when the source code was less mature. But since basically nobody makes use of it in OpenMW, there is little point in keeping this section of the style guide around.

Regarding authors recommending shortening code in any way possible: Well, there is a lot of bad advice around C++ on the internet.

moodydog
Posts: 6
Joined: 21 Jul 2018, 16:37
Github profile: https://github.com/noskcajmas

Re: Beginners' questions: Understanding OpenMW/OpenCS code

Post by moodydog » 21 Jul 2018, 23:41

Hi, I'm not sure if there is an official build thread, perhaps this would be best suited for. But I am having problems building the code:

I have installed 7-Zip with a system path variable "E:\Program Files\7-Zip"
I have installed CMake with a system path variable "E:\Program Files\CMake\bin"
I have installed Git (using MINGW64 terminal)

I have cloned openmw from GitHub into "E:\Source\openmw"
I have Visual Studio 2017

When I try to run CI/before_script.msvc.sh -k -p Win64 -v 2017 i get:

Running prebuild outside of Appveyor.

===================================
Starting prebuild on MSVC2017 WIN64
===================================

Downloading dependency packages.

Boost 1.67.0...
boost-1.67.0-msvc2015-win64.exe exists, skipping.
Bullet 2.86...
Bullet-2.86-msvc2015-win64.7z exists, skipping.
FFmpeg 3.2.4...
ffmpeg-3.2.4-win64.zip exists, skipping.
ffmpeg-3.2.4-dev-win64.zip exists, skipping.
MyGUI 3.2.2...
MyGUI-3.2.2-msvc2015-win64.7z exists, skipping.
OpenAL-Soft 1.17.2...
OpenAL-Soft-1.17.2.zip exists, skipping.
OpenSceneGraph 3.4.1-scrawl...
OSG-3.4.1-scrawl-msvc2015-win64.7z exists, skipping.
Qt 5.7.0...
qt-5.7.0-msvc2015-win64.exe exists, skipping.
qt-5-install.qs exists, skipping.
SDL 2.0.7...
SDL2-2.0.7.zip exists, skipping.

Extracting dependencies, this might take a while...
---------------------------------------------------

Boost 1.67.0... CI/before_script.msvc.sh: line 432: CI_EXTRA_INNO_OPTIONS: unbound variable

User avatar
psi29a
Posts: 4361
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: Beginners' questions: Understanding OpenMW/OpenCS code

Post by psi29a » 22 Jul 2018, 08:18

Justed updated master

Please download the latest and try again please. :)

moodydog
Posts: 6
Joined: 21 Jul 2018, 16:37
Github profile: https://github.com/noskcajmas

Re: Beginners' questions: Understanding OpenMW/OpenCS code

Post by moodydog » 22 Jul 2018, 10:04

Brilliant, though

CI_EXTRA_INNO_OPTIONS = ""

gives

Boost 1.67.0... CI/before_script.msvc.sh: line 431: CI_EXTRA_INNO_OPTIONS: command not found

So to fix,

CI_EXTRA_INNO_OPTIONS=""

However, new error:

Image

moodydog
Posts: 6
Joined: 21 Jul 2018, 16:37
Github profile: https://github.com/noskcajmas

Re: Beginners' questions: Understanding OpenMW/OpenCS code

Post by moodydog » 22 Jul 2018, 10:07

Although problem seems to be solved by clicking ignore. :)

I'm not sure if the file actually already exists, or the code attempts to copy over twice? :ugeek:

User avatar
kuyondo
Posts: 221
Joined: 29 Mar 2016, 17:45

Re: Beginners' questions: Understanding OpenMW/OpenCS code

Post by kuyondo » 22 Jul 2018, 16:00

moodydog wrote:
21 Jul 2018, 23:41
Hi, I'm not sure if there is an official build thread, perhaps this would be best suited for. But I am having problems building the code:

I have installed 7-Zip with a system path variable "E:\Program Files\7-Zip"
I have installed CMake with a system path variable "E:\Program Files\CMake\bin"
I have installed Git (using MINGW64 terminal)

I have cloned openmw from GitHub into "E:\Source\openmw"
I have Visual Studio 2017

When I try to run CI/before_script.msvc.sh -k -p Win64 -v 2017 i get:

Running prebuild outside of Appveyor.

===================================
Starting prebuild on MSVC2017 WIN64
===================================

Downloading dependency packages.

Boost 1.67.0...
boost-1.67.0-msvc2015-win64.exe exists, skipping.
Bullet 2.86...
Bullet-2.86-msvc2015-win64.7z exists, skipping.
FFmpeg 3.2.4...
ffmpeg-3.2.4-win64.zip exists, skipping.
ffmpeg-3.2.4-dev-win64.zip exists, skipping.
MyGUI 3.2.2...
MyGUI-3.2.2-msvc2015-win64.7z exists, skipping.
OpenAL-Soft 1.17.2...
OpenAL-Soft-1.17.2.zip exists, skipping.
OpenSceneGraph 3.4.1-scrawl...
OSG-3.4.1-scrawl-msvc2015-win64.7z exists, skipping.
Qt 5.7.0...
qt-5.7.0-msvc2015-win64.exe exists, skipping.
qt-5-install.qs exists, skipping.
SDL 2.0.7...
SDL2-2.0.7.zip exists, skipping.

Extracting dependencies, this might take a while...
---------------------------------------------------

Boost 1.67.0... CI/before_script.msvc.sh: line 432: CI_EXTRA_INNO_OPTIONS: unbound variable

Rakhtar
Posts: 3
Joined: 23 Jul 2018, 00:07

Re: Beginners' questions: Understanding OpenMW/OpenCS code

Post by Rakhtar » 23 Jul 2018, 00:18

I might be misunderstanding this last post, but if you're still having this problem, by pure coincidence I tried to build this for the first time a few days ago as well and hit the same problem. For the Win64 version it failed to find the boost libraries completely but with the Win32 it worked fine as long as I extracted things manually. Just add -e (skip extraction), extract/install things manually and follow the errors to pinpoint the folder structures. You'll have to rename a lot of folders and move things around a bit, but it works flawlessly. I wasn't sure to make any posts of this as it seemed like the kind of bug that'd be fixed really quickly. Haven't tried it yet with the updated script, though.

User avatar
psi29a
Posts: 4361
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: Beginners' questions: Understanding OpenMW/OpenCS code

Post by psi29a » 23 Jul 2018, 07:49

Give it a spin to see if it still fails on x64 and/or still runs on x32?

Rakhtar
Posts: 3
Joined: 23 Jul 2018, 00:07

Re: Beginners' questions: Understanding OpenMW/OpenCS code

Post by Rakhtar » 23 Jul 2018, 09:44

Although I didn't try redownloading the dependencies for Win32, everything was extracted and moved/renamed properly. Win64 is working correctly, the only problem I had was regarding permissions to move the OSG folder specifically, but renaming it manually to OSG revealed no further problems on my end. I assume it was just me doing something bad, so the script is working properly now! Thanks a lot!

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests