File: eventghost.cmd

package info (click to toggle)
libcec 7.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,372 kB
  • sloc: cpp: 20,697; ansic: 2,070; python: 1,362; sh: 42; makefile: 17
file content (29 lines) | stat: -rw-r--r-- 1,113 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
@ECHO OFF

SETLOCAL

SET MYDIR=%~dp0
SET EXITCODE=0

ECHO. * creating EventGhost plugin
SET EGSOURCES=%MYDIR%..\build\EventGhost\egplugin_sources
RMDIR /s /q "%MYDIR%..\build\EventGhost" >nul 2>&1
MKDIR "%MYDIR%..\build\EventGhost"

XCOPY /E /I "%MYDIR%..\src\eventghost\egplugin_sources" "%EGSOURCES%" >nul

MKDIR "%EGSOURCES%\PulseEight\cec"
COPY "%MYDIR%..\build\Release\x86\python\cec\cec.py" "%EGSOURCES%\PulseEight\cec" >nul
COPY "%MYDIR%..\build\Release\x86\python\cec\_pycec.pyd" "%EGSOURCES%\PulseEight\cec" >nul
COPY "%MYDIR%..\build\Release\x86\cec.dll" "%EGSOURCES%\PulseEight\cec" >nul
COPY "%MYDIR%..\build\Release\x86\python\cec\__init__.py" "%EGSOURCES%\PulseEight\cec" >nul

PowerShell -ExecutionPolicy ByPass -Command "Add-Type -Assembly System.IO.Compression.FileSystem;[System.IO.Compression.ZipFile]::CreateFromDirectory('%EGSOURCES%\', '%EGSOURCES%\..\pulse_eight.egplugin', [System.IO.Compression.CompressionLevel]::Optimal, $false)"

IF NOT EXIST "%EGSOURCES%\..\pulse_eight.egplugin" (
  ECHO. *** failed to create EventGhost plugin ***
  SET EXITCODE=1
  GOTO EXIT
)

exit /b %EXITCODE%