Prerape Windows installer.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-10-14 13:06:50 +03:00
parent c7544057ed
commit f0d87ef440
5 changed files with 292 additions and 54 deletions

BIN
dist/win/measurements.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
dist/win/nsis/unList.exe vendored Normal file

Binary file not shown.

219
dist/win/nsis/unList.nsi vendored Normal file
View File

@ -0,0 +1,219 @@
;-----------------------------------------------------------------------------------------------
; Generate list of files and directories for uninstaller with command line support (/? for help)
;
; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
;-----------------------------------------------------------------------------------------------
; - added file filter as command option
; 2005 Patrick Graf (patrick.graf@gmx.net)
;-----------------------------------------------------------------------------------------------
; - combine unList and unListDate to one script
; 2005 Matei "Ambient.Impact" Stanca (ambient.impact@rogers.com)
;-----------------------------------------------------------------------------------------------
Name "unList v1.5"
OutFile "unList.exe"
Caption "$(^Name)"
SubCaption 2 " "
SubCaption 3 " "
!include "FileFunc.nsh"
!insertmacro GetTime
!insertmacro GetParameters
!insertmacro GetOptions
!insertmacro GetExePath
!include "TextFunc.nsh"
!insertmacro FileReadFromEnd
!insertmacro FileJoin
!insertmacro TrimNewLines
!include "Sections.nsh"
Var DATE
Var FILEFILTER
Var LOG
Var PREFIX
Var UNDIR_VAR
Var MB
Var RADIOBUTTON
DirText '$\nSetup will generate list of files and directories for uninstaller.'\
'Source Folder'
Page directory
Page components
Page instfiles
Section "unList" unList
StrCpy $DATE '0'
call main
SectionEnd
Section /o "unListDate" unListDate
StrCpy $DATE '1'
call main
SectionEnd
Function .onSelChange
!insertmacro StartRadioButtons $RADIOBUTTON
!insertmacro RadioButton ${unList}
!insertmacro RadioButton ${unListDate}
!insertmacro EndRadioButtons
FunctionEnd
Function .onInit
StrCpy $RADIOBUTTON ${unList}
${GetExePath} $EXEDIR
${GetParameters} $R0
StrCmp $R0 '/?' +2
StrCmp $R0 '-?' 0 GetOptions
MessageBox MB_OK \
`| Command line options:$\n\
| $\n\
| /DATE=[0|1] Only files not modified after installation are deleted$\n\
| default: 0$\n\
| /INSTDIR=[path] Get file list from this path$\n\
| default: [exe directory]$\n\
| /FILTER=[*.*] Only files matching the given filter are added$\n\
| default: *.*$\n\
| /LOG=[file] Ouput file list$\n\
| default: unList.txt$\n\
| /PREFIX=[text] Insert text (spaces) at the beginning$\n\
| default: empty$\n\
| /UNDIR_VAR=[$$var] Uninstall directory variable$\n\
| default: $$INSTDIR$\n\
| /MB=[1|0] Show or not MessageBoxes$\n\
| default: 1$\n\
$\n\
$\n\
Example:$\n\
unList.exe /DATE=1 /INSTDIR=C:\a /LOG=C:\a.log /PREFIX=" " /UNDIR_VAR=$$R0`
quit
GetOptions:
${GetOptions} '$R0' '/DATE=' $R1
StrCmp $R1 '' 0 +3
StrCpy $DATE '0'
Goto +2
StrCpy $DATE $R1
${GetOptions} '$R0' '/INSTDIR=' $R1
StrCmp $R1 '' 0 +3
StrCpy $INSTDIR '$EXEDIR'
goto +2
StrCpy $INSTDIR $R1
${GetOptions} '$R0' '/FILTER=' $R1
StrCmp $R1 '' 0 +3
StrCpy $FILEFILTER '*.*'
goto +2
StrCpy $FILEFILTER $R1
${GetOptions} '$R0' '/LOG=' $R1
StrCmp $R1 '' 0 +3
StrCpy $LOG 'unList.txt'
goto +2
StrCpy $LOG $R1
${GetOptions} '$R0' '/PREFIX=' $R1
StrCmp $R1 '' 0 +3
StrCpy $PREFIX ''
goto +2
StrCpy $PREFIX $R1
${GetOptions} '$R0' '/UNDIR_VAR=' $R1
StrCmp $R1 '' 0 +3
StrCpy $UNDIR_VAR '$$INSTDIR'
goto +2
StrCpy $UNDIR_VAR $R1
${GetOptions} '$R0' '/MB=' $R1
StrCmp $R1 '' 0 +3
StrCpy $MB '1'
goto +2
StrCpy $MB $R1
StrCmp $R0 '' +2
call main
FunctionEnd
Function main
ClearErrors
SearchPath $INSTDIR $INSTDIR
IfErrors error
StrLen $R5 $INSTDIR
IntOp $R5 $R5 + 1
InitPluginsDir
GetTempFileName $R1 $PLUGINSDIR
GetTempFileName $R2 $PLUGINSDIR
GetTempFileName $R3 $PLUGINSDIR
ExpandEnvStrings $R0 %COMSPEC%
nsExec::Exec '"$R0" /C DIR "$INSTDIR\$FILEFILTER" /A-D /B /S /ON>"$R1"'
FileOpen $R4 $R2 w
${FileReadFromEnd} '$R1' FilesCallback
FileClose $R4
nsExec::Exec '"$R0" /C DIR "$INSTDIR\*.*" /AD /B /S /ON>"$R1"'
FileOpen $R4 $R3 w
${FileReadFromEnd} '$R1' DirectoriesCallback
FileClose $R4
${FileJoin} '$R2' '$R3' '$R2'
Delete '$EXEDIR\$LOG'
Rename $R2 '$EXEDIR\$LOG'
IfErrors 0 success
Delete $LOG
Rename $R2 $LOG
IfErrors 0 success
error:
StrCmp $MB 0 quit
HideWindow
MessageBox MB_OK|MB_ICONEXCLAMATION 'error'
quit
success:
StrCmp $MB 0 quit
HideWindow
MessageBox MB_OK|MB_ICONINFORMATION '"$LOG" was successfully generated'
quit:
quit
FunctionEnd
Function FilesCallback
System::Call 'user32::OemToChar(t r9, t .r9)'
${TrimNewLines} '$9' $9
StrCmp $DATE '0' 0 unListDate
StrCpy $9 $9 '' $R5
FileWrite $R4 `$PREFIXDelete "$UNDIR_VAR\$9"$\r$\n`
goto end
unListDate:
${GetTime} '$9' 'M' $0 $1 $2 $3 $4 $5 $6
StrCpy $3 '$${'
StrCpy $9 $9 '' $R5
FileWrite $R4 `$PREFIX$3un.GetTime} "$UNDIR_VAR\$9" "M" $$0 $$1 $$2 $$3 $$4 $$5 $$6$\r$\n`
FileWrite $R4 `$PREFIXIfErrors +5$\r$\n`
FileWrite $R4 `$PREFIXStrCmp "$$0/$$1/$$2-$$4:$$5:$$6" "$0/$1/$2-$4:$5:$6" 0 +3$\r$\n`
FileWrite $R4 `$PREFIXDelete "$UNDIR_VAR\$9"$\r$\n`
FileWrite $R4 `$PREFIXgoto +2$\r$\n`
FileWrite $R4 `$PREFIXDetailPrint "Not deleted: $UNDIR_VAR\$9"$\r$\n$\r$\n`
end:
Push 0
FunctionEnd
Function DirectoriesCallback
System::Call 'user32::OemToChar(t r9, t .r9)'
${TrimNewLines} '$9' $9
StrCpy $9 $9 '' $R5
FileWrite $R4 `$PREFIXRMDir "$UNDIR_VAR\$9"$\r$\n`
Push 0
FunctionEnd

View File

@ -10,34 +10,40 @@ CRCCheck force
XPStyle on XPStyle on
SetCompressor /FINAL /SOLID lzma SetCompressor /FINAL /SOLID lzma
!define MUI_PRODUCT "Valentina" !insertmacro un.GetTime
!define MUI_FILE "valentina"
!insertmacro GetPEVersionLocal "valentina\valentina.exe" ver !define PACKAGE_FOLDER "valentina"
!define PRODUCT_VALENTINA "Valentina"
!define FILE_VALENTINA "valentina"
!define PRODUCT_TAPE "Tape"
!define FILE_TAPE "tape"
!insertmacro GetPEVersionLocal "${PACKAGE_FOLDER}\${FILE_VALENTINA}.exe" ver
!define MUI_VERSION "${ver_1}.${ver_2}.${ver_3}" !define MUI_VERSION "${ver_1}.${ver_2}.${ver_3}"
!define MUI_BRANDINGTEXT "Valentina ${MUI_VERSION}" !define MUI_BRANDINGTEXT "${PRODUCT_VALENTINA} ${MUI_VERSION}"
!define WEBSITE_LINK "http://www.valentina-project.org/" !define WEBSITE_LINK "http://www.valentina-project.org/"
!define PUBLISHER "Roman Telezhynskyi" !define PUBLISHER "Roman Telezhynskyi"
InstallDir "$LOCALAPPDATA\${MUI_PRODUCT}" ; Default installation folder InstallDir "$LOCALAPPDATA\${PRODUCT_VALENTINA}" ; Default installation folder
Name "${MUI_BRANDINGTEXT}" ; Name displayed on installer Name "${MUI_BRANDINGTEXT}" ; Name displayed on installer
Icon "valentina\${MUI_FILE}.ico" Icon "${PACKAGE_FOLDER}\${FILE_VALENTINA}.ico"
Caption "${MUI_BRANDINGTEXT}" Caption "${MUI_BRANDINGTEXT}"
!define /date MYTIMESTAMP "%Y%m%d%H%M%S" !define /date MYTIMESTAMP "%Y%m%d%H%M%S"
OutFile "${MUI_FILE}_${MUI_VERSION}-${MYTIMESTAMP}_i386.exe" ; Resulting installer filename OutFile "${FILE_VALENTINA}_${MUI_VERSION}-${MYTIMESTAMP}_i386.exe" ; Resulting installer filename
InstallDirRegKey HKCU "$LOCALAPPDATA\${MUI_PRODUCT}" "" ; Get installation folder from registry if available InstallDirRegKey HKCU "$LOCALAPPDATA\${PRODUCT_VALENTINA}" "" ; Get installation folder from registry if available
LicenseData "valentina\LICENSE_GPL.txt" LicenseData "${PACKAGE_FOLDER}\LICENSE_GPL.txt"
RequestExecutionLevel user ; Request application privileges for Windows Vista RequestExecutionLevel user ; Request application privileges for Windows Vista
ShowInstDetails show ShowInstDetails show
ShowUninstDetails show ShowUninstDetails show
; ----------- Icon and Bitmap --------- ; ----------- Icon and Bitmap ---------
!define MUI_ICON "valentina\${MUI_FILE}.ico" !define MUI_ICON "${PACKAGE_FOLDER}\${FILE_VALENTINA}.ico"
!define MUI_UNICON "valentina\${MUI_FILE}.ico" !define MUI_UNICON "${PACKAGE_FOLDER}\${FILE_VALENTINA}.ico"
;!define MUI_SPECIALBITMAP "Bitmap.bmp" ;!define MUI_SPECIALBITMAP "Bitmap.bmp"
; ------------------------------------- ; -------------------------------------
@ -46,23 +52,23 @@ ShowUninstDetails show
;------------- Language Selection Dialog Settings -------------- ;------------- Language Selection Dialog Settings --------------
;Remember the installer language ;Remember the installer language
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU" !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\${MUI_PRODUCT}" !define MUI_LANGDLL_REGISTRY_KEY "Software\${PRODUCT_VALENTINA}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language" !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
!define REG_UNINSTALL "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}" !define REG_UNINSTALL "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_VALENTINA}"
!define REGISTRY_ROOT "HKCU" !define REGISTRY_ROOT "HKCU"
;-------------- Install Pages ------------- ;-------------- Install Pages -------------
!insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "valentina\LICENSE_GPL.txt" !insertmacro MUI_PAGE_LICENSE "${PACKAGE_FOLDER}\LICENSE_GPL.txt"
!insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_INSTFILES
; These indented statements modify settings for MUI_PAGE_FINISH ; These indented statements modify settings for MUI_PAGE_FINISH
!define MUI_FINISHPAGE_NOAUTOCLOSE !define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_FINISHPAGE_RUN "$INSTDIR\${MUI_FILE}.exe" !define MUI_FINISHPAGE_RUN "$INSTDIR\${FILE_VALENTINA}.exe"
!define MUI_FINISHPAGE_RUN_CHECKED !define MUI_FINISHPAGE_RUN_CHECKED
!define MUI_FINISHPAGE_RUN_TEXT "Launch ${MUI_PRODUCT}" !define MUI_FINISHPAGE_RUN_TEXT "Launch ${PRODUCT_VALENTINA}"
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt" !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
!insertmacro MUI_PAGE_FINISH !insertmacro MUI_PAGE_FINISH
@ -147,7 +153,7 @@ Function checkAlreadyInstalled
ReadRegStr $R0 "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "UninstallString" ReadRegStr $R0 "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "UninstallString"
StrCmp $R0 "" done StrCmp $R0 "" done
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \ MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
"${MUI_PRODUCT} is already installed. $\n$\nClick `OK` to remove the \ "${PRODUCT_VALENTINA} is already installed. $\n$\nClick `OK` to remove the \
previous version or `Cancel` to cancel this upgrade." \ previous version or `Cancel` to cancel this upgrade." \
IDOK UnInstall IDOK UnInstall
Abort Abort
@ -186,38 +192,43 @@ Function un.onInit
FunctionEnd FunctionEnd
;-------------- Installer ------------------------- ;-------------- Installer -------------------------
Section "Valentina (required)" Section "${PRODUCT_VALENTINA} (required)"
SectionIn RO ; define mandatory sections SectionIn RO ; define mandatory sections
;Add files ;Add files
SetOutPath "$INSTDIR" ; Set output path to the installation directory. SetOutPath "$INSTDIR" ; Set output path to the installation directory.
File /r "valentina\*.*" File /r "${PACKAGE_FOLDER}\*.*"
;create start-menu items ;create start-menu items
!define START_LINK_DIR "$SMPROGRAMS\${MUI_PRODUCT}" !define START_LINK_DIR "$SMPROGRAMS\${PRODUCT_VALENTINA}"
!define START_LINK_RUN "$SMPROGRAMS\${MUI_PRODUCT}\${MUI_PRODUCT}.lnk" !define START_LINK_RUN "$SMPROGRAMS\${PRODUCT_VALENTINA}\${PRODUCT_VALENTINA}.lnk"
!define START_LINK_UNINSTALLER "$SMPROGRAMS\${MUI_PRODUCT}\Uninstall ${MUI_PRODUCT}.lnk" !define START_LINK_RUN_TAPE "$SMPROGRAMS\${PRODUCT_VALENTINA}\${PRODUCT_TAPE}.lnk"
!define START_LINK_UNINSTALLER "$SMPROGRAMS\${PRODUCT_VALENTINA}\Uninstall ${PRODUCT_VALENTINA}.lnk"
# In your main installer section... # In your main installer section...
SetShellVarContext current SetShellVarContext current
CreateDirectory "${START_LINK_DIR}" CreateDirectory "${START_LINK_DIR}"
CreateShortCut "${START_LINK_RUN}" "$INSTDIR\${MUI_FILE}.exe" CreateShortCut "${START_LINK_RUN}" "$INSTDIR\${FILE_VALENTINA}.exe"
CreateShortCut "${START_LINK_RUN_TAPE}" "$INSTDIR\${FILE_TAPE}.exe"
CreateShortCut "${START_LINK_UNINSTALLER}" "$INSTDIR\Uninstall.exe" CreateShortCut "${START_LINK_UNINSTALLER}" "$INSTDIR\Uninstall.exe"
;create desktop shortcut ;create desktop shortcut
CreateShortCut "$DESKTOP\${MUI_PRODUCT}.lnk" "$INSTDIR\${MUI_FILE}.exe" "" CreateShortCut "$DESKTOP\${PRODUCT_VALENTINA}.lnk" "$INSTDIR\${FILE_VALENTINA}.exe" ""
CreateShortCut "$DESKTOP\${PRODUCT_TAPE}.lnk" "$INSTDIR\${FILE_TAPE}.exe" ""
;write uninstall information to the registry ;write uninstall information to the registry
!define UNINSTALLER_NAME "Uninstall.exe" !define UNINSTALLER_NAME "Uninstall.exe"
; File associations ; File associations
!insertmacro APP_ASSOCIATE "val" "valentina.pattern" "Valentina pattern file" "$INSTDIR\${MUI_FILE}.exe,0" "Open with Valentina" "$\"$INSTDIR\${MUI_FILE}.exe$\" $\"%1$\"" ; Valentina
; Example of association icon with file type !insertmacro APP_ASSOCIATE "val" "valentina.pattern" "${PRODUCT_VALENTINA} pattern file" "$INSTDIR\${FILE_VALENTINA}.exe,0" "Open with ${PRODUCT_VALENTINA}" "$INSTDIR\${FILE_VALENTINA}.exe $\"%1$\""
; !insertmacro APP_ASSOCIATE "osapp" "OSA.osapp" "Plugin Package" "$INSTDIR\PluginIcon.ico" "Open" "$INSTDIR\PluginInstaller.exe $\"%1$\"" ; Tape
!insertmacro APP_ASSOCIATE "vit" "valentina.IndividualMeasurements" "${PRODUCT_VALENTINA} individual measurement file" "$INSTDIR\measurements.ico" "Open with ${PRODUCT_TAPE}" "$INSTDIR\${FILE_TAPE}.exe $\"%1$\""
!insertmacro APP_ASSOCIATE "vst" "valentina.StandardMeasurements" "${PRODUCT_VALENTINA} standard measurement file" "$INSTDIR\measurements.ico" "Open with ${PRODUCT_TAPE}" "$INSTDIR\${FILE_TAPE}.exe $\"%1$\""
!insertmacro UPDATEFILEASSOC !insertmacro UPDATEFILEASSOC
WriteRegStr "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "DisplayName" "${MUI_PRODUCT}" WriteRegStr "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "DisplayName" "${PRODUCT_VALENTINA}"
WriteRegStr "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "DisplayIcon" "$\"$INSTDIR\${MUI_FILE}.exe$\"" WriteRegStr "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "DisplayIcon" "$\"$INSTDIR\${FILE_VALENTINA}.exe$\""
WriteRegStr "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "Publisher" "${PUBLISHER}" WriteRegStr "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "Publisher" "${PUBLISHER}"
WriteRegStr "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "DisplayVersion" "${MUI_VERSION}" WriteRegStr "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "DisplayVersion" "${MUI_VERSION}"
@ -233,7 +244,7 @@ WriteRegStr "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "InstallSource" "$\"$EXEDIR$\"
WriteRegDWord "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "NoModify" 1 WriteRegDWord "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "NoModify" 1
WriteRegDWord "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "NoRepair" 1 WriteRegDWord "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "NoRepair" 1
WriteRegStr "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "UninstallString" "$\"$INSTDIR\${UNINSTALLER_NAME}$\"" WriteRegStr "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "UninstallString" "$\"$INSTDIR\${UNINSTALLER_NAME}$\""
WriteRegStr "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "Comments" "Uninstalls ${MUI_PRODUCT}." WriteRegStr "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "Comments" "Uninstalls ${PRODUCT_VALENTINA}."
WriteUninstaller "$INSTDIR\${UNINSTALLER_NAME}" ; Location of the uninstaller WriteUninstaller "$INSTDIR\${UNINSTALLER_NAME}" ; Location of the uninstaller
@ -242,26 +253,32 @@ SectionEnd
;-------------------------------- ;--------------------------------
;Uninstaller Section ;Uninstaller Section
Section "Uninstall" Section "Uninstall"
;Generate list and include it in script at compile-time
;Delete Files !execute 'unList.exe /DATE=0 /INSTDIR=${PACKAGE_FOLDER} /LOG=Test.log /PREFIX=" " /UNDIR_VAR=$INSTDIR /MB=0'
RMDir /r "$INSTDIR\*.*" ;Log contain commands for removing files
!include "Test.log"
;Remove the installation directory
RMDir "$INSTDIR"
;Delete Start Menu Shortcuts ;Delete Start Menu Shortcuts
SetShellVarContext current SetShellVarContext current
Delete "$DESKTOP\${MUI_PRODUCT}.lnk" Delete "$DESKTOP\${PRODUCT_VALENTINA}.lnk"
Delete "$DESKTOP\${PRODUCT_TAPE}.lnk"
Delete "${START_LINK_DIR}\*.*" Delete "${START_LINK_DIR}\*.*"
RmDir "${START_LINK_DIR}" RmDir "${START_LINK_DIR}"
; Removing file associations ; Removing file associations
!insertmacro APP_UNASSOCIATE "val" "valentina.pattern" !insertmacro APP_UNASSOCIATE "val" "valentina.pattern"
!insertmacro APP_UNASSOCIATE "vit" "valentina.IndividualMeasurements"
!insertmacro APP_UNASSOCIATE "vst" "valentina.StandardMeasurements"
;Delete Uninstaller And Unistall Registry Entries ;Delete Uninstaller And Unistall Registry Entries
DeleteRegKey "${REGISTRY_ROOT}" "SOFTWARE\${MUI_PRODUCT}" DeleteRegKey "${REGISTRY_ROOT}" "SOFTWARE\${PRODUCT_VALENTINA}"
DeleteRegKey "${REGISTRY_ROOT}" "${REG_UNINSTALL}" DeleteRegKey "${REGISTRY_ROOT}" "${REG_UNINSTALL}"
Delete "$INSTDIR\${UNINSTALLER_NAME}"
;Remove the installation directory
RMDir "$INSTDIR"
SectionEnd SectionEnd
;eof ;eof

View File

@ -1851,7 +1851,7 @@ unix{
# "make install" command for Windows. # "make install" command for Windows.
# Depend on nsis script and create installer in folder "package" # Depend on nsis script and create installer in folder "package"
win32:*-g++ { win32:*-g++ {
package.path = $${OUT_PWD}/package/valentina package.path = $${OUT_PWD}/../../../package/valentina
package.files += \ package.files += \
$${OUT_PWD}/$${DESTDIR}/valentina.exe \ $${OUT_PWD}/$${DESTDIR}/valentina.exe \
$${OUT_PWD}/$${DESTDIR}/valentina.exe.dbg \ $${OUT_PWD}/$${DESTDIR}/valentina.exe.dbg \
@ -1891,11 +1891,11 @@ win32:*-g++ {
$$[QT_INSTALL_BINS]/libwinpthread-1.dll $$[QT_INSTALL_BINS]/libwinpthread-1.dll
INSTALLS += package INSTALLS += package
package_tables.path = $${OUT_PWD}/package/valentina/tables/standard package_tables.path = $${OUT_PWD}/../../../package/valentina/tables/standard
package_tables.files += $${OUT_PWD}/$${DESTDIR}/tables/standard/GOST_man_ru.vst package_tables.files += $${OUT_PWD}/$${DESTDIR}/tables/standard/GOST_man_ru.vst
INSTALLS += package_tables INSTALLS += package_tables
package_translations.path = $${OUT_PWD}/package/valentina/translations package_translations.path = $${OUT_PWD}/../../../package/valentina/translations
package_translations.files += \ package_translations.files += \
$$INSTALL_TRANSLATIONS \ # Valentina $$INSTALL_TRANSLATIONS \ # Valentina
$$[QT_INSTALL_TRANSLATIONS]/qt_ar.qm \ $$[QT_INSTALL_TRANSLATIONS]/qt_ar.qm \
@ -1934,17 +1934,17 @@ win32:*-g++ {
$$[QT_INSTALL_TRANSLATIONS]/qtxmlpatterns_sk.qm $$[QT_INSTALL_TRANSLATIONS]/qtxmlpatterns_sk.qm
INSTALLS += package_translations INSTALLS += package_translations
package_bearer.path = $${OUT_PWD}/package/valentina/bearer package_bearer.path = $${OUT_PWD}/../../../package/valentina/bearer
package_bearer.files += \ package_bearer.files += \
$$[QT_INSTALL_PLUGINS]/bearer/qgenericbearer.dll \ $$[QT_INSTALL_PLUGINS]/bearer/qgenericbearer.dll \
$$[QT_INSTALL_PLUGINS]/bearer/qnativewifibearer.dll $$[QT_INSTALL_PLUGINS]/bearer/qnativewifibearer.dll
INSTALLS += package_bearer INSTALLS += package_bearer
package_iconengines.path = $${OUT_PWD}/package/valentina/iconengines package_iconengines.path = $${OUT_PWD}/../../../package/valentina/iconengines
package_iconengines.files += $$[QT_INSTALL_PLUGINS]/iconengines/qsvgicon.dll package_iconengines.files += $$[QT_INSTALL_PLUGINS]/iconengines/qsvgicon.dll
INSTALLS += package_iconengines INSTALLS += package_iconengines
package_imageformats.path = $${OUT_PWD}/package/valentina/imageformats package_imageformats.path = $${OUT_PWD}/../../../package/valentina/imageformats
package_imageformats.files += \ package_imageformats.files += \
$$[QT_INSTALL_PLUGINS]/imageformats/qdds.dll \ $$[QT_INSTALL_PLUGINS]/imageformats/qdds.dll \
$$[QT_INSTALL_PLUGINS]/imageformats/qgif.dll \ $$[QT_INSTALL_PLUGINS]/imageformats/qgif.dll \
@ -1960,19 +1960,21 @@ win32:*-g++ {
$$[QT_INSTALL_PLUGINS]/imageformats/qwebp.dll \ $$[QT_INSTALL_PLUGINS]/imageformats/qwebp.dll \
INSTALLS += package_imageformats INSTALLS += package_imageformats
package_platforms.path = $${OUT_PWD}/package/valentina/platforms package_platforms.path = $${OUT_PWD}/../../../package/valentina/platforms
package_platforms.files += $$[QT_INSTALL_PLUGINS]/platforms/qwindows.dll package_platforms.files += $$[QT_INSTALL_PLUGINS]/platforms/qwindows.dll
INSTALLS += package_platforms INSTALLS += package_platforms
package_printsupport.path = $${OUT_PWD}/package/valentina/printsupport package_printsupport.path = $${OUT_PWD}/../../../package/valentina/printsupport
package_printsupport.files += $$[QT_INSTALL_PLUGINS]/printsupport/windowsprintersupport.dll package_printsupport.files += $$[QT_INSTALL_PLUGINS]/printsupport/windowsprintersupport.dll
INSTALLS += package_printsupport INSTALLS += package_printsupport
package_nsis.path = $${OUT_PWD}/package package_nsis.path = $${OUT_PWD}/../../../package
package_nsis.files += $$PWD/../../dist/win/nsis/valentina.nsi package_nsis.files += \
$$PWD/../../../dist/win/nsis/valentina.nsi \
$$PWD/../../../dist/win/nsis/unList.exe # copy exe instead of creating from nsi
INSTALLS += package_nsis INSTALLS += package_nsis
package_nsis_headers.path = $${OUT_PWD}/package/headers package_nsis_headers.path = $${OUT_PWD}/../../../package/headers
package_nsis_headers.files += \ package_nsis_headers.files += \
$$PWD/../../../dist/win/nsis/headers/fileassoc.nsh \ $$PWD/../../../dist/win/nsis/headers/fileassoc.nsh \
$$PWD/../../../dist/win/nsis/headers/fileversion.nsh $$PWD/../../../dist/win/nsis/headers/fileversion.nsh
@ -1982,8 +1984,8 @@ win32:*-g++ {
# First, mangle all of INSTALLS values. We depend on them. # First, mangle all of INSTALLS values. We depend on them.
unset(MANGLED_INSTALLS) unset(MANGLED_INSTALLS)
for(x, INSTALLS):MANGLED_INSTALLS += install_$${x} for(x, INSTALLS):MANGLED_INSTALLS += install_$${x}
build_package.path = $${OUT_PWD}/package build_package.path = $${OUT_PWD}/../../../package
build_package.commands = \"C:/Program Files/NSIS/makensisw.exe\" \"$${OUT_PWD}/package/valentina.nsi\" build_package.commands = \"C:/Program Files/NSIS/makensisw.exe\" \"$${OUT_PWD}/../../../package/valentina.nsi\"
build_package.depends = $${MANGLED_INSTALLS} build_package.depends = $${MANGLED_INSTALLS}
INSTALLS += build_package INSTALLS += build_package
} }