refactoring
authorEdouard Tisserant
Wed, 09 May 2012 00:39:54 +0200
changeset 727 3edd2f19bce2
parent 726 ae63ccc29444
child 728 e0424e96e3fd
refactoring
Beremiz.py
LPCBeremiz.py
debian/Beremiz.directory
debian/Beremiz_demos.directory
debian/Beremiz_docs.directory
debian/README.Debian
debian/beremiz.desktop
debian/beremiz.menu
debian/beremiz_doc.desktop
debian/beremiz_svgui.desktop
debian/beremiz_wxglade.desktop
debian/changelog
debian/compat
debian/control
debian/docs
debian/postinst
debian/postrm
debian/rules
doc/manual_beremiz.pdf
--- 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))
     
--- 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
--- 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=
--- 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=
--- 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
-------------------
-
-<possible notes regarding this package - if none, delete this file>
-
- -- edouard <edouard.tisserant@gmail.com>  Thu, 29 Nov 2007 14:55:13 +0100
--- 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
-
--- 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 @@
-<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
- "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
-<Menu>
-  <Name>Applications</Name>
-  <Directory>Applications.directory</Directory>
-
-  <!-- Read standard .directory and .desktop file locations -->
-  <DefaultAppDirs/>
-  <DefaultDirectoryDirs/>
-	<Menu>
-	  <Name>Development</Name>
-	  <Directory>Development.directory</Directory>
-
-		  <!-- Beremiz submenu -->
-		  <Menu>
-		    <Name>Beremiz</Name>
-		    	<Directory>Beremiz.directory</Directory>
-				<Include>
-					<Category>Beremiz</Category>
-			    	</Include>
-				<Menu>
-				    <Name>Demos</Name>
-				    <Directory>Beremiz_demos.directory</Directory>
-				    <Include>
-					<Category>Beremiz_demo</Category>
-				    </Include>
-				</Menu> <!-- End Beremiz demo -->
-				<Menu>
-				    <Name>Doc</Name>
-				    <Directory>Beremiz_docs.directory</Directory>
-				    <Include>
-					<Category>Beremiz_doc</Category>
-				    </Include>
-				</Menu> <!-- End Beremiz doc -->
-		  </Menu> <!-- End Beremiz -->
-
-  	</Menu> <!-- End Development -->
-  <!-- possibly more submenus -->
-
-</Menu> <!-- End Applications -->
--- 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
--- 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
-
--- 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
-
--- 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)  <nnnn is the bug number of your ITP>
-
- -- edouard <edouard.tisserant@gmail.com>  Thu, 29 Nov 2007 14:55:13 +0100
-
--- 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
--- 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 <edouard.tisserant@gmail.com>
-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.
--- 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:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <postinst> `abort-remove'
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# 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
-
-
--- 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
-
-
--- 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
Binary file doc/manual_beremiz.pdf has changed