Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,8 @@ venv.bak/

# mypy
.mypy_cache/

# py2app/py2exe
dist
build
ProperTree.py
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# ProperTree
Cross platform GUI plist editor written in python.

## Binaries

### Mac:
Install `py2app`:

`pip install -U py2app`.

To turn the main script into an application, run `sudo python setup.py py2app -A`.

### Windows:
Install `py2exe`:

`pip install -U py2exe`.

To turn the main script into an executable, run `python setup.py py2exe -A` in CMD with administrator privileges
40 changes: 40 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
from setuptools import setup
import os, sys

ProperTree_PATH = os.path.dirname(os.path.realpath(__file__))
SCRIPTS_PATH = ProperTree_PATH + "/Scripts"
FILES = os.listdir(ProperTree_PATH)
PT_FILE = "ProperTree.py"

if not PT_FILE in FILES:
if "ProperTree.command" in FILES:
with open("ProperTree.command", 'r') as f:
pt = f.readlines()
pt.pop(0)
pt = "".join(pt)
with open(PT_FILE, 'w') as p:
p.write(pt)
p.close()

f.close()

APP = [PT_FILE]
DATA_FILES = ["Scripts/{}".format(x) for x in os.listdir(SCRIPTS_PATH)]
OPTIONS = {'argv_emulation': True}

if sys.platform == 'darwin':
setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
elif sys.platform == 'win32':
setup(
app=APP,
data_files=DATA_FILES,
options={'py2exe': OPTIONS},
setup_requires=['py2exe'],
)

print("\n\nApp can be found in {}/dist/ProperTree".format(ProperTree_PATH))