Created
December 24, 2017 19:55
-
-
Save Kedrigern/77168d0cd96210d3164edc94b1d068e4 to your computer and use it in GitHub Desktop.
Vcmi install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Clone source code and compile vcmi | |
# 1. Install dependency at Fedory | |
# 2. Clone repository $repo | |
# 3. Compile given tag | |
# 4. Prepare data from gog exe file | |
tag="0.99" | |
repo="https://github.com/vcmi/vcmi.git" | |
path="~/Donwloads/hommam3.exe" | |
fedora_dep() { | |
sudo dnf install cmake gcc-c++ SDL2-devel SDL2_image-devel SDL2_ttf-devel SDL2_mixer-devel boost boost-devel boost-filesystem boost-system boost-thread boost-program-options boost-locale zlib-devel ffmpeg-devel ffmpeg-libs qt5-qtbase-devel | |
} | |
compile_vcmi() { | |
git clone -b develop --depth 20 --recursive "$repo" | |
git checkout "$tag" | |
mkdir build && cd build | |
cmake ../vcmi | |
cmake --build . -- -j2 | |
cd .. | |
} | |
prepare_data() { | |
echo "Download gog data (exe file)"; | |
if [ -f "$path" ]; then | |
# vcmibuilder is in original repository | |
./vcmi/vcmibuilder --gog "$path" | |
else | |
echo "$path is not HOMAM3 executable" | |
fi; | |
} | |
if [ -d vcmi ]; then | |
rm -rf vcmi | |
fi; | |
mkdir vcmi && cd vcmi | |
fedora_dep; | |
compile_vcmi; | |
prepare_data; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment