Make signing work on OSX
authorTomás Touceda <chiiph@leap.se>
Thu, 19 Jun 2014 18:27:03 +0000 (15:27 -0300)
committerTomás Touceda <chiiph@leap.se>
Thu, 19 Jun 2014 18:27:03 +0000 (15:27 -0300)
bundler/actions.py

index 0e5b004..2178597 100644 (file)
@@ -375,13 +375,15 @@ class PLister(Action):
         <key>CFBundleInfoDictionaryVersion</key>
         <string>6.0</string>
         <key>CFBundleName</key>
-  <string>Bitmask</string>
+        <string>Bitmask</string>
         <key>CFBundlePackageType</key>
         <string>APPL</string>
         <key>CFBundleShortVersionString</key>
         <string>1</string>
         <key>LSBackgroundOnly</key>
         <false/>
+        <key>CFBundleIdentifier</key>
+        <string>se.leap.bitmask</string>
 </dict>
 </plist>""".split("\n")
 
@@ -599,12 +601,9 @@ class PycRemover(Action):
     @skippable
     def run(self):
         print "Removing .pyc files..."
-        if IS_WIN:
-            files = find(self._basedir, "-name", "*.pyc").strip().splitlines()
-            for f in files:
-                rm(f)
-        else:
-            find(self._basedir, "-name", "\"*.pyc\"", "-delete")
+        files = find(self._basedir, "-name", "*.pyc").strip().splitlines()
+        for f in files:
+            rm(f)
         print "Done"
 
 
@@ -657,21 +656,6 @@ class SignIt(Action):
 
     @skippable
     def run(self, identity):
-        print "Signing main structure, this will take a while..."
-        main_app = os.path.join(self._basedir,
-                                "Bitmask",
-                                "Bitmask.app")
-        codesign("-s", identity, "--deep", main_app)
-        print "Done"
-        print "Signing tuntap installer..."
-        tuntap_app = os.path.join(self._basedir,
-                                  "Bitmask",
-                                  "Bitmask.app",
-                                  "Contents",
-                                  "Resources",
-                                  "tuntap-installer.app")
-        codesign("-s", identity, "--deep", tuntap_app)
-        print "Done"
         print "Signing tuntap kext..."
         kext = os.path.join(self._basedir,
                             "Bitmask",
@@ -684,3 +668,18 @@ class SignIt(Action):
                             "tun.kext")
         codesign("-s", identity, "--deep", kext)
         print "Done"
+        print "Signing tuntap installer..."
+        tuntap_app = os.path.join(self._basedir,
+                                  "Bitmask",
+                                  "Bitmask.app",
+                                  "Contents",
+                                  "Resources",
+                                  "tuntap-installer.app")
+        codesign("-s", identity, "--deep", tuntap_app)
+        print "Done"
+        print "Signing main structure, this will take a while..."
+        main_app = os.path.join(self._basedir,
+                                "Bitmask",
+                                "Bitmask.app")
+        print codesign("-s", identity, "--force", "--deep", "--verbose", main_app)
+        print "Done"