mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-02-21 17:56:57 +00:00
Bundle windows installer source code
This commit is contained in:
parent
7cde28ceae
commit
6a96506833
2
.gitignore
vendored
2
.gitignore
vendored
@ -29,4 +29,4 @@ node_modules
|
|||||||
|
|
||||||
bin/node
|
bin/node
|
||||||
|
|
||||||
release/
|
release/build
|
||||||
|
327
release/installers/win32/Include/EnvVarUpdate.nsh
Normal file
327
release/installers/win32/Include/EnvVarUpdate.nsh
Normal file
@ -0,0 +1,327 @@
|
|||||||
|
/**
|
||||||
|
* EnvVarUpdate.nsh
|
||||||
|
* : Environmental Variables: append, prepend, and remove entries
|
||||||
|
*
|
||||||
|
* WARNING: If you use StrFunc.nsh header then include it before this file
|
||||||
|
* with all required definitions. This is to avoid conflicts
|
||||||
|
*
|
||||||
|
* Usage:
|
||||||
|
* ${EnvVarUpdate} "ResultVar" "EnvVarName" "Action" "RegLoc" "PathString"
|
||||||
|
*
|
||||||
|
* Credits:
|
||||||
|
* Version 1.0
|
||||||
|
* * Cal Turney (turnec2)
|
||||||
|
* * Amir Szekely (KiCHiK) and e-circ for developing the forerunners of this
|
||||||
|
* function: AddToPath, un.RemoveFromPath, AddToEnvVar, un.RemoveFromEnvVar,
|
||||||
|
* WriteEnvStr, and un.DeleteEnvStr
|
||||||
|
* * Diego Pedroso (deguix) for StrTok
|
||||||
|
* * Kevin English (kenglish_hi) for StrContains
|
||||||
|
* * Hendri Adriaens (Smile2Me), Diego Pedroso (deguix), and Dan Fuhry
|
||||||
|
* (dandaman32) for StrReplace
|
||||||
|
*
|
||||||
|
* Version 1.1 (compatibility with StrFunc.nsh)
|
||||||
|
* * techtonik
|
||||||
|
*
|
||||||
|
* http://nsis.sourceforge.net/Environmental_Variables:_append%2C_prepend%2C_and_remove_entries
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
!ifndef ENVVARUPDATE_FUNCTION
|
||||||
|
!define ENVVARUPDATE_FUNCTION
|
||||||
|
!verbose push
|
||||||
|
!verbose 3
|
||||||
|
!include "LogicLib.nsh"
|
||||||
|
!include "WinMessages.NSH"
|
||||||
|
!include "StrFunc.nsh"
|
||||||
|
|
||||||
|
; ---- Fix for conflict if StrFunc.nsh is already includes in main file -----------------------
|
||||||
|
!macro _IncludeStrFunction StrFuncName
|
||||||
|
!ifndef ${StrFuncName}_INCLUDED
|
||||||
|
${${StrFuncName}}
|
||||||
|
!endif
|
||||||
|
!ifndef Un${StrFuncName}_INCLUDED
|
||||||
|
${Un${StrFuncName}}
|
||||||
|
!endif
|
||||||
|
!define un.${StrFuncName} "${Un${StrFuncName}}"
|
||||||
|
!macroend
|
||||||
|
|
||||||
|
!insertmacro _IncludeStrFunction StrTok
|
||||||
|
!insertmacro _IncludeStrFunction StrStr
|
||||||
|
!insertmacro _IncludeStrFunction StrRep
|
||||||
|
|
||||||
|
; ---------------------------------- Macro Definitions ----------------------------------------
|
||||||
|
!macro _EnvVarUpdateConstructor ResultVar EnvVarName Action Regloc PathString
|
||||||
|
Push "${EnvVarName}"
|
||||||
|
Push "${Action}"
|
||||||
|
Push "${RegLoc}"
|
||||||
|
Push "${PathString}"
|
||||||
|
Call EnvVarUpdate
|
||||||
|
Pop "${ResultVar}"
|
||||||
|
!macroend
|
||||||
|
!define EnvVarUpdate '!insertmacro "_EnvVarUpdateConstructor"'
|
||||||
|
|
||||||
|
!macro _unEnvVarUpdateConstructor ResultVar EnvVarName Action Regloc PathString
|
||||||
|
Push "${EnvVarName}"
|
||||||
|
Push "${Action}"
|
||||||
|
Push "${RegLoc}"
|
||||||
|
Push "${PathString}"
|
||||||
|
Call un.EnvVarUpdate
|
||||||
|
Pop "${ResultVar}"
|
||||||
|
!macroend
|
||||||
|
!define un.EnvVarUpdate '!insertmacro "_unEnvVarUpdateConstructor"'
|
||||||
|
; ---------------------------------- Macro Definitions end-------------------------------------
|
||||||
|
|
||||||
|
;----------------------------------- EnvVarUpdate start----------------------------------------
|
||||||
|
!define hklm_all_users 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
|
||||||
|
!define hkcu_current_user 'HKCU "Environment"'
|
||||||
|
|
||||||
|
!macro EnvVarUpdate UN
|
||||||
|
|
||||||
|
Function ${UN}EnvVarUpdate
|
||||||
|
|
||||||
|
Push $0
|
||||||
|
Exch 4
|
||||||
|
Exch $1
|
||||||
|
Exch 3
|
||||||
|
Exch $2
|
||||||
|
Exch 2
|
||||||
|
Exch $3
|
||||||
|
Exch
|
||||||
|
Exch $4
|
||||||
|
Push $5
|
||||||
|
Push $6
|
||||||
|
Push $7
|
||||||
|
Push $8
|
||||||
|
Push $9
|
||||||
|
Push $R0
|
||||||
|
|
||||||
|
/* After this point:
|
||||||
|
-------------------------
|
||||||
|
$0 = ResultVar (returned)
|
||||||
|
$1 = EnvVarName (input)
|
||||||
|
$2 = Action (input)
|
||||||
|
$3 = RegLoc (input)
|
||||||
|
$4 = PathString (input)
|
||||||
|
$5 = Orig EnvVar (read from registry)
|
||||||
|
$6 = Len of $0 (temp)
|
||||||
|
$7 = tempstr1 (temp)
|
||||||
|
$8 = Entry counter (temp)
|
||||||
|
$9 = tempstr2 (temp)
|
||||||
|
$R0 = tempChar (temp) */
|
||||||
|
|
||||||
|
; Step 1: Read contents of EnvVarName from RegLoc
|
||||||
|
;
|
||||||
|
; Check for empty EnvVarName
|
||||||
|
${If} $1 == ""
|
||||||
|
SetErrors
|
||||||
|
DetailPrint "ERROR: EnvVarName is blank"
|
||||||
|
Goto EnvVarUpdate_Restore_Vars
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
; Check for valid Action
|
||||||
|
${If} $2 != "A"
|
||||||
|
${AndIf} $2 != "P"
|
||||||
|
${AndIf} $2 != "R"
|
||||||
|
SetErrors
|
||||||
|
DetailPrint "ERROR: Invalid Action - must be A, P, or R"
|
||||||
|
Goto EnvVarUpdate_Restore_Vars
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
${If} $3 == HKLM
|
||||||
|
ReadRegStr $5 ${hklm_all_users} $1 ; Get EnvVarName from all users into $5
|
||||||
|
${ElseIf} $3 == HKCU
|
||||||
|
ReadRegStr $5 ${hkcu_current_user} $1 ; Read EnvVarName from current user into $5
|
||||||
|
${Else}
|
||||||
|
SetErrors
|
||||||
|
DetailPrint 'ERROR: Action is [$3] but must be "HKLM" or HKCU"'
|
||||||
|
Goto EnvVarUpdate_Restore_Vars
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
; Check for empty PathString
|
||||||
|
${If} $4 == ""
|
||||||
|
SetErrors
|
||||||
|
DetailPrint "ERROR: PathString is blank"
|
||||||
|
Goto EnvVarUpdate_Restore_Vars
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
; Make sure we've got some work to do
|
||||||
|
${If} $5 == ""
|
||||||
|
${AndIf} $2 == "R"
|
||||||
|
SetErrors
|
||||||
|
DetailPrint "$1 is empty - Nothing to remove"
|
||||||
|
Goto EnvVarUpdate_Restore_Vars
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
; Step 2: Scrub EnvVar
|
||||||
|
;
|
||||||
|
StrCpy $0 $5 ; Copy the contents to $0
|
||||||
|
; Remove spaces around semicolons (NOTE: spaces before the 1st entry or
|
||||||
|
; after the last one are not removed here but instead in Step 3)
|
||||||
|
${If} $0 != "" ; If EnvVar is not empty ...
|
||||||
|
${Do}
|
||||||
|
${${UN}StrStr} $7 $0 " ;"
|
||||||
|
${If} $7 == ""
|
||||||
|
${ExitDo}
|
||||||
|
${EndIf}
|
||||||
|
${${UN}StrRep} $0 $0 " ;" ";" ; Remove '<space>;'
|
||||||
|
${Loop}
|
||||||
|
${Do}
|
||||||
|
${${UN}StrStr} $7 $0 "; "
|
||||||
|
${If} $7 == ""
|
||||||
|
${ExitDo}
|
||||||
|
${EndIf}
|
||||||
|
${${UN}StrRep} $0 $0 "; " ";" ; Remove ';<space>'
|
||||||
|
${Loop}
|
||||||
|
${Do}
|
||||||
|
${${UN}StrStr} $7 $0 ";;"
|
||||||
|
${If} $7 == ""
|
||||||
|
${ExitDo}
|
||||||
|
${EndIf}
|
||||||
|
${${UN}StrRep} $0 $0 ";;" ";"
|
||||||
|
${Loop}
|
||||||
|
|
||||||
|
; Remove a leading or trailing semicolon from EnvVar
|
||||||
|
StrCpy $7 $0 1 0
|
||||||
|
${If} $7 == ";"
|
||||||
|
StrCpy $0 $0 "" 1 ; Change ';<EnvVar>' to '<EnvVar>'
|
||||||
|
${EndIf}
|
||||||
|
StrLen $6 $0
|
||||||
|
IntOp $6 $6 - 1
|
||||||
|
StrCpy $7 $0 1 $6
|
||||||
|
${If} $7 == ";"
|
||||||
|
StrCpy $0 $0 $6 ; Change ';<EnvVar>' to '<EnvVar>'
|
||||||
|
${EndIf}
|
||||||
|
; DetailPrint "Scrubbed $1: [$0]" ; Uncomment to debug
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
/* Step 3. Remove all instances of the target path/string (even if "A" or "P")
|
||||||
|
$6 = bool flag (1 = found and removed PathString)
|
||||||
|
$7 = a string (e.g. path) delimited by semicolon(s)
|
||||||
|
$8 = entry counter starting at 0
|
||||||
|
$9 = copy of $0
|
||||||
|
$R0 = tempChar */
|
||||||
|
|
||||||
|
${If} $5 != "" ; If EnvVar is not empty ...
|
||||||
|
StrCpy $9 $0
|
||||||
|
StrCpy $0 ""
|
||||||
|
StrCpy $8 0
|
||||||
|
StrCpy $6 0
|
||||||
|
|
||||||
|
${Do}
|
||||||
|
${${UN}StrTok} $7 $9 ";" $8 "0" ; $7 = next entry, $8 = entry counter
|
||||||
|
|
||||||
|
${If} $7 == "" ; If we've run out of entries,
|
||||||
|
${ExitDo} ; were done
|
||||||
|
${EndIf} ;
|
||||||
|
|
||||||
|
; Remove leading and trailing spaces from this entry (critical step for Action=Remove)
|
||||||
|
${Do}
|
||||||
|
StrCpy $R0 $7 1
|
||||||
|
${If} $R0 != " "
|
||||||
|
${ExitDo}
|
||||||
|
${EndIf}
|
||||||
|
StrCpy $7 $7 "" 1 ; Remove leading space
|
||||||
|
${Loop}
|
||||||
|
${Do}
|
||||||
|
StrCpy $R0 $7 1 -1
|
||||||
|
${If} $R0 != " "
|
||||||
|
${ExitDo}
|
||||||
|
${EndIf}
|
||||||
|
StrCpy $7 $7 -1 ; Remove trailing space
|
||||||
|
${Loop}
|
||||||
|
${If} $7 == $4 ; If string matches, remove it by not appending it
|
||||||
|
StrCpy $6 1 ; Set 'found' flag
|
||||||
|
${ElseIf} $7 != $4 ; If string does NOT match
|
||||||
|
${AndIf} $0 == "" ; and the 1st string being added to $0,
|
||||||
|
StrCpy $0 $7 ; copy it to $0 without a prepended semicolon
|
||||||
|
${ElseIf} $7 != $4 ; If string does NOT match
|
||||||
|
${AndIf} $0 != "" ; and this is NOT the 1st string to be added to $0,
|
||||||
|
StrCpy $0 $0;$7 ; append path to $0 with a prepended semicolon
|
||||||
|
${EndIf} ;
|
||||||
|
|
||||||
|
IntOp $8 $8 + 1 ; Bump counter
|
||||||
|
${Loop} ; Check for duplicates until we run out of paths
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
; Step 4: Perform the requested Action
|
||||||
|
;
|
||||||
|
${If} $2 != "R" ; If Append or Prepend
|
||||||
|
${If} $6 == 1 ; And if we found the target
|
||||||
|
DetailPrint "Target is already present in $1. It will be removed and"
|
||||||
|
${EndIf}
|
||||||
|
${If} $0 == "" ; If EnvVar is (now) empty
|
||||||
|
StrCpy $0 $4 ; just copy PathString to EnvVar
|
||||||
|
${If} $6 == 0 ; If found flag is either 0
|
||||||
|
${OrIf} $6 == "" ; or blank (if EnvVarName is empty)
|
||||||
|
DetailPrint "$1 was empty and has been updated with the target"
|
||||||
|
${EndIf}
|
||||||
|
${ElseIf} $2 == "A" ; If Append (and EnvVar is not empty),
|
||||||
|
StrCpy $0 $0;$4 ; append PathString
|
||||||
|
${If} $6 == 1
|
||||||
|
DetailPrint "appended to $1"
|
||||||
|
${Else}
|
||||||
|
DetailPrint "Target was appended to $1"
|
||||||
|
${EndIf}
|
||||||
|
${Else} ; If Prepend (and EnvVar is not empty),
|
||||||
|
StrCpy $0 $4;$0 ; prepend PathString
|
||||||
|
${If} $6 == 1
|
||||||
|
DetailPrint "prepended to $1"
|
||||||
|
${Else}
|
||||||
|
DetailPrint "Target was prepended to $1"
|
||||||
|
${EndIf}
|
||||||
|
${EndIf}
|
||||||
|
${Else} ; If Action = Remove
|
||||||
|
${If} $6 == 1 ; and we found the target
|
||||||
|
DetailPrint "Target was found and removed from $1"
|
||||||
|
${Else}
|
||||||
|
DetailPrint "Target was NOT found in $1 (nothing to remove)"
|
||||||
|
${EndIf}
|
||||||
|
${If} $0 == ""
|
||||||
|
DetailPrint "$1 is now empty"
|
||||||
|
${EndIf}
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
; Step 5: Update the registry at RegLoc with the updated EnvVar and announce the change
|
||||||
|
;
|
||||||
|
ClearErrors
|
||||||
|
${If} $3 == HKLM
|
||||||
|
WriteRegExpandStr ${hklm_all_users} $1 $0 ; Write it in all users section
|
||||||
|
${ElseIf} $3 == HKCU
|
||||||
|
WriteRegExpandStr ${hkcu_current_user} $1 $0 ; Write it to current user section
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
IfErrors 0 +4
|
||||||
|
MessageBox MB_OK|MB_ICONEXCLAMATION "Could not write updated $1 to $3"
|
||||||
|
DetailPrint "Could not write updated $1 to $3"
|
||||||
|
Goto EnvVarUpdate_Restore_Vars
|
||||||
|
|
||||||
|
; "Export" our change
|
||||||
|
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
|
||||||
|
|
||||||
|
EnvVarUpdate_Restore_Vars:
|
||||||
|
;
|
||||||
|
; Restore the user's variables and return ResultVar
|
||||||
|
Pop $R0
|
||||||
|
Pop $9
|
||||||
|
Pop $8
|
||||||
|
Pop $7
|
||||||
|
Pop $6
|
||||||
|
Pop $5
|
||||||
|
Pop $4
|
||||||
|
Pop $3
|
||||||
|
Pop $2
|
||||||
|
Pop $1
|
||||||
|
Push $0 ; Push my $0 (ResultVar)
|
||||||
|
Exch
|
||||||
|
Pop $0 ; Restore his $0
|
||||||
|
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
!macroend ; EnvVarUpdate UN
|
||||||
|
!insertmacro EnvVarUpdate ""
|
||||||
|
!insertmacro EnvVarUpdate "un."
|
||||||
|
;----------------------------------- EnvVarUpdate end----------------------------------------
|
||||||
|
|
||||||
|
!verbose pop
|
||||||
|
!endif
|
417
release/installers/win32/Include/zipdll.nsh
Normal file
417
release/installers/win32/Include/zipdll.nsh
Normal file
@ -0,0 +1,417 @@
|
|||||||
|
;ZipDLL include file for NSIS
|
||||||
|
;Written by Tim Kosse (mailto:tim.kosse@gmx.de)
|
||||||
|
;some improvements by deguix
|
||||||
|
|
||||||
|
;Supported languages with their translators in alphabetical order:
|
||||||
|
|
||||||
|
;Arabic translation by asdfuae
|
||||||
|
;Brazilian Portuguese translation by "deguix"
|
||||||
|
;Chinese, Simplified translation by Kii Ali <kiiali@cpatch.org>
|
||||||
|
;Chinese, Traditional traslation by "matini" and Kii Ali <kiiali@cpatch.org>
|
||||||
|
;Croatian translation by "iostriz"
|
||||||
|
;Danish translation by Claus Futtrup
|
||||||
|
;French translation by "veekee"
|
||||||
|
;German translation by Tim Kosse
|
||||||
|
;Hungarian translation by Toth Laszlo
|
||||||
|
;Korean translation by Seongab Kim
|
||||||
|
;Lithuanian translation by Vytautas Krivickas
|
||||||
|
;Polish translation by Krzysztof Galuszka
|
||||||
|
;Russion translation by Sergey
|
||||||
|
;Spanish translation by "dark_boy"
|
||||||
|
|
||||||
|
!ifndef ZIPDLL_USED
|
||||||
|
|
||||||
|
!define ZIPDLL_USED
|
||||||
|
|
||||||
|
!macro ZIPDLL_EXTRACT SOURCE DESTINATION FILE
|
||||||
|
|
||||||
|
!define "FILE_${FILE}"
|
||||||
|
|
||||||
|
!ifndef FILE_<ALL>
|
||||||
|
Push "${FILE}"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
IfFileExists "${DESTINATION}" +2
|
||||||
|
CreateDirectory "${DESTINATION}"
|
||||||
|
|
||||||
|
Push "${DESTINATION}"
|
||||||
|
|
||||||
|
IfFileExists "${SOURCE}" +2
|
||||||
|
SetErrors
|
||||||
|
|
||||||
|
Push "${SOURCE}"
|
||||||
|
|
||||||
|
;The strings that will be translated are (ready to copy,
|
||||||
|
;remove leading semicolons in your language block):
|
||||||
|
|
||||||
|
!ifdef LANG_ENGLISH
|
||||||
|
|
||||||
|
;English is default language of ZipDLL, no need to push the untranslated strings
|
||||||
|
|
||||||
|
;StrCmp $LANGUAGE ${LANG_ENGLISH} 0 +1
|
||||||
|
|
||||||
|
;Push " Error: %s"
|
||||||
|
;Push "Could not get file attributes."
|
||||||
|
;Push "Error: Could not get file attributes."
|
||||||
|
;Push "Could not extract %s"
|
||||||
|
;Push " Error: Could not extract %s"
|
||||||
|
|
||||||
|
;!ifdef FILE_<ALL>
|
||||||
|
;Push " Extract: %s"
|
||||||
|
;Push " Extracting %d files and directories"
|
||||||
|
;Push "Extracting contents of %s to %s"
|
||||||
|
;!else
|
||||||
|
;Push "Specified file does not exist in archive."
|
||||||
|
;Push "Error: Specified file does not exist in archive."
|
||||||
|
;Push "Extracting the file %s from %s to %s"
|
||||||
|
;!endif
|
||||||
|
|
||||||
|
;Push "/TRANSLATE"
|
||||||
|
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef LANG_HUNGARIAN
|
||||||
|
|
||||||
|
StrCmp $LANGUAGE ${LANG_HUNGARIAN} 0 +10
|
||||||
|
|
||||||
|
Push " Hiba: %s"
|
||||||
|
Push "Nem olvasható a fájl attribútumai."
|
||||||
|
Push "Hiba: Nem olvasható a fájl attribútumai."
|
||||||
|
Push "Nem sikerült kicsomagolni a(z) %s"
|
||||||
|
Push " Hiba: Nem sikerült kicsomagolni a(z) %s"
|
||||||
|
|
||||||
|
!ifdef FILE_<ALL>
|
||||||
|
Push " Kicsomagolás: %s"
|
||||||
|
Push " %d fájl és mappa kicsomagolása"
|
||||||
|
Push "%s tartalom kicsomagolása a %s helyre"
|
||||||
|
!else
|
||||||
|
Push "A megadott fájl nem található az arhívumban."
|
||||||
|
Push "Hiba: A megadott fájl nem található az arhívumban."
|
||||||
|
Push "%s fájl kcsomagolása a(z) %s fájlból a %s helyre"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
Push "/TRANSLATE"
|
||||||
|
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef LANG_FRENCH
|
||||||
|
|
||||||
|
StrCmp $LANGUAGE ${LANG_FRENCH} 0 +10
|
||||||
|
|
||||||
|
Push " Erreur : %s"
|
||||||
|
Push "Impossible de récupérer les informations sur le fichier."
|
||||||
|
Push "Erreur : Impossible de récupérer les informations sur le fichier."
|
||||||
|
Push "Impossible de décompresser %s."
|
||||||
|
Push " Erreur : Impossible de décompresser %s."
|
||||||
|
|
||||||
|
!ifdef FILE_<ALL>
|
||||||
|
Push " Décompression : %s"
|
||||||
|
Push " Décompression de %d fichiers et répertoires"
|
||||||
|
Push "Décompression des données de %s vers %s"
|
||||||
|
!else
|
||||||
|
Push "Le fichier spécifié n'existe pas dans l'archive"
|
||||||
|
Push "Erreur : Le fichier spécifié n'existe pas dans l'archive"
|
||||||
|
Push "Décompression du fichier %s depuis %s vers %s"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
Push "/TRANSLATE"
|
||||||
|
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef LANG_GERMAN
|
||||||
|
|
||||||
|
StrCmp $LANGUAGE ${LANG_GERMAN} 0 +10
|
||||||
|
|
||||||
|
Push " Fehler: %s"
|
||||||
|
Push "Dateiattribute konnten nicht ermittelt werden."
|
||||||
|
Push "Fehler: Dateiattribute konnten nicht ermittelt werden."
|
||||||
|
Push "%s konnte nicht dekomprimiert werden."
|
||||||
|
Push " Fehler: %s konnte nicht dekomprimiert werden."
|
||||||
|
|
||||||
|
!ifdef FILE_<ALL>
|
||||||
|
Push " Dekomprimiere: %s"
|
||||||
|
Push " Dekomprimiere %d Dateien und Verzeichnisse"
|
||||||
|
Push "Dekomprimiere Inhalt von %s nach %s"
|
||||||
|
!else
|
||||||
|
Push "Die angegebene Datei existiert nicht im Archiv"
|
||||||
|
Push "Fehler: Die angegebene Datei existiert nicht im Archiv"
|
||||||
|
Push "Dekomprimiere Datei %s von %s nach %s"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
Push "/TRANSLATE"
|
||||||
|
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef LANG_SPANISH
|
||||||
|
|
||||||
|
StrCmp $LANGUAGE ${LANG_SPANISH} 0 +10
|
||||||
|
|
||||||
|
Push " Error: %s"
|
||||||
|
Push "No se obtuvieron atributos del archivo"
|
||||||
|
Push "Error: No se obtuvieron atributos del archivo"
|
||||||
|
Push "No se pudo extraer %s"
|
||||||
|
Push " Error: No se pudo extraer %s"
|
||||||
|
|
||||||
|
!ifdef FILE_<ALL>
|
||||||
|
Push " Extraer: %s"
|
||||||
|
Push " Extrayendo %d archivos y directorios"
|
||||||
|
Push "Extraer archivos de %s a %s"
|
||||||
|
!else
|
||||||
|
Push "Archivo especificado no existe en el ZIP"
|
||||||
|
Push "Error: El archivo especificado no existe en el ZIP"
|
||||||
|
Push "Extrayendo el archivo %s de %s a %s"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
Push "/TRANSLATE"
|
||||||
|
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef LANG_PORTUGUESEBR
|
||||||
|
|
||||||
|
StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} 0 +10
|
||||||
|
|
||||||
|
Push " Erro: %s"
|
||||||
|
Push "Não se pode ler os atributos do arquivo"
|
||||||
|
Push "Error: Não se pode ler os atributos do arquivo"
|
||||||
|
Push "Não se pode extrair %s"
|
||||||
|
Push " Erro: Não se pode extrair %s"
|
||||||
|
|
||||||
|
!ifdef FILE_<ALL>
|
||||||
|
Push " Extraindo: %s"
|
||||||
|
Push " Extraindo %d arquivos e diretórios"
|
||||||
|
Push "Extraindo arquivos de %s a %s"
|
||||||
|
!else
|
||||||
|
Push "O arquivo especificado não existe no ZIP"
|
||||||
|
Push "Erro: O arquivo especificado não existe no ZIP"
|
||||||
|
Push "Extraindo o arquivo %s de %s a %s"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
Push "/TRANSLATE"
|
||||||
|
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef LANG_TRADCHINESE
|
||||||
|
|
||||||
|
StrCmp $LANGUAGE ${LANG_TRADCHINESE} 0 +11
|
||||||
|
|
||||||
|
Push " ¿ù»~: %s"
|
||||||
|
Push "µLªk¨ú±oÀÉ®×ÄÝ©Ê¡C"
|
||||||
|
Push "¿ù»~: µLªk¨ú±oÀÉ®×ÄÝ©Ê¡C"
|
||||||
|
Push "µLªk¸ÑÀ£ÁY %s"
|
||||||
|
Push " ¿ù»~¡GµLªk¸ÑÀ£ÁY %s"
|
||||||
|
|
||||||
|
!ifdef FILE_<ALL>
|
||||||
|
Push " ¸ÑÀ£ÁY¡G%s"
|
||||||
|
Push " ¥¿¦b¸ÑÀ£ÁY %d ÀÉ®×»P¥Ø¿ý"
|
||||||
|
Push "¥¿¦b¸ÑÀ£ÁY %s ªº¤º®e¨ì %s"
|
||||||
|
!else
|
||||||
|
Push "«ü©wªºÀɮר䣦s¦b©óÀ£ÁY¥]¡C"
|
||||||
|
Push "¿ù»~¡G«ü©wªºÀɮר䣦s¦b©óÀ£ÁY¥]¡C"
|
||||||
|
Push "¥¿¦b¸ÑÀ£ÁYÀÉ®× %s ¡A±q %s ¨ì %s"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
Push "/TRANSLATE"
|
||||||
|
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef LANG_SIMPCHINESE
|
||||||
|
|
||||||
|
StrCmp $LANGUAGE ${LANG_SIMPCHINESE} 0 +11
|
||||||
|
|
||||||
|
Push " ´íÎó: %s"
|
||||||
|
Push "ÎÞ·¨È¡µÃÎļþÊôÐÔ¡£"
|
||||||
|
Push "´íÎó: ÎÞ·¨È¡µÃÎļþÊôÐÔ¡£"
|
||||||
|
Push "ÎÞ·¨½âѹËõ %s"
|
||||||
|
Push " ´íÎó£ºÎÞ·¨½âѹËõ %s"
|
||||||
|
|
||||||
|
!ifdef FILE_<ALL>
|
||||||
|
Push " ½âѹËõ£º%s"
|
||||||
|
Push " ÕýÔÚ½âѹËõ %d ÎļþÓëĿ¼"
|
||||||
|
Push "ÕýÔÚ½âѹËõ %s µÄÄÚÈݵ½ %s"
|
||||||
|
!else
|
||||||
|
Push "Ö¸¶¨µÄÎļþ²¢²»´æÔÚÓÚѹËõ°ü¡£"
|
||||||
|
Push "´íÎó£ºÖ¸¶¨µÄÎļþ²¢²»´æÔÚÓÚѹËõ°ü¡£"
|
||||||
|
Push "ÕýÔÚ½âѹËõÎļþ %s £¬´Ó %s µ½ %s"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
Push "/TRANSLATE"
|
||||||
|
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef LANG_LITHUANIAN
|
||||||
|
|
||||||
|
StrCmp $LANGUAGE ${LANG_LITHUANIAN} 0 +10
|
||||||
|
|
||||||
|
Push " Klaida: %s"
|
||||||
|
Push "Negaleta gauti bylos nuorodu."
|
||||||
|
Push "Klaida: Negaleta gauti bylos nuorodu."
|
||||||
|
Push "Negaleta ištraukti %s"
|
||||||
|
Push " Klaida: Negaleta ištraukti %s"
|
||||||
|
|
||||||
|
!ifdef FILE_<ALL>
|
||||||
|
Push " Ištraukiam : %s"
|
||||||
|
Push " Ištraukiame %d bylas ir katalogus"
|
||||||
|
Push "Ištraukiame viska is %s i %s"
|
||||||
|
!else
|
||||||
|
Push "Parinkta byla nesurasta šiame archyve."
|
||||||
|
Push "Klaida: Parinkta byla nesurasta šiame archyve."
|
||||||
|
Push "Ištraukiame byla %s iš %s i %s"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
Push "/TRANSLATE"
|
||||||
|
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef "LANG_POLISH"
|
||||||
|
|
||||||
|
strcmp $LANGUAGE ${LANG_POLISH} 0 +10
|
||||||
|
|
||||||
|
Push " B³¹d: %s"
|
||||||
|
Push "Nie mo¿e pobraæ atrybutu pliku."
|
||||||
|
Push "B³¹d: Nie mo¿e pobraæ atrybutu pliku."
|
||||||
|
Push "Nie mo¿e rozpakowaæ %s."
|
||||||
|
Push " B³¹d: Nie mo¿e rozpakowaæ %s."
|
||||||
|
|
||||||
|
!ifdef FILE_<ALL>
|
||||||
|
Push " Rozpakuj: %s"
|
||||||
|
Push " Rozpakowywanie %d plików i katalogów"
|
||||||
|
Push "Rozpakowywanie zawartoœci %s do %s"
|
||||||
|
!else
|
||||||
|
Push "Plik nie istnieje w archiwum"
|
||||||
|
Push "B³¹d: Plik nie istnieje w archiwum"
|
||||||
|
Push "Rozpakowywanie pliku %s z %s do %s"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
Push "/TRANSLATE"
|
||||||
|
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef "LANG_KOREAN"
|
||||||
|
strcmp $LANGUAGE ${LANG_KOREAN} 0 +10
|
||||||
|
Push " ¿À·ù : %s"
|
||||||
|
Push "ÈÀÏ ¼Ó¼ºÀ» ¾ò¾î¿Ã ¼ö ¾ø½À´Ï´Ù."
|
||||||
|
Push "¿À·ù: ÈÀÏ ¼Ó¼ºÀ» ¾ò¾î¿Ã ¼ö ¾ø½À´Ï´Ù."
|
||||||
|
Push "%sÀ»(¸¦) Ç® ¼ö ¾ø½À´Ï´Ù."
|
||||||
|
Push " ¿À·ù: %sÀ»(¸¦) Ç® ¼ö ¾ø½À´Ï´Ù."
|
||||||
|
|
||||||
|
!ifdef FILE_<ALL>
|
||||||
|
Push " Ç®±â : %s"
|
||||||
|
Push " %d°³ÀÇ ÆÄÀÏ°ú Æú´õ¸¦ Ǫ´Â Áß"
|
||||||
|
Push "%sÀÇ ³»¿ëÀ» %s¿¡ Ǫ´Â Áß"
|
||||||
|
!else
|
||||||
|
Push "ÁöÁ¤µÈ ÆÄÀÏÀÌ ¾ÐÃà ÆÄÀÏ ¾È¿¡ ¾ø½À´Ï´Ù."
|
||||||
|
Push "¿À·ù: ÁöÁ¤µÈ ÆÄÀÏÀÌ ¾ÐÃà ÆÄÀÏ ¾È¿¡ ¾ø½À´Ï´Ù."
|
||||||
|
Push "%s ÆÄÀÏÀ» %s¿¡¼ %s·Î Ǫ´Â Áß"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
Push "/TRANSLATE"
|
||||||
|
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef "LANG_RUSSIAN"
|
||||||
|
|
||||||
|
strcmp $LANGUAGE ${LANG_RUSSIAN} 0 +10
|
||||||
|
|
||||||
|
Push " Îøèáêà: %s"
|
||||||
|
Push "Íå ìîãó ïîëó÷èòü àòðèáóòû ôàéëà."
|
||||||
|
Push "Îøèáêà: Íå ìîãó ïîëó÷èòü àòðèáóòû ôàéëà."
|
||||||
|
Push "Íå ìîãó èçâëå÷ü %s"
|
||||||
|
Push " Îøèáêà: Íå ìîãó èçâëå÷ü %s"
|
||||||
|
|
||||||
|
!ifdef LANG_<ALL>
|
||||||
|
Push " Èçâëåêàþ : %s"
|
||||||
|
Push " Èçâëå÷åíèå %d ôàéëîâ è ïàïîê"
|
||||||
|
Push "Ñïèñîê èçâëåêàåìûõ ôàéëîâ èç %s â %s"
|
||||||
|
!else
|
||||||
|
Push "Èçâëåêàåìûé ôàéë íå îáíàðóæåí â àðõèâå."
|
||||||
|
Push "Îøèáêà: SÈçâëåêàåìûé ôàéë íå îáíàðóæåí â àðõèâå."
|
||||||
|
Push "Èçâëå÷åíèå ôàéëà %s èç %s â %s"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
Push "/TRANSLATE"
|
||||||
|
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef LANG_ARABIC
|
||||||
|
|
||||||
|
StrCmp $LANGUAGE ${LANG_ARABIC} 0 +10
|
||||||
|
|
||||||
|
Push " ÎØÇÁ: %s"
|
||||||
|
Push "áã íÍÕá Úáì ÎÕÇÆÕ ÇáãáÝ."
|
||||||
|
Push "ÎØÇÁ: áã íÍÕá Úáì ÎÕÇÆÕ ÇáãáÝ."
|
||||||
|
Push "áÇ íãßä ÇÓÊÎÑÇÌ %s"
|
||||||
|
Push " ÎØÇÁ: áÇ íãßä ÇÓÊÎÑÇÌ %s"
|
||||||
|
|
||||||
|
!ifdef FILE_<ALL>
|
||||||
|
Push " ÇÓÊÎÑÇÌ : %s"
|
||||||
|
Push " ÇÓÊÎÑÇÌ ãÌáÏÇÊ æ ãáÝÇÊ %d"
|
||||||
|
Push "ÇÓÊÎÑÇÌ ãÍÊæíÇÊ %s Åáì %s"
|
||||||
|
!else
|
||||||
|
Push "ÇáãáÝ ÛíÑ ãæÌæÏ Ýí ÇáÓÌá."
|
||||||
|
Push "ÎØÇÁ: ÇáãáÝ ÛíÑ ãæÌæÏ Ýí ÇáÓÌá."
|
||||||
|
Push "ÇÓÊÎÑÇÌ ÇáãáÝ %s ãä %s Åáì %s"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
Push "/TRANSLATE"
|
||||||
|
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef LANG_DANISH
|
||||||
|
|
||||||
|
StrCmp $LANGUAGE ${LANG_DANISH} 0 +10
|
||||||
|
|
||||||
|
Push " Fejl: %s"
|
||||||
|
Push "Kunne ikke læse fil attributter."
|
||||||
|
Push "Fejl: Kunne ikke læse fil attributter."
|
||||||
|
Push "Kunne ikke udpakke %s"
|
||||||
|
Push " Fejl: Kunne ikke udpakke %s"
|
||||||
|
|
||||||
|
!ifdef FILE_<ALL>
|
||||||
|
Push " Udpakker: %s"
|
||||||
|
Push " Udpakker %d filer og mapper"
|
||||||
|
Push "Udpakker indhold fra %s til %s"
|
||||||
|
!else
|
||||||
|
Push "Specificeret fil eksisterer ikke i filarkivet"
|
||||||
|
Push "Fejl: Specificeret fil eksisterer ikke i filarkivet"
|
||||||
|
Push "Udpakker fil %s fra %s til %s"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
Push "/TRANSLATE"
|
||||||
|
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef LANG_CROATIAN
|
||||||
|
|
||||||
|
StrCmp $LANGUAGE ${LANG_CROATIAN} 0 +10
|
||||||
|
|
||||||
|
Push " Greška: %s"
|
||||||
|
Push "Ne mogu dohvatiti atribute datoteke."
|
||||||
|
Push "Greška: Ne mogu dohvatiti atribute datoteke."
|
||||||
|
Push "Ne mogu ekstrahirati %s"
|
||||||
|
Push " Greška: Ne mogu ekstrahirati %s"
|
||||||
|
|
||||||
|
!ifdef FILE_<ALL>
|
||||||
|
Push " Ekstrakcija: %s"
|
||||||
|
Push " Ekstrakcija %d datoteka i mapa"
|
||||||
|
Push "Ekstrakcija sadržaja %s u %s"
|
||||||
|
!else
|
||||||
|
Push "Tražena datoteka ne postoji u arhivi."
|
||||||
|
Push "Greška: Tražena datoteka ne postoji u arhivi."
|
||||||
|
Push "Ekstrakcija datoteke %s iz %s u %s"
|
||||||
|
!endif
|
||||||
|
|
||||||
|
Push "/TRANSLATE"
|
||||||
|
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef FILE_<ALL>
|
||||||
|
ZipDLL::extractall
|
||||||
|
!else
|
||||||
|
ZipDLL::extractfile
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!undef "FILE_${FILE}"
|
||||||
|
|
||||||
|
!macroend
|
||||||
|
|
||||||
|
!endif
|
21
release/installers/win32/License.txt
Normal file
21
release/installers/win32/License.txt
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
The MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2014 Resin.io, Inc. https://resin.io
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
BIN
release/installers/win32/Plugins/ZipDLL.dll
Normal file
BIN
release/installers/win32/Plugins/ZipDLL.dll
Normal file
Binary file not shown.
BIN
release/installers/win32/banner.bmp
Normal file
BIN
release/installers/win32/banner.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 201 KiB |
BIN
release/installers/win32/logo.ico
Normal file
BIN
release/installers/win32/logo.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
44
release/installers/win32/resin-cli.nsi
Normal file
44
release/installers/win32/resin-cli.nsi
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
!addincludedir "Include"
|
||||||
|
!addplugindir "Plugins"
|
||||||
|
|
||||||
|
!include "MUI2.nsh"
|
||||||
|
!include "EnvVarUpdate.nsh"
|
||||||
|
!include "zipdll.nsh"
|
||||||
|
|
||||||
|
Name "Resin CLI"
|
||||||
|
OutFile "..\..\build\distrib\setup-resin-cli.exe"
|
||||||
|
BrandingText "Resin.io"
|
||||||
|
|
||||||
|
InstallDir "$PROGRAMFILES\Resin.io\resin-cli"
|
||||||
|
|
||||||
|
; MUI settings
|
||||||
|
!define MUI_ICON "logo.ico"
|
||||||
|
!define MUI_UNICON "logo.ico"
|
||||||
|
!define MUI_WELCOMEFINISHPAGE_BITMAP "banner.bmp"
|
||||||
|
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "banner.bmp"
|
||||||
|
|
||||||
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
|
!insertmacro MUI_PAGE_LICENSE "License.txt"
|
||||||
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
|
!insertmacro MUI_PAGE_FINISH
|
||||||
|
|
||||||
|
!insertmacro MUI_UNPAGE_CONFIRM
|
||||||
|
!insertmacro MUI_UNPAGE_INSTFILES
|
||||||
|
!insertmacro MUI_UNPAGE_FINISH
|
||||||
|
|
||||||
|
!insertmacro MUI_LANGUAGE "English"
|
||||||
|
|
||||||
|
Section "Install"
|
||||||
|
SetOutPath $INSTDIR
|
||||||
|
File "..\..\build\distrib\resin-cli-0.0.1-win32.zip"
|
||||||
|
!insertmacro ZIPDLL_EXTRACT "$INSTDIR\resin-cli-0.0.1-win32.zip" "$INSTDIR" "<ALL>"
|
||||||
|
Delete "$INSTDIR\resin-cli-0.0.1-win32.zip"
|
||||||
|
${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\resin-cli-0.0.1-win32\bin"
|
||||||
|
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "Uninstall"
|
||||||
|
RMDir /r "$INSTDIR"
|
||||||
|
${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR\resin-cli-0.0.1-win32\bin"
|
||||||
|
SectionEnd
|
@ -8,6 +8,7 @@ function parse_json() {
|
|||||||
PACKAGE_JSON=`cat package.json`
|
PACKAGE_JSON=`cat package.json`
|
||||||
VERSION=$(parse_json "$PACKAGE_JSON" version)
|
VERSION=$(parse_json "$PACKAGE_JSON" version)
|
||||||
NAME=$(parse_json "$PACKAGE_JSON" name)
|
NAME=$(parse_json "$PACKAGE_JSON" name)
|
||||||
|
OUTPUT=release/build
|
||||||
|
|
||||||
if [ -z flatten-packages ]; then
|
if [ -z flatten-packages ]; then
|
||||||
echo "Missing flatten-packages npm module."
|
echo "Missing flatten-packages npm module."
|
||||||
@ -32,19 +33,19 @@ function distribute() {
|
|||||||
print_banner "Copying necessary files"
|
print_banner "Copying necessary files"
|
||||||
|
|
||||||
# Copy all needed files
|
# Copy all needed files
|
||||||
mkdir -p release/$package
|
mkdir -p $OUTPUT/$package
|
||||||
|
|
||||||
cp -rf bin release/$package
|
cp -rf bin $OUTPUT/$package
|
||||||
|
|
||||||
# TODO: Omit bin/node in a better way
|
# TODO: Omit bin/node in a better way
|
||||||
rm -rf release/$package/bin/node
|
rm -rf $OUTPUT/$package/bin/node
|
||||||
|
|
||||||
cp -rf build release/$package
|
cp -rf build $OUTPUT/$package
|
||||||
cp -rf package.json release/$package
|
cp -rf package.json $OUTPUT/$package
|
||||||
|
|
||||||
print_banner "Running npm install"
|
print_banner "Running npm install"
|
||||||
|
|
||||||
cd release/$package
|
cd $OUTPUT/$package
|
||||||
|
|
||||||
RESIN_BUNDLE=$os npm install --production --force
|
RESIN_BUNDLE=$os npm install --production --force
|
||||||
flatten-packages .
|
flatten-packages .
|
||||||
@ -70,4 +71,4 @@ function distribute() {
|
|||||||
distribute "win32"
|
distribute "win32"
|
||||||
# distribute "sunos"
|
# distribute "sunos"
|
||||||
|
|
||||||
tree release/distrib
|
tree $OUTPUT/distrib
|
||||||
|
Loading…
x
Reference in New Issue
Block a user