@@ -6,8 +6,7 @@ @implementation ApplicationDelegate
6
6
@synthesize blockstackProxyTask;
7
7
@synthesize corsProxyTask;
8
8
@synthesize blockstackCoreConfigFilePath;
9
- @synthesize blockstackWrapperScriptPath;
10
- @synthesize blockstackVenvPath;
9
+ @synthesize blockstackPath;
11
10
12
11
13
12
@@ -116,19 +115,20 @@ - (void)startBlockstackCoreApiwithCoreWalletPassword:(NSString*)coreWalletPasswo
116
115
NSString *archivePath=[mainBundle pathForResource: @" blockstack-venv.tar" ofType: @" gz" ];
117
116
NSLog (@" Blockstack Virtualenv archive path: %@ " , archivePath);
118
117
119
- self.blockstackWrapperScriptPath = [mainBundle pathForResource: @" blockstack-wrapper-mac" ofType: @" sh" ];
120
- NSLog (@" Blockstack wrapper script path: %@ " , self.blockstackWrapperScriptPath );
121
-
122
118
123
- NSString *extractToPath = [self blockstackDataPath ];
119
+
120
+ // NSString *extractToPath = [self blockstackDataPath];
121
+ NSString * extractToPath = @" /tmp" ;
124
122
NSLog (@" Extract Blockstack venv to: %@ " , extractToPath);
125
123
126
124
self.blockstackCoreConfigFilePath = [NSString stringWithFormat: @" %@ /config/client.ini" , [self blockstackDataPath ]];
127
125
NSLog (@" Blockstack Core config file path: %@ " , self.blockstackCoreConfigFilePath );
128
126
129
- self. blockstackVenvPath = [NSString stringWithFormat: @" %@ /blockstack-venv" , extractToPath];
130
- NSLog (@" Blockstack Virtualenv Path: %@ " , self. blockstackVenvPath );
127
+ NSString * blockstackVenvPath = [NSString stringWithFormat: @" %@ /blockstack-venv" , extractToPath];
128
+ NSLog (@" Blockstack Virtualenv Path: %@ " , blockstackVenvPath);
131
129
130
+ self.blockstackPath = [NSString stringWithFormat: @" %@ /bin/blockstack" , blockstackVenvPath];
131
+ NSLog (@" Blockstack Path: %@ " , blockstackPath);
132
132
133
133
NSTask *extractTask = [[NSTask alloc ] init ];
134
134
NSTask * blockstackCoreApiSetupTask = [[NSTask alloc ] init ];
@@ -161,10 +161,9 @@ - (void)startBlockstackCoreApiwithCoreWalletPassword:(NSString*)coreWalletPasswo
161
161
162
162
/* Blockstack Core setup task */
163
163
164
- blockstackCoreApiSetupTask.launchPath = @" /bin/bash " ;
164
+ blockstackCoreApiSetupTask.launchPath = blockstackPath ;
165
165
166
- blockstackCoreApiSetupTask.arguments = @[self .blockstackWrapperScriptPath, self .blockstackVenvPath, @" --debug" , @" -y" , @" --config" , self .blockstackCoreConfigFilePath, @" setup" , @" --password" , coreWalletPassword];
167
- NSLog (@" HERE!!!" );
166
+ blockstackCoreApiSetupTask.arguments = @[@" --debug" , @" -y" , @" --config" , self .blockstackCoreConfigFilePath, @" setup" , @" --password" , coreWalletPassword];
168
167
169
168
NSPipe *setupPipe = [[NSPipe alloc ] init ];
170
169
[blockstackCoreApiSetupTask setStandardOutput: setupPipe];
@@ -186,9 +185,9 @@ - (void)startBlockstackCoreApiwithCoreWalletPassword:(NSString*)coreWalletPasswo
186
185
/* Blockstack Core api start task */
187
186
188
187
189
- blockstackCoreApiStartTask.launchPath = @" /bin/bash " ;
188
+ blockstackCoreApiStartTask.launchPath = self. blockstackPath ;
190
189
191
- blockstackCoreApiStartTask.arguments = @[self .blockstackWrapperScriptPath, self .blockstackVenvPath, @" --debug" , @" -y" , @" --config" , self .blockstackCoreConfigFilePath, @" api" , @" start" , @" --password" , coreWalletPassword];
190
+ blockstackCoreApiStartTask.arguments = @[@" --debug" , @" -y" , @" --config" , self .blockstackCoreConfigFilePath, @" api" , @" start" , @" --password" , coreWalletPassword];
192
191
193
192
NSPipe *startPipe = [[NSPipe alloc ] init ];
194
193
[blockstackCoreApiStartTask setStandardOutput: startPipe];
@@ -216,9 +215,9 @@ -(void)stopBlockstackCoreApiAndExit
216
215
217
216
NSTask * blockstackCoreApiStopTask = [[NSTask alloc ] init ];
218
217
219
- blockstackCoreApiStopTask.launchPath = @" /bin/bash " ;
218
+ blockstackCoreApiStopTask.launchPath = self. blockstackPath ;
220
219
221
- blockstackCoreApiStopTask.arguments = @[self .blockstackWrapperScriptPath, self .blockstackVenvPath, @" --debug" , @" -y" , @" --config" , self .blockstackCoreConfigFilePath, @" api" , @" stop" ];
220
+ blockstackCoreApiStopTask.arguments = @[@" --debug" , @" -y" , @" --config" , self .blockstackCoreConfigFilePath, @" api" , @" stop" ];
222
221
223
222
NSPipe *pipe = [[NSPipe alloc ] init ];
224
223
[blockstackCoreApiStopTask setStandardOutput: pipe];
0 commit comments