blob: 0e8a83a91a9cfa6cfcb7e992ffd6bfbdc726a588 (
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
# Maintainer: taotieren <admin@taotieren.com>
pkgname=bingdianwenku-wine
pkgver=v3.2.16.0125
pkgrel=1
pkgdesc="Wine 冰点文库下载器是一款免费的文库下载器软件,用户可以通过使用冰点文库下载器下载各种各样的文库文档。(原官网迫于百度压力已关闭,使用的是第三方的地址)"
arch=('any')
url="http://www.bingdian001.com/"
license=('unknow')
provides=(${pkgname})
conflicts=(${pkgname} ${pkgname%-wine})
replaces=(${pkgname})
depends=('wine' 'wqy-zenhei')
optdepends=("wine-mono-gecko-version-fix: Fix the version numbers of wine-mono and wine-gecko files to solve the dialog box that pops up when starting wine.")
makedepends=()
backup=()
options=('!strip')
install=${pkgname}.install
source=("${pkgname%-wine}.zip::https://dl10.95862788.com/soft/bingdianwenku.zip"
"${pkgname}.install")
sha256sums=('ba13dd597f4701c240ca1793257d2a9b2ff24c118b65619cb4b8fd7078c40584'
'792ad87a7c283299b007d93ec06f596c81a6aadae839c87e29fa94eff38308c8')
package() {
_path="opt/bingdianwenku"
install -dm0755 "${pkgdir}/${_path}/${pkgname%-wine}"
cp -r "${srcdir}/冰点下载器_3.2.16.0125_Single.exe" "${pkgdir}/${_path}/${pkgname%-wine}.exe"
find "${pkgdir}/${_path}" -type f -exec chmod 644 "{}" \;
find "${pkgdir}/${_path}" -type d -exec chmod 755 "{}" \;
_ftname="wqy-zenhei.ttc"
install -Dm0644 /dev/stdin "${pkgdir}/${_path}/regpatch.reg" << EOF
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Lucida Sans Unicode"="${_ftname}"
"Microsoft Sans Serif"="${_ftname}"
"MS Sans Serif"="${_ftname}"
"Tahoma"="${_ftname}"
"Tahoma Bold"="${_ftname}"
"SimSun"="${_ftname}"
"Arial"="${_ftname}"
"Arial Black"="${_ftname}"
"Lucida Sans Unicode"=str(7):"${_ftname}"
"Microsoft Sans Serif"=str(7):"${_ftname}"
"Tahoma"=str(7):"${_ftname}"
"Lucida Sans Unicode"="${_ftname}"
"Microsoft Sans Serif"="${_ftname}"
"Microsoft YaHei"="${_ftname}"
"微软雅黑"="${_ftname}"
"宋体"="${_ftname}"
"新細明體"="${_ftname}"
"DFKai-SB"="${_ftname}"
"FangSong"="${_ftname}"
"KaiTi"="${_ftname}"
"Microsoft JhengHei"="${_ftname}"
"Microsoft YaHei"="${_ftname}"
"MingLiU"="${_ftname}"
"NSimSun"="${_ftname}"
"PMingLiU"="${_ftname}"
"SimHei"="${_ftname}"
"SimKai"="${_ftname}"
"SimSun"="${_ftname}"
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"ClientSideAntiAliasWithCore"="N"
"ClientSideAntiAliasWithRender"="N"
"ClientSideWithRender"="N"
[HKEY_CURRENT_USER\Control Panel\Desktop]
"FontSmoothing"="2"
"FontSmoothingType"=dword:00000002
"FontSmoothingGamma"=dword:00000578
"FontSmoothingOrientation"=dword:00000001
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion]
"RegisteredOrganization"="H7-TOOL"
"RegisteredOwner"="H7-TOOL"
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus]
"Start"=dword:00000002
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winehid]
"Start"=dword:00000002
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\wineusb]
"Start"=dword:00000002
EOF
install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/${pkgname%-wine}" << EOF
#!/bin/bash
export WINEARCH=win32 WINEPREFIX="$HOME/.${pkgname%-wine}/wine"
if [ ! -d "$HOME"/.${pkgname%-wine} ] ; then
mkdir -p "$HOME"/.${pkgname%-wine}/wine || exit 1
ln -s /${_path}/regpatch.reg "$HOME"/.${pkgname%-wine}/wine || exit 1
ln -s /${_path}/${pkgname%-wine}.exe "$HOME"/.${pkgname%-wine}/${pkgname%-wine} || exit 1
regedit "$HOME"/.${pkgname%-wine}/wine/regpatch.reg
wineserver -k
fi
wine "$HOME"/.${pkgname%-wine}/${pkgname%-wine} "\$@"
EOF
install -Dm0644 /dev/stdin "${pkgdir}/usr/share/applications/${pkgname%-wine}.desktop" << EOF
[Desktop Entry]
Name=${pkgname%-wine}
Name[zh_CN]=冰点文库
Comment=${pkgdesc}
#MimeType=application/x-${pkgname%-wine};
Exec=${pkgname%-wine} %f
Type=Application
Categories=Development;Tool;
Terminal=false
#Icon=${pkgname%-wine}.png
Version=${pkgver}
EOF
}
|