Author Topic: Compiling Brutal-OXCE 8.2.1  (Read 2204 times)

Offline krakp

  • Captain
  • ***
  • Posts: 66
    • View Profile
Compiling Brutal-OXCE 8.2.1
« on: February 05, 2024, 09:18:58 pm »
Hi Xilmi,

I downloaded the source of https://github.com/Xilmi/OpenXcom/releases/tag/v_8_2_1 (wanted to play/program/debug some options) but noticed some weird behaviours (that do not happen with OCX, that's why I am bringing it here).

When I start the game in VS (F5) I get plenty of errors like these ones:


[05-02-2024_20-14-59]   [INFO]  Loading rulesets...
[05-02-2024_20-15-05]   [ERROR] Unknown condition: 'ge'
[05-02-2024_20-15-05]   [ERROR] Error in matching arguments for operator 'if'
[05-02-2024_20-15-05]   [ERROR] Error in parsing script 'accuracyMultiplierBonusStats' for 'STR_STINGRAY_LAUNCHER': invalid operation in line: 'if ge bonus 0;'
[05-02-2024_20-15-05]   [ERROR] Unknown condition: 'ge'
[05-02-2024_20-15-05]   [ERROR] Error in matching arguments for operator 'if'
[05-02-2024_20-15-05]   [ERROR] Error in parsing script 'meleeMultiplierBonusStats' for 'STR_STINGRAY_LAUNCHER': invalid operation in line: 'if ge bonus 0;'
[05-02-2024_20-15-05]   [ERROR] Unknown condition: 'ge'


The game starts all right, but then during the mission my TUs seem not to be reloaded after the end of turn (also aliens suffer with the same problem). So after everyone uses up their initial TUs from turn 1, the whole mission comes to a standstill :-).

Have you ever seen this? I am using VS2019 (if it should matter...).

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: Compiling Brutal-OXCE 8.2.1
« Reply #1 on: February 06, 2024, 10:38:20 am »
Are you comparing to OXC or OXCE?
So these issues only occur when you compile yourself but not with the version I compiled for others to download?

The guide for compiling OXCE mentions using Visual Studio 2022.

This is the guide:

https://openxcom.org/forum/index.php/topic,7048.0.html

I'm not sure if this link:
3. Download and extract the pre-compiled dependencies (into repo's root): openxcom-deps-win-vc2017-newest.zip
was updated to include the 64-bit-versions of the dependencies.

In doubt use the one attached to this post: https://openxcom.org/forum/index.php/topic,11660.msg160324.html#msg160324

Hope this helps. Other than that I don't really have an explanation as for why you'd see these errors.

Also: Instead of "download the sources" I highly recommend you familiarize yourself with GitHub and create a fork instead. This will make it tremendously easier to include any of the things you improve/fix into my own version.

Edit: I'd speculate that the error-messages have something to do with yaml-scripts. "ge" and "if" sound like expressions that could be from a scripting-language and as far as I know yaml is one that is used in OXCE.
« Last Edit: February 06, 2024, 10:50:39 am by Xilmi »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Compiling Brutal-OXCE 8.2.1
« Reply #2 on: February 06, 2024, 11:19:13 am »
I recall this was VS bug, it misscompiled code, recent version of OXCE should be fixed

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: Compiling Brutal-OXCE 8.2.1
« Reply #3 on: February 06, 2024, 11:51:46 am »
I recall this was VS bug, it misscompiled code, recent version of OXCE should be fixed
Recent version of OXCE? Don't you mean recent version of VS?

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Compiling Brutal-OXCE 8.2.1
« Reply #4 on: February 06, 2024, 12:24:56 pm »
Both, recent version of VS have bug, recent version have work around for this bug

Offline krakp

  • Captain
  • ***
  • Posts: 66
    • View Profile
Re: Compiling Brutal-OXCE 8.2.1
« Reply #5 on: February 06, 2024, 12:26:38 pm »
Let me try with OXCE. For now I only tested BOXCE vs OXC.

And let me install VS2022. I will come back with the feedback - thanks everyone!

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: Compiling Brutal-OXCE 8.2.1
« Reply #6 on: February 06, 2024, 12:52:01 pm »
Both, recent version of VS have bug, recent version have work around for this bug
I'm regularly keeping up-to-date with OXCE. My last merge with it was only a few days ago. I just want to make sure that the issue in question here isn't somehow my fault.

Offline krakp

  • Captain
  • ***
  • Posts: 66
    • View Profile
Re: Compiling Brutal-OXCE 8.2.1
« Reply #7 on: February 06, 2024, 07:59:52 pm »
I tested VS2022 and indeed everything is fine - both the errors and the weirdness of TUs not reloading are gone.

Thanks for the help everyone :-)

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Compiling Brutal-OXCE 8.2.1
« Reply #8 on: February 07, 2024, 09:36:07 pm »
https://github.com/MeridianOXC/OpenXcom/commit/daeebd1d6
This commit should fix reported error, at least last time when someone had this error with VS this was fix.