summarylogtreecommitdiffstats
path: root/lnp
blob: a429ef2048b905c09dec9235840c22352c3395ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
#export SDL_DISABLE_LOCK_KEYS=1 # Work around for bug in Debian/Ubuntu SDL patch.
#export SDL_VIDEO_CENTERED=1    # Centre the screen.  Messes up resizing.

pkgname=dwarffortress-lnp-git #set by PKGBUILD

if [[ ! -d "$HOME/.$pkgname" ]]; then
    mkdir -p "$HOME/.$pkgname/df_linux/data"
    mkdir -p "$HOME/.$pkgname/LNP"
    #ln -s "/opt/$pkgname/python-lnp" "$HOME/.$pkgname/python-lnp"
    cp -rn "/opt/$pkgname/python-lnp" "$HOME/.$pkgname/"

    ln -s  "$HOME/.$pkgname/python-lnp/launch.py" "$HOME/.$pkgname/PyLNP"
    cp -n /opt/"$pkgname"/startlnp "$HOME/.$pkgname/startlnp"

    cp -rn /opt/"$pkgname"/df_linux/data/init "$HOME/.$pkgname/df_linux/data/init"
    cp -rn /opt/"$pkgname"/df_linux/raw "$HOME/.$pkgname/df_linux/raw"
    cp -rn /opt/"$pkgname"/df_linux/dfhack-config \
      "$HOME/.$pkgname/df_linux/dfhack-config"

    for link in libs stonesense ; do
        ln -s /opt/"$pkgname"/df_linux/$link\
          "$HOME/.$pkgname/df_linux/$link"
    done

    mkdir -p "$HOME/.$pkgname/df_linux/hack"
    for link in libdfhack.so liblua.so libprotobuf-lite.so libruby.so \
      libdfhack-client.so; do
        ln -s /opt/"$pkgname"/df_linux/hack/$link\
          "$HOME/.$pkgname/df_linux/hack/$link"
    done

    for link in binpatch dfhack-run libs lua plugins raw ruby symbols.xml ; do
        ln -s /opt/"$pkgname"/df_linux/hack/$link \
          "$HOME/.$pkgname/df_linux/hack/$link"
    done

    cp -rn /opt/"$pkgname"/df_linux/hack/scripts \
      "$HOME/.$pkgname/df_linux/hack/scripts"

    cp -rn /opt/"$pkgname"/LNP "$HOME/.$pkgname/"

fi


for copyfile in df dfhack dfhack-run dfhack.init distro_fixes.sh \
  ; do
    cp -n /opt/"$pkgname"/df_linux/$copyfile \
      "$HOME/.$pkgname/df_linux/$copyfile"
done

for link in announcement art dipscript help index initial_movies movies \
  shader.fs shader.vs sound speech ; do
    cp -rn /opt/"$pkgname"/df_linux/data/$link "$HOME/.$pkgname/df_linux/data/$link"
done

cd "$HOME/.$pkgname"
exec ./startlnp "$@"