1
1
# windows specific packaging
2
2
3
3
# see options at: https://cmake.org/cmake/help/latest/cpack_gen/nsis.html
4
- install (TARGETS sunshine RUNTIME DESTINATION "bin " COMPONENT application)
4
+ install (TARGETS sunshine RUNTIME DESTINATION ". " COMPONENT application)
5
5
6
6
# Hardening: include zlib1.dll (loaded via LoadLibrary() in openssl's libcrypto.a)
7
- install (FILES "${ZLIB} " DESTINATION "bin " COMPONENT application)
7
+ install (FILES "${ZLIB} " DESTINATION ". " COMPONENT application)
8
8
9
9
# Adding tools
10
- install (TARGETS dxgi-info RUNTIME DESTINATION "bin " COMPONENT dxgi)
11
- install (TARGETS audio-info RUNTIME DESTINATION "bin " COMPONENT audio)
10
+ install (TARGETS dxgi-info RUNTIME DESTINATION "tools " COMPONENT dxgi)
11
+ install (TARGETS audio-info RUNTIME DESTINATION "tools " COMPONENT audio)
12
12
13
13
# Mandatory tools
14
- install (TARGETS sunshinesvc RUNTIME DESTINATION "bin " COMPONENT application)
14
+ install (TARGETS sunshinesvc RUNTIME DESTINATION "tools " COMPONENT application)
15
15
16
16
# Mandatory scripts
17
17
install (DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR} /windows/misc/service/"
@@ -20,6 +20,9 @@ install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/service/"
20
20
install (DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR} /windows/misc/migration/"
21
21
DESTINATION "scripts"
22
22
COMPONENT assets)
23
+ install (DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR} /windows/misc/path/"
24
+ DESTINATION "scripts"
25
+ COMPONENT assets)
23
26
24
27
# Configurable options for the service
25
28
install (DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR} /windows/misc/autostart/"
@@ -64,6 +67,7 @@ SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
64
67
IfSilent +2 0
65
68
ExecShell 'open' 'https://docs.lizardbyte.dev/projects/sunshine'
66
69
nsExec::ExecToLog 'icacls \\\" $INSTDIR\\\" /reset'
70
+ nsExec::ExecToLog '\\\" $INSTDIR\\\\ scripts\\\\ update-path.bat\\\" add'
67
71
nsExec::ExecToLog '\\\" $INSTDIR\\\\ scripts\\\\ migrate-config.bat\\\" '
68
72
nsExec::ExecToLog '\\\" $INSTDIR\\\\ scripts\\\\ add-firewall-rule.bat\\\" '
69
73
nsExec::ExecToLog '\\\" $INSTDIR\\\\ scripts\\\\ install-gamepad.bat\\\" '
@@ -78,7 +82,7 @@ set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
78
82
"${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}
79
83
nsExec::ExecToLog '\\\" $INSTDIR\\\\ scripts\\\\ delete-firewall-rule.bat\\\" '
80
84
nsExec::ExecToLog '\\\" $INSTDIR\\\\ scripts\\\\ uninstall-service.bat\\\" '
81
- nsExec::ExecToLog '\\\" $INSTDIR\\\\ bin \\\\ ${CMAKE_PROJECT_NAME} .exe\\\" --restore-nvprefs-undo'
85
+ nsExec::ExecToLog '\\\" $INSTDIR\\\\ ${CMAKE_PROJECT_NAME} .exe\\\" --restore-nvprefs-undo'
82
86
MessageBox MB_YESNO|MB_ICONQUESTION \
83
87
'Do you want to remove Virtual Gamepad?' \
84
88
/SD IDNO IDNO NoGamepad
@@ -88,19 +92,20 @@ set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
88
92
'Do you want to remove $INSTDIR (this includes the configuration, cover images, and settings)?' \
89
93
/SD IDNO IDNO NoDelete
90
94
RMDir /r \\\" $INSTDIR\\\" ; skipped if no
95
+ nsExec::ExecToLog '\\\" $INSTDIR\\\\ scripts\\\\ update-path.bat\\\" remove'
91
96
NoDelete:
92
97
" )
93
98
94
99
# Adding an option for the start menu
95
- set (CPACK_NSIS_MODIFY_PATH ON )
100
+ set (CPACK_NSIS_MODIFY_PATH OFF )
96
101
set (CPACK_NSIS_EXECUTABLES_DIRECTORY "." )
97
102
# This will be shown on the installed apps Windows settings
98
103
set (CPACK_NSIS_INSTALLED_ICON_NAME "${CMAKE_PROJECT_NAME} .exe" )
99
104
set (CPACK_NSIS_CREATE_ICONS_EXTRA
100
105
"${CPACK_NSIS_CREATE_ICONS_EXTRA}
101
106
SetOutPath '\$ INSTDIR'
102
107
CreateShortCut '\$ SMPROGRAMS\\\\ $STARTMENU_FOLDER\\\\ ${CMAKE_PROJECT_NAME} .lnk' \
103
- '\$ INSTDIR\\\\ bin \\\\ ${CMAKE_PROJECT_NAME} .exe' '--shortcut'
108
+ '\$ INSTDIR\\\\ ${CMAKE_PROJECT_NAME} .exe' '--shortcut'
104
109
" )
105
110
set (CPACK_NSIS_DELETE_ICONS_EXTRA
106
111
"${CPACK_NSIS_DELETE_ICONS_EXTRA}
0 commit comments