Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add optional support for building Dark Ages mod
  • Loading branch information
Ramblurr committed Aug 6, 2020
1 parent 22c19c2 commit 3d152d1
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .config
Expand Up @@ -147,3 +147,6 @@ CT_LEGENDS_VERSION="1.19.0"
CT_ANNOUNCEMENT=y
CT_ANNOUNCEMENT_VERSION="v1.3.0"
# CT_APPIMAGE is not set
CT_DARK=n
CT_DA_VERSION="4_47_04_v39"
CT_DA_DROPBOX_URL="https://www.dropbox.com/s/zvc6f34y6jiy6j9/DarkAges_4_47_04_v39.zip"
1 change: 1 addition & 0 deletions config/config.in
Expand Up @@ -16,3 +16,4 @@ source "config/soundsense.in"
source "config/legends.in"
source "config/announcement.in"
source "config/appimage.in"
source "config/dark.in"
20 changes: 20 additions & 0 deletions config/dark.in
@@ -0,0 +1,20 @@
# DARK options

config DARK
bool
prompt "Enable Dark Ages"
default n
help
Select this to enable the Dark Ages mod

config DARK_VERSION
prompt "Dark Ages version"
string
default "4_47_04_v39"

config DARK_DROPBOX_URL
prompt "Dark Ages Download URL"
string
default "https://www.dropbox.com/s/zvc6f34y6jiy6j9/DarkAges_4_47_04_v39.zip"
help
The full URL to download the Dark Ages zip file
47 changes: 47 additions & 0 deletions scripts/build/dark.sh
@@ -0,0 +1,47 @@
# Install Dark Ages IV: War & Mythos a mod for Dwarf Fortress

get_dark_description() {
echo "DarkAges v${CT_DARK_VERSION}"
}
get_dark_credits() {
echo "GM-X"
}
get_dark_url() {
echo "http://www.bay12forums.com/smf/index.php?topic=143540.0"
}
get_dark_license() {
echo -n
}

# Download DF
do_dark_get() {
CT_GetFile "DarkAges_${CT_DARK_VERSION}" ".zip" \
${CT_DARK_DROPBOX_URL}
}

get_dark_dir() {
echo "${CT_SRC_DIR}/DarkAges_${CT_DARK_VERSION}/"
}


# Extract DA
do_dark_extract() {
# extract in src dir
da_dir="$(get_dark_dir)"
mkdir -p "$da_dir"
CT_Pushd $da_dir
CT_Extract nochdir "DarkAges_${CT_DARK_VERSION}"
CT_DoExecLog ALL find . -iname "*.exe" -or -iname "*.dll" -delete
CT_Popd
}

# Copy DA mod files over DF
do_dark_build() {
da_dir="$(get_dark_dir)"
df_dir=${CT_SRC_DIR}/lnp-${CT_LNP_VERSION}/df_${CT_DF_VERSION}
if [ -d "$da_dir" ]; then
CT_DoExecLog ALL rsync -qa "${da_dir}"/raw "${da_dir}"/data "${df_dir}"
else
CT_Abort "Dark Ages directory $da_dir not found!"
fi
}
1 change: 1 addition & 0 deletions steps.mk
Expand Up @@ -33,6 +33,7 @@ CT_STEPS := lnp \
legends \
announcement\
appimage \
dark \
finish \

# Keep an empty line above this comment, so the last
Expand Down

0 comments on commit 3d152d1

Please sign in to comment.