Inno Setup не (всегда) компилирует последнюю версию моей программы - PullRequest
1 голос
/ 27 апреля 2020

Я недавно использовал Inno Setup для создания установщика для моего приложения. NET Winforms. Я обнаружил, что много раз устанавливалась неправильная (более старая) версия моей программы. Чтобы убедиться в этом, у меня есть форма в моей форме, которая показывает версию (жестко). Даже после удаления предыдущей версии, перестройки моего приложения и проверки, сначала запустив .exe в моей папке отладки - это показывает правильную версию. Но когда я снова запускаю (неизмененный) скрипт установки, он запускается, и старая версия моей программы после завершения установки. Кстати, я устанавливаю в том же каталоге (перезаписывая). В прошлый раз я делал это дважды, а потом он придумал правильную версию. Кто-нибудь видел это раньше?

Я включил содержимое файла .iss. ПРИМЕЧАНИЕ. Я не говорил, что он не работает, он не работает большую часть времени.

 ; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "panelsTest"
#define MyAppVersion "1.0"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "panelsTest.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={{51065F75-A2F7-4C12-A915-68C1E8F0395B}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=c:\panelsTest\{#MyAppName}
DisableProgramGroupPage=yes
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputBaseFilename=mysetup
Compression=lzma
SolidCompression=yes
WizardStyle=modern
SetupLogging=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\panelsTest.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\columns.json"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.Data.v19.2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.Data.v19.2.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.Images.v19.2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.Office.v19.2.Core.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.Office.v19.2.Core.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.Pdf.v19.2.Core.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.Pdf.v19.2.Core.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.Printing.v19.2.Core.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.Printing.v19.2.Core.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.RichEdit.v19.2.Core.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.RichEdit.v19.2.Core.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.Sparkline.v19.2.Core.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.Sparkline.v19.2.Core.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.Utils.v19.2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.Utils.v19.2.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.XtraBars.v19.2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.XtraBars.v19.2.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.XtraEditors.v19.2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.XtraEditors.v19.2.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.XtraGrid.v19.2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.XtraGrid.v19.2.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.XtraLayout.v19.2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.XtraLayout.v19.2.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.XtraPrinting.v19.2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.XtraPrinting.v19.2.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.XtraTreeList.v19.2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\DevExpress.XtraTreeList.v19.2.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\EMO-72-07-200.ubo"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\fileLoc.bin"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\fileLocs.json"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\Fizzler.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\materials.json"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\Newtonsoft.Json.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\Newtonsoft.Json.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\panelsTest.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\panelsTest.exe.config"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\panelsTest.pdb"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\Svg.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Gebruiker\Documents\batchunfolder\WindowsFormsApp1\panelsTest\bin\Debug\Svg.xml"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
...