diff --git a/tools/synch/Makefile b/tools/synch/Makefile new file mode 100644 index 000000000..e1b1b5fc7 --- /dev/null +++ b/tools/synch/Makefile @@ -0,0 +1,38 @@ +# this is a GNU Makefile. It is not expected to work with anything other +# than gmake +FILES = audio.cpp audioSDL.cpp synch.cpp synchronizer.cpp +TARGET = synch + +# For MacOS X: SDL, Ogg and Vorbis are provided as frameworks, +# which require different flags than unix-style shared libs +ifeq ($(shell uname), Darwin) + CFLAGS = -D__MACOSX__ + LDFLAGS = -framework Ogg -framework Vorbis -framework SDL \ + -framework Cocoa +else + CFLAGS = $(shell sdl-config --cflags) + LDFLAGS = -lvorbisfile -lvorbis $(shell sdl-config --libs) +endif + +CFLAGS += -DUSE_SDLAUDIO=1 $(shell fltk-config --cxxflags) +LDFLAGS += $(shell fltk-config --ldflags) + +# MacOS X apps need to have a resource fork applied, else the window +# manager will refuse to manage them (which makes the app very +# difficult to use) This rule should be ignored by all non-Mac +# platforms, and it assumes that the Apple Developer Tools and FLTK +# are installed in their default locations. Edit to taste if +# appropriate. +ifeq ($(shell uname), Darwin) +REZ = /Developer/Tools/Rez +RFORK = /usr/local/include/FL/mac.r +$(TARGET)/rsrc: $(TARGET) + $(REZ) -t APPL $(RFORK) -o $(TARGET) +endif +# END silly MacOS X goo + +$(TARGET): $(FILES) + $(CC) $(CFLAGS) $(LDFLAGS) $(FILES) -o $@ + +clean: + $(RM) $(TARGET) diff --git a/tools/synch/README b/tools/synch/README index 450bebcd1..846c15f9d 100644 --- a/tools/synch/README +++ b/tools/synch/README @@ -1,22 +1,25 @@ Ur-Quan Masters Voice-over synchronization tool -For Windows: - Unpack into any directory. - From a DOS prompt, execute Synchronizer.exx from within the UQM content - directory it will write out files into content/timestamp/race - When you are done, archive them, and send to: - tcpaiqgvnmbf28f001@sneakemail.com - -To use, select the files you want to play, and hit start. -hitting 'n' is the same as 'Next Screen', and 'p' will pause/unpause. - -Hitting 'space' or 'enter' may have adverse effects, so don't - -For Linux: - The code can be compiled with: - gcc synch.cpp synchronizer.cpp audioSDL.cpp audio.cpp -o synch -DUSE_SDLAUDIO=1 -lfltk -lvorbisfile -lvorbis `sdl-config --cflags --libs` +To Build: + The code can be compiled with the provided Makefile, Windows + users can build it by installing Cygwin or MinGW and using + the build tools provided. (or by rolling their own Visual Studio + project file, if they have MSVC++, which I don't) You'll need fltk (1.1.x), oggvorbis, and SDL development libraries -installed. + installed. -If you have any questions or issues, please send them to the e-mail above +To Use: + Place the executable in the UQM content directory and run it. + Select the files you want to play, and hit start. + Hitting 'n' is the same as 'Next Screen', and 'p' will pause/unpause. + + Hitting 'space' or 'enter' may have adverse effects, so don't ;) + + The program will write out intermediate files into + content/timestamp/[race] + + Once finished, use the merge_ts_files.pl script (requires + Perl) to convert the intermediate files into .ts files that + the game uses, and submit the new files to the project via + Bugzilla (http://uqm.stack.nl/cgi-bin/bugs/index.cgi) diff --git a/tools/synch/audioSDL.cpp b/tools/synch/audioSDL.cpp index 668b56b25..39f94218b 100644 --- a/tools/synch/audioSDL.cpp +++ b/tools/synch/audioSDL.cpp @@ -23,7 +23,11 @@ #if (USE_SDLAUDIO == 1) char AUDIO_TYPE[] = "SDL"; -#include +#ifdef __APPLE__ +# include +#else +# include +#endif #include #include #include