mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
Add installer script for macchew os
This commit is contained in:
parent
0cb4300a4a
commit
90bd6176bb
2 changed files with 44 additions and 0 deletions
41
installer/mac/Scripts/postinstall
Executable file
41
installer/mac/Scripts/postinstall
Executable file
|
@ -0,0 +1,41 @@
|
||||||
|
#!/usr/bin/env osascript
|
||||||
|
|
||||||
|
|
||||||
|
set tmpPath to POSIX path of "/tmp/"
|
||||||
|
set binPath to POSIX path of (tmpPath & "geode-install/")
|
||||||
|
|
||||||
|
try
|
||||||
|
set gdPath to (the POSIX path of (choose file with prompt "Please choose the Geometry Dash application to install Geode to:" of type {"app"}))
|
||||||
|
on error
|
||||||
|
display dialog "Prompt cancelled."
|
||||||
|
do shell script "rm -rf " & binPath
|
||||||
|
error number -128
|
||||||
|
end try
|
||||||
|
|
||||||
|
set execPath to (gdPath & "Contents/MacOS/Geometry Dash")
|
||||||
|
|
||||||
|
tell application "System Events"
|
||||||
|
if not exists file execPath then
|
||||||
|
display dialog "Not a valid Geometry Dash installation."
|
||||||
|
error number -128
|
||||||
|
end if
|
||||||
|
end tell
|
||||||
|
|
||||||
|
set frameworkPath to POSIX path of (gdPath & "Contents/Frameworks/")
|
||||||
|
set fmodPath to "libfmod.dylib"
|
||||||
|
set fmodOriginalPath to "libfmod-original.dylib"
|
||||||
|
set geodePath to "Geode.dylib"
|
||||||
|
set bootstrapperPath to "GeodeBootstrapper.dylib"
|
||||||
|
set resourcesPath to "resources/"
|
||||||
|
set newGeodePath to "Contents/geode/"
|
||||||
|
set newResourcesPath to (newGeodePath & "resources/geode.loader/")
|
||||||
|
|
||||||
|
do shell script "mv -n " & (frameworkPath & fmodPath) & " " & (frameworkPath & fmodOriginalPath)
|
||||||
|
do shell script "mv " & (binPath & geodePath) & " " & (frameworkPath & geodePath)
|
||||||
|
do shell script "mv " & (binPath & bootstrapperPath) & " " & (frameworkPath & bootstrapperPath)
|
||||||
|
do shell script "mv " & (binPath & fmodPath) & " " & (frameworkPath & fmodPath)
|
||||||
|
do shell script "mkdir -p " & (gdPath & newResourcesPath)
|
||||||
|
do shell script "mv " & (binPath & resourcesPath) & "* " & (gdPath & newResourcesPath)
|
||||||
|
do shell script "INSTALLER_USER=$(stat -f '%Su' $HOME) && sudo chown -R $INSTALLER_USER " & frameworkPath
|
||||||
|
do shell script "INSTALLER_USER=$(stat -f '%Su' $HOME) && sudo chown -R $INSTALLER_USER " & (gdPath & newGeodePath)
|
||||||
|
do shell script "rm -rf " & binPath
|
3
installer/mac/package.sh
Executable file
3
installer/mac/package.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
pkgbuild --root "bin" --identifier com.geode-sdk.geode --scripts "installer/mac/Scripts" --install-location "/tmp/geode-install" installer/mac/GeodeInstaller.pkg
|
Loading…
Reference in a new issue