azerothcore / azerothcore-wotlk

Complete Open Source and Modular solution for MMO
http://www.azerothcore.org
GNU Affero General Public License v3.0
6.52k stars 2.61k forks source link

mmaps_generator.exe Requires mmaps folder to be created before being run #2538

Closed FiftyTifty closed 2 years ago

FiftyTifty commented 4 years ago

##### SMALL DESCRIPTION: When running mmaps_generator.exe, without having created an empty mmaps folder in the client's data directory, the following error is thrown: 'mmaps' directory does not exist

##### EXPECTED BLIZZLIKE BEHAVIOUR: If there is no mmaps folder present, the program should create one, just like how the other extraction tools do.

##### CURRENT BEHAVIOUR: According to the instructions here: http://www.azerothcore.org/wiki/Extract-Client-Data

You need only copy over the executables and ace.dll file to the client folder, and then just run the .exe files and the one .bat file. However, mmaps_generator.exe doesn't automatically create a mmaps folder like the other ones do, so it fails to run.

Also, you are required to copy over libmysql.dll to the client folder as well, otherwise the following error is thrown: The code execution cannot proceed because libmysql.dll was not found. Reinstalling the program may fix this problem. Screenshot: https://i.imgur.com/NFnl702.png

##### STEPS TO REPRODUCE THE PROBLEM:

  1. (Running Windows 10 LTSC 2019 x64)

  2. Follow the instructions located at http://www.azerothcore.org/wiki/Installation

  3. Upon reaching section 5, opt to extract the files manually, following these instructions: http://www.azerothcore.org/wiki/Extract-Client-Data

  4. Upon copying the stated files to the client folder, the tools will run successfully except for mmaps_generator.exe, as it requires libmysql.dll to be in the same folder.

  5. After copying over libmysql.dll, another error will be thrown, saying that it cannot find the mmaps folder.

  6. Right-click -> New folder -> Change it's name to mmaps

  7. Now when you run mmaps_generator.exe, the program will run and output the necessary files.

##### EXTRA NOTES: This was not necessary to be done, when setting up TrinityCore on Ubuntu 19.4. The folder was created automatically, and libmysql.dll was automatically found.

##### BRANCH(ES): master

##### AC HASH/COMMIT:

commit 435190979eee00e6e227a387021daeb4a36a81ab (HEAD -> master, origin/master, origin/HEAD)
Author: Viste <k.sklyarov@sprinthost.ru>
Date:   Sat Dec 28 23:07:17 2019 +0300

    fix(Core/Tools): fix build (#2529)

commit 067d9e791f87fc033fb4e741a44d62a6f075a565
Author: Shard <30301841+Shard-MW@users.noreply.github.com>
Date:   Sat Dec 28 09:40:13 2019 +0100

    fix(Core/Battlegrounds) Rewrite RandomBG and enabling bg/arenas weights (#2516)

commit 5198b2614ee9bee0efcc1ea100443b8cfa9fa8ad
Author: IntelligentQuantum <IntelligentQuantum@ProtonMail.Com>
Date:   Fri Dec 27 02:31:57 2019 +0330

    chore(Core/Soap): Renamed TCSoap to ACSoap (#2509)

commit 0a9f230f834658f74c32d2d1abf069636d423d22
Author: AzerothCoreBot <azerothcorebot@gmail.com>
Date:   Thu Dec 26 08:12:06 2019 +0000
:

##### OPERATING SYSTEM:

Windows 10 LTSC 2019 x64 (Windows build 1809)

##### MODULES: None, this is a completely vanilla, step-by-step fresh install performed by following the instructions on AC's wiki

##### OTHER CUSTOMIZATIONS: None, this is a completely vanilla, step-by-step fresh install performed by following the instructions on AC's wiki

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/86406421-mmaps_generator-exe-requires-mmaps-folder-to-be-created-before-being-run?utm_campaign=plugin&utm_content=tracker%2F40032087&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F40032087&utm_medium=issues&utm_source=github).
Shard-MW commented 4 years ago

If I remember well, mmaps folder is created when vmaps extractor+generator is ran. mmaps are extracted from vmaps

You'll need to run them in this order :

FiftyTifty commented 4 years ago

The mmaps folder isn't created by the previous tool. I followed the instructions, and everything worked fine, except I had to create that mmaps folder manually, otherwise mmaps_generator would throw that error and not continue.

PkllonG commented 4 years ago

mapextractor.cmd

@echo off
cls

extract_maps
echo.
echo Extracting DBCs and Maps...
mapextractor.exe

extract_vmaps
echo.
echo Extracting VMAPs
vmap4extractor.exe

build_vmaps
echo.
echo Building VMAPs
md vmaps
vmap4assembler.exe Buildings vmaps

echo.
echo Building MMAPs
md mmaps
mmaps_generator.exe

echo.
echo Press any key to exit
pause NUL
FiftyTifty commented 4 years ago

That should be added to the repository, and the instructions here updated: http://www.azerothcore.org/wiki/Extract-Client-Data

Much better to have everything done in a oner.

BarbzYHOOL commented 4 years ago

the extractor must create the directory, iagree

Viste commented 4 years ago

for POSIX we can add something like std::filesystem::create_directory(dirFiles); instead of generating error https://github.com/azerothcore/azerothcore-wotlk/blob/e22d78ecd6997bc11f8620b759364f119dac431a/src/tools/mmaps_generator/PathGenerator.cpp#L33 and then do some basic exception handle with https://en.cppreference.com/w/cpp/filesystem/exists and etc its just a guessing ) i don't try work with filesystem lib because its new-one from C++17

dunjeon commented 4 years ago

This is what I wrote for my repack users (windows .bat file):

======= @ECHO OFF CLS

ECHO.......................................................... ECHO AzerothCore-wotlk Map Maker ECHO. ECHO This may take a few hours to complete. Please be patient. ECHO.......................................................... PAUSE start /b /w mapextractor.exe if not exist "vmaps" mkdir vmaps start /b /w vmap4extractor.exe start /b /w vmap4assembler.exe Buildings vmaps rmdir Buildings /s /q if not exist "mmaps" mkdir mmaps start /b /w mmaps_generator.exe ECHO.......................................................... ECHO Map extraction\generation completed! ECHO.......................................................... pause