Skip to content

Commit 5140bee

Browse files
Keqiu Hubayareabear
Keqiu Hu
authored andcommitted
Fix Homebrew installation issue(#285)
* Move more files to BluepillLib to get rid of duplicate symbol issue * Make BluepillLib static to make everyone lives better * Clean up project settings * Fix relative paths as BluepillLib & Bluepill are in different folders now * Remove CopyFiles stage and override OTHER_LDFLAGS field with empty * Remove LD_RUNPATH_SEARCH_PATHS in bluepilllib * Remove another CopyFiles phase in bp
1 parent bba41ff commit 5140bee

File tree

17 files changed

+89
-132
lines changed

17 files changed

+89
-132
lines changed

BPSampleApp/BPSampleApp.xcodeproj/project.pbxproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@
400400
BAB24F261DB5D45E00867756 /* Project object */ = {
401401
isa = PBXProject;
402402
attributes = {
403-
LastUpgradeCheck = 0900;
403+
LastUpgradeCheck = 1000;
404404
ORGANIZATIONNAME = LinkedIn;
405405
TargetAttributes = {
406406
BA4BCFC51DC47EC700592FA4 = {
@@ -740,13 +740,15 @@
740740
CLANG_WARN_BOOL_CONVERSION = YES;
741741
CLANG_WARN_COMMA = YES;
742742
CLANG_WARN_CONSTANT_CONVERSION = YES;
743+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
743744
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
744745
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
745746
CLANG_WARN_EMPTY_BODY = YES;
746747
CLANG_WARN_ENUM_CONVERSION = YES;
747748
CLANG_WARN_INFINITE_RECURSION = YES;
748749
CLANG_WARN_INT_CONVERSION = YES;
749750
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
751+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
750752
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
751753
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
752754
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -794,13 +796,15 @@
794796
CLANG_WARN_BOOL_CONVERSION = YES;
795797
CLANG_WARN_COMMA = YES;
796798
CLANG_WARN_CONSTANT_CONVERSION = YES;
799+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
797800
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
798801
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
799802
CLANG_WARN_EMPTY_BODY = YES;
800803
CLANG_WARN_ENUM_CONVERSION = YES;
801804
CLANG_WARN_INFINITE_RECURSION = YES;
802805
CLANG_WARN_INT_CONVERSION = YES;
803806
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
807+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
804808
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
805809
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
806810
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;

BPSampleApp/BPSampleApp.xcodeproj/xcshareddata/xcschemes/BPSampleApp.xcscheme

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0910"
3+
LastUpgradeVersion = "1000"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -110,7 +110,6 @@
110110
buildConfiguration = "Debug"
111111
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
112112
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
113-
language = ""
114113
shouldUseLaunchSchemeArgsEnv = "YES">
115114
<Testables>
116115
<TestableReference
@@ -213,7 +212,6 @@
213212
buildConfiguration = "Debug"
214213
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
215214
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
216-
language = ""
217215
launchStyle = "0"
218216
useCustomWorkingDirectory = "NO"
219217
ignoresPersistentStateOnLaunch = "NO"

Bluepill-cli/BPInstanceTests/BPTestHelper.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,10 @@
5353
// Return the sample photo path.
5454
+ (NSString *)samplePhotoPath;
5555

56+
// Return the path to the Debug iphone-simulator folder
57+
+ (NSString *)debugIphoneSimulatorPath;
58+
59+
// Return path to the Debug folder
60+
+ (NSString *)debugMacOSPath;
61+
5662
@end

Bluepill-cli/BPInstanceTests/BPTestHelper.m

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88
// WITHOUT WARRANTIES OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
99

1010
#import "BPTestHelper.h"
11-
1211
@implementation BPTestHelper
1312

1413
// Return the path to the sample app directory (path to XX.app)
1514
+ (NSString *)sampleAppPath {
16-
return [[self derivedDataPath] stringByAppendingString:@"/BPSampleApp.app"];
15+
return [[self debugIphoneSimulatorPath] stringByAppendingString:@"/BPSampleApp.app"];
1716
}
1817

1918
+ (NSString *)sampleTestScheme {
@@ -66,15 +65,22 @@ + (NSString *)samplePhotoPath {
6665
}
6766

6867
+ (NSString *)bpExecutablePath {
69-
return [[[[NSBundle bundleForClass:[self class]] bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"bp"];
68+
return [[self debugMacOSPath] stringByAppendingPathComponent:@"bp"];
7069
}
7170

7271
#pragma mark - Helpers
7372

7473
+ (NSString *)derivedDataPath {
75-
NSString *currentPath = [[NSBundle bundleForClass:[self class]] bundlePath];
76-
return [[[currentPath stringByDeletingLastPathComponent]
77-
stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"Debug-iphonesimulator"];
74+
// As a result of moving BluepillLib to a separate target, it no longer sits together with bp or bluepill binary but inside a ./build/Bluepill/Build/Intermediates.noindex/UninstalledProducts/ directory.
75+
return [[[[[[NSBundle bundleForClass:[self class]] bundlePath] stringByDeletingLastPathComponent] stringByDeletingLastPathComponent] stringByDeletingLastPathComponent] stringByDeletingLastPathComponent];
76+
}
77+
78+
+ (NSString *)debugIphoneSimulatorPath {
79+
return [[self derivedDataPath] stringByAppendingPathComponent:@"Products/Debug-iphonesimulator"];
80+
}
81+
82+
+ (NSString *)debugMacOSPath {
83+
return [[self derivedDataPath] stringByAppendingPathComponent:@"Products/Debug"];
7884
}
7985

8086
@end

0 commit comments

Comments
 (0)