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

Hack vpc_osx to not split with ',' in $PreprocessorDefinitions #275

Merged
merged 1 commit into from Jul 10, 2016

Conversation

sigsegv-mvm
Copy link
Contributor

Notes:

  • This finally fixes that stupid issue with TF2C_AUTHDATA_KEY and TF2C_AUTHDATA_XOR preprocessor definitions in server_tf2classic.vpc
  • If updated VPC binaries are ever pulled from Valve, this hack will need to be re-done

Instructions on how to re-do this hack in the future if necessary:

  1. Open vpc_osx in a disassembler
  2. Go to function CSolutionGenerator_Xcode::EmitBuildSettings
  3. Find the call to the CSplitString::CSplitString constructor just before the call to CVPC::GetMacrosMarkedForCompilerDefines (there are several calls to the CSplitString constructor in the function, and you just want this particular one)
  4. One of the arguments to that call is the immediate value 2; overwrite it with 1

BEFORE:

  C7 44 24 0C 02 00 00 00   mov     dword ptr [esp+0Ch], 2
  E8 5C 93 03 00            call    CSplitString::CSplitString

AFTER:

  C7 44 24 0C 01 00 00 00   mov     dword ptr [esp+0Ch], 1
  E8 5C 93 03 00            call    CSplitString::CSplitString

Notes:
- This finally fixes that stupid issue with TF2C_AUTHDATA_KEY and
  TF2C_AUTHDATA_XOR preprocessor definitions in server_tf2classic.vpc
- If updated VPC binaries are ever pulled from Valve,
  this hack will need to be re-done

Instructions on how to re-do this hack in the future if necessary:
1. Open vpc_osx in a disassembler
2. Go to function CSolutionGenerator_Xcode::EmitBuildSettings
3. Find the call to the CSplitString::CSplitString constructor just
   before the call to CVPC::GetMacrosMarkedForCompilerDefines (there
   are several calls to the CSplitString constructor in the function,
   and you just want this particular one)
4. One of the arguments to that call is the immediate value 2;
   overwrite it with 1

BEFORE:
  C7 44 24 0C 02 00 00 00   mov     dword ptr [esp+0Ch], 2
  E8 5C 93 03 00            call    CSplitString::CSplitString

AFTER:
  C7 44 24 0C 01 00 00 00   mov     dword ptr [esp+0Ch], 1
  E8 5C 93 03 00            call    CSplitString::CSplitString
@sigsegv-mvm
Copy link
Contributor Author

sigsegv-mvm commented Jul 10, 2016

I'd also suggest reverting fbfceeb now, if you want. Spaces were never the problem.

@PistonMiner PistonMiner merged commit 9346e16 into danielmm8888:master Jul 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants