URL
https://opencores.org/ocsvn/phr/phr/trunk
Subversion Repositories phr
Compare Revisions
- This comparison shows the changes necessary to convert path
/phr/trunk/codigo/gui/windows/minimal python2.7.6
- from Rev 172 to Rev 182
- ↔ Reverse comparison
Rev 172 → Rev 182
/wx_simple_gui_events_dist_libs/imagen.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
wx_simple_gui_events_dist_libs/imagen.jpg
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: wx_simple_gui_events_dist_libs/phr-gui.py
===================================================================
--- wx_simple_gui_events_dist_libs/phr-gui.py (nonexistent)
+++ wx_simple_gui_events_dist_libs/phr-gui.py (revision 182)
@@ -0,0 +1,116 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# generated by wxGlade 0.6.3 on Tue Mar 18 21:30:25 2014
+
+import wx
+# imports by maximiq
+import os # se usa para el dialogo de abrir fichero
+import subprocess # para interactuar con el shell
+
+# begin wxGlade: extracode
+# end wxGlade
+
+
+
+class MyFrame(wx.Frame):
+ def __init__(self, *args, **kwds):
+ # begin wxGlade: MyFrame.__init__
+ kwds["style"] = wx.DEFAULT_FRAME_STYLE
+ wx.Frame.__init__(self, *args, **kwds)
+ self.frame_1_statusbar = self.CreateStatusBar(1, 0)
+ self.bitmap_1 = wx.StaticBitmap(self, -1, wx.Bitmap("imagen.jpg", wx.BITMAP_TYPE_ANY))
+ self.label_1 = wx.StaticText(self, -1, "Aca puede ir algo de texto para aclarar como es el \nprocedimiento para hacer andar el programa.")
+ self.text_ctrl_3 = wx.TextCtrl(self, -1, "")
+ self.button_3 = wx.Button(self, -1, "Elegir fichero")
+ self.button_4 = wx.Button(self, -1, "Grabar")
+ self.text_ctrl_2 = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_ENTER|wx.TE_MULTILINE)
+
+ self.__set_properties()
+ self.__do_layout()
+
+ self.Bind(wx.EVT_BUTTON, self.choose_file_button, self.button_3)
+ self.Bind(wx.EVT_BUTTON, self.action_button, self.button_4)
+ # end wxGlade
+
+ def __set_properties(self):
+ # begin wxGlade: MyFrame.__set_properties
+ self.SetTitle("Titulo de la ventana")
+ self.frame_1_statusbar.SetStatusWidths([-1])
+ # statusbar fields
+ frame_1_statusbar_fields = ["frame_1_statusbar"]
+ for i in range(len(frame_1_statusbar_fields)):
+ self.frame_1_statusbar.SetStatusText(frame_1_statusbar_fields[i], i)
+ self.text_ctrl_2.SetMinSize((350, 135))
+ # end wxGlade
+
+ def __do_layout(self):
+ # begin wxGlade: MyFrame.__do_layout
+ sizer_1 = wx.BoxSizer(wx.VERTICAL)
+ grid_sizer_1 = wx.FlexGridSizer(5, 1, 0, 0)
+ grid_sizer_2 = wx.FlexGridSizer(1, 3, 0, 0)
+ grid_sizer_1.Add(self.bitmap_1, 0, wx.ALL, 5)
+ grid_sizer_1.Add(self.label_1, 0, wx.ALL, 5)
+ grid_sizer_2.Add(self.text_ctrl_3, 0, wx.ALL|wx.EXPAND, 5)
+ grid_sizer_2.Add(self.button_3, 0, wx.RIGHT|wx.TOP|wx.BOTTOM, 5)
+ grid_sizer_2.Add(self.button_4, 0, wx.RIGHT|wx.TOP|wx.BOTTOM, 5)
+ grid_sizer_2.AddGrowableCol(0)
+ grid_sizer_1.Add(grid_sizer_2, 1, wx.EXPAND, 0)
+ grid_sizer_1.Add(self.text_ctrl_2, 0, wx.ALL|wx.EXPAND, 5)
+ sizer_1.Add(grid_sizer_1, 1, wx.EXPAND, 0)
+ self.SetSizer(sizer_1)
+ sizer_1.Fit(self)
+ self.Layout()
+ self.Centre()
+ # end wxGlade
+
+ def choose_file_button(self, event): # wxGlade: MyFrame.
+ #funcion editada por maximiq
+ #self.text_ctrl_3.SetValue("Hola")
+
+ wildcard = "Python source (*.py)|*.py|" \
+ "Compiled Python (*.pyc)|*.pyc|" \
+ "All files (*.*)|*.*"
+ dialog = wx.FileDialog(None, "Titulo de la ventana", os.getcwd(), "", wildcard, wx.OPEN)
+ if dialog.ShowModal() == wx.ID_OK:
+ self.text_ctrl_3.SetValue(dialog.GetPath())
+
+ dialog.Destroy()
+
+ event.Skip()
+
+ def action_button(self, event): # wxGlade: MyFrame.
+ #print "Event handler `action_button' not implemented"
+ # by maximiq
+
+ # preparar entorno
+ self.button_4.Disable()
+ self.frame_1_statusbar.SetFields(["Espere ..."])
+
+ self.text_ctrl_2.WriteText("\n======================================\n" \
+ + "El fichero elegido es:\n" \
+ + self.text_ctrl_3.GetValue() \
+ + "\n\nEjecucion de un comando (dir c:):\n")
+
+ command = "dir c:" # the shell command
+ process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
+
+ for line in iter(process.stdout.readline, ''):
+ self.text_ctrl_2.WriteText(line)
+ process.stdout.close()
+
+ # finalizando
+ self.button_4.Enable()
+ self.frame_1_statusbar.SetFields(["Listo"])
+
+ event.Skip()
+
+# end of class MyFrame
+
+
+if __name__ == "__main__":
+ app = wx.App(False)
+ #wx.InitAllImageHandlers()
+ frame_1 = MyFrame(None, -1, "")
+ app.SetTopWindow(frame_1)
+ frame_1.Show()
+ app.MainLoop()
Index: wx_simple_gui_events_dist_libs/rapid.wxg
===================================================================
--- wx_simple_gui_events_dist_libs/rapid.wxg (nonexistent)
+++ wx_simple_gui_events_dist_libs/rapid.wxg (revision 182)
@@ -0,0 +1,98 @@
+
+
+
+
+
+
Index: wx_simple_gui_events_dist_libs/setup.py
===================================================================
--- wx_simple_gui_events_dist_libs/setup.py (nonexistent)
+++ wx_simple_gui_events_dist_libs/setup.py (revision 182)
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+
+from distutils.core import setup
+import py2exe
+
+manifest = """
+
+
+
+Your Application
+
+
+
+
+
+
+"""
+
+"""
+installs manifest and icon into the .exe
+but icon is still needed as we open it
+for the window icon (not just the .exe)
+changelog and logo are included in dist
+"""
+
+setup(
+ options = {
+ "py2exe":{
+ "dll_excludes": ["MSVCP90.dll", "HID.DLL", "w9xpopen.exe"],
+ }
+ },
+ windows = [
+ {
+ "script": "phr-gui.py",
+ # "icon_resources": [(1, "yourapplication.ico")],
+ # "other_resources": [(24,1,manifest)]
+ }
+ ],
+ # data_files=["yourapplication.ico"]
+)
Index: wx_simple_gui_events_dist_libs/nis/leame.txt
===================================================================
--- wx_simple_gui_events_dist_libs/nis/leame.txt (nonexistent)
+++ wx_simple_gui_events_dist_libs/nis/leame.txt (revision 182)
@@ -0,0 +1,6 @@
+En la seccion Section -Post
+
+agregar:
+ ExecWait '$INSTDIR\vcredist_x86.exe /q'
+
+se debe copiar el vcredist_x86.exe en la carpeta de distribucion
\ No newline at end of file
Index: wx_simple_gui_events_dist_libs/nis/Licencia.txt
===================================================================
--- wx_simple_gui_events_dist_libs/nis/Licencia.txt (nonexistent)
+++ wx_simple_gui_events_dist_libs/nis/Licencia.txt (revision 182)
@@ -0,0 +1 @@
+Este es el archivo para la licencia.
\ No newline at end of file
Index: wx_simple_gui_events_dist_libs/nis/vcredist_x86.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: wx_simple_gui_events_dist_libs/nis/vcredist_x86.exe
===================================================================
--- wx_simple_gui_events_dist_libs/nis/vcredist_x86.exe (nonexistent)
+++ wx_simple_gui_events_dist_libs/nis/vcredist_x86.exe (revision 182)
wx_simple_gui_events_dist_libs/nis/vcredist_x86.exe
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: wx_simple_gui_events_dist_libs/nis/phr-gui_instalar.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: wx_simple_gui_events_dist_libs/nis/phr-gui_instalar.exe
===================================================================
--- wx_simple_gui_events_dist_libs/nis/phr-gui_instalar.exe (nonexistent)
+++ wx_simple_gui_events_dist_libs/nis/phr-gui_instalar.exe (revision 182)
wx_simple_gui_events_dist_libs/nis/phr-gui_instalar.exe
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: wx_simple_gui_events_dist_libs/nis/para_instalar.nsi
===================================================================
--- wx_simple_gui_events_dist_libs/nis/para_instalar.nsi (nonexistent)
+++ wx_simple_gui_events_dist_libs/nis/para_instalar.nsi (revision 182)
@@ -0,0 +1,136 @@
+; Script generated by the HM NIS Edit Script Wizard.
+
+; HM NIS Edit Wizard helper defines
+!define PRODUCT_NAME "PHR GUI"
+!define PRODUCT_VERSION "1.0"
+!define PRODUCT_PUBLISHER "CUDAR"
+!define PRODUCT_WEB_SITE "http://www.micompañia.com"
+!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\phr-gui.exe"
+!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
+!define PRODUCT_UNINST_ROOT_KEY "HKLM"
+
+; MUI 1.67 compatible ------
+!include "MUI.nsh"
+
+; MUI Settings
+!define MUI_ABORTWARNING
+!define MUI_ICON "C:\Me\minimal python2.7.6\phr.ico"
+!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
+
+; Welcome page
+!insertmacro MUI_PAGE_WELCOME
+; License page
+!insertmacro MUI_PAGE_LICENSE "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\nis\Licencia.txt"
+; Directory page
+!insertmacro MUI_PAGE_DIRECTORY
+; Instfiles page
+!insertmacro MUI_PAGE_INSTFILES
+; Finish page
+!define MUI_FINISHPAGE_RUN "$INSTDIR\phr-gui.exe"
+!insertmacro MUI_PAGE_FINISH
+
+; Uninstaller pages
+!insertmacro MUI_UNPAGE_INSTFILES
+
+; Language files
+!insertmacro MUI_LANGUAGE "Spanish"
+
+; MUI end ------
+
+Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
+OutFile "Instalar.exe"
+InstallDir "$PROGRAMFILES\PHR GUI"
+InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
+ShowInstDetails show
+ShowUnInstDetails show
+
+Section "Principal" SEC01
+ SetOutPath "$INSTDIR"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\bz2.pyd"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\imagen.jpg"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\library.zip"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\phr-gui.exe"
+ CreateDirectory "$SMPROGRAMS\PHR GUI"
+ CreateShortCut "$SMPROGRAMS\PHR GUI\PHR GUI.lnk" "$INSTDIR\phr-gui.exe"
+ CreateShortCut "$DESKTOP\PHR GUI.lnk" "$INSTDIR\phr-gui.exe"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\python27.dll"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\select.pyd"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\unicodedata.pyd"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\vcredist_x86.exe"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\wx._controls_.pyd"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\wx._core_.pyd"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\wx._gdi_.pyd"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\wx._misc_.pyd"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\wx._windows_.pyd"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\wxbase30u_net_vc90.dll"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\wxbase30u_vc90.dll"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\wxmsw30u_adv_vc90.dll"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\wxmsw30u_core_vc90.dll"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\wxmsw30u_html_vc90.dll"
+ File "C:\Me\minimal python2.7.6\wx_simple_gui_events_dist_libs\dist\_hashlib.pyd"
+SectionEnd
+
+Section -AdditionalIcons
+ WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
+ CreateShortCut "$SMPROGRAMS\PHR GUI\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
+ CreateShortCut "$SMPROGRAMS\PHR GUI\Uninstall.lnk" "$INSTDIR\uninst.exe"
+SectionEnd
+
+Section -Post
+ ExecWait '$INSTDIR\vcredist_x86.exe /q'
+ WriteUninstaller "$INSTDIR\uninst.exe"
+ WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\phr-gui.exe"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\phr-gui.exe"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
+SectionEnd
+
+
+Function un.onUninstSuccess
+ HideWindow
+ MessageBox MB_ICONINFORMATION|MB_OK "La desinstalación de $(^Name) finalizó satisfactoriamente."
+FunctionEnd
+
+Function un.onInit
+ MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "¿Está completamente seguro que desea desinstalar $(^Name) junto con todos sus componentes?" IDYES +2
+ Abort
+FunctionEnd
+
+Section Uninstall
+ Delete "$INSTDIR\${PRODUCT_NAME}.url"
+ Delete "$INSTDIR\uninst.exe"
+ Delete "$INSTDIR\_hashlib.pyd"
+ Delete "$INSTDIR\wxmsw30u_html_vc90.dll"
+ Delete "$INSTDIR\wxmsw30u_core_vc90.dll"
+ Delete "$INSTDIR\wxmsw30u_adv_vc90.dll"
+ Delete "$INSTDIR\wxbase30u_vc90.dll"
+ Delete "$INSTDIR\wxbase30u_net_vc90.dll"
+ Delete "$INSTDIR\wx._windows_.pyd"
+ Delete "$INSTDIR\wx._misc_.pyd"
+ Delete "$INSTDIR\wx._gdi_.pyd"
+ Delete "$INSTDIR\wx._core_.pyd"
+ Delete "$INSTDIR\wx._controls_.pyd"
+ Delete "$INSTDIR\vcredist_x86.exe"
+ Delete "$INSTDIR\unicodedata.pyd"
+ Delete "$INSTDIR\select.pyd"
+ Delete "$INSTDIR\python27.dll"
+ Delete "$INSTDIR\phr-gui.exe"
+ Delete "$INSTDIR\library.zip"
+ Delete "$INSTDIR\imagen.jpg"
+ Delete "$INSTDIR\bz2.pyd"
+
+ Delete "$SMPROGRAMS\PHR GUI\Uninstall.lnk"
+ Delete "$SMPROGRAMS\PHR GUI\Website.lnk"
+ Delete "$DESKTOP\PHR GUI.lnk"
+ Delete "$SMPROGRAMS\PHR GUI\PHR GUI.lnk"
+
+ RMDir "$SMPROGRAMS\PHR GUI"
+ RMDir "$INSTDIR"
+
+ DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
+ DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
+ SetAutoClose true
+SectionEnd
\ No newline at end of file