-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpli10.sh
executable file
·56 lines (36 loc) · 1.13 KB
/
pli10.sh
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
#!/bin/bash
SRC_FILENAME=$1
WINEPREFIX="$(pwd)/wine32"
PROJECT_DIR="$(pwd)"
# init
function init() {
# init : deps
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install wine32
# init : wine
mkdir -p "$WINEPREFIX"
if [ ! -d "$WINEPREFIX/drive_c" ]; then
echo "Initializing 32-bit Wine prefix in $WINEPREFIX..."
WINEARCH=win32 WINEPREFIX="$WINEPREFIX" winecfg
fi
# init : wine : TDM-GCC-32
if [ ! -d "$WINEPREFIX/drive_c/TDM-GCC-32" ];
then
WINEPREFIX="$WINEPREFIX" wine tdm-gcc-10.3.0.exe
if [ ! -d "$WINEPREFIX/drive_c/TDM-GCC-32" ];
then
echo "Please install manually TDM-GCC under current wine installation : wine/drive_c/TDM-GCC-32";
fi
fi
# init : .inited file
touch .inited
}
if [ ! -e .inited ]; then
init
fi
#compile
iconv -f UTF-8 -t cp1253 ./${SRC_FILENAME}.utf8.eap > ./${SRC_FILENAME}.cp1253.eap
echo | WINEPREFIX="$WINEPREFIX" wine cmd /c "pli10.exe ${SRC_FILENAME}.cp1253.eap" | iconv -f cp1253 -t UTF-8
#run
WINEPREFIX="$WINEPREFIX" wine cmd /c "${SRC_FILENAME}.cp1253.eap.exe"