Skip to content

How to build a MSI for 32 bit and for 64 bit in one step

Volker Berlin edited this page Jan 29, 2016 · 2 revisions

If you want 2 different installer for the 64 bit and 32 bit Windows platform then you have the problems:

  • there is only one msi task
  • you must duplicate many settings for 32 and 64 bit Windows
  • the msi file names are identical

You can solve this with the follow sample:

setupBuilder {
   // settings for all platforms
}
task msi32( type: com.inet.gradle.setup.msi.Msi ) {
    arch = "x86"
    classifier = "x86"
    // setting for 64 bit platform
}
msi {
   // setting for 64 bit platform
}
configure( [msi, msi32] ) {
   // settings for both platforms
}

You can run this then with: gradle msi msi32 uploadArchives