piskel/misc/scripts/package-mac-application.cmd

56 lines
1.3 KiB
Batchfile
Raw Normal View History

2014-06-21 20:39:37 +00:00
setlocal
@echo off
pushd ..\..
set PISKEL_HOME=%cd%
popd
set APP_BIN=%PISKEL_HOME%\dest\desktop\cache\mac\0.9.2
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 "Creating release directory ..."
mkdir %DEST_FOLDER%
echo "DONE"
echo "Creating application folder ..."
mkdir "%DEST_FOLDER%\piskel.app"
echo "DONE"
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"
pause
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 "Copy Info.plist ..."
set CONTENTS_FOLDER=%DEST_FOLDER%\piskel.app\Contents
copy "%MISC_FOLDER%\desktop\Info.plist" "%CONTENTS_FOLDER%\"
echo "DONE"
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 "Copy icon ..."
rm "%RESOURCES_FOLDER%\nw.icns"
copy "%MISC_FOLDER%\desktop\nw.icns" "%RESOURCES_FOLDER%\"
echo "DONE"
pause
explorer "%DEST_FOLDER%"
endlocal