Probleme mit ShowBitmap

Antworten
stutti
Beiträge: 5
Registriert: 02 Jul 2019, 11:57

Probleme mit ShowBitmap

Beitrag von stutti »

Hall zusammen,

lange ist es nicht her, das ich hier eine Frage gestellt habe, nun kommt die nächste...
Momentan kämpfe ich mit den "ShowBitmap", habe schon sämtliche Varianten versucht, jedoch lässt sich das Bild und der Text nicht anzeigen.

Hier der ausschnitt:

Code: Alles auswählen

        comment "Show product picture"
        ShowBitmap "%scriptpath%\"+$ProductId$+".png" $ProductName$
Ich meine, das ist wie im Handbuch... Fehlermeldung habe ich keine.

Falls notwendig hier noch das komplette Script:

Code: Alles auswählen

[Initial]
LogLevel=9
ExitOnError=false
ScriptErrorMessages=on
TraceMode=off
StayOnTop=false

[Actions]
requiredWinstVersion >= "4.10.8.6"

DefVar $UninstallProgram$
DefVar $LogDir$
DefVar $ProductId$
DefVar $ProductName$
DefVar $MinimumSpace$
DefVar $InstallDir$
DefVar $ExitCode$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $Version$
DefVar $Inst_Cmd$
DefVar $Inst_Prg$
DefVar $Uninst_Prg$
DefVar $Uninst_Cmd$

Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")

Set $LogDir$ = "%SystemDrive%\tmp"
Set $ProductId$       = "vlc"
Set $ProductName$     = "VLC - Mediaplayer"
Set $Version$         = "3071"
Set $MinimumSpace$    = "25 MB"
Set $InstallDir$      = "%ProgramFiles64Dir%\VideoLAN"
Set $LicenseRequired$ = "false"
Set $LicensePool$     = "p_" + $ProductId$
Set $Inst_Prg$ = "vlc-3.0.7.1-win64.exe"
Set $Inst_Cmd$ = ' /L=1031 /S'
Set $Uninst_Prg$ = "uninstall.exe"
Set $Uninst_Cmd$ = ' /S'

if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
        LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
        isFatalError
else
        comment "Show product picture"
        ShowBitmap "%scriptpath%\"+$ProductId$+".png" $ProductName$

        if FileExists("%ScriptPath%\delsub.ins")
                comment "Start uninstall sub section"
                Sub "%ScriptPath%\delsub.ins"
        endif

        if $LicenseRequired$ = "true"
                comment "Licensing required, reserve license and get license key"
                Sub_get_licensekey
        endif

        comment "installing"

        if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
                Message "Installing " + $ProductId$
                comment "Start setup program"
                Winbatch_install
                Sub_check_exitcode
        endif

        if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
                Message "Installing " + $ProductId$
                comment "Start setup program"
                Winbatch_install
                Sub_check_exitcode
        endif

endif

[Winbatch_install]
"%ScriptPath%\files\$Inst_Prg$"+$Inst_Cmd$

[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
if ($ExitCode$ = "0")
        comment "Looks good: setup program gives exitcode zero"
else
        comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
        if ($ExitCode$ = "1605")
                comment "ERROR_UNKNOWN_PRODUCT  1605    This action is only valid for products that are currently installed."
                comment "Uninstall of a not installed product failed - no problem"
        else
                if ($ExitCode$ = "1641")
                        comment "looks good: setup program gives exitcode 1641"
                        comment "ERROR_SUCCESS_REBOOT_INITIATED 1641    The installer has initiated a restart. This message is indicative of a success."
                else
                        if ($ExitCode$ = "3010")
                                comment "looks good: setup program gives exitcode 3010"
                                comment "ERROR_SUCCESS_REBOOT_REQUIRED  3010    A restart is required to complete the install. This message is indicative of a success."
                        else
                                logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
                                isFatalError
                        endif
                endif
        endif
endif
Vielen Dank und Grüße
Benutzeravatar
koepkek
uib-Team
Beiträge: 253
Registriert: 11 Jan 2012, 11:27

Re: Probleme mit ShowBitmap

Beitrag von koepkek »

Hallo

bitte mal das Logfile von der Installation anschauen.
Gibt es ein Bild mit Produktname.png im Script-Verzeichnis?
So sieht das in unserem Template aus, bitte die Leerzeichen um die + Zeichen beachten.

Code: Alles auswählen

comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
Viele Grüße Karsten
opsi support - uib gmbh
For productive opsi installations we recommend support contracts.
http://uib.de
http://opsi.org
stutti
Beiträge: 5
Registriert: 02 Jul 2019, 11:57

Re: Probleme mit ShowBitmap

Beitrag von stutti »

Hallo,

ja, es befindet sich eine "vlc.png" in dem "%ScriptPath%", habe die Zeile von dir 1:1 raus kopiert, dennoch bekomme ich bei der Installation kein Bild angezeigt.

Im log finde ich nichts darüber, keine Fehlermeldung und auch kein Hinweis, dass dieser Part des Scripts aufgerufen wird...

Grüße
dropped91
Beiträge: 73
Registriert: 11 Mai 2017, 16:29

Re: Probleme mit ShowBitmap

Beitrag von dropped91 »

Stimmen denn die Rechte?
Benutzeravatar
GEI
Beiträge: 229
Registriert: 12 Feb 2010, 13:00
Wohnort: Braunschweig
Kontaktdaten:

Re: Probleme mit ShowBitmap

Beitrag von GEI »

stutti hat geschrieben: jedoch lässt sich das Bild und der Text nicht anzeigen.
stimmen Bildgöße und Format?
( <= 160 Pixel, jpg oder png)
Georg-Eckert-Institut - Leibniz-Institut für internationale Schulbuchforschung (GEI)
---
'opsi4instituts' = Communityprojekt für wissenschaftliche Einrichtungen
offenes Repository, Update-Notifier
http://www.gei.de/o4i - https://wiki.o4i.org
stutti
Beiträge: 5
Registriert: 02 Jul 2019, 11:57

Re: Probleme mit ShowBitmap

Beitrag von stutti »

Hallo,

das ist ja das komische, das passt sowiet ich das beurteilen kann alles...

Code: Alles auswählen

root@opsi:/home/opsiproducts/vlc/CLIENT_DATA# ls -lah
insgesamt 32K
drwxrws--- 3 root pcpatch 4,0K Jul  3 10:42 .
drwxrws--- 5 root pcpatch 4,0K Jul  3 16:02 ..
-rw-r--r-- 1 root pcpatch 2,5K Jul  3 08:57 delsub.ins
drwxr-sr-x 2 root pcpatch 4,0K Jul  3 10:42 files
-rw-rw-r-- 1 root pcpatch 3,9K Jul  3 16:01 setup.ins
-rw-rw-r-- 1 root pcpatch 1,4K Jul  3 08:56 unistall.ins
-rw-rw-r-- 1 root pcpatch 4,8K Nov 22  2018 vlc.png
root@opsi:/home/opsiproducts/vlc/CLIENT_DATA# file vlc.png 
vlc.png: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, progressive, precision 8, 160x160, frames 3
root@opsi:/home/opsiproducts/vlc/CLIENT_DATA#
Ich werde es mit dem Opsi-Template mal versuchen, eventuell passt mit meinem Setup-Script allgemein was nicht.
Benutzeravatar
GEI
Beiträge: 229
Registriert: 12 Feb 2010, 13:00
Wohnort: Braunschweig
Kontaktdaten:

Re: Probleme mit ShowBitmap

Beitrag von GEI »

Code: Alles auswählen

root@opsi:/home/opsiproducts/vlc/CLIENT_DATA# file vlc.png 
vlc.png: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, progressive, precision 8, 160x160, frames 3
root@opsi:/home/opsiproducts/vlc/CLIENT_DATA#
* frames?
* vlc.png ... jpeg?

sieht hier entwas anders aus:

Code: Alles auswählen

odl/icons/gei_shotcut.png: PNG image data, 160 x 93, 8-bit/color RGB, non-interlaced
odl/icons/gei_signal-messenger.png: PNG image data, 160 x 85, 8-bit/color RGB, non-interlaced
odl/icons/gei_spark.png: PNG image data, 160 x 123, 8-bit/color RGB, non-interlaced
odl/icons/gei_syncbackfree.png: PNG image data, 143 x 159, 8-bit/color RGB, non-interlaced
odl/icons/gei_thinkpad-systemupdate-OLD.png: PNG image data, 102 x 128, 8-bit/color RGB, non-interlaced
Zuletzt geändert von GEI am 04 Jul 2019, 09:12, insgesamt 1-mal geändert.
Georg-Eckert-Institut - Leibniz-Institut für internationale Schulbuchforschung (GEI)
---
'opsi4instituts' = Communityprojekt für wissenschaftliche Einrichtungen
offenes Repository, Update-Notifier
http://www.gei.de/o4i - https://wiki.o4i.org
Benutzeravatar
GEI
Beiträge: 229
Registriert: 12 Feb 2010, 13:00
Wohnort: Braunschweig
Kontaktdaten:

Re: Probleme mit ShowBitmap

Beitrag von GEI »

noch ein Hinweis.... (https://download.uib.de/opsi4.0/doc/htm ... ShowBitMap)
Wenn der String leer ist, wird das Bild gelöscht :-)
Was sagt denn das Log über die Belegung der Stringvariable?
Georg-Eckert-Institut - Leibniz-Institut für internationale Schulbuchforschung (GEI)
---
'opsi4instituts' = Communityprojekt für wissenschaftliche Einrichtungen
offenes Repository, Update-Notifier
http://www.gei.de/o4i - https://wiki.o4i.org
Benutzeravatar
koepkek
uib-Team
Beiträge: 253
Registriert: 11 Jan 2012, 11:27

Re: Probleme mit ShowBitmap

Beitrag von koepkek »

stutti hat geschrieben:Hallo,

Im log finde ich nichts darüber, keine Fehlermeldung und auch kein Hinweis, dass dieser Part des Scripts aufgerufen wird...

Grüße
Hi das kann eigentlich nicht sein. Bitte mal das log zur Verfügung stellen.

Viele Grüße Karsten
opsi support - uib gmbh
For productive opsi installations we recommend support contracts.
http://uib.de
http://opsi.org
Benutzeravatar
GEI
Beiträge: 229
Registriert: 12 Feb 2010, 13:00
Wohnort: Braunschweig
Kontaktdaten:

Re: Probleme mit ShowBitmap

Beitrag von GEI »

stutti hat geschrieben:Hallo,
Im log finde ich nichts darüber, keine Fehlermeldung und auch kein Hinweis, dass dieser Part des Scripts aufgerufen wird...
zum Testen bitte mal die Zeile

Code: Alles auswählen

ShowBitmap "%ScriptPath%\vlc.png" "VLC Media Player"
verwenden...

PS:
bitte zukünftig das Log-Datenverzeichnis nicht hart auf "c:\temp\log" setzen. Das klappt manchmal nicht ...
Lieber laut UIB-Standard:

Code: Alles auswählen

Set $LogDir$ = "%opsiLogDir%"
Dann liegen die Logs in "C:\opsi.org\log" ...
Georg-Eckert-Institut - Leibniz-Institut für internationale Schulbuchforschung (GEI)
---
'opsi4instituts' = Communityprojekt für wissenschaftliche Einrichtungen
offenes Repository, Update-Notifier
http://www.gei.de/o4i - https://wiki.o4i.org
Antworten