Packaging: more human-friendly names on macOS...

At least it appears that way (just the symlinks are renamed).
This commit is contained in:
Michael Kavanagh 2020-12-23 19:12:43 +00:00 committed by Ian McInerney
parent 08b93bd5ba
commit 9546ad88b5
3 changed files with 17 additions and 17 deletions

View File

@ -526,7 +526,7 @@ else()
CACHE PATH "Location of KiCad binaries." FORCE )
# some paths to single app bundle
set( OSX_BUNDLE_MAIN "kicad.app" )
set( OSX_BUNDLE_MAIN "KiCad.app" )
set( OSX_BUNDLE_BIN_DIR "Contents/MacOS" )
set( OSX_BUNDLE_LIB_DIR "Contents/Frameworks" )
set( OSX_BUNDLE_KIFACE_DIR "Contents/PlugIns" )
@ -544,7 +544,7 @@ else()
set( OSX_BUNDLE_INSTALL_PLUGIN_DIR "${OSX_BUNDLE_INSTALL_DIR}/${OSX_BUNDLE_KIFACE_DIR}" )
# everything provided with the application bundle goes into
# kicad.app/Contents/SharedSupport => accessible via GetDataDir()
# KiCad.app/Contents/SharedSupport => accessible via GetDataDir()
# everything else to the .dmg image
set( KICAD_DATA ${OSX_BUNDLE_INSTALL_DIR}/${OSX_BUNDLE_SUP_DIR}
CACHE PATH "Location of KiCad data files." FORCE )
@ -904,12 +904,12 @@ if( APPLE )
install( CODE "
message( STATUS \"Removing existing application bundles...\" )
# Remove links to standalone apps
file( REMOVE ${KICAD_BIN}/bitmap2component.app )
file( REMOVE ${KICAD_BIN}/eeschema.app )
file( REMOVE ${KICAD_BIN}/gerbview.app )
file( REMOVE ${KICAD_BIN}/pcb_calculator.app )
file( REMOVE ${KICAD_BIN}/pcbnew.app )
file( REMOVE ${KICAD_BIN}/pl_editor.app )
file( REMOVE \"${KICAD_BIN}/Bitmap2Component.app\" )
file( REMOVE \"${KICAD_BIN}/Eeschema.app\" )
file( REMOVE \"${KICAD_BIN}/GerbView.app\" )
file( REMOVE \"${KICAD_BIN}/PCB Calculator.app\" )
file( REMOVE \"${KICAD_BIN}/Pcbnew.app\" )
file( REMOVE \"${KICAD_BIN}/Page Layout Editor.app\" )
# Remove main bundle
file( REMOVE_RECURSE ${KICAD_BIN}/${OSX_BUNDLE_MAIN} )
" COMPONENT Runtime

View File

@ -157,7 +157,7 @@ if( APPLE )
# move all individual app bundles into main bundle
install( CODE "
# helper function to move a bundle into main bundle
function( move_to_main_bundle bundle_name )
function( move_to_main_bundle bundle_name symlink_name )
message( STATUS \"Moving \${bundle_name} into main bundle...\" )
file( MAKE_DIRECTORY ${OSX_BUNDLE_INSTALL_DIR}/${OSX_BUNDLE_APP_DIR} )
file( REMOVE_RECURSE ${KICAD_BIN}/\${bundle_name}/${OSX_BUNDLE_LIB_DIR} )
@ -166,18 +166,18 @@ if( APPLE )
WORKING_DIRECTORY ${OSX_BUNDLE_INSTALL_DIR}/${OSX_BUNDLE_APP_DIR}/\${bundle_name}/Contents
)
# create a top-level link pointing inside main bundle
execute_process( COMMAND ${CMAKE_COMMAND} -E create_symlink \"${OSX_BUNDLE_MAIN}/${OSX_BUNDLE_APP_DIR}/\${bundle_name}\" \"\${bundle_name}\"
execute_process( COMMAND ${CMAKE_COMMAND} -E create_symlink \"${OSX_BUNDLE_MAIN}/${OSX_BUNDLE_APP_DIR}/\${bundle_name}\" \"\${symlink_name}\"
WORKING_DIRECTORY ${KICAD_BIN}
)
endfunction( move_to_main_bundle )
# move all app bundles
move_to_main_bundle( bitmap2component.app )
move_to_main_bundle( eeschema.app )
move_to_main_bundle( gerbview.app )
move_to_main_bundle( pcb_calculator.app )
move_to_main_bundle( pcbnew.app )
move_to_main_bundle( pl_editor.app )
move_to_main_bundle( \"bitmap2component.app\" \"Bitmap2Component.app\" )
move_to_main_bundle( \"eeschema.app\" \"Eeschema.app\" )
move_to_main_bundle( \"gerbview.app\" \"GerbView.app\" )
move_to_main_bundle( \"pcb_calculator.app\" \"PCB Calculator.app\" )
move_to_main_bundle( \"pcbnew.app\" \"Pcbnew.app\" )
move_to_main_bundle( \"pl_editor.app\" \"Page Layout Editor.app\" )
" COMPONENT Runtime
)
endif()