Commit d03271cb by Tapio Haapala

Autopublishin tiedostoja

1 parent cac27f32
<?xml version="1.0" encoding="utf-8"?>
<AutoPublishSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UploadUser>f-solu-06</UploadUser>
<UploadPath>/home/f-solu-06/software.f-solutions.fi</UploadPath>
<UploadHost>software.f-solutions.fi</UploadHost>
<ProjectName>MoyaPrintServer</ProjectName>
<Customers>
<Customer>
<Name>moya</Name>
<Password>moya</Password>
<AllowDevelopmentReleases>false</AllowDevelopmentReleases>
<Obfuscate>false</Obfuscate>
</Customer>
</Customers>
<ForceUpdate>false</ForceUpdate>
<DisableUpdate>false</DisableUpdate>
</AutoPublishSettings>
\ No newline at end of file
; NSIS script - ONLY for use with AutoPublish/AutoUpdate system
; //keitsi
;--------------------------------
;Include Modern UI
!include "MUI.nsh"
;--------------------------------
;Configuration
SetCompressor lzma
Name "<$PROJECTNAME$> <$CUSTOMER$> v<$VERSION$>"
; DO NOT CHANGE OutFile "installer_temp.exe" !!! AutoPublish requires this.
; AutoPublish will move the installer according to autopublish.xml file.
OutFile "installer_temp.exe"
;Folder selection page
; InstallDir "$PROGRAMFILES\<$PROJECTNAME$>_<$CUSTOMER$>"
ShowInstDetails show
;--------------------------------
;Interface Settings
!define MUI_ABORTWARNING
;--------------------------------
;Pages
; !insertmacro MUI_PAGE_LICENSE "license.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
; !define MUI_FINISHPAGE_RUN $INSTDIR\<$BINARYNAMEORIG$>
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
;Installer Sections
Function GetDotNet
IfFileExists "$WINDIR\Microsoft.NET\Framework\v2.0.50727\installUtil.exe" NextStep
MessageBox MB_OK|MB_ICONEXCLAMATION "You must have the Microsoft .NET Framework 2.0 Installed to use this application. $\n$\nClick 'Open' in the following file dialog to download and run the Microsoft .NET Framework Installer..."
ExecShell Open "http://www.microsoft.com/downloads/info.aspx?na=90&p=&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=0856eacb-4362-4b0d-8edd-aab15c5e04f5&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f5%2f6%2f7%2f567758a3-759e-473e-bf8f-52154438565a%2fdotnetfx.exe" SW_SHOWNORMAL
Quit
NextStep:
FunctionEnd
Function .onInit
; Uber users are so uber that they do not need checks ;)
; Call GetDotNet
Call DetectInstallDir
FunctionEnd
Function DetectInstallDir
;Try to get install folder from obsoleted registry key first, if available
ClearErrors
ReadRegStr $INSTDIR HKCU "Software\<$PROJECTNAME$>" ""
IfErrors 0 instdirfound
ClearErrors
; No obsoleted regkey present, try to read the correct one
ReadRegStr $INSTDIR HKCU "Software\<$PROJECTNAME$>_<$CUSTOMER$>" ""
IfErrors 0 instdirfound
ClearErrors
; No installation dir regkey present at all - use default installation directory.
StrCpy $INSTDIR "$PROGRAMFILES\<$PROJECTNAME$>_<$CUSTOMER$>"
instdirfound:
FunctionEnd
Function .onInstSuccess
Exec '"$INSTDIR\<$BINARYNAMEORIG$>"'
FunctionEnd
Function WaitProgramClose
IfFileExists "$INSTDIR\<$BINARYNAMEORIG$>" loop NotInstalled
loop:
ClearErrors
Delete "$INSTDIR\<$BINARYNAMEORIG$>"
${If} ${Errors}
; Delete failed - means the program is still running. Sleep 2 seconds and retry.
Sleep 3000
ClearErrors
Delete "$INSTDIR\<$BINARYNAMEORIG$>"
${If} ${Errors}
MessageBox MB_OK "Program <$BINARYNAMEORIG$> didn't close in 2 seconds. Automatic update can't continue before it's closed. Please close the program manually and hit OK to retry."
goto loop
${EndIf}
${EndIf}
NotInstalled:
FunctionEnd
Section "!<$PROJECTNAME$> <$CUSTOMER$> <$VERSIONGROUP$> v<$VERSION$>" SecMain
SetShellVarContext current
SetOutPath "$INSTDIR"
Call WaitProgramClose
; SetOverwrite Off
SetOverwrite On
File /oname=autoupdate.xml "<$BINARYDIR$>\autoupdate.<$CUSTOMER$>.xml"
File /oname=<$BINARYNAMEORIG$> "<$BINARYDIR$>\<$BINARYNAMEOBF$>"
File autoupdate.crt
; this line will be replicated for every non-default existing assembly
; that is referenced to the main project.
File "<$REFERENCEDASSEMBLY$>"
File "<$DEBUGDATABASES$>"
; Write install path to registry (projectname_customer_versiongroup)
WriteRegStr HKCU "Software\<$PROJECTNAME$>_<$CUSTOMER$>" "" $INSTDIR
; Remove obsoleted registry key on install
DeleteRegKey HKCU "Software\<$PROJECTNAME$>"
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
;Create shortcuts
CreateDirectory "$SMPROGRAMS\<$PROJECTNAME$> <$CUSTOMER$>"
CreateShortCut "$SMPROGRAMS\<$PROJECTNAME$> <$CUSTOMER$>\<$PROJECTNAME$>.lnk" "$INSTDIR\<$BINARYNAMEORIG$>"
CreateShortCut "$SMPROGRAMS\<$PROJECTNAME$> <$CUSTOMER$>\Uninstall <$PROJECTNAME$>.lnk" "$INSTDIR\Uninstall.exe"
; Remove shortcuts from old shortcut naming scheme path, if any
SetShellVarContext all
Delete "$SMPROGRAMS\<$PROJECTNAME$>\<$PROJECTNAME$>.lnk"
Delete "$SMPROGRAMS\<$PROJECTNAME$>\Uninstall <$PROJECTNAME$>.lnk"
RMDir "$SMPROGRAMS\<$PROJECTNAME$>"
SetShellVarContext current
Delete "$SMPROGRAMS\<$PROJECTNAME$>\<$PROJECTNAME$>.lnk"
Delete "$SMPROGRAMS\<$PROJECTNAME$>\Uninstall <$PROJECTNAME$>.lnk"
RMDir "$SMPROGRAMS\<$PROJECTNAME$>"
SectionEnd
;--------------------------------
;Descriptions
LangString DESC_SecMain ${LANG_ENGLISH} "Base (required)"
;--------------------------------
;Uninstaller Section
Section "Uninstall"
Delete "$SMPROGRAMS\<$PROJECTNAME$> <$CUSTOMER$>\*"
RMDir "$SMPROGRAMS\<$PROJECTNAME$> <$CUSTOMER$>"
Delete "$INSTDIR\<$BINARYNAMEORIG$>"
Delete "$INSTDIR\autoupdate.xml"
Delete "$INSTDIR\autoupdate.crt"
; this line will be replicated for every non-default existing assembly
; that is referenced to the main project.
Delete "$INSTDIR\<$REFERENCEDASSEMBLY$>"
Delete "$INSTDIR\<$DEBUGDATABASES$>"
Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR"
SectionEnd
\ No newline at end of file
; NSIS script - ONLY for use with AutoPublish/AutoUpdate system
; //keitsi
;--------------------------------
;Include Modern UI
!include "MUI.nsh"
;--------------------------------
;Configuration
SetCompressor lzma
Name "MoyaPrintServer moya v1_00_08"
; DO NOT CHANGE OutFile "installer_temp.exe" !!! AutoPublish requires this.
; AutoPublish will move the installer according to autopublish.xml file.
OutFile "installer_temp.exe"
;Folder selection page
; InstallDir "$PROGRAMFILES\MoyaPrintServer_moya"
ShowInstDetails show
;--------------------------------
;Interface Settings
!define MUI_ABORTWARNING
;--------------------------------
;Pages
; !insertmacro MUI_PAGE_LICENSE "license.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
; !define MUI_FINISHPAGE_RUN $INSTDIR\moyaPrintServer.exe
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
;Installer Sections
Function GetDotNet
IfFileExists "$WINDIR\Microsoft.NET\Framework\v2.0.50727\installUtil.exe" NextStep
MessageBox MB_OK|MB_ICONEXCLAMATION "You must have the Microsoft .NET Framework 2.0 Installed to use this application. $\n$\nClick 'Open' in the following file dialog to download and run the Microsoft .NET Framework Installer..."
ExecShell Open "http://www.microsoft.com/downloads/info.aspx?na=90&p=&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=0856eacb-4362-4b0d-8edd-aab15c5e04f5&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f5%2f6%2f7%2f567758a3-759e-473e-bf8f-52154438565a%2fdotnetfx.exe" SW_SHOWNORMAL
Quit
NextStep:
FunctionEnd
Function .onInit
; Uber users are so uber that they do not need checks ;)
; Call GetDotNet
Call DetectInstallDir
FunctionEnd
Function DetectInstallDir
;Try to get install folder from obsoleted registry key first, if available
ClearErrors
ReadRegStr $INSTDIR HKCU "Software\MoyaPrintServer" ""
IfErrors 0 instdirfound
ClearErrors
; No obsoleted regkey present, try to read the correct one
ReadRegStr $INSTDIR HKCU "Software\MoyaPrintServer_moya" ""
IfErrors 0 instdirfound
ClearErrors
; No installation dir regkey present at all - use default installation directory.
StrCpy $INSTDIR "$PROGRAMFILES\MoyaPrintServer_moya"
instdirfound:
FunctionEnd
Function .onInstSuccess
Exec '"$INSTDIR\moyaPrintServer.exe"'
FunctionEnd
Function WaitProgramClose
IfFileExists "$INSTDIR\moyaPrintServer.exe" loop NotInstalled
loop:
ClearErrors
Delete "$INSTDIR\moyaPrintServer.exe"
${If} ${Errors}
; Delete failed - means the program is still running. Sleep 2 seconds and retry.
Sleep 3000
ClearErrors
Delete "$INSTDIR\moyaPrintServer.exe"
${If} ${Errors}
MessageBox MB_OK "Program moyaPrintServer.exe didn't close in 2 seconds. Automatic update can't continue before it's closed. Please close the program manually and hit OK to retry."
goto loop
${EndIf}
${EndIf}
NotInstalled:
FunctionEnd
Section "!MoyaPrintServer moya stable v1_00_08" SecMain
SetShellVarContext current
SetOutPath "$INSTDIR"
Call WaitProgramClose
; SetOverwrite Off
SetOverwrite On
File /oname=autoupdate.xml "D:\Devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\autoupdate.moya.xml"
File /oname=moyaPrintServer.exe "D:\Devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\moyaPrintServer.exe"
File autoupdate.crt
; this line will be replicated for every non-default existing assembly
; that is referenced to the main project.
File "D:\Devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\AutoUpdateLib.dll"
File "D:\Devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\moyaPrintServer.pdb"
File "D:\Devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\AutoUpdateLib.pdb"
; Write install path to registry (projectname_customer_versiongroup)
WriteRegStr HKCU "Software\MoyaPrintServer_moya" "" $INSTDIR
; Remove obsoleted registry key on install
DeleteRegKey HKCU "Software\MoyaPrintServer"
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
;Create shortcuts
CreateDirectory "$SMPROGRAMS\MoyaPrintServer moya"
CreateShortCut "$SMPROGRAMS\MoyaPrintServer moya\MoyaPrintServer.lnk" "$INSTDIR\moyaPrintServer.exe"
CreateShortCut "$SMPROGRAMS\MoyaPrintServer moya\Uninstall MoyaPrintServer.lnk" "$INSTDIR\Uninstall.exe"
; Remove shortcuts from old shortcut naming scheme path, if any
SetShellVarContext all
Delete "$SMPROGRAMS\MoyaPrintServer\MoyaPrintServer.lnk"
Delete "$SMPROGRAMS\MoyaPrintServer\Uninstall MoyaPrintServer.lnk"
RMDir "$SMPROGRAMS\MoyaPrintServer"
SetShellVarContext current
Delete "$SMPROGRAMS\MoyaPrintServer\MoyaPrintServer.lnk"
Delete "$SMPROGRAMS\MoyaPrintServer\Uninstall MoyaPrintServer.lnk"
RMDir "$SMPROGRAMS\MoyaPrintServer"
SectionEnd
;--------------------------------
;Descriptions
LangString DESC_SecMain ${LANG_ENGLISH} "Base (required)"
;--------------------------------
;Uninstaller Section
Section "Uninstall"
Delete "$SMPROGRAMS\MoyaPrintServer moya\*"
RMDir "$SMPROGRAMS\MoyaPrintServer moya"
Delete "$INSTDIR\moyaPrintServer.exe"
Delete "$INSTDIR\autoupdate.xml"
Delete "$INSTDIR\autoupdate.crt"
; this line will be replicated for every non-default existing assembly
; that is referenced to the main project.
Delete "$INSTDIR\D:\Devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\AutoUpdateLib.dll"
Delete "$INSTDIR\D:\Devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\moyaPrintServer.pdb"
Delete "$INSTDIR\D:\Devel\proj\moya-info-tools\PrintServer\moyaPrintServer\moyaPrintServer\bin\Debug\AutoUpdateLib.pdb"
Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR"
SectionEnd
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!