diff --git a/Gruntfile.js b/Gruntfile.js index ea72fe39..6fab6404 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -131,6 +131,7 @@ module.exports = function(grunt) { main: { files: [ {src: ['src/piskel-boot.js'], dest: 'dest/piskel-boot.js'}, + {src: ['src/logo.png'], dest: 'dest/logo.png'}, {src: ['src/js/lib/iframeLoader.js'], dest: 'dest/js/lib/iframeLoader.js'}, {expand: true, src: ['img/**'], cwd: 'src/', dest: 'dest/', filter: 'isFile'}, {expand: true, src: ['**/*.html'], cwd: 'src/', dest: 'dest/', filter: 'isFile'} diff --git a/misc/desktop/Info.plist b/misc/desktop/Info.plist new file mode 100644 index 00000000..2d9d2b93 --- /dev/null +++ b/misc/desktop/Info.plist @@ -0,0 +1,101 @@ + + + + + BuildMachineOSBuild + 12C3006 + CFBundleDevelopmentRegion + en + CFBundleDisplayName + Piskel + CFBundleDocumentTypes + + + CFBundleTypeIconFile + nw.icns + CFBundleTypeName + node-webkit App + CFBundleTypeRole + Viewer + LSHandlerRank + Owner + LSItemContentTypes + + com.intel.nw.app + + + + CFBundleTypeName + Folder + CFBundleTypeOSTypes + + fold + + CFBundleTypeRole + Viewer + LSHandlerRank + None + + + CFBundleExecutable + node-webkit + CFBundleIconFile + nw.icns + CFBundleIdentifier + com.intel.nw + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Piskel + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.1.0 + DTSDKBuild + 11E52 + DTSDKName + macosx10.7 + DTXcode + 0452 + DTXcodeBuild + 4G2008a + LSFileQuarantineEnabled + + LSMinimumSystemVersion + 10.6.0 + NSPrincipalClass + NSApplication + NSSupportsAutomaticGraphicsSwitching + + SCMRevision + 239963 + UTExportedTypeDeclarations + + + UTTypeConformsTo + + com.pkware.zip-archive + + UTTypeDescription + node-webkit App + UTTypeIconFile + nw.icns + UTTypeIdentifier + com.intel.nw.app + UTTypeReferenceURL + https://github.com/rogerwang/node-webkit/wiki/How-to-package-and-distribute-your-apps + UTTypeTagSpecification + + com.apple.ostype + node-webkit + public.filename-extension + + nw + + public.mime-type + application/x-node-webkit-app + + + + + diff --git a/misc/desktop/logo.ico b/misc/desktop/logo.ico new file mode 100644 index 00000000..13cc8aea Binary files /dev/null and b/misc/desktop/logo.ico differ diff --git a/misc/desktop/nw.icns b/misc/desktop/nw.icns new file mode 100644 index 00000000..65f813af Binary files /dev/null and b/misc/desktop/nw.icns differ diff --git a/misc/cursors-resources.jpg b/misc/icons/cursors-resources.jpg similarity index 100% rename from misc/cursors-resources.jpg rename to misc/icons/cursors-resources.jpg diff --git a/misc/eraser.ai b/misc/icons/eraser.ai similarity index 100% rename from misc/eraser.ai rename to misc/icons/eraser.ai diff --git a/misc/icons.png b/misc/icons/icons.png similarity index 100% rename from misc/icons.png rename to misc/icons/icons.png diff --git a/misc/import-icon.svg b/misc/icons/import-icon.svg similarity index 100% rename from misc/import-icon.svg rename to misc/icons/import-icon.svg diff --git a/misc/mirror.ai b/misc/icons/mirror.ai similarity index 100% rename from misc/mirror.ai rename to misc/icons/mirror.ai diff --git a/misc/rectangle.ai b/misc/icons/rectangle.ai similarity index 100% rename from misc/rectangle.ai rename to misc/icons/rectangle.ai diff --git a/misc/rectangle_selection.ai b/misc/icons/rectangle_selection.ai similarity index 100% rename from misc/rectangle_selection.ai rename to misc/icons/rectangle_selection.ai diff --git a/misc/stroke.ai b/misc/icons/stroke.ai similarity index 100% rename from misc/stroke.ai rename to misc/icons/stroke.ai diff --git a/misc/swap-arrow-small.png b/misc/icons/swap-arrow-small.png similarity index 100% rename from misc/swap-arrow-small.png rename to misc/icons/swap-arrow-small.png diff --git a/misc/swap-arrow-square-small-grey.png b/misc/icons/swap-arrow-square-small-grey.png similarity index 100% rename from misc/swap-arrow-square-small-grey.png rename to misc/icons/swap-arrow-square-small-grey.png diff --git a/misc/swap-arrow-square-small.png b/misc/icons/swap-arrow-square-small.png similarity index 100% rename from misc/swap-arrow-square-small.png rename to misc/icons/swap-arrow-square-small.png diff --git a/misc/swap-arrow-square.svg b/misc/icons/swap-arrow-square.svg similarity index 100% rename from misc/swap-arrow-square.svg rename to misc/icons/swap-arrow-square.svg diff --git a/misc/swap-arrow.svg b/misc/icons/swap-arrow.svg similarity index 100% rename from misc/swap-arrow.svg rename to misc/icons/swap-arrow.svg diff --git a/misc/scripts/package-mac-application.cmd b/misc/scripts/package-mac-application.cmd new file mode 100644 index 00000000..c76b82f0 --- /dev/null +++ b/misc/scripts/package-mac-application.cmd @@ -0,0 +1,56 @@ +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 \ No newline at end of file diff --git a/misc/scripts/package-windows-executable.cmd b/misc/scripts/package-windows-executable.cmd new file mode 100644 index 00000000..1e6019d0 --- /dev/null +++ b/misc/scripts/package-windows-executable.cmd @@ -0,0 +1,36 @@ +setlocal +@echo off + +pushd ..\.. +set PISKEL_HOME=%cd% +popd + +echo "Building Piskel executable for Windows ..." + +echo "Creating release directory ..." +mkdir "%PISKEL_HOME%\dest\desktop\releases\windows" +echo "DONE" + +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 "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 "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" + + + +pause + +explorer "%PISKEL_HOME%\dest\desktop\releases\windows" + +endlocal \ No newline at end of file diff --git a/package.json b/package.json index 96768189..6e38320c 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,10 @@ "nodewebkit": "0.8.4" }, "window": { - "toolbar": false + "title": "Piskel", + "icon": "dest/logo.png", + "toolbar": false, + "width": 1000, + "height": 500 } } diff --git a/src/logo.png b/src/logo.png new file mode 100644 index 00000000..8ee97465 Binary files /dev/null and b/src/logo.png differ