From: Randy McShandy Date: Mon, 27 May 2024 13:44:38 +0000 (-0500) Subject: Quick fix, windows buildscript, and licenses X-Git-Url: http://git.mcshandy.xyz/gitweb.cgi?a=commitdiff_plain;h=a2cc76f04937fed54151382699759ea227dea106;p=barrow_crawler Quick fix, windows buildscript, and licenses --- diff --git a/LICENSES.TXT b/LICENSES.TXT new file mode 100644 index 0000000..e8e5d82 --- /dev/null +++ b/LICENSES.TXT @@ -0,0 +1,78 @@ +The following statement applies to the included file 'raylib.dll': + + Copyright (c) 2013-2024 Ramon Santamaria (@raysan5) + + This software is provided "as-is", without any express or implied warranty. In no event + will the authors be held liable for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, including commercial + applications, and to alter it and redistribute it freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not claim that you + wrote the original software. If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be misrepresented + as being the original software. + + 3. This notice may not be removed or altered from any source distribution. + +The following statement applies to the included file 'libwinpthread-1.dll': + + Copyright (c) 2011 mingw-w64 project + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + + /* + * Parts of this library are derived by: + * + * Posix Threads library for Microsoft Windows + * + * Use at own risk, there is no implied warranty to this code. + * It uses undocumented features of Microsoft Windows that can change + * at any time in the future. + * + * (C) 2010 Lockless Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of Lockless Inc. nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AN + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + */ diff --git a/build_win.sh b/build_win.sh new file mode 100755 index 0000000..9d6a2bc --- /dev/null +++ b/build_win.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +# I'm not figuring this shit out for cmake so qnd build script + +# very useful for runtime fuckups +# https://wiki.winehq.org/Debug_Channels +# WINEDEBUG=warn+module wine release/win/barrow.exe + +CC=x86_64-w64-mingw32-gcc +RAYLIB_DIR=/home/randy/Downloads/raylib-5.0_win64_mingw-w64 +LIBDIR=/usr/x86_64-w64-mingw32 +RAYLIB=$RAYLIB_DIR/lib/libraylib.a +PTH=$LIBDIR/bin/libwinpthread-1.dll +SRCS="./src/*.c ./src/platforms/platform_win.c" +OUTDIR="./release/win" + +rm -rf ./release/win +mkdir ./release/win +mkdir ./release/win/src +mkdir ./release/win/src/shaders + +$CC $SRCS $PTH raylib.dll -mthreads -mwindows -lwinmm -o ./release/win/barrow.exe + +cp $PTH $OUTDIR/ +cp $RAYLIB_DIR/lib/raylib.dll $OUTDIR/ +cp -r src/shaders $OUTDIR/src/ +cp -r assets $OUTDIR/ +cp LICENSES.TXT $OUTDIR/ +cp README.TXT $OUTDIR/ + +# package things up +zip -r zipfile $OUTDIR/* +mv zipfile.zip ./release/barrow_0.0.1_win.zip diff --git a/src/utils.c b/src/utils.c index 33be2eb..3a43541 100644 --- a/src/utils.c +++ b/src/utils.c @@ -10,10 +10,8 @@ #include "structs.h" #include "platform.h" -#if POSIX_BC == 1 #define STB_IMAGE_WRITE_IMPLEMENTATION #define STB_IMAGE_RESIZE_IMPLEMENTATION -#endif #include "external/stb_image_write.h" #include "external/stb_image_resize2.h"