Следующий код компилируется:
trait Alg[T]
trait LowPriorityAlg {
implicit def bAlg: Alg[B0] = ???
}
object Alg extends LowPriorityAlg {
implicit def aAlg: Alg[A0] = ???
implicit def combineAlg[AB, A: Alg, B: Alg](implicit ev1: AB <:< A, ev2: AB <:< B): Alg[AB] = ???
}
trait A0
trait B0
val comb: Alg[A0 with B0] = Alg.combineAlg[A0 with B0, A0, B0]
val comb1: Alg[A0 with B0] = implicitly[Alg[A0 with B0]]
As suggested here :
Try a registry search under
HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\
{productcode}
. Also consider a search underHKCU
if both your product and the dependency are per-user products.
This goes like this :
<Property Id="CRVSINSTALLED">
<RegistrySearch Id="CRVSInstalledSearch" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\{AA467959-A1D6-4F45-90CD-11DC57733F32}" Name="InstallDate" Type="raw" />
</Property>
<Property Id="CRVSRUNTIMEINSTALLED">
<RegistrySearch Id="CRVSRunTimeInstalledSearch" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\{CE26F10F-C80F-4377-908B-1B7882AE2CE3}" Name="InstallDate" Type="raw" />
</Property>
<Property Id="CRVSRUNTIMEINSTALLED">
<RegistrySearch Id="CRVSRunTimeInstalledSearch" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\{2BFA9B05-7418-4EDE-A6FC-620427BAAAA3}" Name="InstallDate" Type="raw" />
</Property>
Для этого API установщика Windows содержит функцию MsiQueryProductState
в msi.dll
. К сожалению, вам придется написать собственное действие, чтобы использовать это в вашем установщике. Сборки в C: \ Program Files \ Windows Installer XML v3 \ SDK
могут упростить эту задачу.