piskel/misc/scripts/package-windows-executable.cmd

47 lines
1.4 KiB
Batchfile
Raw Normal View History

2014-06-21 22:05:02 +00:00
@ECHO off
2014-06-21 20:39:37 +00:00
2014-06-21 22:05:02 +00:00
SETLOCAL
2014-06-21 20:39:37 +00:00
2014-06-21 22:05:02 +00:00
PUSHD ..\..
set PISKEL_HOME=%cd%
POPD
2014-06-21 20:39:37 +00:00
2014-06-21 22:05:02 +00:00
set VBOX_PATH="C:\Program Files (x86)\Enigma Virtual Box"
set RESOURCE_HACKER_PATH="C:\Program Files (x86)\Resource Hacker"
2014-06-21 20:39:37 +00:00
2014-06-21 22:05:02 +00:00
set APP_BIN="%PISKEL_HOME%\dest\desktop\cache\win\0.9.2"
set MISC_FOLDER=%PISKEL_HOME%\misc
set RELEASES_FOLDER=%PISKEL_HOME%\dest\desktop\releases
set DEST_FOLDER=%RELEASES_FOLDER%\win
2014-06-21 20:39:37 +00:00
2014-06-21 22:05:02 +00:00
ECHO "Building Piskel executable for Windows ..."
2014-06-21 20:39:37 +00:00
2014-06-21 22:05:02 +00:00
ECHO "Creating release directory ..."
MKDIR "%DEST_FOLDER%"
ECHO "DONE"
2014-06-21 20:39:37 +00:00
2014-06-21 22:05:02 +00:00
ECHO "Packaging executable ..."
COPY /b "%APP_BIN%\nw.exe"+"%RELEASES_FOLDER%\piskel\piskel.nw" "%DEST_FOLDER%\piskel-raw.exe"
ECHO "DONE"
2014-06-21 20:39:37 +00:00
2014-06-21 22:05:02 +00:00
ECHO "COPYing dependencies ..."
COPY "%APP_BIN%\*.dll" "%DEST_FOLDER%\"
COPY "%APP_BIN%\nw.pak" "%DEST_FOLDER%\"
ECHO "DONE"
2014-06-21 20:39:37 +00:00
2014-06-21 22:05:02 +00:00
ECHO "Updating Piskel icon -- Using Resource Hacker"
%RESOURCE_HACKER_PATH%\ResHacker -addoverwrite "%DEST_FOLDER%\piskel-raw.exe", "%DEST_FOLDER%\piskel-exploded.exe", "%MISC_FOLDER%\desktop\logo.ico", ICONGROUP, IDR_MAINFRAME, 1033
DEL "%DEST_FOLDER%\piskel-raw.exe"
ECHO "DONE"
2014-06-21 20:39:37 +00:00
2014-06-21 22:05:02 +00:00
ECHO "Boxing application to single file -- Using Enigma Virtual Box"
%VBOX_PATH%\enigmavbconsole "%MISC_FOLDER%\desktop\package-piskel.evb"
DEL "%DEST_FOLDER%\*.dll"
DEL "%DEST_FOLDER%\nw.pak"
DEL "%DEST_FOLDER%\piskel-exploded.exe"
ECHO "DONE"
2014-06-21 20:39:37 +00:00
2014-06-21 22:05:02 +00:00
PAUSE
explorer "%DEST_FOLDER%\"
2014-06-21 20:39:37 +00:00
2014-06-21 22:05:02 +00:00
ENDLOCAL