mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
Initial Mac support in CMake configuration
This commit is contained in:
@@ -3,6 +3,8 @@ project(transmission)
|
|||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
||||||
|
|
||||||
|
set(CMAKE_MACOSX_RPATH ON)
|
||||||
|
|
||||||
include(CheckIncludeFile)
|
include(CheckIncludeFile)
|
||||||
include(CheckIncludeFiles)
|
include(CheckIncludeFiles)
|
||||||
include(CheckFunctionExists)
|
include(CheckFunctionExists)
|
||||||
@@ -14,6 +16,7 @@ include(TrMacros)
|
|||||||
option(ENABLE_DAEMON "Build daemon" ON)
|
option(ENABLE_DAEMON "Build daemon" ON)
|
||||||
tr_auto_option(ENABLE_GTK "Build GTK+ client" AUTO)
|
tr_auto_option(ENABLE_GTK "Build GTK+ client" AUTO)
|
||||||
tr_auto_option(ENABLE_QT "Build Qt client" AUTO)
|
tr_auto_option(ENABLE_QT "Build Qt client" AUTO)
|
||||||
|
tr_auto_option(ENABLE_MAC "Build Mac client" AUTO)
|
||||||
option(ENABLE_UTILS "Build utils (create, edit, show)" ON)
|
option(ENABLE_UTILS "Build utils (create, edit, show)" ON)
|
||||||
option(ENABLE_CLI "Build command-line client" OFF)
|
option(ENABLE_CLI "Build command-line client" OFF)
|
||||||
option(ENABLE_TESTS "Build unit tests" ON)
|
option(ENABLE_TESTS "Build unit tests" ON)
|
||||||
@@ -277,6 +280,21 @@ if(ENABLE_QT)
|
|||||||
tr_fixup_auto_option(ENABLE_QT QT_FOUND QT_IS_REQUIRED)
|
tr_fixup_auto_option(ENABLE_QT QT_FOUND QT_IS_REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_MAC)
|
||||||
|
tr_get_required_flag(ENABLE_MAC MAC_IS_REQUIRED)
|
||||||
|
|
||||||
|
if(APPLE)
|
||||||
|
set(MAC_FOUND ON)
|
||||||
|
else()
|
||||||
|
set(MAC_FOUND OFF)
|
||||||
|
if(MAC_IS_REQUIRED)
|
||||||
|
message(SEND_ERROR "Mac build is impossible on non-Mac system.")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
tr_fixup_auto_option(ENABLE_MAC MAC_FOUND MAC_IS_REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(ZLIB ${ZLIB_MINIMUM})
|
find_package(ZLIB ${ZLIB_MINIMUM})
|
||||||
if(ZLIB_FOUND)
|
if(ZLIB_FOUND)
|
||||||
add_definitions(-DHAVE_ZLIB)
|
add_definitions(-DHAVE_ZLIB)
|
||||||
@@ -287,10 +305,18 @@ set(THIRD_PARTY_DIR ${CMAKE_SOURCE_DIR}/third-party)
|
|||||||
if(WIN32)
|
if(WIN32)
|
||||||
tr_add_external_auto_library(EVENT2 libevent event)
|
tr_add_external_auto_library(EVENT2 libevent event)
|
||||||
else()
|
else()
|
||||||
|
set(EVENT2_CONFIGURE_FLAGS)
|
||||||
|
if(APPLE)
|
||||||
|
if(CRYPTO_PKG STREQUAL "openssl")
|
||||||
|
list(APPEND EVENT2_CONFIGURE_FLAGS "CPPFLAGS=-I${CRYPTO_INCLUDE_DIRS}")
|
||||||
|
else()
|
||||||
|
list(APPEND EVENT2_CONFIGURE_FLAGS "CPPFLAGS=-I${THIRD_PARTY_DIR}/openssl/include")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
tr_add_external_auto_library(EVENT2 libevent event
|
tr_add_external_auto_library(EVENT2 libevent event
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
CONFIGURE_COMMAND "<SOURCE_DIR>/autogen.sh"
|
CONFIGURE_COMMAND "<SOURCE_DIR>/autogen.sh"
|
||||||
COMMAND "<SOURCE_DIR>/configure" "--prefix=<INSTALL_DIR>" "--disable-shared")
|
COMMAND "<SOURCE_DIR>/configure" "--prefix=<INSTALL_DIR>" "--disable-shared" ${EVENT2_CONFIGURE_FLAGS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
tr_add_external_auto_library(NATPMP libnatpmp natpmp)
|
tr_add_external_auto_library(NATPMP libnatpmp natpmp)
|
||||||
@@ -510,20 +536,29 @@ if(ENABLE_TESTS)
|
|||||||
enable_testing()
|
enable_testing()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
function(tr_install_web DST_DIR)
|
||||||
|
install(DIRECTORY ${CMAKE_SOURCE_DIR}/web DESTINATION ${DST_DIR}
|
||||||
|
PATTERN *.am EXCLUDE
|
||||||
|
PATTERN *.in EXCLUDE
|
||||||
|
PATTERN *.scss EXCLUDE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
add_subdirectory(libtransmission)
|
add_subdirectory(libtransmission)
|
||||||
|
|
||||||
foreach(P daemon cli utils gtk qt)
|
set(MAC_PROJECT_DIR macosx)
|
||||||
|
|
||||||
|
foreach(P daemon cli utils gtk qt mac)
|
||||||
string(TOUPPER "${P}" P_ID)
|
string(TOUPPER "${P}" P_ID)
|
||||||
if(ENABLE_${P_ID})
|
if(ENABLE_${P_ID})
|
||||||
|
if(DEFINED ${P_ID}_PROJECT_DIR)
|
||||||
|
set(P ${${P_ID}_PROJECT_DIR})
|
||||||
|
endif()
|
||||||
add_subdirectory(${P})
|
add_subdirectory(${P})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if(ENABLE_DAEMON OR ENABLE_GTK OR ENABLE_QT)
|
if(ENABLE_DAEMON OR ENABLE_GTK OR ENABLE_QT)
|
||||||
install(DIRECTORY web DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${TR_NAME}
|
tr_install_web(${CMAKE_INSTALL_DATAROOTDIR}/${TR_NAME})
|
||||||
PATTERN *.am EXCLUDE
|
|
||||||
PATTERN *.in EXCLUDE
|
|
||||||
PATTERN *.scss EXCLUDE)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_GTK AND ENABLE_NLS)
|
if(ENABLE_GTK AND ENABLE_NLS)
|
||||||
|
|||||||
@@ -145,3 +145,41 @@ function(tr_select_library LIBNAMES FUNCNAME DIRS OVAR)
|
|||||||
endforeach()
|
endforeach()
|
||||||
set(${OVAR} "${LIBNAME}" PARENT_SCOPE)
|
set(${OVAR} "${LIBNAME}" PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
function(tr_fixup_bundle_item BUNDLE_DIR BUNDLE_ITEMS DEP_DIRS)
|
||||||
|
while(BUNDLE_ITEMS)
|
||||||
|
list(GET BUNDLE_ITEMS 0 ITEM)
|
||||||
|
list(REMOVE_AT BUNDLE_ITEMS 0)
|
||||||
|
|
||||||
|
set(ITEM_FULL_BUNDLE_PATH "${BUNDLE_DIR}/${ITEM}")
|
||||||
|
get_filename_component(ITEM_FULL_BUNDLE_DIR "${ITEM_FULL_BUNDLE_PATH}" PATH)
|
||||||
|
|
||||||
|
unset(ITEM_DEPS)
|
||||||
|
get_prerequisites("${ITEM_FULL_BUNDLE_PATH}" ITEM_DEPS 1 0 "${ITEM_FULL_BUNDLE_PATH}" "${DEP_DIRS}")
|
||||||
|
|
||||||
|
foreach(DEP IN LISTS ITEM_DEPS)
|
||||||
|
gp_resolve_item("${ITEM_FULL_BUNDLE_PATH}" "${DEP}" "${ITEM_FULL_BUNDLE_DIR}" "${DEP_DIRS}" DEP_FULL_PATH)
|
||||||
|
|
||||||
|
if(DEP_FULL_PATH MATCHES "[.]dylib$")
|
||||||
|
get_filename_component(DEP_NAME "${DEP_FULL_PATH}" NAME)
|
||||||
|
file(COPY "${DEP_FULL_PATH}" DESTINATION "${BUNDLE_DIR}/Contents/MacOS/")
|
||||||
|
set(DEP_BUNDLE_PATH "Contents/MacOS/${DEP_NAME}")
|
||||||
|
elseif(DEP_FULL_PATH MATCHES "^(.+)/(([^/]+[.]framework)/.+)$")
|
||||||
|
set(DEP_NAME "${CMAKE_MATCH_2}")
|
||||||
|
file(COPY "${CMAKE_MATCH_1}/${CMAKE_MATCH_3}" DESTINATION "${BUNDLE_DIR}/Contents/Frameworks/" PATTERN "Headers" EXCLUDE)
|
||||||
|
set(DEP_BUNDLE_PATH "Contents/Frameworks/${DEP_NAME}")
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Don't know how to fixup '${DEP_FULL_PATH}'")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
execute_process(COMMAND install_name_tool -change "${DEP}" "@rpath/${DEP_NAME}" "${ITEM_FULL_BUNDLE_PATH}")
|
||||||
|
|
||||||
|
set(DEP_FULL_BUNDLE_PATH "${BUNDLE_DIR}/${DEP_BUNDLE_PATH}")
|
||||||
|
execute_process(COMMAND chmod u+w "${DEP_FULL_BUNDLE_PATH}")
|
||||||
|
execute_process(COMMAND install_name_tool -id "@rpath/${DEP_NAME}" "${DEP_FULL_BUNDLE_PATH}")
|
||||||
|
|
||||||
|
list(REMOVE_ITEM BUNDLE_ITEMS "${DEP_BUNDLE_PATH}")
|
||||||
|
list(APPEND BUNDLE_ITEMS "${DEP_BUNDLE_PATH}")
|
||||||
|
endforeach()
|
||||||
|
endwhile()
|
||||||
|
endfunction()
|
||||||
|
|||||||
434
macosx/CMakeLists.txt
Normal file
434
macosx/CMakeLists.txt
Normal file
@@ -0,0 +1,434 @@
|
|||||||
|
project(trmac)
|
||||||
|
|
||||||
|
find_program(IBTOOL_EXECUTABLE ibtool REQUIRED)
|
||||||
|
find_program(TIFFUTIL_EXECUTABLE tiffutil REQUIRED)
|
||||||
|
find_program(INSTALL_NAME_TOOL_EXECUTABLE install_name_tool REQUIRED)
|
||||||
|
|
||||||
|
macro(tr_wrap_xib IFILE OFILE)
|
||||||
|
get_filename_component(twx_nib_dir "${OFILE}" DIRECTORY)
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT ${OFILE}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${twx_nib_dir}
|
||||||
|
COMMAND ${IBTOOL_EXECUTABLE} --compile ${OFILE} ${IFILE}
|
||||||
|
DEPENDS ${IFILE}
|
||||||
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
|
VERBATIM
|
||||||
|
)
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
function(tr_tiff_from_pngs OFILE)
|
||||||
|
get_filename_component(ODIR "${OFILE}" DIRECTORY)
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT ${OFILE}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${ODIR}
|
||||||
|
COMMAND ${TIFFUTIL_EXECUTABLE} -cathidpicheck ${ARGN} -out ${OFILE}
|
||||||
|
DEPENDS ${ARGN}
|
||||||
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
|
VERBATIM
|
||||||
|
)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_SOURCES
|
||||||
|
AboutWindowController.m
|
||||||
|
AddMagnetWindowController.m
|
||||||
|
AddWindowController.m
|
||||||
|
BadgeView.m
|
||||||
|
Badger.m
|
||||||
|
BlocklistDownloader.m
|
||||||
|
BlocklistDownloaderViewController.m
|
||||||
|
BlocklistScheduler.m
|
||||||
|
BonjourController.m
|
||||||
|
ButtonToolbarItem.m
|
||||||
|
ColorTextField.m
|
||||||
|
Controller.m
|
||||||
|
CreatorWindowController.m
|
||||||
|
DragOverlayView.m
|
||||||
|
DragOverlayWindow.m
|
||||||
|
ExpandedPathToIconTransformer.m
|
||||||
|
ExpandedPathToPathTransformer.m
|
||||||
|
FileListNode.m
|
||||||
|
FileNameCell.m
|
||||||
|
FileOutlineController.m
|
||||||
|
FileOutlineView.m
|
||||||
|
FilePriorityCell.m
|
||||||
|
FileRenameSheetController.m
|
||||||
|
FilterBarController.m
|
||||||
|
FilterBarView.m
|
||||||
|
FilterButton.m
|
||||||
|
GlobalOptionsPopoverViewController.m
|
||||||
|
GroupToolbarItem.m
|
||||||
|
GroupsController.m
|
||||||
|
GroupsPrefsController.m
|
||||||
|
InfoActivityViewController.m
|
||||||
|
InfoFileViewController.m
|
||||||
|
InfoGeneralViewController.m
|
||||||
|
InfoOptionsViewController.m
|
||||||
|
InfoPeersViewController.m
|
||||||
|
InfoTabButtonBack.m
|
||||||
|
InfoTabButtonCell.m
|
||||||
|
InfoTextField.m
|
||||||
|
InfoTrackersViewController.m
|
||||||
|
InfoWindowController.m
|
||||||
|
main.m
|
||||||
|
MessageWindowController.m
|
||||||
|
NSApplicationAdditions.m
|
||||||
|
NSImageAdditions.m
|
||||||
|
NSMutableArrayAdditions.m
|
||||||
|
NSStringAdditions.m
|
||||||
|
PeerProgressIndicatorCell.m
|
||||||
|
PeerTableView.m
|
||||||
|
PiecesView.m
|
||||||
|
PortChecker.m
|
||||||
|
PredicateEditorRowTemplateAny.m
|
||||||
|
PrefsController.m
|
||||||
|
PrefsWindow.m
|
||||||
|
ProgressGradients.m
|
||||||
|
ShareToolbarItem.m
|
||||||
|
ShareTorrentFileHelper.m
|
||||||
|
StatsWindowController.m
|
||||||
|
StatusBarController.m
|
||||||
|
StatusBarView.m
|
||||||
|
ToolbarSegmentedCell.m
|
||||||
|
Torrent.m
|
||||||
|
TorrentCell.m
|
||||||
|
TorrentGroup.m
|
||||||
|
TorrentTableView.m
|
||||||
|
TrackerCell.m
|
||||||
|
TrackerNode.m
|
||||||
|
TrackerTableView.m
|
||||||
|
URLSheetWindowController.m
|
||||||
|
WebSeedTableView.m
|
||||||
|
)
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_HEADERS
|
||||||
|
AboutWindowController.h
|
||||||
|
AddMagnetWindowController.h
|
||||||
|
AddWindowController.h
|
||||||
|
BadgeView.h
|
||||||
|
Badger.h
|
||||||
|
BlocklistDownloader.h
|
||||||
|
BlocklistDownloaderViewController.h
|
||||||
|
BlocklistScheduler.h
|
||||||
|
BonjourController.h
|
||||||
|
ButtonToolbarItem.h
|
||||||
|
ColorTextField.h
|
||||||
|
Controller.h
|
||||||
|
CreatorWindowController.h
|
||||||
|
DragOverlayView.h
|
||||||
|
DragOverlayWindow.h
|
||||||
|
ExpandedPathToIconTransformer.h
|
||||||
|
ExpandedPathToPathTransformer.h
|
||||||
|
FileListNode.h
|
||||||
|
FileNameCell.h
|
||||||
|
FileOutlineController.h
|
||||||
|
FileOutlineView.h
|
||||||
|
FilePriorityCell.h
|
||||||
|
FileRenameSheetController.h
|
||||||
|
FilterBarController.h
|
||||||
|
FilterBarView.h
|
||||||
|
FilterButton.h
|
||||||
|
GlobalOptionsPopoverViewController.h
|
||||||
|
GroupToolbarItem.h
|
||||||
|
GroupsController.h
|
||||||
|
GroupsPrefsController.h
|
||||||
|
InfoActivityViewController.h
|
||||||
|
InfoFileViewController.h
|
||||||
|
InfoGeneralViewController.h
|
||||||
|
InfoOptionsViewController.h
|
||||||
|
InfoPeersViewController.h
|
||||||
|
InfoTabButtonBack.h
|
||||||
|
InfoTabButtonCell.h
|
||||||
|
InfoTextField.h
|
||||||
|
InfoTrackersViewController.h
|
||||||
|
InfoViewController.h
|
||||||
|
InfoWindowController.h
|
||||||
|
MessageWindowController.h
|
||||||
|
NSApplicationAdditions.h
|
||||||
|
NSImageAdditions.h
|
||||||
|
NSMutableArrayAdditions.h
|
||||||
|
NSStringAdditions.h
|
||||||
|
PeerProgressIndicatorCell.h
|
||||||
|
PeerTableView.h
|
||||||
|
PiecesView.h
|
||||||
|
PortChecker.h
|
||||||
|
PredicateEditorRowTemplateAny.h
|
||||||
|
PrefsController.h
|
||||||
|
PrefsWindow.h
|
||||||
|
ProgressGradients.h
|
||||||
|
ShareToolbarItem.h
|
||||||
|
ShareTorrentFileHelper.h
|
||||||
|
StatsWindowController.h
|
||||||
|
StatusBarController.h
|
||||||
|
StatusBarView.h
|
||||||
|
ToolbarSegmentedCell.h
|
||||||
|
Torrent.h
|
||||||
|
TorrentCell.h
|
||||||
|
TorrentGroup.h
|
||||||
|
TorrentTableView.h
|
||||||
|
TrackerCell.h
|
||||||
|
TrackerNode.h
|
||||||
|
TrackerTableView.h
|
||||||
|
URLSheetWindowController.h
|
||||||
|
WebSeedTableView.h
|
||||||
|
)
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_XIB_FILES
|
||||||
|
AboutWindow.xib
|
||||||
|
BlocklistStatusWindow.xib
|
||||||
|
FileRenameSheetController.xib
|
||||||
|
FilterBar.xib
|
||||||
|
InfoFileView.xib
|
||||||
|
InfoPeersView.xib
|
||||||
|
InfoTrackersView.xib
|
||||||
|
InfoWindow.xib
|
||||||
|
MessageWindow.xib
|
||||||
|
StatsWindow.xib
|
||||||
|
StatusBar.xib
|
||||||
|
URLSheetWindow.xib
|
||||||
|
)
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_RESOURCES
|
||||||
|
Defaults.plist
|
||||||
|
Credits.rtf
|
||||||
|
sparkle_dsa_pub.pem
|
||||||
|
../COPYING
|
||||||
|
Images/Transmission.icns
|
||||||
|
Images/TransmissionDocument.icns
|
||||||
|
)
|
||||||
|
|
||||||
|
set_source_files_properties(${${PROJECT_NAME}_RESOURCES} PROPERTIES
|
||||||
|
MACOSX_PACKAGE_LOCATION Resources
|
||||||
|
)
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_HIDPI_IMAGES
|
||||||
|
ActionHover
|
||||||
|
ActionOn
|
||||||
|
Bandwidth
|
||||||
|
CleanupTemplate
|
||||||
|
CompleteCheck
|
||||||
|
CreateLarge
|
||||||
|
DownArrowGroupTemplate
|
||||||
|
DownArrowTemplate
|
||||||
|
FavIcon
|
||||||
|
Globe
|
||||||
|
Groups
|
||||||
|
GroupsNoneTemplate
|
||||||
|
InfoActivity
|
||||||
|
InfoFiles
|
||||||
|
InfoGeneral
|
||||||
|
InfoOptions
|
||||||
|
InfoPeers
|
||||||
|
InfoTracker
|
||||||
|
Lock
|
||||||
|
Magnet
|
||||||
|
PauseHover
|
||||||
|
PauseOff
|
||||||
|
PauseOn
|
||||||
|
PinTemplate
|
||||||
|
PriorityControlHigh
|
||||||
|
PriorityControlLow
|
||||||
|
PriorityControlNormal
|
||||||
|
PriorityHighTemplate
|
||||||
|
PriorityLowTemplate
|
||||||
|
PriorityNormalTemplate
|
||||||
|
PurpleDotFlat
|
||||||
|
PurpleDotGlossy
|
||||||
|
RedDotFlat
|
||||||
|
RedDotGlossy
|
||||||
|
Remote
|
||||||
|
ResumeHover
|
||||||
|
ResumeNoWaitHover
|
||||||
|
ResumeNoWaitOff
|
||||||
|
ResumeNoWaitOn
|
||||||
|
ResumeOff
|
||||||
|
ResumeOn
|
||||||
|
RevealHover
|
||||||
|
RevealOff
|
||||||
|
RevealOn
|
||||||
|
ToolbarCreateTemplate
|
||||||
|
ToolbarFilterTemplate
|
||||||
|
ToolbarInfoTemplate
|
||||||
|
ToolbarOpenTemplate
|
||||||
|
ToolbarOpenWebTemplate
|
||||||
|
ToolbarPauseAllTemplate
|
||||||
|
ToolbarPauseSelectedTemplate
|
||||||
|
ToolbarRemoveTemplate
|
||||||
|
ToolbarResumeAllTemplate
|
||||||
|
ToolbarResumeSelectedTemplate
|
||||||
|
Transfers
|
||||||
|
TurtleTemplate
|
||||||
|
UpArrowGroupTemplate
|
||||||
|
UpArrowTemplate
|
||||||
|
YellowDotFlat
|
||||||
|
YellowDotGlossy
|
||||||
|
YingYangGroupTemplate
|
||||||
|
YingYangTemplate
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach(IMG ${${PROJECT_NAME}_HIDPI_IMAGES})
|
||||||
|
set(IMG_DIR "Images/Images.xcassets/${IMG}.imageset")
|
||||||
|
list(APPEND ${PROJECT_NAME}_RESOURCES ${IMG_DIR}/${IMG}.png ${IMG_DIR}/${IMG}@2x.png)
|
||||||
|
if(COMBINE_HIDPI_ARTWORK)
|
||||||
|
list(APPEND ${PROJECT_NAME}_RESOURCES ${PROJECT_BINARY_DIR}/Images/${IMG}.tiff)
|
||||||
|
tr_tiff_from_pngs(${PROJECT_BINARY_DIR}/Images/${IMG}.tiff ${IMG_DIR}/${IMG}.png ${IMG_DIR}/${IMG}@2x.png)
|
||||||
|
set_source_files_properties(${PROJECT_BINARY_DIR}/Images/${IMG}.tiff PROPERTIES
|
||||||
|
MACOSX_PACKAGE_LOCATION Resources
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set_source_files_properties(${IMG_DIR}/${IMG}.png ${IMG_DIR}/${IMG}@2x.png PROPERTIES
|
||||||
|
MACOSX_PACKAGE_LOCATION Resources
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_LODPI_IMAGES
|
||||||
|
DownloadBadge
|
||||||
|
QuitBadge
|
||||||
|
UploadBadge
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach(IMG ${${PROJECT_NAME}_LODPI_IMAGES})
|
||||||
|
set(IMG_DIR "Images/Images.xcassets/${IMG}.imageset")
|
||||||
|
list(APPEND ${PROJECT_NAME}_RESOURCES ${IMG_DIR}/${IMG}.png)
|
||||||
|
set_source_files_properties(${IMG_DIR}/${IMG}.png PROPERTIES
|
||||||
|
MACOSX_PACKAGE_LOCATION Resources
|
||||||
|
)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_LINGUAS
|
||||||
|
da
|
||||||
|
de
|
||||||
|
en
|
||||||
|
es
|
||||||
|
fr
|
||||||
|
it
|
||||||
|
nl
|
||||||
|
pt_PT
|
||||||
|
ru
|
||||||
|
tr
|
||||||
|
)
|
||||||
|
|
||||||
|
if(ENABLE_NLS)
|
||||||
|
set(${PROJECT_NAME}_ENABLED_LINGUAS ${${PROJECT_NAME}_LINGUAS})
|
||||||
|
else()
|
||||||
|
set(${PROJECT_NAME}_ENABLED_LINGUAS en)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_LANG_XIB_FILES
|
||||||
|
AddMagnetWindow.xib
|
||||||
|
AddWindow.xib
|
||||||
|
Creator.xib
|
||||||
|
GlobalOptionsPopover.xib
|
||||||
|
GroupRules.xib
|
||||||
|
InfoActivityView.xib
|
||||||
|
InfoGeneralView.xib
|
||||||
|
InfoOptionsView.xib
|
||||||
|
MainMenu.xib
|
||||||
|
PrefsWindow.xib
|
||||||
|
)
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_LANG_STRINGS_FILES
|
||||||
|
InfoPlist.strings
|
||||||
|
Localizable.strings
|
||||||
|
)
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_NIB_FILES)
|
||||||
|
foreach(F ${${PROJECT_NAME}_XIB_FILES})
|
||||||
|
get_filename_component(F_BASE "${F}" NAME_WE)
|
||||||
|
set(F_NIB "${PROJECT_BINARY_DIR}/${F_BASE}.nib")
|
||||||
|
tr_wrap_xib("${F}" "${F_NIB}")
|
||||||
|
list(APPEND ${PROJECT_NAME}_NIB_FILES "${F_NIB}")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
set_source_files_properties(${${PROJECT_NAME}_NIB_FILES} PROPERTIES
|
||||||
|
MACOSX_PACKAGE_LOCATION Resources)
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_LINGUAS_XIB_FILES)
|
||||||
|
set(${PROJECT_NAME}_LINGUAS_NIB_FILES)
|
||||||
|
foreach(LANG ${${PROJECT_NAME}_ENABLED_LINGUAS})
|
||||||
|
set(${PROJECT_NAME}_${LANG}_NIB_FILES)
|
||||||
|
foreach(F ${${PROJECT_NAME}_LANG_XIB_FILES})
|
||||||
|
set(F_XIB "${LANG}.lproj/${F}")
|
||||||
|
get_filename_component(F_BASE "${F}" NAME_WE)
|
||||||
|
set(F_NIB "${PROJECT_BINARY_DIR}/${LANG}.lproj/${F_BASE}.nib")
|
||||||
|
tr_wrap_xib("${F_XIB}" "${F_NIB}")
|
||||||
|
list(APPEND ${PROJECT_NAME}_LINGUAS_XIB_FILES "${F_XIB}")
|
||||||
|
list(APPEND ${PROJECT_NAME}_LINGUAS_NIB_FILES "${F_NIB}")
|
||||||
|
list(APPEND ${PROJECT_NAME}_${LANG}_NIB_FILES "${F_NIB}")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_${LANG}_STRINGS_FILES)
|
||||||
|
foreach(F ${${PROJECT_NAME}_LANG_STRINGS_FILES})
|
||||||
|
list(APPEND ${PROJECT_NAME}_${LANG}_STRINGS_FILES ${LANG}.lproj/${F})
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
include_directories(
|
||||||
|
${CMAKE_SOURCE_DIR}/libtransmission
|
||||||
|
${PROJECT_SOURCE_DIR}/VDKQueue
|
||||||
|
)
|
||||||
|
|
||||||
|
add_definitions(
|
||||||
|
-Wno-unused-parameter
|
||||||
|
"-Wno-#warnings"
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(vdkqueue STATIC
|
||||||
|
VDKQueue/VDKQueue.m
|
||||||
|
VDKQueue/VDKQueue.h
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach(LANG ${${PROJECT_NAME}_ENABLED_LINGUAS})
|
||||||
|
list(APPEND ${PROJECT_NAME}_RESOURCES ${${PROJECT_NAME}_${LANG}_NIB_FILES} ${${PROJECT_NAME}_${LANG}_STRINGS_FILES})
|
||||||
|
set_source_files_properties(${${PROJECT_NAME}_${LANG}_NIB_FILES} ${${PROJECT_NAME}_${LANG}_STRINGS_FILES} PROPERTIES
|
||||||
|
MACOSX_PACKAGE_LOCATION Resources/${LANG}.lproj)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
add_executable(${TR_NAME}-mac MACOSX_BUNDLE
|
||||||
|
${${PROJECT_NAME}_SOURCES}
|
||||||
|
${${PROJECT_NAME}_HEADERS}
|
||||||
|
${${PROJECT_NAME}_XIB_FILES}
|
||||||
|
${${PROJECT_NAME}_NIB_FILES}
|
||||||
|
${${PROJECT_NAME}_LINGUAS_XIB_FILES}
|
||||||
|
${${PROJECT_NAME}_LINGUAS_NIB_FILES}
|
||||||
|
${${PROJECT_NAME}_RESOURCES}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(GROWL_FRAMEWORK Growl PATHS ${PROJECT_SOURCE_DIR} NO_DEFAULT_PATHS)
|
||||||
|
find_library(SPARKLE_FRAMEWORK Sparkle PATHS ${PROJECT_SOURCE_DIR} NO_DEFAULT_PATHS)
|
||||||
|
|
||||||
|
target_link_libraries(${TR_NAME}-mac
|
||||||
|
${TR_NAME}
|
||||||
|
vdkqueue
|
||||||
|
${GROWL_FRAMEWORK}
|
||||||
|
${SPARKLE_FRAMEWORK}
|
||||||
|
"-framework AppKit"
|
||||||
|
"-framework Carbon"
|
||||||
|
"-framework Foundation"
|
||||||
|
"-framework IOKit"
|
||||||
|
"-framework Quartz"
|
||||||
|
"-framework Security"
|
||||||
|
)
|
||||||
|
|
||||||
|
set(MAC_BUNDLE_NAME Transmission)
|
||||||
|
|
||||||
|
set_target_properties(${TR_NAME}-mac PROPERTIES
|
||||||
|
OUTPUT_NAME ${MAC_BUNDLE_NAME}
|
||||||
|
MACOSX_BUNDLE_GUI_IDENTIFIER "org.m0k.transmission"
|
||||||
|
MACOSX_BUNDLE_INFO_PLIST ${PROJECT_SOURCE_DIR}/Info.plist.in
|
||||||
|
INSTALL_RPATH "@executable_path;@executable_path/../Frameworks"
|
||||||
|
)
|
||||||
|
|
||||||
|
add_subdirectory(QuickLookPlugin)
|
||||||
|
|
||||||
|
install(TARGETS ${TR_NAME}-mac DESTINATION Applications)
|
||||||
|
|
||||||
|
install(DIRECTORY TransmissionHelp DESTINATION Applications/${MAC_BUNDLE_NAME}.app/Contents/Resources)
|
||||||
|
tr_install_web(Applications/${MAC_BUNDLE_NAME}.app/Contents/Resources)
|
||||||
|
|
||||||
|
install(CODE "
|
||||||
|
list(APPEND CMAKE_MODULE_PATH \"${CMAKE_SOURCE_DIR}/cmake\")
|
||||||
|
include(TrMacros)
|
||||||
|
include(GetPrerequisites)
|
||||||
|
tr_fixup_bundle_item(\"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/Applications/${MAC_BUNDLE_NAME}.app\" \"Contents/MacOS/${MAC_BUNDLE_NAME}\" \"${PROJECT_SOURCE_DIR}\")
|
||||||
|
")
|
||||||
@@ -20,6 +20,8 @@
|
|||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#import <AppKit/AppKit.h>
|
||||||
|
|
||||||
#import "ExpandedPathToIconTransformer.h"
|
#import "ExpandedPathToIconTransformer.h"
|
||||||
|
|
||||||
@implementation ExpandedPathToIconTransformer
|
@implementation ExpandedPathToIconTransformer
|
||||||
|
|||||||
133
macosx/Info.plist.in
Normal file
133
macosx/Info.plist.in
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en</string>
|
||||||
|
<key>CFBundleDocumentTypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeExtensions</key>
|
||||||
|
<array>
|
||||||
|
<string>torrent</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeIconFile</key>
|
||||||
|
<string>TransmissionDocument</string>
|
||||||
|
<key>CFBundleTypeName</key>
|
||||||
|
<string>BitTorrent Document</string>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Viewer</string>
|
||||||
|
<key>LSHandlerRank</key>
|
||||||
|
<string>Owner</string>
|
||||||
|
<key>LSItemContentTypes</key>
|
||||||
|
<array>
|
||||||
|
<string>org.bittorrent.torrent</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>Transmission</string>
|
||||||
|
<key>CFBundleGetInfoString</key>
|
||||||
|
<string>@TR_USER_AGENT_PREFIX@ (@TR_VCS_REVISION@)</string>
|
||||||
|
<key>CFBundleHelpBookFolder</key>
|
||||||
|
<string>TransmissionHelp</string>
|
||||||
|
<key>CFBundleHelpBookName</key>
|
||||||
|
<string>Transmission Help</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>Transmission</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>org.m0k.transmission</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>Transmission</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>@TR_USER_AGENT_PREFIX@</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>TR##</string>
|
||||||
|
<key>CFBundleURLTypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleURLName</key>
|
||||||
|
<string>BitTorrent Magnet URL</string>
|
||||||
|
<key>CFBundleURLSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>magnet</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>@TR_VCS_REVISION@</string>
|
||||||
|
<key>LSApplicationCategoryType</key>
|
||||||
|
<string>public.app-category.utilities</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>10.7.0</string>
|
||||||
|
<key>NSAppleScriptEnabled</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>NSAppTransportSecurity</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSAllowsArbitraryLoads</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>Copyright © 2005-2016 The Transmission Project</string>
|
||||||
|
<key>NSMainNibFile</key>
|
||||||
|
<string>MainMenu</string>
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string>NSApplication</string>
|
||||||
|
<key>NSServices</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>NSPortName</key>
|
||||||
|
<string>Transmission</string>
|
||||||
|
<key>NSSendTypes</key>
|
||||||
|
<array>
|
||||||
|
<string>NSStringPboardType</string>
|
||||||
|
<string>NSURLPboardType</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||||
|
<true/>
|
||||||
|
<key>SUAllowsAutomaticUpdates</key>
|
||||||
|
<false/>
|
||||||
|
<key>SUFeedURL</key>
|
||||||
|
<string>https://update.transmissionbt.com/appcast.xml</string>
|
||||||
|
<key>SUPublicDSAKeyFile</key>
|
||||||
|
<string>sparkle_dsa_pub.pem</string>
|
||||||
|
<key>SUScheduledCheckInterval</key>
|
||||||
|
<string>86400</string>
|
||||||
|
<key>UTExportedTypeDeclarations</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>UTTypeConformsTo</key>
|
||||||
|
<array>
|
||||||
|
<string>public.data</string>
|
||||||
|
<string>public.item</string>
|
||||||
|
<string>com.bittorrent.torrent</string>
|
||||||
|
</array>
|
||||||
|
<key>UTTypeDescription</key>
|
||||||
|
<string>BitTorrent Document</string>
|
||||||
|
<key>UTTypeIconFile</key>
|
||||||
|
<string>TransmissionDocument</string>
|
||||||
|
<key>UTTypeIdentifier</key>
|
||||||
|
<string>org.bittorrent.torrent</string>
|
||||||
|
<key>UTTypeReferenceURL</key>
|
||||||
|
<string>http://www.bittorrent.org/beps/bep_0000.html</string>
|
||||||
|
<key>UTTypeTagSpecification</key>
|
||||||
|
<dict>
|
||||||
|
<key>com.apple.ostype</key>
|
||||||
|
<string>TORR</string>
|
||||||
|
<key>public.filename-extension</key>
|
||||||
|
<array>
|
||||||
|
<string>torrent</string>
|
||||||
|
</array>
|
||||||
|
<key>public.mime-type</key>
|
||||||
|
<string>application/x-bittorrent</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -20,6 +20,8 @@
|
|||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#import <AppKit/AppKit.h>
|
||||||
|
|
||||||
#define NSByteCountFormatterMtLion NSClassFromString(@"NSByteCountFormatter")
|
#define NSByteCountFormatterMtLion NSClassFromString(@"NSByteCountFormatter")
|
||||||
#define NSUserNotificationMtLion NSClassFromString(@"NSUserNotification")
|
#define NSUserNotificationMtLion NSClassFromString(@"NSUserNotification")
|
||||||
#define NSUserNotificationCenterMtLion NSClassFromString(@"NSUserNotificationCenter")
|
#define NSUserNotificationCenterMtLion NSClassFromString(@"NSUserNotificationCenter")
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
@interface NSMutableArray (NSMutableArrayAdditions)
|
@interface NSMutableArray (NSMutableArrayAdditions)
|
||||||
|
|
||||||
- (void) moveObjectAtIndex: (NSUInteger) fromIndex toIndex: (NSUInteger) toIndex;
|
- (void) moveObjectAtIndex: (NSUInteger) fromIndex toIndex: (NSUInteger) toIndex;
|
||||||
|
|||||||
@@ -20,6 +20,9 @@
|
|||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <AppKit/AppKit.h>
|
||||||
|
|
||||||
@interface ProgressGradients : NSObject
|
@interface ProgressGradients : NSObject
|
||||||
|
|
||||||
+ (NSGradient *) progressWhiteGradient;
|
+ (NSGradient *) progressWhiteGradient;
|
||||||
|
|||||||
91
macosx/QuickLookPlugin/CMakeLists.txt
Normal file
91
macosx/QuickLookPlugin/CMakeLists.txt
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
project(trmacql)
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_SOURCES
|
||||||
|
../NSApplicationAdditions.m
|
||||||
|
../NSStringAdditions.m
|
||||||
|
GeneratePreviewForURL.m
|
||||||
|
GenerateThumbnailForURL.m
|
||||||
|
main.c
|
||||||
|
)
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_HEADERS
|
||||||
|
)
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_LINGUAS
|
||||||
|
da
|
||||||
|
de
|
||||||
|
en
|
||||||
|
es
|
||||||
|
fr
|
||||||
|
it
|
||||||
|
nl
|
||||||
|
pt_PT
|
||||||
|
ru
|
||||||
|
tr
|
||||||
|
)
|
||||||
|
|
||||||
|
if(ENABLE_NLS)
|
||||||
|
set(${PROJECT_NAME}_ENABLED_LINGUAS ${${PROJECT_NAME}_LINGUAS})
|
||||||
|
else()
|
||||||
|
set(${PROJECT_NAME}_ENABLED_LINGUAS en)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_LANG_STRINGS_FILES
|
||||||
|
Localizable.strings
|
||||||
|
)
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_RESOURCES
|
||||||
|
style.css
|
||||||
|
)
|
||||||
|
|
||||||
|
set_source_files_properties(${${PROJECT_NAME}_RESOURCES} PROPERTIES
|
||||||
|
MACOSX_PACKAGE_LOCATION Resources)
|
||||||
|
|
||||||
|
foreach(LANG ${${PROJECT_NAME}_ENABLED_LINGUAS})
|
||||||
|
set(${PROJECT_NAME}_${LANG}_STRINGS_FILES)
|
||||||
|
foreach(F ${${PROJECT_NAME}_LANG_STRINGS_FILES})
|
||||||
|
list(APPEND ${PROJECT_NAME}_${LANG}_STRINGS_FILES ${LANG}.lproj/${F})
|
||||||
|
list(APPEND ${PROJECT_NAME}_RESOURCES ${${PROJECT_NAME}_${LANG}_STRINGS_FILES})
|
||||||
|
set_source_files_properties(${${PROJECT_NAME}_${LANG}_STRINGS_FILES} PROPERTIES
|
||||||
|
MACOSX_PACKAGE_LOCATION Resources/${LANG}.lproj)
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
add_library(${TR_NAME}-mac-ql MODULE
|
||||||
|
${${PROJECT_NAME}_SOURCES}
|
||||||
|
${${PROJECT_NAME}_HEADERS}
|
||||||
|
${${PROJECT_NAME}_RESOURCES}
|
||||||
|
)
|
||||||
|
|
||||||
|
set(MAC_QL_BUNDLE_NAME QuickLookPlugin)
|
||||||
|
|
||||||
|
set_target_properties(${TR_NAME}-mac-ql PROPERTIES
|
||||||
|
OUTPUT_NAME ${MAC_QL_BUNDLE_NAME}
|
||||||
|
MACOSX_BUNDLE ON
|
||||||
|
BUNDLE ON
|
||||||
|
BUNDLE_EXTENSION qlgenerator
|
||||||
|
MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/Info.plist.in"
|
||||||
|
INSTALL_RPATH "@loader_path/../../../../../MacOS;@loader_path/../../../../../Frameworks"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(${TR_NAME}-mac-ql PRIVATE
|
||||||
|
..
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(${TR_NAME}-mac-ql
|
||||||
|
${TR_NAME}
|
||||||
|
"-framework Foundation"
|
||||||
|
"-framework CoreFoundation"
|
||||||
|
"-framework CoreServices"
|
||||||
|
"-framework AppKit"
|
||||||
|
"-framework QuickLook"
|
||||||
|
)
|
||||||
|
|
||||||
|
install(TARGETS ${TR_NAME}-mac-ql DESTINATION Applications/${MAC_BUNDLE_NAME}.app/Contents/Library/QuickLook)
|
||||||
|
|
||||||
|
install(CODE "
|
||||||
|
list(APPEND CMAKE_MODULE_PATH \"${CMAKE_SOURCE_DIR}/cmake\")
|
||||||
|
include(TrMacros)
|
||||||
|
include(GetPrerequisites)
|
||||||
|
tr_fixup_bundle_item(\"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/Applications/${MAC_BUNDLE_NAME}.app\" \"Contents/Library/QuickLook/${MAC_QL_BUNDLE_NAME}.qlgenerator/Contents/MacOS/${MAC_QL_BUNDLE_NAME}\" \"\")
|
||||||
|
")
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#import <QuickLook/QuickLook.h>
|
||||||
|
|
||||||
#import "transmission.h"
|
#import "transmission.h"
|
||||||
#import "NSStringAdditions.h"
|
#import "NSStringAdditions.h"
|
||||||
|
|
||||||
|
|||||||
62
macosx/QuickLookPlugin/Info.plist.in
Normal file
62
macosx/QuickLookPlugin/Info.plist.in
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleDocumentTypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>QLGenerator</string>
|
||||||
|
<key>LSItemContentTypes</key>
|
||||||
|
<array>
|
||||||
|
<string>org.bittorrent.torrent</string>
|
||||||
|
<string>com.bittorrent.torrent</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>QuickLookPlugin</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>org.m0k.transmission.QuickLookPlugin</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>QuickLookPlugin</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFPlugInDynamicRegisterFunction</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFPlugInDynamicRegistration</key>
|
||||||
|
<string>NO</string>
|
||||||
|
<key>CFPlugInFactories</key>
|
||||||
|
<dict>
|
||||||
|
<key>FDF02409-6B04-4738-973D-1AADB4FC34D8</key>
|
||||||
|
<string>QuickLookGeneratorPluginFactory</string>
|
||||||
|
</dict>
|
||||||
|
<key>CFPlugInTypes</key>
|
||||||
|
<dict>
|
||||||
|
<key>5E2D9680-5022-40FA-B806-43349622E5B9</key>
|
||||||
|
<array>
|
||||||
|
<string>FDF02409-6B04-4738-973D-1AADB4FC34D8</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
<key>CFPlugInUnloadFunction</key>
|
||||||
|
<string></string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>Copyright © 2005-2016 The Transmission Project</string>
|
||||||
|
<key>QLNeedsToBeRunInMainThread</key>
|
||||||
|
<false/>
|
||||||
|
<key>QLPreviewHeight</key>
|
||||||
|
<integer>600</integer>
|
||||||
|
<key>QLPreviewWidth</key>
|
||||||
|
<integer>600</integer>
|
||||||
|
<key>QLSupportsConcurrentRequests</key>
|
||||||
|
<true/>
|
||||||
|
<key>QLThumbnailMinimumSize</key>
|
||||||
|
<real>17</real>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -20,6 +20,8 @@
|
|||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#import <AppKit/AppKit.h>
|
||||||
|
|
||||||
@interface TorrentCell : NSActionCell
|
@interface TorrentCell : NSActionCell
|
||||||
{
|
{
|
||||||
NSUserDefaults * fDefaults;
|
NSUserDefaults * fDefaults;
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
// 3. This notice may not be removed or altered from any source
|
// 3. This notice may not be removed or altered from any source
|
||||||
// distribution.
|
// distribution.
|
||||||
|
|
||||||
|
#import <AppKit/AppKit.h>
|
||||||
|
|
||||||
#import "VDKQueue.h"
|
#import "VDKQueue.h"
|
||||||
#import <unistd.h>
|
#import <unistd.h>
|
||||||
#import <fcntl.h>
|
#import <fcntl.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user