From 8863e885707ad42ed2c2e028e1fbe8c505bb9db0 Mon Sep 17 00:00:00 2001 From: Mike Gelfand Date: Sun, 30 Sep 2018 13:37:30 +0300 Subject: [PATCH] Fix build with Xcode 10 For some reason, Mac client is the only project that references libtransmission files as if they were a part of its own project, and inconsistently so. Make the include/import style uniform an in line with other projects. Adjust Mac client include directory settings a bit along the way. --- Transmission.xcodeproj/project.pbxproj | 115 ++++++++---------- macosx/AboutWindowController.m | 4 +- macosx/AddMagnetWindowController.h | 1 + macosx/AddWindowController.h | 1 + macosx/BadgeView.h | 3 +- macosx/Badger.h | 3 +- macosx/BlocklistDownloaderViewController.h | 3 +- macosx/CMakeLists.txt | 2 + macosx/Controller.h | 4 +- macosx/Controller.m | 15 +-- macosx/CreatorWindowController.h | 5 +- macosx/CreatorWindowController.m | 6 +- macosx/DragOverlayWindow.h | 3 +- macosx/FileNameCell.m | 6 +- macosx/FileOutlineController.m | 3 +- macosx/FilePriorityCell.h | 1 + macosx/GlobalOptionsPopoverViewController.h | 2 +- macosx/InfoActivityViewController.h | 1 + macosx/InfoActivityViewController.m | 6 +- macosx/InfoFileViewController.h | 1 + macosx/InfoGeneralViewController.h | 1 + macosx/InfoOptionsViewController.h | 1 + macosx/InfoPeersViewController.h | 1 + macosx/InfoPeersViewController.m | 6 +- macosx/InfoTrackersViewController.h | 1 + macosx/InfoViewController.h | 1 - macosx/MessageWindowController.m | 5 +- macosx/NSStringAdditions.m | 6 +- macosx/PiecesView.m | 6 +- macosx/PrefsController.h | 3 +- macosx/PrefsController.m | 15 ++- .../QuickLookPlugin/GeneratePreviewForURL.m | 3 +- .../QuickLookPlugin/GenerateThumbnailForURL.m | 6 +- macosx/QuickLookPlugin/main.c | 5 - macosx/StatsWindowController.h | 3 +- macosx/StatusBarController.h | 2 +- macosx/StatusBarController.m | 4 +- macosx/StatusBarView.m | 3 +- macosx/Torrent.h | 3 +- macosx/Torrent.m | 10 +- macosx/TorrentGroup.m | 6 +- macosx/TorrentTableView.h | 3 +- macosx/TrackerCell.m | 6 +- macosx/TrackerNode.h | 3 +- macosx/VDKQueue/VDKQueue.h | 1 + macosx/VDKQueue/VDKQueue.m | 1 + 46 files changed, 151 insertions(+), 139 deletions(-) diff --git a/Transmission.xcodeproj/project.pbxproj b/Transmission.xcodeproj/project.pbxproj index 4a2cb33dd..c528fce6c 100644 --- a/Transmission.xcodeproj/project.pbxproj +++ b/Transmission.xcodeproj/project.pbxproj @@ -2256,15 +2256,15 @@ files = ( ); inputPaths = ( - "$(SRCROOT)/third-party/miniupnpc/VERSION", - "$(SRCROOT)/third-party/miniupnpc/miniupnpcstrings.h.in", + "third-party/miniupnpc/VERSION", + "third-party/miniupnpc/miniupnpcstrings.h.in", ); outputPaths = ( - "$(SRCROOT)/third-party/miniupnpc/miniupnpcstrings.h", + "third-party/miniupnpc/miniupnpcstrings.h", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd third-party/miniupnpc\nsh updateminiupnpcstrings.sh \"$SCRIPT_INPUT_FILE_0\" \"$SCRIPT_INPUT_FILE_1\" \"$SCRIPT_OUTPUT_FILE_0\""; + shellScript = "cd third-party/miniupnpc\nsh updateminiupnpcstrings.sh \"$SCRIPT_INPUT_FILE_0\" \"$SCRIPT_INPUT_FILE_1\" \"$SCRIPT_OUTPUT_FILE_0\"\n"; }; BE75C3510C729EE100DBEFE0 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2277,7 +2277,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/bash; - shellScript = "if [ ! -e ./third-party/libevent/include/event2/config.h -a ! ./third-party/macosx-libevent-config.h -ef ./third-party/libevent/include/event2/config.h ]; then ln -s ../../../macosx-libevent-config.h ./third-party/libevent/include/event2/config.h; fi\n\nif [ ! -e ./third-party/libevent/include/event2/event-config.h -a ! ./third-party/macosx-libevent-event-config.h -ef ./third-party/libevent/include/event2/event-config.h ]; then ln -s ../../../macosx-libevent-event-config.h ./third-party/libevent/include/event2/event-config.h; fi"; + shellScript = "cd third-party/libevent/include/event2\n\nif [ ! -e config.h -a ! ../../../macosx-libevent-config.h -ef config.h ]; then\n ln -s ../../../macosx-libevent-config.h config.h;\nfi\n\nif [ ! -e event-config.h -a ! ../../../macosx-libevent-event-config.h -ef event-config.h ]; then\n ln -s ../../../macosx-libevent-event-config.h event-config.h;\nfi\n"; }; C12F197C1E1AE55A0005E93F /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2287,11 +2287,11 @@ inputPaths = ( ); outputPaths = ( - "$(SRCROOT)/third-party/miniupnpc/miniupnp", + "third-party/miniupnpc/miniupnp", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd third-party/miniupnpc && rm -f miniupnp && ln -s . miniupnp"; + shellScript = "cd third-party/miniupnpc && rm -f miniupnp && ln -s . miniupnp\n"; }; C12F197D1E1AE6830005E93F /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2301,11 +2301,11 @@ inputPaths = ( ); outputPaths = ( - "$(SRCROOT)/third-party/libutp/libutp", + "third-party/libutp/libutp", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd third-party/libutp && rm -f libutp && ln -s . libutp"; + shellScript = "cd third-party/libutp && rm -f libutp && ln -s . libutp\n"; }; C12F197E1E1AE6D50005E93F /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2315,11 +2315,11 @@ inputPaths = ( ); outputPaths = ( - "$(SRCROOT)/third-party/dht/dht", + "third-party/dht/dht", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd third-party/dht && rm -f dht && ln -s . dht"; + shellScript = "cd third-party/dht && rm -f dht && ln -s . dht\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -2916,11 +2916,6 @@ "third-party/libutp", "third-party/miniupnpc", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/build/Development\"", - "\"$(SRCROOT)/build/Debug\"", - ); OTHER_CFLAGS = ( "$(inherited)", "-DWITH_UTP", @@ -2944,11 +2939,11 @@ CLANG_ENABLE_OBJC_ARC = YES; FRAMEWORK_SEARCH_PATHS = macosx; GCC_PREFIX_HEADER = macosx/Transmission_Prefix.pch; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks"; - LIBRARY_SEARCH_PATHS = ( + HEADER_SEARCH_PATHS = ( "$(inherited)", - "\"$(SRCROOT)/third-party/curl/lib\"", + ., ); + LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks"; PRODUCT_NAME = Transmission; WRAPPER_EXTENSION = app; }; @@ -2959,8 +2954,9 @@ buildSettings = { CLANG_ENABLE_OBJC_ARC = NO; HEADER_SEARCH_PATHS = ( - "third-party/curl/include", + "$(inherited)", ., + "third-party/libevent/include", ); PRODUCT_NAME = transmissioncli; }; @@ -2987,11 +2983,6 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_ARC = NO; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - ., - "third-party/libevent/include", - ); PRODUCT_NAME = "transmission-remote"; }; name = Debug; @@ -3039,9 +3030,9 @@ IBC_FLATTEN_NIBS = YES; IBC_NOTICES = NO; IBC_WARNINGS = YES; - INFOPLIST_FILE = "$(SRCROOT)/macosx/Info.plist"; + INFOPLIST_FILE = macosx/Info.plist; INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional"; - INFOPLIST_PREFIX_HEADER = "$(SRCROOT)/libtransmission/version.h"; + INFOPLIST_PREFIX_HEADER = libtransmission/version.h; INFOPLIST_PREPROCESS = YES; LIBRARY_SEARCH_PATHS = ( "third-party/curl/lib", @@ -3094,11 +3085,6 @@ "third-party/libutp", "third-party/miniupnpc", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/build/Development\"", - "\"$(SRCROOT)/build/Debug\"", - ); OTHER_CFLAGS = ( "$(inherited)", "-DWITH_UTP", @@ -3121,8 +3107,9 @@ buildSettings = { CLANG_ENABLE_OBJC_ARC = NO; HEADER_SEARCH_PATHS = ( - "third-party/curl/include", + "$(inherited)", ., + "third-party/libevent/include", ); PRODUCT_NAME = transmissioncli; }; @@ -3134,11 +3121,11 @@ CLANG_ENABLE_OBJC_ARC = YES; FRAMEWORK_SEARCH_PATHS = macosx; GCC_PREFIX_HEADER = macosx/Transmission_Prefix.pch; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks"; - LIBRARY_SEARCH_PATHS = ( + HEADER_SEARCH_PATHS = ( "$(inherited)", - "\"$(SRCROOT)/third-party/curl/lib\"", + ., ); + LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks"; PRODUCT_NAME = Transmission; WRAPPER_EXTENSION = app; }; @@ -3186,9 +3173,9 @@ IBC_FLATTEN_NIBS = YES; IBC_NOTICES = NO; IBC_WARNINGS = YES; - INFOPLIST_FILE = "$(SRCROOT)/macosx/Info.plist"; + INFOPLIST_FILE = macosx/Info.plist; INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional"; - INFOPLIST_PREFIX_HEADER = "$(SRCROOT)/libtransmission/version.h"; + INFOPLIST_PREFIX_HEADER = libtransmission/version.h; INFOPLIST_PREPROCESS = YES; LIBRARY_SEARCH_PATHS = ( "third-party/curl/lib", @@ -3267,9 +3254,9 @@ IBC_FLATTEN_NIBS = YES; IBC_NOTICES = NO; IBC_WARNINGS = YES; - INFOPLIST_FILE = "$(SRCROOT)/macosx/Info.plist"; + INFOPLIST_FILE = macosx/Info.plist; INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional"; - INFOPLIST_PREFIX_HEADER = "$(SRCROOT)/libtransmission/version.h"; + INFOPLIST_PREFIX_HEADER = libtransmission/version.h; INFOPLIST_PREPROCESS = YES; LIBRARY_SEARCH_PATHS = ( "third-party/curl/lib", @@ -3288,11 +3275,11 @@ CLANG_ENABLE_OBJC_ARC = YES; FRAMEWORK_SEARCH_PATHS = macosx; GCC_PREFIX_HEADER = macosx/Transmission_Prefix.pch; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks"; - LIBRARY_SEARCH_PATHS = ( + HEADER_SEARCH_PATHS = ( "$(inherited)", - "\"$(SRCROOT)/third-party/curl/lib\"", + ., ); + LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks"; PRODUCT_NAME = Transmission; WRAPPER_EXTENSION = app; }; @@ -3303,8 +3290,9 @@ buildSettings = { CLANG_ENABLE_OBJC_ARC = NO; HEADER_SEARCH_PATHS = ( - "third-party/curl/include", + "$(inherited)", ., + "third-party/libevent/include", ); PRODUCT_NAME = transmissioncli; }; @@ -3323,11 +3311,6 @@ "third-party/libutp", "third-party/miniupnpc", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/build/Development\"", - "\"$(SRCROOT)/build/Debug\"", - ); OTHER_CFLAGS = ( "$(inherited)", "-DWITH_UTP", @@ -3366,11 +3349,6 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_ARC = NO; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - ., - "third-party/libevent/include", - ); PRODUCT_NAME = "transmission-remote"; }; name = "Release - Debug"; @@ -3419,8 +3397,12 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_ARC = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Prefix.pch"; - INFOPLIST_FILE = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Info.plist"; + GCC_PREFIX_HEADER = "macosx/QuickLookPlugin/QuickLookPlugin-Prefix.pch"; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + ., + ); + INFOPLIST_FILE = "macosx/QuickLookPlugin/QuickLookPlugin-Info.plist"; INSTALL_PATH = /Library/QuickLook; OTHER_LDFLAGS = ""; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -3432,8 +3414,12 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_ARC = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Prefix.pch"; - INFOPLIST_FILE = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Info.plist"; + GCC_PREFIX_HEADER = "macosx/QuickLookPlugin/QuickLookPlugin-Prefix.pch"; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + ., + ); + INFOPLIST_FILE = "macosx/QuickLookPlugin/QuickLookPlugin-Info.plist"; INSTALL_PATH = /Library/QuickLook; OTHER_LDFLAGS = ""; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -3445,8 +3431,12 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_ARC = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Prefix.pch"; - INFOPLIST_FILE = "$(SRCROOT)/macosx/QuickLookPlugin/QuickLookPlugin-Info.plist"; + GCC_PREFIX_HEADER = "macosx/QuickLookPlugin/QuickLookPlugin-Prefix.pch"; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + ., + ); + INFOPLIST_FILE = "macosx/QuickLookPlugin/QuickLookPlugin-Info.plist"; INSTALL_PATH = /Library/QuickLook; OTHER_LDFLAGS = ""; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -3509,11 +3499,6 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ENABLE_OBJC_ARC = NO; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - ., - "third-party/libevent/include", - ); PRODUCT_NAME = "transmission-remote"; }; name = Release; diff --git a/macosx/AboutWindowController.m b/macosx/AboutWindowController.m index 06b509e5f..0e13dc445 100644 --- a/macosx/AboutWindowController.m +++ b/macosx/AboutWindowController.m @@ -20,9 +20,9 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ -#import "AboutWindowController.h" +#include -#include "version.h" +#import "AboutWindowController.h" @implementation AboutWindowController diff --git a/macosx/AddMagnetWindowController.h b/macosx/AddMagnetWindowController.h index eae943149..ac14c1608 100644 --- a/macosx/AddMagnetWindowController.h +++ b/macosx/AddMagnetWindowController.h @@ -21,6 +21,7 @@ *****************************************************************************/ #import + #import "Torrent.h" @class Controller; diff --git a/macosx/AddWindowController.h b/macosx/AddWindowController.h index 128105fbf..6bb264618 100644 --- a/macosx/AddWindowController.h +++ b/macosx/AddWindowController.h @@ -21,6 +21,7 @@ *****************************************************************************/ #import + #import "Torrent.h" @class Controller; diff --git a/macosx/BadgeView.h b/macosx/BadgeView.h index 450b54dff..7c8c0dff8 100644 --- a/macosx/BadgeView.h +++ b/macosx/BadgeView.h @@ -21,7 +21,8 @@ *****************************************************************************/ #import -#import + +#include @interface BadgeView : NSView { diff --git a/macosx/Badger.h b/macosx/Badger.h index 57aa74901..e42d0110d 100644 --- a/macosx/Badger.h +++ b/macosx/Badger.h @@ -21,7 +21,8 @@ *****************************************************************************/ #import -#import + +#include @class Torrent; diff --git a/macosx/BlocklistDownloaderViewController.h b/macosx/BlocklistDownloaderViewController.h index 399389006..40e9567a3 100644 --- a/macosx/BlocklistDownloaderViewController.h +++ b/macosx/BlocklistDownloaderViewController.h @@ -21,7 +21,8 @@ *****************************************************************************/ #import -#import + +#include @class PrefsController; diff --git a/macosx/CMakeLists.txt b/macosx/CMakeLists.txt index 4ba0c9b94..6a3d8314d 100644 --- a/macosx/CMakeLists.txt +++ b/macosx/CMakeLists.txt @@ -1,5 +1,7 @@ project(trmac) +include_directories(${CMAKE_SOURCE_DIR}) + if(CMAKE_GENERATOR STREQUAL "Xcode") set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC ON) else() diff --git a/macosx/Controller.h b/macosx/Controller.h index 2cad15dd1..43f3f3e69 100644 --- a/macosx/Controller.h +++ b/macosx/Controller.h @@ -21,8 +21,10 @@ *****************************************************************************/ #import -#import #import + +#include + #import "VDKQueue.h" @class AddMagnetWindowController; diff --git a/macosx/Controller.m b/macosx/Controller.m index 5c742c625..f0e96c9b3 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -25,6 +25,14 @@ #import #import +#import + +#include +#include +#include + +#import "VDKQueue.h" + #import "Controller.h" #import "Torrent.h" #import "TorrentGroup.h" @@ -58,13 +66,6 @@ #import "ExpandedPathToPathTransformer.h" #import "ExpandedPathToIconTransformer.h" -#import "transmission.h" -#import "utils.h" -#import "variant.h" - -#import "VDKQueue.h" -#import - #define TOOLBAR_CREATE @"Toolbar Create" #define TOOLBAR_OPEN_FILE @"Toolbar Open" #define TOOLBAR_OPEN_WEB @"Toolbar Open Web" diff --git a/macosx/CreatorWindowController.h b/macosx/CreatorWindowController.h index 73fa66b21..ae246459e 100644 --- a/macosx/CreatorWindowController.h +++ b/macosx/CreatorWindowController.h @@ -21,8 +21,9 @@ *****************************************************************************/ #import -#import "transmission.h" -#import "makemeta.h" + +#include +#include @interface CreatorWindowController : NSWindowController { diff --git a/macosx/CreatorWindowController.m b/macosx/CreatorWindowController.m index aa0f8af50..8dba93886 100644 --- a/macosx/CreatorWindowController.m +++ b/macosx/CreatorWindowController.m @@ -20,14 +20,14 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ +#include +#include // tr_urlIsValidTracker() + #import "CreatorWindowController.h" #import "Controller.h" #import "NSApplicationAdditions.h" #import "NSStringAdditions.h" -#import "transmission.h" // required by utils.h -#import "utils.h" // tr_urlIsValidTracker() - #define TRACKER_ADD_TAG 0 #define TRACKER_REMOVE_TAG 1 diff --git a/macosx/DragOverlayWindow.h b/macosx/DragOverlayWindow.h index 71a4b8ee9..1636e180d 100644 --- a/macosx/DragOverlayWindow.h +++ b/macosx/DragOverlayWindow.h @@ -21,7 +21,8 @@ *****************************************************************************/ #import -#import + +#include @interface DragOverlayWindow : NSWindow { diff --git a/macosx/FileNameCell.m b/macosx/FileNameCell.m index 509bb89c0..e3d051736 100644 --- a/macosx/FileNameCell.m +++ b/macosx/FileNameCell.m @@ -20,15 +20,15 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ +#include +#include + #import "FileNameCell.h" #import "FileOutlineView.h" #import "Torrent.h" #import "FileListNode.h" #import "NSStringAdditions.h" -#import "transmission.h" // required by utils.h -#import "utils.h" - #define PADDING_HORIZONAL 2.0 #define IMAGE_FOLDER_SIZE 16.0 #define IMAGE_ICON_SIZE 32.0 diff --git a/macosx/FileOutlineController.m b/macosx/FileOutlineController.m index 817a24993..4294b4f46 100644 --- a/macosx/FileOutlineController.m +++ b/macosx/FileOutlineController.m @@ -20,6 +20,8 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ +#import + #import "FileOutlineController.h" #import "Torrent.h" #import "FileListNode.h" @@ -29,7 +31,6 @@ #import "NSApplicationAdditions.h" #import "NSMutableArrayAdditions.h" #import "NSStringAdditions.h" -#import #define ROW_SMALL_HEIGHT 18.0 diff --git a/macosx/FilePriorityCell.h b/macosx/FilePriorityCell.h index 0c297f18a..423d45ddd 100644 --- a/macosx/FilePriorityCell.h +++ b/macosx/FilePriorityCell.h @@ -21,6 +21,7 @@ *****************************************************************************/ #import + #import "FileOutlineView.h" @interface FilePriorityCell : NSSegmentedCell diff --git a/macosx/GlobalOptionsPopoverViewController.h b/macosx/GlobalOptionsPopoverViewController.h index e5fd881ab..70979201c 100644 --- a/macosx/GlobalOptionsPopoverViewController.h +++ b/macosx/GlobalOptionsPopoverViewController.h @@ -22,7 +22,7 @@ #import -#import "transmission.h" +#include @interface GlobalOptionsPopoverViewController : NSViewController { diff --git a/macosx/InfoActivityViewController.h b/macosx/InfoActivityViewController.h index d09bec31d..487d27211 100644 --- a/macosx/InfoActivityViewController.h +++ b/macosx/InfoActivityViewController.h @@ -21,6 +21,7 @@ *****************************************************************************/ #import + #import "InfoViewController.h" @class PiecesView; diff --git a/macosx/InfoActivityViewController.m b/macosx/InfoActivityViewController.m index c13e4480c..0bf6b54b0 100644 --- a/macosx/InfoActivityViewController.m +++ b/macosx/InfoActivityViewController.m @@ -20,15 +20,15 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ +#include +#include //tr_getRatio() + #import "InfoActivityViewController.h" #import "NSApplicationAdditions.h" #import "NSStringAdditions.h" #import "PiecesView.h" #import "Torrent.h" -#include "transmission.h" // required by utils.h -#include "utils.h" //tr_getRatio() - #define PIECES_CONTROL_PROGRESS 0 #define PIECES_CONTROL_AVAILABLE 1 diff --git a/macosx/InfoFileViewController.h b/macosx/InfoFileViewController.h index 97ec63eb9..3e313fcd8 100644 --- a/macosx/InfoFileViewController.h +++ b/macosx/InfoFileViewController.h @@ -22,6 +22,7 @@ #import #import + #import "InfoViewController.h" @class FileOutlineController; diff --git a/macosx/InfoGeneralViewController.h b/macosx/InfoGeneralViewController.h index 9d6824df8..171f31fc4 100644 --- a/macosx/InfoGeneralViewController.h +++ b/macosx/InfoGeneralViewController.h @@ -21,6 +21,7 @@ *****************************************************************************/ #import + #import "InfoViewController.h" @interface InfoGeneralViewController : NSViewController diff --git a/macosx/InfoOptionsViewController.h b/macosx/InfoOptionsViewController.h index 9a91d7403..517e47a74 100644 --- a/macosx/InfoOptionsViewController.h +++ b/macosx/InfoOptionsViewController.h @@ -21,6 +21,7 @@ *****************************************************************************/ #import + #import "InfoViewController.h" @interface InfoOptionsViewController : NSViewController diff --git a/macosx/InfoPeersViewController.h b/macosx/InfoPeersViewController.h index af7daf7c2..4874c0c99 100644 --- a/macosx/InfoPeersViewController.h +++ b/macosx/InfoPeersViewController.h @@ -21,6 +21,7 @@ *****************************************************************************/ #import + #import "InfoViewController.h" @class WebSeedTableView; diff --git a/macosx/InfoPeersViewController.m b/macosx/InfoPeersViewController.m index 9e4e3ea0a..eb274a0f7 100644 --- a/macosx/InfoPeersViewController.m +++ b/macosx/InfoPeersViewController.m @@ -20,6 +20,9 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ +#include +#include + #import "InfoPeersViewController.h" #import "NSApplicationAdditions.h" #import "NSStringAdditions.h" @@ -27,9 +30,6 @@ #import "Torrent.h" #import "WebSeedTableView.h" -#import "transmission.h" // required by utils.h -#import "utils.h" - #define ANIMATION_ID_KEY @"animationId" #define WEB_SEED_ANIMATION_ID @"webSeed" diff --git a/macosx/InfoTrackersViewController.h b/macosx/InfoTrackersViewController.h index 2785fe31f..a46b6f24f 100644 --- a/macosx/InfoTrackersViewController.h +++ b/macosx/InfoTrackersViewController.h @@ -21,6 +21,7 @@ *****************************************************************************/ #import + #import "InfoViewController.h" @class Torrent; diff --git a/macosx/InfoViewController.h b/macosx/InfoViewController.h index e84c7175f..2fdb3fdeb 100644 --- a/macosx/InfoViewController.h +++ b/macosx/InfoViewController.h @@ -22,7 +22,6 @@ #import - @protocol InfoViewController - (void) setInfoForTorrents: (NSArray *) torrents; diff --git a/macosx/MessageWindowController.m b/macosx/MessageWindowController.m index 8b967f72c..5c00c8e7d 100644 --- a/macosx/MessageWindowController.m +++ b/macosx/MessageWindowController.m @@ -20,13 +20,14 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ +#include +#include + #import "MessageWindowController.h" #import "Controller.h" #import "NSApplicationAdditions.h" #import "NSMutableArrayAdditions.h" #import "NSStringAdditions.h" -#import -#import #define LEVEL_ERROR 0 #define LEVEL_INFO 1 diff --git a/macosx/NSStringAdditions.m b/macosx/NSStringAdditions.m index 61c7cf487..79db9959f 100644 --- a/macosx/NSStringAdditions.m +++ b/macosx/NSStringAdditions.m @@ -20,12 +20,12 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ +#include +#include + #import "NSApplicationAdditions.h" #import "NSStringAdditions.h" -#import "transmission.h" -#import "utils.h" - @interface NSString (Private) + (NSString *) stringForFileSizeLion: (uint64_t) size showUnitUnless: (NSString *) notAllowedUnit unitsUsed: (NSString **) unitUsed; diff --git a/macosx/PiecesView.m b/macosx/PiecesView.m index f41f477e9..0a86b6ed7 100644 --- a/macosx/PiecesView.m +++ b/macosx/PiecesView.m @@ -20,13 +20,13 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ +#include +#include + #import "PiecesView.h" #import "Torrent.h" #import "InfoWindowController.h" -#import "transmission.h" -#import "utils.h" - #define MAX_ACROSS 18 #define BETWEEN 1.0 diff --git a/macosx/PrefsController.h b/macosx/PrefsController.h index 5b8bb9b5d..e6ec1ecf5 100644 --- a/macosx/PrefsController.h +++ b/macosx/PrefsController.h @@ -21,7 +21,8 @@ *****************************************************************************/ #import -#import + +#include @class PortChecker; diff --git a/macosx/PrefsController.m b/macosx/PrefsController.m index 45e0534a2..327aff03c 100644 --- a/macosx/PrefsController.m +++ b/macosx/PrefsController.m @@ -20,6 +20,15 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ +#import + +#import + +#include +#include + +#import "VDKQueue.h" + #import "PrefsController.h" #import "BlocklistDownloaderViewController.h" #import "BlocklistScheduler.h" @@ -28,12 +37,6 @@ #import "BonjourController.h" #import "NSApplicationAdditions.h" #import "NSStringAdditions.h" -#import "VDKQueue.h" - -#import "transmission.h" -#import "utils.h" - -#import #define DOWNLOAD_FOLDER 0 #define DOWNLOAD_TORRENT 2 diff --git a/macosx/QuickLookPlugin/GeneratePreviewForURL.m b/macosx/QuickLookPlugin/GeneratePreviewForURL.m index 07d26ddbb..461617cbb 100644 --- a/macosx/QuickLookPlugin/GeneratePreviewForURL.m +++ b/macosx/QuickLookPlugin/GeneratePreviewForURL.m @@ -1,6 +1,7 @@ #import -#import "transmission.h" +#include + #import "NSStringAdditions.h" OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options); diff --git a/macosx/QuickLookPlugin/GenerateThumbnailForURL.m b/macosx/QuickLookPlugin/GenerateThumbnailForURL.m index e7c2cedce..478a468d5 100644 --- a/macosx/QuickLookPlugin/GenerateThumbnailForURL.m +++ b/macosx/QuickLookPlugin/GenerateThumbnailForURL.m @@ -1,6 +1,6 @@ -#include -#include -#include +#import +#import +#import OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize); void CancelThumbnailGeneration(void *thisInterface, QLThumbnailRequestRef thumbnail); diff --git a/macosx/QuickLookPlugin/main.c b/macosx/QuickLookPlugin/main.c index 5f23c2161..fb92098e1 100644 --- a/macosx/QuickLookPlugin/main.c +++ b/macosx/QuickLookPlugin/main.c @@ -7,11 +7,6 @@ // //============================================================================== - - - - - #include #include #include diff --git a/macosx/StatsWindowController.h b/macosx/StatsWindowController.h index 661b4f477..3028871e0 100644 --- a/macosx/StatsWindowController.h +++ b/macosx/StatsWindowController.h @@ -21,7 +21,8 @@ *****************************************************************************/ #import -#import + +#include @interface StatsWindowController : NSWindowController { diff --git a/macosx/StatusBarController.h b/macosx/StatusBarController.h index 54c86ca69..cc85e998e 100644 --- a/macosx/StatusBarController.h +++ b/macosx/StatusBarController.h @@ -22,7 +22,7 @@ #import -#import +#include @interface StatusBarController : NSViewController { diff --git a/macosx/StatusBarController.m b/macosx/StatusBarController.m index b57011b33..22c965aa6 100644 --- a/macosx/StatusBarController.m +++ b/macosx/StatusBarController.m @@ -20,11 +20,11 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ +#include + #import "StatusBarController.h" #import "NSStringAdditions.h" -#import "transmission.h" - #define STATUS_RATIO_TOTAL @"RatioTotal" #define STATUS_RATIO_SESSION @"RatioSession" #define STATUS_TRANSFER_TOTAL @"TransferTotal" diff --git a/macosx/StatusBarView.m b/macosx/StatusBarView.m index 2a46ac733..192c5df5f 100644 --- a/macosx/StatusBarView.m +++ b/macosx/StatusBarView.m @@ -20,9 +20,10 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ +#import + #import "StatusBarView.h" #import "NSApplicationAdditions.h" -#import @interface StatusBarView (Private) diff --git a/macosx/Torrent.h b/macosx/Torrent.h index 87b847955..09d8a7103 100644 --- a/macosx/Torrent.h +++ b/macosx/Torrent.h @@ -21,9 +21,10 @@ *****************************************************************************/ #import -#import #import +#include + @class FileListNode; typedef enum { diff --git a/macosx/Torrent.m b/macosx/Torrent.m index f561b0aa7..83db10b5a 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -20,6 +20,11 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ +#include +#include +#include +#include // tr_new() + #import "Torrent.h" #import "GroupsController.h" #import "FileListNode.h" @@ -27,11 +32,6 @@ #import "NSStringAdditions.h" #import "TrackerNode.h" -#import "log.h" -#import "transmission.h" // required by utils.h -#import "error.h" -#import "utils.h" // tr_new() - #define ETA_IDLE_DISPLAY_SEC (2*60) @interface Torrent (Private) diff --git a/macosx/TorrentGroup.m b/macosx/TorrentGroup.m index bab702f09..4c6601bba 100644 --- a/macosx/TorrentGroup.m +++ b/macosx/TorrentGroup.m @@ -20,13 +20,13 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ +#include +#include // tr_getRatio() + #import "TorrentGroup.h" #import "GroupsController.h" #import "Torrent.h" -#include "transmission.h" // required by utils.h -#include "utils.h" // tr_getRatio() - @implementation TorrentGroup - (id) initWithGroup: (NSInteger) group diff --git a/macosx/TorrentTableView.h b/macosx/TorrentTableView.h index e713b9600..61f492865 100644 --- a/macosx/TorrentTableView.h +++ b/macosx/TorrentTableView.h @@ -21,7 +21,8 @@ *****************************************************************************/ #import -#import + +#include @class Controller; @class Torrent; diff --git a/macosx/TrackerCell.m b/macosx/TrackerCell.m index 1a0566566..f4c53abce 100644 --- a/macosx/TrackerCell.m +++ b/macosx/TrackerCell.m @@ -20,12 +20,12 @@ * DEALINGS IN THE SOFTWARE. *****************************************************************************/ +#include +#include //tr_addressIsIP() + #import "TrackerCell.h" #import "TrackerNode.h" -#import "transmission.h" // required by utils.h -#import "utils.h" //tr_addressIsIP() - #define PADDING_HORIZONAL 3.0 #define PADDING_STATUS_HORIZONAL 3.0 #define ICON_SIZE 16.0 diff --git a/macosx/TrackerNode.h b/macosx/TrackerNode.h index d79280559..e4002fc8a 100644 --- a/macosx/TrackerNode.h +++ b/macosx/TrackerNode.h @@ -21,7 +21,8 @@ *****************************************************************************/ #import -#import + +#include @class Torrent; diff --git a/macosx/VDKQueue/VDKQueue.h b/macosx/VDKQueue/VDKQueue.h index f76b398db..c68792cdd 100755 --- a/macosx/VDKQueue/VDKQueue.h +++ b/macosx/VDKQueue/VDKQueue.h @@ -63,6 +63,7 @@ #import + #include #include diff --git a/macosx/VDKQueue/VDKQueue.m b/macosx/VDKQueue/VDKQueue.m index 303c6b8fe..c0c1f5a1d 100755 --- a/macosx/VDKQueue/VDKQueue.m +++ b/macosx/VDKQueue/VDKQueue.m @@ -22,6 +22,7 @@ #import #import "VDKQueue.h" + #import #import #include -- 2.40.0