Commit 6549918b30c02b4787d0666def7923acd9d30a5b

Thomas de Grivel 2023-12-14T05:01:59

Release c3 v0.1.9 Win32

diff --git a/libc3/window/sdl2/demo/macos/Makefile b/libc3/window/sdl2/demo/macos/Makefile
index 89d4a4b..27537ce 100644
--- a/libc3/window/sdl2/demo/macos/Makefile
+++ b/libc3/window/sdl2/demo/macos/Makefile
@@ -21,12 +21,12 @@ DISTCLEANFILES = ${CLEANFILES} config.mk
 
 IMG_SOURCES = \
 	../../../../../img/earth.png \
-	../../../../../img/flaps.png \
 	../../../../../img/flaps.256.png \
+	../../../../../img/flaps.png \
 	../../../../../img/fly-dead.png \
 	../../../../../img/fly-noto.png \
-	../../../../../img/toast.png \
 	../../../../../img/toast.128.png \
+	../../../../../img/toast.png \
 
 FONT_SOURCES = \
 	../../../../../fonts/Courier\ New \
diff --git a/libc3/window/sdl2/demo/window_sdl2_demo.c b/libc3/window/sdl2/demo/window_sdl2_demo.c
index 8399818..051a75e 100644
--- a/libc3/window/sdl2/demo/window_sdl2_demo.c
+++ b/libc3/window/sdl2/demo/window_sdl2_demo.c
@@ -46,7 +46,7 @@ int main (int argc, char **argv)
     err_puts("c3_init");
     return 1;
   }
-  window_sdl2_init(&window, 0, 0, 800, 600,
+  window_sdl2_init(&window, 50, 50, 800, 600,
                    "C3.Window.SDL2 demo",
                    WINDOW_SDL2_DEMO_SEQUENCE_COUNT);
   window.button = window_sdl2_demo_button;
diff --git a/libc3/window/sdl2/window_sdl2.c b/libc3/window/sdl2/window_sdl2.c
index b5bb5ce..80a265f 100644
--- a/libc3/window/sdl2/window_sdl2.c
+++ b/libc3/window/sdl2/window_sdl2.c
@@ -141,6 +141,7 @@ bool window_sdl2_run (s_window_sdl2 *window)
   SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
   SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
   SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);
+  SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
   /*
   SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK,
                       SDL_GL_CONTEXT_PROFILE_CORE);
@@ -152,12 +153,14 @@ bool window_sdl2_run (s_window_sdl2 *window)
                                 window->w, window->h,
                                 SDL_WINDOW_ALLOW_HIGHDPI |
                                 SDL_WINDOW_OPENGL |
-                                SDL_WINDOW_RESIZABLE);
+                                SDL_WINDOW_RESIZABLE |
+				SDL_WINDOW_SHOWN);
   if (! sdl_window) {
     warnx("window_sdl2_run: failed to create window: %s",
           SDL_GetError());
     return false;
   }
+  SDL_SetWindowBordered(sdl_window, SDL_TRUE);
   window->sdl_window = sdl_window;
   context = SDL_GL_CreateContext(sdl_window);
   if (! context) {
diff --git a/release/c3-0.1.9.win32.zip b/release/c3-0.1.9.win32.zip
index 0a835f0..7adb145 100644
Binary files a/release/c3-0.1.9.win32.zip and b/release/c3-0.1.9.win32.zip differ
diff --git a/win32/Makefile b/win32/Makefile
index 6d2a56e..5a8295f 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -1,6 +1,30 @@
+## c3
+## Copyright 2022,2023 kmx.io <contact@kmx.io>
+##
+## Permission is hereby granted to use this software granted the above
+## copyright notice and this permission paragraph are included in all
+## copies and substantial portions of this software.
+##
+## THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
+## PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
+## AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
+## THIS SOFTWARE.
 
 DEST = c3-${C3_VERSION}.win32.tmp
 
+IMG_SOURCES = \
+	../img/earth.png \
+	../img/flaps.256.png \
+	../img/flaps.png \
+	../img/fly-dead.png \
+	../img/fly-noto.png \
+	../img/toast.128.png \
+	../img/toast.png \
+
+FONT_SOURCES = \
+	../fonts/Computer-Modern \
+	../fonts/Courier\ New \
+
 release: c3-${C3_VERSION}.win32.zip
 
 c3-${C3_VERSION}.win32.zip: c3-${C3_VERSION}.win32
@@ -13,6 +37,8 @@ c3-${C3_VERSION}.win32:
 	cp -a ../README.md ${DEST}
 	cp -a ../c3s/.libs/c3s*.exe ${DEST}
 	cp -a ../ic3/.libs/ic3*.exe ${DEST}
+	rsync -aP ${IMG_SOURCES} ${DEST}/img/
+	rsync -aP ${FONT_SOURCES} ${DEST}/fonts/
 	cp -a ../lib ${DEST}/
 	cp -a ../libc3/.libs/libc3*-0.dll ${DEST}
 	cp -a ../libc3/.libs/libc3*-0.dll ${DEST}/test