{"id":15026565,"url":"https://github.com/linusu/node-appdmg","last_synced_at":"2025-05-14T14:07:43.166Z","repository":{"id":462904,"uuid":"14302463","full_name":"LinusU/node-appdmg","owner":"LinusU","description":"💾 Generate your app dmgs","archived":false,"fork":false,"pushed_at":"2023-03-03T12:59:14.000Z","size":2180,"stargazers_count":1695,"open_issues_count":51,"forks_count":152,"subscribers_count":45,"default_branch":"master","last_synced_at":"2024-10-29T15:28:39.316Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LinusU.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2013-11-11T14:10:32.000Z","updated_at":"2024-10-24T11:38:58.000Z","dependencies_parsed_at":"2023-07-05T15:01:45.653Z","dependency_job_id":null,"html_url":"https://github.com/LinusU/node-appdmg","commit_stats":{"total_commits":180,"total_committers":25,"mean_commits":7.2,"dds":0.2944444444444444,"last_synced_commit":"bb0f693a74341fda7934b42fd0adcb37022f6e05"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fnode-appdmg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fnode-appdmg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fnode-appdmg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fnode-appdmg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinusU","download_url":"https://codeload.github.com/LinusU/node-appdmg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345266,"owners_count":21088244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest"],"created_at":"2024-09-24T20:04:42.341Z","updated_at":"2025-04-11T05:11:20.444Z","avatar_url":"https://github.com/LinusU.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-appdmg\n\nGenerate beautiful DMG-images for your OS X applications.\n\n## Installation\n\n```sh\nnpm install -g appdmg\n```\n\n## Usage\n\n```sh\nappdmg \u003cjson-path\u003e \u003cdmg-path\u003e\n```\n\n- `json-path`: Path to the JSON Specification file\n- `dmg-path`:  Path at which to place the final DMG\n\n## Test\n\nTo produce a test DMG to your desktop, run the following command:\n\n```sh\nappdmg test/assets/appdmg.json ~/Desktop/test.dmg\n```\n\n## JSON Input\n\n![Visualization](/help/help.png?raw=true)\n\nThe JSON input for the image follows a simple structure. All paths are relative to\nthe JSON file's path.\n\n### Example\n\n```json\n{\n  \"title\": \"Test Application\",\n  \"icon\": \"test-app.icns\",\n  \"background\": \"test-background.png\",\n  \"contents\": [\n    { \"x\": 448, \"y\": 344, \"type\": \"link\", \"path\": \"/Applications\" },\n    { \"x\": 192, \"y\": 344, \"type\": \"file\", \"path\": \"TestApp.app\" }\n  ]\n}\n```\n\n### Specification\n\n- `title` (string, required) - The title of the produced DMG, which will be shown when mounted\n- `icon` (string, optional) - Path to your icon, which will be shown when mounted\n- `background` (string, optional) - Path to your background\n- `background-color` (string, optional) - Background color (accepts css colors)\n- `icon-size` (number, optional) - Size of all the icons inside the DMG\n- `window` (object, optional) - Window options\n  - `position` (object, optional) - Position when opened\n    - `x` (number, required) - X position relative to left of the screen\n    - `y` (number, required) - Y position relative to bottom of the screen\n  - `size` (object, optional) - Window size\n    - `width` (number, required) - Window width\n    - `height` (number, required) - Window height\n- `format` (enum[string], optional) - Disk image format\n    - `UDRW` - UDIF read/write image\n    - `UDRO` - UDIF read-only image\n    - `UDCO` - UDIF ADC-compressed image\n    - `UDZO` - UDIF zlib-compressed image\n    - `UDBZ` - UDIF bzip2-compressed image (OS X 10.4+ only)\n    - `ULFO` - UDIF lzfse-compressed image (OS X 10.11+ only)\n    - `ULMO` - UDIF lzma-compressed image (macOS 10.15+ only)\n- `filesystem` (enum[string], optional) - Disk image filesystem\n    - `HFS+`\n    - `APFS` (macOS 10.13+ only)\n- `contents` (array[object], required) - This is the contents of your DMG.\n    - `x` (number, required) - X position relative to icon center\n    - `y` (number, required) - Y position relative to icon center\n    - `type` (enum[string], required)\n      - `link` - Creates a link to the specified target\n      - `file` - Adds a file to the DMG\n      - `position` - Positions a present file\n    - `path` (string, required) - Path to the file\n    - `name` (string, optional) - Name of the file within the DMG\n- `code-sign` (object, optional) - Options for codesigning the DMG\n  - `signing-identity` (string, required) - The identity with which to sign the resulting DMG\n  - `identifier` (string, optional) - Explicitly set the unique identifier string that is embedded in code signatures\n\n`0.1.x` used a different JSON format. This format is still supported but\ndeprecated, please update your json.\n\n### Retina background\n\nFinder can display retina backgrounds if packaged correctly into a `.tiff`\nfile. `appdmg` will do this for you automatically if it can find a file\nwith the same name as the background appended with `@2x`.\n\nE.g. if the json contains `\"background\": \"TestBkg.png\"` then add a file\nwith the name `TestBkg@2x.png` into the same folder.\n\n## API\n\nThe application can also be called from within\nanother javascript file, example:\n\n```javascript\n\nconst appdmg = require('appdmg');\nconst ee = appdmg({ source: 'test/appdmg.json', target: 'test.dmg' });\n\nee.on('progress', function (info) {\n\n  // info.current is the current step\n  // info.total is the total number of steps\n  // info.type is on of 'step-begin', 'step-end'\n\n  // 'step-begin'\n  // info.title is the title of the current step\n\n  // 'step-end'\n  // info.status is one of 'ok', 'skip', 'fail'\n\n});\n\nee.on('finish', function () {\n  // There now is a `test.dmg` file\n});\n\nee.on('error', function (err) {\n  // An error occurred\n});\n\n```\n\nYou can also pass in the specification directly instead of reading it from a file. `basepath` should be a path which will be used to resolve other paths in the specification.\n\n```javascript\nconst ee = appdmg({\n  target: 'test.dmg',\n  basepath: __dirname,\n  specification: {\n    \"title\": \"Test Title\",\n    // ...\n  }\n});\n```\n\n## OS Support\n\nCurrently the only supported os is Mac OS X.\n\nTrack the status of this here: https://github.com/LinusU/node-appdmg/issues/14\n\n## Hidden files\n\nBy default hidden files will show for users with `com.apple.finder AppleShowAllFiles`\nset to `TRUE`. This can be worked around by moving all hidden files outside the initial\nwindow size (using `\"type\": \"position\"`), this has the side-effect of enabling a scrollbar.\n\nFiles to usually move:\n\n- `.background`\n- `.DS_Store`\n- `.Trashes`\n- `.VolumeIcon.icns`\n\n## Alternatives\n\n- [create-dmg](https://github.com/andreyvit/create-dmg/blob/master/README.md), a Bash script\n- [dmgbuild](https://pypi.python.org/pypi/dmgbuild), a Python version\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinusu%2Fnode-appdmg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinusu%2Fnode-appdmg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinusu%2Fnode-appdmg/lists"}