Commit e2399490 authored by Jorge Suárez de Lis's avatar Jorge Suárez de Lis 💭
Browse files

Instructions and link to a Windows redistributable version

parent 65c8d005
......@@ -65,13 +65,24 @@ The installation script will ask to be run at session start. This will create an
**Windows**
Download the [redistributable version](http://apps.citius.usc.es/upload/?a=d&i=675I5c) and unzip to any folder, then run `temperaturas.exe`.
To manually run the source on Windows:
1. Download and install [Python 2.7.x](https://www.python.org/downloads/) 2.7.9+.
2. Download and install [PyGObject for Windows](http://sourceforge.net/projects/pygobjectwin32/files/) 3.10+. Make sure to choose `GTK+3` during installation.
4. Download the [full source code](https://gitlab.citius.usc.es/citius/temperaturas/repository/archive.zip) and unzip it somewhere.
5. Rename `temperaturas.py` to `temperaturas.pyw` to get rid of the text console when running the program.
6. You're done! Just run `temperaturas.pyw`.
3. Download the [full source code](https://gitlab.citius.usc.es/citius/temperaturas/repository/archive.zip) and unzip it somewhere.
4. Rename `temperaturas.py` to `temperaturas.pyw` to get rid of the text console when running the program.
5. You're done! Just run `temperaturas.pyw`.
To build a redistributable version:
1. Do the steps previous steps from 1 to 3.
2. Download and install [CX_Freeze](http://cx-freeze.sourceforge.net/)
3. Run `winfreeze.py build`.
4. Copy the directory `icons` into `build/exe.win32-2.7/`
5. Try to run `temperaturas.exe`. If you get an error, you might need to add or remove dlls from `winfreeze.py` based on your GTK+ version.
6. If everything goes fine, the redistributable version is ready to distribute in `build/exe.win32-2.7/`. You might want to build an installer for it, or just zip it and you are done.
Running the program
----
......
icon.ico

66.1 KB

icon.png

2.18 KB

......@@ -318,7 +318,7 @@ class AboutWindow:
global lastupdated
# Label programa
self.label = Gtk.Label(_("Temperaturas CiTIUS 0.3"), xalign=0)
self.label = Gtk.Label(_("Temperaturas CiTIUS 0.4"), xalign=0)
self.mainbox.pack_start(self.label, True, True, 0)
self.label.show()
......
from cx_Freeze import setup, Executable
import os, site, sys
## Get the site-package folder, not everybody will install
## Python into C:\PythonXX
site_dir = site.getsitepackages()[1]
include_dll_path = os.path.join(site_dir, "gnome")
## Collect the list of missing dll when cx_freeze builds the app
missing_dll = ['libgtk-3-0.dll',
'libgdk-3-0.dll',
'libatk-1.0-0.dll',
'libcairo-gobject-2.dll',
'libgdk_pixbuf-2.0-0.dll',
'libjpeg-8.dll',
'libpango-1.0-0.dll',
'libpangocairo-1.0-0.dll',
'libpangoft2-1.0-0.dll',
'libpangowin32-1.0-0.dll',
'libharfbuzz-0.dll',
'libharfbuzz-gobject-0.dll',
'libwebp-5.dll'
]
## We need to add all the libraries too (for themes, etc..)
gtk_libs = ['etc', 'lib', 'share']
## Create the list of includes as cx_freeze likes
include_files = []
for dll in missing_dll:
include_files.append((os.path.join(include_dll_path, dll), dll))
## Let's add gtk libraries folders and files
for lib in gtk_libs:
include_files.append((os.path.join(include_dll_path, lib), lib))
base = None
## Lets not open the console while running the app
if sys.platform == "win32":
base = "Win32GUI"
executables = [
Executable("temperaturas.py",
base=base,
icon="icon.ico"
)
]
buildOptions = dict(
compressed = False,
includes = ["gi"],
packages = ["gi"],
include_files = include_files
)
setup(
name = "Temperaturas",
author = "Jorge Suarez de Lis",
version = "0.4",
description = "Mostra as temperaturas do CiTIUS",
options = dict(build_exe = buildOptions),
executables = executables
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment