Scripts for packaging application

This commit is contained in:
jdescottes 2014-06-22 00:05:02 +02:00
parent 42c799d217
commit 5e5ec1a358
4 changed files with 70 additions and 43 deletions

Binary file not shown.

View File

@ -0,0 +1,16 @@
setlocal
@echo off
pushd ..\..
set PISKEL_HOME=%cd%
popd
echo "Updating Piskel icon"
ResHacker -addoverwrite "%PISKEL_HOME%\dest\desktop\releases\windows\piskel.exe", "%PISKEL_HOME%\dest\desktop\releases\windows\piskel-release.exe", "%PISKEL_HOME%\src\logo.ico", ICONGROUP, IDR_MAINFRAME, 1033
pause
explorer "%PISKEL_HOME%\dest\desktop\releases\windows"
endlocal

View File

@ -1,5 +1,5 @@
setlocal
@echo off
@ECHO off
pushd ..\..
set PISKEL_HOME=%cd%
@ -10,44 +10,44 @@ set MISC_FOLDER=%PISKEL_HOME%\misc
set RELEASES_FOLDER=%PISKEL_HOME%\dest\desktop\releases
set DEST_FOLDER=%RELEASES_FOLDER%\mac
echo "Building Piskel executable for Windows ..."
ECHO "Building Piskel executable for Windows ..."
echo "Creating release directory ..."
ECHO "Creating release directory ..."
mkdir %DEST_FOLDER%
echo "DONE"
ECHO "DONE"
echo "Creating application folder ..."
ECHO "Creating application folder ..."
mkdir "%DEST_FOLDER%\piskel.app"
echo "DONE"
ECHO "DONE"
echo "Unzip application ..."
ECHO "Unzip application ..."
mkdir "%APP_BIN%\node-webkit-unzipped"
7za x "%APP_BIN%\node-webkit-v0.9.2-osx-ia32.zip" -o"%APP_BIN%\node-webkit-unzipped"
echo "DONE"
ECHO "DONE"
pause
echo "Copy application ..."
ECHO "Copy application ..."
xcopy "%APP_BIN%\node-webkit-unzipped\node-webkit.app" "%DEST_FOLDER%\piskel.app" /E
:: xcopy "%APP_BIN%\node-webkit.app" "%DEST_FOLDER%\piskel.app" /E
echo "DONE"
ECHO "DONE"
echo "Copy Info.plist ..."
ECHO "Copy Info.plist ..."
set CONTENTS_FOLDER=%DEST_FOLDER%\piskel.app\Contents
copy "%MISC_FOLDER%\desktop\Info.plist" "%CONTENTS_FOLDER%\"
echo "DONE"
ECHO "DONE"
echo "Copy application ..."
ECHO "Copy application ..."
set RESOURCES_FOLDER=%CONTENTS_FOLDER%\Resources
copy "%RELEASES_FOLDER%\piskel\piskel.nw" "%RESOURCES_FOLDER%\"
mv "%RESOURCES_FOLDER%\piskel.nw" "%RESOURCES_FOLDER%\app.nw"
echo "%RESOURCES_FOLDER%"
echo "DONE"
ECHO "%RESOURCES_FOLDER%"
ECHO "DONE"
echo "Copy icon ..."
rm "%RESOURCES_FOLDER%\nw.icns"
copy "%MISC_FOLDER%\desktop\nw.icns" "%RESOURCES_FOLDER%\"
echo "DONE"
ECHO "Copy icon ..."
DEL "%RESOURCES_FOLDER%\nw.icns"
COPY "%MISC_FOLDER%\desktop\nw.icns" "%RESOURCES_FOLDER%\"
ECHO "DONE"
pause

View File

@ -1,36 +1,47 @@
setlocal
@echo off
@ECHO off
pushd ..\..
SETLOCAL
PUSHD ..\..
set PISKEL_HOME=%cd%
popd
POPD
echo "Building Piskel executable for Windows ..."
set VBOX_PATH="C:\Program Files (x86)\Enigma Virtual Box"
set RESOURCE_HACKER_PATH="C:\Program Files (x86)\Resource Hacker"
echo "Creating release directory ..."
mkdir "%PISKEL_HOME%\dest\desktop\releases\windows"
echo "DONE"
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
echo "Packaging executable ..."
copy /b "%PISKEL_HOME%\dest\desktop\cache\win\0.9.2\nw.exe"+"%PISKEL_HOME%\dest\desktop\releases\piskel\piskel.nw" "%PISKEL_HOME%\dest\desktop\releases\windows\piskel.exe"
echo "DONE"
ECHO "Building Piskel executable for Windows ..."
echo "Copying dependencies ..."
copy "%PISKEL_HOME%\dest\desktop\cache\win\0.9.2\*.dll" "%PISKEL_HOME%\dest\desktop\releases\windows\"
copy "%PISKEL_HOME%\dest\desktop\cache\win\0.9.2\nw.pak" "%PISKEL_HOME%\dest\desktop\releases\windows\"
echo "DONE"
ECHO "Creating release directory ..."
MKDIR "%DEST_FOLDER%"
ECHO "DONE"
ECHO "Packaging executable ..."
COPY /b "%APP_BIN%\nw.exe"+"%RELEASES_FOLDER%\piskel\piskel.nw" "%DEST_FOLDER%\piskel-raw.exe"
ECHO "DONE"
echo "Updating Piskel icon"
ResHacker -addoverwrite "%PISKEL_HOME%\dest\desktop\releases\windows\piskel.exe", "%PISKEL_HOME%\dest\desktop\releases\windows\piskel-release.exe", "%PISKEL_HOME%\misc\desktop\logo.ico", ICONGROUP, IDR_MAINFRAME, 1033
rm "%PISKEL_HOME%\dest\desktop\releases\windows\piskel.exe"
mv "%PISKEL_HOME%\dest\desktop\releases\windows\piskel-release.exe" "%PISKEL_HOME%\dest\desktop\releases\windows\piskel.exe"
echo "DONE"
ECHO "COPYing dependencies ..."
COPY "%APP_BIN%\*.dll" "%DEST_FOLDER%\"
COPY "%APP_BIN%\nw.pak" "%DEST_FOLDER%\"
ECHO "DONE"
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"
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"
pause
PAUSE
explorer "%DEST_FOLDER%\"
explorer "%PISKEL_HOME%\dest\desktop\releases\windows"
endlocal
ENDLOCAL