1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-06 17:13:49 +01:00

Innosetup installer updates

Rename usage of outdated Innosetup functions
Configure CMake to use the same build type for Innosetup target
Use Tenacity logos
Update readme information displayed post-install
Update license information displayed pre-install
Fix installer generation
Cleanup innosetup configuration

Signed-off-by: Emily Mabrey <emabrey@tenacityaudio.org>
This commit is contained in:
Emily Mabrey
2021-08-26 02:54:16 -04:00
parent a1cfcceaff
commit d73e9eb1cd
7 changed files with 111 additions and 71 deletions

View File

@@ -23,11 +23,12 @@ if( INNO_SETUP_COMPILER )
-DOUTPUT_DIR=${TEMP_PACKAGE_PATH} -DOUTPUT_DIR=${TEMP_PACKAGE_PATH}
-DINNO_SETUP_COMPILER=${INNO_SETUP_COMPILER} -DINNO_SETUP_COMPILER=${INNO_SETUP_COMPILER}
-DEMBED_MANUAL=${${_OPT}package_manual} -DEMBED_MANUAL=${${_OPT}package_manual}
-DBUILDING_64_BIT=${IS_64BIT} -DIS_64_BIT=${IS_64BIT}
-DSIGN=${${_OPT}perform_codesign} -DSIGN=${${_OPT}perform_codesign}
-DWINDOWS_CERTIFICATE=${WINDOWS_CERTIFICATE} -DWINDOWS_CERTIFICATE=${WINDOWS_CERTIFICATE}
-D WINDOWS_CERTIFICATE_PASSWORD=${WINDOWS_CERTIFICATE_PASSWORD} -D WINDOWS_CERTIFICATE_PASSWORD=${WINDOWS_CERTIFICATE_PASSWORD}
-P "${CMAKE_SOURCE_DIR}/win/Inno_Setup_Wizard/BuildInnoSetupInstaller.cmake" -P "${CMAKE_SOURCE_DIR}/win/Inno_Setup_Wizard/BuildInnoSetupInstaller.cmake"
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-parallel ${CMAKE_BUILD_PARALLEL_LEVEL} -parallel ${CMAKE_BUILD_PARALLEL_LEVEL}
VERBATIM VERBATIM
) )

View File

@@ -0,0 +1,3 @@
If you manually add isl language files to this directory then the innosetup installer creation process will be able to find them.
Note that it ignores any file within this directory which is not *.isl

View File

@@ -4,13 +4,16 @@
# SOURCE_DIR - should be set to CMAKE_SOURCE_DIR by teh caller # SOURCE_DIR - should be set to CMAKE_SOURCE_DIR by teh caller
# OUTPUT_DIR - directory, where installer will be built # OUTPUT_DIR - directory, where installer will be built
# INNO_SETUP_COMPILER - InnoSetup compiler executable # INNO_SETUP_COMPILER - InnoSetup compiler executable
# BUILDING_64_BIT - Flag, that indicates that we are building a 64-bit installer # IS_64_BIT - Flag, that indicates that we are building a 64-bit installer
# EMBED_MANUAL - embed a fresh copy of manual # EMBED_MANUAL - embed a fresh copy of manual
# SIGN - sign the installer # SIGN - sign the installer
# WINDOWS_CERTIFICATE - path to PFX file. If not present, env:WINDOWS_CERTIFICATE will be used # WINDOWS_CERTIFICATE - path to PFX file. If not present, env:WINDOWS_CERTIFICATE will be used
# WINDOWS_CERTIFICATE_PASSWORD - password for the PFX file. If not present, env:WINDOWS_CERTIFICATE_PASSWORD will be used # WINDOWS_CERTIFICATE_PASSWORD - password for the PFX file. If not present, env:WINDOWS_CERTIFICATE_PASSWORD will be used
if( BUILDING_64_BIT ) # Allow if statements to use the new IN_LIST operator (compatibility override for CMake <3.3)
cmake_policy( SET CMP0057 NEW )
if( IS_64_BIT )
set( INSTALLER_SUFFIX "x64" ) set( INSTALLER_SUFFIX "x64" )
set( INSTALLER_X64_MODE "ArchitecturesInstallIn64BitMode=x64") set( INSTALLER_X64_MODE "ArchitecturesInstallIn64BitMode=x64")
else() else()
@@ -48,32 +51,76 @@ configure_file("${OUTPUT_DIR}/tenacity.iss.in" "${OUTPUT_DIR}/tenacity.iss")
file(COPY "${SOURCE_DIR}/presets" DESTINATION "${OUTPUT_DIR}/Additional") file(COPY "${SOURCE_DIR}/presets" DESTINATION "${OUTPUT_DIR}/Additional")
file(COPY file(COPY
"${SOURCE_DIR}/LICENSE.txt" "${SOURCE_DIR}/LICENSE.txt"
"${SOURCE_DIR}/README.md" "${SOURCE_DIR}/win/README.rtf"
"${SOURCE_DIR}/win/tenacity.ico" "${SOURCE_DIR}/win/tenacity.ico"
DESTINATION "${SOURCE_DIR}/win/darktenacity.ico"
DESTINATION
"${OUTPUT_DIR}/Additional" "${OUTPUT_DIR}/Additional"
) )
if( DEFINED CMAKE_BUILD_TYPE )
if( EXISTS "${BUILD_DIR}/bin/${CMAKE_BUILD_TYPE}" )
# Use CMAKE_BUILD_TYPE value if defined and previously built
set( INNOSETUP_BUILD_CONFIGURATIONS "${CMAKE_BUILD_TYPE};" )
else()
message( FATAL_ERROR "You defined a value for CMAKE_BUILD_TYPE which has not already been built, please build it and try again" )
endif()
elseif( DEFINED CMAKE_INSTALL_CONFIG_NAME )
if( EXISTS "${BUILD_DIR}/bin/${CMAKE_INSTALL_CONFIG_NAME}" )
# Use install --config value if defined and previously built
set( INNOSETUP_BUILD_CONFIGURATIONS "${CMAKE_INSTALL_CONFIG_NAME};" )
else()
message( FATAL_ERROR "You defined a value for CMAKE_INSTALL_CONFIG_NAME which has not already been built, please build it and try again" )
endif()
else()
# These are listed in order of preference in case more than one of them are built
# It must include all four configurations for this to work correctly on multi-config
set( INNOSETUP_BUILD_CONFIGURATIONS "MinSizeRel;Release;RelWithDebInfo;Debug" )
message( STATUS "You did not define a build type manually so we will attempt to find build types in this order: ${INNOSETUP_BUILD_CONFIGURATIONS}" )
endif()
# "Install" prebuilt package # "Install" prebuilt package
execute_process( set( VALID_BUILD_TYPE_FOUND FALSE )
COMMAND foreach( config ${INNOSETUP_BUILD_CONFIGURATIONS} )
${CMAKE_COMMAND} file( GLOB VALID_BUILD
--install ${BUILD_DIR} "${BUILD_DIR}/bin/${config}/Tenacity" "${BUILD_DIR}/bin/${config}/Tenacity.*"
--prefix "${OUTPUT_DIR}/Package" "${BUILD_DIR}/bin/${config}/tenacity" "${BUILD_DIR}/bin/${config}/tenacity.*"
) )
if( VALID_BUILD )
message ( STATUS "Using build type ${config} to create innosetup installer" )
execute_process(
COMMAND
${CMAKE_COMMAND}
--install ${BUILD_DIR}
--prefix "${OUTPUT_DIR}/Package"
--config ${config}
# When we upgrade to CMake min version 3.19 we can use this
# COMMAND_ERROR_IS_FATAL ANY
)
set( VALID_BUILD_TYPE_FOUND TRUE FORCE )
set( VALID_BUILD_TYPE ${config} )
break()
endif()
endforeach()
# Build the installer if( NOT VALID_BUILD_TYPE_FOUND )
message( FATAL_ERROR "You must build the project successfully before building the innosetup target" )
endif()
execute_process( execute_process(
COMMAND COMMAND
${INNO_SETUP_COMPILER} /Sbyparam=$p "tenacity.iss" ${INNO_SETUP_COMPILER} /Sbyparam=$p "tenacity.iss" /Qp
WORKING_DIRECTORY WORKING_DIRECTORY
${OUTPUT_DIR} ${OUTPUT_DIR}
# When we upgrade to CMake min version 3.19 we can use this
# COMMAND_ERROR_IS_FATAL ANY
) )
# Emulate CPack behavior # If we enable COMMAND_ERROR_IS_FATAL then if we reach here we are sure we successfully created the installer
# message ( STATUS "Successfully created innosetup installer using build type ${VALID_BUILD_TYPE}" )
# Emulate CPack behavior
file( COPY "${OUTPUT_DIR}/Output/" DESTINATION "${BUILD_DIR}/package" ) file( COPY "${OUTPUT_DIR}/Output/" DESTINATION "${BUILD_DIR}/package" )

View File

@@ -3,81 +3,71 @@
; License: GPL v2. See License.txt. ; License: GPL v2. See License.txt.
; ;
; tenacity.iss ; tenacity.iss
; Vaughan Johnson, Leland Lucius, Martyn Shaw, Richard Ash, & others
;
; This requires that the ISS Preprocessor be installed #define AppExe "Package\tenacity.exe"
#define AppExe "Package\tenacity.exe"
#define AppMajor "" #define AppMajor ""
#define AppMinor "" #define AppMinor ""
#define AppRev "" #define AppRev ""
#define AppBuild "" #define AppBuild ""
#define FullVersion ParseVersion(AppExe, AppMajor, AppMinor, AppRev, AppBuild) #define FullVersion GetVersionComponents(AppExe, AppMajor, AppMinor, AppRev, AppBuild)
#define AppVersion Str(AppMajor) + "." + Str(AppMinor) + "." + Str(AppRev) #define AppVersion Str(AppMajor) + "." + Str(AppMinor) + "." + Str(AppRev)
#define AppName GetStringFileInfo(AppExe, PRODUCT_NAME) #define AppName GetStringFileInfo(AppExe, PRODUCT_NAME)
[UninstallRun] [UninstallRun]
; Uninstall prior installations. ; Uninstall prior installations.
Filename: "{app}\unins*.*"; Filename: "{app}\unins*.*"; RunOnceId: "UninstallPrior"
[Setup] [Setup]
; compiler-related directives ; Icons
OutputBaseFilename=tenacity-win-{#AppVersion}-@INSTALLER_SUFFIX@ SetupIconFile="Additional\tenacity.ico"
UninstallDisplayIcon="{app}\tenacity.exe"
; Use 100% images by default
WizardImageFile=".\tenacity_InnoWizardImage_100.bmp" WizardImageFile=".\tenacity_InnoWizardImage_100.bmp"
WizardSmallImageFile=".\tenacity_InnoWizardSmallImage_100.bmp" WizardSmallImageFile=".\tenacity_InnoWizardSmallImage_100.bmp"
SolidCompression=yes ; App/Version information
; installer-related directives
; From Inno 5.5.7, Inno defaults to disabling the Welcome page as recommended
; by Microsoft's desktop applications guideline, but we don't want to do that.
DisableWelcomePage=no
AppName={#AppName} AppName={#AppName}
AppVerName=Tenacity {#AppVersion} AppVerName=Tenacity {#AppVersion}
; Specify AppVersion as well, so it appears in the Add/Remove Programs entry.
AppVersion={#AppVersion} AppVersion={#AppVersion}
AppPublisher="Tenacity Team" AppPublisher="Tenacity Team"
AppPublisherURL=https://tenacityaudio.org/ AppPublisherURL=https://tenacityaudio.org/
AppSupportURL=https://tenacityaudio.org/ AppSupportURL=https://tenacityaudio.org/
AppUpdatesURL=https://tenacityaudio.org/ AppUpdatesURL=https://tenacityaudio.org/
ChangesAssociations=yes
@INSTALLER_X64_MODE@
DefaultDirName={commonpf}\Tenacity
VersionInfoProductName={#AppName} VersionInfoProductName={#AppName}
VersionInfoProductTextVersion={#GetFileProductVersion(AppExe)} VersionInfoProductTextVersion={#GetFileProductVersion(AppExe)}
VersionInfoDescription={#AppName + " " + AppVersion + " Setup"} VersionInfoDescription={#AppName + " " + AppVersion + " Setup"}
VersionInfoVersion={#GetFileVersion(AppExe)} VersionInfoVersion={#GetVersionNumbersString(AppExe)}
VersionInfoCopyright={#GetFileCopyright(AppExe)} VersionInfoCopyright={#GetFileCopyright(AppExe)}
; Don't disable the "Select Destination Location" wizard, even if ; Default install location
DefaultDirName={commonpf}\Tenacity
; Tells explorer to refresh file assocations to pickup any changes
ChangesAssociations=yes
; Does package->compress instead of compress->package
SolidCompression=yes
; Don't disable the "Select Destination Location" wizard, even if
; Tenacity is already installed. ; Tenacity is already installed.
DisableDirPage=no DisableDirPage=no
; Always warn if dir exists, because we'll overwrite previous Tenacity. ; Always warn if dir exists, because we'll overwrite previous Tenacity.
DirExistsWarning=yes DirExistsWarning=yes
DisableProgramGroupPage=yes DisableProgramGroupPage=yes
UninstallDisplayIcon="{app}\tenacity.exe"
; No longer force them to accept the license, just display it. LicenseFile=..\LICENSE.txt ; Always show welcome page
DisableWelcomePage=no
; Display license information before install
InfoBeforeFile=".\tenacity_InnoWizard_InfoBefore.rtf" InfoBeforeFile=".\tenacity_InnoWizard_InfoBefore.rtf"
InfoAfterFile=Additional\README.md
; We no longer produce new ANSI builds. ; Display README after install
; As we use Inno Setup (u), the Unicode version, to build this script, InfoAfterFile=Additional\README.rtf
; the MinVersion will automatically be set to what we need.
; We no longer explicitly set it.
; MinVersion=4.0,5.0
; cosmetic-related directives
SetupIconFile="Additional\tenacity.ico"
; Directives using information passed by CMake
@INSTALLER_X64_MODE@
@SIGN_TOOL@ @SIGN_TOOL@
OutputBaseFilename=tenacity-win-{#AppVersion}-@INSTALLER_SUFFIX@
[INI] [INI]
Filename: "{app}\FirstTime.ini"; Section: "FromInno"; Key: "ResetPrefs"; String: "1"; Tasks: resetPrefs; Filename: "{app}\FirstTime.ini"; Section: "FromInno"; Key: "ResetPrefs"; String: "1"; Tasks: resetPrefs;
@@ -93,8 +83,8 @@ Name: resetPrefs; Description: "{cm:ResetPrefs}"; Flags: unchecked
; Prime the first time .ini file so the permissions can be set ; Prime the first time .ini file so the permissions can be set
Source: ".\FirstTimeModel.ini"; DestDir: "{app}"; DestName: "FirstTime.ini"; Permissions: users-modify Source: ".\FirstTimeModel.ini"; DestDir: "{app}"; DestName: "FirstTime.ini"; Permissions: users-modify
; Don't display in separate window, rather as InfoAfterFile. Source: "..\README.md"; DestDir: "{app}"; Flags: ignoreversion isreadme ; Manually create RTF version of README
Source: "Additional\README.md"; DestDir: "{app}"; Flags: ignoreversion Source: "Additional\README.rtf"; DestDir: "{app}"; Flags: ignoreversion
Source: "Additional\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion Source: "Additional\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppExe}"; DestDir: "{app}"; Flags: ignoreversion Source: "{#AppExe}"; DestDir: "{app}"; Flags: ignoreversion
@@ -150,7 +140,7 @@ end;
procedure InitializeWizard; procedure InitializeWizard;
begin begin
{ If using larger scaling, load the correct size of images } { If using larger scaling, load the correct size of images }
if GetScalingFactor > 100 then if GetScalingFactor > 100 then
begin begin
LoadEmbededScaledBitmap(WizardForm.WizardBitmapImage, 'tenacity_InnoWizardImage'); LoadEmbededScaledBitmap(WizardForm.WizardBitmapImage, 'tenacity_InnoWizardImage');
LoadEmbededScaledBitmap(WizardForm.WizardBitmapImage2, 'tenacity_InnoWizardImage'); LoadEmbededScaledBitmap(WizardForm.WizardBitmapImage2, 'tenacity_InnoWizardImage');
@@ -163,32 +153,31 @@ Name: "{commonprograms}\Tenacity"; Filename: "{app}\tenacity.exe"
Name: "{commondesktop}\Tenacity"; Filename: "{app}\tenacity.exe"; Tasks: desktopicon Name: "{commondesktop}\Tenacity"; Filename: "{app}\tenacity.exe"; Tasks: desktopicon
[InstallDelete] [InstallDelete]
; Get rid of Tenacity 1.0.0 stuff that's no longer used.
Type: files; Name: "{app}\tenacity-help.htb"
Type: files; Name: "{app}\tenacity-1.2-help.htb"
; Get rid of previous versions of MSVC runtimes. ; Get rid of previous versions of MSVC runtimes
; Currently MSVC runtime versions 8, 9, 10, 11, 12, 13
Type: files; Name: "{app}\Microsoft.VC80.CRT.manifest" Type: files; Name: "{app}\Microsoft.VC80.CRT.manifest"
Type: files; Name: "{app}\Microsoft.VC90.CRT.manifest"
Type: files; Name: "{app}\msvcp80.dll" Type: files; Name: "{app}\msvcp80.dll"
Type: files; Name: "{app}\msvcr80.dll" Type: files; Name: "{app}\msvcr80.dll"
Type: files; Name: "{app}\Microsoft.VC90.CRT.manifest"
Type: files; Name: "{app}\msvcp90.dll" Type: files; Name: "{app}\msvcp90.dll"
Type: files; Name: "{app}\msvcr90.dll" Type: files; Name: "{app}\msvcr90.dll"
Type: files; Name: "{app}\Microsoft.VC100.CRT.manifest"
Type: files; Name: "{app}\msvcp100.dll"
Type: files; Name: "{app}\msvcr100.dll"
Type: files; Name: "{app}\Microsoft.VC110.CRT.manifest"
Type: files; Name: "{app}\msvcp110.dll"
Type: files; Name: "{app}\msvcr110.dll"
Type: files; Name: "{app}\Microsoft.VC120.CRT.manifest"
Type: files; Name: "{app}\msvcp120.dll" Type: files; Name: "{app}\msvcp120.dll"
Type: files; Name: "{app}\msvcr120.dll" Type: files; Name: "{app}\msvcr120.dll"
Type: files; Name: "{app}\Microsoft.VC130.CRT.manifest"
Type: files; Name: "{app}\msvcp130.dll"
Type: files; Name: "{app}\msvcr130.dll"
; Get rid of previous help folder. ; Get rid of previous help folder.
Type: filesandordirs; Name: "{app}\help" Type: filesandordirs; Name: "{app}\help"
; Don't want to do this because user may have stored their own.
; Type: filesandordirs; Name: "{app}\vst"
; We've switched from a folder in the start menu to just the Tenacity.exe at the top level.
; Get rid of 1.0.0 folder and its icons.
Type: files; Name: "{commonprograms}\Tenacity\tenacity.exe"
Type: files; Name: "{commonprograms}\Tenacity\unins000.exe"
Type: dirifempty; Name: "{commonprograms}\Tenacity"
;Get rid of previous uninstall item ;Get rid of previous uninstall item
Type: files; Name: "{app}\unins*.*" Type: files; Name: "{app}\unins*.*"
@@ -217,7 +206,7 @@ Type: files; Name: "{app}\Plug-Ins\gverb_1216.dll"
Type: files; Name: "{app}\Plug-Ins\crossfadein.ny" Type: files; Name: "{app}\Plug-Ins\crossfadein.ny"
Type: files; Name: "{app}\Plug-Ins\crossfadeout.ny" Type: files; Name: "{app}\Plug-Ins\crossfadeout.ny"
Type: files; Name: "{app}\Plug-Ins\clicktrack.ny" Type: files; Name: "{app}\Plug-Ins\clicktrack.ny"
[Registry] [Registry]
; No longer allow user to choose whether to associate AUP file type with Tenacity. ; No longer allow user to choose whether to associate AUP file type with Tenacity.
; Leaving this one commented out example of the old way. ; Leaving this one commented out example of the old way.
@@ -248,7 +237,7 @@ Filename: "{app}\tenacity.exe"; Description: "{cm:LaunchProgram,Tenacity}"; Flag
; http://www.jrsoftware.org/files/istrans/ ; http://www.jrsoftware.org/files/istrans/
; ;
; Set this to the base of the unofficial Inno Setup translations ; Set this to the base of the unofficial Inno Setup translations
#define UrlBase "http://raw.github.com/jrsoftware/issrc/master/Files/Languages/Unofficial/" #define UrlBase "https://raw.githubusercontent.com/jrsoftware/issrc/main/Files/Languages/Unofficial/"
; This macro will use the Windows PowerShell to download the given translation into ; This macro will use the Windows PowerShell to download the given translation into
; the Inno Setup Languages folder if it hasn't already been downloaded. ; the Inno Setup Languages folder if it hasn't already been downloaded.

BIN
win/README.rtf Normal file

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 292 KiB

After

Width:  |  Height:  |  Size: 292 KiB