Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tools - Binarize configs in make.py #8584

Closed
wants to merge 5 commits into from
Closed

Tools - Binarize configs in make.py #8584

wants to merge 5 commits into from

Conversation

PabstMirror
Copy link
Contributor

@PabstMirror PabstMirror commented Oct 22, 2021

Run configs through CfgConvert.exe twice to get nice de-macroed configs

Ref we disabled bin in #8093

@jonpas jonpas added this to the Ongoing milestone Oct 22, 2021
@jonpas jonpas added the kind/enhancement Release Notes: **IMPROVED:** label Oct 22, 2021
@PabstMirror PabstMirror modified the milestones: Ongoing, 3.14.1 Oct 22, 2021
@PabstMirror
Copy link
Contributor Author

This might not be needed, macros seem to be ok in mikro 's newest tools
DePbo 8.35 / pboProject 3.16 is working ok with +B

@dedmen
Copy link
Contributor

dedmen commented Oct 24, 2021

twice

You don't need to run twice, CfgConvert has an option to output preprocessed config. no need to binarize and debinarize.
-pcpp parameter, was added a couple months ago

I could maybe add a logging pragma or something like that, so that you can print a message to console and dynamically detect if you cannot binarize a config due to __has_include?
Preprocess in make.py, if it logs your logmessage to CfgConvert console output, you know to exclude that file from binarization.

Just this: https://docs.microsoft.com/en-us/cpp/preprocessor/message?view=msvc-160
I can add that next week and get you a new CfgConvert binary for it.
Might need to remind me on slack I can't keep up with GitHub notifications.

@PabstMirror
Copy link
Contributor Author

Now using -pcpp to only process once

pboProject 3.16 seems to handle our macros,
but I feel like it might be safer to still use cfgConvert as it should be consistent with normal development//filepatching builds

not sure how we will do $NOBIN$ w/ __has_include as both mikro's pboProject and makePbo will fail
I guess we could use addonBreaker to build those pbos?

@veteran29
Copy link
Member

veteran29 commented Oct 27, 2021

not sure how we will do $NOBIN$ w/ __has_include as both mikro's pboProject and makePbo will fail I guess we could use addonBreaker to build those pbos?

Latest mikero tools should handle _has_include, ref:

mikero — 22/10/2021
new dll for rapify now accepts the following pre-processor commands:

#if(n)def __has_include 
and
 #if (!)__has_include("some\file") (edited)

@PabstMirror
Copy link
Contributor Author

we need to be able to build with public tools

@PabstMirror
Copy link
Contributor Author

Can now use $FORCE_ADDONMAKER$ to force pack with addon maker, which will allow us to use
#if __has_include(" macros

the downside is it seems to add some #include "BIS_AddonInfo.hpp"

class BIS_AddonInfo
{
	author="";
	timepacked="1635942182";
};

junk to config.cpp

@jonpas
Copy link
Member

jonpas commented Nov 3, 2021

Any information on when __has_include support will be added to Mikero's free tools?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tools kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants