the project can now be converted into a .exe file. Added an icon
This commit is contained in:
parent
19af7f454c
commit
d14352d28e
7 changed files with 100 additions and 3 deletions
1
NOTE.md
1
NOTE.md
|
@ -9,7 +9,6 @@ A faire :
|
|||
2. Bonus :
|
||||
- animations de fin, mettre la musique, ...
|
||||
- sauvegarder les paramètres dans un fichier
|
||||
- Voir les TODOs
|
||||
|
||||
3. Bug :
|
||||
- /
|
||||
|
|
BIN
assets/image/icon/icon.ico
Normal file
BIN
assets/image/icon/icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
BIN
assets/image/icon/icon.png
Normal file
BIN
assets/image/icon/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 621 B |
62
assets/image/icon/icon.xpm
Normal file
62
assets/image/icon/icon.xpm
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* XPM */
|
||||
static char *result[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"32 32 24 1 ",
|
||||
" c black",
|
||||
". c #010000",
|
||||
"X c #200000",
|
||||
"o c #240000",
|
||||
"O c #280000",
|
||||
"+ c #3C0000",
|
||||
"@ c #400000",
|
||||
"# c #440000",
|
||||
"$ c #480000",
|
||||
"% c #500000",
|
||||
"& c #7C0000",
|
||||
"* c #B70000",
|
||||
"= c #BB0000",
|
||||
"- c #CB0000",
|
||||
"; c #CF0000",
|
||||
": c #D30000",
|
||||
"> c #D70000",
|
||||
", c #E70000",
|
||||
"< c #EB0000",
|
||||
"1 c #EF0000",
|
||||
"2 c #F30000",
|
||||
"3 c #FB0000",
|
||||
"4 c red",
|
||||
"5 c None",
|
||||
/* pixels */
|
||||
"555555555555 555555555555",
|
||||
"555555555 555555555",
|
||||
"5555555 . O&=>21:*&O . 5555555",
|
||||
"555555 %;4444444444;% 555555",
|
||||
"55555 X-44444444444444-o 55555",
|
||||
"5555 +,4444444444444444<@ 5555",
|
||||
"555 +24444444444444444443# 555",
|
||||
"55 X,44444444444444444444<o 55",
|
||||
"55. -4444444444444444444444- .55",
|
||||
"5 %444444444444444444444444% 5",
|
||||
"5 ;444444444444444444444444; 5",
|
||||
"5 O44444444444444444444444444O 5",
|
||||
" &44444444444444444444444444& ",
|
||||
" =44444444444444444444444444* ",
|
||||
" >44444444444444444444444444: ",
|
||||
" 2444444444444444444444444441 ",
|
||||
" 2444444444444444444444444441 ",
|
||||
" >44444444444444444444444444: ",
|
||||
" =44444444444444444444444444* ",
|
||||
" &44444444444444444444444444& ",
|
||||
"5 O44444444444444444444444444O 5",
|
||||
"5 ;444444444444444444444444; 5",
|
||||
"5 %444444444444444444444444% 5",
|
||||
"55. -4444444444444444444444- .55",
|
||||
"55 o<444444444444444444441o 55",
|
||||
"555 @34444444444444444443$ 555",
|
||||
"5555 #<44444444444444441$ 5555",
|
||||
"55555 o-44444444444444-o 55555",
|
||||
"555555 %;4444444444;% 555555",
|
||||
"5555555 . O&=>21:*&O . 5555555",
|
||||
"555555555 555555555",
|
||||
"555555555555 555555555555"
|
||||
};
|
9
main.pyw
9
main.pyw
|
@ -14,9 +14,16 @@ Label.default_kwargs["font_name"] = "Century Gothic" # NOQA: Label à un "defau
|
|||
|
||||
# Create a new window
|
||||
window = GameWindow(resizable=True, vsync=True, caption="Bataille Navale")
|
||||
|
||||
try:
|
||||
window.set_icon(
|
||||
pyglet.image.load("./assets/image/icon/icon.png")
|
||||
)
|
||||
except:
|
||||
pass
|
||||
|
||||
window.set_minimum_size(720, 480)
|
||||
window.add_scene(MainMenu)
|
||||
|
||||
# Start the event loop
|
||||
pyglet.app.run()
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
pyglet==2.0.4
|
||||
pyglet==2.0.5
|
||||
numpy==1.24.2
|
||||
requests
|
||||
|
||||
# cx_Freeze
|
||||
|
|
27
setup.py
Normal file
27
setup.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
from cx_Freeze import setup, Executable
|
||||
|
||||
setup(
|
||||
name='Bataille Navale',
|
||||
description='Bataille Navale',
|
||||
author='Raphaël & Léo',
|
||||
version='1',
|
||||
|
||||
options={
|
||||
"build_exe": {
|
||||
"include_files": ["./assets"],
|
||||
}
|
||||
},
|
||||
|
||||
packages=['source'],
|
||||
|
||||
executables=[
|
||||
Executable(
|
||||
"main.pyw",
|
||||
icon="./assets/image/icon/icon.ico",
|
||||
base="win32gui",
|
||||
target_name="Bataille Navale.exe",
|
||||
shortcut_name="Bataille Navale",
|
||||
shortcut_dir="DesktopFolder"
|
||||
)
|
||||
],
|
||||
)
|
Loading…
Reference in a new issue