wtapack 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 604553c1b3bfa8cb3283e11eb20ed9f09a7811c6
4
- data.tar.gz: 6dd7295e7c5cc77d75c6f421193f6eb8ae8e8b41
3
+ metadata.gz: a467b4fe58a67be2946fa2e6618aefd53ffb5b01
4
+ data.tar.gz: e25496b8d78f65bf579ca4a2f7cab56ceb5784e3
5
5
  SHA512:
6
- metadata.gz: 70c63aea7cce7192fb27990e9270d4dbcea851d68e731e8e2e0538fd22555e1c84e968ed2dcd3828f97da10da4cdad1058518009e7f4382850ac5b9fedb91581
7
- data.tar.gz: 4e30560aca9a8a7ff24cf52c7c5caa9c905cc5c9decf938b4ab1f2fe8850b293f47fe1d3e3e257087544e777d9ab8bfdb20d8f2c3327ea16ebcf6052d0758b5a
6
+ metadata.gz: dbbf858fdad6368339755a95b57caa5c2102ab2d0b159981bf55ec7f025fe0c06e2ba3add1e9893e996302eb061cfd4342fb02f783551694718d4a826eb0a776
7
+ data.tar.gz: 9420e5f62b39f0615a257a2798c2a90b3d7ecb24a4f074f6bba03682872f1ababf26fc70a55f5da45d7cb65d1e7135efbfa577fffe7127f8f1b6ed4c741a0f7a
@@ -7,4 +7,4 @@ MODULE_CACHE = "#{ENV['HOME']}/Library/Developer/Xcode/DerivedData/ModuleCache"
7
7
  ISYSROOT_PATH = `xcrun -sdk macosx10.9 --show-sdk-path`
8
8
  $CFLAGS = "-arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-cache-path=#{MODULE_CACHE} -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -isysroot #{ISYSROOT_PATH} -mmacosx-version-min=10.9 -fasm-blocks -fstrict-aliasing -Os -march=native -flto -Wall -Wpedantic -Werror"
9
9
  $LFLAGS = "-isysroot $(ISYSROOT_PATH) -mmacosx-version-min=10.9 -flto -framework Foundation"
10
- create_makefile(extension_name)
10
+ create_makefile(extension_name)
data/ext/wtapack/main.m CHANGED
@@ -12,7 +12,9 @@
12
12
  #import "updateBundleID.h"
13
13
  #import "NSArray+WTAMap.h"
14
14
  #import "ErrorHandler.h"
15
+ #ifndef WTA_STANDALONE
15
16
  #import <ruby.h>
17
+ #endif
16
18
 
17
19
  static NSString* const usageString = @"Usage: %s -input <path to original .app> \
18
20
  -profile <provisioning profile UUID> -sign <SHA1 for valid certificate> \
@@ -21,9 +23,18 @@ static NSString* const usageString = @"Usage: %s -input <path to original .app>
21
23
 
22
24
  void showUsageAndExit(void);
23
25
 
26
+ #ifndef WTA_STANDALONE
24
27
  VALUE rb_main(int argc, const char * argv[]) {
28
+ #else
29
+ int main(int argc, const char* argv[]) {
30
+ #endif
25
31
  @autoreleasepool {
26
-
32
+ NSFileManager* fm = [NSFileManager defaultManager];
33
+ NSUserDefaults* standardDefaults = [NSUserDefaults standardUserDefaults];
34
+
35
+ NSString* currentWorkingDirectory = [fm currentDirectoryPath];
36
+
37
+ #ifndef WTA_STANDALONE
27
38
  NSMutableArray* arguments = [NSMutableArray arrayWithCapacity: argc];
28
39
  for (int i = 0; i < argc; i++)
29
40
  {
@@ -49,10 +60,8 @@ VALUE rb_main(int argc, const char * argv[]) {
49
60
  }
50
61
 
51
62
  NSLog(@"%@", registrationDict);
52
- NSFileManager* fm = [NSFileManager defaultManager];
53
- NSUserDefaults* standardDefaults = [NSUserDefaults standardUserDefaults];
54
63
  [standardDefaults registerDefaults: registrationDict];
55
-
64
+ #endif
56
65
  NSError* error = nil;
57
66
 
58
67
  // Read in the input directory, bail if it doesn't exist
@@ -193,11 +202,14 @@ VALUE rb_main(int argc, const char * argv[]) {
193
202
  [fm removeItemAtPath:outputPathString
194
203
  error:NULL];
195
204
 
196
- NSString* currentWorkingDirectory = [fm currentDirectoryPath];
197
205
  [fm changeCurrentDirectoryPath:tmpDirURL.path];
206
+
198
207
  // Create the final ipa
199
208
  int retVal = system([NSString stringWithFormat:@"/usr/bin/zip --symlinks --recurse-paths --verbose -9 \"%@\" .",
200
209
  outputPathString].UTF8String);
210
+
211
+ [fm changeCurrentDirectoryPath:currentWorkingDirectory];
212
+
201
213
  if (retVal != 0)
202
214
  {
203
215
  [ErrorHandler fatalErrorWithMessage:[NSString stringWithFormat:@"Failed to create ipa at %@",
@@ -206,10 +218,13 @@ VALUE rb_main(int argc, const char * argv[]) {
206
218
  }
207
219
 
208
220
  // Clean up after ourselves
209
- [fm changeCurrentDirectoryPath:currentWorkingDirectory];
210
221
  [fm removeItemAtURL:tmpDirURL error:NULL];
211
222
  }
223
+ #ifndef WTA_STANDALONE
212
224
  return rb_int2inum(0);
225
+ #else
226
+ return 0;
227
+ #endif
213
228
  }
214
229
 
215
230
  void showUsageAndExit(void)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wtapack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Thompson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-15 00:00:00.000000000 Z
11
+ date: 2014-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  version: '0'
68
68
  requirements: []
69
69
  rubyforge_project:
70
- rubygems_version: 2.4.2
70
+ rubygems_version: 2.2.2
71
71
  signing_key:
72
72
  specification_version: 4
73
73
  summary: Codesigning and ipa packaging