Skip to content

Commit

Permalink
Failed attempt to remove the multi-instance patch.
Browse files Browse the repository at this point in the history
Shorten the readme.
Prep for 4.0.1 release.

git-svn-id: https://bwapi.googlecode.com/svn/trunk@4453 273ecf2c-f24b-0410-b6a7-e9298bb4873f
  • Loading branch information
heinermann committed Aug 28, 2013
1 parent 6376c89 commit 861c06a
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 32 deletions.
10 changes: 5 additions & 5 deletions Installer/Installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ SolidCompression=True
Compression=lzma2/ultra
InternalCompressLevel=ultra
DisableProgramGroupPage=yes
AppVersion=4.0.0
AppVersion=4.0.1
ShowLanguageDialog=no
AlwaysShowComponentsList=False
ShowComponentSizes=False
PrivilegesRequired=poweruser
LanguageDetectionMethod=locale
VersionInfoVersion=4.0.0
VersionInfoTextVersion=4.0.0
VersionInfoProductVersion=4.0.0
VersionInfoProductTextVersion=4.0.0
VersionInfoVersion=4.0.1
VersionInfoTextVersion=4.0.1
VersionInfoProductVersion=4.0.1
VersionInfoProductTextVersion=4.0.1
OutputBaseFilename=BWAPI_Setup

[Components]
Expand Down
20 changes: 20 additions & 0 deletions Release_Binary/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
=================================================
Changes from BWAPI 4.0.0 Beta to BWAPI 4.0.1 Beta
=================================================
Changes:
* All interface pointers are now hidden. Instead of Unit* you will now just use Unit. This will require a "Replace in Files" operation to convert existing sources.
* The installer now prompts the user to locate the Starcraft installation directory if it is not found.
* Game::setTextSize now takes a BWAPI::Text::Size::Enum parameter instead of an integer.
* All instances of IsUnpowered were renamed to IsPowered.
* The AI module in the configuration now accepts absolute paths (Ex: C:/stuff).

Bug Fixes:
* Fixed a regression that prevented auto-menu from functioning.
* Fixed an issue that caused Type::getType to be case sensitive.
* Fixed a regression where addons and the engineering bay returned incorrect tile sizes.
* Fixed a regression that prevented the construction of structures on the right and bottom edges of the map.
* Fixed a regression that prevented the example projects from building out-of-the-box.
* Fixed a bug where auto_menu caused a second multi-instance client to redownload a map that already existed.
* Fixed a bug where auto_menu attempted to start a game before map downloads could be processed.
* Fixed a regression that prevented the client/server setup from communicating.

============================================
Changes from BWAPI 3.7.4 to BWAPI 4.0.0 Beta
============================================
Expand Down
38 changes: 12 additions & 26 deletions Release_Binary/README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--------------------
| BWAPI 4.0.0 Beta |
| BWAPI 4.0.1 Beta |
--------------------

The BWAPI web site http://code.google.com/p/bwapi/
Expand All @@ -19,7 +19,7 @@ IRC Channel Freenode #BWAPI
the doors for custom AIs with new micro and macro algorithms.

The installer contains all the necessary include files, libs, and dlls
required to compile and run an AI module and also comes with three projects
required to compile and run an AI module and also comes with four projects
to help get you started in AI development with BWAPI:

- Example AI Module - This project shows how to build an AI module DLL which
Expand Down Expand Up @@ -51,44 +51,32 @@ IRC Channel Freenode #BWAPI
Build Instructions:
1. Run the installer and go to the installation directory.

2. Open ExampleProjects.sln in Visual C++ 2010 and build the solution.
2. Open ExampleProjects.sln in Visual C++ 2010 Express and build the solution.

All projects should now be built and can be found in the solution directory's Release or
Debug subdirectories.
Debug subdirectories. Make sure to run the corresponding version of BWAPI and set the
proper settings for Release and Debug binaries.

To run the Example AI Module:
1. Copy Release/ExampleAIModule.dll to
<starcraft folder>/bwapi-data/AI/ExampleAIModule.dll

2. Open <starcraft folder>/bwapi-data/bwapi.ini and set ai to
bwapi-data/AI/ExampleAIModule.dll if it isn't already.
1. Open <starcraft folder>/bwapi-data/bwapi.ini and set ai to
the path to your newly built ExampleAIModule.dll.

3. Run Chaoslauncher with BWAPI Injector checked. You can also check W-MODE
to have Broodwar run in a window rather than full-screen (if not using BWAPI's windowed mode).
2. Run Chaoslauncher with BWAPI Injector checked.

4. Start Starcraft: Broodwar and create a match.
3. Start Starcraft: Broodwar and create a match.

Note: With BWAPI you can switch to windowed mode using the shortcut ALT+ENTER.

To run the Example AI Client:
1. Open <starcraft folder>/bwapi-data/bwapi.ini and set ai to NULL (or some
other file name that doesn't exist).
1. Open <starcraft folder>/bwapi-data/bwapi.ini and comment out the ai field with a semicolon.

2. Run Release/ExampleAIClient.exe

3. Run Chaoslauncher with BWAPI Injector checked.

4. Start Starcraft: Broodwar and create a match.

2. Basic AI Module
------------------
The Example AI Module mainly just shows how to set everything up to make an
AI module for BWAPI. Once you understand how the Example AI Module works, you
may be interested the Basic AI Module from the BWSAL project, which aims to
develop several robust components which execute basic tasks, such as
constructing buildings, training units, gathering resources, and build-order
management. For more information, visit: http://code.google.com/p/bwsal/

3. Bug Reports
2. Bug Reports
--------------
BWAPI is not perfect. As you write custom AI modules using BWAPI you may run
into bugs or other problems. We cannot find all the bugs on our own so your
Expand All @@ -99,5 +87,3 @@ find a bug, please contact us on the IRC or file an issue at
Additionally, if the program experienced an exception, then a log will be created in
<starcraft folder>/Errors/
which may be useful.

Thank you for using BWAPI.
1 change: 1 addition & 0 deletions Release_Binary/Starcraft/bwapi-data/bwapi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
; - If there are more instances than the amount of
; DLLs specified, then the last entry is used.
; - Example: SomeAI.dll, SecondInstance.dll, ThirdInstance.dll
; - Absolute paths are acceptable.
ai = bwapi-data/AI/ExampleAIModule.dll
ai_dbg = bwapi-data/AI/ExampleAIModuled.dll

Expand Down
1 change: 1 addition & 0 deletions bwapi/BWAPI/Source/CodePatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ void ApplyCodePatches()
_FindFirstFileOld = HackUtil::PatchImport("kernel32.dll", "FindFirstFileA", &_FindFirstFile);
_SleepOld = HackUtil::PatchImport("kernel32.dll", "Sleep", &_Sleep);
_CreateThreadOld = HackUtil::PatchImport("kernel32.dll", "CreateThread", &_CreateThread);
_CreateEventOld = HackUtil::PatchImport("kernel32.dll", "CreateEvent", &_CreateEvent);
}

//----------------------------------------- NET-MODE RETURN MENU ---------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion bwapi/BWAPI/Source/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void InitPrimaryConfig()
}
*/
// Get process count
gdwProcNum = getProcessCount("StarCraft_MultiInstance.exe");
gdwProcNum = getProcessCount("StarCraft_MultiInstance.exe"); // + getProcessCount("StarCraft.exe") - 1;

// ------------------------- WMODE CONFIG OPTIONS ----------------------------------
// Load windowed mode position and fullscreen setting
Expand Down
13 changes: 13 additions & 0 deletions bwapi/BWAPI/Source/Detours.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ DECL_OLDFXN(CreateFile);
DECL_OLDFXN(CreateWindowEx);
DECL_OLDFXN(Sleep);
DECL_OLDFXN(CreateThread);
DECL_OLDFXN(CreateEvent);

//------------------------------------------------ RANDOM RACE --------------------------------------------------
u8 savedRace[PLAYABLE_PLAYER_COUNT];
Expand Down Expand Up @@ -118,6 +119,18 @@ bool __fastcall TriggerActionReplacement(BW::Triggers::Action *pAction)
return rval;
}

//--------------------------------------------- CREATE EVENT -------------------------------------------------
HANDLE WINAPI _CreateEvent(LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCTSTR lpName)
{
if ( std::string(lpName) == "Starcraft Check For Other Instances" )
{
SetLastError(ERROR_SUCCESS);
return 0;
}
auto CreateEventProc = _CreateEventOld ? _CreateEventOld : &CreateEvent;
return CreateEventProc(lpEventAttributes, bManualReset, bInitialState, lpName);
}

//--------------------------------------------- CREATE THREAD ------------------------------------------------
HANDLE WINAPI _CreateThread(LPSECURITY_ATTRIBUTES lpThreadAttributes, SIZE_T dwStackSize,LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId)
{
Expand Down
2 changes: 2 additions & 0 deletions bwapi/BWAPI/Source/Detours.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ HANDLE WINAPI _CreateFile(LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwSha
HWND WINAPI _CreateWindowEx(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam);
VOID WINAPI _Sleep(DWORD dwMilliseconds);
HANDLE WINAPI _CreateThread(LPSECURITY_ATTRIBUTES lpThreadAttributes, SIZE_T dwStackSize,LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId);
HANDLE WINAPI _CreateEvent(LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCTSTR lpName);

extern bool hideHUD;
extern DWORD lastTurnTime;
Expand All @@ -57,6 +58,7 @@ extern DECL_OLDFXN(CreateFile);
extern DECL_OLDFXN(CreateWindowEx);
extern DECL_OLDFXN(Sleep);
extern DECL_OLDFXN(CreateThread);
extern DECL_OLDFXN(CreateEvent);

bool __fastcall TriggerActionReplacement(BW::Triggers::Action *pAction);
extern bool (__fastcall *BWTriggerActionFxnTable[60])(BW::Triggers::Action*);
Expand Down

0 comments on commit 861c06a

Please sign in to comment.