diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f12981d..0f179ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,7 +52,7 @@ alpha32: - '%PYTHON3-32% ..\doc\generator.py' - '%PYTHON3-32% write_version_data.py' - '%PYTHON3-32% setup.py build' - - '%NSIS% installer.nsi' + - '%NSIS% installer_alpha.nsi' - cd .. - move src\socializer* . - cd ..\scripts diff --git a/scripts/upload.py b/scripts/upload.py index cc1055a..cb860d3 100644 --- a/scripts/upload.py +++ b/scripts/upload.py @@ -30,7 +30,7 @@ def callback(progress): ftp_server = os.environ.get("FTP_SERVER") or sys.argv[1] ftp_username = os.environ.get("FTP_USERNAME") or sys.argv[2] 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", "") print("Uploading files to the Socializer server...") diff --git a/src/installer_alpha.nsi b/src/installer_alpha.nsi new file mode 100644 index 0000000..8354100 --- /dev/null +++ b/src/installer_alpha.nsi @@ -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