forked from dotnetinstaller/dotnetinstaller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.Debug.yml
128 lines (75 loc) · 4.25 KB
/
appveyor.Debug.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
version: '{build}'
pull_requests:
do_not_increment_build_number: true
init:
- ps: >-
# Allow Remote Desktop
# $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# MSBuild Community Tasks
# This is only to get unit tests in InstalledCheckProductUnitTests to succeed
$msiFilePath = "$($env:TEMP)\MSBuild.Community.Tasks.v1.4.0.88.msi"
$logFilePath = "$($env:TEMP)\MSBuild.Community.Tasks.v1.4.0.88.msi.txt"
(New-Object Net.WebClient).DownloadFile('https://github.com/loresoft/msbuildtasks/releases/download/1.4.0.88/MSBuild.Community.Tasks.v1.4.0.88.msi', $msiFilePath)
$process = (Start-Process -FilePath "msiexec.exe" -ArgumentList "/i $msiFilePath /quiet /l*v $logFilePath" -Wait -Passthru)
$exitCode = $process.ExitCode
if ($exitCode -ne 0)
{
Get-Content $logFilePath
throw "Command failed with exit code $exitCode."
}
del $msiFilePath
del $logFilePath
Write-Host "MSBuild Community Tasks v1.4.0.88 installed successfully." -ForegroundColor Green
# Microsoft Visual C++ 2005 Express Program Compatibility
$reg = [Microsoft.Win32.RegistryKey]::OpenBaseKey([Microsoft.Win32.RegistryHive]::CurrentUser, [Microsoft.Win32.RegistryView]::Registry32)
$key = $reg.CreateSubKey('SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags')
$key.SetValue("{b5f72fda-0549-4d67-9927-92997864fd7f}", 4, [Microsoft.Win32.RegistryValueKind]::DWORD)
Write-Host "Microsoft Visual C++ 2005 Express Program Compatibility configured successfully." -ForegroundColor Green
# Microsoft Visual C++ 2005 Express Edition
# http://blogs.msdn.com/b/astebner/archive/2006/03/14/551674.aspx
Write-Host "Downloading Microsoft Visual C++ 2005 Express..." -ForegroundColor Green
$isoFilePath = "$($env:USERPROFILE)\VC.iso"
(New-Object Net.WebClient).DownloadFile('http://go.microsoft.com/fwlink/?linkid=57034', $isoFilePath)
Write-Host "Installing Microsoft Visual C++ 2005 Express..." -ForegroundColor Green
$process = (Start-Process -FilePath "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -y -oC:\VC2005Express $isoFilePath" -Wait -Passthru)
$exitCode = $process.ExitCode
if ($exitCode -ne 0)
{
throw "Command failed with exit code $exitCode."
}
del $isoFilePath
# Install Visual C++ 2005 Express silently
# http://blogs.msdn.com/b/astebner/archive/2006/03/19/555326.aspx
$exeFilePath = "C:\VC2005Express\ixpvc.exe"
$process = (Start-Process -FilePath $exeFilePath -ArgumentList '/t:c:\vc2005express /q:a /c:"msiexec /i vcsetup.msi VSEXTUI=1 ADDLOCAL=ALL REBOOT=ReallySuppress /qn /l*v c:\vc2005express\setup.log"' -Wait -Passthru)
$exitCode = $process.ExitCode
if ($exitCode -ne 0)
{
throw "Command failed with exit code $exitCode."
}
Write-Host "Microsoft Visual C++ 2005 Express installed successfully" -ForegroundColor Green
# Associate .txt files with notepad
$reg = [Microsoft.Win32.RegistryKey]::OpenBaseKey([Microsoft.Win32.RegistryHive]::CurrentUser, [Microsoft.Win32.RegistryView]::Registry32)
$key = $reg.CreateSubKey('SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\FileExts\.txt\OpenWithProgids')
$bytes = New-Object Byte[] 0
$key.SetValue("txtfile", $bytes, [Microsoft.Win32.RegistryValueKind]::NONE)
$key = $reg.CreateSubKey('SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\FileExts\.txt\UserChoice')
$key.SetValue("Hash", "Tn/DUO0bX5E=", [Microsoft.Win32.RegistryValueKind]::String)
$key.SetValue("ProgId", "txtfile", [Microsoft.Win32.RegistryValueKind]::String)
# Allow Remote Desktop
# $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
nuget:
disable_publish_on_pr: true
build_script:
- cmd: build.cmd all /p:Configuration=Debug
test: off
artifacts:
- path: target\Debug\dotNetInstaller.*.zip
name: zip
- path: target\Debug\dotNetInstaller.*.msi
name: msi
deploy: off
on_finish:
- ps: >-
# Allow Remote Desktop
# $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))