Compare commits
242 Commits
0929778ca7
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 227f5ab0d3 | |||
| 33c1db4dae | |||
| 7931566212 | |||
| 4f3c19c15c | |||
| 0ceca202e9 | |||
| 594d38e4a9 | |||
| 8643562319 | |||
| 74d43e701c | |||
| 8db1a1ffb0 | |||
| 117320af02 | |||
| 6bccc229b0 | |||
| 77b63e7a83 | |||
| 1b4a2bfb1c | |||
| 6e99837a4c | |||
| 90ef3400f6 | |||
| a2c952879d | |||
| b391dfdfb3 | |||
| 4c8b550242 | |||
| f34878cbd5 | |||
| b45ed524e1 | |||
| 6ca067c4a6 | |||
| fbaaf19391 | |||
| a686d822e7 | |||
| f8baea24f5 | |||
| 23b2352637 | |||
| 8617f66496 | |||
| f44b8b7dea | |||
| 4e6d5d0597 | |||
| a35c47ed32 | |||
| fe843fb314 | |||
| 594bb6ffe6 | |||
| aef5f51c89 | |||
| 0bfec6fb78 | |||
| 4e1dcf082c | |||
| 917e61af20 | |||
| 7093c77849 | |||
| 2e0362a88f | |||
| 18551a0aea | |||
| ae765fb543 | |||
| 80682552f4 | |||
| 13cd1e54ed | |||
| c75790f8c2 | |||
| dc2574bb17 | |||
| 45dfa70951 | |||
| 30e8218ba4 | |||
| 306245524d | |||
| 4992dca74f | |||
| f48e598cc1 | |||
| 36c04ccc07 | |||
| 339dc6c06b | |||
| 1636b9c26f | |||
| d9309b45fa | |||
| a19f69b2ff | |||
| 43ee9154a8 | |||
| bbb5c526b0 | |||
| 43dd6b5d71 | |||
| c389c6ff3f | |||
| 1f52bc1cc3 | |||
| cc12177252 | |||
| 4df5d5d874 | |||
| e4e3e49419 | |||
| 5bf323d4bf | |||
| 94dc325df4 | |||
| 606ecbe6cd | |||
| e439fd144e | |||
| 7889189e41 | |||
| 353c5ce471 | |||
| ccb39f0fe0 | |||
| 9877d347b1 | |||
| c2e96c0286 | |||
| 17d7b515ce | |||
| fd3af15e54 | |||
| 3961dc8ca2 | |||
| 98bc4ff24f | |||
| a5b511c38b | |||
| e8cd68cce7 | |||
| 1ad75b5896 | |||
| 8da0a069b7 | |||
| 2ae56b2510 | |||
| 71fd5f0bb7 | |||
| b3b301b9b6 | |||
| d45698d397 | |||
| 421a2c97f9 | |||
| 9d13456695 | |||
| d283cf26ba | |||
| 5401fcf7bb | |||
| 7c5396e239 | |||
| 817fc94f41 | |||
| 3feb1f0be4 | |||
| c4d050f2bf | |||
| a46b4bf9c0 | |||
| ec0ed7fb1c | |||
| 571d4bfaca | |||
| fdf95aa6ec | |||
| 7fd4d1ae5a | |||
| e747032501 | |||
| f11b8b74b7 | |||
| b4d69f5db3 | |||
| 3c3faab528 | |||
| 9aa99cdfe6 | |||
| 3ac8a7155f | |||
| 3e44f1fc4d | |||
| fa431f1666 | |||
| fda5c6bace | |||
| b3b5f8a79d | |||
| 8faa26b134 | |||
| 1b4566d192 | |||
| d0d66c1d52 | |||
| 9464dd0234 | |||
| d5c1266d3e | |||
| 3924bac9f9 | |||
| 9f5a9d315c | |||
| 4c1513a5da | |||
| ccaa24745e | |||
| 1ce6ccb030 | |||
| 2b21e8cdfb | |||
| 35ec073eb9 | |||
| 68524c1c94 | |||
| b4a506de96 | |||
| 82b42b3ba3 | |||
| 90bd77f945 | |||
| 95e40df354 | |||
| f9d18fba08 | |||
| f0af86cc1e | |||
| 13f0e23ed5 | |||
| 7cb27b70f8 | |||
| 61f82bdd10 | |||
| fa349c2057 | |||
| be7328184a | |||
| 905ea41ed3 | |||
| d0fa54f10e | |||
| 1948af3cc4 | |||
| 53965083e3 | |||
| ac4aada0af | |||
| 53afdb3472 | |||
| 5765888229 | |||
| 2958306caf | |||
| 216b050398 | |||
| 5352ca2ab2 | |||
| 929c1e9f05 | |||
| bfa1e342c0 | |||
| 8331c0eedc | |||
| cf59a010ac | |||
| 1c9b13c14f | |||
| 87c05720ce | |||
| 25031d655d | |||
| 793a301353 | |||
| a5790e28fb | |||
| 00d284b725 | |||
| 891133a6bf | |||
| b1e11b27bc | |||
| f79e657895 | |||
| 1778b855c5 | |||
| db957039d4 | |||
| 78905d16c0 | |||
| 2975bb39a2 | |||
| 5e63f13cf3 | |||
| 1f581454e1 | |||
| cdd99fd4d2 | |||
| b44df996c2 | |||
| 7f8a075553 | |||
| eed87db268 | |||
| cfacb903e1 | |||
| 3198f822f5 | |||
| 21dc280e57 | |||
| 28e88d615f | |||
| 36828ba199 | |||
| 8dc2841da6 | |||
| 4cbe60052e | |||
| 6c5b0c5be3 | |||
| a3b3522bb7 | |||
| 3ba7c52980 | |||
| 854f190531 | |||
| a0ce5846e1 | |||
| 1eb56404c7 | |||
| d6bfca249e | |||
| 12746cdf11 | |||
| 6b645ccbb7 | |||
| 51a398d269 | |||
| 595f8a76af | |||
| 050271e2a9 | |||
| 4184d89168 | |||
| 303a23130b | |||
| 78b962bece | |||
| f8e62bde2a | |||
| a315f587bf | |||
| 500c8ffb06 | |||
| b53af39358 | |||
| 0fd6940975 | |||
| 29652c3ad4 | |||
| c3e1422b02 | |||
| a4d21ecc0b | |||
| 51ff046e1a | |||
| abd6928e4a | |||
| aa3de8a6fd | |||
| ed1b8497c6 | |||
| 57be80af3c | |||
| e4fddca53c | |||
| 3ea497f10a | |||
| 825f7d55f2 | |||
| abd33eb5df | |||
| cd1db562b1 | |||
| d575139a6f | |||
| 3b223dc7dc | |||
| f3c0366ee6 | |||
| 7cc2b5b9b5 | |||
| d99b46e3e2 | |||
| 22eebc13d9 | |||
| f53f35bbed | |||
| 9fafcd0192 | |||
| 35fbfc933d | |||
| 5c142e1235 | |||
| 5fd69d32f5 | |||
| d368ebf822 | |||
| d102e17d47 | |||
| 792dea2dc2 | |||
| cec4b75999 | |||
| 2d7ede357e | |||
| 88a21ead92 | |||
| 458fd8da96 | |||
| b24afba2d8 | |||
| 382c78e32f | |||
| 28869caa32 | |||
| bd8a1ef7bd | |||
| 554b1fb83e | |||
| c5dfab8081 | |||
| 52475b6628 | |||
| 0b1bc5f32f | |||
| f18f48789a | |||
| abc355c451 | |||
| d24596a8ea | |||
| a40cacea4d | |||
| 8921f5da0f | |||
| 31a8b979c7 | |||
| 660f4e5a32 | |||
| 67961f280f | |||
| 3ed454a98c | |||
| f82cfc4541 | |||
| 890c8ce76b | |||
| 7aa600e01c | |||
| f7cafe0cfc | |||
| 0336904258 |
@@ -87,6 +87,11 @@ var fg = TryFindResource("PrimaryText") as Brush ?? Brushes.Black;
|
||||
- 선택형: 커스텀 Popup 드롭다운 (`[라벨: 현재값 ▾]`)
|
||||
- AI/고급 설정 항목 옆에 `?` 도움말 아이콘 + 커스텀 다크 툴팁 (`HelpTooltipStyle`)
|
||||
- 설정 저장 시 `CustomMessageBox`로 완료 알림
|
||||
- 설정에서 `on/off` 또는 숫자 입력이 필요한 신규 항목은 **기존 양식에 맞춰 통일해서 추가**해야 함
|
||||
- `on/off` 항목은 예외 없이 `ToggleSwitch` 스타일을 사용하고, 기본 CheckBox/임의 토글 버튼으로 새로 만들지 않음
|
||||
- 숫자 입력 항목은 가능하면 **텍스트박스 직접 입력 대신 기존 슬라이더 + 현재값 배지 패턴**을 우선 사용하며, 범위가 명확한 값은 반드시 이 패턴을 기본으로 채택
|
||||
- 숫자 설정을 부득이하게 텍스트 입력으로 받을 경우에도, 먼저 기존 설정창/AX Agent 내부 설정에 같은 유형의 컨트롤이 있는지 확인하고 그 양식을 재사용해야 함
|
||||
- 동일 성격의 설정은 메인 설정과 AX Agent 내부 설정에서 **표현 방식이 서로 다르면 안 되며**, 기존에 쓰던 컨트롤러/레이아웃 기준으로 맞춰 추가
|
||||
|
||||
### AX Agent 표현 수준 (필수)
|
||||
- AX Agent UI 표현 수준은 설정에서 반드시 3단계로 제공: **`풍부하게` / `적절하게` / `간단하게`**
|
||||
|
||||
235
build.bat
235
build.bat
@@ -1,90 +1,199 @@
|
||||
@echo off
|
||||
setlocal EnableExtensions
|
||||
chcp 65001 >nul
|
||||
|
||||
set "ROOT=%~dp0"
|
||||
pushd "%ROOT%" >nul
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo AX Copilot - Build Script
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
set APP=src\AxCopilot\AxCopilot.csproj
|
||||
set ENCRYPTOR=src\AxKeyEncryptor\AxKeyEncryptor.csproj
|
||||
set OFFLINE=src\AxCopilot.Installer\AxCopilot.Installer.csproj
|
||||
set OUT=dist
|
||||
set "APP=%ROOT%src\AxCopilot\AxCopilot.csproj"
|
||||
set "ENCRYPTOR=%ROOT%src\AxKeyEncryptor\AxKeyEncryptor.csproj"
|
||||
set "INSTALLER=%ROOT%src\AxCopilot.Installer\AxCopilot.Installer.csproj"
|
||||
set "INSTALLER_DIR=%ROOT%src\AxCopilot.Installer"
|
||||
set "OUT=%ROOT%dist"
|
||||
set "APP_OUT=%OUT%\AxCopilot"
|
||||
set "ENCRYPTOR_OUT=%OUT%\AxKeyEncryptor"
|
||||
set "PAYLOAD_ZIP=%INSTALLER_DIR%\payload.zip"
|
||||
set "INSTALLER_EXE=%INSTALLER_DIR%\bin\Release\net48\AxCopilot_Setup.exe"
|
||||
set "RUNTIME=win-x64"
|
||||
set "OBFUSCATOR_EXE=%ROOT%tools\obfuscator\obfuscator.exe"
|
||||
set "OBFUSCATOR_CONFIG=%ROOT%tools\obfuscator\AxCopilot.obfuscation.xml"
|
||||
|
||||
:: Kill running app
|
||||
tasklist /FI "IMAGENAME eq AxCopilot.exe" 2>nul | find /i "AxCopilot.exe" >nul
|
||||
if %ERRORLEVEL%==0 (
|
||||
echo [0] Stopping AxCopilot...
|
||||
taskkill /IM AxCopilot.exe /F >nul 2>nul
|
||||
timeout /t 2 /nobreak >nul
|
||||
)
|
||||
:: Kill legacy process
|
||||
tasklist /FI "IMAGENAME eq AxCommander.exe" 2>nul | find /i "AxCommander.exe" >nul
|
||||
if %ERRORLEVEL%==0 (
|
||||
echo [0] Stopping legacy AxCommander...
|
||||
taskkill /IM AxCommander.exe /F >nul 2>nul
|
||||
timeout /t 2 /nobreak >nul
|
||||
)
|
||||
call :stop_process "AxCopilot" "AX Copilot"
|
||||
if errorlevel 1 goto :fail_running
|
||||
call :stop_process "AxCommander" "legacy AxCommander"
|
||||
if errorlevel 1 goto :fail_running
|
||||
|
||||
if exist "%OUT%" rd /s /q "%OUT%" 2>nul
|
||||
mkdir "%OUT%"
|
||||
mkdir "%OUT%\AxCopilot"
|
||||
mkdir "%OUT%" || goto :fail_dist
|
||||
mkdir "%APP_OUT%" || goto :fail_dist
|
||||
mkdir "%ENCRYPTOR_OUT%" || goto :fail_dist
|
||||
|
||||
:: ========================================
|
||||
:: 1. Main app (self-contained, folder)
|
||||
:: ========================================
|
||||
echo [1/4] Building main app (self-contained)...
|
||||
dotnet publish "%APP%" -c Release -o "%OUT%\AxCopilot" --self-contained true --nologo -v quiet
|
||||
if %ERRORLEVEL% NEQ 0 ( echo [FAILED] Main app build & pause & exit /b 1 )
|
||||
echo OK - dist\AxCopilot\
|
||||
if exist "%PAYLOAD_ZIP%" del /q "%PAYLOAD_ZIP%" 2>nul
|
||||
|
||||
echo [1/5] Building main app (self-contained %RUNTIME%)...
|
||||
dotnet publish "%APP%" ^
|
||||
-c Release ^
|
||||
-r %RUNTIME% ^
|
||||
--self-contained true ^
|
||||
-o "%APP_OUT%" ^
|
||||
--nologo ^
|
||||
-v minimal ^
|
||||
-p:DebugType=None ^
|
||||
-p:DebugSymbols=false ^
|
||||
-p:CopyOutputSymbolsToPublishDirectory=false ^
|
||||
-p:EnableSourceLink=false ^
|
||||
-p:PublishSingleFile=true ^
|
||||
-p:EnableCompressionInSingleFile=true ^
|
||||
-p:IncludeNativeLibrariesForSelfExtract=true ^
|
||||
-p:PublishReadyToRun=true
|
||||
if errorlevel 1 goto :fail_app
|
||||
echo OK - %APP_OUT%
|
||||
echo.
|
||||
|
||||
:: ========================================
|
||||
:: 2. AxKeyEncryptor (developer tool)
|
||||
:: ========================================
|
||||
echo [2/4] Building AxKeyEncryptor (WinForms)...
|
||||
mkdir "%OUT%\AxKeyEncryptor" 2>nul
|
||||
dotnet publish "%ENCRYPTOR%" -c Release -o "%OUT%\AxKeyEncryptor" --self-contained false --nologo -v quiet
|
||||
if %ERRORLEVEL% NEQ 0 ( echo [FAILED] AxKeyEncryptor build & pause & exit /b 1 )
|
||||
del /q "%OUT%\AxKeyEncryptor\*.pdb" 2>nul
|
||||
echo OK - dist\AxKeyEncryptor\
|
||||
echo [2/5] Checking obfuscation / anti-decompile status...
|
||||
if exist "%OBFUSCATOR_EXE%" (
|
||||
if exist "%OBFUSCATOR_CONFIG%" (
|
||||
echo Optional obfuscator found.
|
||||
echo Running: "%OBFUSCATOR_EXE%"
|
||||
"%OBFUSCATOR_EXE%" "%OBFUSCATOR_CONFIG%" "%APP_OUT%"
|
||||
if errorlevel 1 goto :fail_obfuscation
|
||||
echo OK - obfuscation step completed
|
||||
) else (
|
||||
echo WARNING - no external obfuscator configured.
|
||||
echo Current protection is limited to symbol/source metadata removal only.
|
||||
)
|
||||
) else (
|
||||
echo WARNING - no external obfuscator configured.
|
||||
echo Current protection is limited to symbol/source metadata removal only.
|
||||
)
|
||||
echo.
|
||||
|
||||
:: ========================================
|
||||
:: 3. Create payload ZIP for installer
|
||||
:: ========================================
|
||||
echo [3/4] Creating installer payload ZIP...
|
||||
powershell -NoProfile -Command "Compress-Archive -Path '%OUT%\AxCopilot\*' -DestinationPath 'src\AxCopilot.Installer\payload.zip' -Force"
|
||||
echo OK - payload.zip
|
||||
echo [3/5] Building AxKeyEncryptor...
|
||||
dotnet publish "%ENCRYPTOR%" ^
|
||||
-c Release ^
|
||||
-o "%ENCRYPTOR_OUT%" ^
|
||||
--self-contained false ^
|
||||
--nologo ^
|
||||
-v minimal ^
|
||||
-p:DebugType=None ^
|
||||
-p:DebugSymbols=false
|
||||
if errorlevel 1 goto :fail_encryptor
|
||||
echo OK - %ENCRYPTOR_OUT%
|
||||
echo.
|
||||
|
||||
:: ========================================
|
||||
:: 4. Build installer (.NET Framework 4.8)
|
||||
:: ========================================
|
||||
echo [4/4] Building installer (.NET Framework 4.8)...
|
||||
dotnet build "%OFFLINE%" -c Release --nologo -v quiet
|
||||
if %ERRORLEVEL% NEQ 0 ( echo [FAILED] Installer build & pause & exit /b 1 )
|
||||
copy /Y "src\AxCopilot.Installer\bin\Release\net48\AxCopilot_Setup.exe" "%OUT%\" >nul
|
||||
echo [4/5] Creating installer payload ZIP...
|
||||
powershell -NoProfile -Command "Compress-Archive -Path '%APP_OUT%\*' -DestinationPath '%PAYLOAD_ZIP%' -Force"
|
||||
if errorlevel 1 goto :fail_payload
|
||||
if not exist "%PAYLOAD_ZIP%" goto :fail_payload
|
||||
echo OK - %PAYLOAD_ZIP%
|
||||
echo.
|
||||
|
||||
echo [5/5] Building installer (.NET Framework 4.8)...
|
||||
dotnet build "%INSTALLER%" -c Release --nologo -v minimal
|
||||
if errorlevel 1 goto :fail_installer
|
||||
if not exist "%INSTALLER_EXE%" goto :fail_installer_copy
|
||||
copy /Y "%INSTALLER_EXE%" "%OUT%\" >nul
|
||||
if errorlevel 1 goto :fail_installer_copy
|
||||
for %%F in ("%OUT%\AxCopilot_Setup.exe") do echo OK - AxCopilot_Setup.exe (%%~zF bytes)
|
||||
echo.
|
||||
|
||||
:: ========================================
|
||||
:: Cleanup
|
||||
:: ========================================
|
||||
:: Remove debug symbols and metadata (anti-decompile)
|
||||
del /q "%OUT%\*.pdb" 2>nul
|
||||
del /q "%OUT%\AxCopilot\*.pdb" 2>nul
|
||||
del /q "%OUT%\AxCopilot\*.xml" 2>nul
|
||||
del /q "%OUT%\*.deps.json" 2>nul
|
||||
del /q "%OUT%\*.runtimeconfig.json" 2>nul
|
||||
del /q "src\AxCopilot.Installer\payload.zip" 2>nul
|
||||
echo [Cleanup] Removing debug and metadata files from dist...
|
||||
call :clean_publish_artifacts "%OUT%"
|
||||
call :clean_publish_artifacts "%APP_OUT%"
|
||||
call :clean_publish_artifacts "%ENCRYPTOR_OUT%"
|
||||
if exist "%PAYLOAD_ZIP%" del /q "%PAYLOAD_ZIP%" 2>nul
|
||||
echo OK - cleaned
|
||||
echo.
|
||||
|
||||
echo ========================================
|
||||
echo Build Complete!
|
||||
echo ========================================
|
||||
echo.
|
||||
echo dist\AxCopilot\ Main app (EXE + DLL)
|
||||
echo dist\AxKeyEncryptor\ Settings Encryptor (dev tool)
|
||||
echo dist\AxCopilot_Setup.exe Installer (offline, .NET 4.8)
|
||||
echo %APP_OUT% Main app
|
||||
echo %ENCRYPTOR_OUT% Settings Encryptor
|
||||
echo %OUT%\AxCopilot_Setup.exe Installer
|
||||
echo.
|
||||
pause
|
||||
echo Note:
|
||||
echo - Release/self-contained single-file publish applied
|
||||
echo - ReadyToRun + compressed single-file bundle enabled
|
||||
echo - PDB/XML/debug metadata removed from dist output
|
||||
echo - External obfuscator is only applied when tools\obfuscator is configured
|
||||
echo.
|
||||
popd >nul
|
||||
exit /b 0
|
||||
|
||||
:stop_process
|
||||
set "PROC_NAME=%~1"
|
||||
set "DISPLAY_NAME=%~2"
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
|
||||
"$name='%PROC_NAME%';" ^
|
||||
"$display='%DISPLAY_NAME%';" ^
|
||||
"$procs = Get-Process -Name $name -ErrorAction SilentlyContinue;" ^
|
||||
"if (-not $procs) { exit 0 }" ^
|
||||
"Write-Host ('[0] Stopping ' + $display + '...');" ^
|
||||
"$imageName = $name + '.exe';" ^
|
||||
"foreach ($proc in $procs) {" ^
|
||||
" try { if ($proc.MainWindowHandle -ne 0) { [void]$proc.CloseMainWindow() } } catch { }" ^
|
||||
"}" ^
|
||||
"Start-Sleep -Seconds 2;" ^
|
||||
"& taskkill /IM $imageName /T /F > $null 2> $null;" ^
|
||||
"Start-Sleep -Seconds 2;" ^
|
||||
"$stillRunning = Get-Process -Name $name -ErrorAction SilentlyContinue;" ^
|
||||
"if ($stillRunning) {" ^
|
||||
" Write-Host ('[FAILED] Could not stop ' + $display + '. Access may be denied or the app may be running with higher privileges.') -ForegroundColor Red;" ^
|
||||
" exit 1" ^
|
||||
"}" ^
|
||||
"exit 0"
|
||||
if errorlevel 1 exit /b 1
|
||||
exit /b 0
|
||||
|
||||
:clean_publish_artifacts
|
||||
if not exist "%~1" exit /b 0
|
||||
del /q "%~1\*.pdb" 2>nul
|
||||
del /q "%~1\*.xml" 2>nul
|
||||
del /q "%~1\*.deps.json" 2>nul
|
||||
del /q "%~1\*.runtimeconfig.json" 2>nul
|
||||
exit /b 0
|
||||
|
||||
:fail_dist
|
||||
echo [FAILED] dist ??????밴쉐 ??쎈솭
|
||||
goto :end_fail
|
||||
|
||||
:fail_app
|
||||
echo [FAILED] main app publish ??쎈솭
|
||||
goto :end_fail
|
||||
|
||||
:fail_obfuscation
|
||||
echo [FAILED] obfuscation ??m???쎈솭
|
||||
goto :end_fail
|
||||
|
||||
:fail_encryptor
|
||||
echo [FAILED] AxKeyEncryptor publish ??쎈솭
|
||||
goto :end_fail
|
||||
|
||||
:fail_payload
|
||||
echo [FAILED] payload.zip ??밴쉐 ??쎈솭
|
||||
goto :end_fail
|
||||
|
||||
:fail_installer
|
||||
echo [FAILED] installer build ??쎈솭
|
||||
goto :end_fail
|
||||
|
||||
:fail_installer_copy
|
||||
echo [FAILED] installer exe 癰귣벊沅???쎈솭
|
||||
goto :end_fail
|
||||
|
||||
:fail_running
|
||||
echo [FAILED] running AX Copilot process could not be stopped cleanly
|
||||
goto :end_fail
|
||||
|
||||
:end_fail
|
||||
if exist "%PAYLOAD_ZIP%" del /q "%PAYLOAD_ZIP%" 2>nul
|
||||
popd >nul
|
||||
exit /b 1
|
||||
|
||||
132
create_html_preview.js
Normal file
132
create_html_preview.js
Normal file
@@ -0,0 +1,132 @@
|
||||
const JSZip = require('jszip');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
// EMU to inches: 1 inch = 914400 EMU
|
||||
// Slide: 9144000 x 5143500 EMU = 10" x 5.625"
|
||||
const EMU = 914400;
|
||||
const SLIDE_W = 9144000;
|
||||
const SLIDE_H = 5143500;
|
||||
const SCALE = 960 / 10; // 96px per inch (at 100%)
|
||||
|
||||
function emuToPx(emu) {
|
||||
return (emu / EMU) * SCALE;
|
||||
}
|
||||
|
||||
function hexToRgb(hex) {
|
||||
if (!hex || hex.length < 6) return '#888888';
|
||||
return '#' + hex.slice(-6);
|
||||
}
|
||||
|
||||
async function renderSlideHtml(xml, slideNum) {
|
||||
// Extract background color
|
||||
const bgMatch = xml.match(/p:bg>.*?<a:srgbClr val="([A-Fa-f0-9]{6})"/s);
|
||||
const bgColor = bgMatch ? '#' + bgMatch[1] : '#F5F7FA';
|
||||
|
||||
// Parse all shapes and text boxes
|
||||
const shapes = [];
|
||||
|
||||
// Find all spTree child elements (sp = shape/textbox, pic = image)
|
||||
const spPattern = /<p:sp>(.+?)<\/p:sp>/gs;
|
||||
let spMatch;
|
||||
while ((spMatch = spPattern.exec(xml)) !== null) {
|
||||
const spXml = spMatch[1];
|
||||
|
||||
// Get position
|
||||
const offMatch = spXml.match(/<a:off x="(-?\d+)" y="(-?\d+)"/);
|
||||
const extMatch = spXml.match(/<a:ext cx="(\d+)" cy="(\d+)"/);
|
||||
if (!offMatch || !extMatch) continue;
|
||||
|
||||
const x = emuToPx(parseInt(offMatch[1]));
|
||||
const y = emuToPx(parseInt(offMatch[2]));
|
||||
const w = emuToPx(parseInt(extMatch[1]));
|
||||
const h = emuToPx(parseInt(extMatch[2]));
|
||||
|
||||
// Get fill color
|
||||
const fillMatch = spXml.match(/p:spPr[\s\S]*?<a:srgbClr val="([A-Fa-f0-9]{6})"/);
|
||||
const fillColor = fillMatch ? '#' + fillMatch[1] : null;
|
||||
|
||||
// Get text content
|
||||
const texts = [];
|
||||
const paraPattern = /<a:p>([\s\S]*?)<\/a:p>/g;
|
||||
let paraMatch;
|
||||
while ((paraMatch = paraPattern.exec(spXml)) !== null) {
|
||||
const paraXml = paraMatch[1];
|
||||
const textMatches = [...paraXml.matchAll(/<a:t[^>]*>([^<]*)<\/a:t>/g)];
|
||||
const paraText = textMatches.map(m => m[1]).join('');
|
||||
if (paraText.trim()) texts.push(paraText.trim());
|
||||
}
|
||||
|
||||
// Get font size
|
||||
const szMatch = spXml.match(/sz="(\d+)"/);
|
||||
const fontSize = szMatch ? parseInt(szMatch[1]) / 100 : 12;
|
||||
|
||||
// Get text color
|
||||
const txtColorMatch = spXml.match(/<a:t>[\s\S]*?<a:srgbClr val="([A-Fa-f0-9]{6})"/);
|
||||
const txtColor = txtColorMatch ? '#' + txtColorMatch[1] : '#FFFFFF';
|
||||
|
||||
shapes.push({ x, y, w, h, fillColor, texts, fontSize, txtColor });
|
||||
}
|
||||
|
||||
// Build HTML
|
||||
let shapesHtml = '';
|
||||
for (const s of shapes) {
|
||||
const bgStyle = s.fillColor ? `background-color: ${s.fillColor};` : '';
|
||||
const textContent = s.texts.join('<br>');
|
||||
shapesHtml += `<div style="position:absolute;left:${s.x.toFixed(1)}px;top:${s.y.toFixed(1)}px;width:${s.w.toFixed(1)}px;height:${s.h.toFixed(1)}px;${bgStyle}overflow:hidden;box-sizing:border-box;padding:2px 4px;">
|
||||
<div style="font-size:${Math.min(s.fontSize, 20)}px;color:${s.txtColor};font-family:Arial,sans-serif;overflow:hidden;">${textContent}</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
return `<div style="position:relative;width:960px;height:540px;background-color:${bgColor};overflow:hidden;border:1px solid #333;flex-shrink:0;">
|
||||
<div style="position:absolute;top:2px;right:4px;font-size:10px;color:rgba(128,128,128,0.5);z-index:999">${slideNum}</div>
|
||||
${shapesHtml}
|
||||
</div>`;
|
||||
}
|
||||
|
||||
async function createPreview(pptxPath, outputPath) {
|
||||
const data = fs.readFileSync(pptxPath);
|
||||
const zip = await JSZip.loadAsync(data);
|
||||
|
||||
const slideFiles = Object.keys(zip.files)
|
||||
.filter(f => f.match(/^ppt\/slides\/slide\d+\.xml$/))
|
||||
.sort((a, b) => {
|
||||
const na = parseInt(a.match(/slide(\d+)/)[1]);
|
||||
const nb = parseInt(b.match(/slide(\d+)/)[1]);
|
||||
return na - nb;
|
||||
});
|
||||
|
||||
let slidesHtml = '';
|
||||
for (const sf of slideFiles) {
|
||||
const slideNum = parseInt(sf.match(/slide(\d+)/)[1]);
|
||||
const xml = await zip.file(sf).async('string');
|
||||
slidesHtml += await renderSlideHtml(xml, slideNum);
|
||||
}
|
||||
|
||||
const html = `<!DOCTYPE html>
|
||||
<html><head><meta charset="utf-8">
|
||||
<title>${path.basename(pptxPath)}</title>
|
||||
<style>
|
||||
body { background: #1a1a1a; font-family: Arial; margin: 0; padding: 20px; }
|
||||
h2 { color: #fff; font-size: 14px; margin-bottom: 10px; }
|
||||
.slides { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
|
||||
</style>
|
||||
</head><body>
|
||||
<h2>${path.basename(pptxPath)}</h2>
|
||||
<div class="slides">${slidesHtml}</div>
|
||||
</body></html>`;
|
||||
|
||||
fs.writeFileSync(outputPath, html);
|
||||
console.log(`Preview: ${outputPath} (${slideFiles.length} slides)`);
|
||||
}
|
||||
|
||||
(async () => {
|
||||
await createPreview(
|
||||
'E:/test/삼성디스플레이 vs LG디스플레이 비교 분석 보고서_20260407_1958.pptx',
|
||||
'C:/Users/admin/AppData/Local/Temp/pptx_gen/preview1.html'
|
||||
);
|
||||
await createPreview(
|
||||
'E:/test/삼성디스플레이 사업 영역 및 제품 강점 분석 보고서_20260407_1956.pptx',
|
||||
'C:/Users/admin/AppData/Local/Temp/pptx_gen/preview2.html'
|
||||
);
|
||||
})();
|
||||
BIN
dist/AxCopilot/Accessibility.dll
vendored
BIN
dist/AxCopilot/Accessibility.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/Assets/icon.ico
vendored
BIN
dist/AxCopilot/Assets/icon.ico
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 7.3 KiB |
BIN
dist/AxCopilot/AxCopilot.SDK.dll
vendored
BIN
dist/AxCopilot/AxCopilot.SDK.dll
vendored
Binary file not shown.
1319
dist/AxCopilot/AxCopilot.deps.json
vendored
1319
dist/AxCopilot/AxCopilot.deps.json
vendored
File diff suppressed because it is too large
Load Diff
BIN
dist/AxCopilot/AxCopilot.dll
vendored
BIN
dist/AxCopilot/AxCopilot.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/AxCopilot.exe
vendored
BIN
dist/AxCopilot/AxCopilot.exe
vendored
Binary file not shown.
19
dist/AxCopilot/AxCopilot.runtimeconfig.json
vendored
19
dist/AxCopilot/AxCopilot.runtimeconfig.json
vendored
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net8.0",
|
||||
"includedFrameworks": [
|
||||
{
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "8.0.25"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft.WindowsDesktop.App",
|
||||
"version": "8.0.25"
|
||||
}
|
||||
],
|
||||
"configProperties": {
|
||||
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
|
||||
"CSWINRT_USE_WINDOWS_UI_XAML_PROJECTIONS": false
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
dist/AxCopilot/D3DCompiler_47_cor3.dll
vendored
BIN
dist/AxCopilot/D3DCompiler_47_cor3.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/DirectWriteForwarder.dll
vendored
BIN
dist/AxCopilot/DirectWriteForwarder.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/DocumentFormat.OpenXml.Framework.dll
vendored
BIN
dist/AxCopilot/DocumentFormat.OpenXml.Framework.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/DocumentFormat.OpenXml.dll
vendored
BIN
dist/AxCopilot/DocumentFormat.OpenXml.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/Markdig.dll
vendored
BIN
dist/AxCopilot/Markdig.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/Microsoft.CSharp.dll
vendored
BIN
dist/AxCopilot/Microsoft.CSharp.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/Microsoft.Data.Sqlite.dll
vendored
BIN
dist/AxCopilot/Microsoft.Data.Sqlite.dll
vendored
Binary file not shown.
Binary file not shown.
BIN
dist/AxCopilot/Microsoft.VisualBasic.Core.dll
vendored
BIN
dist/AxCopilot/Microsoft.VisualBasic.Core.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/Microsoft.VisualBasic.Forms.dll
vendored
BIN
dist/AxCopilot/Microsoft.VisualBasic.Forms.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/Microsoft.VisualBasic.dll
vendored
BIN
dist/AxCopilot/Microsoft.VisualBasic.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/Microsoft.Web.WebView2.Core.dll
vendored
BIN
dist/AxCopilot/Microsoft.Web.WebView2.Core.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/Microsoft.Web.WebView2.WinForms.dll
vendored
BIN
dist/AxCopilot/Microsoft.Web.WebView2.WinForms.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/Microsoft.Web.WebView2.Wpf.dll
vendored
BIN
dist/AxCopilot/Microsoft.Web.WebView2.Wpf.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/Microsoft.Win32.Primitives.dll
vendored
BIN
dist/AxCopilot/Microsoft.Win32.Primitives.dll
vendored
Binary file not shown.
Binary file not shown.
BIN
dist/AxCopilot/Microsoft.Win32.Registry.dll
vendored
BIN
dist/AxCopilot/Microsoft.Win32.Registry.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/Microsoft.Win32.SystemEvents.dll
vendored
BIN
dist/AxCopilot/Microsoft.Win32.SystemEvents.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/PenImc_cor3.dll
vendored
BIN
dist/AxCopilot/PenImc_cor3.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/PresentationCore.dll
vendored
BIN
dist/AxCopilot/PresentationCore.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/PresentationFramework-SystemCore.dll
vendored
BIN
dist/AxCopilot/PresentationFramework-SystemCore.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/PresentationFramework-SystemData.dll
vendored
BIN
dist/AxCopilot/PresentationFramework-SystemData.dll
vendored
Binary file not shown.
Binary file not shown.
BIN
dist/AxCopilot/PresentationFramework-SystemXml.dll
vendored
BIN
dist/AxCopilot/PresentationFramework-SystemXml.dll
vendored
Binary file not shown.
Binary file not shown.
BIN
dist/AxCopilot/PresentationFramework.Aero.dll
vendored
BIN
dist/AxCopilot/PresentationFramework.Aero.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/PresentationFramework.Aero2.dll
vendored
BIN
dist/AxCopilot/PresentationFramework.Aero2.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/PresentationFramework.AeroLite.dll
vendored
BIN
dist/AxCopilot/PresentationFramework.AeroLite.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/PresentationFramework.Classic.dll
vendored
BIN
dist/AxCopilot/PresentationFramework.Classic.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/PresentationFramework.Luna.dll
vendored
BIN
dist/AxCopilot/PresentationFramework.Luna.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/PresentationFramework.Royale.dll
vendored
BIN
dist/AxCopilot/PresentationFramework.Royale.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/PresentationFramework.dll
vendored
BIN
dist/AxCopilot/PresentationFramework.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/PresentationNative_cor3.dll
vendored
BIN
dist/AxCopilot/PresentationNative_cor3.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/PresentationUI.dll
vendored
BIN
dist/AxCopilot/PresentationUI.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/ReachFramework.dll
vendored
BIN
dist/AxCopilot/ReachFramework.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/SQLitePCLRaw.batteries_v2.dll
vendored
BIN
dist/AxCopilot/SQLitePCLRaw.batteries_v2.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/SQLitePCLRaw.core.dll
vendored
BIN
dist/AxCopilot/SQLitePCLRaw.core.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/SQLitePCLRaw.provider.e_sqlite3.dll
vendored
BIN
dist/AxCopilot/SQLitePCLRaw.provider.e_sqlite3.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.AppContext.dll
vendored
BIN
dist/AxCopilot/System.AppContext.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Buffers.dll
vendored
BIN
dist/AxCopilot/System.Buffers.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.CodeDom.dll
vendored
BIN
dist/AxCopilot/System.CodeDom.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Collections.Concurrent.dll
vendored
BIN
dist/AxCopilot/System.Collections.Concurrent.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Collections.Immutable.dll
vendored
BIN
dist/AxCopilot/System.Collections.Immutable.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Collections.NonGeneric.dll
vendored
BIN
dist/AxCopilot/System.Collections.NonGeneric.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Collections.Specialized.dll
vendored
BIN
dist/AxCopilot/System.Collections.Specialized.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Collections.dll
vendored
BIN
dist/AxCopilot/System.Collections.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.ComponentModel.Annotations.dll
vendored
BIN
dist/AxCopilot/System.ComponentModel.Annotations.dll
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
dist/AxCopilot/System.ComponentModel.Primitives.dll
vendored
BIN
dist/AxCopilot/System.ComponentModel.Primitives.dll
vendored
Binary file not shown.
Binary file not shown.
BIN
dist/AxCopilot/System.ComponentModel.dll
vendored
BIN
dist/AxCopilot/System.ComponentModel.dll
vendored
Binary file not shown.
Binary file not shown.
BIN
dist/AxCopilot/System.Configuration.dll
vendored
BIN
dist/AxCopilot/System.Configuration.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Console.dll
vendored
BIN
dist/AxCopilot/System.Console.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Core.dll
vendored
BIN
dist/AxCopilot/System.Core.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Data.Common.dll
vendored
BIN
dist/AxCopilot/System.Data.Common.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Data.DataSetExtensions.dll
vendored
BIN
dist/AxCopilot/System.Data.DataSetExtensions.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Data.dll
vendored
BIN
dist/AxCopilot/System.Data.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Design.dll
vendored
BIN
dist/AxCopilot/System.Design.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Diagnostics.Contracts.dll
vendored
BIN
dist/AxCopilot/System.Diagnostics.Contracts.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Diagnostics.Debug.dll
vendored
BIN
dist/AxCopilot/System.Diagnostics.Debug.dll
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
dist/AxCopilot/System.Diagnostics.EventLog.dll
vendored
BIN
dist/AxCopilot/System.Diagnostics.EventLog.dll
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
dist/AxCopilot/System.Diagnostics.Process.dll
vendored
BIN
dist/AxCopilot/System.Diagnostics.Process.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Diagnostics.StackTrace.dll
vendored
BIN
dist/AxCopilot/System.Diagnostics.StackTrace.dll
vendored
Binary file not shown.
Binary file not shown.
BIN
dist/AxCopilot/System.Diagnostics.Tools.dll
vendored
BIN
dist/AxCopilot/System.Diagnostics.Tools.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Diagnostics.TraceSource.dll
vendored
BIN
dist/AxCopilot/System.Diagnostics.TraceSource.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Diagnostics.Tracing.dll
vendored
BIN
dist/AxCopilot/System.Diagnostics.Tracing.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.DirectoryServices.dll
vendored
BIN
dist/AxCopilot/System.DirectoryServices.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Drawing.Common.dll
vendored
BIN
dist/AxCopilot/System.Drawing.Common.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Drawing.Design.dll
vendored
BIN
dist/AxCopilot/System.Drawing.Design.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Drawing.Primitives.dll
vendored
BIN
dist/AxCopilot/System.Drawing.Primitives.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Drawing.dll
vendored
BIN
dist/AxCopilot/System.Drawing.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Dynamic.Runtime.dll
vendored
BIN
dist/AxCopilot/System.Dynamic.Runtime.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Formats.Asn1.dll
vendored
BIN
dist/AxCopilot/System.Formats.Asn1.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Formats.Tar.dll
vendored
BIN
dist/AxCopilot/System.Formats.Tar.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Globalization.Calendars.dll
vendored
BIN
dist/AxCopilot/System.Globalization.Calendars.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Globalization.Extensions.dll
vendored
BIN
dist/AxCopilot/System.Globalization.Extensions.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.Globalization.dll
vendored
BIN
dist/AxCopilot/System.Globalization.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.IO.Compression.Brotli.dll
vendored
BIN
dist/AxCopilot/System.IO.Compression.Brotli.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.IO.Compression.FileSystem.dll
vendored
BIN
dist/AxCopilot/System.IO.Compression.FileSystem.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.IO.Compression.Native.dll
vendored
BIN
dist/AxCopilot/System.IO.Compression.Native.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.IO.Compression.ZipFile.dll
vendored
BIN
dist/AxCopilot/System.IO.Compression.ZipFile.dll
vendored
Binary file not shown.
BIN
dist/AxCopilot/System.IO.Compression.dll
vendored
BIN
dist/AxCopilot/System.IO.Compression.dll
vendored
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user