Skip to content

Commit

Permalink
make soundfont a required dependency and add an (optional) copy of it…
Browse files Browse the repository at this point in the history
… to the contrib data. Fixes #256
  • Loading branch information
timfel committed Sep 27, 2018
1 parent 0271328 commit cd62487
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
3 changes: 1 addition & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ Homepage: https://github.com/Wargus/wargus
Package: wargus
Architecture: any
Depends: ${stratagus:Depends}, ${misc:Depends}, ${shlibs:Depends}
Pre-Depends: cdparanoia, ffmpeg, xterm
Recommends: musescore-soundfont-gm
Pre-Depends: cdparanoia, ffmpeg, xterm, timgm6mb-soundfont | musescore-soundfont-gm
Provides: stratagus-data
Description: Warcraft II data game set for the Stratagus engine
Wargus can be used to play Warcraft II from Blizzard Entertainment.
Expand Down
21 changes: 16 additions & 5 deletions wargus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,22 @@
#define EXTRACTOR_TOOL "wartool"
#define EXTRACTOR_ARGS "-v -r"
#define CHECK_EXTRACTED_VERSION 1
#define CONTRIB_DIRECTORIES { "campaigns", "campaigns", \
"contrib", "graphics/ui", \
"maps", "maps", \
"shaders", "shaders", \
"scripts", "scripts", NULL }

#define __wargus_contrib__ "campaigns", "campaigns", \
"contrib", "graphics/ui", \
"maps", "maps", \
"shaders", "shaders", \
"scripts", "scripts", \
":optional:", \
"music/TimGM6mb.sf2", "music/TimGM6mb.sf2"

#ifdef WIN32
#define CONTRIB_DIRECTORIES { __wargus_contrib__, NULL }
#else
// for convenience during development, we also try to copy the system
// soundfont to the data directory on linux
#define CONTRIB_DIRECTORIES { __wargus_contrib__, "/usr/share/sounds/sf2/TimGM6mb.sf2", "music/TimGM6mb.sf2", NULL }
#endif
#define GAME_SHOULD_EXTRACT_AGAIN (tinyfd_messageBox("Extract more?", \
"Extract from an additional expansion CD?", \
"yesno", \
Expand Down

0 comments on commit cd62487

Please sign in to comment.