Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constuct installer #31

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@ In case installation didn't work in the first attempt, you may have to call this
napari --reset
```

## For developers: Constructing an installer

Using [constructor](https://github.com/conda/constructor) we can build operating-system specific installers like this:

```
mamba install constructor
constructor installer
```

## Contributing

Contributions are very welcome.
Expand Down
11 changes: 11 additions & 0 deletions installer/Mac/create_app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# This script is used to create the devbio-napari.app bundle during installation.

if [ "${INSTALLER_TYPE}" == "PKG" ]; then
app_dir=$(dirname "$(dirname "$(dirname "$(dirname "${PREFIX}")")")")
cd "${app_dir}" || exit
tar -xzf "${PREFIX}/devbio-napari.app.tar.gz"
fi

# cleanup
rm -rf "${PREFIX}/devbio-napari.app.tar.gz"
Binary file added installer/Mac/devbio-napari.app.tar.gz
Binary file not shown.
91 changes: 91 additions & 0 deletions installer/Mac/devbio-napari.app/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>*</string>
</array>
<key>CFBundleTypeOSTypes</key>
<array>
<string>****</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>droplet</string>
<key>CFBundleIconFile</key>
<string>droplet</string>
<key>CFBundleIdentifier</key>
<string>com.apple.ScriptEditor.id.devbio-napari</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>devbio-napari</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.8</string>
<key>CFBundleSignature</key>
<string>dplt</string>
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
<key>x86_64</key>
<string>10.6</string>
</dict>
<key>LSRequiresCarbon</key>
<true/>
<key>NSAppleEventsUsageDescription</key>
<string>This script needs to control other applications to run.</string>
<key>NSAppleMusicUsageDescription</key>
<string>This script needs access to your music to run.</string>
<key>NSCalendarsUsageDescription</key>
<string>This script needs access to your calendars to run.</string>
<key>NSCameraUsageDescription</key>
<string>This script needs access to your camera to run.</string>
<key>NSContactsUsageDescription</key>
<string>This script needs access to your contacts to run.</string>
<key>NSHomeKitUsageDescription</key>
<string>This script needs access to your HomeKit Home to run.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This script needs access to your microphone to run.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This script needs access to your photos to run.</string>
<key>NSRemindersUsageDescription</key>
<string>This script needs access to your reminders to run.</string>
<key>NSSiriUsageDescription</key>
<string>This script needs access to Siri to run.</string>
<key>NSSystemAdministrationUsageDescription</key>
<string>This script needs access to administer this system to run.</string>
<key>OSAAppletShowStartupScreen</key>
<false/>
<key>WindowState</key>
<dict>
<key>bundleDividerCollapsed</key>
<true/>
<key>bundlePositionOfDivider</key>
<real>0.0</real>
<key>dividerCollapsed</key>
<false/>
<key>eventLogLevel</key>
<integer>2</integer>
<key>name</key>
<string>ScriptWindowState</string>
<key>positionOfDivider</key>
<real>443</real>
<key>savedFrame</key>
<string>20 259 700 678 0 0 1512 944 </string>
<key>selectedTab</key>
<string>result</string>
</dict>
</dict>
</plist>
Binary file not shown.
1 change: 1 addition & 0 deletions installer/Mac/devbio-napari.app/Contents/PkgInfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APPLdplt
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
11 changes: 11 additions & 0 deletions installer/Mac/devbio-napari.app/Contents/Resources/napari
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
ENV_DIR="$(dirname "$0")/devbio-napari"

export PATH="$ENV_DIR/bin:$PATH"
export CONDA_PREFIX="$ENV_DIR"
export CONDA_DEFAULT_ENV="$ENV_DIR"
export CONDA_PROMPT_MODIFIER="(devbio-napari) "
export CONDA_SHLVL=1
export LD_LIBRARY_PATH="$ENV_DIR/lib:$LD_LIBRARY_PATH"

$ENV_DIR/bin/naparia "$@"
11 changes: 11 additions & 0 deletions installer/Mac/napari
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
ENV_DIR="$(dirname "$0")/devbio-napari"

export PATH="$ENV_DIR/bin:$PATH"
export CONDA_PREFIX="$ENV_DIR"
export CONDA_DEFAULT_ENV="$ENV_DIR"
export CONDA_PROMPT_MODIFIER="(devbio-napari) "
export CONDA_SHLVL=1
export LD_LIBRARY_PATH="$ENV_DIR/lib:$LD_LIBRARY_PATH"

$ENV_DIR/bin/naparia "$@"
41 changes: 41 additions & 0 deletions installer/construct.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: devbio-napari
version: 0.8.0
installer_type: all

channels:
- conda-forge

specs:
- python=3.9
- devbio-napari=0.8.0

license_file: ../LICENSE

readme_text: |
devbio-napari

A bundle of napari plugins useful for 3D+t image processing and analysis for studying developmental biology.

https://github.com/haesleinhuepf/devbio-napari

welcome_image: devbio-napari-icon.png

# MacOS specific pkg installer that builds a .app
default_location_pkg: Applications/devbio-napari.app/Contents/Resources

pkg_name: devbio-napari

extra_files:
- Mac/devbio-napari.app.tar.gz: devbio-napari.app.tar.gz

post_install: Mac/create_app.sh

welcome_text: |
Welcome to the devbio-napari installer!

This installer will install devbio-napari.app. We recommend to install it to the default location, i.e. the 'Applications' folder of your home directory.

If you have any questions or issues, please visit https://github.com/haesleinhuepf/devbio-napari

conclusion_text: |
If you installed to the default location, you can find devbio-napari.app in your users ~/Applications folder.
Binary file added installer/devbio-napari-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added installer/devbio-napari-icon.svgz
Binary file not shown.