diff --git a/README.md b/README.md index 860e3e5..abaf410 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Hosts切换器 > macos & linux专用。windows自己找别的。 +![preview](./preview/image.png) + ## 安装 添加[`repo.debianx.in`](https://repo.debianx.in)源之后, 可直接使用`apt install hosts-switch`直接安装. diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..7786a0f --- /dev/null +++ b/build.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +if [ -d unpack ]; then + sudo rm -rf unpack +fi + +version="3.0.0" + +mkdir -p unpack/DEBIAN + +cp debian/control unpack/DEBIAN/ +cp -r usr unpack/ + +mkdir -p unpack/usr/share/icons/hicolor/128x128/apps +mkdir -p unpack/usr/share/icons/hicolor/256x256/apps + +cp icons/128x128.png unpack/usr/share/icons/hicolor/128x128/apps/hosts-switch.png +cp icons/256x256.png unpack/usr/share/icons/hicolor/256x256/apps/hosts-switch.png + +cd unpack +find usr -type f | xargs md5sum > DEBIAN/md5sums + +_size=$(du -d 0 usr | cut -f1) +du -d 0 usr +echo $_size + +sed -i "s/{{size}}/${_size}/" DEBIAN/control +sed -i "s/{{version}}/${version}/" DEBIAN/control + +cd .. +dpkg-deb -b unpack/ "hosts-switch-${version}.deb" + +sudo rm -rf unpack \ No newline at end of file diff --git a/debian/control b/debian/control index b6a54f5..b874a34 100644 --- a/debian/control +++ b/debian/control @@ -1,10 +1,10 @@ Package: hosts-switch -Version: 3.0.0 +Version: {{version}} Section: develop Architecture: all Priority: optional Maintainer: Yutent -Installed-Size: 0 +Installed-Size: {{size}} Depends: python3-webengine-gtk3 Homepage: https://git.wkit.fun/appcat/hosts-switch/ Author: yutent diff --git a/hosts-switch-3.0.0.deb b/hosts-switch-3.0.0.deb new file mode 100644 index 0000000..54551bc Binary files /dev/null and b/hosts-switch-3.0.0.deb differ diff --git a/icons/512x512.png b/icons/512x512.png deleted file mode 100644 index 46b31a0..0000000 Binary files a/icons/512x512.png and /dev/null differ diff --git a/preview/image.png b/preview/image.png new file mode 100644 index 0000000..bf0a2f1 Binary files /dev/null and b/preview/image.png differ diff --git a/usr/share/applications/hosts-switch.desktop b/usr/share/applications/hosts-switch.desktop new file mode 100644 index 0000000..e5f58a5 --- /dev/null +++ b/usr/share/applications/hosts-switch.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Hosts Switch +Comment[zh_CN]=Hosts文件修改器 +Exec=hosts-switch +Icon=hosts-switch +Terminal=false +X-MultipleArgs=false +Type=Application +Categories=Development; \ No newline at end of file