Remove pom.xml and RedisClipSync.java files; update README.md to reflect new project structure and build instructions.
This commit is contained in:
33
windows/build-and-run.bat
Normal file
33
windows/build-and-run.bat
Normal file
@@ -0,0 +1,33 @@
|
||||
@echo off
|
||||
chcp 65001 >nul
|
||||
setlocal
|
||||
|
||||
:: 切换到项目根目录(脚本在 windows\ 下)
|
||||
cd /d "%~dp0.."
|
||||
|
||||
echo ========================================
|
||||
echo Redis 剪切板同步 - 一键打包并运行
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
:: 1. 打包
|
||||
echo [1/2] 正在打包...
|
||||
call mvn -f code\pom.xml -q clean package -DskipTests
|
||||
if errorlevel 1 (
|
||||
echo 打包失败,请确保已安装 Maven 且可执行 mvn。
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
echo 打包完成: code\target\redis-clip-sync.jar
|
||||
echo.
|
||||
|
||||
:: 2. 运行(配置文件可选,默认 config.properties)
|
||||
set CONFIG=config.properties
|
||||
if not "%~1"=="" set CONFIG=%~1
|
||||
|
||||
echo [2/2] 正在启动(配置文件: %CONFIG%)...
|
||||
echo 提示: 按 Ctrl+C 可退出程序
|
||||
echo.
|
||||
java -jar code\target\redis-clip-sync.jar %CONFIG%
|
||||
|
||||
pause
|
||||
18
windows/run.bat
Normal file
18
windows/run.bat
Normal file
@@ -0,0 +1,18 @@
|
||||
@echo off
|
||||
chcp 65001 >nul
|
||||
|
||||
:: 切换到项目根目录(脚本在 windows\ 下)
|
||||
cd /d "%~dp0.."
|
||||
|
||||
set CONFIG=config.properties
|
||||
if not "%~1"=="" set CONFIG=%~1
|
||||
|
||||
if not exist "code\target\redis-clip-sync.jar" (
|
||||
echo 未找到 code\target\redis-clip-sync.jar,请先运行 windows\build-and-run.bat 进行打包。
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo 启动 Redis 剪切板同步(配置: %CONFIG%)...
|
||||
java -jar code\target\redis-clip-sync.jar %CONFIG%
|
||||
pause
|
||||
Reference in New Issue
Block a user