Commits

spirit committed 42fa355

Move Inno setup script to the root of the repo.

  • Participants
  • Parent commits 111b7fa

Comments (0)

Files changed (3)

 build
 __pycache__
 .*
+setup/*

Release/VisualSubSync.iss

-; Script generated by the Inno Setup Script Wizard.
-; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
-
-#define MyAppName "VisualSubSync"
-#define MyAppVersion "2013-02-01"
-#define MyAppPublisher "Subfactory.fr"
-#define MyAppURL "https://bitbucket.org/spirit/visualsubsync"
-#define MyAppExeName "VisualSubSync.exe"
-
-#define LAVFiltersVersion "0.55.2"
-#define LAVFiltersInstaller "LAVFilters-0.55.2.exe"
-#define Win7DSFilterTweakerExeName "Win7DSFilterTweaker_5.7.exe"
-
-#define LAVFilters "LAV Filters"
-#define LAVFIltersVerName LAVFilters + " " + LAVFiltersVersion
-#define VCRedist "Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)"
-#define VCRedistInstaller "vcredist_x86.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={{8087A396-8AF5-448F-B781-07DEEF71492E}
-;AppId={#MyAppName}
-AppName={#MyAppName}
-AppVersion={#MyAppVersion}
-;AppVerName={#MyAppName} {#MyAppVersion}
-AppPublisher={#MyAppPublisher}
-AppPublisherURL={#MyAppURL}
-AppSupportURL={#MyAppURL}
-AppUpdatesURL={#MyAppURL}
-DefaultDirName={pf}\{#MyAppName}
-DefaultGroupName={#MyAppName}
-DisableProgramGroupPage=yes
-;InfoBeforeFile=..\Copying.txt
-OutputBaseFilename=VisualSubSync-{#MyAppVersion}-Setup
-Compression=lzma2/ultra64
-SolidCompression=yes
-OutputDir=.
-UninstallDisplayIcon={app}\VisualSubSync.exe
-UninstallDisplayName={#MyAppName} {#MyAppVersion}
-ChangesAssociations=yes
-
-[Languages]
-Name: "english"; MessagesFile: "compiler:Default.isl"
-
-[CustomMessages]
-AdditionalSoftware=Additional software:
-InstallSoftware=Install%1
-CleanInstall=Clear previous installation files and settings
-AssociateExtension=Associate%1 files
-OriginalVSS=Original VisualSubSync was found at the specified location and will be uninstalled.
-
-[Tasks]
-Name: "desktop_icon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{#MyAppName}:"; Flags: unchecked
-Name: "associate_vssprj"; Description: "{cm:AssociateExtension, .vssprj}"; GroupDescription: "{#MyAppName}:"
-Name: "clean_install"; Description: "{cm:CleanInstall}"; GroupDescription: "{#MyAppName}:"; Flags: unchecked checkedonce
-Name: "lav_filters"; Description: "{cm:InstallSoftware, {#LAVFIltersVerName}}"; GroupDescription: {cm:AdditionalSoftware}
-Name: "vc_redist"; Description: "{cm:InstallSoftware, {#VCRedist}}"; GroupDescription: {cm:AdditionalSoftware}; Flags: checkedonce
-
-[Files]
-Source: "VisualSubSync.exe"; DestDir: "{app}"; Flags: ignoreversion
-Source: "js3215R.dll"; DestDir: "{app}"; Flags: ignoreversion
-Source: "libhunspell.dll"; DestDir: "{app}"; Flags: ignoreversion
-Source: "VSSCustomVSFilter.dll"; DestDir: "{app}"; Flags: ignoreversion
-Source: "WavWriter.dll"; DestDir: "{app}"; Flags: ignoreversion
-Source: "dict\*"; DestDir: "{app}\dict"; Flags: ignoreversion recursesubdirs createallsubdirs
-Source: "help\*"; DestDir: "{app}\help"; Flags: ignoreversion recursesubdirs createallsubdirs
-Source: "jsplugin\*"; DestDir: "{app}\jsplugin"; Flags: ignoreversion recursesubdirs createallsubdirs
-Source: "presets\*"; DestDir: "{app}\presets"; Flags: ignoreversion recursesubdirs createallsubdirs
-Source: "vss-companion\*"; DestDir: "{app}\vss-companion"; Flags: ignoreversion recursesubdirs createallsubdirs
-Source: "web\*"; DestDir: "{app}\web"; Flags: ignoreversion recursesubdirs createallsubdirs
-Source: "setup\{#LAVFiltersInstaller}"; DestDir: "{app}\setup"; Flags: ignoreversion deleteafterinstall; Tasks: lav_filters
-Source: "setup\{#Win7DSFilterTweakerExeName}"; DestDir: "{app}\setup"; Flags: ignoreversion deleteafterinstall; Tasks: lav_filters; MinVersion: 6.1
-Source: "setup\{#VCRedistInstaller}"; DestDir: "{app}\setup"; Flags: ignoreversion deleteafterinstall; Tasks: vc_redist
-; NOTE: Don't use "Flags: ignoreversion" on any shared system files
-
-[Icons]
-Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
-;Name: "{group}\Help"; Filename: "{app}\help\index.html"
-Name: "{group}\Website"; Filename: "{#MyAppURL}"
-;Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
-Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktop_icon
-
-[Run]
-Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
-Filename: "{app}\setup\{#LAVFiltersInstaller}"; Parameters: "/silent"; Tasks: lav_filters
-Filename: "{app}\setup\{#Win7DSFilterTweakerExeName}"; Parameters: "/silent /h264_x86={{EE30215D-164F-4A92-A4EB-9D4C13390F9F}} /xvid_x86={{EE30215D-164F-4A92-A4EB-9D4C13390F9F}} /aac_x86={{E8E73B6B-4CB3-44A4-BE99-4F7BCB96E491}}"; Tasks: lav_filters; MinVersion: 6.1
-Filename: "{app}\setup\{#VCRedistInstaller}"; Parameters: "/passive /showfinalerror"; Tasks: vc_redist
-
-[Dirs]
-Name: "{app}\setup"; Flags: deleteafterinstall
-;Name: "{app}"; Permissions: users-modify
-
-[Registry]
-Root: HKCR; Subkey: ".vssprj"; ValueType: string; ValueName: ""; ValueData: "VisualSubSync.Document"; Flags: uninsdeletevalue; Tasks: associate_vssprj
-Root: HKCR; Subkey: "VisualSubSync.Document"; ValueType: string; ValueName: ""; ValueData: "VisualSubSync Project"; Flags: uninsdeletekey; Tasks: associate_vssprj
-Root: HKCR; Subkey: "VisualSubSync.Document\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},1"; Tasks: associate_vssprj
-Root: HKCR; Subkey: "VisualSubSync.Document\shell\open\command"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName} ""%1"""; Tasks: associate_vssprj
-
-[InstallDelete]
-Type: filesandordirs; Name: "{app}"; Tasks: clean_install
-Type: filesandordirs; Name: "{localappdata}\VirtualStore\Program Files (x86)\{#MyAppName}"; Tasks: clean_install
-Type: filesandordirs; Name: "{localappdata}\VirtualStore\Program Files\{#MyAppName}"; Tasks: clean_install
-Type: filesandordirs; Name: "{group}"; Tasks: clean_install
-Type: files; Name: "{commondesktop}\{#MyAppName}.lnk"; Tasks: clean_install
-Type: files; Name: "{userdesktop}\{#MyAppName}.lnk"; Tasks: clean_install
-
-[UninstallDelete]
-Type: filesandordirs; Name: "{app}"
-
-[Code]
-const
-  VCRedistKey = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}';
-  CleanInstallTaskIndex = 3;
-  VCRedistTaskIndex = 6;
-
-var
-  OriginalVSSUninstaller: String;
-  OriginalVSSInstalled: Boolean;
-  VCRedistCheckDone : Boolean;
-
-function InitializeSetup(): Boolean;
-begin
-  VCRedistCheckDone := False;
-  Result := True;
-end;
-
-function NextButtonClick(CurPageID: Integer): Boolean;
-begin
-  if CurPageID = wpSelectDir then
-  begin
-    OriginalVSSUninstaller := WizardDirValue() + '\VisualSubSync-uninstall.exe';
-    if FileExists(OriginalVSSUninstaller) then
-    begin
-      OriginalVSSInstalled := True;
-      if not WizardSilent() then
-      begin
-        MsgBox(CustomMessage('OriginalVSS'), mbInformation, MB_OK);
-      end;
-    end
-    else
-    begin
-      OriginalVSSInstalled := False;
-    end;
-  end;
-  Result := True;
-end;
-
-procedure CurPageChanged(CurPageID: Integer);
-begin
-  if CurPageID = wpSelectTasks then
-  begin
-    if OriginalVSSInstalled then
-    begin
-      WizardForm.TasksList.ItemEnabled[CleanInstallTaskIndex] := False;
-      WizardForm.TasksList.Checked[CleanInstallTaskIndex] := True;
-    end
-    else if DirExists(WizardDirValue()) then
-    begin
-      WizardForm.TasksList.ItemEnabled[CleanInstallTaskIndex] := True;
-    end
-    else
-    begin
-      WizardForm.TasksList.ItemEnabled[CleanInstallTaskIndex] := False;
-      WizardForm.TasksList.Checked[CleanInstallTaskIndex] := False;
-    end;
-
-    if not VCRedistCheckDone then
-    begin
-      if RegKeyExists(HKEY_LOCAL_MACHINE, VCRedistKey) then
-      begin
-        WizardForm.TasksList.Checked[VCRedistTaskIndex] := False;
-      end
-      else
-      begin
-        WizardForm.TasksList.ItemEnabled[VCRedistTaskIndex] := False;
-        WizardForm.TasksList.Checked[VCRedistTaskIndex] := True;
-      end;
-      VCRedistCheckDone := True;
-    end;
-  end;
-end;
-
-procedure CurStepChanged(CurStep: TSetupStep);
-var
-  ResultCode: Integer;
-begin
-  if CurStep = ssInstall then
-  begin
-    if OriginalVSSInstalled then
-    begin
-      Exec(OriginalVSSUninstaller, '/S', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
-    end;
-  end;
-end;

VisualSubSync.iss

+; Script generated by the Inno Setup Script Wizard.
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+
+#define MyAppName "VisualSubSync"
+#define MyAppVersion "2013-02-01"
+#define MyAppPublisher "Subfactory.fr"
+#define MyAppURL "https://bitbucket.org/spirit/visualsubsync"
+#define MyAppExeName "VisualSubSync.exe"
+
+#define LAVFiltersVersion "0.55.2"
+#define LAVFiltersInstaller "LAVFilters-0.55.2.exe"
+#define Win7DSFilterTweakerExeName "Win7DSFilterTweaker_5.7.exe"
+
+#define LAVFilters "LAV Filters"
+#define LAVFIltersVerName LAVFilters + " " + LAVFiltersVersion
+#define VCRedist "Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)"
+#define VCRedistInstaller "vcredist_x86.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={{8087A396-8AF5-448F-B781-07DEEF71492E}
+;AppId={#MyAppName}
+AppName={#MyAppName}
+AppVersion={#MyAppVersion}
+;AppVerName={#MyAppName} {#MyAppVersion}
+AppPublisher={#MyAppPublisher}
+AppPublisherURL={#MyAppURL}
+AppSupportURL={#MyAppURL}
+AppUpdatesURL={#MyAppURL}
+DefaultDirName={pf}\{#MyAppName}
+DefaultGroupName={#MyAppName}
+DisableProgramGroupPage=yes
+;InfoBeforeFile=..\Copying.txt
+OutputBaseFilename=VisualSubSync-{#MyAppVersion}-Setup
+Compression=lzma2/ultra64
+SolidCompression=yes
+OutputDir=setup
+UninstallDisplayIcon={app}\VisualSubSync.exe
+UninstallDisplayName={#MyAppName} {#MyAppVersion}
+ChangesAssociations=yes
+
+[Languages]
+Name: "english"; MessagesFile: "compiler:Default.isl"
+
+[CustomMessages]
+AdditionalSoftware=Additional software:
+InstallSoftware=Install%1
+CleanInstall=Clear previous installation files and settings
+AssociateExtension=Associate%1 files
+OriginalVSS=Original VisualSubSync was found at the specified location and will be uninstalled.
+
+[Tasks]
+Name: "desktop_icon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{#MyAppName}:"; Flags: unchecked
+Name: "associate_vssprj"; Description: "{cm:AssociateExtension, .vssprj}"; GroupDescription: "{#MyAppName}:"
+Name: "clean_install"; Description: "{cm:CleanInstall}"; GroupDescription: "{#MyAppName}:"; Flags: unchecked checkedonce
+Name: "lav_filters"; Description: "{cm:InstallSoftware, {#LAVFIltersVerName}}"; GroupDescription: {cm:AdditionalSoftware}
+Name: "vc_redist"; Description: "{cm:InstallSoftware, {#VCRedist}}"; GroupDescription: {cm:AdditionalSoftware}; Flags: checkedonce
+
+[Files]
+Source: "Release\VisualSubSync.exe"; DestDir: "{app}"; Flags: ignoreversion
+Source: "Release\js3215R.dll"; DestDir: "{app}"; Flags: ignoreversion
+Source: "Release\libhunspell.dll"; DestDir: "{app}"; Flags: ignoreversion
+Source: "Release\VSSCustomVSFilter.dll"; DestDir: "{app}"; Flags: ignoreversion
+Source: "Release\WavWriter.dll"; DestDir: "{app}"; Flags: ignoreversion
+Source: "Release\dict\*"; DestDir: "{app}\dict"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "Release\help\*"; DestDir: "{app}\help"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "Release\jsplugin\*"; DestDir: "{app}\jsplugin"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "Release\presets\*"; DestDir: "{app}\presets"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "Release\vss-companion\*"; DestDir: "{app}\vss-companion"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "Release\web\*"; DestDir: "{app}\web"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "setup\{#LAVFiltersInstaller}"; DestDir: "{app}\setup"; Flags: ignoreversion deleteafterinstall; Tasks: lav_filters
+Source: "setup\{#Win7DSFilterTweakerExeName}"; DestDir: "{app}\setup"; Flags: ignoreversion deleteafterinstall; Tasks: lav_filters; MinVersion: 6.1
+Source: "setup\{#VCRedistInstaller}"; DestDir: "{app}\setup"; Flags: ignoreversion deleteafterinstall; Tasks: vc_redist
+; NOTE: Don't use "Flags: ignoreversion" on any shared system files
+
+[Icons]
+Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
+;Name: "{group}\Help"; Filename: "{app}\help\index.html"
+Name: "{group}\Website"; Filename: "{#MyAppURL}"
+;Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
+Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktop_icon
+
+[Run]
+Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
+Filename: "{app}\setup\{#LAVFiltersInstaller}"; Parameters: "/silent"; Tasks: lav_filters
+Filename: "{app}\setup\{#Win7DSFilterTweakerExeName}"; Parameters: "/silent /h264_x86={{EE30215D-164F-4A92-A4EB-9D4C13390F9F}} /xvid_x86={{EE30215D-164F-4A92-A4EB-9D4C13390F9F}} /aac_x86={{E8E73B6B-4CB3-44A4-BE99-4F7BCB96E491}}"; Tasks: lav_filters; MinVersion: 6.1
+Filename: "{app}\setup\{#VCRedistInstaller}"; Parameters: "/passive /showfinalerror"; Tasks: vc_redist
+
+[Dirs]
+Name: "{app}\setup"; Flags: deleteafterinstall
+;Name: "{app}"; Permissions: users-modify
+
+[Registry]
+Root: HKCR; Subkey: ".vssprj"; ValueType: string; ValueName: ""; ValueData: "VisualSubSync.Document"; Flags: uninsdeletevalue; Tasks: associate_vssprj
+Root: HKCR; Subkey: "VisualSubSync.Document"; ValueType: string; ValueName: ""; ValueData: "VisualSubSync Project"; Flags: uninsdeletekey; Tasks: associate_vssprj
+Root: HKCR; Subkey: "VisualSubSync.Document\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},1"; Tasks: associate_vssprj
+Root: HKCR; Subkey: "VisualSubSync.Document\shell\open\command"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName} ""%1"""; Tasks: associate_vssprj
+
+[InstallDelete]
+Type: filesandordirs; Name: "{app}"; Tasks: clean_install
+Type: filesandordirs; Name: "{localappdata}\VirtualStore\Program Files (x86)\{#MyAppName}"; Tasks: clean_install
+Type: filesandordirs; Name: "{localappdata}\VirtualStore\Program Files\{#MyAppName}"; Tasks: clean_install
+Type: filesandordirs; Name: "{group}"; Tasks: clean_install
+Type: files; Name: "{commondesktop}\{#MyAppName}.lnk"; Tasks: clean_install
+Type: files; Name: "{userdesktop}\{#MyAppName}.lnk"; Tasks: clean_install
+
+[UninstallDelete]
+Type: filesandordirs; Name: "{app}"
+
+[Code]
+const
+  VCRedistKey = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}';
+  CleanInstallTaskIndex = 3;
+  VCRedistTaskIndex = 6;
+
+var
+  OriginalVSSUninstaller: String;
+  OriginalVSSInstalled: Boolean;
+  VCRedistCheckDone : Boolean;
+
+function InitializeSetup(): Boolean;
+begin
+  VCRedistCheckDone := False;
+  Result := True;
+end;
+
+function NextButtonClick(CurPageID: Integer): Boolean;
+begin
+  if CurPageID = wpSelectDir then
+  begin
+    OriginalVSSUninstaller := WizardDirValue() + '\VisualSubSync-uninstall.exe';
+    if FileExists(OriginalVSSUninstaller) then
+    begin
+      OriginalVSSInstalled := True;
+      if not WizardSilent() then
+      begin
+        MsgBox(CustomMessage('OriginalVSS'), mbInformation, MB_OK);
+      end;
+    end
+    else
+    begin
+      OriginalVSSInstalled := False;
+    end;
+  end;
+  Result := True;
+end;
+
+procedure CurPageChanged(CurPageID: Integer);
+begin
+  if CurPageID = wpSelectTasks then
+  begin
+    if OriginalVSSInstalled then
+    begin
+      WizardForm.TasksList.ItemEnabled[CleanInstallTaskIndex] := False;
+      WizardForm.TasksList.Checked[CleanInstallTaskIndex] := True;
+    end
+    else if DirExists(WizardDirValue()) then
+    begin
+      WizardForm.TasksList.ItemEnabled[CleanInstallTaskIndex] := True;
+    end
+    else
+    begin
+      WizardForm.TasksList.ItemEnabled[CleanInstallTaskIndex] := False;
+      WizardForm.TasksList.Checked[CleanInstallTaskIndex] := False;
+    end;
+
+    if not VCRedistCheckDone then
+    begin
+      if RegKeyExists(HKEY_LOCAL_MACHINE, VCRedistKey) then
+      begin
+        WizardForm.TasksList.Checked[VCRedistTaskIndex] := False;
+      end
+      else
+      begin
+        WizardForm.TasksList.ItemEnabled[VCRedistTaskIndex] := False;
+        WizardForm.TasksList.Checked[VCRedistTaskIndex] := True;
+      end;
+      VCRedistCheckDone := True;
+    end;
+  end;
+end;
+
+procedure CurStepChanged(CurStep: TSetupStep);
+var
+  ResultCode: Integer;
+begin
+  if CurStep = ssInstall then
+  begin
+    if OriginalVSSInstalled then
+    begin
+      Exec(OriginalVSSUninstaller, '/S', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
+    end;
+  end;
+end;