mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
Create shortcut to run linphone from OUTPUT directory when building on Windows.
This commit is contained in:
parent
6771d22cef
commit
cfdc43e637
3 changed files with 39 additions and 0 deletions
31
cmake_builder/additional_steps.cmake
Normal file
31
cmake_builder/additional_steps.cmake
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
############################################################################
|
||||
# additional_steps.cmake
|
||||
# Copyright (C) 2017 Belledonne Communications, Grenoble France
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# Create a shortcut to linphone.exe in install prefix
|
||||
if(LINPHONE_BUILDER_TARGET STREQUAL linphoneqt AND 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}/linphone_package/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(linphoneqt_winshortcut ALL DEPENDS "${SHORTCUT_PATH}" TARGET_linphone_builder)
|
||||
endif()
|
||||
6
cmake_builder/linphone_package/winshortcut.vbs.in
Normal file
6
cmake_builder/linphone_package/winshortcut.vbs.in
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
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
|
||||
|
|
@ -24,3 +24,5 @@ lcb_external_source_paths("../linphone-desktop")
|
|||
|
||||
lcb_dependencies("linphone")
|
||||
|
||||
# Add config step for packaging
|
||||
set(LINPHONE_BUILDER_ADDITIONAL_CONFIG_STEPS "${CMAKE_CURRENT_LIST_DIR}/additional_steps.cmake")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue