Initial commit of Command & Conquer Generals and Command & Conquer Generals Zero Hour source code.

This commit is contained in:
LFeenanEA 2025-02-27 17:34:39 +00:00
parent 2e338c00cb
commit 3d0ee53a05
No known key found for this signature in database
GPG key ID: C6EBE8C2EA08F7E0
6072 changed files with 2283311 additions and 0 deletions

View file

@ -0,0 +1,26 @@
/*
** Command & Conquer Generals(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// stdafx.cpp : source file that includes just the standard includes
// wolSetup.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file

View file

@ -0,0 +1,41 @@
/*
** Command & Conquer Generals(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
#define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
// TODO: reference additional headers your program requires here
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)

View file

@ -0,0 +1,173 @@
/*
** Command & Conquer Generals(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CHATDEFS_HEADER
#define CHATDEFS_HEADER
// gks 11/3/1999: version numbers for SetClientVersion
// GMU 01/12/01 : bumped CHAT_VERSION_MINOR to 15
// BGC 6/7/01: now version 16
#define CHAT_VERSION_MAJOR 1
#define CHAT_VERSION_MINOR 16
#define CHAT_VERSION ( ( CHAT_VERSION_MAJOR << 16 ) | ( CHAT_VERSION_MINOR ) )
//
// Response errors (Sent as arguments to the OnFoo calls)
//
// Your nick is still logged into chat
#define CHAT_E_NICKINUSE MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 100)
// Your password is incorrect during login
#define CHAT_E_BADPASS MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 101)
// Reference made to non-existant user or channel
#define CHAT_E_NONESUCH MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 102)
// The network layer is down or cannot be initialized for some reason
#define CHAT_E_CON_NETDOWN MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 103)
// Name lookup (e.g DNS) failed for some reason
#define CHAT_E_CON_LOOKUP_FAILED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 104)
// Some fatal error occured with the net connection
#define CHAT_E_CON_ERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 105)
// General request timeout for a request
#define CHAT_E_TIMEOUT MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 106)
// Must patch before continuing
#define CHAT_E_MUSTPATCH MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 107)
// Miscellaneous internal status error
#define CHAT_E_STATUSERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 108)
// Server has returned something we don't recognise
#define CHAT_E_UNKNOWNRESPONSE MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 109)
// Tried to join a channel that has enough players already
#define CHAT_E_CHANNELFULL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 110)
// Tried to create a channel that already exists
#define CHAT_E_CHANNELEXISTS MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 111)
// Tried to join a channel that does not exist
#define CHAT_E_CHANNELDOESNOTEXIST MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 112)
// Tried to join a channel with the wrong password
#define CHAT_E_BADCHANNELPASSWORD MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 113)
// You've been banned from the server / channel
#define CHAT_E_BANNED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 114)
// You tried to do something that required operator status
#define CHAT_E_NOT_OPER MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 115)
// Your account is disabled
#define CHAT_E_DISABLED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 116)
// Your serial# has been banned
#define CHAT_E_SERIALBANNED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 117)
// Somebody else is using your serial#
#define CHAT_E_SERIALDUP MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 118)
// New error codes -- gks 1/10/2000
// Serial number does not exist in the database
#define CHAT_E_SERIALUNKNOWN MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 119)
// Serial number is for a different product
#define CHAT_E_SKUSERIALMISMATCH MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 120)
//
// Response success codes (non-error arguments passed to the OnFoo callbacks)
// Note: S_OK is the usual success code
// A network connection is underway
#define CHAT_S_CON_CONNECTING MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 300)
// A network connection is complete
#define CHAT_S_CON_CONNECTED MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 301)
// A network connection is going down
#define CHAT_S_CON_DISCONNECTING MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 302)
// A network connection is closed
#define CHAT_S_CON_DISCONNECTED MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 303)
// Find - Nick not in system
#define CHAT_S_FIND_NOTHERE MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 304)
// Find - Not in any channels
#define CHAT_S_FIND_NOCHAN MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 305)
// Find - user has find turned off
#define CHAT_S_FIND_OFF MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 306)
// Page - Nick not in system
#define CHAT_S_PAGE_NOTHERE MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 307)
// Page - user has page turned off
#define CHAT_S_PAGE_OFF MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 308)
// This channel list is only a ping update
#define CHAT_S_PINGLIST MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 315)
//
// Request errors (returned from the RequestFoo calls)
//
// You are not connected to the chat server
#define CHAT_E_NOTCONNECTED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 500)
// You are not in a channel
#define CHAT_E_NOCHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 501)
// Feature is not implemented
#define CHAT_E_NOTIMPLEMENTED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 502)
// The request was made while while a conflicting request was still pending
#define CHAT_E_PENDINGREQUEST MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 503)
// Invalid parameter passed - usually a NULL pointer
#define CHAT_E_PARAMERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 504)
// Tried to create or join a channel before leaving the previous one
#define CHAT_E_LEAVECHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 508)
// Tried to send something to a channel when not a member of any channel
#define CHAT_E_JOINCHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 509)
// Tried to join a non-existant channel
#define CHAT_E_UNKNOWNCHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 510)
//
// Request success codes
// Notes: S_OK is the usual success code
//
// Channel list filter values
//
#define CHAT_CHANNEL_LIST_ALL -99999
//
// User flags (bit field)
//
// The owner of the current channel
#define CHAT_USER_CHANNELOWNER 0x0001
// The person with voice (conch shell...)
#define CHAT_USER_VOICE 0x0002
// Squelched?
#define CHAT_USER_SQUELCHED 0x0004
// The local user
#define CHAT_USER_MYSELF 0x8000
//
// Channel flags (bit field)
//
#define CHAN_MODE_PRIVATE 0x0004
#define CHAN_MODE_SECRET 0x0008
#define CHAN_MODE_MODERATED 0x0010
#define CHAN_MODE_TOPICLIMIT 0x0020
#define CHAN_MODE_INVITEONLY 0x0040
#define CHAN_MODE_NOPRIVMSGS 0x0080
#define CHAN_MODE_KEY 0x0100
#define CHAN_MODE_BAN 0x0200
#define CHAN_MODE_LIMIT 0x0400
#endif

View file

@ -0,0 +1,60 @@
/*
** Command & Conquer Generals(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _DOWNLOADDEFS_H
#define _DOWNLOADDEFS_H
// CDownload statuses
#define DOWNLOADSTATUS_NONE 0
#define DOWNLOADSTATUS_GO 1
#define DOWNLOADSTATUS_CONNECTING 2
#define DOWNLOADSTATUS_LOGGINGIN 3
#define DOWNLOADSTATUS_FINDINGFILE 4
#define DOWNLOADSTATUS_QUERYINGRESUME 5
#define DOWNLOADSTATUS_DOWNLOADING 6
#define DOWNLOADSTATUS_DISCONNECTING 7
#define DOWNLOADSTATUS_DONE 0
// CDownload return codes
#define DOWNLOAD_SUCCEEDED S_OK
#define DOWNLOAD_PARAMERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 1 )
#define DOWNLOAD_STATUSERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 2 )
#define DOWNLOAD_NETWORKERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 3 )
#define DOWNLOAD_FILEERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 4 )
#define DOWNLOAD_REENTERERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 4 )
// CDownloadEvent return codes.
#define DOWNLOADEVENT_SUCCEEDED S_OK
#define DOWNLOADEVENT_FAILED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 5 )
#define DOWNLOADEVENT_RESUME S_OK
#define DOWNLOADEVENT_DONOTRESUME MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 6 )
// CDownloadEvent error codes for OnError()
#define DOWNLOADEVENT_NOSUCHSERVER 1
#define DOWNLOADEVENT_COULDNOTCONNECT 2
#define DOWNLOADEVENT_LOGINFAILED 3
#define DOWNLOADEVENT_NOSUCHFILE 4
#define DOWNLOADEVENT_LOCALFILEOPENFAILED 5
#define DOWNLOADEVENT_TCPERROR 6
#define DOWNLOADEVENT_DISCONNECTERROR 7
#endif

View file

@ -0,0 +1,30 @@
/*
** Command & Conquer Generals(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FTPDEFS_H_INCLUDED__
#define __FTPDEFS_H_INCLUDED__
// CFtp return codes.
#define FTP_SUCCEEDED S_OK
#define FTP_FAILED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 1 )
#define FTP_TRYING MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 2 )
#endif

View file

@ -0,0 +1,32 @@
/*
** Command & Conquer Generals(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NETUTILDEFS_HEADER
#define NETUTILDEFS_HEADER
#define NETUTIL_E_ERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 100)
#define NETUTIL_E_BUSY MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 101)
#define NETUTIL_E_TIMEOUT MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 102)
#define NETUTIL_E_INVALIDFIELD MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 256)
#define NETUTIL_E_CANTVERIFY MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 257)
#define NETUTIL_S_FINISHED MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 500)
#endif

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,113 @@
/*
** Command & Conquer Generals(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* this file contains the actual definitions of */
/* the IIDs and CLSIDs */
/* link this file in with the server and any clients */
/* File created by MIDL compiler version 5.01.0164 */
/* at Mon Nov 05 10:28:33 2001
*/
/* Compiler settings for .\WOLAPI.idl:
Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext
error checks: allocation ref bounds_check enum stub_data
*/
//@@MIDL_FILE_HEADING( )
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __IID_DEFINED__
#define __IID_DEFINED__
typedef struct _IID
{
unsigned long x;
unsigned short s1;
unsigned short s2;
unsigned char c[8];
} IID;
#endif // __IID_DEFINED__
#ifndef CLSID_DEFINED
#define CLSID_DEFINED
typedef IID CLSID;
#endif // CLSID_DEFINED
const IID IID_IRTPatcher = {0x925CDEDE,0x71B9,0x11D1,{0xB1,0xC5,0x00,0x60,0x97,0x17,0x65,0x56}};
const IID IID_IRTPatcherEvent = {0x925CDEE3,0x71B9,0x11D1,{0xB1,0xC5,0x00,0x60,0x97,0x17,0x65,0x56}};
const IID IID_IChat = {0x4DD3BAF4,0x7579,0x11D1,{0xB1,0xC6,0x00,0x60,0x97,0x17,0x65,0x56}};
const IID IID_IChatEvent = {0x4DD3BAF6,0x7579,0x11D1,{0xB1,0xC6,0x00,0x60,0x97,0x17,0x65,0x56}};
const IID IID_IDownload = {0x0BF5FCEB,0x9F03,0x11D1,{0x9D,0xC7,0x00,0x60,0x97,0xC5,0x43,0x21}};
const IID IID_IDownloadEvent = {0x6869E99D,0x9FB4,0x11D1,{0x9D,0xC8,0x00,0x60,0x97,0xC5,0x43,0x21}};
const IID IID_INetUtil = {0xB832B0AA,0xA7D3,0x11D1,{0x97,0xC3,0x00,0x60,0x97,0x06,0xFA,0x0C}};
const IID IID_INetUtilEvent = {0xB832B0AC,0xA7D3,0x11D1,{0x97,0xC3,0x00,0x60,0x97,0x06,0xFA,0x0C}};
const IID IID_IChat2 = {0x8B938190,0xEF3F,0x11D1,{0x98,0x08,0x00,0x60,0x97,0x06,0xFA,0x0C}};
const IID IID_IChat2Event = {0x8B938192,0xEF3F,0x11D1,{0x98,0x08,0x00,0x60,0x97,0x06,0xFA,0x0C}};
const IID IID_IIGROptions = {0x89DD1ECD,0x0DCA,0x49d8,{0x8E,0xF3,0x33,0x75,0xE6,0xD6,0xEE,0x9D}};
const IID LIBID_WOLAPILib = {0x925CDED1,0x71B9,0x11D1,{0xB1,0xC5,0x00,0x60,0x97,0x17,0x65,0x56}};
const CLSID CLSID_RTPatcher = {0x925CDEDF,0x71B9,0x11D1,{0xB1,0xC5,0x00,0x60,0x97,0x17,0x65,0x56}};
const CLSID CLSID_Chat = {0x4DD3BAF5,0x7579,0x11D1,{0xB1,0xC6,0x00,0x60,0x97,0x17,0x65,0x56}};
const CLSID CLSID_Download = {0xBF6EA206,0x9E55,0x11D1,{0x9D,0xC6,0x00,0x60,0x97,0xC5,0x43,0x21}};
const CLSID CLSID_IGROptions = {0xABF6FC8F,0x1344,0x46de,{0x84,0xC9,0x83,0x71,0x11,0x8D,0xC3,0xFF}};
const CLSID CLSID_NetUtil = {0xB832B0AB,0xA7D3,0x11D1,{0x97,0xC3,0x00,0x60,0x97,0x06,0xFA,0x0C}};
const CLSID CLSID_Chat2 = {0x8B938191,0xEF3F,0x11D1,{0x98,0x08,0x00,0x60,0x97,0x06,0xFA,0x0C}};
#ifdef __cplusplus
}
#endif

Binary file not shown.

View file

@ -0,0 +1,5 @@
copy debug\wolsetup.exe dist\wolsetupD.exe
copy release\wolsetup.exe dist\wolsetup.exe
copy ..\..\libraries\source\wwvegas\wolapi\redist\woldbg.dll dist\woldbg.dll
copy ..\..\libraries\source\wwvegas\wolapi\redist\wolapi.dll dist\wolapi.dll

View file

@ -0,0 +1,33 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by wolSetup.rc
//
#define IDC_MYICON 2
#define IDI_ICON1 101
#define IDI_ICON2 102
#define IDS_APP_TITLE 103
#define IDD_MAINBOX 103
#define IDD_GENERALSSETUPBOX 104
#define IDS_HELLO 106
#define IDC_WOLSETUP 109
#define IDC_DEBUG_WOLAPI 1000
#define IDC_RELEASE_WOLAPI 1001
#define IDC_UNINSTALL_WOLAPI 1002
#define IDC_SETUP_GENERALS 1003
#define IDC_UNINSTALL_GENERALS 1004
#define IDC_TEXT_WOLDIR 1006
#define IDC_TEXT_GENERALSDIR 1007
#define IDC_TEXT_WOLVER 1008
#define IDC_EDIT_PATH 1009
#define IDC_EDIT_SERIAL 1011
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 103
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1010
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

View file

@ -0,0 +1,89 @@
/*
** Command & Conquer Generals(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "verchk.h"
#include "wolsetup.h"
#include <windows.h>
#include <winnt.h>
#include <stdlib.h>
/**
* Retrieve version information from files version resource.
*
* INPUTS
* Filename - Name of file to retrieve version information for.
* FileInfo - Pointer to VS_FIXEDFILEINFO structure to be filled in.
*
* RESULT
* Success - True if successful in obtaining version information.
*/
bool GetVersionInfo(char* filename, VS_FIXEDFILEINFO* fileInfo)
{
if (filename == NULL || fileInfo == NULL)
{
return false;
}
// Get version information from the application
DWORD verHandle;
DWORD verInfoSize = GetFileVersionInfoSize(filename, &verHandle);
if (verInfoSize)
{
// If we were able to get the information, process it:
HANDLE memHandle = GlobalAlloc(GMEM_MOVEABLE, verInfoSize);
if (memHandle)
{
LPVOID buffer = GlobalLock(memHandle);
if (buffer)
{
BOOL success = GetFileVersionInfo(filename, verHandle, verInfoSize, buffer);
if (success)
{
VS_FIXEDFILEINFO* data;
UINT dataSize = 0;
success = VerQueryValue(buffer, "\\", (LPVOID*) & data, &dataSize);
if (success && (dataSize == sizeof(VS_FIXEDFILEINFO)))
{
memcpy(fileInfo, data, sizeof(VS_FIXEDFILEINFO));
return true;
}
}
GlobalUnlock(memHandle);
}
GlobalFree(memHandle);
}
}
return false;
}
bool loadWolapi( char *filename )
{
VS_FIXEDFILEINFO fileInfo;
if (GetVersionInfo(filename, &fileInfo))
g_wolapiInstalled = false;
return g_wolapiInstalled;
}

View file

@ -0,0 +1,32 @@
/*
** Command & Conquer Generals(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __VERCHK_H__
#define __VERCHK_H__
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
// Obtain version information from the specified file.
bool GetVersionInfo(char* filename, VS_FIXEDFILEINFO* fileInfo);
bool loadWolapi( char *filename );
#endif // __VERCHK_H__

View file

@ -0,0 +1,218 @@
/*
** Command & Conquer Generals(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// FILE: WOLinit.cpp //////////////////////////////////////////////////////
// Westwood Online DLL/COM/ initialization/teardown
// Author: Matthew D. Campbell, December 2001
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <snmp.h>
#include <winreg.h>
#include <atlbase.h>
extern CComModule _Module; // Required for COM - must be between atlbase.h and atlcom.h. Funky, no?
#include <atlcom.h>
#include <stdio.h>
#include <stdarg.h>
#include "wolSetup.h"
#include "wolapi/wolapi.h"
unsigned long g_wolapiRegistryVersion = 0;
unsigned long g_wolapiRealVersion = 0;
bool g_wolapiInstalled = false;
char g_wolapiRegFilename[MAX_PATH];
char g_wolapiRealFilename[MAX_PATH];
char g_generalsFilename[MAX_PATH];
char g_generalsSerial[1024];
#define GENERALS_REG_KEY_TOP "HKEY_LOCAL_MACHINE" ///< Registry base
#define GENERALS_REG_KEY_PATH "SOFTWARE\\Westwood\\Generals" ///< Generals registry key
#define GENERALS_REG_KEY_BOTTOM GENERALS_REG_KEY_PATH "\\" ///< Generals registry key with trailing backslashes
#define GENERALS_REG_KEY_VERSION "Version" ///< Version registry key
#define GENERALS_REG_KEY_SKU "SKU" ///< SKU registry key
#define GENERALS_REG_KEY_NAME "Name" ///< Product name registry key
#define GENERALS_REG_KEY_INSTALLPATH "InstallPath" ///< Install path registry key
#define GENERALS_REG_KEY_SERIAL "Serial" ///< Serial # registry key
#define GENERALS_REG_KEY GENERALS_REG_KEY_TOP "\\" GENERALS_REG_KEY_BOTTOM ///< Full Generals registry path
#define WOLAPI_REG_KEY_TOP "HKEY_LOCAL_MACHINE" ///< Registry base
#define WOLAPI_REG_KEY_PATH "SOFTWARE\\Westwood\\WOLAPI" ///< WOLAPI registry key
#define WOLAPI_REG_KEY_BOTTOM WOLAPI_REG_KEY_PATH "\\" ///< WOLAPI registry key with trailing backslashes
#define WOLAPI_REG_KEY_VERSION "Version" ///< Version registry key
#define WOLAPI_REG_KEY_INSTALLPATH "InstallPath" ///< Install path registry key
#define WOLAPI_REG_KEY WOLAPI_REG_KEY_TOP "\\" WOLAPI_REG_KEY_BOTTOM ///< Full WOLAPI registry path
#define DLL_REG_KEY_TOP "HKEY_CLASSES_ROOT" ///< Registry base
#define DLL_REG_KEY_PATH "CLSID\\{18FD6763-F5EA-4fa5-B2A9-668554152FAE}\\InprocServer32" ///< WOLAPI registry key
#define DLL_REG_KEY_BOTTOM DLL_REG_KEY_PATH "\\" ///< WOLAPI registry key with trailing backslashes
#define DLL_REG_KEY_LOCATION "" ///< Version registry key
void getPathsFromRegistry( void )
{
HKEY handle;
unsigned long type;
unsigned long size;
int returnValue;
size = sizeof(g_generalsFilename);
strcpy(g_generalsFilename, "No install path in registry");
if (RegOpenKeyEx( HKEY_LOCAL_MACHINE, GENERALS_REG_KEY_PATH, 0, KEY_ALL_ACCESS, &handle ) == ERROR_SUCCESS) {
returnValue = RegQueryValueEx(handle, GENERALS_REG_KEY_INSTALLPATH, NULL, &type, (unsigned char *) &g_generalsFilename, &size);
if (returnValue != ERROR_SUCCESS)
{
strcpy(g_generalsFilename, "No install path in registry");
}
RegCloseKey( handle );
}
size = sizeof(g_generalsSerial);
strcpy(g_generalsSerial, "0");
if (RegOpenKeyEx( HKEY_LOCAL_MACHINE, GENERALS_REG_KEY_PATH, 0, KEY_ALL_ACCESS, &handle ) == ERROR_SUCCESS) {
returnValue = RegQueryValueEx(handle, GENERALS_REG_KEY_SERIAL, NULL, &type, (unsigned char *) &g_generalsSerial, &size);
if (returnValue != ERROR_SUCCESS)
{
strcpy(g_generalsSerial, "0");
}
RegCloseKey( handle );
}
size = sizeof(g_wolapiRegFilename);
strcpy(g_wolapiRegFilename, "No install path in registry");
g_wolapiInstalled = true;
if (RegOpenKeyEx( HKEY_LOCAL_MACHINE, WOLAPI_REG_KEY_PATH, 0, KEY_ALL_ACCESS, &handle ) == ERROR_SUCCESS) {
returnValue = RegQueryValueEx(handle, WOLAPI_REG_KEY_INSTALLPATH, NULL, &type, (unsigned char *) &g_wolapiRegFilename, &size);
if (returnValue != ERROR_SUCCESS)
{
strcpy(g_wolapiRegFilename, "No install path in registry");
g_wolapiInstalled = false;
}
RegCloseKey( handle );
}
size = sizeof(g_wolapiRealFilename);
strcpy(g_wolapiRealFilename, "No wolapi.dll installed");
if (RegOpenKeyEx( HKEY_CLASSES_ROOT, DLL_REG_KEY_PATH, 0, KEY_ALL_ACCESS, &handle ) == ERROR_SUCCESS) {
returnValue = RegQueryValueEx(handle, DLL_REG_KEY_LOCATION, NULL, &type, (unsigned char *) &g_wolapiRealFilename, &size);
if (returnValue != ERROR_SUCCESS)
{
strcpy(g_wolapiRealFilename, "No wolapi.dll installed");
g_wolapiInstalled = false;
}
RegCloseKey( handle );
}
}
void setupGenerals( const char *genPath, const char *genSerial )
{
HKEY handle;
unsigned long type;
unsigned long returnValue;
int size;
if (RegCreateKeyEx( HKEY_LOCAL_MACHINE, GENERALS_REG_KEY_PATH, 0, "REG_NONE", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &handle, NULL ) == ERROR_SUCCESS) {
type = REG_SZ;
size = strlen(genPath)+1;
returnValue = RegSetValueEx(handle, GENERALS_REG_KEY_INSTALLPATH, 0, type, (unsigned char *) genPath, size);
size = strlen(genSerial)+1;
returnValue = RegSetValueEx(handle, GENERALS_REG_KEY_SERIAL, 0, type, (unsigned char *) genSerial, size);
size = strlen("Generals")+1;
returnValue = RegSetValueEx(handle, GENERALS_REG_KEY_NAME, 0, type, (unsigned char *) "Generals", size);
type = REG_DWORD;
size = sizeof(DWORD);
unsigned long value = 65536;
returnValue = RegSetValueEx(handle, GENERALS_REG_KEY_VERSION, 0, type, (unsigned char *) &value, size);
value = 12544;
returnValue = RegSetValueEx(handle, GENERALS_REG_KEY_SKU, 0, type, (unsigned char *) &value, size);
RegCloseKey( handle );
}
}
/**
* OLEInitializer class - Init and shutdown OLE & COM as a global
* object. Scary, nasty stuff, COM. /me shivers.
*/
class OLEInitializer
{
public:
OLEInitializer() { OleInitialize(NULL); }
~OLEInitializer() { OleUninitialize(); }
};
OLEInitializer g_OLEInitializer;
CComModule _Module;
IChat *g_pChat = NULL;
/**
* checkInstalledWolapiVersion inits WOLAPI if possible and gets its version
* number. It also saves off its install path from the registry.
*/
void checkInstalledWolapiVersion( void )
{
// Initialize this instance
_Module.Init(NULL, g_hInst);
// Create the WOLAPI instance
CoCreateInstance(CLSID_Chat, NULL, CLSCTX_INPROC_SERVER, \
IID_IChat, (void**)&g_pChat);
if (g_pChat)
{
// Grab versions
g_pChat->GetVersion(&g_wolapiRealVersion);
// Release everything
g_pChat->Release();
g_wolapiInstalled = true;
}
_Module.Term();
// Grab path info from registry
getPathsFromRegistry();
return;
}

View file

@ -0,0 +1,211 @@
/*
** Command & Conquer Generals(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// FILE: wolSetup.cpp //////////////////////////////////////////////////////
// Defines the entry point for the application.
// Author: Matthew D. Campbell, December 2001
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include "resource.h"
#include "wolSetup.h"
#include "verchk.h"
void registerDLL(const char *dllName)
{
HINSTANCE hLib = LoadLibrary(dllName);
FARPROC lpDllEntryPoint;
if (hLib < (HINSTANCE)HINSTANCE_ERROR)
{
return;
}
// Find the entry point.
(FARPROC&)lpDllEntryPoint = GetProcAddress(hLib,
"DllRegisterServer");
if (lpDllEntryPoint != NULL)
(*lpDllEntryPoint)();
else
;//unable to locate entry point
}
HINSTANCE g_hInst = NULL;
LRESULT CALLBACK MainDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
g_hInst = hInstance;
checkInstalledWolapiVersion();
DialogBox(g_hInst, (LPCTSTR)IDD_MAINBOX, NULL, (DLGPROC)MainDialogProc);
return 0;
}
// Mesage handler for generals setup box.
LRESULT CALLBACK GeneralsSetupDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
{
SetDlgItemText(hDlg, IDC_EDIT_PATH, g_generalsFilename);
SetDlgItemText(hDlg, IDC_EDIT_SERIAL, g_generalsSerial);
return TRUE;
}
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDOK:
{
char genPath[_MAX_PATH], genSerial[1024];
GetDlgItemText(hDlg, IDC_EDIT_PATH, genPath, _MAX_PATH);
GetDlgItemText(hDlg, IDC_EDIT_SERIAL, genSerial, 1024);
setupGenerals( genPath, genSerial );
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
case IDCANCEL:
{
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
}
break;
}
return FALSE;
}
void updateDisplay(HWND hDlg)
{
checkInstalledWolapiVersion();
if (g_wolapiInstalled)
{
char buf[200];
sprintf(buf, "%d.%d (%s)", MAJOR(g_wolapiRealVersion), MINOR(g_wolapiRealVersion), g_wolapiRealFilename);
SetDlgItemText(hDlg, IDC_TEXT_WOLVER, buf);
}
else
{
SetDlgItemText(hDlg, IDC_TEXT_WOLVER, "Not installed");
}
SetDlgItemText(hDlg, IDC_TEXT_WOLDIR, g_wolapiRegFilename);
SetDlgItemText(hDlg, IDC_TEXT_GENERALSDIR, g_generalsFilename);
}
// Mesage handler for main dialog box.
LRESULT CALLBACK MainDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
{
updateDisplay(hDlg);
return TRUE;
}
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDOK:
case IDCANCEL:
{
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
case IDC_SETUP_GENERALS:
{
DialogBox(g_hInst, (LPCTSTR)IDD_GENERALSSETUPBOX, hDlg, (DLGPROC)GeneralsSetupDialogProc);
updateDisplay(hDlg);
break;
}
case IDC_UNINSTALL_GENERALS:
{
if (MessageBox(hDlg, "Are you sure you want to delete Generals registry entries?", "Warning!", MB_OKCANCEL) == IDOK)
{
MessageBox(hDlg, "Oops! Can't do that yet!", "Unimplemented", MB_OK);
updateDisplay(hDlg);
}
break;
}
case IDC_DEBUG_WOLAPI:
{
if (g_wolapiInstalled)
{
if (MessageBox(hDlg, "Are you sure you want to overwrite installed WOLAPI?", "Warning!", MB_OKCANCEL) == IDOK)
{
registerDLL("woldbg.dll");
updateDisplay(hDlg);
}
}
else
{
DialogBox(g_hInst, (LPCTSTR)IDD_GENERALSSETUPBOX, hDlg, (DLGPROC)MainDialogProc);
}
break;
}
case IDC_RELEASE_WOLAPI:
{
if (g_wolapiInstalled)
{
if (MessageBox(hDlg, "Are you sure you want to overwrite installed WOLAPI?", "Warning!", MB_OKCANCEL) == IDOK)
{
registerDLL("wolapi.dll");
updateDisplay(hDlg);
}
}
else
{
DialogBox(g_hInst, (LPCTSTR)IDD_GENERALSSETUPBOX, hDlg, (DLGPROC)MainDialogProc);
updateDisplay(hDlg);
}
break;
}
case IDC_UNINSTALL_WOLAPI:
{
if (g_wolapiInstalled)
{
MessageBox(hDlg, "Oops! Can't do that yet!", "Unimplemented", MB_OK);
updateDisplay(hDlg);
}
break;
}
}
break;
}
return FALSE;
}

View file

@ -0,0 +1,147 @@
# Microsoft Developer Studio Project File - Name="wolSetup" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=wolSetup - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "wolSetup.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "wolSetup.mak" CFG="wolSetup - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "wolSetup - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "wolSetup - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "wolSetup - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 version.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
!ELSEIF "$(CFG)" == "wolSetup - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
# ADD LINK32 version.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
!ENDIF
# Begin Target
# Name "wolSetup - Win32 Release"
# Name "wolSetup - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\verchk.cpp
# End Source File
# Begin Source File
SOURCE=.\WOLAPI\wolapi_i.c
# End Source File
# Begin Source File
SOURCE=.\wolInit.cpp
# End Source File
# Begin Source File
SOURCE=.\wolSetup.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\resource.h
# End Source File
# Begin Source File
SOURCE=.\verchk.h
# End Source File
# Begin Source File
SOURCE=.\wolSetup.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\small.ico
# End Source File
# Begin Source File
SOURCE=.\wolSetup.ico
# End Source File
# Begin Source File
SOURCE=.\wolSetup.rc
# End Source File
# End Group
# Begin Source File
SOURCE=.\ReadMe.txt
# End Source File
# End Target
# End Project

View file

@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "wolSetup"=.\wolSetup.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View file

@ -0,0 +1,45 @@
/*
** Command & Conquer Generals(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// FILE: wolSetup.h //////////////////////////////////////////////////////
// Author: Matthew D. Campbell, December 2001
#ifndef __WOLSETUP_H__
#define __WOLSETUP_H__
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
void checkInstalledWolapiVersion( void );
void setupGenerals( const char *genPath, const char *genSerial );
extern HINSTANCE g_hInst;
extern unsigned long g_wolapiRegistryVersion;
extern unsigned long g_wolapiRealVersion;
extern bool g_wolapiInstalled;
extern char g_wolapiRegFilename[MAX_PATH];
extern char g_wolapiRealFilename[MAX_PATH];
extern char g_generalsFilename[MAX_PATH];
extern char g_generalsSerial[];
static MAJOR(unsigned long x) { return (((x) & 0xffff0000) >> 16); }
static MINOR(unsigned long x) { return ((x) & 0xffff); }
#endif // __WOLSETUP_H__

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,158 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON1 ICON DISCARDABLE "wolSetup.ico"
IDI_ICON2 ICON DISCARDABLE "small.ico"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_MAINBOX DIALOG DISCARDABLE 22, 17, 234, 115
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Generals WOLSetup"
FONT 8, "System"
BEGIN
ICON IDI_ICON1,IDC_MYICON,14,9,20,20
LTEXT "WOLSetup Version 1.0",IDC_STATIC,49,10,119,8,
SS_NOPREFIX
LTEXT "Copyright (C) 2001 EA Pacific",IDC_STATIC,45,20,119,8
DEFPUSHBUTTON "Done",IDOK,200,40,30,35,WS_GROUP
PUSHBUTTON "Debug",IDC_DEBUG_WOLAPI,50,90,35,15
PUSHBUTTON "Release",IDC_RELEASE_WOLAPI,10,90,35,15
PUSHBUTTON "Uninstall",IDC_UNINSTALL_WOLAPI,90,90,35,15
GROUPBOX "WOLAPI",IDC_STATIC,5,80,125,30
GROUPBOX "Generals Registry",IDC_STATIC,135,80,95,30
PUSHBUTTON "Setup",IDC_SETUP_GENERALS,140,90,40,15
PUSHBUTTON "Remove",IDC_UNINSTALL_GENERALS,185,90,40,15
GROUPBOX "Current Setup",IDC_STATIC,5,35,190,40
GROUPBOX "",IDC_STATIC,5,0,225,35
LTEXT "WOLAPI dir:",IDC_STATIC,10,45,60,8,SS_NOPREFIX
LTEXT "Generals dir:",IDC_STATIC,10,55,60,8,SS_NOPREFIX
LTEXT "WOLAPI version:",IDC_STATIC,10,65,60,8,SS_NOPREFIX
LTEXT "No registry entry",IDC_TEXT_WOLDIR,70,45,120,8,
SS_NOPREFIX
LTEXT "No registry entry",IDC_TEXT_GENERALSDIR,70,55,120,8,
SS_NOPREFIX
CONTROL "(Uninstalled)",IDC_TEXT_WOLVER,"Static",
SS_LEFTNOWORDWRAP | SS_NOPREFIX | WS_GROUP,70,65,120,8
END
IDD_GENERALSSETUPBOX DIALOG DISCARDABLE 22, 17, 194, 70
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Setup Generals Registry"
FONT 8, "System"
BEGIN
DEFPUSHBUTTON "OK",IDOK,155,40,30,20,WS_GROUP
DEFPUSHBUTTON "Cancel",IDCANCEL,5,40,35,20,WS_GROUP
EDITTEXT IDC_EDIT_PATH,50,10,135,10,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_SERIAL,50,25,135,10,ES_AUTOHSCROLL
LTEXT "Install path:",IDC_STATIC,10,10,40,8
LTEXT "Serial:",IDC_STATIC,10,25,25,8
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_MAINBOX, DIALOG
BEGIN
RIGHTMARGIN, 230
BOTTOMMARGIN, 75
END
IDD_GENERALSSETUPBOX, DIALOG
BEGIN
RIGHTMARGIN, 190
BOTTOMMARGIN, 30
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_APP_TITLE "wolSetup"
IDS_HELLO "Hello World!"
IDC_WOLSETUP "WOLSETUP"
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED