Skip to content

Commit

Permalink
Beta2: Fix Unix support in the update script
Browse files Browse the repository at this point in the history
Summary:
  * Correct some of the issues found on Wine.
  • Loading branch information
uroesch committed Mar 14, 2020
1 parent 6b277fc commit 217760f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
Binary file modified App/AppInfo/appinfo.ini
Binary file not shown.
2 changes: 1 addition & 1 deletion App/AppInfo/update.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Version]
Package = 1.8.3.0
Display = 1.8.3-beta1-uroesch
Display = 1.8.3-beta2-uroesch

[Archive]
URL1 = https://netcologne.dl.sourceforge.net/project/ldapadmin/ldapadmin/1.8.3/LdapAdminExe-w64-1.8.3.zip
Expand Down
21 changes: 13 additions & 8 deletions Other/Update/Update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@ $Debug = $True
# -----------------------------------------------------------------------------
# Functions
# -----------------------------------------------------------------------------
Function Debug () {
Function Debug() {
param( [string] $Message )
If (-Not($Debug)) { return }
Write-Host $Message
}

# -----------------------------------------------------------------------------
Function Is-Unix() {
($PSScriptRoot)[0] -eq '/'
}

# -----------------------------------------------------------------------------
Function Parse-Ini {
param (
Expand Down Expand Up @@ -185,24 +190,24 @@ Function Create-Launcher() {
Set-Location $AppRoot
$AppPath = (Get-Location)
$Launcher = "..\PortableApps.comLauncher\PortableApps.comLauncherGenerator.exe"
If ($AppPath[0] -eq '/') {
Debug "Running Launcher: wine $Launcher $(Windows-Path AppPath)"
Invoke-Expression "wine $Launcher /s $(Windows-Path $AppPath)"
If (Is-Unix) {
Debug "Running Launcher: wine $Launcher $(Windows-Path $AppPath)"
Invoke-Expression "wine $Launcher $(Windows-Path $AppPath)"
}
Else {
Debug "Running Launcher: wine $Launcher AppPath"
Debug "Running Launcher: $Launcher AppPath"
Invoke-Expression "$Launcher $AppPath"
Write-FileSystemCache $AppPath.Drive.Name
}
Write-FileSystemCache $AppPath.Drive.Name
}

# -----------------------------------------------------------------------------
Function Create-Installer() {
Set-Location $AppRoot
$AppPath = (Get-Location)
$Installer = "..\PortableApps.comInstaller\PortableApps.comInstaller.exe"
If ($AppPath[0] -eq '/') {
Debug "Running Installer: wine $Installer $(Windows-Path AppPath)"
If (Is-Unix) {
Debug "Running Installer: wine $Installer $(Windows-Path $AppPath)"
Invoke-Expression "wine $Installer $(Windows-Path $AppPath)"
}
Else {
Expand Down

0 comments on commit 217760f

Please sign in to comment.