From 956d83d50cf63da16b1074afa2a93346de8ff71e Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 29 Apr 2016 12:27:01 +0300 Subject: Initial commit --- .gitignore | 3 +++ README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ makefile | 20 ++++++++++++++++++++ scripts/postinstall | 5 +++++ 4 files changed, 73 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100755 makefile create mode 100755 scripts/postinstall 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 + + 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 -- cgit v1.2.3