mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-02-03 20:19:48 +01:00
ui-macos: call the main binary MacOS/Sshuttle.
That way we can 'killall Sshuttle' and so on, and it looks right in the process list.
This commit is contained in:
parent
522bc23854
commit
d4ccd30c24
@ -7,7 +7,7 @@
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Sshuttle VPN</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>run</string>
|
||||
<string>Sshuttle</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>app.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd "$(dirname "$0")"
|
||||
exec ./runpython ../Resources/main.py
|
@ -7,8 +7,17 @@
|
||||
* goes wrong if your interpreter is /usr/bin/python.
|
||||
*/
|
||||
#include <Python.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
return Py_Main(argc, argv);
|
||||
}
|
||||
char *path = strdup(argv[0]), *cptr;
|
||||
char *args[] = {argv[0], "../Resources/main.py", NULL};
|
||||
cptr = strrchr(path, '/');
|
||||
if (cptr)
|
||||
*cptr = 0;
|
||||
chdir(path);
|
||||
free(path);
|
||||
return Py_Main(2, args);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ ln -s ../../app.icns .
|
||||
|
||||
mkdir MacOS
|
||||
cd MacOS
|
||||
ln -s ../../../bits/runpython ../../../bits/run .
|
||||
ln -s ../../../bits/runpython Sshuttle
|
||||
|
||||
cd ../../..
|
||||
redo-ifchange $(find debug.app -type f)
|
||||
|
@ -1,6 +1,6 @@
|
||||
TOP=$PWD
|
||||
redo-ifchange sources.list
|
||||
redo-ifchange Info.plist bits/runpython bits/run \
|
||||
redo-ifchange Info.plist bits/runpython \
|
||||
$(while read name newname; do echo "$name"; done <sources.list)
|
||||
|
||||
rm -rf "$1.app"
|
||||
@ -10,7 +10,7 @@ cd "$1.app/Contents"
|
||||
cp "$TOP/Info.plist" .
|
||||
|
||||
mkdir MacOS
|
||||
cp "$TOP/bits/runpython" "$TOP/bits/run" MacOS/
|
||||
cp "$TOP/bits/runpython" MacOS/Sshuttle
|
||||
|
||||
mkdir Resources
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user