summaryrefslogtreecommitdiff
path: root/.azure-pipelines/windows-release/msi-steps.yml
blob: 2f80c34eeb7d799cf74ff1688b506dc5894481bf (plain)
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
steps:
  - template: ./checkout.yml

  - task: DownloadBuildArtifacts@0
    displayName: 'Download artifact: doc'
    inputs:
      artifactName: doc
      downloadPath: $(Build.BinariesDirectory)

  - task: CopyFiles@2
    displayName: 'Merge documentation files'
    inputs:
      sourceFolder: $(Build.BinariesDirectory)\doc
      targetFolder: $(Build.SourcesDirectory)\Doc\build
      contents: |
        htmlhelp\*.chm

  - task: DownloadBuildArtifacts@0
    displayName: 'Download artifact: bin_win32'
    inputs:
      artifactName: bin_win32
      downloadPath: $(Build.BinariesDirectory)

  - task: DownloadBuildArtifacts@0
    displayName: 'Download artifact: bin_win32_d'
    inputs:
      artifactName: bin_win32_d
      downloadPath: $(Build.BinariesDirectory)

  - task: CopyFiles@2
    displayName: 'Merge win32 debug files'
    inputs:
      sourceFolder: $(Build.BinariesDirectory)\bin_win32_d
      targetFolder: $(Build.BinariesDirectory)\bin_win32
      contents: |
        **\*_d.*

  - task: DownloadBuildArtifacts@0
    displayName: 'Download artifact: bin_amd64'
    inputs:
      artifactName: bin_amd64
      downloadPath: $(Build.BinariesDirectory)

  - task: DownloadBuildArtifacts@0
    displayName: 'Download artifact: bin_amd64_d'
    inputs:
      artifactName: bin_amd64_d
      downloadPath: $(Build.BinariesDirectory)

  - task: CopyFiles@2
    displayName: 'Merge amd64 debug files'
    inputs:
      sourceFolder: $(Build.BinariesDirectory)\bin_amd64_d
      targetFolder: $(Build.BinariesDirectory)\bin_amd64
      contents: |
        **\*_d.*

  - task: DownloadBuildArtifacts@0
    displayName: 'Download artifact: tcltk_lib_win32'
    inputs:
      artifactName: tcltk_lib_win32
      downloadPath: $(Build.BinariesDirectory)

  - task: DownloadBuildArtifacts@0
    displayName: 'Download artifact: tcltk_lib_amd64'
    inputs:
      artifactName: tcltk_lib_amd64
      downloadPath: $(Build.BinariesDirectory)

  - script: |
      ren bin_win32 win32
      ren bin_amd64 amd64
    displayName: 'Correct artifact directory names'
    workingDirectory: $(Build.BinariesDirectory)

  - script: |
      call Tools\msi\get_externals.bat
      call PCbuild\find_python.bat
      echo ##vso[task.setvariable variable=PYTHON]%PYTHON%
      call PCbuild/find_msbuild.bat
      echo ##vso[task.setvariable variable=MSBUILD]%MSBUILD%
    displayName: 'Get external dependencies'

  - script: |
      %PYTHON% -m pip install blurb
      %PYTHON% -m blurb merge -f Misc\NEWS
    displayName: 'Merge NEWS file'

  - script: |
      %MSBUILD% Tools\msi\launcher\launcher.wixproj
    displayName: 'Build launcher installer'
    env:
      Platform: x86
      Py_OutDir: $(Build.BinariesDirectory)

  - script: |
      %MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true /p:BuildForRelease=true
      %MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false /p:BuildForRelease=true
    displayName: 'Build win32 installer'
    env:
      Platform: x86
      Py_OutDir: $(Build.BinariesDirectory)
      PYTHON: $(Build.BinariesDirectory)\win32\python.exe
      PYTHONHOME: $(Build.SourcesDirectory)
      TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_win32

  - script: |
      %MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true /p:BuildForRelease=true
      %MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false /p:BuildForRelease=true
    displayName: 'Build amd64 installer'
    env:
      Platform: x64
      Py_OutDir: $(Build.BinariesDirectory)
      PYTHON: $(Build.BinariesDirectory)\amd64\python.exe
      PYTHONHOME: $(Build.SourcesDirectory)
      TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_amd64

  - task: CopyFiles@2
    displayName: 'Assemble artifact: msi (1/2)'
    inputs:
      sourceFolder: $(Build.BinariesDirectory)\win32\en-us
      targetFolder: $(Build.ArtifactStagingDirectory)\msi\win32
      contents: |
        *.msi
        *.cab
        *.exe

  - task: CopyFiles@2
    displayName: 'Assemble artifact: msi (2/2)'
    inputs:
      sourceFolder: $(Build.BinariesDirectory)\amd64\en-us
      targetFolder: $(Build.ArtifactStagingDirectory)\msi\amd64
      contents: |
        *.msi
        *.cab
        *.exe

  - task: PublishBuildArtifacts@1
    displayName: 'Publish MSI'
    inputs:
      PathtoPublish: '$(Build.ArtifactStagingDirectory)\msi'
      ArtifactName: msi