I think the launcher and the client can not make a link
Maibe you use diferent launcher for your source . Maibe CRC Error
- - - Updated - - -
Code:
static void startGame(const CUpdater& updater)
{
/*
const char* UPDATE_FINISH_MSG = \
"The game has been successfully updated to the latest version.\n"\
"Do you want to start the game now?";
if(updater.numUpdatedFiles_) {
if(IDYES != MessageBox(win::hWnd, UPDATE_FINISH_MSG, GAME_TITLE, MB_YESNO | MB_ICONQUESTION))
return;
}
*/
//Frage: EULA removed from the launcher
// show EULA if we have updated something
/*if(updater.numUpdatedFiles_) {
if(eulaShowDialog(0) != IDOK) {
return;
}
if(eulaShowDialog(1) != IDOK) {
return;
}
}*/
r3dOutToLog("Starting game\n"); CLOG_INDENT;
/* Because ShellExecute can delegate execution to Shell extensions
(data sources, context menu handlers, verb implementations) that are
activated using Component Object Model (COM), COM should be initialized
before ShellExecute is called.
*/
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
extern bool r3dGetFileCrc32(const char* fname, DWORD* out_crc32, DWORD* out_size);
DWORD crc32, size;
if(!r3dGetFileCrc32(GAME_EXE_NAME, &crc32, &size)) {
r3dOutToLog("failed1\n");
} else {
r3dOutToLog("%08x %d\n", crc32, size);
}
// pass special string to exe so it will know we updated successfully...
char token[1024];
updater.gUserProfile.CreateAuthToken(token);
// store login token in registry. If successful, indicate it in command line (==) and make some random gibberish
if(createTokenRegKey(token))
sprintf(token, "==%08X%08X", u_random(-1), u_random(-1));
char GAME_START_PARAM[2048];
sprintf(GAME_START_PARAM, "-WOUpdatedOk %s -WOLogin \"%s\"", __r3dCmdLine, token);
if(updater.surveyLinkOut_.length() > 0) {
sprintf(GAME_START_PARAM + strlen(GAME_START_PARAM), " -survey \"%s\"", updater.surveyLinkOut_.c_str());
}
if(gSteam.steamID > 0) {
sprintf(GAME_START_PARAM + strlen(GAME_START_PARAM), " -steam");
}
// we don't need to elevate permission here
int err = (int)ShellExecute(NULL, "open", GAME_EXE_NAME, GAME_START_PARAM, NULL, SW_SHOW);
if(err < 32) {
r3dOutToLog("failed: %d\n", err);
}
return;
}