diff options
author | Filipp Lepalaan <filipp@mac.com> | 2016-04-29 12:27:01 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2016-04-29 12:27:01 +0300 |
commit | 956d83d50cf63da16b1074afa2a93346de8ff71e (patch) | |
tree | 64b63970ae44896eea7c6fad9534e8987d3d8355 | |
download | ArchInstall-956d83d50cf63da16b1074afa2a93346de8ff71e.tar.gz ArchInstall-956d83d50cf63da16b1074afa2a93346de8ff71e.tar.bz2 ArchInstall-956d83d50cf63da16b1074afa2a93346de8ff71e.zip |
Initial commit
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | README.md | 45 | ||||
-rwxr-xr-x | makefile | 20 | ||||
-rwxr-xr-x | scripts/postinstall | 5 |
4 files changed, 73 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..04683bd --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +payload/* +*.pkg +*.dmg diff --git a/README.md b/README.md new file mode 100644 index 0000000..4b25787 --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +### Introduction + +This script will build an admin-friendlier PKG from an ArchiCAD installer and updater. The result will be a single PKG file that will install both ArchiCAD and the hotfix in one go. + +The idea behind this approach is simple - package the installer and updater and install them into a temporary location (under /tmp) and then use a *postinstall* script to run those packages silently. + + +### Requirements + +- [ArchiCAD installer](http://www.graphisoft.com/downloads/) +- [ArchiCAD hotfix installer](http://www.graphisoft.com/downloads/archicad/updates/) +- XCode command-line tools (pkgbuild and make) to build the installer + + +### How to + +- Generate a "deployed installation" package using the ArchiCAD installer +- Copy the result to the **payload** folder and rename the installer **Install** +- Copy the hotfix to the **payload** folder and rename it **Update** +- Run *make pkg* to create the ArchiCAD installer. +- Run *make dmg* to create a DMG for the installer. + +![ArchInstall](http://unflyingobject.com/tmp/archinstall/done.png) + + +### Bugs + +The installer will prompt for an admin password. I suspect this is due to the CodeMeter installer. + + +### License + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2016 Filipp Lepalaan <filipp@mac.com> + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/makefile b/makefile new file mode 100755 index 0000000..8f6439b --- /dev/null +++ b/makefile @@ -0,0 +1,20 @@ +NAME=ArchiCAD +PKG=${NAME}.pkg +FOLDER="Install ${NAME}" +TARGET=/tmp/ArchiCADInstaller +VERSION=$(defaults read ${PWD}/payload/Install.app/Contents/ArchiCAD\ Installer.app/Contents/Info CFBundleShortVersionString) +ID=com.graphisoft.archicad${VERSION} + +pkg: + pkgbuild --identifier ${ID} --root payload --install-location ${TARGET} --scripts scripts ${PKG} + +dmg:${PKG} + mkdir ${FOLDER} + mv ${PKG} ${FOLDER} + hdiutil create -srcfolder ${FOLDER} ${FOLDER}.dmg + +clean: + rm -rf ${TARGET} ${FOLDER} + +all: + pkg dmg diff --git a/scripts/postinstall b/scripts/postinstall new file mode 100755 index 0000000..515f8c5 --- /dev/null +++ b/scripts/postinstall @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +/private/tmp/ArchiCADInstaller/Install.app/Contents/ArchiCAD\ Installer.app/Contents/MacOS/ArchiCAD\ Installer +/private/tmp/ArchiCADInstaller/Update.app/Contents/MacOS/ArchiCAD* -silent +exit 0 |