chore: 移除 fscan-lite (C 版本)

功能过于单一(仅 TCP 端口扫描),与 fscan 品牌定位不符。
fscan-nolocal 已是精简版的正确方案。

- 删除 fscan-lite 源码和构建脚本
- goreleaser 移除 lite 构建步骤
- CI 不再安装 mingw 交叉编译工具
This commit is contained in:
ZacharyZcR
2026-06-01 08:37:04 +08:00
parent 942f0fa6c3
commit 354ad2e24b
9 changed files with 2 additions and 780 deletions
+1 -17
View File
@@ -30,11 +30,6 @@ runs:
go-version: ${{ inputs.go-version }}
cache: true
- name: 安装 C 编译工具
shell: bash
run: |
sudo apt-get update -qq
sudo apt-get install -y gcc make mingw-w64 gcc-multilib g++-multilib
- name: 下载依赖
shell: bash
@@ -66,9 +61,7 @@ runs:
if: always()
with:
name: build-${{ inputs.mode }}-${{ github.run_id }}
path: |
dist/
dist-lite/
path: dist/
retention-days: ${{ inputs.retention-days }}
- name: 生成报告
@@ -87,7 +80,6 @@ runs:
## 构建产物
### fscan (Go 版本)
$(if [ -d "dist" ]; then
echo "- 文件数: $(find dist -type f 2>/dev/null | wc -l)"
echo "- 大小: $(du -sh dist 2>/dev/null | cut -f1)"
@@ -95,13 +87,5 @@ runs:
echo "- 无产物"
fi)
### fscan-lite (C 版本)
$(if [ -d "dist-lite" ]; then
echo "- 文件数: $(find dist-lite -type f 2>/dev/null | wc -l)"
echo "- 大小: $(du -sh dist-lite 2>/dev/null | cut -f1)"
else
echo "- 无产物"
fi)
[查看产物](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
EOF
-4
View File
@@ -4,8 +4,6 @@ before:
hooks:
- go mod tidy
- go mod download
- chmod +x .github/scripts/build-lite.sh
- bash .github/scripts/build-lite.sh {{ .Version }}
builds:
# 标准版 - 全部插件(全架构)
@@ -238,8 +236,6 @@ release:
| Solaris | x64 |
footer: |
**完整更新日志**: https://github.com/{{ .Env.GITHUB_OWNER }}/{{ .Env.GITHUB_REPO }}/compare/{{ .PreviousTag }}...{{ .Tag }}
extra_files:
- glob: ./dist-lite/*
snapshot:
name_template: "{{ incpatch .Version }}-dev-{{ .ShortCommit }}"
+1 -1
View File
@@ -103,4 +103,4 @@
| Windows | x64, x32 |
| macOS | x64 (Intel), arm64 (Apple Silicon) |
| FreeBSD | x64, x32, arm64, armv5/6/7 |
| Solaris | x64 |
| Solaris | X64n |
-81
View File
@@ -1,81 +0,0 @@
#!/bin/bash
# 构建 fscan-lite 并准备发布产物
set -e
VERSION="${1:-dev}"
LITE_DIR="fscan-lite"
OUTPUT_DIR="dist-lite"
echo "==> 构建 fscan-lite (版本: $VERSION)"
# 清理旧产物
rm -rf "$OUTPUT_DIR"
mkdir -p "$OUTPUT_DIR"
# 进入 lite 目录
cd "$LITE_DIR"
# 源文件
SOURCES="src/main.c src/scanner.c src/platform.c"
INCLUDE="-Iinclude"
CFLAGS_BASE="-std=c89 -Wall -O2"
# 构建 Linux 版本
echo "==> 构建 Linux 版本..."
# Linux x64
echo " - Linux x64"
mkdir -p bin
gcc $CFLAGS_BASE $INCLUDE -o bin/fscan-lite $SOURCES -lpthread
cp bin/fscan-lite "../$OUTPUT_DIR/fscan-lite_${VERSION}_linux_x64"
rm -rf bin
# Linux x32
echo " - Linux x32"
mkdir -p bin
gcc $CFLAGS_BASE -m32 $INCLUDE -o bin/fscan-lite $SOURCES -lpthread 2>/dev/null || echo " (跳过: 缺少 32-bit 支持)"
if [ -f bin/fscan-lite ]; then
cp bin/fscan-lite "../$OUTPUT_DIR/fscan-lite_${VERSION}_linux_x32"
fi
rm -rf bin
# 构建 Windows 版本
echo "==> 构建 Windows 版本..."
# Windows x64
echo " - Windows x64"
mkdir -p bin
x86_64-w64-mingw32-gcc $CFLAGS_BASE $INCLUDE -o bin/fscan-lite.exe $SOURCES -lws2_32 -static
if [ -f bin/fscan-lite.exe ]; then
cp bin/fscan-lite.exe "../$OUTPUT_DIR/fscan-lite_${VERSION}_windows_x64.exe"
echo " ✓ 编译成功"
else
echo " ✗ 编译失败"
fi
rm -rf bin
# Windows x32
echo " - Windows x32"
mkdir -p bin
i686-w64-mingw32-gcc $CFLAGS_BASE $INCLUDE -o bin/fscan-lite.exe $SOURCES -lws2_32 -static
if [ -f bin/fscan-lite.exe ]; then
cp bin/fscan-lite.exe "../$OUTPUT_DIR/fscan-lite_${VERSION}_windows_x32.exe"
echo " ✓ 编译成功"
else
echo " ✗ 编译失败"
fi
rm -rf bin
cd ..
# 统计产物
echo ""
echo "==> 构建完成!"
echo "产物列表:"
if [ -d "$OUTPUT_DIR" ]; then
ls -lh "$OUTPUT_DIR" 2>/dev/null || echo " (无产物)"
echo ""
FILECOUNT=$(ls "$OUTPUT_DIR" 2>/dev/null | wc -l)
echo "总计: $FILECOUNT 个文件"
fi