сборка OpenMW в Visual Studio

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
Post Reply
ftaru
Posts: 8
Joined: 03 Dec 2022, 07:15

сборка OpenMW в Visual Studio

Post by ftaru »

есть какое-то руководство попроще, чем вот эти вот бесконечные ветвления https://wiki.openmw.org/index.php?title ... ment_Setup, пытающиеся описать все возможные варианты сборки?

вот желательно описание сборки на чистом VS, без всяких ниндзей, шоколадов, н-мейков, что-бы эти слова не значили -))

в идеале, может кто-то поделится уже папкой с sln и всеми собранными зависимостями?

а то шариться поиском по всей папке и искать упоминания о нужной функции... такое себе.


ps. мне, собственно, на первых порах нужно лишь "переписать-в свой-проект" код чтения архивов игры и сохранений.
и, в общем, я читаю все, мне интересное, из omwsave, но есть нюанс (-)): viewtopic.php?t=7925
User avatar
psi29a
Posts: 5357
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: сборка OpenMW в Visual Studio

Post by psi29a »

Any way you can post in English please? That would the conversation more accessible to everyone and be picked up by google/duckduckgo/etc.

We use cmake to generate the sln file. It is entirely automated in our scripts in CI/ folder
ftaru
Posts: 8
Joined: 03 Dec 2022, 07:15

Re: сборка OpenMW в Visual Studio

Post by ftaru »

psi29a wrote: 05 Dec 2022, 12:36 Any way you can post in English please? That would the conversation more accessible to everyone and be picked up by google/duckduckgo/etc.

We use cmake to generate the sln file. It is entirely automated in our scripts in CI/ folder
is there any shorthand way for build a solution for VS without "nmake", "chocolatey", "ninja"?
maybe there is a builded VS-solution folder with all dependencies included?

i didn't success with CI/before_script.msvc.sh -k -p Win64 -v 2019
here is the log:

...
OpenAL-Soft 1.20.1... Exists. Done.

OSGoS 3.6.5... Exists. Done.

Qt 5.15.2... aqtinstall 1.1.3
WARNING: You are using pip version 20.1.1; however, version 22.3.1 is available.
You should consider upgrading via the 'z:\openmw-dev\deps\aqt-venv\scripts\python.exe -m pip install --upgrade pip' command.
Installing aqt wheel into virtualenv...

console window is closing here
and you should increase the timeout for closing this window if possible

ps. and yep, my english is ... -)
User avatar
AnyOldName3
Posts: 2668
Joined: 26 Nov 2015, 03:25

Re: сборка OpenMW в Visual Studio

Post by AnyOldName3 »

No, we're a cross-platform project, so we don't have pregenerated machine-independent Visual Studio solution files. NMake, Chocolatey and Ninja are all optional, though.

Chocolatey's a package manager that some people find makes it easier to install software on Windows, so we mention the package names of tools to save them needing to google them.

NMake and Ninja are both alternatives to MSBuild (the thing that actually builds Visual Studio solutions), but the command you've posted doesn't use either of them, so you'll end up with a solution file at the end.

Nothing in our script would cause the console to close when it exits, so I suspect what's happening is you've tried running the command from CMD or PowerShell, and have your registry set to launch shell scripts in a new terminal window instead of the existing ones. Instead, try either starting the Bash shell separately, e.g. by right-clicking the OpenMW directory and choosing Git Bash here, or specifying the interpreter explicitly when running the command, e.g. bash --login CI/before_script.msvc.sh -k -p Win64 -v 2019. When you do that, the terminal won't self-destruct when the script exits, and you'll be able to see the error message it prints.
ftaru
Posts: 8
Joined: 03 Dec 2022, 07:15

Re: сборка OpenMW в Visual Studio

Post by ftaru »

yes i ran CI/before_script.msvc.sh -k -p Win64 -v 2019 in windows console
ok i found the "git bash" app on my computer
I don't have the "Git Bash here" line in my folder context menu, so I googled how to change the current directory in bash
bash didn't see cmake so I googled how to add folder to "path" variable.
ok, CI/before_script.msvc.sh -k -p Win64 -v 2019 now shows the following error:
...
Installing the aqt wheel in a virtual environment...
The /z/openmw-dev/deps/aqt-venv/Scripts/aqt command failed, the output can be found in Z:/openmw-dev/MSVC2019_64/deps/Qt/output.log.

Z:/openmw-dev/MSVC2019_64/deps/Qt/output.log contains:
Traceback (last last call):
File "C:\Python38\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, no,
File "C:\Python38\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "Z:\openmw-dev\deps\aqt-venv\Scripts\aqt.exe\__main__.py", line 4, in <module>
File "z:\openmw-dev\deps\aqt-venv\lib\site-packages\aqt\__init__.py", line 25, in <module>
from aqt.installer import Cli
File "z:\openmw-dev\deps\aqt-venv\lib\site-packages\aqt\installer.py", line 37, in <module>
import py7zr
File "z:\openmw-dev\deps\aqt-venv\lib\site-packages\py7zr\__init__.py", line 21, in <module>
from import py7zr.properties (
File "z:\openmw-dev\deps\aqt-venv\lib\site-packages\py7zr\properties.py", line 28, in <module>
import psutil # type: ignore
File "z:\openmw-dev\deps\aqt-venv\lib\site-packages\psutil\__init__.py", line 109, in <module>
from . import _pswindows as _psplatform
File "z:\openmw-dev\deps\aqt-venv\lib\site-packages\psutil\_pswindows.py", line 35, in <module>
from ._psutil_windows import ABOVE_NORMAL_PRIORITY_CLASS
ImportError: Error loading DLL while importing _psutil_windows: %1 is not a Win32 application.

what am i doing wrong this time?
User avatar
AnyOldName3
Posts: 2668
Joined: 26 Nov 2015, 03:25

Re: сборка OpenMW в Visual Studio

Post by AnyOldName3 »

Could you possibly be running 32-bit Python on 64-bit Windows? Googling the last line of the Python error gives a lot of results, and that's the first one that stood out to me as potentially relevant.
ftaru
Posts: 8
Joined: 03 Dec 2022, 07:15

Re: сборка OpenMW в Visual Studio

Post by ftaru »

AnyOldName3 wrote: 08 Dec 2022, 01:09 Could you possibly be running 32-bit Python on 64-bit Windows? Googling the last line of the Python error gives a lot of results, and that's the first one that stood out to me as potentially relevant.
no, this is a standard Windows error message when reading a corrupted executable header

I tried to do everything from scratch, but immediately with bash console (and updating python), it break in the same command:
Qt 5.15.2... aqtinstall 1.1.3
Installing aqt wheel into virtualenv...
Command /z/openmw-dev/deps/aqt-venv/Scripts/aqt failed, output can be found in Z:/openmw-dev/MSVC2019_64/deps/Qt/output.log

but the log has changed:
2022-12-08 14:50:53,486 - aqt - INFO - aqtinstall(aqt.installer) vunknown on Python 3.8.5 [CPython MSC v.1924 64 bit (AMD64)]
2022-12-08 14:50:53,898 - aqt - ERROR - Download error when access to https://download.qt.io/online/qtsdkrepo ... pdates.xml
Server response code: 403, reason: Forbidden

so... i guess it's a problem with my russian ip -))
so it is, "https://download.qt.io/online/qtsdkrepo ... pdates.xml" tells me "Download from your IP address is not allowed"
f..k this f..king war (
User avatar
AnyOldName3
Posts: 2668
Joined: 26 Nov 2015, 03:25

Re: сборка OpenMW в Visual Studio

Post by AnyOldName3 »

There might be a mirror you can use instead, and then if necessary, manually install Qt to the right directory and create the right files to trick the script into not trying to install it itself. Other solutions may exist, but would violate our no-politics rule if we suggested them.
Post Reply