Skip to content

Commit

Permalink
Merge branch 'appveyor-fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
jboecker committed Oct 26, 2019
2 parents 01095b7 + 36d25eb commit 7931216
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 9 deletions.
20 changes: 16 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
version: v0.8.0+{build}
version: v0.8.1+{build}
pull_requests:
do_not_increment_build_number: true
image: Visual Studio 2017
clone_depth: 100
install:
- cmd: >-
set PATH=%PATH%;C:\Program Files (x86)\WiX Toolset v3.11\bin
set GOPATH=C:\Users\appveyor
set PATH=%PATH%;%GOPATH%\bin
go get "github.com/Masterminds/semver"
pip install sphinx
pip install sphinx_rtd_theme
build_script:
- ps: >-
- ps: |
go version
#$ErrorActionPreference = "Stop";
$env:BUILD_VERSION=$env:APPVEYOR_BUILD_VERSION
$env:MSI_VERSION=$(go run .\src\installer\semver-to-msiversion.go v0.1.2 6)
$env:MSI_VERSION=$(go run .\src\installer\semver-to-msiversion.go "${env:APPVEYOR_BUILD_VERSION}" "${env:APPVEYOR_BUILD_NUMBER}")
$GOPROXY="direct";
.\release-build.cmd
& {
$ErrorActionPreference = 'SilentlyContinue'
.\release-build.cmd 2>&1
}
test: off
artifacts:
- path: build\DCS-BIOS-Hub-Setup-${build_version}.msi
Expand Down
2 changes: 2 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

# -- General configuration ---------------------------------------------------

master_doc = 'index'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
Expand Down
15 changes: 10 additions & 5 deletions release-build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@ if "%MSI_VERSION%" == "" (
echo Error: Please set the MSI_VERSION variable, e.g. "set MSI_VERSION=0.1.2.3"
echo MSI_VERSION is the version of the MSI installer, which is used to determine if
echo a newer version of DCS-BIOS is already installed.
exit 1
exit /B 1
)
if "%BUILD_VERSION%" == "" (
echo Error: Please set the BUILD_VERSION variable, e.g. "set BUILD_VERSION=v0.1.2-alpha3"
echo BUILD_VERSION is the version shown in the user interface next to the git commit hash.
exit 1
exit /B 1
)

rem this is the equivalent of BUILD_COMMIT=$(git rev-parse HEAD) in bash
FOR /F "tokens=* USEBACKQ" %%g IN (`git rev-parse HEAD`) do (SET "BUILD_COMMIT=%%g")

echo on
@if exist ./build (
@echo deleting ./build directory
rd /S /Q build
)
@echo creating empty build directory
mkdir build

Expand Down Expand Up @@ -53,10 +55,13 @@ cd ..
"%WIX%\bin\candle" -dMsiVersion=%MSI_VERSION% -out build\ -dDcsLuaSourceDir=src\dcs-lua -dControlReferenceJsonSourceDir=src\control-reference-json -dFrontendAppSourceDir=src\hub-frontend\build -dDocumentationAppSourceDir=doc\_build\html -arch x64 -fips -pedantic -wx -ext WixUIExtension src\installer\*.wxs build\wix\*.wxs -out build\wix\
"%WIX%\bin\light" -dMsiVersion=%MSI_VERSION% -sw1076 -loc src\installer\custom-text.wxl -out build\DCS-BIOS-Hub-Setup-%BUILD_VERSION%.msi build\wix\*.wixobj -ext WixUIExtension

if exist "DCS-BIOS-Hub-Setup-%BUILD_VERSION%.msi" (
if exist "build\DCS-BIOS-Hub-Setup-%BUILD_VERSION%.msi" (
echo "built version %BUILD_VERSION% (%BUILD_COMMIT%) with MSI_VERSION=%MSI_VERSION%, saved to build/DCS-BIOS-Hub-Setup-%BUILD_VERSION%.msi"
exit 0
exit /B 0
)
exit 1

echo "could not find DCS-BIOS-Hub-Setup-%BUILD_VERSION%.msi"
dir build
exit /B 1


12 changes: 12 additions & 0 deletions src/installer/product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@
Description="DCS-BIOS" />
<MediaTemplate EmbedCab="yes" />

<Upgrade Id="EFDDCC42-2F24-4DF4-933A-50FD2089EB74">
<UpgradeVersion Minimum="$(var.MsiVersion)" OnlyDetect="yes" Property="NEWERVERSIONDETECTED"/>
<UpgradeVersion Minimum="0.0.0" Maximum="$(var.MsiVersion)" IncludeMinimum="yes" IncludeMaximum="no"
Property="OLDERVERSIONBEINGUPGRADED"/>
</Upgrade>
<Condition Message="A newer version of this software is already installed.">NOT NEWERVERSIONDETECTED</Condition>

<!-- http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Bug-UpgradeVersion-element-causing-LGHT0094-error-td7579387.html -->
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallInitialize" />
</InstallExecuteSequence>

<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<UIRef Id="Custom_WixUI_InstallDir" />

Expand Down

0 comments on commit 7931216

Please sign in to comment.