mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-08-09 07:44:56 +02:00
ui-macos/*: "a series of unfortunate events."
Just kidding. This is a squash of a whole bunch of unlabeled temporary commits that I produced over the last couple of weeks while writing a UI for MacOS while riding on airplanes and sitting in airports. So long, batch of useless commits!
This commit is contained in:
1
ui-macos/bits/.gitignore
vendored
Normal file
1
ui-macos/bits/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/runpython
|
1
ui-macos/bits/PkgInfo
Normal file
1
ui-macos/bits/PkgInfo
Normal file
@ -0,0 +1 @@
|
||||
APPL????
|
3
ui-macos/bits/run
Executable file
3
ui-macos/bits/run
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd "$(dirname "$0")"
|
||||
exec ./runpython ../Resources/main.py
|
14
ui-macos/bits/runpython.c
Normal file
14
ui-macos/bits/runpython.c
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* This rather pointless program acts like the python interpreter, except
|
||||
* it's intended to sit inside a MacOS .app package, so that its argv[0]
|
||||
* will point inside the package.
|
||||
*
|
||||
* NSApplicationMain() looks for Info.plist using the path in argv[0], which
|
||||
* goes wrong if your interpreter is /usr/bin/python.
|
||||
*/
|
||||
#include <Python.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
return Py_Main(argc, argv);
|
||||
}
|
5
ui-macos/bits/runpython.do
Normal file
5
ui-macos/bits/runpython.do
Normal file
@ -0,0 +1,5 @@
|
||||
exec >&2
|
||||
redo-ifchange runpython.c
|
||||
gcc -Wall -o $3 runpython.c \
|
||||
-I/usr/include/python2.5 \
|
||||
-lpython2.5
|
Reference in New Issue
Block a user