Skip to content

Commit

Permalink
Fix Homebrew installation issue(#285)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
oliverhu authored and bayareabear committed Oct 23, 2018
1 parent bba41ff commit 5140bee
Show file tree
Hide file tree
Showing 17 changed files with 89 additions and 132 deletions.
6 changes: 5 additions & 1 deletion BPSampleApp/BPSampleApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@
BAB24F261DB5D45E00867756 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0900;
LastUpgradeCheck = 1000;
ORGANIZATIONNAME = LinkedIn;
TargetAttributes = {
BA4BCFC51DC47EC700592FA4 = {
Expand Down Expand Up @@ -740,13 +740,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -794,13 +796,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0910"
LastUpgradeVersion = "1000"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -110,7 +110,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -213,7 +212,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
6 changes: 6 additions & 0 deletions Bluepill-cli/BPInstanceTests/BPTestHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,10 @@
// Return the sample photo path.
+ (NSString *)samplePhotoPath;

// Return the path to the Debug iphone-simulator folder
+ (NSString *)debugIphoneSimulatorPath;

// Return path to the Debug folder
+ (NSString *)debugMacOSPath;

@end
18 changes: 12 additions & 6 deletions Bluepill-cli/BPInstanceTests/BPTestHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
// WITHOUT WARRANTIES OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

#import "BPTestHelper.h"

@implementation BPTestHelper

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

+ (NSString *)sampleTestScheme {
Expand Down Expand Up @@ -66,15 +65,22 @@ + (NSString *)samplePhotoPath {
}

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

#pragma mark - Helpers

+ (NSString *)derivedDataPath {
NSString *currentPath = [[NSBundle bundleForClass:[self class]] bundlePath];
return [[[currentPath stringByDeletingLastPathComponent]
stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"Debug-iphonesimulator"];
// 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.
return [[[[[[NSBundle bundleForClass:[self class]] bundlePath] stringByDeletingLastPathComponent] stringByDeletingLastPathComponent] stringByDeletingLastPathComponent] stringByDeletingLastPathComponent];
}

+ (NSString *)debugIphoneSimulatorPath {
return [[self derivedDataPath] stringByAppendingPathComponent:@"Products/Debug-iphonesimulator"];
}

+ (NSString *)debugMacOSPath {
return [[self derivedDataPath] stringByAppendingPathComponent:@"Products/Debug"];
}

@end
Loading

0 comments on commit 5140bee

Please sign in to comment.