Skip to content

Commit

Permalink
Merge pull request #47 from freakboy3742/briefcase-0.3
Browse files Browse the repository at this point in the history
Add Briefcase 0.3 configuration
  • Loading branch information
freakboy3742 authored Jan 1, 2020
2 parents 4ec0911 + 2aa555a commit 5952ded
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 147 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
*~
.*.sw[op]
*.egg-info
*.dist-info
dist
build
_build
distribute-*
local
macOS
linux
windows
119 changes: 59 additions & 60 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,8 @@
Podium
======

.. image:: https://img.shields.io/pypi/pyversions/podium.svg
:target: https://pypi.python.org/pypi/podium

.. image:: https://img.shields.io/pypi/v/podium.svg
:target: https://pypi.python.org/pypi/podium

.. image:: https://img.shields.io/pypi/status/podium.svg
:target: https://pypi.python.org/pypi/podium

.. image:: https://img.shields.io/pypi/l/podium.svg
:target: https://github.com/beeware/podium/blob/master/LICENSE

.. image:: https://travis-ci.org/beeware/podium.svg?branch=master
:target: https://travis-ci.org/beeware/podium

.. image:: https://badges.gitter.im/beeware/general.svg
:target: https://gitter.im/beeware/general
:target: https://gitter.im/beeware/general


A markup-based slide presentation tool.
Expand Down Expand Up @@ -85,42 +70,25 @@ Podium attempts to bridge the gap between these two poles. It is comprised of:
Quickstart
----------

Podium currently requires a source checkout of Toga and Podium, as it uses
unreleased features of both projects.

If you're using Linux, you'll need to install some system packages first::

# Ubuntu, Debian 10+
# has webkit2-4.0
# libwebkitgtk version seems very specific, but that is what it currently is.
$ sudo apt-get update
$ sudo apt-get install python3-dev libgirepository1.0-dev libcairo2-dev libpango1.0-dev libwebkit2gtk-4.0-37 gir1.2-webkit2-4.0

# Fedora
$ sudo dnf install pkg-config python3-devel gobject-introspection-devel cairo-devel cairo-gobject-devel pango-devel webkitgtk3
Official releases of Podium can be downloaded from the `GitHub releases page
<https://github.com/beeware/podium/releases>`__.

Then, you can create a virtual environment and run the following to install
Toga and Podium::
Download the binary for your platform of choice, and run it. This should open a
file dialog, prompting you to open a ``.podium`` slide deck. An example Podium
slide deck is also available in the releases folder. Unzip the deck, and open
it in Podium.

$ mkdir beeware
$ cd beeware
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ git clone https://github.com/beeware/toga.git
(venv) $ pip install toga/src/core
# If you're on macOS:
(venv) $ pip install toga/src/cocoa
# If you're on Linux:
(venv) $ pip install toga/src/gtk
(venv) $ git clone https://github.com/beeware/podium.git
.. note::

Now that you have the code, you can run Podium::
The Linux AppImage format is a cross-platform binary that should run on
any Linux distribution using GLibC 2.23 or later - this includes Ubuntu
16.04 and later, Fedora 24 and later, and others.

(venv) $ cd podium/src
(venv) $ python -m podium ../example/example.podium
After downloading the AppImage, you may need to mark the AppImage file as
executable (``chmod +x Podium-*.AppImage``) first. In Linux, ``.podium``
files appear as directories; select the directory and click ``Open``.

This will open a sample slide deck. You should 2 GUI windows, displaying a test
pattern as the first slide. Controls from here are keyboard based:
Controls from here are keyboard based:

* CMD-P - Enter presentation mode; or, if in presentation mode, Pause timer
* Esc - Exit presentation mode
Expand All @@ -135,27 +103,58 @@ pattern as the first slide. Controls from here are keyboard based:

If you're on Linux, "CMD" is the Control key.

Packaging with Briefcase
------------------------
Developing Podium
-----------------

**NOTE: These instruction won't work until Podium can use a released
version of Toga**
Podium uses the `BeeWare <https://beeware.org>`__ suite of tools and libraries -
most notably, the `Toga <https://github.com/beeware/toga>`__ widget toolkit, and
the `Briefcase <https://github.com/beeware/briefcase>`__ packaging tool.

Use `Briefcase`_ to package this repository as a standalone application.
Install briefcase using `pip install briefcase`, then:
To develop Podium, create a virtual environment, and install the BeeWare tools.

* **macOS** Run::
If you're using Linux, you'll need to install some system packages first::

# Ubuntu/Debian
$ sudo apt-get update
$ sudo apt-get install python3-dev libgirepository1.0-dev libcairo2-dev libpango1.0-dev libwebkit2gtk-4.0-37 gir1.2-webkit2-4.0

# Fedora
$ sudo dnf install pkg-config python3-devel gobject-introspection-devel cairo-devel cairo-gobject-devel pango-devel webkitgtk3


Then, you can create a virtual environment and install the BeeWare tools::

$ mkdir beeware
$ cd beeware
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ pip install --pre beeware

Now that you have the code, you can clone the Podium repository and run it in
developer mode.

(venv) $ git clone https://github.com/beeware/podium.git
(venv) $ cd podium
(venv) $ briefcase dev

This should open the same file dialog as before.

Packaging with Briefcase
~~~~~~~~~~~~~~~~~~~~~~~~

$ python setup.py macos
$ open macOS/Podium.app
Use `Briefcase`_ to package this repository as a standalone application::

This app file can also be copied into your Applications folder.
$ briefcase package

* **Linux** Run::
Depending on your platform, this will produce a ``macOS`` folder containing
a Podium DMG file, or a ``linux`` folder containing a ``.AppImage`` file.

$ python setup.py linux
$ ./linux/Podium
.. note::

Packaging cross-distribution Linux binaries is a complex process; See `the
notes on AppImage packaging
<https://briefcase.readthedocs.io/en/latest/reference/platforms/linux/appimage.html>`__
in the Briefcase documentation for more details.

Overriding Default themes
-------------------------
Expand Down
29 changes: 29 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[build-system]
requires = ["briefcase"]

[tool.briefcase]
project_name = "Podium"
version = "0.2"
bundle = "org.beeware"
author='Russell Keith-Magee'
author_email='[email protected]'
homepage='https://beeware.org/project/projects/applications/podium'

[tool.briefcase.app.podium]
formal_name = "Podium"
description = "A presentation tool for developers."
sources = ["src/podium"]
icon = "src/podium/resources/podium"

[tool.briefcase.app.podium.document_type.deck]
description = "Podium Slide Deck"
extension = "podium"
icon = "src/podium/resources/podium-deck"
url = 'https://beeware.org/project/projects/applications/podium/'

[tool.briefcase.app.podium.macOS]
template = '/Users/rkm/projects/beeware/templates/briefcase-macOS-app-template'
requires = ["toga-cocoa>=0.3.0.dev16"]

[tool.briefcase.app.podium.linux]
requires = ["toga-gtk>=0.3.0.dev16"]
80 changes: 0 additions & 80 deletions setup.py

This file was deleted.

7 changes: 0 additions & 7 deletions src/podium/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,7 @@

class Podium(toga.DocumentApp):
def __init__(self):
resource_dir = os.path.join(
os.path.dirname(__file__),
'resources'
)
super().__init__(
'Podium',
app_id='org.beeware.podium',
icon=toga.Icon(os.path.join(resource_dir, 'podium')),
document_types={'podium': SlideDeck}
)

Expand Down

0 comments on commit 5952ded

Please sign in to comment.