Changed version to 0.4.0b. Fixed file assosiation on Windows Vista and higher.
--HG-- branch : develop
This commit is contained in:
parent
b02b890486
commit
44edb90967
121
dist/win/nsis/headers/fileassoc.nsh
vendored
121
dist/win/nsis/headers/fileassoc.nsh
vendored
|
@ -1,6 +1,7 @@
|
|||
; fileassoc.nsh
|
||||
; File association helper macros
|
||||
; Written by Saivert
|
||||
; Adaptation for Windows Vista and higher by Roman Telezhynskyi
|
||||
;
|
||||
; Features automatic backup system and UPDATEFILEASSOC macro for
|
||||
; shell change notification.
|
||||
|
@ -10,8 +11,9 @@
|
|||
; the APP_ASSOCIATE macro like this:
|
||||
;
|
||||
; Example:
|
||||
; !insertmacro APP_ASSOCIATE "txt" "myapp.textfile" "Description of txt files" \
|
||||
; "$INSTDIR\myapp.exe,0" "Open with myapp" "$INSTDIR\myapp.exe $\"%1$\""
|
||||
; !insertmacro APP_ASSOCIATE "txt" "myapp.textfile" "text/plain" \
|
||||
; "Description of txt files" "$INSTDIR\myapp.exe,0" "Open with myapp" \
|
||||
; "$INSTDIR\myapp.exe $\"%1$\""
|
||||
;
|
||||
; Never insert the APP_ASSOCIATE macro multiple times, it is only ment
|
||||
; to associate an application with a single file and using the
|
||||
|
@ -19,12 +21,12 @@
|
|||
; use the APP_ASSOCIATE_ADDVERB macro.
|
||||
;
|
||||
; Example:
|
||||
; !insertmacro APP_ASSOCIATE_ADDVERB "myapp.textfile" "edit" "Edit with myapp" \
|
||||
; "$INSTDIR\myapp.exe /edit $\"%1$\""
|
||||
; !insertmacro APP_ASSOCIATE_ADDVERB "myapp.textfile" "edit" "text/plain" \
|
||||
; "Edit with myapp" "$INSTDIR\myapp.exe /edit $\"%1$\""
|
||||
;
|
||||
; To have access to more options when registering the file association use the
|
||||
; APP_ASSOCIATE_EX macro. Here you can specify the verb and what verb is to be the
|
||||
; standard action (default verb).
|
||||
; standard action (default verb).
|
||||
;
|
||||
; And finally: To remove the association from the registry use the APP_UNASSOCIATE
|
||||
; macro. Here is another example just to wrap it up:
|
||||
|
@ -34,69 +36,100 @@
|
|||
; When defining your file class string always use the short form of your application title
|
||||
; then a period (dot) and the type of file. This keeps the file class sort of unique.
|
||||
; Examples:
|
||||
; Winamp.File
|
||||
; Winamp.Playlist
|
||||
; NSIS.Script
|
||||
; Photoshop.JPEGFile
|
||||
;
|
||||
; |> Tech info <|
|
||||
; The registry key layout for a file association is:
|
||||
; HKEY_CLASSES_ROOT
|
||||
; <applicationID> = <"description">
|
||||
; shell
|
||||
; <verb> = <"menu-item text">
|
||||
; command = <"command string">
|
||||
;
|
||||
;HKEY_LOCAL_MACHINE
|
||||
; Software
|
||||
; Classes
|
||||
; .mp3
|
||||
; (default)=Winamp.File
|
||||
; Winamp.File
|
||||
; (default)=Winamp Media File
|
||||
; DefaultIcon
|
||||
; (default)=c:\program files\winamp\winamp.exe,1
|
||||
; shell
|
||||
; Play=&Play in Winamp
|
||||
; command
|
||||
; (default)="c:\program files\winamp\winamp.exe" "%1$"
|
||||
; Open
|
||||
; command
|
||||
; (default)="c:\program files\winamp\winamp.exe" "%1$"
|
||||
; ListBookmark
|
||||
; (default)=Add to Winamp's &Bookmark list
|
||||
; command
|
||||
; (default)="c:\program files\winamp\winamp.exe"/BOOKMARK "%1$"
|
||||
; Enqueue
|
||||
; (default)=&Enqueue in Winamp
|
||||
; command
|
||||
; (default)="c:\program files\winamp\winamp.exe$"/ADD "%1$"
|
||||
|
||||
!macro APP_ASSOCIATE EXT FILECLASS DESCRIPTION ICON COMMANDTEXT COMMAND
|
||||
!macro APP_ASSOCIATE EXT FILECLASS MIME DESCRIPTION ICON COMMANDTEXT COMMAND
|
||||
; Backup the previously associated file class
|
||||
ReadRegStr $R0 HKCR ".${EXT}" ""
|
||||
WriteRegStr HKCR ".${EXT}" "${FILECLASS}_backup" "$R0"
|
||||
ReadRegStr $R0 HKCU "Software\Classes\.${EXT}" ""
|
||||
WriteRegStr HKCU "Software\Classes\.${EXT}" "${FILECLASS}_backup" "$R0"
|
||||
|
||||
WriteRegStr HKCU "Software\Classes\.${EXT}" "" "${FILECLASS}"
|
||||
WriteRegStr HKCU "Software\Classes\.${EXT}" "Content Type" "${MIME}"
|
||||
WriteRegStr HKCU "Software\Classes\.${EXT}\OpenWithProgIds" "${FILECLASS}" ""
|
||||
|
||||
WriteRegStr HKCR ".${EXT}" "" "${FILECLASS}"
|
||||
|
||||
WriteRegStr HKCR "${FILECLASS}" "" `${DESCRIPTION}`
|
||||
WriteRegStr HKCR "${FILECLASS}\DefaultIcon" "" `${ICON}`
|
||||
WriteRegStr HKCR "${FILECLASS}\shell" "" "open"
|
||||
WriteRegStr HKCR "${FILECLASS}\shell\open" "" `${COMMANDTEXT}`
|
||||
WriteRegStr HKCR "${FILECLASS}\shell\open\command" "" `${COMMAND}`
|
||||
WriteRegStr HKCU "Software\Classes\${FILECLASS}" "" "${DESCRIPTION}"
|
||||
WriteRegStr HKCU "Software\Classes\${FILECLASS}\DefaultIcon" "" "${ICON}"
|
||||
WriteRegStr HKCU "Software\Classes\${FILECLASS}\shell" "" "open"
|
||||
WriteRegStr HKCU "Software\Classes\${FILECLASS}\shell\open" "" "${COMMANDTEXT}"
|
||||
WriteRegStr HKCU "Software\Classes\${FILECLASS}\shell\open\command" "" "${COMMAND}"
|
||||
; Set application by default for current user (since Windows Vista)
|
||||
; Backup the previously choice
|
||||
ReadRegStr $R0 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.${EXT}\UserChoice" ""
|
||||
WriteRegStr HKCU "Software\Classes\.${EXT}" "UserChoice_backup" "$R0"
|
||||
|
||||
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.${EXT}\UserChoice"
|
||||
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.${EXT}\UserChoice" "Progid" "${FILECLASS}"
|
||||
!macroend
|
||||
|
||||
!macro APP_ASSOCIATE_EX EXT FILECLASS DESCRIPTION ICON VERB DEFAULTVERB SHELLNEW COMMANDTEXT COMMAND
|
||||
|
||||
!macro APP_ASSOCIATE_EX EXT FILECLASS MIME DESCRIPTION ICON VERB DEFAULTVERB SHELLNEW COMMANDTEXT COMMAND
|
||||
; Backup the previously associated file class
|
||||
ReadRegStr $R0 HKCR ".${EXT}" ""
|
||||
WriteRegStr HKCR ".${EXT}" "${FILECLASS}_backup" "$R0"
|
||||
ReadRegStr $R0 HKCU "Software\Classes\.${EXT}" ""
|
||||
WriteRegStr HKCU "Software\Classes\.${EXT}" "${FILECLASS}_backup" "$R0"
|
||||
|
||||
WriteRegStr HKCR ".${EXT}" "" "${FILECLASS}"
|
||||
WriteRegStr HKCU "Software\Classes\.${EXT}" "" "${FILECLASS}"
|
||||
WriteRegStr HKCU "Software\Classes\.${EXT}" "Content Type" "${MIME}"
|
||||
WriteRegStr HKCU "Software\Classes\.${EXT}\OpenWithProgIds" "${FILECLASS}" ""
|
||||
StrCmp "${SHELLNEW}" "0" +2
|
||||
WriteRegStr HKCR ".${EXT}\ShellNew" "NullFile" ""
|
||||
WriteRegStr HKCU "Software\Classes\.${EXT}\ShellNew" "NullFile" ""
|
||||
|
||||
WriteRegStr HKCR "${FILECLASS}" "" `${DESCRIPTION}`
|
||||
WriteRegStr HKCR "${FILECLASS}\DefaultIcon" "" `${ICON}`
|
||||
WriteRegStr HKCR "${FILECLASS}\shell" "" `${DEFAULTVERB}`
|
||||
WriteRegStr HKCR "${FILECLASS}\shell\${VERB}" "" `${COMMANDTEXT}`
|
||||
WriteRegStr HKCR "${FILECLASS}\shell\${VERB}\command" "" `${COMMAND}`
|
||||
WriteRegStr HKCU "Software\Classes\${FILECLASS}" "" "${DESCRIPTION}"
|
||||
WriteRegStr HKCU "Software\Classes\${FILECLASS}\DefaultIcon" "" "${ICON}"
|
||||
WriteRegStr HKCU "Software\Classes\${FILECLASS}\shell" "" "${DEFAULTVERB}"
|
||||
WriteRegStr HKCU "Software\Classes\${FILECLASS}\shell\${VERB}" "" "${COMMANDTEXT}"
|
||||
WriteRegStr HKCU "Software\Classes\${FILECLASS}\shell\${VERB}\command" "" "${COMMAND}"
|
||||
!macroend
|
||||
|
||||
!macro APP_ASSOCIATE_ADDVERB FILECLASS VERB COMMANDTEXT COMMAND
|
||||
WriteRegStr HKCR "${FILECLASS}\shell\${VERB}" "" `${COMMANDTEXT}`
|
||||
WriteRegStr HKCR "${FILECLASS}\shell\${VERB}\command" "" `${COMMAND}`
|
||||
WriteRegStr HKCU "Software\Classes\${FILECLASS}\shell\${VERB}" "" "${COMMANDTEXT}"
|
||||
WriteRegStr HKCU "Software\Classes\${FILECLASS}\shell\${VERB}\command" "" "${COMMAND}"
|
||||
!macroend
|
||||
|
||||
!macro APP_ASSOCIATE_REMOVEVERB FILECLASS VERB
|
||||
DeleteRegKey HKCR `${FILECLASS}\shell\${VERB}`
|
||||
DeleteRegKey HKCR "Software\Classes\${FILECLASS}\shell\${VERB}"
|
||||
!macroend
|
||||
|
||||
|
||||
!macro APP_UNASSOCIATE EXT FILECLASS
|
||||
; Backup the previously associated file class
|
||||
ReadRegStr $R0 HKCR ".${EXT}" `${FILECLASS}_backup`
|
||||
WriteRegStr HKCR ".${EXT}" "" "$R0"
|
||||
|
||||
DeleteRegKey HKCR `${FILECLASS}`
|
||||
!macroend
|
||||
|
||||
!macro APP_ASSOCIATE_GETFILECLASS OUTPUT EXT
|
||||
ReadRegStr ${OUTPUT} HKCR ".${EXT}" ""
|
||||
ReadRegStr $R0 HKCU "Software\Classes\.${EXT}" "${FILECLASS}_backup"
|
||||
WriteRegStr HKCU "Software\Classes\.${EXT}" "" "$R0"
|
||||
DeleteRegValue HKCU "Software\Classes\.${EXT}" "${FILECLASS}_backup"
|
||||
DeleteRegKey HKCU "Software\Classes\${FILECLASS}"
|
||||
|
||||
; Backup application by default for current user
|
||||
ReadRegStr $R0 HKCU "Software\Classes\.${EXT}" "UserChoice_backup"
|
||||
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.${EXT}\UserChoice"
|
||||
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.${EXT}\UserChoice" "Progid" "$R0"
|
||||
DeleteRegValue HKCU "Software\Classes\.${EXT}" "UserChoice_backup"
|
||||
!macroend
|
||||
|
||||
|
||||
|
|
8
dist/win/nsis/valentina.nsi
vendored
8
dist/win/nsis/valentina.nsi
vendored
|
@ -20,7 +20,7 @@ SetCompressor /FINAL /SOLID lzma
|
|||
!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}b" ; Delete "b" before release
|
||||
|
||||
!define MUI_BRANDINGTEXT "${PRODUCT_VALENTINA} ${MUI_VERSION}"
|
||||
!define WEBSITE_LINK "http://www.valentina-project.org/"
|
||||
|
@ -221,10 +221,10 @@ CreateShortCut "$DESKTOP\${PRODUCT_TAPE}.lnk" "$INSTDIR\${FILE_TAPE}.exe" ""
|
|||
|
||||
; File associations
|
||||
; Valentina
|
||||
!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 "val" "valentina.pattern" "text/plain" "${PRODUCT_VALENTINA} pattern file" "$INSTDIR\${FILE_VALENTINA}.exe,0" "Open with ${PRODUCT_VALENTINA}" "$INSTDIR\${FILE_VALENTINA}.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 APP_ASSOCIATE "vit" "valentina.IndividualMeasurements" "text/plain" "${PRODUCT_VALENTINA} individual measurement file" "$INSTDIR\measurements.ico" "Open with ${PRODUCT_TAPE}" "$INSTDIR\${FILE_TAPE}.exe $\"%1$\""
|
||||
!insertmacro APP_ASSOCIATE "vst" "valentina.StandardMeasurements" "text/plain" "${PRODUCT_VALENTINA} standard measurement file" "$INSTDIR\measurements.ico" "Open with ${PRODUCT_TAPE}" "$INSTDIR\${FILE_TAPE}.exe $\"%1$\""
|
||||
!insertmacro UPDATEFILEASSOC
|
||||
|
||||
WriteRegStr "${REGISTRY_ROOT}" "${REG_UNINSTALL}" "DisplayName" "${PRODUCT_VALENTINA}"
|
||||
|
|
|
@ -6,6 +6,25 @@ IDI_ICON1 ICON DISCARDABLE "tapeicon/64x64/logo.ico"
|
|||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VER_FILEVERSION
|
||||
PRODUCTVERSION VER_PRODUCTVERSION
|
||||
|
||||
#ifdef V_PRERELEASE
|
||||
|
||||
#ifdef V_NO_DEBUG
|
||||
FILEFLAGS (VS_FF_PRERELEASE)
|
||||
#else
|
||||
FILEFLAGS (VS_FF_DEBUG|VS_FF_PRERELEASE)
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifdef V_NO_DEBUG
|
||||
FILEFLAGS (VS_FF_NORMAL)
|
||||
#else
|
||||
FILEFLAGS (VS_FF_DEBUG|VS_FF_NORMAL)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
|
|
|
@ -128,8 +128,11 @@ CONFIG(debug, debug|release){
|
|||
}
|
||||
|
||||
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
|
||||
# do nothing
|
||||
DEFINES += V_NO_DEBUG
|
||||
} else {
|
||||
noCrashReports{
|
||||
DEFINES += V_NO_DEBUG
|
||||
}
|
||||
# Turn on debug symbols in release mode on Unix systems.
|
||||
# On Mac OS X temporarily disabled. Need find way how to strip binary file.
|
||||
!macx:!win32-msvc*{
|
||||
|
|
|
@ -6,6 +6,25 @@ IDI_ICON1 ICON DISCARDABLE "../../../../libs/vmisc/share/re
|
|||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VER_FILEVERSION
|
||||
PRODUCTVERSION VER_PRODUCTVERSION
|
||||
|
||||
#ifdef V_PRERELEASE
|
||||
|
||||
#ifdef V_NO_DEBUG
|
||||
FILEFLAGS (VS_FF_PRERELEASE)
|
||||
#else
|
||||
FILEFLAGS (VS_FF_DEBUG|VS_FF_PRERELEASE)
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifdef V_NO_DEBUG
|
||||
FILEFLAGS (VS_FF_NORMAL)
|
||||
#else
|
||||
FILEFLAGS (VS_FF_DEBUG|VS_FF_NORMAL)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
|
|
|
@ -133,8 +133,11 @@ CONFIG(debug, debug|release){
|
|||
}
|
||||
|
||||
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
|
||||
# do nothing
|
||||
DEFINES += V_NO_DEBUG
|
||||
} else {
|
||||
noCrashReports{
|
||||
DEFINES += V_NO_DEBUG
|
||||
}
|
||||
# Turn on debug symbols in release mode on Unix systems.
|
||||
# On Mac OS X temporarily disabled. Need find way how to strip binary file.
|
||||
!macx:!win32-msvc*{
|
||||
|
@ -1878,6 +1881,7 @@ win32:*-g++ {
|
|||
$${OUT_PWD}/../tape/$${DESTDIR}/tape.exe \
|
||||
$${OUT_PWD}/../tape/$${DESTDIR}/diagrams.rcc \
|
||||
$$PWD/../../../dist/win/valentina.ico \
|
||||
$$PWD/../../../dist/win/measurements.ico \
|
||||
$$PWD/../../../dist/win/pdftops.exe \
|
||||
$$PWD/../../../AUTHORS.txt \
|
||||
$$PWD/../../../LICENSE_GPL.txt \
|
||||
|
|
|
@ -32,10 +32,10 @@
|
|||
#include <QSysInfo>
|
||||
|
||||
extern const int MAJOR_VERSION = 0;
|
||||
extern const int MINOR_VERSION = 3;
|
||||
extern const int DEBUG_VERSION = 3;
|
||||
extern const int MINOR_VERSION = 4;
|
||||
extern const int DEBUG_VERSION = 0;
|
||||
|
||||
extern const QString APP_VERSION_STR(QStringLiteral("%1.%2.%3.%4").arg(MAJOR_VERSION).arg(MINOR_VERSION)
|
||||
extern const QString APP_VERSION_STR(QStringLiteral("%1.%2.%3.%4b").arg(MAJOR_VERSION).arg(MINOR_VERSION)
|
||||
.arg(DEBUG_VERSION).arg(LATEST_TAG_DISTANCE));
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -40,12 +40,15 @@ extern const QString APP_VERSION_STR;
|
|||
/*
|
||||
APP_VERSION is (major << 16) + (minor << 8) + patch.
|
||||
*/
|
||||
#define APP_VERSION 0x000300
|
||||
#define APP_VERSION 0x000400
|
||||
|
||||
// Change version number in version.cpp too.
|
||||
// Change version number in projectversion.cpp too.
|
||||
// Synchronize valentina.nsi
|
||||
|
||||
#define VER_FILEVERSION 0,3,3,0
|
||||
#define VER_FILEVERSION_STR "0.3.3.0\0"
|
||||
#define VER_FILEVERSION 0,4,0,0
|
||||
#define VER_FILEVERSION_STR "0.4.0.0b\0"
|
||||
|
||||
#define V_PRERELEASE // Mark prerelease builds
|
||||
|
||||
#define VER_PRODUCTVERSION VER_FILEVERSION
|
||||
#define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR
|
||||
|
|
|
@ -106,8 +106,11 @@ CONFIG(debug, debug|release){
|
|||
}
|
||||
|
||||
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
|
||||
# do nothing
|
||||
DEFINES += V_NO_DEBUG
|
||||
} else {
|
||||
noCrashReports{
|
||||
DEFINES += V_NO_DEBUG
|
||||
}
|
||||
!macx:!win32-msvc*{
|
||||
# Turn on debug symbols in release mode on Unix systems.
|
||||
# On Mac OS X temporarily disabled. TODO: find way how to strip binary file.
|
||||
|
|
Loading…
Reference in New Issue
Block a user