Skip to content

Commit 415ac36

Browse files
committed
Install - Copy msi to choco package
1 parent fbbcc3d commit 415ac36

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ ReleasePS
3939
/dokan_fuse/libdokanfuse1.dll
4040
/dokan.VC.db
4141
/documentations/doc
42-
/dokan_wix/*.msi
4342
/dokan_wix/disk1
4443
/dokan_wix/setup.inf
4544
/dokan_wix/setup.rpt
@@ -57,3 +56,4 @@ ReleasePS
5756
/setup.rpt
5857
*.bak
5958
*.log
59+
*.msi

chocolatey/package.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Remove-Item .\chocolatey\build -Recurse -Force -ErrorAction SilentlyContinue
77
New-Item .\chocolatey\build -Force -ItemType Directory
88
Copy-Item .\chocolatey\dokany.nuspec.template .\chocolatey\build\dokany.nuspec
99
Copy-Item .\chocolatey\tools .\chocolatey\build\ -Recurse
10+
Copy-Item .\dokan_wix\Dokan_x64.msi .\chocolatey\build\tools\Dokan_x64.msi
11+
Copy-Item .\dokan_wix\Dokan_x86.msi .\chocolatey\build\tools\Dokan_x86.msi
1012
Rename-Item .\chocolatey\build\tools\chocolateyinstall.ps1.template chocolateyinstall.ps1
1113

1214
(Get-Content -Encoding UTF8 .\chocolatey\build\dokany.nuspec).Replace('[[PackageVersion]]', $version) | Set-Content -Encoding UTF8 .\chocolatey\build\dokany.nuspec
@@ -20,8 +22,8 @@ function Hash {
2022
return $hash.Hash
2123
}
2224

23-
$hash64 = Hash .\dokan_wix\Dokan_x64.msi
24-
$hash32 = Hash .\dokan_wix\Dokan_x86.msi
25+
$hash64 = Hash .\chocolatey\build\tools\Dokan_x64.msi
26+
$hash32 = Hash .\chocolatey\build\tools\Dokan_x86.msi
2527

2628
$install = (Get-Content .\chocolatey\build\tools\chocolateyinstall.ps1)
2729
$install = $install.Replace('[[Url]]', $url32).Replace('[[Checksum]]', $hash32)

chocolatey/tools/chocolateyinstall.ps1.template

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
$ErrorActionPreference = 'Stop';
22

3-
$packageName= 'dokany2'
4-
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
5-
#$fileLocation = Join-Path $toolsDir 'NAME_OF_EMBEDDED_INSTALLER_FILE'
3+
$packageName = 'dokany2'
4+
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
5+
$url = "$toolsDir\Dokan_x86.msi"
6+
$url64 = "$toolsDir\Dokan_x64.msi"
67

78
$packageArgs = @{
89
packageName = $packageName
910
unzipLocation = $toolsDir
1011
fileType = 'MSI'
1112
url = '[[Url]]'
1213
url64bit = '[[Url64]]'
13-
#file = $fileLocation
1414

1515
softwareName = 'Dokan Library*'
1616

@@ -24,3 +24,4 @@ $packageArgs = @{
2424
}
2525

2626
Install-ChocolateyPackage @packageArgs
27+
Remove-Item $toolsDir\*.msi -Force -EA SilentlyContinue | Out-Null

0 commit comments

Comments
 (0)