Skip to content

Commit

Permalink
Beta0: Early but working version
Browse files Browse the repository at this point in the history
Summary:
  * Registry working.:wq
  * Icons not yet complete.
  * Includes 32bit and 64bit version.
  • Loading branch information
uroesch committed Mar 1, 2020
1 parent 2db490b commit 84c4ef5
Show file tree
Hide file tree
Showing 9 changed files with 104 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.exe
Data/
App/*.exe
23 changes: 23 additions & 0 deletions App/AppInfo/Launcher/LdapAdminPortable.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[Launch]
Name=LdapAdminPortable
ProgramExecutable=LdapAdmin32.exe
ProgramExecutable64=LdapAdmin64.exe
ProgramExecutableWhenParameters=
ProgramExecutableWhenParameters64=
CommandLineArguments=
WorkingDirectory=%PAL:DataDir%

[FilesMove]
[DirectoriesMove]
[Activate]
Registry=true

[RegistryKeys]ldapadmin=HKEY_CURRENT_USER\Software\LdapAdmin

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\settings\ldapadmin.reg
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:DoubleBackslash%\\
Replace=%PAL:Drive%%PAL:PackagePartialDir:DoubleBackslash%\\
Expand Down
3 changes: 3 additions & 0 deletions App/AppInfo/appicon.ico
Git LFS file not shown
3 changes: 3 additions & 0 deletions App/AppInfo/appicon_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions App/AppInfo/appicon_32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added App/AppInfo/appinfo.ini
Binary file not shown.
65 changes: 65 additions & 0 deletions Other/Update/UpdateLdapAdmin.ps1
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"
Empty file added help.html
Empty file.

0 comments on commit 84c4ef5

Please sign in to comment.