{"action":"created","issue":{"url":"https://api.github.com/repos/Gisto/nwjs-shell-builder/issues/8","labels_url":"https://api.github.com/repos/Gisto/nwjs-shell-builder/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/Gisto/nwjs-shell-builder/issues/8/comments","events_url":"https://api.github.com/repos/Gisto/nwjs-shell-builder/issues/8/events","html_url":"https://github.com/Gisto/nwjs-shell-builder/issues/8","id":93573386,"number":8,"title":"Would you be interested in an OSX .pkg building extension that works on linux?","user":{"login":"SchizoDuckie","id":111710,"avatar_url":"https://avatars.githubusercontent.com/u/111710?v=3","gravatar_id":"","url":"https://api.github.com/users/SchizoDuckie","html_url":"https://github.com/SchizoDuckie","followers_url":"https://api.github.com/users/SchizoDuckie/followers","following_url":"https://api.github.com/users/SchizoDuckie/following{/other_user}","gists_url":"https://api.github.com/users/SchizoDuckie/gists{/gist_id}","starred_url":"https://api.github.com/users/SchizoDuckie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SchizoDuckie/subscriptions","organizations_url":"https://api.github.com/users/SchizoDuckie/orgs","repos_url":"https://api.github.com/users/SchizoDuckie/repos","events_url":"https://api.github.com/users/SchizoDuckie/events{/privacy}","received_events_url":"https://api.github.com/users/SchizoDuckie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-07-07T16:31:39Z","updated_at":"2015-07-21T19:14:12Z","closed_at":null,"body":"I just created this:\r\n\r\nAnd would be more than happy to create a pull request to inject it into nwjs-shell-builder\r\n\r\n```shell\r\n#!/bin/bash\r\n\r\nBUILD_DIR=\"/var/www/deploy/TMP/osx-ia32/latest-git\"\r\nBASE_DIR=\"/var/www/deploy/osx\" \r\nVERSION=\"1.1.3\"\r\nIDENTIFIER=\"tv.duckie\"\r\nAPPNAME=\"DuckieTV\"\r\nBACKGROUND=\"/var/www/DuckieTV/img/duckietv.png\"\r\n\r\nrm -rf \"$BASE_DIR/darwin\"\r\nmkdir -p \"$BASE_DIR/darwin/flat/Resources/en.lproj\"\r\nmkdir -p \"$BASE_DIR/darwin/flat/base.pkg/\"\r\nmkdir -p \"$BASE_DIR/darwin/root/Applications\"\r\ncp -R $BUILD_DIR/*.* $BASE_DIR/darwin/root/Applications\r\ncp $BACKGROUND $BASE_DIR/darwin/flat/Resources/en.lproj/background\r\nNUM_FILES=$(find ${BASE_DIR}/darwin/root | wc -l)\r\nINSTALL_KB_SIZE=$(du -k -s ${BASE_DIR}/darwin/root | awk '{print $1}')\r\n\r\ncat <<EOF > ${BASE_DIR}/darwin/flat/base.pkg/PackageInfo\r\n<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\r\n<pkg-info overwrite-permissions=\"true\" relocatable=\"false\" identifier=\"${IDENTIFIER}\" postinstall-action=\"none\" version=\"${VERSION}\" format-version=\"2\" generator-version=\"InstallCmds-502 (14B25)\" auth=\"root\">\r\n    <payload numberOfFiles=\"${NUM_FILES}\" installKBytes=\"${INSTALL_KB_SIZE}\"/>\r\n    <bundle-version>\r\n        <bundle id=\"${IDENTIFIER}\" CFBundleIdentifier=\"${IDENTIFIER}\" path=\"./Applications/DuckieTV.app\" CFBundleVersion=\"1.3.0\"/>\r\n    </bundle-version>\r\n    <update-bundle/>\r\n    <atomic-update-bundle/>\r\n    <strict-identifier/>\r\n    <relocate/>\r\n    <scripts/>\r\n</pkg-info>\r\nEOF\r\n\r\ncat <<EOF > ${BASE_DIR}/darwin/flat/Distribution\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<installer-script minSpecVersion=\"1.000000\" authoringTool=\"com.apple.PackageMaker\" authoringToolVersion=\"3.0.3\" authoringToolBuild=\"174\">\r\n    <title>${APPNAME} ${VERSION}</title>\r\n    <options customize=\"never\" allow-external-scripts=\"no\"/>\r\n    <background file=\"background\" alignment=\"bottomleft\" scaling=\"none\"/>\r\n    <domains enable_anywhere=\"true\"/>\r\n    <installation-check script=\"pm_install_check();\"/>\r\n    <script>function pm_install_check() {\r\n      if(!(system.compareVersions(system.version.ProductVersion,'10.5') >= 0)) {\r\n        my.result.title = 'Failure';\r\n        my.result.message = 'You need at least Mac OS X 10.5 to install ${APPNAME}.';\r\n        my.result.type = 'Fatal';\r\n        return false;\r\n      }\r\n      return true;\r\n    }\r\n    </script>\r\n    <choices-outline>\r\n        <line choice=\"choice1\"/>\r\n    </choices-outline>\r\n    <choice id=\"choice1\" title=\"base\">\r\n        <pkg-ref id=\"${IDENTIFIER}.base.pkg\"/>\r\n    </choice>\r\n    <pkg-ref id=\"${IDENTIFIER}.base.pkg\" installKBytes=\"${INSTALL_KB_SIZE}\" version=\"${VERSION}\" auth=\"Root\">#base.pkg</pkg-ref>\r\n</installer-script>\r\nEOF\r\n\r\nPKG_LOCATION=\"/var/www/deploy/osx/${APPNAME}-${VERSION}.pkg\"\r\n\r\n( cd ${BASE_DIR}/darwin/root && find . | cpio -o --format odc --owner 0:80 | gzip -c ) > ${BASE_DIR}/darwin/flat/base.pkg/Payload\r\nmkbom -u 0 -g 80 ${BASE_DIR}/darwin/root ${BASE_DIR}/darwin/flat/base.pkg/Bom \r\n( cd ${BASE_DIR}/darwin/flat/ && xar --compression none -cf \"${PKG_LOCATION}\" * ) \r\necho \"osx package has been built: ${PKG_LOCATION}\"\r\n```\r\n\r\nwhich will deliver you a nice .pkg that looks like this: \r\n![image](https://cloud.githubusercontent.com/assets/111710/8551396/98ec2208-24d6-11e5-8c3c-2d4816b79a30.png)\r\n\r\n\r\nI'm also planning to create a win32 installer using innosetup, which we should also be able to run directly from linux using wine."},"comment":{"url":"https://api.github.com/repos/Gisto/nwjs-shell-builder/issues/comments/123449584","html_url":"https://github.com/Gisto/nwjs-shell-builder/issues/8#issuecomment-123449584","issue_url":"https://api.github.com/repos/Gisto/nwjs-shell-builder/issues/8","id":123449584,"user":{"login":"SchizoDuckie","id":111710,"avatar_url":"https://avatars.githubusercontent.com/u/111710?v=3","gravatar_id":"","url":"https://api.github.com/users/SchizoDuckie","html_url":"https://github.com/SchizoDuckie","followers_url":"https://api.github.com/users/SchizoDuckie/followers","following_url":"https://api.github.com/users/SchizoDuckie/following{/other_user}","gists_url":"https://api.github.com/users/SchizoDuckie/gists{/gist_id}","starred_url":"https://api.github.com/users/SchizoDuckie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SchizoDuckie/subscriptions","organizations_url":"https://api.github.com/users/SchizoDuckie/orgs","repos_url":"https://api.github.com/users/SchizoDuckie/repos","events_url":"https://api.github.com/users/SchizoDuckie/events{/privacy}","received_events_url":"https://api.github.com/users/SchizoDuckie/received_events","type":"User","site_admin":false},"created_at":"2015-07-21T19:14:12Z","updated_at":"2015-07-21T19:14:12Z","body":"@sanusart I also modified you NSIS builder a bit for windows and made it almost generic: \r\n\r\nhttps://github.com/SchizoDuckie/DuckieTV/blob/angular/build/build_windows.sh"}}