Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ef2758ec
Commit
ef2758ec
authored
Feb 01, 2003
by
Just van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
icon support by Robin Dunn, closes patch #678218
parent
f60e319f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
Lib/plat-mac/bundlebuilder.py
Lib/plat-mac/bundlebuilder.py
+14
-1
No files found.
Lib/plat-mac/bundlebuilder.py
View file @
ef2758ec
...
@@ -281,6 +281,10 @@ class AppBuilder(BundleBuilder):
...
@@ -281,6 +281,10 @@ class AppBuilder(BundleBuilder):
# when building a Cocoa app.
# when building a Cocoa app.
nibname
=
None
nibname
=
None
# The name of the icon file to be copied to Resources and used for
# the Finder icon.
iconfile
=
None
# Symlink the executable instead of copying it.
# Symlink the executable instead of copying it.
symlink_exec
=
0
symlink_exec
=
0
...
@@ -369,6 +373,11 @@ class AppBuilder(BundleBuilder):
...
@@ -369,6 +373,11 @@ class AppBuilder(BundleBuilder):
open
(
bootstrappath
,
"w"
).
write
(
BOOTSTRAP_SCRIPT
%
locals
())
open
(
bootstrappath
,
"w"
).
write
(
BOOTSTRAP_SCRIPT
%
locals
())
os
.
chmod
(
bootstrappath
,
0775
)
os
.
chmod
(
bootstrappath
,
0775
)
if
self
.
iconfile
is
not
None
:
iconbase
=
os
.
path
.
basename
(
self
.
iconfile
)
self
.
plist
.
CFBundleIconFile
=
iconbase
self
.
files
.
append
((
self
.
iconfile
,
pathjoin
(
resdir
,
iconbase
)))
def
postProcess
(
self
):
def
postProcess
(
self
):
if
self
.
standalone
:
if
self
.
standalone
:
self
.
addPythonModules
()
self
.
addPythonModules
()
...
@@ -610,6 +619,8 @@ Options:
...
@@ -610,6 +619,8 @@ Options:
-p, --plist=FILE .plist file (default: generate one)
-p, --plist=FILE .plist file (default: generate one)
--nib=NAME main nib name
--nib=NAME main nib name
-c, --creator=CCCC 4-char creator code (default: '????')
-c, --creator=CCCC 4-char creator code (default: '????')
--iconfile=FILE filename of the icon (an .icns file) to be used
as the Finder icon
-l, --link symlink files/folder instead of copying them
-l, --link symlink files/folder instead of copying them
--link-exec symlink the executable instead of copying it
--link-exec symlink the executable instead of copying it
--standalone build a standalone application, which is fully
--standalone build a standalone application, which is fully
...
@@ -637,7 +648,7 @@ def main(builder=None):
...
@@ -637,7 +648,7 @@ def main(builder=None):
longopts
=
(
"builddir="
,
"name="
,
"resource="
,
"executable="
,
longopts
=
(
"builddir="
,
"name="
,
"resource="
,
"executable="
,
"mainprogram="
,
"creator="
,
"nib="
,
"plist="
,
"link"
,
"mainprogram="
,
"creator="
,
"nib="
,
"plist="
,
"link"
,
"link-exec"
,
"help"
,
"verbose"
,
"quiet"
,
"standalone"
,
"link-exec"
,
"help"
,
"verbose"
,
"quiet"
,
"standalone"
,
"exclude="
,
"include="
,
"package="
,
"strip"
)
"exclude="
,
"include="
,
"package="
,
"strip"
,
"iconfile="
)
try
:
try
:
options
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
shortopts
,
longopts
)
options
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
shortopts
,
longopts
)
...
@@ -657,6 +668,8 @@ def main(builder=None):
...
@@ -657,6 +668,8 @@ def main(builder=None):
builder
.
mainprogram
=
arg
builder
.
mainprogram
=
arg
elif
opt
in
(
'-c'
,
'--creator'
):
elif
opt
in
(
'-c'
,
'--creator'
):
builder
.
creator
=
arg
builder
.
creator
=
arg
elif
opt
==
'--iconfile'
:
builder
.
iconfile
=
arg
elif
opt
==
"--nib"
:
elif
opt
==
"--nib"
:
builder
.
nibname
=
arg
builder
.
nibname
=
arg
elif
opt
in
(
'-p'
,
'--plist'
):
elif
opt
in
(
'-p'
,
'--plist'
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment