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
20 changes: 2 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,9 @@ deb: clean_deb

# Build a Mac OS X APP bundle
app: clean_app
ifeq ($(PYINSTALLER),)
@echo "The path to pyinstaller is not set in PYINSTALLER.\n\
Try:\tPYINSTALLER=\"path/to/pyinstaller\" make app"
else
python $(PYINSTALLER)/pyinstaller.py -wy \
-n "$(APP_NAME)" \
-i "deployment/mac/icon.icns" \
tikz_editor.pyw
rm -rf "dist/$(APP_NAME)"
cp "deployment/mac/icon.icns" "dist/$(APP_NAME).app/Contents/Resources/icon-windowed.icns"

ln -s /Applications dist
hdiutil create -fs HFS+ -volname "$(APP_NAME)" -srcfolder dist "dist/$(APP_NAME)-$(APP_VERSION).dmg"
#hdiutil internet-enable -yes "dist/$(APP_NAME)-$(APP_VERSION).dmg"
rm dist/Applications

pip3 install sip PyQt5 qscintilla
python3 ./setup.py py2app
open dist
endif


#####################
# Cleaning commands #
Expand Down
56 changes: 19 additions & 37 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,43 +1,25 @@
#!/usr/bin/env python
"""
This is a setup.py script generated by py2applet

# Copyright 2012 (C) Mickael Menu <mickael.menu@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
Usage:
python setup.py py2app
"""

# automatically downloads setuptools if needed
import distribute_setup
distribute_setup.use_setuptools()
from setuptools import setup

from setuptools import setup, find_packages

import tikz_editor.globals as globals
APP = ['tikz_editor.pyw']
DATA_FILES = []
OPTIONS = {'iconfile': 'deployment/mac/icon.icns'}

setup(
name = globals.APPLICATION_NAME,
version = globals.VERSION,
packages = find_packages(),
include_package_data = True,
package_data = {'': ['*.png', '*.html']},

# metadatas
author = globals.AUTHORS,
author_email = globals.EMAIL,
description = globals.APPLICATION_DESCRIPTION,
license = "GPL v2",
keywords = "tikz code editor latex preview",
url = globals.WEBSITE,

# auto-creates a GUI Python script to launch the application
entry_points = {'gui_scripts': ['tikz-editor = tikz_editor:start']}
name="Tikz Editor",
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
install_requires=[
"sip >= 4",
"PyQt5 >= 5.4",
"qscintilla >= 2.0",
],
)