Commit 5b9d620e authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Create a windows shortcut to linphone.exe in the install directory on Windows...

Create a windows shortcut to linphone.exe in the install directory on Windows when building for desktop.
parent f59762c4
...@@ -97,3 +97,16 @@ endif() ...@@ -97,3 +97,16 @@ endif()
if(WIN32) if(WIN32)
set(EP_vpx_LINKING_TYPE "--enable-static" "--disable-shared" "--enable-pic") set(EP_vpx_LINKING_TYPE "--enable-static" "--disable-shared" "--enable-pic")
endif() endif()
# Create a shortcut to linphone.exe in install prefix
if(WIN32)
set(SHORTCUT_PATH "${CMAKE_INSTALL_PREFIX}/linphone.lnk")
set(SHORTCUT_TARGET_PATH "${CMAKE_INSTALL_PREFIX}/bin/linphone.exe")
set(SHORTCUT_WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/configs/desktop/winshortcut.vbs.in" "${CMAKE_CURRENT_BINARY_DIR}/winshortcut.vbs" @ONLY)
add_custom_command(OUTPUT "${SHORTCUT_PATH}"
COMMAND "cscript" "${CMAKE_CURRENT_BINARY_DIR}/winshortcut.vbs"
)
add_custom_target(linphone_winshortcut ALL DEPENDS "${SHORTCUT_PATH}" TARGET_linphone)
endif()
Set oWS = WScript.CreateObject("WScript.Shell")
sLinkFile = "@SHORTCUT_PATH@"
Set oLink = oWS.CreateShortcut(sLinkFile)
oLink.TargetPath = "@SHORTCUT_TARGET_PATH@"
oLink.WorkingDirectory = "@SHORTCUT_WORKING_DIRECTORY@"
oLink.Save
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment