First you need a C++ compiler (the rest of the instructions assume GCC (Minimalistic GCC for Windows), remember to check the option for the C++ compiler. You need to include the directory to the GCC executables to your PATH environment variable. For Windows, assuming installation at C:\MinGW, the directory is C:\MinGW\bin. So if the existing contents of the PATH environment variable is ABC123, then the new PATH environment variable should read C:\MinGW\bin;ABC123).
Unpack the scmc files anywhere (dirty hack for Windows; I stole SFmpq.dll from MapSketch because compiling it gave me a runtime error :x). Read the header files (files that end in .h) for the C prototypes/enums.
Use a batch file, or use Notepad++ with the NppExec plugin (similar to MacroTriggers' instructions), using this script:
Code
cd "$(CURRENT_DIRECTORY)"
NPP_SAVE
g++ -I. -L. -lSFmpq -lscmc "$(FILE_NAME)" -o scmc.exe
./scmc.exe $(NAME_PART)pre.scx $(NAME_PART).scx
xcopy /y $(NAME_PART).scx "C:\Program Files (x86)\StarCraft\Maps"
NPP_SAVE
g++ -I. -L. -lSFmpq -lscmc "$(FILE_NAME)" -o scmc.exe
./scmc.exe $(NAME_PART)pre.scx $(NAME_PART).scx
xcopy /y $(NAME_PART).scx "C:\Program Files (x86)\StarCraft\Maps"
The last command doesn't work as it is from lack of privileges; installing StarCraft in an alternate directory would remedy this problem.
I honestly don't have the motivation to explain it more formally, but I'll explain details on a question/answer basis. There's example files tankdefense.cpp and tankdefensepre.scx. Open it with Notepad++ and run the script to get the result, tankdefense.scx.
Post has been edited 5 time(s), last time on Jul 4 2012, 12:48 am by yoonkwun.
None.