Skip to content

Commit

Permalink
Add pkg installer template.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Jun 4, 2024
1 parent 03ec253 commit a94de87
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
15 changes: 15 additions & 0 deletions {{ cookiecutter.format }}/installer/Distribution.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<installer-script minSpecVersion="1.000000">
<title>{{ cookiecutter.formal_name }}</title>
<welcome file="welcome.html" mime-type="text/html" />
<license file="LICENSE" mime-type="text/plain" />
<options customize="never" allow-external-scripts="no"/>
<domains enable_localSystem="true" />
<choices-outline>
<line choice="{{ cookiecutter.app_name }}"/>
</choices-outline>
<choice id="{{ cookiecutter.app_name }}" title="{{ cookiecutter.app_name }}">
<pkg-ref id="{{ cookiecutter.app_name }}.pkg"/>
</choice>
<pkg-ref id="{{ cookiecutter.app_name }}.pkg" auth="Root">{{ cookiecutter.app_name }}.pkg</pkg-ref>
</installer-script>
15 changes: 15 additions & 0 deletions {{ cookiecutter.format }}/installer/resources/welcome.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<style>
* {
font-family: sans-serif;
}
</style>
</head>
<body>
<h1>{{ cookiecutter.formal_name }} {{ cookiecutter.version }}</h1>
<p>This installer will guide you through the steps necessary to install {{ cookiecutter.formal_name }}.</p>
</body>
</html>
7 changes: 7 additions & 0 deletions {{ cookiecutter.format }}/installer/scripts/postinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
echo "Post installation process started"

echo "Install binary symlink"
ln -si "/Library/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/{{ cookiecutter.formal_name }}" /usr/local/bin/{{ cookiecutter.app_name }}

echo "Post installation process finished"

0 comments on commit a94de87

Please sign in to comment.