Try to generate an installer and a 64 bits version
This commit is contained in:
parent
32fb52f941
commit
0fef6427ff
@ -1,13 +1,46 @@
|
|||||||
variables:
|
|
||||||
PYTHON3_32: "C:\\python38\\python.exe"
|
|
||||||
NSIS: "C:\\program files (x86)\\nsis\\makensis.exe"
|
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
- generate_docs
|
- generate_docs
|
||||||
- build
|
- build
|
||||||
|
- versions
|
||||||
- upload
|
- upload
|
||||||
|
|
||||||
|
program64:
|
||||||
|
interruptible: true
|
||||||
|
tags:
|
||||||
|
- windows
|
||||||
|
- windows10
|
||||||
|
stage: build
|
||||||
|
variables:
|
||||||
|
PYTHON: "C:\\python37\\python.exe"
|
||||||
|
before_script:
|
||||||
|
- Set-Variable -Name "time" -Value (date -Format "%H:%m")
|
||||||
|
- echo ${time}
|
||||||
|
- echo "started by ${GITLAB_USER_NAME}"
|
||||||
|
- '&$env:PYTHON -V'
|
||||||
|
- '&$env:PYTHON -m pip install --upgrade pip'
|
||||||
|
- '&$env:PYTHON -m venv env'
|
||||||
|
- 'env\Scripts\Activate.ps1'
|
||||||
|
- 'python -m pip install --upgrade -r requirements.txt'
|
||||||
|
script:
|
||||||
|
- cd src
|
||||||
|
- 'python write_version_data.py'
|
||||||
|
- 'python setup.py build'
|
||||||
|
- cd ..
|
||||||
|
- 'mkdir artifacts'
|
||||||
|
- cd scripts
|
||||||
|
- 'python prepare_zipversion.py'
|
||||||
|
- cd ..
|
||||||
|
- move src\music_dl.zip artifacts\music_dl_x64.zip
|
||||||
|
- 'move src/dist artifacts/program64'
|
||||||
|
only:
|
||||||
|
- schedules
|
||||||
|
- master
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- artifacts
|
||||||
|
expire_in: 1 day
|
||||||
|
|
||||||
program32:
|
program32:
|
||||||
interruptible: true
|
interruptible: true
|
||||||
tags:
|
tags:
|
||||||
@ -29,14 +62,12 @@ program32:
|
|||||||
- cd src
|
- cd src
|
||||||
- 'python write_version_data.py'
|
- 'python write_version_data.py'
|
||||||
- 'python setup.py build'
|
- 'python setup.py build'
|
||||||
- '&$env:NSIS installer.nsi'
|
|
||||||
- cd ..
|
- cd ..
|
||||||
- mkdir artifacts
|
|
||||||
- move src\music_dl* artifacts
|
|
||||||
- cd scripts
|
- cd scripts
|
||||||
- 'python prepare_zipversion.py'
|
- 'python prepare_zipversion.py'
|
||||||
- cd ..
|
- cd ..
|
||||||
- move src\music_dl.zip artifacts\music_dl.zip
|
- move src\music_dl.zip artifacts\music_dl_x86.zip
|
||||||
|
- 'move src/dist artifacts/program32'
|
||||||
only:
|
only:
|
||||||
- schedules
|
- schedules
|
||||||
- master
|
- master
|
||||||
@ -45,6 +76,29 @@ program32:
|
|||||||
- artifacts
|
- artifacts
|
||||||
expire_in: 1 day
|
expire_in: 1 day
|
||||||
|
|
||||||
|
generate_versions:
|
||||||
|
stage: versions
|
||||||
|
tags:
|
||||||
|
- windows
|
||||||
|
- windows10
|
||||||
|
variables:
|
||||||
|
NSIS: "C:\\program files (x86)\\nsis\\makensis.exe"
|
||||||
|
before_script:
|
||||||
|
- Set-Variable -Name "time" -Value (date -Format "%H:%m")
|
||||||
|
- echo ${time}
|
||||||
|
- echo "started by ${GITLAB_USER_NAME}"
|
||||||
|
script:
|
||||||
|
- 'cd artifacts'
|
||||||
|
- '&$env:NSIS installer.nsi'
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
- master
|
||||||
|
- schedules
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- artifacts
|
||||||
|
expire_in: 1 day
|
||||||
|
|
||||||
upload:
|
upload:
|
||||||
stage: upload
|
stage: upload
|
||||||
tags:
|
tags:
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
!include "MUI2.nsh"
|
!include "MUI2.nsh"
|
||||||
!include "LogicLib.nsh"
|
!include "LogicLib.nsh"
|
||||||
|
!include "x64.nsh"
|
||||||
Unicode true
|
Unicode true
|
||||||
CRCCheck on
|
CRCCheck on
|
||||||
ManifestSupportedOS all
|
ManifestSupportedOS all
|
||||||
XPStyle on
|
XPStyle on
|
||||||
Name "MusicDL"
|
Name "MusicDL"
|
||||||
OutFile "music_dl_0.7_setup.exe"
|
OutFile "music_dl_setup.exe"
|
||||||
InstallDir "$PROGRAMFILES\musicDL"
|
InstallDir "$PROGRAMFILES\musicDL"
|
||||||
InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\musicDL" "InstallLocation"
|
InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\musicDL" "InstallLocation"
|
||||||
RequestExecutionLevel admin
|
RequestExecutionLevel admin
|
||||||
@ -13,7 +14,7 @@ SetCompress auto
|
|||||||
SetCompressor /solid lzma
|
SetCompressor /solid lzma
|
||||||
SetDatablockOptimize on
|
SetDatablockOptimize on
|
||||||
VIAddVersionKey ProductName "MusicDL"
|
VIAddVersionKey ProductName "MusicDL"
|
||||||
VIAddVersionKey LegalCopyright "Copyright 2019 - 2020 Manuel Cortez."
|
VIAddVersionKey LegalCopyright "Copyright 2019 - 2022 MCV Software."
|
||||||
VIAddVersionKey ProductVersion "0.7"
|
VIAddVersionKey ProductVersion "0.7"
|
||||||
VIAddVersionKey FileVersion "0.7"
|
VIAddVersionKey FileVersion "0.7"
|
||||||
VIProductVersion "0.7.0.0"
|
VIProductVersion "0.7.0.0"
|
||||||
@ -24,7 +25,7 @@ var StartMenuFolder
|
|||||||
!insertmacro MUI_PAGE_STARTMENU startmenu $StartMenuFolder
|
!insertmacro MUI_PAGE_STARTMENU startmenu $StartMenuFolder
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
!define MUI_FINISHPAGE_LINK "Visit MusicDL website"
|
!define MUI_FINISHPAGE_LINK "Visit MusicDL website"
|
||||||
!define MUI_FINISHPAGE_LINK_LOCATION "https://manuelcortez.net/music_dl"
|
!define MUI_FINISHPAGE_LINK_LOCATION "https://mcvsoftware.com/music_dl"
|
||||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\musicDL.exe"
|
!define MUI_FINISHPAGE_RUN "$INSTDIR\musicDL.exe"
|
||||||
!insertmacro MUI_PAGE_FINISH
|
!insertmacro MUI_PAGE_FINISH
|
||||||
!insertmacro MUI_UNPAGE_CONFIRM
|
!insertmacro MUI_UNPAGE_CONFIRM
|
||||||
@ -36,7 +37,11 @@ var StartMenuFolder
|
|||||||
Section
|
Section
|
||||||
SetShellVarContext All
|
SetShellVarContext All
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
File /r dist\*
|
${If} ${RunningX64}
|
||||||
|
File /r program64\*
|
||||||
|
${Else}
|
||||||
|
File /r program32\*
|
||||||
|
${EndIf}
|
||||||
CreateShortCut "$DESKTOP\musicDL.lnk" "$INSTDIR\musicDL.exe"
|
CreateShortCut "$DESKTOP\musicDL.lnk" "$INSTDIR\musicDL.exe"
|
||||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN startmenu
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN startmenu
|
||||||
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
||||||
@ -65,5 +70,8 @@ Delete "$DESKTOP\MusicDL.lnk"
|
|||||||
RMDir /r "$SMPROGRAMS\$StartMenuFolder"
|
RMDir /r "$SMPROGRAMS\$StartMenuFolder"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
Function .onInit
|
Function .onInit
|
||||||
|
${If} ${RunningX64}
|
||||||
|
StrCpy $instdir "$programfiles64\music-dl"
|
||||||
|
${EndIf}
|
||||||
!insertmacro MUI_LANGDLL_DISPLAY
|
!insertmacro MUI_LANGDLL_DISPLAY
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
Loading…
Reference in New Issue
Block a user