-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: * Registry working.:wq * Icons not yet complete. * Includes 32bit and 64bit version.
- Loading branch information
Showing
9 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.jpg filter=lfs diff=lfs merge=lfs -text | ||
*.xcf filter=lfs diff=lfs merge=lfs -text | ||
*.ico filter=lfs diff=lfs merge=lfs -text | ||
*.png filter=lfs diff=lfs merge=lfs -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.exe | ||
Data/ | ||
App/*.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git LFS file not shown
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
$AppRoot = "$PSScriptRoot\..\.." | ||
$AppInfoIni = "$AppRoot\App\AppInfo\appinfo.ini" | ||
$PackageVersion = '1.8.3.0' | ||
$DisplayVersion = '1.8.3-beta0-uroesch' | ||
$ZipVersion = '1.8.3' | ||
$Archive64URL = "https://netcologne.dl.sourceforge.net/project/ldapadmin/ldapadmin/$ZipVersion/LdapAdminExe-w32-$ZipVersion.zip" | ||
$TargetDir64 = 'LdapAdmin64.exe' | ||
$ExtractDir64 = 'LdapAdmin.exe' | ||
$Archive32URL = "https://netcologne.dl.sourceforge.net/project/ldapadmin/ldapadmin/$ZipVersion/LdapAdminExe-w32-$ZipVersion.zip" | ||
$TargetDir32 = 'LdapAdmin32.exe' | ||
$ExtractDir32 = 'LdapAdmin.exe' | ||
|
||
Function Url-Basename { | ||
param( | ||
[string] $URL | ||
) | ||
$Elements = $URL.split('/') | ||
$Basename = $Elements[$($Elements.Length-1)] | ||
return $Basename | ||
} | ||
|
||
Function Download-ZIP { | ||
param( | ||
[string] $URL | ||
) | ||
$PathZip = "$PSScriptRoot\$(Url-Basename -URL $URL)" | ||
If (!(Test-Path $PathZip)) { | ||
Invoke-WebRequest -Uri $URL -OutFile $PathZip | ||
} | ||
return $PathZip | ||
} | ||
|
||
Function Update-Zip { | ||
param( | ||
[string] $URL, | ||
[string] $TargetDir, | ||
[string] $ExtractDir | ||
) | ||
$ZipFile = $(Download-ZIP -URL $URL) | ||
$TargetPath = "$AppRoot\App\$TargetDir" | ||
Expand-Archive -LiteralPath $ZipFile -DestinationPath $PSScriptRoot -Force | ||
If (Test-Path $TargetPath) { | ||
Write-Output "Removing $TargetPath" | ||
Remove-Item -Path $TargetPath -Force -Recurse | ||
} | ||
Move-Item -Path $PSScriptRoot\$ExtractDir -Destination $TargetPath -Force | ||
Remove-Item $ZipFile | ||
} | ||
|
||
Function Update-Appinfo() { | ||
param( | ||
[string] $IniFile, | ||
[string] $Match, | ||
[string] $Replace | ||
) | ||
If (Test-Path $IniFile) { | ||
$Content = (Get-Content $IniFile) | ||
$Content -replace $Match,$Replace | Out-File -FilePath $IniFile | ||
} | ||
} | ||
|
||
Update-ZIP -URL $Archive64URL -TargetDir $TargetDir64 -ExtractDir $ExtractDir64 | ||
Update-ZIP -URL $Archive32URL -TargetDir $TargetDir32 -ExtractDir $ExtractDir32 | ||
Update-Appinfo -IniFile $AppInfoIni -Match '^PackageVersion\s*=.*' -Replace "PackageVersion=$PackageVersion" | ||
Update-Appinfo -IniFile $AppInfoIni -Match '^DisplayVersion\s*=.*' -Replace "DisplayVersion=$DisplayVersion" |