Commits

Anonymous committed 4746bbb

Générateur de l'installeur Windows

Comments (0)

Files changed (3)

editor/models/ExportZip.py

 import webbrowser
 from zipfile import ZipFile
 
-QCU_PARENT_PATH = os.path.join(os.path.dirname(__file__), '..', '..')
+QCU_PARENT_PATH = os.getcwd()
 
 FILES = ['qcu/sons/faux.mp3', 'qcu/sons/gagne.mp3', 'qcu/sons/juste.mp3', 
          'qcu/sons/perdu.mp3', 'qcu/sons/tictac.mp3', 'qcu/sons/vrai.mp3', 
 
     zipname = unicode(zipname)
 
-    # On sauvegarde le précédent
-    os.rename('qcu/XML/quiz.xml', 'qcu/XML/quiz.xml.bak')
-
     with open('qcu/XML/quiz.xml', 'w') as xml_file:
         xml_file.write(quiz.writeXML().encode('utf-8'))
         
     writeZip(zipname)
 
-    # On restaure le précédent
-    os.rename('qcu/XML/quiz.xml.bak', 'qcu/XML/quiz.xml')
-
     webbrowser.open(os.path.dirname(zipname))

iss/qcu-editor.iss

+; Script generated by the Inno Setup Script Wizard.
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+
+[Setup]
+; NOTE: The value of AppId uniquely identifies this application.
+; Do not use the same AppId value in installers for other applications.
+; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
+AppId={{78D9DEC5-561D-4D28-9481-A536B0905623}
+AppName=CIP Qcu Editor
+AppVersion=1.0
+;AppVerName=CIP Qcu Editor 1.0
+AppPublisher=Universit� de Technologie de Belfort-Montb�liard
+AppPublisherURL=http://www.utbm.fr/
+AppSupportURL=http://www.utbm.fr/
+AppUpdatesURL=http://www.utbm.fr/
+DefaultDirName={pf}\qcu-editor
+DefaultGroupName=CIP Qcu Editor
+AllowNoIcons=yes
+OutputDir=C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\iss
+OutputBaseFilename=qcu-editor
+Compression=lzma
+SolidCompression=yes
+
+[Languages]
+Name: "french"; MessagesFile: "compiler:Languages\French.isl"
+
+[Tasks]
+Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
+Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
+
+[Files]
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\qcu-editor.exe"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\_hashlib.pyd"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\_socket.pyd"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\_ssl.pyd"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\bz2.pyd"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\library.zip"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\msvcp90.dll"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\pyexpat.pyd"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\PyQt4.QtCore.pyd"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\PyQt4.QtGui.pyd"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\python26.dll"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\qcu-editor.exe"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\QtCore4.dll"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\QtGui4.dll"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\select.pyd"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\sip.pyd"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\unicodedata.pyd"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\w9xpopen.exe"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Documents and Settings\Natim\Mes documents\hg\cip-qcu-editor\dist\qcu\*"; DestDir: "{app}\qcu"; Flags: ignoreversion recursesubdirs createallsubdirs
+; NOTE: Don't use "Flags: ignoreversion" on any shared system files
+
+[Icons]
+Name: "{group}\CIP Qcu Editor"; Filename: "{app}\qcu-editor.exe"
+Name: "{group}\{cm:UninstallProgram,CIP Qcu Editor}"; Filename: "{uninstallexe}"
+Name: "{commondesktop}\CIP Qcu Editor"; Filename: "{app}\qcu-editor.exe"; Tasks: desktopicon
+Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\CIP Qcu Editor"; Filename: "{app}\qcu-editor.exe"; Tasks: quicklaunchicon
+
+[Run]
+Filename: "{app}\qcu-editor.exe"; Description: "{cm:LaunchProgram,CIP Qcu Editor}"; Flags: nowait postinstall skipifsilent
+
+from distutils.core import setup
+import py2exe
+
+setup(windows=[{"script" : "qcu-editor.pyw"}], options={"py2exe" : {"includes" : ["sip"]}},)