diff --git a/Windows/Setup/MassiveKnobSetup.iss b/Windows/Setup/MassiveKnobSetup.iss index c345a3f..c789c82 100644 --- a/Windows/Setup/MassiveKnobSetup.iss +++ b/Windows/Setup/MassiveKnobSetup.iss @@ -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" diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..93474b4 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,34 @@ +image: Visual Studio 2019 + + +install: + - choco install gitversion.portable -pre -y + - git submodule update --init --recursive + +before_build: + - nuget restore Windows\MassiveKnob.sln + - 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 \ No newline at end of file diff --git a/build/UpdateVersion.ps1 b/build/UpdateVersion.ps1 new file mode 100644 index 0000000..e1e0fe9 --- /dev/null +++ b/build/UpdateVersion.ps1 @@ -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 "(.+?)") + { + $contents = $contents -replace "(.+?)", "$($version)" + Set-Content -Path $projectFile -Value $contents + Write-Host "Updated $($projectFile)" + } + else + { + Write-Host "No version information in $($projectFile)" + } +} \ No newline at end of file