Lines 6-12
Link Here
|
6 |
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-" |
6 |
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-" |
7 |
# MOD_BINS - Name of the binary to run |
7 |
# MOD_BINS - Name of the binary to run |
8 |
# MOD_DESC - Description for the mod |
8 |
# MOD_DESC - Description for the mod |
9 |
# MOD_DIR - Subdirectory name for the mod, if applicable |
9 |
# MOD_DIR - Subdirectory name for the mod, if applicable |
|
|
10 |
# MOD_MAP - Name of map to load at start, if applicable |
10 |
# MOD_ICON - Custom icon for the mod, instead of the default |
11 |
# MOD_ICON - Custom icon for the mod, instead of the default |
11 |
# MOD_NAME - Creates a command-line wrapper and desktop icon for the mod |
12 |
# MOD_NAME - Creates a command-line wrapper and desktop icon for the mod |
12 |
# MOD_TBZ2 - File to extract within the Makeself archive |
13 |
# MOD_TBZ2 - File to extract within the Makeself archive |
Lines 17-22
Link Here
|
17 |
|
18 |
|
18 |
[[ -z ${GAME} ]] && GAME=${PN%%-*} |
19 |
[[ -z ${GAME} ]] && GAME=${PN%%-*} |
19 |
|
20 |
|
|
|
21 |
SELECT_MAP="" |
22 |
[[ -n ${MOD_MAP} ]] && SELECT_MAP=" +map " |
23 |
|
20 |
# Set our default title, icon, and cli options |
24 |
# Set our default title, icon, and cli options |
21 |
case "${GAME}" in |
25 |
case "${GAME}" in |
22 |
"doom3") |
26 |
"doom3") |
Lines 58-63
Link Here
|
58 |
GAME_EXE="ut2003" |
62 |
GAME_EXE="ut2003" |
59 |
DED_EXE="ucc" |
63 |
DED_EXE="ucc" |
60 |
DED_OPTIONS="" |
64 |
DED_OPTIONS="" |
|
|
65 |
SELECT_MAP="" |
61 |
;; |
66 |
;; |
62 |
"ut2004") |
67 |
"ut2004") |
63 |
GAME_TITLE="UT2004" |
68 |
GAME_TITLE="UT2004" |
Lines 66-71
Link Here
|
66 |
GAME_EXE="ut2004" |
71 |
GAME_EXE="ut2004" |
67 |
DED_EXE="ucc" |
72 |
DED_EXE="ucc" |
68 |
DED_OPTIONS="" |
73 |
DED_OPTIONS="" |
|
|
74 |
SELECT_MAP="" |
69 |
;; |
75 |
;; |
70 |
*) |
76 |
*) |
71 |
eerror "This game is either not supported or you must set the GAME" |
77 |
eerror "This game is either not supported or you must set the GAME" |
Lines 229-235
Link Here
|
229 |
if [[ -n "${MOD_DIR}" ]] |
235 |
if [[ -n "${MOD_DIR}" ]] |
230 |
then |
236 |
then |
231 |
games_make_wrapper "${GAME_EXE}-${MOD_BINS}" \ |
237 |
games_make_wrapper "${GAME_EXE}-${MOD_BINS}" \ |
232 |
"${GAME_EXE} ${SELECT_MOD}${MOD_DIR}" "${dir}" "${dir}" |
238 |
"${GAME_EXE} ${SELECT_MOD}${MOD_DIR}${SELECT_MAP}${MOD_MAP}" "${dir}" "${dir}" |
233 |
make_desktop_entry "${GAME_EXE}-${MOD_BINS}" \ |
239 |
make_desktop_entry "${GAME_EXE}-${MOD_BINS}" \ |
234 |
"${GAME_TITLE} - ${MOD_NAME}" "${MOD_ICON}" |
240 |
"${GAME_TITLE} - ${MOD_NAME}" "${MOD_ICON}" |
235 |
elif [[ -e "${S}"/bin/"${binary}" ]] |
241 |
elif [[ -e "${S}"/bin/"${binary}" ]] |
Lines 275-281
Link Here
|
275 |
elif [[ -n "${MOD_DIR}" ]] |
281 |
elif [[ -n "${MOD_DIR}" ]] |
276 |
then |
282 |
then |
277 |
games_make_wrapper "${GAME_EXE}-${MOD_DIR}" \ |
283 |
games_make_wrapper "${GAME_EXE}-${MOD_DIR}" \ |
278 |
"${GAME_EXE} ${SELECT_MOD}${MOD_DIR}" "${dir}" "${dir}" |
284 |
"${GAME_EXE} ${SELECT_MOD}${MOD_DIR}${SELECT_MAP}${MOD_MAP}" "${dir}" "${dir}" |
279 |
make_desktop_entry "${GAME_EXE}-${MOD_DIR}" \ |
285 |
make_desktop_entry "${GAME_EXE}-${MOD_DIR}" \ |
280 |
"${GAME_TITLE} - ${MOD_NAME}" "${MOD_ICON}" |
286 |
"${GAME_TITLE} - ${MOD_NAME}" "${MOD_ICON}" |
281 |
# Since only quake3 has both a binary and a source-based install, |
287 |
# Since only quake3 has both a binary and a source-based install, |
Lines 285-291
Link Here
|
285 |
if has_version games-fps/quake3-bin |
291 |
if has_version games-fps/quake3-bin |
286 |
then |
292 |
then |
287 |
games_make_wrapper "${GAME_EXE}-bin-${MOD_DIR}" \ |
293 |
games_make_wrapper "${GAME_EXE}-bin-${MOD_DIR}" \ |
288 |
"${GAME_EXE}-bin ${SELECT_MOD}${MOD_DIR}" \ |
294 |
"${GAME_EXE}-bin ${SELECT_MOD}${MOD_DIR}${SELECT_MAP}${MOD_MAP}" \ |
289 |
"${dir}" "${dir}" |
295 |
"${dir}" "${dir}" |
290 |
fi |
296 |
fi |
291 |
make_desktop_entry "${GAME_EXE}-bin-${MOD_DIR}" \ |
297 |
make_desktop_entry "${GAME_EXE}-bin-${MOD_DIR}" \ |