Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 24f7b23

Browse files
committed
Set the signature for the IDE "by hand", the bundle is already included in the
PythonEngine applet template.
1 parent 1e4cc33 commit 24f7b23

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

Mac/Tools/IDE/BuildIDE.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import buildtools
88
import Res
99
import py_resource
10+
import macfs
11+
import MACFS
1012

1113
buildtools.DEBUG=1
1214

@@ -19,6 +21,17 @@
1921

2022
buildtools.process(template, mainfilename, dstfilename, 1)
2123

24+
# Override the owner: IDE gets its bundle stuff from the applet
25+
# template and only needs to set the file creator.
26+
dest_fss = macfs.FSSpec(dstfilename)
27+
dest_finfo = dest_fss.GetFInfo()
28+
dest_finfo.Creator = ownertype
29+
dest_finfo.Type = 'APPL'
30+
dest_finfo.Flags = dest_finfo.Flags | MACFS.kHasBundle
31+
dest_finfo.Flags = dest_finfo.Flags & ~MACFS.kHasBeenInited
32+
dest_fss.SetFInfo(dest_finfo)
33+
34+
2235
targetref = Res.OpenResFile(dstfilename)
2336
Res.UseResFile(targetref)
2437

0 commit comments

Comments
 (0)