# HG changeset patch # User Edouard Tisserant # Date 1336516794 -7200 # Node ID 3edd2f19bce2371e49ff90cbc0a1fc43878d57b4 # Parent ae63ccc2944420d736f2745c5a94919f1bb076a7 refactoring diff -r ae63ccc29444 -r 3edd2f19bce2 Beremiz.py --- a/Beremiz.py Wed May 09 00:12:40 2012 +0200 +++ b/Beremiz.py Wed May 09 00:39:54 2012 +0200 @@ -137,7 +137,6 @@ if __name__ == '__main__': __builtin__.__dict__['_'] = wx.GetTranslation#unicode_translation -#Quick hack to be able to find Beremiz IEC tools. Should be config params. base_folder = os.path.split(sys.path[0])[0] sys.path.append(base_folder) sys.path.append(os.path.join(base_folder, "plcopeneditor")) @@ -151,7 +150,7 @@ from util import MiniTextControler from util.ProcessLogger import ProcessLogger -from docutils import * +from docutil import OpenHtmlFrame from PLCOpenEditor import IDEFrame, AppendMenu, TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU, TYPESTREE, INSTANCESTREE, LIBRARYTREE, SCALING, PAGETITLES, USE_AUI from PLCOpenEditor import EditorPanel, Viewer, TextViewer, GraphicViewer, ResourceEditor, ConfigurationEditor, DataTypeEditor from PLCControler import LOCATION_CONFNODE, LOCATION_MODULE, LOCATION_GROUP, LOCATION_VAR_INPUT, LOCATION_VAR_OUTPUT, LOCATION_VAR_MEMORY @@ -444,11 +443,8 @@ (wx.ID_PRINT, "print.png", _(u'Print'), None)]) def _init_coll_HelpMenu_Items(self, parent): - parent.Append(help='', id=wx.ID_HELP, - kind=wx.ITEM_NORMAL, text=_(u'Beremiz\tF1')) parent.Append(help='', id=wx.ID_ABOUT, kind=wx.ITEM_NORMAL, text=_(u'About')) - self.Bind(wx.EVT_MENU, self.OnBeremizMenu, id=wx.ID_HELP) self.Bind(wx.EVT_MENU, self.OnAboutMenu, id=wx.ID_ABOUT) def _init_coll_PLCConfigMainSizer_Items(self, parent): @@ -1760,9 +1756,6 @@ def OnQuitMenu(self, event): self.Close() - def OnBeremizMenu(self, event): - open_pdf(Bpath( "doc", "manual_beremiz.pdf")) - def OnAboutMenu(self, event): OpenHtmlFrame(self,_("About Beremiz"), Bpath("doc","about.html"), wx.Size(550, 500)) diff -r ae63ccc29444 -r 3edd2f19bce2 debian/Beremiz.directory --- a/debian/Beremiz.directory Wed May 09 00:12:40 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -[Desktop Entry] -Type=Directory -Name=Beremiz -Icon=/usr/share/beremiz/images/brz.png diff -r ae63ccc29444 -r 3edd2f19bce2 debian/Beremiz_demos.directory --- a/debian/Beremiz_demos.directory Wed May 09 00:12:40 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -[Desktop Entry] -Type=Directory -Name=Demos -Icon= diff -r ae63ccc29444 -r 3edd2f19bce2 debian/Beremiz_docs.directory --- a/debian/Beremiz_docs.directory Wed May 09 00:12:40 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -[Desktop Entry] -Type=Directory -Name=Doc -Icon= diff -r ae63ccc29444 -r 3edd2f19bce2 debian/README.Debian --- a/debian/README.Debian Wed May 09 00:12:40 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -beremiz for Debian ------------------- - - - - -- edouard Thu, 29 Nov 2007 14:55:13 +0100 diff -r ae63ccc29444 -r 3edd2f19bce2 debian/beremiz.desktop --- a/debian/beremiz.desktop Wed May 09 00:12:40 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=Beremiz -Comment=Open Source framework for automation -Comment[fr]=Environnement de développement Open Source pour l'automatisme -Exec=/usr/bin/beremiz -Icon=/usr/share/beremiz/images/brz.png -Terminal=false -MultipleArgs=false -Type=Application -Categories=Beremiz; -StartupNotify=true - diff -r ae63ccc29444 -r 3edd2f19bce2 debian/beremiz.menu --- a/debian/beremiz.menu Wed May 09 00:12:40 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ - - - Applications - Applications.directory - - - - - - Development - Development.directory - - - - Beremiz - Beremiz.directory - - Beremiz - - - Demos - Beremiz_demos.directory - - Beremiz_demo - - - - Doc - Beremiz_docs.directory - - Beremiz_doc - - - - - - - - diff -r ae63ccc29444 -r 3edd2f19bce2 debian/beremiz_doc.desktop --- a/debian/beremiz_doc.desktop Wed May 09 00:12:40 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=Manual -Comment=Open Source framework for automation -Comment[fr]=Environnement de développement Open Source pour l'automatisme -Exec=/usr/bin/xpdf /usr/share/beremiz/doc/manual_beremiz.pdf -Icon= -Terminal=false -MultipleArgs=false -Type=Application -Categories=Beremiz_doc; -StartupNotify=true diff -r ae63ccc29444 -r 3edd2f19bce2 debian/beremiz_svgui.desktop --- a/debian/beremiz_svgui.desktop Wed May 09 00:12:40 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=Beremiz Demo (svgui) -Comment=Open Source framework for automation -Comment[fr]=Environnement de développement Open Source pour l'automatisme -Exec=/usr/bin/beremiz /usr/share/beremiz/tests/svgui -Icon=/usr/share/beremiz/images/brz.png -Terminal=false -MultipleArgs=false -Type=Application -Categories=Beremiz_demo; -StartupNotify=true - diff -r ae63ccc29444 -r 3edd2f19bce2 debian/beremiz_wxglade.desktop --- a/debian/beremiz_wxglade.desktop Wed May 09 00:12:40 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=Beremiz Demo (wxGlade) -Comment=Open Source framework for automation -Comment[fr]=Environnement de développement Open Source pour l'automatisme -Exec=/usr/bin/beremiz /usr/share/beremiz/tests/wxGlade -Icon=/usr/share/beremiz/images/brz.png -Terminal=false -MultipleArgs=false -Type=Application -Categories=Beremiz_demo; -StartupNotify=true - diff -r ae63ccc29444 -r 3edd2f19bce2 debian/changelog --- a/debian/changelog Wed May 09 00:12:40 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -beremiz (2009.0-%DATEVERSION%) unstable; urgency=low - - * Initial release (Closes: #nnnn) - - -- edouard Thu, 29 Nov 2007 14:55:13 +0100 - diff -r ae63ccc29444 -r 3edd2f19bce2 debian/compat --- a/debian/compat Wed May 09 00:12:40 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -5 diff -r ae63ccc29444 -r 3edd2f19bce2 debian/control --- a/debian/control Wed May 09 00:12:40 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -Source: beremiz -Section: devel -Priority: standard -Maintainer: edouard -Build-Depends: debhelper (>= 5) -Standards-Version: 3.7.2 - -Package: beremiz -Architecture: any -Depends: build-essential, python-wxgtk2.8, python-ctypes, python-numpy, python-twisted, python-nevow, python-simplejson, python-wxglade, xpdf, canfestival-devel, canfestival-objdictedit, matiec, pyro, plcopeneditor -Description: Beremiz is an Open Source framework for automation - With Beremiz, you can : - - Automate everything. - - Take any processor into a PLC. - - Program once, run anywhere. - - Create PLC controled customizable HMIs. - - Conform to standards. - - Avoid vendor lock. diff -r ae63ccc29444 -r 3edd2f19bce2 debian/postinst --- a/debian/postinst Wed May 09 00:12:40 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -#!/bin/sh -# postinst script for canfestival -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - configure) - ln -sf /usr/share/beremiz/Beremiz.py /usr/bin/beremiz - chmod 755 /usr/share/beremiz/Beremiz.py - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff -r ae63ccc29444 -r 3edd2f19bce2 debian/postrm --- a/debian/postrm Wed May 09 00:12:40 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -#!/bin/sh -# postrm script for canfestival-objdictedit -# -# see: dh_installdeb(1) - -set -e - -BEREMIZ=/usr/bin/beremiz - -case "$1" in - purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - - if [ -f "$BEREMIZ" ]; then - rm $BEREMIZ - fi - ;; - - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff -r ae63ccc29444 -r 3edd2f19bce2 debian/rules --- a/debian/rules Wed May 09 00:12:40 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -CFLAGS = -Wall -g - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif - -configure: configure-stamp -configure-stamp: - dh_testdir - touch configure-stamp - - -build: build-stamp - -build-stamp: configure-stamp - dh_testdir - touch $@ - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Copy source files - mkdir -p $(CURDIR)/debian/beremiz/usr/share/beremiz - cp -a images $(CURDIR)/debian/beremiz/usr/share/beremiz - cp -a plugins $(CURDIR)/debian/beremiz/usr/share/beremiz - cp -a runtime $(CURDIR)/debian/beremiz/usr/share/beremiz - cp -a tests $(CURDIR)/debian/beremiz/usr/share/beremiz - cp -a connectors $(CURDIR)/debian/beremiz/usr/share/beremiz - cp -a targets $(CURDIR)/debian/beremiz/usr/share/beremiz - cp -a doc $(CURDIR)/debian/beremiz/usr/share/beremiz - cp -a locale $(CURDIR)/debian/beremiz/usr/share/beremiz - cp *.js $(CURDIR)/debian/beremiz/usr/share/beremiz - cp *.py $(CURDIR)/debian/beremiz/usr/share/beremiz - - # Copy desktop directory file - mkdir -p $(CURDIR)/debian/beremiz/usr/share/desktop-directories - cp debian/Beremiz.directory $(CURDIR)/debian/beremiz/usr/share/desktop-directories - cp debian/Beremiz_demos.directory $(CURDIR)/debian/beremiz/usr/share/desktop-directories - cp debian/Beremiz_docs.directory $(CURDIR)/debian/beremiz/usr/share/desktop-directories - - # Copy desktop menu file - mkdir -p $(CURDIR)/debian/beremiz/etc/xdg/menus/applications-merged - cp debian/beremiz.menu $(CURDIR)/debian/beremiz/etc/xdg/menus/applications-merged - - # Copy desktop entry files - mkdir -p $(CURDIR)/debian/beremiz/usr/share/applications - cp debian/beremiz.desktop $(CURDIR)/debian/beremiz/usr/share/applications/ - cp debian/beremiz_svgui.desktop $(CURDIR)/debian/beremiz/usr/share/applications/ - cp debian/beremiz_wxglade.desktop $(CURDIR)/debian/beremiz/usr/share/applications/ - cp debian/beremiz_doc.desktop $(CURDIR)/debian/beremiz/usr/share/applications/ - - rm -rf `find .|grep CVS` - rm -rf `find .|grep .cvsignore` - chmod -R a+r $(CURDIR)/debian/beremiz - -# Build architecture-independent files here. -binary-indep: build install - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot -# dh_installchangelogs -# dh_installdocs - dh_installexamples -# dh_install -# dh_installmenu -# dh_installdebconf -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_python -# dh_installinit -# dh_installcron -# dh_installinfo - dh_installman - dh_link - dh_strip - dh_compress - dh_fixperms -# dh_perl -# dh_makeshlibs - dh_installdeb -# dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure diff -r ae63ccc29444 -r 3edd2f19bce2 doc/manual_beremiz.pdf Binary file doc/manual_beremiz.pdf has changed