Skip to content

Commit

Permalink
Ignas made icons work on Windows somehow.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Jan 30, 2011
1 parent 8e96ae0 commit 3cc6256
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions dodo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python
import math
import os.path
import random
import logging
import itertools
Expand Down Expand Up @@ -798,12 +799,8 @@ def main():
window.set_minimum_size(320, 200) # does not work on linux with compiz
window.maximize()
window.set_mouse_visible(True)
try:
# Breaks on Windows
window.set_icon(load_image('Dodo.png'))
except:
pass

window.set_icon(pyglet.image.load(os.path.join(pyglet.resource.location('Dodo.png').path,
'Dodo.png')))
app = Main()
app.run()

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'url': '',

'py2exe.target': '',
# 'py2exe.icon': 'icon.ico', #64x64
'py2exe.icon': 'assets\\Dodo.ico', #64x64
'py2exe.binary': APP_NAME, #leave off the .exe, it will be added
}

Expand Down Expand Up @@ -95,7 +95,7 @@ def add_files(dest, generator):
}},
windows=[{
'script': dest,
#'icon_resources': [(1, cfg['py2exe.icon'])],
'icon_resources': [(0, 'assets\\Dodo.ico')],
}],
)

Expand Down

0 comments on commit 3cc6256

Please sign in to comment.