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

Fix CfgPatches author/ is not a value #3850

Merged
merged 3 commits into from
Jun 1, 2016
Merged

Fix CfgPatches author/ is not a value #3850

merged 3 commits into from
Jun 1, 2016

Conversation

jonpas
Copy link
Member

@jonpas jonpas commented May 31, 2016

When merged this pull request will:

  • Fix 'Author/' is not a value #3839
  • Convert all author[] to authors[] in all CfgPatches - CBA is changing that for compatibility with vanilla author
  • Remove "ACE-Team" (strinbtabled) from authors[] in all CfgPatches - CBA will pull both author and authors[] together
  • Add author with value "ACE-Team" (stringtabled) to all CfgPatches
  • Add url with value `"http://ace3mod.com"`` to all CfgPatches
  • Update blank component as well

Regex used

Converting author[] to authors[]:
Find:

author\[\] = {([\s\S]*?)};

Replace:

authors\[\] = {$1};

Adding author and url:
Find:

class CfgPatches([\s\S]*?);([\s]*?)authors\[\]

Replace:

class CfgPatches$1;\n        author = ECSTRING\(common,ACETeam\);$2authors\[\]
class CfgPatches$1;\n        url = "http://ace3mod.com";$2authors\[\]

@jonpas jonpas added kind/enhancement Release Notes: **IMPROVED:** kind/bug-fix Release Notes: **FIXED:** labels May 31, 2016
@jonpas jonpas added this to the 3.6.0 milestone May 31, 2016
@jonpas jonpas changed the title Fix cfg patches author Fix CfgPatches author/ is not a value May 31, 2016
@SzwedzikPL
Copy link
Contributor

SzwedzikPL commented May 31, 2016

You can also add url = "http://ace3mod.com"; to have proper link in eden addons list

Ref: https://community.bistudio.com/wiki/CfgPatches

@jonpas jonpas added the fault/BI label Jun 1, 2016
@bux
Copy link
Member

bux commented Jun 1, 2016

Good job.

Though, the order of those entries is triggering me :)

Might be better:

author
authors[]
authorUrl
url

But it'd be just a cosmetic change.

And if no one is objecting, we could change authorUrl to http://ace3mod.com aswell.
multiple authors[] but only one authorUrl

author[] = {$STR_ACE_Common_ACETeam, "Glowbal"};
author = ECSTRING(common,ACETeam);
url = "http://ace3mod.com";
authors[] = {$STR_ACE_Common_ACETeam, "Glowbal"};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove it here or it will be shown twice

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed that one, nice spot.

@jonpas
Copy link
Member Author

jonpas commented Jun 1, 2016

@bux578 I'd say we get rid of authorUrl and just keep url, @commy2 just pushed a change so url only will be shown if there are both (right?).

@commy2
Copy link
Contributor

commy2 commented Jun 1, 2016

url will be shown in 2.4.1 CBA. It is also used in BIs shenanigans, so that's the way to go.

For bwc, CBA will fall back to authorURL, if url isn't there. Since that is not supported by BI, there is no reason to keep it.

I'd say replace all URLs with http://ace3mod.com instead of the github pages of the contributors. Possibly consider a macro (or add it to the VERSION_CONFIG macro)

@jonpas
Copy link
Member Author

jonpas commented Jun 1, 2016

I totally forgot about that macro! Will put author and url there, remove authorUrl and leave authors[] as is. Actually that's not part of "version" so it doesn't make much sense.

@jonpas
Copy link
Member Author

jonpas commented Jun 1, 2016

Done, also fuck line endings breaking my regex.

@bux
Copy link
Member

bux commented Jun 1, 2016

How about making the URL into a stringtable entry or a macro?

@jonpas
Copy link
Member Author

jonpas commented Jun 1, 2016

#define URL "http://ace3mod.com" or full #define URL url = "http://ace3mod.com";?

@bux
Copy link
Member

bux commented Jun 1, 2016

I'd say first. So we could use it somewhere else.

@thojkooi
Copy link
Contributor

thojkooi commented Jun 1, 2016

I'd go for both.

#define WEB_URL "http://ace3mod.com/"
#define PBO_URL url = WEB_URL;

@bux
Copy link
Member

bux commented Jun 1, 2016

good idea

#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD

#define WEB_URL "http://ace3mod.com/"
#define PBO_URL url = WEB_URL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the standard is to not have the ";" in the macro. Sorry for being picky.

@commy2
Copy link
Contributor

commy2 commented Jun 1, 2016

Thanks!

@commy2 commy2 merged commit 9d61dd6 into master Jun 1, 2016
@commy2 commy2 deleted the fixCfgPatchesAuthor branch June 1, 2016 12:24
@jonpas jonpas mentioned this pull request Jun 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fault/BI kind/bug-fix Release Notes: **FIXED:** kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants