mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	Set the signature for the IDE "by hand", the bundle is already included in the
PythonEngine applet template.
This commit is contained in:
		
							parent
							
								
									1e4cc33a55
								
							
						
					
					
						commit
						24f7b231bb
					
				
					 1 changed files with 13 additions and 0 deletions
				
			
		| 
						 | 
					@ -7,6 +7,8 @@
 | 
				
			||||||
import buildtools
 | 
					import buildtools
 | 
				
			||||||
import Res
 | 
					import Res
 | 
				
			||||||
import py_resource
 | 
					import py_resource
 | 
				
			||||||
 | 
					import macfs
 | 
				
			||||||
 | 
					import MACFS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
buildtools.DEBUG=1
 | 
					buildtools.DEBUG=1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,6 +21,17 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
buildtools.process(template, mainfilename, dstfilename, 1)
 | 
					buildtools.process(template, mainfilename, dstfilename, 1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Override the owner: IDE gets its bundle stuff from the applet
 | 
				
			||||||
 | 
					# template and only needs to set the file creator.
 | 
				
			||||||
 | 
					dest_fss = macfs.FSSpec(dstfilename)
 | 
				
			||||||
 | 
					dest_finfo = dest_fss.GetFInfo()
 | 
				
			||||||
 | 
					dest_finfo.Creator = ownertype
 | 
				
			||||||
 | 
					dest_finfo.Type = 'APPL'
 | 
				
			||||||
 | 
					dest_finfo.Flags = dest_finfo.Flags | MACFS.kHasBundle
 | 
				
			||||||
 | 
					dest_finfo.Flags = dest_finfo.Flags & ~MACFS.kHasBeenInited
 | 
				
			||||||
 | 
					dest_fss.SetFInfo(dest_finfo)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
targetref = Res.OpenResFile(dstfilename)
 | 
					targetref = Res.OpenResFile(dstfilename)
 | 
				
			||||||
Res.UseResFile(targetref)
 | 
					Res.UseResFile(targetref)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue