mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Merge pull request #3026 from Laserlicht/firewall_rules
install firewall rules with installer
This commit is contained in:
commit
1fcbe8df5f
@ -752,14 +752,21 @@ if(WIN32)
|
||||
else()
|
||||
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
|
||||
endif()
|
||||
|
||||
if(ENABLE_LAUNCHER)
|
||||
set(CPACK_PACKAGE_EXECUTABLES "VCMI_launcher;VCMI")
|
||||
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS " CreateShortCut \\\"$DESKTOP\\\\VCMI.lnk\\\" \\\"$INSTDIR\\\\VCMI_launcher.exe\\\"")
|
||||
set(VCMI_MAIN_EXECUTABLE "VCMI_launcher")
|
||||
else()
|
||||
set(CPACK_PACKAGE_EXECUTABLES "VCMI_client;VCMI")
|
||||
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS " CreateShortCut \\\"$DESKTOP\\\\VCMI.lnk\\\" \\\"$INSTDIR\\\\VCMI_client.exe\\\"")
|
||||
set(VCMI_MAIN_EXECUTABLE "VCMI_client")
|
||||
endif()
|
||||
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS " Delete \\\"$DESKTOP\\\\VCMI.lnk\\\" ")
|
||||
set(CPACK_PACKAGE_EXECUTABLES "${VCMI_MAIN_EXECUTABLE};VCMI")
|
||||
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
|
||||
CreateShortCut \\\"$DESKTOP\\\\VCMI.lnk\\\" \\\"$INSTDIR\\\\${VCMI_MAIN_EXECUTABLE}.exe\\\"
|
||||
ExecShell '' 'netsh' 'advfirewall firewall add rule name=vcmi_server dir=in action=allow program=\\\"$INSTDIR\\\\vcmi_server.exe\\\" enable=yes profile=public,private' SW_HIDE
|
||||
")
|
||||
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
|
||||
Delete \\\"$DESKTOP\\\\VCMI.lnk\\\"
|
||||
ExecShell '' 'netsh' 'advfirewall firewall delete rule name=vcmi_server' SW_HIDE
|
||||
")
|
||||
|
||||
# Strip MinGW CPack target if build configuration without debug info
|
||||
if(MINGW)
|
||||
|
Loading…
Reference in New Issue
Block a user