From 396c80a13928859ce3d447ec84226b297dfaa3ce Mon Sep 17 00:00:00 2001 From: rexim Date: Sun, 24 Mar 2024 00:42:33 +0700 Subject: Icon for Windows Build --- .gitignore | 1 + assets/icon.ico | Bin 0 -> 12862 bytes assets/icon.png | Bin 0 -> 229 bytes build-linux.sh | 4 ++-- build-mingw32-w64.sh | 3 ++- eepers.adb | 1 - eepers.rc | 1 + test.adb | 18 ++---------------- 8 files changed, 8 insertions(+), 20 deletions(-) create mode 100644 assets/icon.ico create mode 100644 assets/icon.png create mode 100644 eepers.rc diff --git a/.gitignore b/.gitignore index 2ad8d9a..baf08af 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ eepers.exe test test.exe *.swp +*.res \ No newline at end of file diff --git a/assets/icon.ico b/assets/icon.ico new file mode 100644 index 0000000..be00a9a Binary files /dev/null and b/assets/icon.ico differ diff --git a/assets/icon.png b/assets/icon.png new file mode 100644 index 0000000..055ab91 Binary files /dev/null and b/assets/icon.png differ diff --git a/build-linux.sh b/build-linux.sh index 24e3683..0a51876 100755 --- a/build-linux.sh +++ b/build-linux.sh @@ -2,8 +2,8 @@ set -xe -gnatmake -f -O3 -Wall -Wextra -gnat2022 eepers.adb -bargs -static -largs -L./raylib/raylib-5.0_linux_amd64/lib/ -l:libraylib.a -lm -./eepers +# gnatmake -f -O3 -Wall -Wextra -gnat2022 eepers.adb -bargs -static -largs -L./raylib/raylib-5.0_linux_amd64/lib/ -l:libraylib.a -lm +# ./eepers # gnatmake -f -Wall -Wextra -gnat2022 test.adb -largs -L./raylib/raylib-5.0_linux_amd64/lib/ -l:libraylib.a -lm # ./test diff --git a/build-mingw32-w64.sh b/build-mingw32-w64.sh index d4efe60..d0490f5 100755 --- a/build-mingw32-w64.sh +++ b/build-mingw32-w64.sh @@ -2,4 +2,5 @@ set -xe -x86_64-w64-mingw32-gnatmake-win32 -mwindows -O3 -f -Wall -Wextra -gnat2022 eepers.adb -bargs -static -largs -L./raylib/raylib-5.0_win64_mingw-w64/lib/ -l:libraylib.a -lwinmm -lgdi32 -static +x86_64-w64-mingw32-windres eepers.rc -O coff -o eepers.res +x86_64-w64-mingw32-gnatmake-win32 -mwindows -O3 -f -Wall -Wextra -gnat2022 eepers.adb -bargs -static -largs eepers.res -L./raylib/raylib-5.0_win64_mingw-w64/lib/ -l:libraylib.a -lwinmm -lgdi32 -static diff --git a/eepers.adb b/eepers.adb index e15b749..130fc11 100644 --- a/eepers.adb +++ b/eepers.adb @@ -1551,7 +1551,6 @@ begin Close_Window; end; --- TODO: Icon on for Windows build -- TODO: Window title icon -- TODO: Loop the music -- TODO: Sound on Finishing Round diff --git a/eepers.rc b/eepers.rc new file mode 100644 index 0000000..c8504ef --- /dev/null +++ b/eepers.rc @@ -0,0 +1 @@ +id ICON "./assets/icon.ico" diff --git a/test.adb b/test.adb index 4b994ba..411b84c 100644 --- a/test.adb +++ b/test.adb @@ -1,19 +1,5 @@ -with Text_IO; use Text_IO; -with Raylib; use Raylib; -with Interfaces.C; use Interfaces.C; -with Ada.Unchecked_Conversion; - function Test return Integer is - Sample: Sound; begin - Init_Window(800, 600, To_C("Test")); - Init_Audio_Device; - Sample := Load_Sound(To_C("assets/footsteps/boots/1.ogg")); - Play_Sound(Sample); - while not Window_Should_Close loop - Begin_Drawing; - End_Drawing; - end loop; - Close_Window; - return 0; + null; + return 69; end; -- cgit v1.2.3