-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstall.sh
52 lines (46 loc) · 1.57 KB
/
install.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
#!/bin/bash
echo
echo "Welcome to the pyPhotoDNA installer."
echo "The script will now setup a pyPhotoDNA environment for you. Please be patient."
echo
if [ "$(uname)" == "Darwin" ]; then
echo "Download link for native macOS version currently unavailable."
else
if ! [ -x "$(command -v curl)" ]; then
echo "Dependency missing. Please install 'curl' and re-run the installer."
exit 1
fi
if ! [ -x "$(command -v wine64)" ]; then
echo "Dependency missing. Please install 'wine64' and re-run the installer."
exit 1
fi
if ! [ -x "$(command -v cabextract)" ]; then
echo "Dependency missing. Please install 'cabextract' and re-run the installer."
exit 1
fi
if ! [ -x "$(command -v isoinfo)" ]; then
echo "Dependency missing. Please install 'genisoimage' and re-run the installer."
exit 1
fi
echo "Downloading FTK (3.3GB, might take a while)..."
curl -LO https://d1kpmuwb7gvu1i.cloudfront.net/AD_FTK_7.0.0.iso
echo
echo "Extracting PhotoDNAx64.dll."
isoinfo -i AD_FTK_7.0.0.iso -x /FTK/FTK/X64/_8A89F09/DATA1.CAB > Data1.cab
rm AD_FTK_7.0.0.iso
cabextract -d tmp -q Data1.cab
rm Data1.cab
mv tmp/photodnax64.1.72.dll PhotoDNAx64.dll
rm -rf tmp
echo
echo "Downloading minimal Python for Wine..."
curl -LO https://github.com/jankais3r/pyPhotoDNA/releases/download/wine_python_39/wine_python_39.tar.gz
tar -xf wine_python_39.tar.gz
rm wine_python_39.tar.gz
echo
echo
echo "Installation complete!"
echo "_____________________________"
echo
echo "To generate a PhotoDNA hash, run: WINEDEBUG=-all wine64 python-3.9.12-embed-amd64/python.exe generateHashes.py"
fi