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

Add support for BWAPI 4.4.0 (but not 4.3.0 because it crashes a lot) #34

Closed
chriscoxe opened this issue Mar 3, 2019 · 5 comments
Closed

Comments

@chriscoxe
Copy link
Contributor

chriscoxe commented Mar 3, 2019

Update 2019-03-24: the original plan was to add support for BWAPI 4.3.0 and that is how this issue was originally written, but the plan changed to only add support for BWAPI 4.4.0, not 4.3.0 too. So I have edited this issue to replace references of BWAPI 4.3.0 with just BWAPI 4.4.0 (even though the commit history will show that 4.3.0 was added then 4.4.0 added then 4.3.0 removed).

Add support for BWAPI 4.4.0 by adding Required_BWAPI_440.zip. The only differences for Required_BWAPI_440.zip compared with Required_BWAPI_420.zip are the updated TournamentModule.dll that needs to be built (using the updated ExampleTournamentModule.vcxproj file from BWAPI, and also add the source code to a separate folder), and the updated official BWAPI.dll & updated official SNP_DirectIP.snp. Also, remove Multiple Instance Hack.bat, bspatch.exe, starcraft.bsdiff because they were removed from BWAPI several versions ago (since version 4.1.2).

For the source code for TournamentModule.dll, I will combine the updated ExampleTournamentModule.vcxproj file from BWAPI 4.4.0 with the TM source code for BWAPI 4.2.0 from after #32 was fixed, so that those permissions fixes are also applied to BWAPI 4.4.0.

To ensure compatibility with BWAPI 4.4.0, I recommend installing the latest version of the x86 "Microsoft Visual C++ Redistributable for Visual Studio 2017". https://support.microsoft.com/en-au/help/2977003/the-latest-supported-visual-c-downloads provides a download link to whatever the latest version is. The links on that page change every time they release a new version. Currently (as-at 2019-03-24), the version of the redist is 14.16.27027, although it is actually displayed in Add/Remove Programs as 14.16.27027.1.

chriscoxe added a commit to chriscoxe/StarcraftAITournamentManager that referenced this issue Mar 3, 2019
Copy official ExampleTournamentModule.vcxproj from BWAPI 4.3.0
chriscoxe added a commit to chriscoxe/StarcraftAITournamentManager that referenced this issue Mar 3, 2019
Merge modifications from BWAPI_420's ExampleTournamentModule.vcproj
chriscoxe added a commit to chriscoxe/StarcraftAITournamentManager that referenced this issue Mar 3, 2019
Copy the whole Source folder from BWAPI_420 (I didn't modify anything).
chriscoxe added a commit to chriscoxe/StarcraftAITournamentManager that referenced this issue Mar 3, 2019
Updated TournamentModule.dll (see its source code in separate src folder), official BWAPI.dll, official SNP_DirectIP.snp. Also remove Multiple Instance Hack.bat, bspatch.exe, starcraft.bsdiff because they were removed from BWAPI several versions ago (since version 4.1.2). No other changes compared with Required_BWAPI_420.zip. Notes: I compiled TournamentModule.dll using the official download of BWAPI 4.3.0 without modifications/rebuilding BWAPI. TournamentModule.dll was compiled using Microsoft Visual Studio Community 2017 version 15.9.7 (linking with an unpacked https://github.com/bwapi/bwapi/releases/download/v4.3.0/BWAPI.7z).
@chriscoxe
Copy link
Contributor Author

chriscoxe commented Mar 3, 2019

Update 2019-03-24: I've just added support for BWAPI 4.4.0 and removed the support for BWAPI 4.3.0, so the rest of this old comment about testing peformed is no longer relevant.

I've compiled my bot (ZZZKBot) linking with BWAPI 4.3.0 and tested that my bot runs as expected using ChaosLauncher with the new TournamentModule.dll (and BWAPI 4.3.0 official BWAPI.dll, SNP_DirectIP.snp) on my Win7 SP1 VMs, and committed and pushed all the changes to the ladder branch of my fork.

chriscoxe added a commit to chriscoxe/StarcraftAITournamentManager that referenced this issue Mar 4, 2019
Fixed ClientCommands.java for a couple of version number checks for versions of BWAPI >= 4.2.0, e.g. 4.3.0. Updated the README.md to cover BWAPI 4.3.0, and clarified some comments about BWAPI versions. I built the JARs using jdk-8u201-windows-i586.exe. I'm not sure whether I need to push the updated server.jar/results_parser.jar though, because I only changed some comments in the src/server folder.
@N00byEdge
Copy link

N00byEdge commented Mar 23, 2019

BWAPI 4.4 now instead? :D @davechurchill

@davechurchill
Copy link
Owner

We plan on supporting 4.4.0, I don't think we need 4.3 and 4.4

@chriscoxe chriscoxe changed the title Add support for BWAPI 4.3.0 Add support for BWAPI 4.4.0 (but not 4.3.0 because it crashes a lot) Mar 24, 2019
chriscoxe added a commit to chriscoxe/StarcraftAITournamentManager that referenced this issue Mar 24, 2019
…t crashes a lot)

Move TM src for BWAPI_430 to BWAPI_440 (content not changed)
chriscoxe added a commit to chriscoxe/StarcraftAITournamentManager that referenced this issue Mar 24, 2019
…t crashes a lot)

Use the proper path to BWAPILIB.lib (note: you have to build it yourself in BWAPI 4.3.0 and onwards), as opposed to building it yourself then moving it to where it used to be located in earlier versions of BWAPI like 4.2.0
chriscoxe added a commit to chriscoxe/StarcraftAITournamentManager that referenced this issue Mar 24, 2019
…t crashes a lot)

- In README.md, mention BWAPI 4.4.0 not 4.3.0.
- Delete Required_BWAPI_430.zip.
- Add Required_BWAPI_4.4.0.zip. Compared with Required_BWAPI_420.zip, the only changes are: udated TournamentModule.dll (its source code was already added in a separate src folder; it uses the updated ExampleTournamentModule.vcxproj file from BWAPI), official BWAPI.dll, official SNP_DirectIP.snp, and removed Multiple Instance Hack.bat, bspatch.exe, starcraft.bsdiff because they were removed from BWAPI several versions ago (since version 4.1.2). FTR, I compiled TournamentModule.dll using https://github.com/bwapi/bwapi/releases/download/v4.4.0/BWAPI.7z without modifications/rebuilding BWAPI except I had to build BWAPILIB.lib myself because the official BWAPI releases no longer provide it. FTR, all I did to build BWAPILIB.lib (you don't need Git repositories set up or Git installed) was double-click the Release_Binary\BWAPILIB\BWAPILIB.vcxproj file to open it in VS2017, then change the "Debug" drop-down to "Release", then right-click on the BWAPILIB project -> Project Only -> Build Only BWAPILIB. TournamentModule.dll (and the BWAPILIB.lib it used) were compiled using Microsoft Visual Studio Community 2017 version 15.9.8.
@chriscoxe
Copy link
Contributor Author

chriscoxe commented Mar 24, 2019

In the "ladder" branch of my fork, I've just committed and pushed all the changes to add support for BWAPI 4.4.0 and remove support for BWAPI 4.3.0.

In terms of testing performed, I have compiled my bot (ZZZKBot) linking with BWAPI 4.4.0 and tested that my bot runs as expected using ChaosLauncher (using the updated plugin BWL files from BWAPI 4.4.0) and using StarcraftAITournamentManager, both using the new TournamentModule.dll (and BWAPI 4.4.0 official BWAPI.dll, SNP_DirectIP.snp) on my Win7 SP1 VMs. I have run ten games against each of a few bots. There were no crashes, and I didn't notice any other problems. I tested that the TM client sets the character_name and game_type_extra settings in bwapi.ini correctly according to all the supported versions of BWAPI (i.e. they are set if and only if the BWAPI version is 4.2.0 or higher). I also tested it in my earlier changes for BWAPI 4.3.0 but I forgot to mention it then.

richard-kelly added a commit that referenced this issue Mar 27, 2019
Fix TM permissions (#32) and add BWAPI 4.4.0 support (#34)
@richard-kelly
Copy link
Collaborator

Fix from @chriscoxe merged into ladder branch.

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

No branches or pull requests

4 participants