mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 21:33:18 -07:00
Add workflow for automated Windows/MacOS builds
This commit is contained in:
parent
d8f223327e
commit
6c8d6ed2ca
10 changed files with 535 additions and 10 deletions
49
package/Tautulli-macos.spec
Normal file
49
package/Tautulli-macos.spec
Normal file
|
@ -0,0 +1,49 @@
|
|||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
sys.modules['FixTk'] = None
|
||||
|
||||
import os
|
||||
VERSION = os.getenv('VERSION', '0.0.0')
|
||||
|
||||
block_cipher = None
|
||||
|
||||
analysis = Analysis(
|
||||
['../Tautulli.py'],
|
||||
pathex=['lib'],
|
||||
datas=[
|
||||
('../data', 'data'),
|
||||
('../CHANGELOG.md', '.'),
|
||||
('../LICENSE', '.'),
|
||||
('../version.txt', '.')
|
||||
],
|
||||
excludes=['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'],
|
||||
cipher=block_cipher
|
||||
)
|
||||
pyz = PYZ(
|
||||
analysis.pure,
|
||||
analysis.zipped_data,
|
||||
cipher=block_cipher
|
||||
)
|
||||
exe = EXE(
|
||||
pyz,
|
||||
analysis.scripts,
|
||||
exclude_binaries=True,
|
||||
name='Tautulli',
|
||||
console=False,
|
||||
icon='../data/interfaces/default/images/logo-circle.icns'
|
||||
)
|
||||
coll = COLLECT(
|
||||
exe,
|
||||
analysis.binaries,
|
||||
analysis.zipfiles,
|
||||
analysis.datas,
|
||||
name='Tautulli'
|
||||
)
|
||||
app = BUNDLE(
|
||||
coll,
|
||||
name='Tautulli.app',
|
||||
icon='../data/interfaces/default/images/logo-circle.icns',
|
||||
bundle_identifier='com.Tautulli.Tautulli',
|
||||
version=VERSION
|
||||
)
|
38
package/Tautulli-windows.spec
Normal file
38
package/Tautulli-windows.spec
Normal file
|
@ -0,0 +1,38 @@
|
|||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
sys.modules['FixTk'] = None
|
||||
|
||||
block_cipher = None
|
||||
|
||||
analysis = Analysis(
|
||||
['..\\Tautulli.py'],
|
||||
pathex=['lib'],
|
||||
datas=[('..\\data', 'data'),
|
||||
('..\\CHANGELOG.md', '.'),
|
||||
('..\\LICENSE', '.'),
|
||||
('..\\version.txt', '.')
|
||||
],
|
||||
excludes=['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'],
|
||||
cipher=block_cipher,
|
||||
)
|
||||
pyz = PYZ(
|
||||
analysis.pure,
|
||||
analysis.zipped_data,
|
||||
cipher=block_cipher
|
||||
)
|
||||
exe = EXE(
|
||||
pyz,
|
||||
analysis.scripts,
|
||||
exclude_binaries=True,
|
||||
name='Tautulli',
|
||||
console=False,
|
||||
icon='..\\data\\interfaces\\default\\images\\logo-circle.ico'
|
||||
)
|
||||
coll = COLLECT(
|
||||
exe,
|
||||
analysis.binaries,
|
||||
analysis.zipfiles,
|
||||
analysis.datas,
|
||||
name='Tautulli'
|
||||
)
|
244
package/Tautulli.nsi
Normal file
244
package/Tautulli.nsi
Normal file
|
@ -0,0 +1,244 @@
|
|||
############################################################################################
|
||||
# NSIS Installation Script created by NSIS Quick Setup Script Generator v1.09.18
|
||||
# Entirely Edited with NullSoft Scriptable Installation System
|
||||
# by Vlasis K. Barkas aka Red Wine red_wine@freemail.gr Sep 2006
|
||||
############################################################################################
|
||||
|
||||
!define APP_NAME "Tautulli"
|
||||
!define COMP_NAME "Tautulli"
|
||||
!define WEB_SITE "https://tautulli.com"
|
||||
!define COPYRIGHT "Tautulli © 2020"
|
||||
!define DESCRIPTION "Monitor your Plex Media Server"
|
||||
!define APP_ICON "..\dist\Tautulli\data\interfaces\default\images\logo-circle.ico"
|
||||
!define LICENSE_TXT "..\dist\Tautulli\LICENSE"
|
||||
!define MAIN_APP_EXE "Tautulli.exe"
|
||||
!define INSTALL_TYPE "SetShellVarContext current"
|
||||
!define REG_ROOT "HKCU"
|
||||
!define REG_APP_PATH "Software\Microsoft\Windows\CurrentVersion\App Paths\${MAIN_APP_EXE}"
|
||||
!define UNINSTALL_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
|
||||
|
||||
!define REG_START_MENU "Start Menu Folder"
|
||||
|
||||
var SM_Folder
|
||||
|
||||
######################################################################
|
||||
|
||||
VIProductVersion "${VERSION}"
|
||||
VIAddVersionKey "ProductName" "${APP_NAME}"
|
||||
VIAddVersionKey "CompanyName" "${COMP_NAME}"
|
||||
VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
|
||||
VIAddVersionKey "FileDescription" "${DESCRIPTION}"
|
||||
VIAddVersionKey "FileVersion" "${VERSION}"
|
||||
|
||||
######################################################################
|
||||
|
||||
SetCompressor ZLIB
|
||||
Name "${APP_NAME}"
|
||||
Caption "${APP_NAME}"
|
||||
OutFile "${INSTALLER_NAME}"
|
||||
BrandingText "${APP_NAME}"
|
||||
XPStyle on
|
||||
InstallDirRegKey "${REG_ROOT}" "${REG_APP_PATH}" ""
|
||||
InstallDir "$PROGRAMFILES\${APP_NAME}"
|
||||
|
||||
######################################################################
|
||||
|
||||
!define nsProcess::FindProcess `!insertmacro nsProcess::FindProcess`
|
||||
|
||||
!macro nsProcess::FindProcess _FILE _ERR
|
||||
nsProcess::_FindProcess /NOUNLOAD `${_FILE}`
|
||||
Pop ${_ERR}
|
||||
!macroend
|
||||
|
||||
|
||||
!define nsProcess::KillProcess `!insertmacro nsProcess::KillProcess`
|
||||
|
||||
!macro nsProcess::KillProcess _FILE _ERR
|
||||
nsProcess::_KillProcess /NOUNLOAD `${_FILE}`
|
||||
Pop ${_ERR}
|
||||
!macroend
|
||||
|
||||
!define nsProcess::CloseProcess `!insertmacro nsProcess::CloseProcess`
|
||||
|
||||
!macro nsProcess::CloseProcess _FILE _ERR
|
||||
nsProcess::_CloseProcess /NOUNLOAD `${_FILE}`
|
||||
Pop ${_ERR}
|
||||
!macroend
|
||||
|
||||
|
||||
!define nsProcess::Unload `!insertmacro nsProcess::Unload`
|
||||
|
||||
!macro nsProcess::Unload
|
||||
nsProcess::_Unload
|
||||
!macroend
|
||||
|
||||
######################################################################
|
||||
|
||||
!include Sections.nsh
|
||||
|
||||
Var /GLOBAL nolaunch
|
||||
|
||||
!include "MUI.nsh"
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_UNABORTWARNING
|
||||
|
||||
!define MUI_ICON "${APP_ICON}"
|
||||
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
|
||||
!ifdef LICENSE_TXT
|
||||
!insertmacro MUI_PAGE_LICENSE "${LICENSE_TXT}"
|
||||
!endif
|
||||
|
||||
!ifdef REG_START_MENU
|
||||
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "${APP_NAME}"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${REG_ROOT}"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${UNINSTALL_PATH}"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${REG_START_MENU}"
|
||||
!insertmacro MUI_PAGE_STARTMENU Application $SM_Folder
|
||||
!endif
|
||||
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\${MAIN_APP_EXE}"
|
||||
!define MUI_FINISHPAGE_RUN_PARAMETERS $nolaunch
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
!insertmacro MUI_UNPAGE_FINISH
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
######################################################################
|
||||
|
||||
Section -MainProgram
|
||||
${INSTALL_TYPE}
|
||||
SetOverwrite ifnewer
|
||||
SetOutPath "$INSTDIR"
|
||||
File /nonfatal /a /r "..\dist\${APP_NAME}\"
|
||||
|
||||
IfSilent 0 +2
|
||||
ExecShell "" "$INSTDIR\${MAIN_APP_EXE}" $nolaunch
|
||||
SectionEnd
|
||||
|
||||
######################################################################
|
||||
|
||||
Section -Icons_Reg
|
||||
SetOutPath "$INSTDIR"
|
||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||
|
||||
!ifdef REG_START_MENU
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||
CreateDirectory "$SMPROGRAMS\$SM_Folder"
|
||||
CreateShortCut "$SMPROGRAMS\$SM_Folder\${APP_NAME}.lnk" "$INSTDIR\${MAIN_APP_EXE}"
|
||||
CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${MAIN_APP_EXE}"
|
||||
CreateShortCut "$SMPROGRAMS\$SM_Folder\Uninstall ${APP_NAME}.lnk" "$INSTDIR\uninstall.exe"
|
||||
|
||||
!ifdef WEB_SITE
|
||||
WriteIniStr "$INSTDIR\${APP_NAME} website.url" "InternetShortcut" "URL" "${WEB_SITE}"
|
||||
CreateShortCut "$SMPROGRAMS\$SM_Folder\${APP_NAME} Website.lnk" "$INSTDIR\${APP_NAME} website.url"
|
||||
!endif
|
||||
!insertmacro MUI_STARTMENU_WRITE_END
|
||||
!endif
|
||||
|
||||
!ifndef REG_START_MENU
|
||||
CreateDirectory "$SMPROGRAMS\${APP_NAME}"
|
||||
CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME}.lnk" "$INSTDIR\${MAIN_APP_EXE}"
|
||||
CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${MAIN_APP_EXE}"
|
||||
CreateShortCut "$SMPROGRAMS\${APP_NAME}\Uninstall ${APP_NAME}.lnk" "$INSTDIR\uninstall.exe"
|
||||
|
||||
!ifdef WEB_SITE
|
||||
WriteIniStr "$INSTDIR\${APP_NAME} website.url" "InternetShortcut" "URL" "${WEB_SITE}"
|
||||
CreateShortCut "$SMPROGRAMS\${APP_NAME}\${APP_NAME} Website.lnk" "$INSTDIR\${APP_NAME} website.url"
|
||||
!endif
|
||||
!endif
|
||||
|
||||
WriteRegStr ${REG_ROOT} "${REG_APP_PATH}" "" "$INSTDIR\${MAIN_APP_EXE}"
|
||||
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayName" "${APP_NAME}"
|
||||
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "UninstallString" "$INSTDIR\uninstall.exe"
|
||||
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayIcon" "$INSTDIR\${MAIN_APP_EXE}"
|
||||
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "DisplayVersion" "${VERSION}"
|
||||
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "Publisher" "${COMP_NAME}"
|
||||
|
||||
!ifdef WEB_SITE
|
||||
WriteRegStr ${REG_ROOT} "${UNINSTALL_PATH}" "URLInfoAbout" "${WEB_SITE}"
|
||||
!endif
|
||||
SectionEnd
|
||||
|
||||
######################################################################
|
||||
|
||||
Section Uninstall
|
||||
${INSTALL_TYPE}
|
||||
Delete "$INSTDIR\uninstall.exe"
|
||||
!ifdef WEB_SITE
|
||||
Delete "$INSTDIR\${APP_NAME} website.url"
|
||||
!endif
|
||||
|
||||
RmDir /r "$INSTDIR"
|
||||
RmDir "$INSTDIR"
|
||||
|
||||
!ifdef REG_START_MENU
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER "Application" $SM_Folder
|
||||
Delete "$SMPROGRAMS\$SM_Folder\${APP_NAME}.lnk"
|
||||
Delete "$SMPROGRAMS\$SM_Folder\Uninstall ${APP_NAME}.lnk"
|
||||
!ifdef WEB_SITE
|
||||
Delete "$SMPROGRAMS\$SM_Folder\${APP_NAME} Website.lnk"
|
||||
!endif
|
||||
Delete "$DESKTOP\${APP_NAME}.lnk"
|
||||
|
||||
RmDir "$SMPROGRAMS\$SM_Folder"
|
||||
!endif
|
||||
|
||||
!ifndef REG_START_MENU
|
||||
Delete "$SMPROGRAMS\${APP_NAME}\${APP_NAME}.lnk"
|
||||
Delete "$SMPROGRAMS\${APP_NAME}\Uninstall ${APP_NAME}.lnk"
|
||||
!ifdef WEB_SITE
|
||||
Delete "$SMPROGRAMS\${APP_NAME}\${APP_NAME} Website.lnk"
|
||||
!endif
|
||||
Delete "$DESKTOP\${APP_NAME}.lnk"
|
||||
|
||||
RmDir "$SMPROGRAMS\${APP_NAME}"
|
||||
!endif
|
||||
|
||||
DeleteRegKey ${REG_ROOT} "${REG_APP_PATH}"
|
||||
DeleteRegKey ${REG_ROOT} "${UNINSTALL_PATH}"
|
||||
SectionEnd
|
||||
|
||||
######################################################################
|
||||
|
||||
Function .onInit
|
||||
IfSilent 0 +2
|
||||
StrCpy $nolaunch "--nolaunch"
|
||||
|
||||
IfSilent +5 0
|
||||
Loop:
|
||||
${nsProcess::FindProcess} ${MAIN_APP_EXE} $R0
|
||||
StrCmp $R0 0 0 NoAbort
|
||||
MessageBox MB_ABORTRETRYIGNORE|MB_ICONEXCLAMATION "${APP_NAME} is still running. Please shutdown ${APP_NAME} before continuing.$\r$\n$\r$\nIgnore will attempt to shutdown ${APP_NAME} for you." IDABORT End IDRETRY Loop
|
||||
${nsProcess::CloseProcess} ${MAIN_APP_EXE} $R0
|
||||
StrCmp $R0 0 0 NoAbort
|
||||
Goto Loop
|
||||
End:
|
||||
Abort
|
||||
NoAbort:
|
||||
FunctionEnd
|
||||
|
||||
Function un.onInit
|
||||
IfSilent +5 0
|
||||
Loop:
|
||||
${nsProcess::FindProcess} ${MAIN_APP_EXE} $R0
|
||||
StrCmp $R0 0 0 NoAbort
|
||||
MessageBox MB_ABORTRETRYIGNORE|MB_ICONEXCLAMATION "${APP_NAME} is still running. Please shutdown ${APP_NAME} before continuing.$\r$\n$\r$\nIgnore will attempt to shutdown ${APP_NAME} for you." IDABORT End IDRETRY Loop
|
||||
${nsProcess::CloseProcess} ${MAIN_APP_EXE} $R0
|
||||
StrCmp $R0 0 0 NoAbort
|
||||
Goto Loop
|
||||
End:
|
||||
Abort
|
||||
NoAbort:
|
||||
FunctionEnd
|
||||
|
||||
######################################################################
|
25
package/macos-scripts/preinstall
Executable file
25
package/macos-scripts/preinstall
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
function check_tautulli_running () {
|
||||
if pgrep -x "Tautulli" > /dev/null
|
||||
then
|
||||
dialogText=`osascript -e 'set dialogText to button returned of (display dialog "Tautulli is still running. Please shutdown Tautulli before continuing." buttons {"Retry", "Shutdown Tautulli", "Abort"})'`;
|
||||
|
||||
if [[ $dialogText == 'Retry' ]]
|
||||
then
|
||||
check_tautulli_running;
|
||||
elif [[ $dialogText == 'Shutdown Tautulli' ]]
|
||||
then
|
||||
pkill Tautulli
|
||||
while pgrep Tautulli > /dev/null; do sleep 1; done
|
||||
check_tautulli_running;
|
||||
elif [[ $dialogText == 'Abort' ]]
|
||||
then
|
||||
exit 1;
|
||||
fi
|
||||
else
|
||||
exit 0;
|
||||
fi
|
||||
}
|
||||
|
||||
check_tautulli_running;
|
BIN
package/nsis-plugins/nsProcess.dll
Normal file
BIN
package/nsis-plugins/nsProcess.dll
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue