Skip to content

Commit

Permalink
Mise au point version installable
Browse files Browse the repository at this point in the history
  • Loading branch information
cedrick-f committed Jun 7, 2015
1 parent 9b77685 commit 9b3e59e
Show file tree
Hide file tree
Showing 10 changed files with 273 additions and 134 deletions.
71 changes: 41 additions & 30 deletions pySequence.iss
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,32 @@
;along with pySequence; if not, write to the Free Software
;Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

[ISPP]
#define AppName "pySequence"
#define AppVersion "6.0-beta.18"
#define AppVersionInfo "6.0.0.18"
#define AppVersionBase "6"

#define AppURL "https://github.com/cedrick-f/pySequence"

[Setup]
;Informations générales sur l'application

AppName=pySequence
AppVersion=3.0
AppVerName=pySequence 3.0
AppName={#AppName}
AppVersion={#AppVersion}
AppVerName={#AppName} {#AppVersion}

AppPublisher=Cédrick Faury
AppCopyright=Copyright © 2011-2012 Cédrick Faury
VersionInfoVersion = 3.0.0.0
AppCopyright=Copyright © 2011-2015 Cédrick Faury
VersionInfoVersion = {#AppVersionInfo}

;Répertoire de base contenant les fichiers
SourceDir=D:\Developpement\Sequence
SourceDir=D:\Developpement\pySequence

;Repertoire d'installation
DefaultDirName={pf}\pySequence
DefaultGroupName=pySequence
LicenseFile=src\gpl.txt
DefaultDirName={pf}\{#AppName}
DefaultGroupName={#AppName}
LicenseFile=LICENSE.txt

;Paramètres de compression
;lzma ou zip
Expand All @@ -45,7 +53,7 @@ SolidCompression=yes
PrivilegesRequired=none

;Nom du fichier généré et répertoire de destination
OutputBaseFilename=pySequence_3.0beta2
OutputBaseFilename=setup_pySequence_{#AppVersion}_win32
OutputDir=releases

UninstallDisplayIcon={app}\logo.ico
Expand All @@ -57,11 +65,12 @@ WindowShowCaption=true
BackColorDirection=lefttoright

AlwaysUsePersonalGroup=no
ChangesAssociations=yes



[Messages]
BeveledLabel=pySequence 3.0 installation
BeveledLabel=pySequence {#AppVersion} installation

[Languages]
Name: fr; MessagesFile: "compiler:Languages\French.isl"
Expand All @@ -85,14 +94,13 @@ fr.AllUsers=Tous les utilisateurs
fr.JustMe=Seulement moi
fr.ShortCut=Raccourcis :
fr.Association=Association de fichier :
version = 3.0


[Files]
;
; Fichiers de la distribution
;
Source: src\dist\*.*; DestDir: {app}\bin; Flags : ignoreversion recursesubdirs;
Source: src\build\*.*; DestDir: {app}; Flags : ignoreversion recursesubdirs;
;Source: *.txt; DestDir: {app}; Flags : ignoreversion;
;Source: Images\*.ico; DestDir: {app}\Images; Flags : ignoreversion;
;Source: Images\*.png; DestDir: {app}\Images; Flags : ignoreversion;
Expand All @@ -101,8 +109,8 @@ Source: src\dist\*.*; DestDir: {app}\bin; Flags : ignoreversion recursesubdirs;
;
; Fichiers exemples
;
Source: Exemples\*.seq; DestDir: {app}\Exemples; Flags : ignoreversion;
Source: Exemples\*.prj; DestDir: {app}\Exemples; Flags : ignoreversion;
;Source: Exemples\*.seq; DestDir: {app}\Exemples; Flags : ignoreversion;
;Source: Exemples\*.prj; DestDir: {app}\Exemples; Flags : ignoreversion;


; les dll C++
Expand All @@ -113,18 +121,18 @@ Source: Exemples\*.prj; DestDir: {app}\Exemples; Flags : ignoreversion;
;Source: {src}; DestDir: {code:DefAppDataFolder}\Test\;

[Tasks]
Name: desktopicon2; Description: {cm:CreateDesktopIcon} pySequence ;GroupDescription: {cm:ShortCut}; MinVersion: 4,4
Name: desktopicon2; Description: {cm:CreateDesktopIcon} {#AppName} ;GroupDescription: {cm:ShortCut}; MinVersion: 4,4
Name: fileassoc; Description: {cm:AssocFileExtension};GroupDescription: {cm:Association};
Name: common; Description: {cm:AllUsers}; GroupDescription: {cm:InstallFor}; Flags: exclusive
Name: local; Description: {cm:JustMe}; GroupDescription: {cm:InstallFor}; Flags: exclusive unchecked

[Icons]
Name: {group}\pySequence;Filename: {app}\bin\Sequence.exe; WorkingDir: {app}\bin; IconFileName: {app}\bin\Sequence.exe
Name: {group}\{cm:uninstall} pySequence; Filename: {app}\unins000.exe;IconFileName: {app}\unins000.exe
Name: {group}\{#AppName}; Filename: {app}\bin\Sequence.exe; WorkingDir: {app}\bin; IconFileName: {app}\bin\Sequence.exe
Name: {group}\{cm:uninstall} {#AppName}; Filename: {app}\unins000.exe; IconFileName: {app}\unins000.exe
;
; On ajoute sur le Bureau l'icône pySequence
;
Name: {code:DefDesktop}\pySequence 2.2; Filename: {app}\bin\Sequence.exe; WorkingDir: {app}\bin; MinVersion: 4,4; Tasks: desktopicon2; IconFileName: {app}\bin\Sequence.exe
Name: {code:DefDesktop}\{#AppName} {#AppVersionBase}; Filename: {app}\bin\Sequence.exe; WorkingDir: {app}\bin; MinVersion: 4,4; Tasks: desktopicon2; IconFileName: {app}\bin\Sequence.exe


[_ISTool]
Expand All @@ -133,19 +141,22 @@ Use7zip=true

[Registry]
; Tout ce qui concerne les fichiers .seq et .prj
Root: HKCR; SubKey: .seq; ValueType: string; ValueData: {cm:FileExtensionSeq}; Flags: uninsdeletekey
Root: HKCR; SubKey: {cm:FileExtensionSeq}; ValueType: string; Flags: uninsdeletekey; ValueData: {cm:FileExtensionNameSeq}
Root: HKCR; SubKey: {cm:FileExtensionSeq}\Shell\Open\Command; ValueType: string; ValueData: """{app}\bin\Sequence.exe"" ""%1"""; Flags: uninsdeletekey;
Root: HKCR; Subkey: {cm:FileExtensionSeq}\DefaultIcon; ValueType: string; ValueData: {app}\bin\fichier_seq.ico,0; Flags: uninsdeletekey;
Root: HKCR; SubKey: "{cm:FileExtensionSeq}"; ValueType: string; ValueName: ""; ValueData: "{cm:FileExtensionNameSeq}"; Flags: uninsdeletekey
Root: HKCR; Subkey: "{cm:FileExtensionSeq}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\fichier_seq.ico,0"; Flags: uninsdeletekey
Root: HKCR; SubKey: "{cm:FileExtensionSeq}\Shell\Open"; ValueType: string; ValueName: "Icon"; ValueData: "{app}\bin\Sequence.exe"; Flags: uninsdeletekey
Root: HKCR; SubKey: "{cm:FileExtensionSeq}\Shell\Open\Command"; ValueType: string; ValueName: ""; ValueData: """{app}\bin\Sequence.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: ".seq"; ValueType: string; ValueName: ""; ValueData: "{cm:FileExtensionSeq}"; Flags: uninsdeletevalue

Root: HKCR; SubKey: .prj; ValueType: string; ValueData: {cm:FileExtensionPrj}; Flags: uninsdeletekey
Root: HKCR; SubKey: {cm:FileExtensionPrj}; ValueType: string; Flags: uninsdeletekey; ValueData: {cm:FileExtensionNamePrj}
Root: HKCR; SubKey: {cm:FileExtensionPrj}\Shell\Open\Command; ValueType: string; ValueData: """{app}\bin\Sequence.exe"" ""%1"""; Flags: uninsdeletekey;
Root: HKCR; Subkey: {cm:FileExtensionPrj}\DefaultIcon; ValueType: string; ValueData: {app}\bin\fichier_prj.ico,0; Flags: uninsdeletekey;
Root: HKCR; SubKey: .prj; ValueType: string; ValueData: {cm:FileExtensionPrj}; Flags: uninsdeletevalue
Root: HKCR; SubKey: {cm:FileExtensionPrj}; ValueType: string; ValueData: "{cm:FileExtensionNamePrj}"; Flags: uninsdeletekey
Root: HKCR; SubKey: {cm:FileExtensionPrj}\Shell\Open\Command; ValueType: string; ValueData: """{app}\bin\Sequence.exe"" ""%1"""; Flags: uninsdeletekey
Root: HKCR; Subkey: {cm:FileExtensionPrj}\DefaultIcon; ValueType: string; ValueData: "{app}\bin\fichier_prj.ico,0"; Flags: uninsdeletekey


; Pour stocker le style d'installation : "All users" ou "Current user"
Root: HKLM; Subkey: SOFTWARE\pySequence; ValueType: string; ValueName: DataFolder; ValueData: {code:DefAppDataFolder}\pySequence ; Flags: uninsdeletekey;
Root: HKLM; Subkey: SOFTWARE\{#AppName}; Flags: uninsdeletekey
Root: HKLM; Subkey: SOFTWARE\{#AppName}; ValueType: string; ValueName: DataFolder; ValueData: {code:DefAppDataFolder}\{#AppName} ; Flags: uninsdeletekey
Root: HKLM; Subkey: SOFTWARE\{#AppName}; ValueType: string; ValueName: UninstallPath ; ValueData: {uninstallexe}; Flags: uninsdeletekey



Expand All @@ -154,7 +165,7 @@ Procedure URLLabelOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('open', 'http://code.google.com/p/pysequence/', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
ShellExec('open', 'http://fauryc.free.fr/spip.php?rubrique7', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
{*** INITIALISATION ***}
Expand All @@ -163,7 +174,7 @@ var
URLLabel: TNewStaticText;
begin
URLLabel := TNewStaticText.Create(WizardForm);
URLLabel.Caption := 'http://code.google.com/p/pysequence/';
URLLabel.Caption := 'http://fauryc.free.fr';
URLLabel.Cursor := crHand;
URLLabel.OnClick := @URLLabelOnClick;
URLLabel.Parent := WizardForm;
Expand Down
4 changes: 3 additions & 1 deletion src/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
import wx.combo
#from constantes import *
import constantes#, constantes_SSI
import util_path

#from constantes_ETT import PositionCibleCI
from Referentiel import REFERENTIELS
import xml.etree.ElementTree as ET
Expand Down Expand Up @@ -72,7 +74,7 @@ def __init__(self, options = None):


# Le fichier où seront sauvées les options
self.fichierOpt = os.path.join(constantes.APP_DATA_PATH, "sequence.cfg")
self.fichierOpt = os.path.join(util_path.APP_DATA_PATH, "sequence.cfg")



Expand Down
4 changes: 2 additions & 2 deletions src/Referentiel.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
import xml.etree.ElementTree as ET
Element = type(ET.Element(None))


import util_path
#########################################################################################
DOSSIER_REF = os.path.join(constantes.PATH, r"..", r"referentiels")
DOSSIER_REF = os.path.join(util_path.PATH, r"..", r"referentiels")
REFERENTIELS = {}
ARBRE_REF = {}

Expand Down
31 changes: 14 additions & 17 deletions src/Sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@ def MyExceptionHook(etype, value, trace):

# Outils "système"
import os
import glob




import webbrowser
import subprocess
Expand All @@ -124,7 +120,10 @@ def MyExceptionHook(etype, value, trace):
import wx.lib.colourdb
#import wx.lib.fancytext as fancytext

# Module de gestion des dossiers, de l'installation et de l'enregistrement
import util_path

# Chargement des images
import images

# Graphiques vectoriels
Expand Down Expand Up @@ -161,18 +160,20 @@ def MyExceptionHook(etype, value, trace):


# des widgets wx évolués "faits maison"
from widgets import Variable, VariableCtrl, VAR_REEL_POS, EVT_VAR_CTRL, VAR_ENTIER_POS, getHoraireTxt#, chronometrer
from widgets import Variable, VariableCtrl, VAR_REEL_POS, EVT_VAR_CTRL, VAR_ENTIER_POS#, chronometrer
#from CustomCheckBox import CustomCheckBox
# Les constantes et les fonctions de dessin


# Les constantes partagées
from constantes import calculerEffectifs, revCalculerEffectifs, PATH, getSingulierPluriel,\
from constantes import calculerEffectifs, revCalculerEffectifs, getSingulierPluriel,\
strEffectifComplet, getElementFiltre, COUL_OK, COUL_NON, COUL_BOF, COUL_BIEN, \
toList, COUL_COMPETENCES, CHAR_POINT, COUL_PARTIE, COUL_ABS, \
toFileEncoding, toSystemEncoding, FILE_ENCODING, SYSTEM_ENCODING
import constantes



# Pour les copier/coller
import pyperclip

Expand All @@ -182,7 +183,6 @@ def MyExceptionHook(etype, value, trace):
# Les constantes partagées
from Referentiel import REFERENTIELS, ARBRE_REF
import Referentiel
#import constantes_ETT

import synthesePeda

Expand All @@ -202,8 +202,6 @@ def MyExceptionHook(etype, value, trace):

from rapport import FrameRapport, RapportRTF



from xml.dom.minidom import parse, parseString
import xml.dom

Expand All @@ -216,7 +214,7 @@ def MyExceptionHook(etype, value, trace):
#import wx.richtext as rt
import richtext

from math import sin,cos,pi, log
from math import sin, cos, pi
from operator import attrgetter

####################################################################################
Expand Down Expand Up @@ -4384,7 +4382,6 @@ def SignalerPb(self, etatEff, etatSys):
######################################################################################
def GetListSousSeancesRot(self, tout = False):
l = []
i = 0
for ss in self.seances:
for n in range(ss.nombre.v[0]):
l.append(ss)
Expand Down Expand Up @@ -7904,7 +7901,7 @@ def CreateMenuBar(self):

tool_menu = wx.Menu()

if sys.platform == "win32" :
if sys.platform == "win32" and util_path.INSTALL_PATH != None:
# tool_menu.Append(31, u"Options")
self.menuReg = tool_menu.Append(32, u"a")
self.MiseAJourMenu()
Expand Down Expand Up @@ -7993,7 +7990,7 @@ def OnRegister(self, event):
if register.IsRegistered():
ok = register.UnRegister()
else:
ok = register.Register(PATH)
ok = register.Register(util_path.PATH)
if not ok:
messageErreur(self, u"Accès refusé",
u"Accès à la base de registre refusé !\n\n" \
Expand Down Expand Up @@ -8191,7 +8188,7 @@ def etablirBilan(self, event = None):
else:
ref = None
else:
dossier = constantes.INSTALL_PATH
dossier = util_path.INSTALL_PATH
ref = None
win = synthesePeda.FenetreBilan(self, dossier, ref)
win.Show()
Expand Down Expand Up @@ -15497,7 +15494,7 @@ def ConstruireCasesEleve(self):
"""
# print "ConstruireCasesEleve"
tache = self.pptache.tache
prj = tache.GetProjetRef()
# prj = tache.GetProjetRef()
for codeIndic, item in self.items.items():
cases = self.GetItemWindow(item, 3)
if isinstance(cases, ChoixCompetenceEleve):
Expand Down Expand Up @@ -16869,7 +16866,7 @@ def Construire(self, ref):

lst_pdf = []
for d in ref.BO_dossier:
path = os.path.join(constantes.BO_PATH, constantes.toFileEncoding(d))
path = os.path.join(util_path.BO_PATH, constantes.toFileEncoding(d))
for root, dirs, files in os.walk(path):
for f in files:
if os.path.splitext(f)[1] == r".pdf":
Expand Down Expand Up @@ -17089,7 +17086,7 @@ def __init__(self, parent):
#---------
licence = wx.Panel(nb, -1)
try:
txt = open(os.path.join(PATH, "gpl.txt"))
txt = open(os.path.join(util_path.PATH, "gpl.txt"))
lictext = txt.read()
txt.close()
except:
Expand Down
Loading

0 comments on commit 9b3e59e

Please sign in to comment.