Commits

Virgil Dupras committed feece3d

In build.OSXFramework, set executablename and executablepath upon creation of the info plist already exists, not only on executable copying.

Comments (0)

Files changed (1)

         self.resources = op.join(self.contents, 'Resources')
         self.headers = op.join(self.contents, 'Headers')
         self.infoplist = op.join(self.resources, 'Info.plist')
+        self._update_executable_path()
+    
+    def _update_executable_path(self):
+        if not op.exists(self.infoplist):
+            self.executablename = self.executablepath = None
+            return
+        info = plistlib.readPlist(self.infoplist)
+        self.executablename = info['CFBundleExecutable']
+        self.executablepath = op.join(self.contents, self.executablename)
     
     def create(self, infoplist):
         ensure_empty_folder(self.dest)
         os.mkdir(self.resources)
         os.mkdir(self.headers)
         copy(infoplist, self.infoplist)
+        self._update_executable_path()
     
     def create_symlinks(self):
         # Only call this after create() and copy_executable()
         os.symlink(rel(self.resources), op.join(self.dest, 'Resources'))
     
     def copy_executable(self, executable):
-        info = plistlib.readPlist(self.infoplist)
-        self.executablename = info['CFBundleExecutable']
-        self.executablepath = op.join(self.contents, self.executablename)
         copy(executable, self.executablepath)
     
     def copy_resources(self, *resources, use_symlinks=False):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.