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

Fix TM permissions (#32) and add BWAPI 4.4.0 support (#34) #33

Merged
merged 13 commits into from
Mar 27, 2019

Conversation

chriscoxe
Copy link
Contributor

@chriscoxe chriscoxe commented Feb 27, 2019

Update 2019-03-24: the original plan was to add support for BWAPI 4.3.0 and that is how this pull request 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).

Changes are included for these issues:
#32
#34

I've included the TournamentModule.dll & JAR files that I compiled, but my bot (ZZZKBot) competed in AIIDE/CIG competitions in the past, so I realize you may want to compile them yourself to ensure they are trustworthy. You can check that the file checksums of other files like the official BWAPI.dll are correct.

If you use my TournamentModule.dll file for BWAPI 4.2.0 and/or 4.4.0, note that as I mentioned in the commit messages, for BWAPI 4.2.0 I used Microsoft Visual Studio Community 2017 version 15.7.4 (linking with an unpacked and unaltered https://github.com/bwapi/bwapi/releases/download/v4.2.0/BWAPI.VS.15.7.3.7z). For BWAPI 4.4.0 I used Microsoft Visual Studio Community 2017 version 15.9.8 (linking with an unpacked and unaltered https://github.com/bwapi/bwapi/releases/download/v4.4.0/BWAPI.7z although I had to build BWAPILIB.lib myself because the official releases no longer provide it). They are later versions of Visual Studio 2017 than was used to build the official BWAPI 4.2.0, so it may require client machines to have a more recent version of the Microsoft Visual C++ Redistributable for Visual Studio 2017 installed. E.g. can get the latest version from https://support.microsoft.com/en-au/help/2977003/the-latest-supported-visual-c-downloads. I haven't tested upgrading the redist though - it worked for me, but that may be because I already had a more recent version installed. The DLL for 4.1.2 should not need an updated redist.

I built the JARs using jdk-8u201-windows-i586.exe. client.jar needed to be updated. I also pushed the updated server.jar & results_parser.jar but I'm not sure whether I needed to, because I only changed some comments in the src/objects folder.

For BWAPI versions 4.2.0 and 4.1.2 only, fix an argument type in the onAction function, but allow (only) the permissions for LeaveGame, SetLatCom, SetCommandOptimizationLevel, even if overriding the command optimization level to a value of 0 (default is still 1 though so no worries)
Move source source files into a "Source" subfolder. Content hasn't changed.
Add missing official version of vcxproj files
Add some source files to the vcxproj file, and look up the BWAPI_DIR environment variable to find the location of BWAPI's include and lib dependencies.
…and 4.1.2

Fixed TournamentModule.dll. No other changes. Notes: compiled using the official downloads of BWAPI without modifications/rebuilding BWAPI. For BWAPI 4.1.2 it was compiled using Microsoft Visual Studio Express 2013 for Windows Desktop version 12.0.31101.00 Update 4. For BWAPI 4.2.0 it was compiled using Microsoft Visual Studio Community 2017 version 15.7.4 (linking with an unpacked https://github.com/bwapi/bwapi/releases/download/v4.2.0/BWAPI.VS.15.7.3.7z).
Copy official ExampleTournamentModule.vcxproj from BWAPI 4.3.0
Merge modifications from BWAPI_420's ExampleTournamentModule.vcproj
Copy the whole Source folder from BWAPI_420 (I didn't modify anything).
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 chriscoxe changed the title #32 Bugfixes to Tournament Module permissions for BWAPI versions 4.2.0 & 4.1.2 #32 and #34 Mar 3, 2019
@chriscoxe chriscoxe changed the title #32 and #34 Fix TM permissions (#32) and add BWAPI 4.3.0 support (#34) Mar 3, 2019
@davechurchill
Copy link
Owner

Been kind of busy, just tagging @richard-kelly so he can have a look at this eventually

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.
…t crashes a lot)

Move TM src for BWAPI_430 to BWAPI_440 (content not changed)
…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
…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 chriscoxe changed the title Fix TM permissions (#32) and add BWAPI 4.3.0 support (#34) Fix TM permissions (#32) and add BWAPI 4.4.0 support (#34) Mar 24, 2019
@chriscoxe
Copy link
Contributor Author

Update: I've added support for BWAPI 4.4.0 and removed support for BWAPI 4.3.0. Should be good to go. Note: BASIL has supported BWAPI 4.4.0 for 10 days now (although I don't know whether any bots are using it) and SSCAIT doesn't support BWAPI 4.4.0 yet.

@richard-kelly richard-kelly merged commit ef29fa5 into davechurchill:ladder Mar 27, 2019
@richard-kelly
Copy link
Collaborator

I tested the new tournament modules and a 4.40 bot in our tournament setup. Thanks @chriscoxe !

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.

3 participants