Added installer for alphas

This commit is contained in:
Manuel Cortez 2019-12-10 10:43:55 -06:00
parent 1b44f35967
commit 46d5608dfe
3 changed files with 72 additions and 2 deletions

View File

@ -52,7 +52,7 @@ alpha32:
- '%PYTHON3-32% ..\doc\generator.py' - '%PYTHON3-32% ..\doc\generator.py'
- '%PYTHON3-32% write_version_data.py' - '%PYTHON3-32% write_version_data.py'
- '%PYTHON3-32% setup.py build' - '%PYTHON3-32% setup.py build'
- '%NSIS% installer.nsi' - '%NSIS% installer_alpha.nsi'
- cd .. - cd ..
- move src\socializer* . - move src\socializer* .
- cd ..\scripts - cd ..\scripts

View File

@ -30,7 +30,7 @@ def callback(progress):
ftp_server = os.environ.get("FTP_SERVER") or sys.argv[1] ftp_server = os.environ.get("FTP_SERVER") or sys.argv[1]
ftp_username = os.environ.get("FTP_USERNAME") or sys.argv[2] ftp_username = os.environ.get("FTP_USERNAME") or sys.argv[2]
ftp_password = os.environ.get("FTP_PASSWORD") or sys.argv[3] ftp_password = os.environ.get("FTP_PASSWORD") or sys.argv[3]
version = os.environ.get("CI_COMMIT_TAG") or sys.argv[4] version = os.environ.get("CI_COMMIT_TAG") or "alpha"
version = version.replace("v", "") version = version.replace("v", "")
print("Uploading files to the Socializer server...") print("Uploading files to the Socializer server...")

70
src/installer_alpha.nsi Normal file
View File

@ -0,0 +1,70 @@
!include "MUI2.nsh"
!include "LogicLib.nsh"
Unicode true
CRCCheck on
ManifestSupportedOS all
XPStyle on
Name "Socializer"
OutFile "socializer_alpha_setup.exe"
InstallDir "$PROGRAMFILES\socializer"
InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "InstallLocation"
RequestExecutionLevel admin
SetCompress auto
SetCompressor /solid lzma
SetDatablockOptimize on
VIAddVersionKey ProductName "Socializer"
VIAddVersionKey LegalCopyright "Copyright 2019 Manuel Cortez."
VIAddVersionKey ProductVersion "0.23"
VIAddVersionKey FileVersion "0.23"
VIProductVersion "0.23.0.0"
VIFileVersion "0.23.0.0"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
var StartMenuFolder
!insertmacro MUI_PAGE_STARTMENU startmenu $StartMenuFolder
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_LINK "Visit Socializer website"
!define MUI_FINISHPAGE_LINK_LOCATION "http://socializer.su"
!define MUI_FINISHPAGE_RUN "$INSTDIR\socializer.exe"
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "Spanish"
!insertmacro MUI_RESERVEFILE_LANGDLL
Section
SetShellVarContext All
SetOutPath "$INSTDIR"
File /r dist\*
CreateShortCut "$DESKTOP\socializer.lnk" "$INSTDIR\socializer.exe"
!insertmacro MUI_STARTMENU_WRITE_BEGIN startmenu
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\socializer.lnk" "$INSTDIR\socializer.exe"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Socializer on the web.lnk" "http://socializer.su"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
!insertmacro MUI_STARTMENU_WRITE_END
WriteUninstaller "$INSTDIR\Uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "DisplayName" "Socializer"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall" "InstallLocation" $INSTDIR
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall" "Publisher" "Manuel Cortez"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "DisplayVersion" "0.23"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "URLInfoAbout" "http://socializer.su"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "VersionMajor" 0
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "VersionMinor" 19
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer" "NoRepair" 1
SectionEnd
Section "Uninstall"
SetShellVarContext All
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\socializer"
RMDir /r /REBOOTOK $INSTDIR
Delete "$DESKTOP\socializer.lnk"
!insertmacro MUI_STARTMENU_GETFOLDER startmenu $StartMenuFolder
RMDir /r "$SMPROGRAMS\$StartMenuFolder"
SectionEnd
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd