Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contrib/extractor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ endif(UNIX)
install(TARGETS ${EXECUTABLE_NAME} DESTINATION ${BIN_DIR}/Extractors)
if(WIN32 AND MSVC)
install(FILES $<TARGET_PDB_FILE:${EXECUTABLE_NAME}> DESTINATION ${BIN_DIR}/Extractors OPTIONAL)
add_custom_command(TARGET ${EXECUTABLE_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/extractorWindows.bat $<TARGET_FILE_DIR:${EXECUTABLE_NAME}>)
endif()
99 changes: 99 additions & 0 deletions contrib/extractor/extractorWindows.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
@echo off
:: Vanilla MaNGOS (vmangos) maps, vmaps, mmaps extractor
:: ---------------------------------------------
echo ...............................................
echo Vanilla MaNGOS (vmangos) maps, vmaps, mmaps extractor
echo ...............................................
echo PRESS 1, 2, 3 OR 4 to select your task, or 5 to EXIT.
echo ...............................................
echo.
echo WARNING! when extracting the vmaps extractor will
echo output the text below, it's intended and not an error:
echo ..........................................
echo Extracting World\Wmo\Band\Final_Stage.wmo
echo No such file.
echo Couldn't open RootWmo!!!
echo Done!
echo ..........................................
echo.
echo Press 1, 2, 3 or 4 to start extracting or 5 to exit.
echo 1 - Extract base files ^(NEEDED^) and cameras.
echo 2 - Extract vmaps ^(needs maps to be extracted before you run this^) ^(OPTIONAL, highly recommended^)
echo 3 - Extract mmaps ^(needs vmaps to be extracted before you run this, may take hours^) ^(OPTIONAL, highly recommended^)
echo 4 - Extract all ^(may take hours^)
echo 5 - EXIT
echo.
set /p choice="Type 1, 2, 3, 4 or 5 then press ENTER: "

if "%choice%"=="1" goto extract_base
if "%choice%"=="2" goto extract_vmaps
if "%choice%"=="3" goto extract_mmaps
if "%choice%"=="4" goto extract_all
if "%choice%"=="5" goto end
echo Invalid choice. Exiting.
goto end

:extract_base
if exist MapExtractor.exe (
echo Extracting maps and cameras...
MapExtractor.exe
) else (
echo MapExtractor.exe not found!
)
goto end

:extract_vmaps
if exist VMapExtractor.exe (
echo Extracting vmaps...
VMapExtractor.exe
) else (
echo VMapExtractor.exe not found!
)
if exist VMapAssembler.exe (
echo Assembling vmaps...
VMapAssembler.exe
) else (
echo VMapAssembler.exe not found!
)
goto end

:extract_mmaps
if exist MoveMapGenerator.exe (
echo Extracting mmaps...
MoveMapGenerator.exe
) else (
echo MoveMapGenerator.exe not found!
)
goto end

:extract_all
if exist MapExtractor.exe (
echo Extracting maps and cameras...
MapExtractor.exe
) else (
echo MapExtractor.exe not found!
)
if exist VMapExtractor.exe (
echo Extracting vmaps...
VMapExtractor.exe
) else (
echo VMapExtractor.exe not found!
)
if exist VMapAssembler.exe (
echo Assembling vmaps...
VMapAssembler.exe
) else (
echo VMapAssembler.exe not found!
)
if exist MoveMapGenerator.exe (
echo Extracting mmaps...
MoveMapGenerator.exe
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to pass --configInputPath and --offMeshInput here. E.g.:

MoveMapGenerator.exe --configInputPath "config.json" --offMeshInput "offmesh.txt"

(the files should be in ${BIN_DIR}/Extractors by default iirc, so the same directory as the extractor executables)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add an input to ask the files within the same directoy otherwise by default mmaps generator already uses them by default

image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, right, I forgot because I install thise files to custom locations. 😄

Don't think it's necessary to prompt the user then.

) else (
echo MoveMapGenerator.exe not found!
)
goto end

:end
echo.
echo Extraction process complete. Press any key to exit.
pause