Added AppVeyor build

Upgraded to Inno Setup 6
This commit is contained in:
Mark van Renswoude 2021-03-16 12:39:56 +01:00
parent 6f5e588e13
commit 5f4c2786f6
3 changed files with 75 additions and 1 deletions

View File

@ -18,13 +18,15 @@ AppPublisher={#AppPublisher}
AppPublisherURL={#AppURL}
AppSupportURL={#AppURL}
AppUpdatesURL={#AppURL}
DefaultDirName={pf}\{#AppName}
DefaultDirName={commonpf}\{#AppName}
DisableProgramGroupPage=yes
OutputDir={#BasePath}\Release
OutputBaseFilename=MassiveKnobSetup-{#AppVersion}
Compression=lzma
SolidCompression=yes
ArchitecturesInstallIn64BitMode=x64
PrivilegesRequired=admin
UsedUserAreasWarning=no
[Types]
Name: "full"; Description: "Full installation"

33
appveyor.yml Normal file
View File

@ -0,0 +1,33 @@
image: Visual Studio 2019
install:
- choco install gitversion.portable -pre -y
before_build:
- nuget restore
- ps: gitversion /l console /output buildserver
- ps: build\UpdateVersion.ps1
build:
project: Windows\MassiveKnob.sln
platform:
- Any CPU
configuration:
- Release
after_build:
- cmd: "C:\\Program Files (x86)\\Inno Setup 6\\ISCC.exe" "Windows\\Setup\\MassiveKnobSetup.iss"
deploy:
provider: GitHub
auth_token:
secure: fPvma5Dn9PV65Juan1Lx9AcxoGwLSRIxSjYZGZ46EvI8QoXEUGH0T0fnJDYF5vbM
artifact: /Windows\\Release\\MassiveKnobSetup-.*\.exe/
draft: false
prerelease: false
on:
branch: master
APPVEYOR_REPO_TAG: true

39
build/UpdateVersion.ps1 Normal file
View File

@ -0,0 +1,39 @@
# For debugging purposes
if (-not (Test-Path env:APPVEYOR_BUILD_FOLDER))
{
Write-Host "Warning: APPVEYOR_BUILD_FOLDER environment variable not set"
$env:APPVEYOR_BUILD_FOLDER = "P:\Development\MassiveKnob"
}
if (-not (Test-Path env:GitVersion_MajorMinorPatch))
{
Write-Host "Warning: GitVersion_MajorMinorPatch environment variable not set"
$env:GitVersion_MajorMinorPatch = "0.0.1"
}
if (-not (Test-Path env:GitVersion_CommitsSinceVersionSource))
{
Write-Host "Warning: GitVersion_CommitsSinceVersionSource environment variable not set"
$env:GitVersion_CommitsSinceVersionSource = "42"
}
$version = "$($env:GitVersion_MajorMinorPatch).$($env:GitVersion_CommitsSinceVersionSource)"
$env:BUILD_VERSION=$env:GitVersion_LegacySemVer
Write-Host "Updating version to $($version) for projects in $($env:APPVEYOR_BUILD_FOLDER)"
$projectFiles = Get-ChildItem $env:APPVEYOR_BUILD_FOLDER -Recurse *.csproj | Select -ExpandProperty FullName
foreach ($projectFile in $projectFiles)
{
$contents = Get-Content -Path $projectFile
if ($contents -match "<Version>(.+?)</Version>")
{
$contents = $contents -replace "<Version>(.+?)</Version>", "<Version>$($version)</Version>"
Set-Content -Path $projectFile -Value $contents
Write-Host "Updated $($projectFile)"
}
else
{
Write-Host "No version information in $($projectFile)"
}
}