This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
userspace:etu_notepad [2015/03/28 23:21] Robert Tauber created |
userspace:etu_notepad [2015/04/03 10:49] Robert Tauber [Copy.exe / Copy.au3] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Notepad++ ====== | + | ====== |
**Versions**\\ | **Versions**\\ | ||
Line 7: | Line 7: | ||
Tested with opsi xxxxx\\ | Tested with opsi xxxxx\\ | ||
- | Tested with opsi xxxxx | + | requiredWinstVersion >= 4.11.4.12 // |
- | requiredWinstVersion >= 4.10.5 // | + | |
Das Setup-File wird unter Q: | Das Setup-File wird unter Q: | ||
+ | |||
+ | Tree (..\opt_pcbin\install\!drivemap): | ||
+ | [[map_Q.exe]]\\ | ||
+ | |||
+ | Tree (Q: | ||
+ | [[Copy.exe]] (Für *.exe)\\ | ||
+ | Notepad++\npp.# | ||
Tree (..\notepadpp): | Tree (..\notepadpp): | ||
Line 22: | Line 28: | ||
CLIENT_DATA\userDefineLang\userDefineLang.xml\\ | CLIENT_DATA\userDefineLang\userDefineLang.xml\\ | ||
+ | ==== control ==== | ||
+ | < | ||
+ | [Package] | ||
+ | version: 2015.03.13 | ||
+ | depends: | ||
+ | incremental: | ||
+ | |||
+ | [Product] | ||
+ | type: localboot | ||
+ | id: notepadpp | ||
+ | name: Notepad++ | ||
+ | description: | ||
+ | advice: packed by Robert Tauber | ||
+ | version: 0 | ||
+ | priority: 0 | ||
+ | licenseRequired: | ||
+ | productClasses: | ||
+ | setupScript: | ||
+ | uninstallScript: | ||
+ | updateScript: | ||
+ | alwaysScript: | ||
+ | onceScript: | ||
+ | customScript: | ||
+ | userLoginScript: | ||
+ | |||
+ | [ProductDependency] | ||
+ | action: setup | ||
+ | requiredProduct: | ||
+ | requiredAction: | ||
+ | requirementType: | ||
+ | |||
+ | [ProductDependency] | ||
+ | action: uninstall | ||
+ | requiredProduct: | ||
+ | requiredAction: | ||
+ | requirementType: | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ==== setup.ins ==== | ||
+ | <code winst> | ||
+ | [Actions] | ||
+ | requiredWinstVersion >= " | ||
+ | setLogLevel = 5 | ||
+ | StayOnTop = on | ||
+ | DefVar $ProductId$ | ||
+ | DefVar $ProductNameShort$ | ||
+ | DefVar $ProductNameLong$ | ||
+ | DefVar $LocalDir$ | ||
+ | DefVar $ExitCode$ | ||
+ | DefVar $Part$ | ||
+ | DefVar $ValidOS$ | ||
+ | Set $ValidOS$ = " | ||
+ | |||
+ | ; | ||
+ | ; Angaben zum Produkt | ||
+ | ; | ||
+ | ; Kurzer Produktname (max. 12 Zeichen) | ||
+ | Set $ProductNameShort$ = " | ||
+ | ; Langer Produktname (max. 30 Zeichen) | ||
+ | Set $ProductNameLong$ = " | ||
+ | ; | ||
+ | ; Gewünschtes Betriebssystem (alle ungültigen auskommentieren) | ||
+ | ; subCheckForWinXP-32 ; Windows XP 32-bit | ||
+ | ; subCheckForVista-32 ; Windows Vista 32-bit | ||
+ | ; subCheckForVista-64 ; Windows Vista 64-bit | ||
+ | ; subCheckForSeven-32 ; Windows 7 32-bit | ||
+ | | ||
+ | ; | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ; | ||
+ | ; Muss normalerweise nicht geändert werden | ||
+ | ; | ||
+ | |||
+ | ; Bildchen und Statusmeldung | ||
+ | ShowBitmap " | ||
+ | Message " | ||
+ | |||
+ | ; Lokalen Pfad erzeugen | ||
+ | Set $ProductId$ | ||
+ | if $ProductId$ = "" | ||
+ | Set $ProductId$ | ||
+ | endif | ||
+ | Set $LocalDir$ = " | ||
+ | |||
+ | ; Prüfen, ob gültiges Betriebssystem | ||
+ | if $ValidOS$ = " | ||
+ | LogError " | ||
+ | isFatalError | ||
+ | endif | ||
+ | |||
+ | ; | ||
+ | ; Daten vorbereiten | ||
+ | ; | ||
+ | | ||
+ | | ||
+ | |||
+ | ; | ||
+ | ; Netzlaufwerk verbinden/ | ||
+ | ; | ||
+ | DosInAnIcon_Q | ||
+ | DosInAnIcon_Copy | ||
+ | |||
+ | ; | ||
+ | ; Die DeInstallation | ||
+ | ; | ||
+ | Set $Part$ = " | ||
+ | if FileExists(" | ||
+ | Winbatch_uninstall | ||
+ | subCheckExitCodeVLC | ||
+ | Files_uninstall | ||
+ | endif | ||
+ | |||
+ | ; | ||
+ | ; Die Installation | ||
+ | ; | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ; | ||
+ | |||
+ | ; | ||
+ | ; Subroutinen | ||
+ | ; | ||
+ | [FilesCleanDir] | ||
+ | Delete -s $LocalDir$ | ||
+ | |||
+ | [DosBatchMakeDir] | ||
+ | @echo off | ||
+ | mkdir $LocalDir$ | ||
+ | |||
+ | [WinbatchInstallation] | ||
+ | " | ||
+ | |||
+ | ;RT 2015.03.13: | ||
+ | ; Da npp derzeit nicht dazu in der lage sit ein Globales userDefineLang.xml allen usern zur verfügung zu stellen | ||
+ | ; z.B.: das Syntax Highlighting für winst dint das als workaround | ||
+ | ; dabei kommt ein auto it skript zum einsatz das sich als Notepad++.exe ausgibt zum einsatz | ||
+ | ; dise fängt den Befehl ab, Kopirt wenn noch nicht vorhanden die userDefineLang.xml nach %appdata%\Notepad++ | ||
+ | ; und startet dan die umbenante Notepad+++.exe mit den ursprünglichen komandos. | ||
+ | [DosBatch_Setings] | ||
+ | ren " | ||
+ | COPY " | ||
+ | |||
+ | |||
+ | |||
+ | [Winbatch_uninstall] | ||
+ | " | ||
+ | |||
+ | [Files_uninstall] | ||
+ | delete -sf " | ||
+ | |||
+ | ; | ||
+ | ; Netzlaufwerk verbinden/ | ||
+ | ; | ||
+ | [DosInAnIcon_Q] | ||
+ | " | ||
+ | [DosInAnIcon_Copy] | ||
+ | " | ||
+ | [FilesCleanTemp] | ||
+ | Delete -s " | ||
+ | |||
+ | |||
+ | ; | ||
+ | ; Subroutinen zur Überprüfung der ExitCodes | ||
+ | ; Je nach Installer verschieden | ||
+ | ; | ||
+ | ; | ||
+ | ; Windows Installer: subCheckExitCodeMSI | ||
+ | ; 0 = Erfolgreich | ||
+ | ; 3010 = Bitte Neustart | ||
+ | |||
+ | ; Diverse EXE-Dateien: | ||
+ | ; 0 = Erfolgreich | ||
+ | |||
+ | ; | ||
+ | |||
+ | [subCheckExitCodeMSI] | ||
+ | Set $ExitCode$ = getLastExitCode | ||
+ | ; Abbruch bei Fehler | ||
+ | if not (($ExitCode$ = " | ||
+ | LogError " | ||
+ | isFatalError | ||
+ | endif | ||
+ | comment " | ||
+ | ; Neustart, falls gewünscht | ||
+ | if $ExitCode$ = " | ||
+ | set $Reboot$ = " | ||
+ | endif | ||
+ | |||
+ | [subCheckExitCodeEXE] | ||
+ | Set $ExitCode$ = getLastExitCode | ||
+ | ; Abbruch bei Fehler | ||
+ | if not ($ExitCode$ = " | ||
+ | LogError " | ||
+ | isFatalError | ||
+ | endif | ||
+ | comment " | ||
+ | |||
+ | |||
+ | [subReboot] | ||
+ | if $Reboot$ = " | ||
+ | ExitWindows /Reboot | ||
+ | endif | ||
+ | |||
+ | |||
+ | |||
+ | ; | ||
+ | ; Subroutinen zur Überprüfung der Windows-Version | ||
+ | ; | ||
+ | [subCheckForWinXP-32] | ||
+ | if GetMsVersionInfo = " | ||
+ | Set $ValidOS$ = " | ||
+ | endif | ||
+ | |||
+ | [subCheckForVista-32] | ||
+ | if GetMsVersionInfo = " | ||
+ | Set $ValidOS$ = " | ||
+ | endif | ||
+ | |||
+ | [subCheckForVista-64] | ||
+ | if GetMsVersionInfo = " | ||
+ | Set $ValidOS$ = " | ||
+ | endif | ||
+ | |||
+ | [subCheckForSeven-32] | ||
+ | if GetMsVersionInfo = " | ||
+ | Set $ValidOS$ = " | ||
+ | endif | ||
+ | |||
+ | [subCheckForSeven-64] | ||
+ | if GetMsVersionInfo = " | ||
+ | Set $ValidOS$ = " | ||
+ | endif | ||
+ | </ | ||
+ | |||
+ | ==== uninstall.ins ==== | ||
+ | <code winst> | ||
+ | |||
+ | [Actions] | ||
+ | requiredWinstVersion >= " | ||
+ | setLogLevel = 5 | ||
+ | StayOnTop = on | ||
+ | DefVar $ProductId$ | ||
+ | DefVar $ProductNameShort$ | ||
+ | DefVar $ProductNameLong$ | ||
+ | DefVar $LocalDir$ | ||
+ | DefVar $ExitCode$ | ||
+ | DefVar $Part$ | ||
+ | DefVar $ValidOS$ | ||
+ | Set $ValidOS$ = " | ||
+ | |||
+ | ; | ||
+ | ; Angaben zum Produkt | ||
+ | ; | ||
+ | ; Kurzer Produktname (max. 12 Zeichen) | ||
+ | Set $ProductNameShort$ = " | ||
+ | ; Langer Produktname (max. 30 Zeichen) | ||
+ | Set $ProductNameLong$ = " | ||
+ | ; | ||
+ | ; Gewünschtes Betriebssystem (alle ungültigen auskommentieren) | ||
+ | ; subCheckForWinXP-32 ; Windows XP 32-bit | ||
+ | ; subCheckForVista-32 ; Windows Vista 32-bit | ||
+ | ; subCheckForVista-64 ; Windows Vista 64-bit | ||
+ | ; subCheckForSeven-32 ; Windows 7 32-bit | ||
+ | | ||
+ | ; | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ; | ||
+ | ; Muss normalerweise nicht geändert werden | ||
+ | ; | ||
+ | |||
+ | ; Bildchen und Statusmeldung | ||
+ | ShowBitmap " | ||
+ | Message " | ||
+ | |||
+ | ; Lokalen Pfad erzeugen | ||
+ | Set $ProductId$ | ||
+ | if $ProductId$ = "" | ||
+ | Set $ProductId$ | ||
+ | endif | ||
+ | Set $LocalDir$ = " | ||
+ | |||
+ | ; Prüfen, ob gültiges Betriebssystem | ||
+ | if $ValidOS$ = " | ||
+ | LogError " | ||
+ | isFatalError | ||
+ | endif | ||
+ | |||
+ | ; | ||
+ | ; Daten vorbereiten | ||
+ | ; | ||
+ | | ||
+ | | ||
+ | |||
+ | ; | ||
+ | ; Netzlaufwerk verbinden/ | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ; | ||
+ | ; Die DeInstallation | ||
+ | ; | ||
+ | Set $Part$ = " | ||
+ | if FileExists(" | ||
+ | Winbatch_uninstall | ||
+ | subCheckExitCodeVLC | ||
+ | Files_uninstall | ||
+ | endif | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ; | ||
+ | |||
+ | ; | ||
+ | ; Subroutinen | ||
+ | ; | ||
+ | [FilesCleanDir] | ||
+ | Delete -s $LocalDir$ | ||
+ | |||
+ | [DosBatchMakeDir] | ||
+ | @echo off | ||
+ | mkdir $LocalDir$ | ||
+ | |||
+ | [Winbatch_uninstall] | ||
+ | " | ||
+ | |||
+ | [Files_uninstall] | ||
+ | delete -sf " | ||
+ | |||
+ | |||
+ | ; | ||
+ | ; Netzlaufwerk verbinden/ | ||
+ | ; | ||
+ | [DosInAnIcon_Q] | ||
+ | " | ||
+ | [DosInAnIcon_Copy] | ||
+ | " | ||
+ | [FilesCleanTemp] | ||
+ | Delete -s " | ||
+ | |||
+ | |||
+ | ; | ||
+ | ; Subroutinen zur Überprüfung der ExitCodes | ||
+ | ; Je nach Installer verschieden | ||
+ | ; | ||
+ | ; | ||
+ | ; Windows Installer: subCheckExitCodeMSI | ||
+ | ; 0 = Erfolgreich | ||
+ | ; 3010 = Bitte Neustart | ||
+ | |||
+ | ; Diverse EXE-Dateien: | ||
+ | ; 0 = Erfolgreich | ||
+ | |||
+ | ; | ||
+ | |||
+ | [subCheckExitCodeMSI] | ||
+ | Set $ExitCode$ = getLastExitCode | ||
+ | ; Abbruch bei Fehler | ||
+ | if not (($ExitCode$ = " | ||
+ | LogError " | ||
+ | isFatalError | ||
+ | endif | ||
+ | comment " | ||
+ | ; Neustart, falls gewünscht | ||
+ | if $ExitCode$ = " | ||
+ | set $Reboot$ = " | ||
+ | endif | ||
+ | |||
+ | [subCheckExitCodeEXE] | ||
+ | Set $ExitCode$ = getLastExitCode | ||
+ | ; Abbruch bei Fehler | ||
+ | if not ($ExitCode$ = " | ||
+ | LogError " | ||
+ | isFatalError | ||
+ | endif | ||
+ | comment " | ||
+ | |||
+ | [subReboot] | ||
+ | if $Reboot$ = " | ||
+ | ExitWindows /Reboot | ||
+ | endif | ||
+ | |||
+ | |||
+ | |||
+ | ; | ||
+ | ; Subroutinen zur Überprüfung der Windows-Version | ||
+ | ; | ||
+ | [subCheckForWinXP-32] | ||
+ | if GetMsVersionInfo = " | ||
+ | Set $ValidOS$ = " | ||
+ | endif | ||
+ | |||
+ | [subCheckForVista-32] | ||
+ | if GetMsVersionInfo = " | ||
+ | Set $ValidOS$ = " | ||
+ | endif | ||
+ | |||
+ | [subCheckForVista-64] | ||
+ | if GetMsVersionInfo = " | ||
+ | Set $ValidOS$ = " | ||
+ | endif | ||
+ | |||
+ | [subCheckForSeven-32] | ||
+ | if GetMsVersionInfo = " | ||
+ | Set $ValidOS$ = " | ||
+ | endif | ||
+ | |||
+ | [subCheckForSeven-64] | ||
+ | if GetMsVersionInfo = " | ||
+ | Set $ValidOS$ = " | ||
+ | endif | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== notepad++.exe / notepad++.au3 ==== | ||
+ | <code autoit> | ||
+ | #include < | ||
+ | |||
+ | ;=== Befehle aufbereiten === | ||
+ | ;RT 2015.03.13: | ||
+ | ; Ziel ist es die aufruf parameter korekt weiter zu geben | ||
+ | $pfad = @ScriptDir | ||
+ | $name = " | ||
+ | $cmp = _ArrayToString($CmdLine, | ||
+ | $prog = '"' | ||
+ | ;RT 2015.03.13: Zur kontrolle | ||
+ | ; | ||
+ | |||
+ | |||
+ | ;=== Zusatz Aktionen === | ||
+ | ;RT 2015.03.13: | ||
+ | ; Was Soll Pasiren befor das Programm aufgerufen wird | ||
+ | ; == Kopiren == | ||
+ | ;RT 2015.03.13: Quelle und Ziel definiren | ||
+ | $file = " | ||
+ | $quelle = @ScriptDir & " | ||
+ | $ziel = @AppDataDir & " | ||
+ | |||
+ | ;RT 2015.03.13: Prüfen ob Quelle ok und Ziel nochnicht vorhanden | ||
+ | if FileExists($quelle) and not FileExists($ziel) then | ||
+ | ;RT 2015.03.13: Zur kontrolle | ||
+ | ; | ||
+ | | ||
+ | EndIf | ||
+ | |||
+ | run ($prog) | ||
+ | ;RT 2015.03.13: Zur kontrolle | ||
+ | ; | ||
+ | |||
+ | </ | ||