Guten Abend alle zusammen,
ich habe mir mal für ein Setup folgende Datei geschrieben, noch ist sie nicht vollends fertig, ein paar Dinge werden noch dazu kommen, welche aber nichts mit der momentanen Sache am Hut haben.
Einmal der komplette Code:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171:
| ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "DOSBox CAE2000 Version" #define MyAppVersion "1.0" #define MyAppPublisher "xxx" #define MyAppURL "xxx" #define MyAppExeName "DOSBoxPrinter.exe"
[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=DOSBox CAE2000 Version AppName= AppVersion= ;AppVerName= AppPublisher= AppPublisherURL=xxx AppSupportURL=xxx AppUpdatesURL= DefaultDirName=\DOSBox_CAE2000 DefaultGroupName=DOSBox-CAE2000 OutputBaseFilename=DOSBox_CAE2000 Version UseSetupLdr=yes SetupIconFile=D:\WISAG\Logos\WISAG_Logo.ico Compression=none SolidCompression=yes InternalCompressLevel=ultra AppCopyright= © 2013 - WindowVisible=true UsePreviousAppDir=yes UsePreviousGroup=yes UsePreviousSetupType=yes UsePreviousTasks=yes UsePreviousUserInfo=yes DirExistsWarning=AUTO ChangesAssociations=yes SetupLogging=yes AlwaysUsePersonalGroup=yes BackSolid=yes BackColor=clGray BackColor2=clLime
[Languages] Name: "german"; MessagesFile: "compiler:Languages\German.isl"
[CustomMessages] FilesDataLocation=Wählen Sie das Verzeichnis von CAE2000 aus FilesDataHeader=Wo soll die Datei "Druckerparameter" gespeichert Werden? FilesDataDescription=Die Datei "Druckerparameter" wird im folgenden Ordner gespeichert SelectDirBrowseLabel=Klicken Sie auf "Weiter", um fortzufahren. \ Klicken Sie auf "Durchsuchen", falls Sie einen anderen Ordner auswählen möchten. NewFolder=Neuer Ordner
[Tasks] Name: "desktopicon"; Description: ""; GroupDescription: ""; Flags: unchecked Name: "quicklaunchicon"; Description: ""; GroupDescription: ""; Flags: unchecked; OnlyBelowVersion: 0,6.1
[Files] Source: "\PRTDEF.GER"; DestDir: "\Backup\"; Flags: external ignoreversion Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBoxPrinter.sfx\DOSBoxPrinter.exe"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBoxPrinter.sfx\*"; DestDir: ""; Flags: ignoreversion recursesubdirs createallsubdirs uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\zmbv\zmbv\*"; DestDir: "\zmbv"; Flags: ignoreversion recursesubdirs createallsubdirs uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\zmbv\doc\*"; DestDir: "\doc\"; Flags: ignoreversion recursesubdirs createallsubdirs uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\zmbv\AUTHORS.txt"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\zmbv\COPYING.txt"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\zmbv\dosbox.exe"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\zmbv\INSTALL.txt"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\zmbv\msvcp71.dll"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\zmbv\msvcr71.dll"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\zmbv\NEWS.txt"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\zmbv\README.txt"; DestDir: ""; Flags: ignoreversion isreadme uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\zmbv\SDL.dll"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\zmbv\SDL_net.dll"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\zmbv\THANKS.txt"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\courier.ttf"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\dosbox-debug.exe"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\fontlicense.txt"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\pdcurses.dll"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\roman.ttf"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\sansserif.ttf"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\DOSBox_Megabuild6-win32-installer\script.ttf"; DestDir: ""; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\dosbox-SVN_MB6.conf"; DestDir: "\DOSBox\"; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\german-0.74.lang"; DestDir: "\DOSBox\"; Flags: ignoreversion uninsrestartdelete Source: "C:\Users\BWolonkieiwicz\Desktop\PRTDEF.GER"; DestDir: ""; Flags: ignoreversion uninsneveruninstall ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons] Name: "{group}\DOSBox CAE2000 Version"; Filename: "{app}\DOSBoxPrinter.exe"; IconFilename: "{app}\dosbox.exe" Name: "{group}\Lies Mich"; Filename: "{app}\README.txt"; IconFilename: "{app}\install.txt" Name: "{group}\Konfigurationsdatei"; Filename: "{localappdata}\DOSBox\dosbox-SVN_MB6.conf"; IconFilename: "{app}\dosbox.exe" Name: "{group}\Deinstalieren"; Filename: "{app}\unins000.exe" Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon; IconFilename: "{app}\unins000.exe" Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon; IconFilename: "{app}\dosbox.exe"
[Code]
var UserDirPage : TInputDirWizardPage; UserFolder : string; function InitializeSetup: boolean; begin UserFolder := ''; Result := true; end;
function InstallCae(Param:String):String; begin result := UserDirPage.Values[0] ; end; procedure InitializeWizard; begin UserDirPage := CreateInputDirPage(wpSelectDir, ExpandConstant(''), ExpandConstant(''), ExpandConstant(''), false, 'Neuer Ordner');
//"Klicken sie weiter..." Meldung UserDirPage.Add(SetupMessage(msgSelectDirBrowseLabel));
//Standardpfad in der Verzeichnisauswahl UserDirPage.Values[0] := ExpandConstant( 'C:\CAE2000\'); end;
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); //Code für deinstallation begin if CurUninstallStep=usPostUninstall then begin FileCopy(ExpandConstant('\Backup\PRTDEF.GER'),ExpandConstant('\PRTDEF.GER'),true); DelTree(ExpandConstant('\Backup\'), true, true, true); end; end;
[Run] Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
[UninstallDelete] Type: files; Name: "{app}\*.exe" Type: files; Name: "{app}\*.dll" Type: files; Name: "{app}\*.txt" Type: files; Name: "{app}\*.ttf" Type: files; Name: "{app}\doc\*.html" Type: files; Name: "{app}\doc\images\*.png" Type: files; Name: "{app}\zmbv\*.txt" Type: files; Name: "{app}\zmbv\*.dll" Type: files; Name: "{app}\zmbv\*.inf" Type: files; Name: "{app}\PrintApps\*.exe" Type: files; Name: "{app}\PrintApps\PDFV\*.exe" Type: files; Name: "{app}\PrintApps\PDFV\*.pdf" Type: files; Name: "{app}\PrintApps\PDFV\*.dat" Type: files; Name: "{app}\PrintOut\*.btm" Type: files; Name: "{localappdata}\DOSBox\" |
Mein Problem besteht nun darin das ich beim Ausführen der Deinstallation die Fehlermeldung "Could not call proc" bekomme und mein ersteller Backup-ordner zwar gelöscht wird, jedoch die Backup-Datei nicht kopiert wird.
Anbei zur Veranschaulichung der Code
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11:
| procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); begin if CurUninstallStep=usPostUninstall then begin FileCopy(ExpandConstant('{code:InstallCae}\Backup\PRTDEF.GER'),ExpandConstant('{code:InstallCae}\PRTDEF.GER'),true); DelTree(ExpandConstant('{code:InstallCae}\Backup\'), true, true, true); end; end; |
Ich hoffe jemand hat einen Tipp für mich Neuling.
MfG Benny
Moderiert von Narses: Topic aus Dateizugriff verschoben am Mi 15.05.2013 um 12:25