Remove the script with the compiled data, and adds the source instead.
This commit is contained in:
parent
d74bc045fd
commit
c378f3bf32
36
mac-launcher.applescript
Normal file
36
mac-launcher.applescript
Normal file
@ -0,0 +1,36 @@
|
||||
# Allows you to select a wine prefix to run with audiogame manager
|
||||
#Get Working Directory
|
||||
tell application "Finder"
|
||||
set currentPath to container of (path to me) as alias
|
||||
end tell
|
||||
#format Converters
|
||||
on convertPathToAlias(thePath)
|
||||
tell application "System Events"
|
||||
try
|
||||
return (path of disk item (thePath as string)) as alias
|
||||
on error
|
||||
return (path of disk item (path of thePath) as string) as alias
|
||||
end try
|
||||
end tell
|
||||
end convertPathToAlias
|
||||
|
||||
on convertPathToPOSIXString(thePath)
|
||||
tell application "System Events"
|
||||
try
|
||||
set thePath to path of disk item (thePath as string)
|
||||
on error
|
||||
set thePath to path of thePath
|
||||
end try
|
||||
end tell
|
||||
return POSIX path of thePath
|
||||
end convertPathToPOSIXString
|
||||
|
||||
set currentPath to convertPathToPOSIXString(currentPath)
|
||||
set folderPath to POSIX file "~/.local/wine/"
|
||||
set folderPath to convertPathToAlias(folderPath)
|
||||
set gameFolder to choose folder with prompt "Choose your game and press enter:" default location folderPath
|
||||
set gameFolder to convertPathToPOSIXString(gameFolder)
|
||||
set gameFolder to quoted form of gameFolder
|
||||
set gameName to do shell script ("basename " & gameFolder)
|
||||
do shell script "/usr/local/bin/bash -l " & currentPath & "audiogame-manager.sh -l " & gameName & " &> /dev/null &"
|
||||
do shell script "say -v alex Launching " & gameName & ", please wait..."
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user