一个小工具,可以分割和合并文件,基于 Java & Gluon。
- 传输文件时有大小限制,无法一次传输一个大文件;
- 微信传输大于 1GiB 的文件;
- 一次传输一个大文件的效率太低,将大文件拆开一起发送可以提高效率
(手动多线程); - 等等。
本项目基于 Gluon,下面的步骤参考 Gluon 文档,如遇到问题请阅读文档
-
下载 Java 21 的 GraalVM,并配置系统环境变量:
GRAALVM_HOME
:GraalVM 目录JAVA_HOME
:macOS/Linux 设为$GRAALVM_HOME
,Windows 设为%GRAALVM_HOME%
PATH
:macOS/Linux 设为$JAVA_HOME\bin;$PATH
,Windows 设为%JAVA_HOME%\bin;%PATH%
-
下载并安装 JDK 11
-
(仅对于 Windows)下载 Maven 3.8.8 ,并配置系统环境变量:
MVN_HOME
:解压的目录PATH
:%MVN_HOME%\bin;%PATH%
-
(仅对于 Windows)下载 Visual Studio 2022,选择单个组件,勾选下面的组件:
- MSVC v143 -VS 2022 C++ x64/x86 生成工具
- 对 v143 生成工具的 C++/CLI 支持
- Windows 10 SDK
- Windows 通用 CRT SDK
选择语言包,勾选且仅勾选英语,开始安装
配置系统环境变量:
VS_HOME
:Visual Studio 2022 安装目录PATH
:%VS_HOME%\VC\Tools\MSVC\<MSVC版本>\bin\Hostx64\x64;%PATH%\
-
(仅对于 macOS)安装 Homebrew,并执行
brew install create-dmg
-
使用 IntelliJ IDEA 打开本项目,在文件->项目结构->SDK中添加 JDK 11,并设置项目 SDK 为 JDK 11
打开 IntelliJ IDEA 中的 Maven 面板,运行:file-split-and-merge-tool/插件/javafx/javafx:run
- 打开 IntelliJ IDEA 中的 Maven 面板,运行:
file-split-and-merge-tool/插件/gluonfx/gluonfx:build
- 运行
pack/macos-apple.sh
- 打包后的文件在
target/macos-apple-silicon/
目录下
- 运行
pack/windows-10-x64.bat
- 使用 Inno Setup 运行
windows-10-x64.iss
- 打包后的文件在
target/windows-10-x64/
目录下