@echo off chcp 65001 >nul setlocal enabledelayedexpansion REM ── ProfitData 배포 업로드 (FTP, curl) ── REM 사용법: toExe_main.bat / toExe_launcher.bat 로 빌드한 뒤 실행. REM 서버 구조 그대로 올리고, 런처가 변경분만 내려받는다. REM ===== FTP 계정 (아이디/비밀번호 채우기) ===== set "FTP_URL=ftp://pdftp:sa1234@49.247.45.63/" REM ============================================= cd /d "%~dp0" REM 1) 배포 스테이징 구성 (서버와 동일 폴더 구조) set "STAGE=%~dp0_deploy" if exist "%STAGE%" rmdir /s /q "%STAGE%" mkdir "%STAGE%" if exist "dist\main.exe" copy /y "dist\main.exe" "%STAGE%\" >nul if exist "dist\launcher.exe" copy /y "dist\launcher.exe" "%STAGE%\" >nul if exist "canvas" xcopy /e /i /y /q "canvas" "%STAGE%\canvas\" >nul if exist "number" xcopy /e /i /y /q "number" "%STAGE%\number\" >nul if exist "text" xcopy /e /i /y /q "text" "%STAGE%\text\" >nul copy /y "project_*.json" "%STAGE%\" >nul 2>nul REM 2) 매니페스트 생성 (런처가 변경분 비교에 사용) set "root=C:\ProgramData\Anaconda3" call %root%\Scripts\activate.bat %root% call conda activate py310 python "launcher\gen_manifest.py" "%STAGE%" if errorlevel 1 goto :err REM 3) FTP 업로드 (스테이징 전체) echo 업로드 중... for /r "%STAGE%" %%F in (*) do ( set "rel=%%F" set "rel=!rel:%STAGE%\=!" set "rel=!rel:\=/!" curl.exe -s --ftp-create-dirs -T "%%F" "%FTP_URL%!rel!" if errorlevel 1 (echo [오류] !rel! 업로드 실패 & goto :err) echo OK !rel! ) rmdir /s /q "%STAGE%" echo. echo 업로드 완료! 런처가 다음 실행 시 변경분을 자동 반영합니다. pause exit /b 0 :err echo. echo [오류] 업로드 실패 - FTP 계정/네트워크를 확인하세요. if exist "%STAGE%" rmdir /s /q "%STAGE%" pause exit /b 1