Compare commits

...

413 Commits

Author SHA1 Message Date
Rosalie Wanders b78738e6ef a 2025-10-11 14:32:51 +02:00
Rosalie Wanders 9457552941 more work™️ 2025-10-11 13:40:36 +02:00
Rosalie Wanders a322eb773c gcc fix weeee 2025-10-11 13:40:36 +02:00
Rosalie Wanders c9d83bd67b try and fix compile error 2025-10-11 13:40:36 +02:00
Rosalie Wanders c8223edc9d work™️ 2025-10-11 13:40:36 +02:00
Rosalie Wanders ba24d0bc04 3rdParty: further improve accuracy for FPU functions in mupen64plus-core 2025-10-11 13:40:36 +02:00
Rosalie Wanders e3e04f3498 3rdParty: further improve accuracy for FPU functions in mupen64plus-core 2025-10-11 13:40:36 +02:00
Rosalie Wanders a9efdf3db9 Package: v0.8.5 2025-10-09 22:57:03 +02:00
Rosalie Wanders 511f8fdcad RMG-Input: make fix for stuck buttons more robust 2025-10-09 22:46:44 +02:00
Rosalie Wanders d9f5921657 RMG-Input: fix configuration GUI button being stuck when bound by axis 2025-10-09 21:09:32 +02:00
Rosalie Wanders 72ab4f5a9b Package: v0.8.4 2025-10-09 16:15:44 +02:00
Rosalie Wanders 19876e14cf RMG: only save exit confirmation setting when dialog has been accepted 2025-10-09 09:02:55 +02:00
Rosalie Wanders 9384e2d15c RMG-Input: fix spacing in OptionsDialog.hpp 2025-10-09 08:47:00 +02:00
Rosalie Wanders d8069293e0 3rdParty: apply pending patch to mupen64plus-video-GLideN64 2025-10-09 08:39:08 +02:00
Rosalie Wanders 05b905dd67 RMG-Input: migrate test rumble functionality to SDL3 2025-10-09 01:54:47 +02:00
Rosalie Wanders 4eb18e2a60 RMG-Core: use nullptr instead of NULL in {Key,Library}.cpp 2025-10-09 00:14:30 +02:00
Rosalie Wanders 3c37df1bcf ci: update SDL3 to v3.2.24 2025-10-09 00:01:33 +02:00
Rosalie Wanders 09dc63bf2c RMG-Core: remove usage of libfmt 2025-10-08 23:04:37 +02:00
Rosalie Wanders e2ece3464a 3rdParty: remove libfmt 2025-10-08 23:04:19 +02:00
Rosalie Wanders 0807e18e78 3rdParty: update SDL_GameControllerDB 2025-10-08 23:01:52 +02:00
Rosalie Wanders f0bc3df818 RMG-Input-GCA: remove C style casts 2025-10-08 20:59:24 +02:00
Rosalie Wanders d6f82ba739 README: update dependencies 2025-10-08 20:54:13 +02:00
Rosalie Wanders 5e9ff89a40 Introduce RMG-Input-GCA 2025-10-08 20:54:13 +02:00
Rosalie Wanders e1f76e129d RMG-Core: add RMG-Input-GCA settings 2025-10-08 20:53:50 +02:00
Rosalie Wanders 39ffbc9fc8 3rdParty: remove mupen64plus-input-gca 2025-10-08 19:27:16 +02:00
Rosalie Wanders 2beead6169 ci: install libusb 2025-10-08 19:27:16 +02:00
Rosalie Wanders df8d8091ed 3rdParty: update transfer pak patch again in mupen64plus-core 2025-10-08 17:02:56 +02:00
Rosalie Wanders 85294ce7ae 3rdParty: update transfer pak patch in mupen64plus-core 2025-10-08 13:27:35 +02:00
Rosalie Wanders f9f69b2bf1 RMG-Input: refactor main.cpp 2025-10-08 12:50:10 +02:00
Rosalie Wanders 265ff17068 3rdParty: use correct type for SDL_GetTicks() in mupen64plus-core 2025-10-08 12:34:06 +02:00
Rosalie Wanders bbc2ac3146 ci: remove and disable snap on linux 2025-10-03 22:35:35 +02:00
Rosalie Wanders 925493f5b5 Remove discord rich presence 2025-10-03 22:35:35 +02:00
Rosalie Wanders 8682c1a583 ci: add arm64 linux 2025-10-03 14:47:07 +02:00
Rosalie Wanders 9c53a846b8 Package: v0.8.3 2025-09-28 08:41:31 +02:00
Rosalie Wanders 816bb4c426 3rdParty: include rsp state in save states in mupen64plus-core 2025-09-28 08:20:48 +02:00
Rosalie Wanders c119e5f128 RMG: add clear buttons for the 64DD IPL settings in SettingsDialog 2025-09-27 19:32:12 +02:00
Rosalie Wanders d64b23bdfe 3rdParty: fix cargo warnings for mupen64plus-input-gca 2025-09-27 19:16:25 +02:00
Rosalie Wanders b03f118b04 3rdParty: fix frame count being 0 in mupen64plus-core 2025-09-27 18:52:48 +02:00
Rosalie Wanders d18ac4076f 3rdParty: update mupen64plus-core 2025-09-27 18:40:16 +02:00
Rosalie Wanders 4620c1beb8 3rdParty: fix crash in mupen64plus-rsp-hle with Mario Artist Talent Studio 2025-09-27 18:11:27 +02:00
Rosalie Wanders 55431be957 Package: v0.8.2 2025-09-26 23:02:03 +02:00
Rosalie Wanders 18946b1d92 3rdParty: apply RSP fixes patch to mupen64plus-rsp-parallel 2025-09-26 22:53:56 +02:00
Rosalie Wanders c517862b3c 3rdParty: apply transfer pak fixes patch to mupen64plus-core 2025-09-26 22:51:48 +02:00
Rosalie Wanders e8d4d6341b 3rdParty: apply RSP fixes patch to mupen64plus-core 2025-09-26 22:48:32 +02:00
Rosalie Wanders 2246b6f25b RMG: add "Video capture backend" setting to SettingsDialog 2025-09-25 18:09:59 +02:00
Rosalie Wanders cd754fafa9 3rdParty: add MD5 fallback to screenshot filename in mupen64plus-core 2025-09-25 17:31:40 +02:00
Rosalie Wanders 8660ced35f RMG: add clear buttons for the gameboy rom/save settings 2025-09-25 16:32:39 +02:00
Rosalie Wanders 1c7276b4f8 3rdParty: update SDL3 gameboy camera backend patch in mupen64plus-core 2025-09-25 16:20:49 +02:00
Rosalie Wanders 4b793c4ad4 RMG-Core: add GbCameraVideoCaptureBackend1 to CoreOverlay 2025-09-24 23:54:16 +02:00
Rosalie Wanders e9dc24d947 3rdParty: apply SDL3 gameboy camera backend patch to mupen64plus-core 2025-09-24 23:46:55 +02:00
Rosalie Wanders 51b712a8c9 RMG: misc changes 2025-09-24 22:33:58 +02:00
Rosalie Wanders 1ce70fba22 RMG: improve window title generation 2025-09-24 02:41:31 +02:00
Rosalie Wanders 0c06aebf72 Package: v0.8.1 2025-09-23 15:52:51 +02:00
Rosalie Wanders 12cd56e5f1 3rdParty: fix compilation error on arm64 for mupen64plus-core 2025-09-23 15:52:51 +02:00
Rosalie Wanders e9cef9b76b README: update dependencies 2025-09-23 14:45:21 +02:00
Rosalie 7395e1ed6a ci: install SDL3 2025-09-23 14:41:42 +02:00
Rosalie Wanders c22a7560f0 RMG-Audio: migrate to SDL3 2025-09-23 14:41:42 +02:00
Rosalie Wanders 40c8e117c1 RMG-Input: migrate to SDL3 2025-09-23 14:41:39 +02:00
Rosalie Wanders fb7744625c RMG: migrate to SDL3 2025-09-23 14:41:35 +02:00
Rosalie Wanders f11eebae9a RMG-Core: don't require SDL2 2025-09-23 02:05:17 +02:00
Rosalie Wanders 762e24a110 3rdParty: apply SDL3 and SDL3_net patch to mupen64plus-core 2025-09-23 02:05:17 +02:00
Rosalie Wanders f0a1c1f377 3rdParty: add SDL_net 2025-09-23 01:57:53 +02:00
Rosalie Wanders 543dde0de2 RMG: don't allow drag & drop events while ROM is being opened 2025-09-16 22:07:56 +02:00
Rosalie Wanders ff5190ac66 RMG: block starting emulation when it's already being started 2025-09-16 21:27:41 +02:00
Rosalie Wanders 410e54f0b2 3rdParty: fix PPMD support in LZMA SDK 2025-09-16 21:22:27 +02:00
Rosalie Wanders c0c5e0dc8e 3rdParty: update LZMA SDK to v25.01 2025-09-16 21:09:40 +02:00
Rosalie Wanders 56fd26ae4f RMG-Core: use reference instead of pointer in Emulation.cpp 2025-09-15 21:43:00 +02:00
Rosalie Wanders 11550cc71a RMG-Core: add CoreSetError() in CoreTakeScreenshot() 2025-09-15 18:53:29 +02:00
Rosalie Wanders 53e0c157f1 RMG: only set dispatcherMoveThroughList when server is dispatcher 2025-09-15 18:44:24 +02:00
Rosalie Wanders e57e52c6c8 RMG: remove unrequired toString() in NetplaySessionBrowserDialog.cpp 2025-09-15 18:37:24 +02:00
Rosalie Wanders 089160278c RMG: implement 'Ask for confirmation on exit while in-game' setting 2025-09-13 23:38:58 +02:00
Rosalie Wanders a3deb185a4 RMG-Core: add GUI_ConfirmExitWhileInGame setting 2025-09-13 23:37:49 +02:00
Rosalie Wanders 80e813baee RMG: 'i.e' -> 'e.g.' in SettingsDialog 2025-09-13 22:35:57 +02:00
Rosalie Wanders ff49835b22 RMG: add RibShark to contributors in AboutDialog 2025-09-13 15:14:02 +02:00
Rosalie Wanders 1af3e28d83 3rdParty: update mupen64plus-video-GLideN64 2025-09-13 14:56:56 +02:00
Rosalie Wanders 0dce7ddaf4 RMG: refactor SettingsDialog.cpp 2025-09-12 16:59:22 +02:00
Rosalie Wanders 0d1fc16a53 Package: v0.8.0 2025-09-10 14:34:13 +02:00
Rosalie Wanders 9032008a63 RMG: add more safety in netplay dialogs with the dispatcher 2025-09-10 14:22:34 +02:00
Rosalie Wanders 4788d643da 3rdParty: fix 64DD games crashing in mupen64plus-core 2025-09-10 14:22:16 +02:00
Rosalie Wanders e1db6c24b0 RMG: don't use NetplayCommon::ConnectToIPv4Server() in UI event handler
This causes a slight UI lock-up which is distracting, and with the
dispatcher server, we don't need it for the JSON server list anymore
2025-09-10 10:53:03 +02:00
Rosalie Wanders 81f98505ca RMG: implement dispatcher server for netplay 2025-09-10 10:53:03 +02:00
Rosalie Wanders 7270e0dfbe RMG: add "Dispatcher URL" setting to SettingsDialog 2025-09-10 10:37:19 +02:00
Rosalie Wanders bc3e3b3f9c RMG-Core: add Netplay_DispatcherUrl setting 2025-09-10 10:37:19 +02:00
Rosalie Wanders d7b17cd494 RMG-Core: add netplay dispatcher settings migration 2025-09-10 10:37:19 +02:00
Rib e5cd034b4f RMG: allow switching between WindowsVista and Windows11 styles
Qt defaults to the Windows11 style on Windows 11, which isn't truly native and looks inconsistent from other desktop apps. This sets the native style to WindowsVista which is the true native style, and adds a Windows11 option on Windows OSs.
2025-08-16 11:23:28 +02:00
orbea 1c6210f964 3rdParty: change minimum cmake version in discord-rpc's rapidjson (#382)
Gentoo-Issue: https://bugs.gentoo.org/959468
2025-07-04 20:47:58 +02:00
GhostlyDark 9ce1e45d64 README: Add missing libusb dependency (#379)
The mupen64plus-input-gca plugin can't run without libusb-1.0.dll being present, but is able to build fine without libusb being installed. If not installed, the dependency script silently fails to find/copy the DLL.
2025-06-23 17:58:21 +02:00
Rosalie Wanders be738f0cb7 ci: use windows-2022 2025-06-09 16:01:11 +02:00
Rosalie Wanders e882e0f22c RMG: add NETPLAY guard to QWebSocket in NetplayCommon.hpp 2025-06-09 15:59:54 +02:00
Rosalie Wanders f7a1d0f952 RMG: add IPv4 resolver to NetplayCommon and use it 2025-06-09 15:35:46 +02:00
Logan McNaughton 6b8990fa1a RMG: ensure that netplay only connects using IPv4 (#374) 2025-06-09 15:18:35 +02:00
Rosalie Wanders a74cff50f8 Package: add vulkan-headers to makedepends of PKGBUILD 2025-05-20 09:35:34 +02:00
Rosalie Wanders d4ac45a9c5 Package: v0.7.9 2025-05-19 23:59:01 +02:00
Rosalie Wanders 32aebfec1a RMG-Core: change default of RomBrowser_MaxItems to 2048 2025-05-19 23:51:06 +02:00
Rosalie Wanders aee7da8068 RMG: hide RomBrowserSearchWidget by default 2025-05-19 23:47:36 +02:00
Rosalie Wanders 078361e2e6 RMG: use const reference for slots 2025-05-19 23:41:28 +02:00
Rosalie Wanders e0cae9c1a9 RMG: disable action_View_Game{List,Grid} during emulation 2025-05-19 23:34:01 +02:00
Rosalie Wanders c8d46ee919 RMG: showSearchLineEdit -> showSearchWidget 2025-05-19 23:23:47 +02:00
Rosalie Wanders c5965b3940 RMG: introduce RomBrowserSearchWidget 2025-05-19 23:06:39 +02:00
Rosalie Wanders affb0ee0ee RMG: change placeholder text of searchLineEdit in RomBrowserWidget.cpp 2025-05-19 23:06:39 +02:00
Rosalie Wanders dd6ea4f22a RMG-Core: change casing of default KeyBinding_ViewSearch setting value 2025-05-19 23:06:39 +02:00
Rosalie Wanders 006a7c8eff RMG: re-add nullptr check in RomBrowserWidget::getCurrentData() 2025-05-18 19:32:59 +02:00
Rosalie Wanders 5f10f39ac0 3rdParty: update mupen64plus-rsp-hle 2025-05-18 19:19:12 +02:00
Rosalie Wanders 6e1df7fc79 3rdParty: update mupen64plus-video-GLideN64 2025-05-18 19:18:44 +02:00
Rosalie Wanders 5cab9282e7 3rdParty: allow cropping each side separately in mupen64plus-video-parallel 2025-05-18 19:17:12 +02:00
Rosalie Wanders 1c6d8a6f59 RMG: fix ROM browser index mapping 2025-05-18 19:02:29 +02:00
Rosalie Wanders c43f43e634 RMG-Core: Keybinding_ViewLog -> KeyBinding_ViewLog 2025-05-06 01:28:09 +02:00
Rosalie Wanders 409aac2caa RMG-Core: remove unrequired include 2025-05-06 01:28:09 +02:00
Rosalie Wanders 21b187dacc RMG: implement search for the ROM browser 2025-05-06 01:28:09 +02:00
Rosalie Wanders a110f48fad RMG-Core: add KeyBinding_ViewSearch setting 2025-05-06 00:48:47 +02:00
Rosalie Wanders 1f24d20054 RMG-Core: fix name having incorrect count in CoreGetCurrentRomHeader() 2025-05-03 16:38:56 +02:00
Rosalie Wanders 8e61b79ecf 3rdParty: update mupen64plus-core 2025-05-02 15:08:02 +02:00
Rosalie Wanders f459c456de RMG-Core: use const reference for local functions in Settings.cpp 2025-05-02 14:36:19 +02:00
Rosalie Wanders 0813a6e3ea RMG-Core: fix compile error with newer minizip-ng versions 2025-04-24 00:59:31 +02:00
Rosalie Wanders 606eb976cb 3rdParty: apply netplay optimization patch to mupen64plus-core 2025-04-24 00:10:05 +02:00
Rosalie Wanders 443ff545ab 3rdParty: update mupen64plus-video-GLideN64 2025-03-31 13:29:08 +02:00
Rosalie Wanders 3c615c8459 Package: v0.7.8 2025-03-23 13:55:18 +01:00
Rosalie Wanders 7973b5d151 Package: update InputSettings.png 2025-03-23 13:51:45 +01:00
Rosalie Wanders 8f0cd29366 RMG-Input: remove unrequired includes 2025-03-23 13:14:33 +01:00
Rosalie Wanders b39357efda 3rdParty: update rom size patch for mupen64plus-core 2025-03-23 13:14:24 +01:00
Rosalie Wanders 3e0efac610 RMG-Core: shutdown mupen64plus-core in CoreShutdown() 2025-03-22 18:47:23 +01:00
Rosalie Wanders 595427aa98 RMG-Input: also make other buttons consistent height wise 2025-03-20 00:06:07 +01:00
Rosalie Wanders 62c30a4b4d RMG-Core: mark result from split_string() const 2025-03-19 23:58:18 +01:00
Rosalie Wanders 13f7ede034 RMG-Core: remove more unrequired usage of std::vector<T>::at() 2025-03-19 23:48:03 +01:00
Rosalie Wanders f89b73cec1 RMG-Core: slightly optimize get_cache_entry_iter() 2025-03-19 23:47:44 +01:00
Rosalie Wanders 30d1f17329 RMG-Input: make add/remove buttons have a consistent height 2025-03-19 23:34:07 +01:00
Rosalie Wanders b8ad7d1dce RMG-Input: swap around Z-Trigger and Start button mapping UI elements 2025-03-19 22:23:06 +01:00
Rosalie Wanders 6552aa23ec RMG-Core: remove unrequired usage of std::vector<T>::at() 2025-03-19 22:11:49 +01:00
Rosalie Wanders 6d81b8cda3 RMG-Input: don't set window icon 2025-03-19 22:06:53 +01:00
Rosalie Wanders f5de7e8320 RMG-Input: mark variable const in ControllerImageWidget.cpp 2025-03-19 22:04:05 +01:00
Rosalie Wanders 0d2b88037f RMG-Input: fix accuracy of stick movement in ControllerImageWidget.cpp 2025-03-19 22:00:58 +01:00
Rosalie Wanders ac7b9bce27 RMG-Input: fix percentage for new image in ControllerImageWidget.cpp 2025-03-19 22:00:58 +01:00
Rosalie Wanders d87bcc3a21 RMG-Input: remove unused image 2025-03-18 19:40:48 +01:00
Rosalie Wanders 7261903186 RMG-Input: center C letter in controller image 2025-03-18 19:37:01 +01:00
Rosalie Wanders 2e6263ea5c RMG: add new contributors to AboutDialog.ui 2025-03-18 12:02:59 +01:00
Rosalie Wanders fa9a288e0a RMG-Input: fix typo in Controller_Pressed_DpadRight.svg 2025-03-18 11:57:07 +01:00
Jaffacakelover 7fced2d3eb RMG-Input: introduce new controller image (#349) 2025-03-18 11:55:37 +01:00
Rosalie Wanders 9bc56e90ee RMG-Core: use std::runtime_error instead of std::terminate in Directories.cpp 2025-03-17 00:15:10 +01:00
Rosalie Wanders 64d4c41d1d RMG-Core: delete copy constructor of m64p api classes 2025-03-17 00:13:44 +01:00
Rosalie Wanders c2197b3053 RMG-Core: use references instead of pointers in Plugins.cpp 2025-03-17 00:13:02 +01:00
Rosalie Wanders 3f7c1584a4 RMG-Core: use static_cast in CoreDebugCallback() 2025-03-13 22:36:08 +01:00
Rosalie Wanders 17dc26779e RMG-Core: fix casing in error message in Core.cpp 2025-03-13 22:14:40 +01:00
Rosalie Wanders edc8c0bb98 Script: add UpdateCopyrightYear.sh 2025-03-13 22:08:38 +01:00
Rosalie Wanders 5bf5d0ed16 RMG-Audio: update copyright year 2025-03-13 22:07:12 +01:00
Rosalie Wanders 7114338cec RMG-Input: update copyright year 2025-03-13 22:07:12 +01:00
Rosalie Wanders 64d0a90b82 RMG: update copyright year 2025-03-13 22:07:12 +01:00
Rosalie Wanders d6b0f024da RMG-Core: update copyright year 2025-03-13 22:07:12 +01:00
Rosalie Wanders 3b2668977d RMG-Core: use reinterpret_cast instead of c style cast in Archive.cpp 2025-03-10 12:55:32 +01:00
Rosalie Wanders 5aa7ee0fe3 RMG-Core: use correct include version in Archive.cpp 2025-03-09 22:12:22 +01:00
Rosalie Wanders f0119ec75d RMG-Core: add and use CORE_DIR_MAX_LEN 2025-03-09 18:52:14 +01:00
Rosalie Wanders 249654a879 RMG-Core: remove usage of PATH_MAX in Archive.cpp and use our own define 2025-03-09 18:45:28 +01:00
Rosalie Wanders 950becc1b3 Package: add libhidapi-hidraw to AppImage 2025-03-09 16:16:39 +01:00
Rosalie Wanders b3424f3fc5 RMG-Input: fix dialog not quitting when pressing esc 2025-03-09 13:47:23 +01:00
Rosalie Wanders e0e19824a5 3rdParty: apply pending IS viewer bounds check PR to mupen64plus-core 2025-03-09 13:41:35 +01:00
Rosalie Wanders b3b8c2d8b1 3rdParty: apply pending PR patch to mupen64plus-core 2025-03-09 00:50:26 +01:00
Samuel d9cd714c2c Package: remove --patch-rpath argument to lib4bin in Create.sh 2025-03-08 18:43:37 +01:00
Rosalie Wanders fb85a42477 RMG: ensure rom count is not 0 in RomBrowserLoadingWidget.cpp 2025-03-08 18:13:39 +01:00
Rosalie Wanders 1458f3df0b RMG: support using file path for server json for netplay 2025-03-07 18:49:18 +01:00
Rosalie Wanders ad3973998f Package: v0.7.7 2025-03-05 19:46:27 +01:00
Rosalie Wanders 8ef1da8e0b RMG: only update list view column sizes when we have any row items 2025-03-05 19:40:51 +01:00
Rosalie Wanders 06cc95852e RMG-Core: use const pointer in zlib_filefunc_open() 2025-03-05 17:36:47 +01:00
Rosalie Wanders 44c6c17191 3rdParty: build imgui as a static library 2025-03-05 17:24:52 +01:00
Rosalie Wanders fc9a249dd9 RMG: remove unrequired (void*) casts in on_Action_Settings_{type} 2025-03-05 17:18:09 +01:00
Rosalie Wanders 648c7fbc26 RMG-Input: use c++ style casts instead of c style casts 2025-03-05 17:05:09 +01:00
Rosalie Wanders 59fc11c8f4 RMG-Input: PluginConfig2 -> PluginConfigWithRomConfig 2025-03-05 17:04:30 +01:00
Rosalie Wanders 7d9e34abcf RMG-Core: PluginConfig2 -> PluginConfigWithRomConfig 2025-03-05 17:04:16 +01:00
Rosalie Wanders d05fa8b91b RMG-Core: use const reference for string helpers in Settings.cpp 2025-03-05 16:43:43 +01:00
Rosalie Wanders 10bb0b9df2 RMG: fix crash when quitting RMG during a ROM browser refresh 2025-03-05 16:40:54 +01:00
Rosalie Wanders 5311d04957 RMG-Core: bump CACHE_FILE_ITEMS_MAX to 250000 2025-03-05 01:52:40 +01:00
Rosalie Wanders f9de2fe9ef RMG-Core: add invalid ROM entries to the cache 2025-03-05 01:52:17 +01:00
Rosalie Wanders 6d77fd7e1e RMG-Core: use const reference in local functions in Cheats.cpp 2025-03-05 00:29:42 +01:00
Rosalie Wanders 5fc0de6da7 3rdParty: update imgui 2025-03-04 22:17:53 +01:00
Rosalie Wanders 0d114412e6 RMG-Core: don't export m64p::Core and m64p::Config 2025-03-04 22:08:49 +01:00
Rosalie Wanders 9a5c151de5 RMG: use CoreGetVideoMode() instead of using m64p::Core.DoCommand() 2025-03-04 22:08:31 +01:00
Rosalie Wanders 97c58d6e66 RMG-Core: add CoreGetVideoMode() 2025-03-04 22:08:11 +01:00
Rosalie Wanders 4a931f81c4 RMG-Core: use c++ style casts instead of c style casts 2025-03-04 22:07:31 +01:00
Rosalie Wanders 3c3c0d2b16 RMG: remove unrequired force checks in MainWindow::showErrorMessage() 2025-03-04 18:41:19 +01:00
Rosalie Wanders 39877ae948 RMG: fix incorrect size check in exception_handler() 2025-03-04 18:39:02 +01:00
Rosalie Wanders f9137d3a63 RMG: show error message when emulation fails when launched with -q 2025-03-04 18:35:54 +01:00
Rosalie Wanders ac1274eba4 RMG: use helper when error message is forced in MainWindow.cpp 2025-03-04 18:35:21 +01:00
Rosalie Wanders d88db0fb88 Package: update InputSettings.png 2025-03-03 01:37:53 +01:00
Rosalie Wanders 9c121ad436 RMG: "Join Session" -> "Browse Sessions" 2025-03-03 01:08:33 +01:00
Rosalie Wanders 70598b1fcd 3rdParty: remove "Synchronize RDP and CPU" setting from mupen64plus-video-parallel 2025-03-03 00:49:13 +01:00
Rosalie Wanders bfd3d078ad 3rdParty: fix RDRAM initialization patch in mupen64plus-core 2025-03-02 19:04:51 +01:00
Rosalie Wanders 7d99159388 3rdParty: respect rdp full sync in mupen64plus-video-parallel 2025-03-02 19:00:16 +01:00
Rosalie Wanders f77475ee7f Package: add libspeexdsp to AppImage 2025-03-02 17:45:47 +01:00
Rosalie Wanders 048772344b 3rdParty: update mupen64plus-rsp-hle 2025-03-02 16:09:59 +01:00
Rosalie Wanders 23120150f9 3rdParty: update mupen64plus-video-GLideN64 2025-03-02 16:09:39 +01:00
Rosalie Wanders 2c32dfd552 RMG-Input: remove PluginConfig2HasRomConfig() 2025-02-27 23:04:59 +01:00
Rosalie Wanders 1624b1a4cc RMG-Core: remove usage of PluginConfig2HasRomConfig() 2025-02-27 23:04:54 +01:00
Rosalie Wanders 1db6a578b2 RMG-Core: export symbols 2025-02-27 21:37:34 +01:00
Rosalie Wanders acc2c808f5 RMG-Core: ensure core is hooked in CoreGetUser{Data,Cache}Directory() 2025-02-27 19:24:56 +01:00
Rosalie Wanders e1bbf66ff1 RMG: improve error message in exception_handler() 2025-02-27 19:18:52 +01:00
Rosalie Wanders b4a0642122 RMG: fix error messages from MainWindow::Init() not showing 2025-02-27 19:15:05 +01:00
Rosalie Wanders e7906c93a7 RMG: add minidump handler in main.cpp 2025-02-27 18:53:28 +01:00
Rosalie Wanders d5af42a7a5 RMG-Core: hardcode MAX_FILENAME_LEN instead of using system MAX_PATH 2025-02-27 15:58:22 +01:00
Rosalie Wanders e4cbfc388f RMG-Core: remove unrequired Rom.hpp include in Cheats.cpp 2025-02-27 15:53:49 +01:00
Rosalie Wanders 572792a1c8 RMG-Core: remove invalid name in get_plugin_type_name() 2025-02-27 15:19:51 +01:00
Rosalie Wanders 3570200e53 RMG-Core: make arrays const 2025-02-27 15:18:27 +01:00
Rosalie Wanders e11d1884c8 RMG-Core: use std::array in apply_plugin_settings() 2025-02-27 15:18:15 +01:00
Rosalie Wanders 77a201f52a RMG-Core: use std::optional in CoreGetPortableDirectoryMode() 2025-02-27 15:17:52 +01:00
Rosalie Wanders 4416343761 RMG-Core: use int instead of int32_t for CoreStringToInt() 2025-02-25 22:20:33 +01:00
Rosalie Wanders 88a6685a6b RMG-Core: add missing cstdint include 2025-02-24 21:59:25 +01:00
Rosalie Wanders e0def96cb7 RMG-Core: fix CoreLowerString() 2025-02-24 21:37:29 +01:00
Rosalie Wanders dfca82520d RMG-Core: add & use CoreStringToInt() instead of std::stoi() 2025-02-24 21:37:29 +01:00
Rosalie Wanders ea9313aa1b RMG-Core: use noexcept versions of std::filesystem functions 2025-02-24 21:32:51 +01:00
Rosalie Wanders 9ef92c3578 RMG-Core: fix variable names in MediaLoader.cpp 2025-02-24 21:31:48 +01:00
Rosalie Wanders ef3a68f509 Package: v0.7.6 2025-02-22 14:54:57 +01:00
Rosalie Wanders 2060facc2a RMG-Input: disable hotplug support for now 2025-02-20 14:31:13 +01:00
Rosalie Wanders 474eff65fb RMG-Input: fix incorrect logic in on_SDLThread_DeviceSearchFinished() 2025-02-19 23:20:47 +01:00
Rosalie Wanders 6345ec6eb3 RMG: fix parent of QMenu items in RomBrowserWidget.cpp 2025-02-18 18:41:20 +01:00
Rosalie Wanders b65692f12b 3rdParty: fix crash when vulkan initialization fails in parallel-rdp 2025-02-17 23:26:48 +01:00
Rosalie Wanders 8615c5efe1 RMG: only return surface extensions in VidExt_VK_GetInstanceExtensions() 2025-02-17 23:08:52 +01:00
Rosalie Wanders ae5813a635 Package: v0.7.5 2025-02-16 19:56:01 +01:00
Rosalie Wanders 219f74bb8b RMG-Input: {Left,Right}Trigger -> {Left,Right}Shoulder 2025-02-16 19:46:20 +01:00
Rosalie Wanders 91b4213044 RMG-Core: {Left,Right}Trigger -> {Left,Right}Shoulder 2025-02-16 19:43:34 +01:00
Rosalie Wanders 297968f319 RMG-Input: add spacer between L-Trigger and R-Trigger elements 2025-02-16 19:30:39 +01:00
Rosalie Wanders a40d1d34f5 README: correct package name for msys2 2025-02-16 19:28:41 +01:00
Rosalie Wanders b964415ac7 RMG: remove double semicolon usage 2025-02-16 19:17:03 +01:00
Rosalie Wanders 4707fe143c RMG-Input: remove double semicolon usage 2025-02-16 19:16:57 +01:00
Rosalie Wanders 66fc3492ca RMG-Core: remove double semicolon usage 2025-02-16 19:16:51 +01:00
Rosalie Wanders 45e0231214 RMG: fix possible crash on Windows 2025-02-16 15:44:04 +01:00
Rosalie Wanders b05b0faeea RMG-Input: use ROM header and settings in CorePluginsOpenROMConfig() 2025-02-16 00:51:06 +01:00
Rosalie Wanders 7b4b8c5c90 RMG: implement cache support for CorePluginsOpenROMConfig() 2025-02-16 00:51:06 +01:00
Rosalie Wanders 97bd81c287 RMG-Core: utilize cache for CorePluginsOpenROMConfig() 2025-02-16 00:50:08 +01:00
Rosalie Wanders 3222b962cc 3rdParty: use parent from PluginConfig() in mupen64plus-video-GLideN64 2025-02-16 00:34:26 +01:00
Rosalie Wanders 37f89b448f 3rdParty: use parent from PluginConfig() in mupen64plus-video-angrylion-plus 2025-02-16 00:34:26 +01:00
Rosalie Wanders f91ed8d848 3rdParty: use parent from PluginConfig() in mupen64plus-video-parallel 2025-02-16 00:15:22 +01:00
Rosalie Wanders 437733c9fd RMG-Input: use parent from PluginConfig2() 2025-02-16 00:15:22 +01:00
Rosalie Wanders 8f6496db86 RMG-Audio: use parent from PluginConfig() 2025-02-16 00:15:22 +01:00
Rosalie Wanders e1cd2f8400 RNG: set parent for CorePluginsOpenConfig() 2025-02-16 00:15:22 +01:00
Rosalie Wanders 94341526d7 RMG-Core: set parent in plugin configuration dialogs 2025-02-16 00:15:21 +01:00
Rosalie Wanders e1bc2e4a89 RMG-Core: fix error message in Plugins.cpp 2025-02-15 17:17:52 +01:00
Rosalie Wanders 7a28f1df17 Package: v0.7.4 2025-02-15 00:11:09 +01:00
Rosalie Wanders 4a67f98a3b RMG-Audio: turn sample messages from warnings into verbose messages 2025-02-15 00:06:19 +01:00
Rosalie Wanders 9908431e0a RMG: improve logging of retrieving of OpenGL context failure 2025-02-15 00:01:25 +01:00
Rosalie Wanders a6dca6618e RMG: use CORE_DIR_SEPERATOR_STR instead of "/" 2025-02-14 23:58:04 +01:00
Rosalie Wanders 56ebe38849 RMG-Input: use CORE_DIR_SEPERATOR_STR instead of "/" 2025-02-14 23:55:46 +01:00
Rosalie Wanders 32a1a26fcf RMG-Core: use CORE_DIR_SEPERATOR_STR instead of "/" 2025-02-14 23:55:36 +01:00
Rosalie Wanders cbdfa2b307 RMG-Input: add caption to file dialogs 2025-02-14 23:38:40 +01:00
Rosalie Wanders 2be09f9e03 RMG: add caption to file and directory dialogs 2025-02-14 23:38:27 +01:00
Rosalie Wanders 51ce612bd9 RMG: slightly improve formatting of MainWindow.cpp 2025-02-10 23:06:56 +01:00
Rosalie Wanders e37bc3faf9 RMG: improve EmulationThread by inhibiting screensaver during emulation 2025-02-10 23:00:51 +01:00
Rosalie Wanders 7059a974ed Script: include qjpeg and qjp2 Qt plugins in BundleDependencies.sh 2025-02-10 17:29:59 +01:00
Rosalie Wanders 4b17a8a494 Package: v0.7.3 2025-02-09 23:36:25 +01:00
Rosalie Wanders 428ef7549a RMG-Core: make arguments to CoreGetCachedRomHeaderAndSettings() optional 2025-02-09 18:30:16 +01:00
Rosalie Wanders c0d81fdc9f RMG: use cached default and current settings for SettingsDialog 2025-02-09 18:30:16 +01:00
Rosalie Wanders 78a9ae5fe1 RMG-Core: extend cache with default and current settings 2025-02-09 18:02:17 +01:00
Rosalie Wanders 80f9fd0234 RMG: 'Controller pack' -> 'Controller pak' 2025-02-09 18:01:28 +01:00
Rosalie Wanders c046984a37 RMG: fix flicker UI logic of NetplaySessionBrowserWidget 2025-02-09 16:35:58 +01:00
Rosalie Wanders 1ec02c59f3 3rdParty: apply pending crash fix patch to mupen64plus-core 2025-02-09 14:42:11 +01:00
Rosalie Wanders 383eab48c8 3rdParty: implement register mirroring in mupen64plus-core 2025-02-09 14:34:53 +01:00
Rosalie Wanders 358cb337dc 3rdParty: update vosk-api 2025-02-09 02:02:30 +01:00
Rosalie Wanders 141aefd81a 3rdParty: update mupen64plus-video-GLideN64 2025-02-08 19:39:37 +01:00
Rosalie Wanders 39a7887b35 cmake: remove unused argument to BundleDependencies.sh 2025-02-07 21:21:10 +01:00
Rosalie Wanders 653d0f49a3 Script: exclude unused qt plugins and simplify BundleDependencies.sh 2025-02-07 21:21:10 +01:00
Rosalie Wanders 3e8b3656e7 RMG: RMG_WAYLAND -> RMG_ALLOW_WAYLAND 2025-02-06 17:03:10 +01:00
Rosalie Wanders 4d975a731e RMG: remove unused signals from EmulationThread.hpp 2025-02-06 16:36:08 +01:00
Rosalie Wanders 0dee590f75 RMG: add Netplay -> View Session 2025-02-06 15:59:32 +01:00
Rosalie Wanders f5bed2b464 RMG: improve validation of chat line edit in NetplaySessionDialog 2025-02-06 15:58:30 +01:00
Rosalie Wanders 38a78e2627 RMG: improve signal names in KeybindButton 2025-02-06 15:20:12 +01:00
Rosalie Wanders f94ea3b6f8 RMG-Core: remove RomBrowser_SortAfterSearch setting 2025-02-06 15:16:45 +01:00
Rosalie Wanders 2af3c8a7f5 RMG: remove 'Sort results after search' setting 2025-02-06 15:16:35 +01:00
Rosalie Wanders 92dfc7c4d0 RMG-Core: use const reference in for loops in Cheats.cpp 2025-02-04 18:58:26 +01:00
Rosalie Wanders 4ff94efa4b ci: further improve workflow 2025-02-04 18:51:41 +01:00
Rosalie Wanders ef493de942 3rdParty: change minimum cmake version in discord-rpc 2025-02-04 18:47:38 +01:00
Rosalie Wanders 3067049d5c 3rdParty: fix warning in mupen64plus-core 2025-02-04 18:39:41 +01:00
Rosalie Wanders 08be74297f RMG-Core: get_romheader_romsettings() -> get_romheader_and_romsettings() 2025-02-04 18:13:04 +01:00
Rosalie Wanders 6122d4ff21 RMG-Core: use CoreGetCurrentDefaultRomSettings() in CoreGetCachedRomHeaderAndSettings() 2025-02-04 18:11:08 +01:00
Rosalie Wanders 27665e7221 RMG: make local functions static in main.cpp 2025-02-04 18:09:25 +01:00
Rosalie Wanders 6a5d0d6547 RMG-Core: remove CoreHasRomHeaderAndSettingsCached() 2025-02-04 18:09:13 +01:00
Rosalie Wanders a2c6a54b90 RMG: improve performance of cheats dialog & ROM information dialog 2025-02-04 18:03:14 +01:00
Rosalie Wanders 0c88d6584f RMG-Core: improve performance of cheats API 2025-02-04 18:02:14 +01:00
Rosalie Wanders f0f0795733 RMG: simplify RomSearcherThread.cpp 2025-02-04 18:02:14 +01:00
Rosalie Wanders e32fe57080 RMG-Core: simplify CoreGetCachedRomHeaderAndSettings() usage 2025-02-04 18:02:04 +01:00
Rosalie Wanders d536e20da8 RMG-Core: add header country code to CachedRomHeaderAndSettings 2025-02-04 18:01:51 +01:00
Rosalie Wanders 4f850136fa 3rdParty: use libvosk.dll compiled in UCRT64 environment 2025-02-02 17:51:06 +01:00
Rosalie Wanders 612a9192d3 README: update mingw package list 2025-02-02 17:48:10 +01:00
Rosalie Wanders 0480872e40 cmake: use UCRT64 environment libraries 2025-02-02 17:48:09 +01:00
Rosalie Wanders 88be43a1b1 ci: use UCRT64 environment 2025-02-02 17:48:09 +01:00
Rosalie Wanders 808960b1c1 ci: simplify workflow 2025-02-02 17:30:05 +01:00
Rosalie Wanders 0962c6969f 3rdParty: update mupen64plus-video-parallel 2025-02-02 08:10:36 +01:00
Rosalie Wanders c4929d9ac7 3rdParty: update mupen64plus-rsp-parallel 2025-02-02 08:00:14 +01:00
Rosalie Wanders 85159348a1 3rdParty: update mupen64plus-video-angrylion-plus 2025-02-02 07:47:33 +01:00
Rosalie Wanders 3b385d48f9 RMG-Core: add typedef for file time & correct failure result 2025-02-01 23:15:05 +01:00
Rosalie Wanders a396b372dd RMG-Core: move osal functions to File.cpp and Library.cpp 2025-02-01 22:57:40 +01:00
Rosalie Wanders f5b0452e77 RMG-Input: fix VRU support 2025-02-01 22:55:23 +01:00
Rosalie Wanders b82dcbac57 Script: switch to make 2025-02-01 22:20:42 +01:00
Rosalie Wanders 964ed7837b ci: use make instead of ninja 2025-02-01 22:20:42 +01:00
Rosalie Wanders 5e592ed9c0 RMG-Core: remove all includes from Core.hpp 2025-02-01 21:53:38 +01:00
Rosalie Wanders 018de840ab RMG: use only needed headers from RMG-Core 2025-02-01 21:53:38 +01:00
Rosalie Wanders e3086fb6a8 RMG-Input: use only needed headers from RMG-Core 2025-02-01 21:44:54 +01:00
Rosalie Wanders 1ed5a39345 RMG-Audio: use only needed headers from RMG-Core 2025-02-01 21:44:46 +01:00
Rosalie Wanders 7e546b351a RMG-Core: remove CoreInit() for plugins 2025-02-01 20:54:58 +01:00
Rosalie Wanders 4b0cd7562d RMG-Input: remove unneeded call to CoreInit() 2025-02-01 20:54:45 +01:00
Rosalie Wanders 3b1e5153d3 RMG-Audio: remove unneeded call to CoreInit() 2025-02-01 20:54:37 +01:00
Rosalie Wanders f0d9bbfbbb 3rdParty: update mupen64plus-video-GLideN64 2025-02-01 20:29:58 +01:00
Rosalie Wanders e0925e564b RMG: make update check not an error message box 2025-02-01 15:36:32 +01:00
Rosalie Wanders 85b4daa005 RMG: expand details by default in message boxes 2025-02-01 15:35:46 +01:00
Rosalie Wanders c7dd5a6a29 RMG-Core: use const reference for CoreSetNetplayCheats() 2025-02-01 13:50:54 +01:00
Rosalie Wanders 701d1f9ab7 RMG: make cheatsTreeWidget's expandable items read-only 2025-02-01 13:37:26 +01:00
Rosalie Wanders aa32706de0 RMG: simplify message_handler in main.cpp 2025-01-31 14:34:01 +01:00
Pcgaming575 b9a58101f9 Data: add cheats for some spanish translated games 2025-01-31 14:22:31 +01:00
Rosalie Wanders c0cdfb2db8 RMG: fix filename validation for portable windows in UpdateDialog.cpp 2025-01-31 08:44:32 +01:00
Rosalie Wanders ffc45e2bce Package: v0.7.2 2025-01-31 00:06:50 +01:00
Rosalie Wanders 5d078322a7 RMG-Core: add netplay bool to CoreStartEmulation to improve readability 2025-01-31 00:00:09 +01:00
Rosalie Wanders 988c4f030a RMG: correct CoreOpenRom() argument in NetplaySessionDialog.cpp 2025-01-30 23:56:24 +01:00
Rosalie Wanders d217d0bae3 RMG: show enabled cheats in NetplaySessionDialog 2025-01-30 23:43:54 +01:00
Rosalie Wanders 6ca31dbb82 ci: update packages on Linux 2025-01-30 22:26:20 +01:00
Rosalie Wanders 5f97be5e94 RMG: set window icon in NetplaySessionDialog 2025-01-30 22:22:50 +01:00
Rosalie Wanders b014fdf424 RMG-Input: detect devices using serial and path instead of device index 2025-01-30 22:01:29 +01:00
Rosalie Wanders 31110c01f1 RMG-Core: add Input_Device{Path,Serial} settings 2025-01-30 22:00:01 +01:00
Rosalie Wanders 9dc250694b RMG: show ping in netplay dialogs 2025-01-29 23:48:06 +01:00
Rosalie Wanders 80d6d8a07e RMG: add refresh icon to refresh button in NetplaySessionBrowserDialog 2025-01-29 23:21:30 +01:00
Rosalie Wanders c8d8e2ac71 RMG: adds cheats icon to cheats button in NetplaySessionDialog 2025-01-29 23:18:11 +01:00
Rosalie Wanders 7e90d59d86 RMG: remove unrequired QString include from CheatsCommon.hpp 2025-01-29 23:05:08 +01:00
Rosalie Wanders 8e02a0ecda RMG: implement netplay cheat support 2025-01-29 23:00:43 +01:00
Rosalie Wanders d468794979 RMG-Core: add netplay cheat functions 2025-01-29 22:47:00 +01:00
Rosalie Wanders 7b4629b1f9 RMG: check failure state for reply_begin_game in NetplaySessionDialog 2025-01-26 12:38:46 +01:00
Rosalie Wanders 8312b2a299 RMG: add comment to NetplayCommon.hpp 2025-01-24 22:41:58 +01:00
Rosalie Wanders 5fd9b780e5 RMG: save and restore selected server in netplay dialogs 2025-01-24 22:40:39 +01:00
Rosalie Wanders 881e0c9582 RMG-Core: add Netplay_SelectedServer setting 2025-01-24 22:39:31 +01:00
Rosalie Wanders 82291ce5f0 RMG: add minimize button hint to LogDialog and NetplaySessionDialog 2025-01-24 22:26:39 +01:00
Rosalie Wanders 191c7b1def RMG: decouple NetplaySessionDialog from MainWindow & fix function names 2025-01-24 22:26:08 +01:00
Rosalie Wanders 393a9e40fe Package: v0.7.1 2025-01-21 22:24:02 +01:00
Rosalie Wanders 4752e1530c RMG: change minor spacing in NetplaySessionBrowserWidget.hpp 2025-01-21 22:22:00 +01:00
Rosalie Wanders 847f832aff RMG: keep track of game launch in NetplaySessionDialog 2025-01-21 21:26:34 +01:00
Rosalie Wanders c93f82928f RMG: improve handling of reply_players reply in NetplaySessionDialog.cpp 2025-01-21 19:06:31 +01:00
Rosalie Wanders c1db77afea RMG: turn 'Play Game with Disk' context menu item into a dynamic context menu 2025-01-21 18:36:37 +01:00
Rosalie Wanders 667c2d5272 RMG: fix compilation failure by adding even more NETPLAY guards 2025-01-21 18:36:04 +01:00
Rosalie Wanders fe7abb585a RMG: fix compilation failure by adding more NETPLAY guards 2025-01-21 18:24:17 +01:00
Rosalie Wanders c0ebf11420 RMG: make Netplay Session dialog stay open while in-game 2025-01-21 17:28:36 +01:00
Rosalie Wanders 26b35eb299 RMG: only add cartridges to Create Netplay Session dialog 2025-01-21 17:26:36 +01:00
Rosalie Wanders a2a9ea2648 RMG: add Samueru-sama as contributor to AboutDialog.ui 2025-01-20 18:29:49 +01:00
Rosalie Wanders 42fd1827b3 RMG-Core: add missing cstring include to Archive.cpp 2025-01-20 18:23:24 +01:00
Rosalie Wanders 053f9931c4 RMG: add *.zip *.7z to filter in on_RomBrowser_PlayGameWith() 2025-01-20 18:15:13 +01:00
Rosalie Wanders 5e3315b471 RMG-Core: add support for 64DD disks in an archive in MediaLoader.cpp 2025-01-20 18:10:40 +01:00
Rosalie Wanders da1d7fcd2e RMG-Core: move archive functions to Archive.{cpp,hpp} 2025-01-20 18:09:34 +01:00
Rosalie Wanders f6039bad01 RMG-Core: add common string functions to String.{cpp,hpp} 2025-01-20 18:08:42 +01:00
Rosalie Wanders 7aeeb70db2 RMG-Core: Utils/File.{cpp,hpp} -> File.{cpp,hpp} 2025-01-20 18:08:42 +01:00
Rosalie Wanders 50ee41435e RMG: fix UpdateDialog.cpp 2025-01-20 17:24:15 +01:00
Rosalie Wanders 592994ee87 RMG: fix casing in UpdateDialog.cpp 2025-01-20 16:47:51 +01:00
Rosalie Wanders 216284faff gitignore: add AppImage build files 2025-01-20 16:45:02 +01:00
Rosalie Wanders 6f67e1edd5 RMG: add more strict filename checks in UpdateDialog.cpp 2025-01-20 16:43:17 +01:00
Rosalie Wanders 2ada580a30 Package: improve AppImage script 2025-01-20 16:41:33 +01:00
Samuel 7f02a764ce Package: improve AppImage (#324) 2025-01-20 14:44:27 +01:00
Rosalie Wanders ddaf58c7b6 3rdParty: apply RDRAM initialization patch to mupen64plus-core 2025-01-16 20:58:14 +01:00
Rosalie Wanders 817ef4535b 3rdParty: apply pending warning fix patch to mupen64plus-core 2025-01-10 22:39:18 +01:00
Rosalie Wanders 530a48a30c 3rdParty: update rom size patch for mupen64plus-core 2025-01-10 18:36:52 +01:00
Rosalie Wanders 116eeb35d4 3rdParty: apply experimental rom size patch to mupen64plus-core 2025-01-09 13:42:58 +01:00
Rosalie Wanders b266371fa3 3rdParty: apply pending patches to mupen64plus-core 2025-01-09 13:41:12 +01:00
Rosalie Wanders d4e6db211c Package: v0.7.0 2025-01-05 01:57:30 +01:00
Rosalie Wanders 0ec790e61f 3rdParty: apply temp fix for Mario Kart 64 to mupen64plus-video-GLideN64 2025-01-05 01:11:52 +01:00
Rosalie Wanders ae5b141d16 RMG: also set transfer timeout for update check 2024-12-30 16:30:41 +01:00
Rosalie Wanders 66364892f9 RMG: set transfer timeout in netplay dialogs 2024-12-30 16:29:54 +01:00
Rosalie Wanders 5144e1748b RMG: make nickname validation consistent in netplay dialogs 2024-12-29 23:04:05 +01:00
Rosalie Wanders 6375a30d00 RMG-Core: disable Core{Pause,Resume}Emulation() during netplay 2024-12-29 22:56:36 +01:00
Rosalie 4514b530ab RMG-Input: fix freeze when opening configuration GUI during netplay 2024-12-29 22:56:07 +01:00
Rosalie c102aa042d ci: use consistent build_dir 2024-12-29 20:04:05 +01:00
Rosalie Wanders 0f28fb6d13 RMG: hide netplay tab in settings dialog when built with netplay disabled 2024-12-29 19:46:17 +01:00
Rosalie Wanders 4e8ab796ba ci: use strategy matrix 2024-12-29 19:37:21 +01:00
Rosalie Wanders 91feda3427 RMG-Core: fix compilation when compiling with netplay disabled 2024-12-29 18:33:05 +01:00
Rosalie Wanders a8e4f058be RMG: reset session browser widget when requesting sessions fails 2024-12-28 09:20:25 +01:00
Rosalie Wanders e9168e935d Package: v0.6.9 2024-12-28 09:09:36 +01:00
Rosalie Wanders 73be38bedc RMG: minor code style change for NetplaySessionBrowserDialog::accept() 2024-12-28 09:09:07 +01:00
Rosalie Wanders 8a69d687ab Package: update screenshots 2024-12-28 08:54:43 +01:00
Rosalie Wanders 4f20b94b7a RMG: 'Server URL' -> 'Server list URL' in SettingsDialog 2024-12-27 23:08:35 +01:00
Rosalie Wanders 7f4ff9eb54 RMG: correct error messages in netplay dialogs 2024-12-27 23:08:35 +01:00
Rosalie Wanders 72b3b4fb75 RMG: update netplay to API version 17 2024-12-27 23:08:35 +01:00
Rosalie Wanders 9b5a7848d3 RMG: improve UI of CreateNetplaySessionDialog 2024-12-27 23:08:35 +01:00
Rosalie Wanders 6ca2cbf297 RMG: improve UI of NetplaySessionBrowserDialog 2024-12-27 23:07:31 +01:00
Rosalie Wanders d3d1facadd 3rdParty: apply pending font patch to mupen64plus-video-GLideN64 2024-12-27 13:37:56 +01:00
Rosalie Wanders bc723bffb0 RMG: remove unrequired QMessageBox includes 2024-12-27 13:22:02 +01:00
Rosalie Wanders 8f0299c302 RMG: add common QtMessageBox::Error() function 2024-12-25 22:25:54 +01:00
Rosalie Wanders abdcb74978 RMG-Audio: disable audio sync during netplay 2024-12-25 21:57:45 +01:00
Rosalie Wanders 80565331d8 3rdParty: disable vsync during netplay in mupen64plus-video-parallel 2024-12-25 21:46:45 +01:00
Rosalie Wanders 38cabc1ced RMG: don't respect M64P_GL_SWAP_CONTROL during netplay in VidExt.cpp 2024-12-25 21:41:09 +01:00
Rosalie Wanders 84fb6243c8 RMG: change logic order in CreateNetplaySessionDialog::accept() 2024-12-25 21:32:48 +01:00
Rosalie Wanders 48e21f1450 RMG: add nullptr check to CreateNetplaySessionDialog::accept() 2024-12-25 13:41:32 +01:00
Rosalie Wanders 7c76e8c3ff RMG: add error when downloading json file fails in CreateNetplaySessionDialog 2024-12-25 13:20:53 +01:00
Rosalie Wanders 5a443348cc RMG: make sendPushButton default automatically in NetplaySessionDialog 2024-12-25 13:18:14 +01:00
Rosalie Wanders c6480e258c 3rdParty: apply 'Disable VRU during netplay' patch to mupen64plus-core 2024-12-25 13:09:14 +01:00
Rosalie Wanders 9602aa2ef7 RMG: don't enforce same cpu_emulator because it gets synced 2024-12-25 12:56:22 +01:00
Rosalie Wanders a0369def10 RMG: also fix the game name we send to the server 2024-12-25 12:55:11 +01:00
Rosalie Wanders 7930965ff2 RMG: fix names not matching ROM browser in CreateNetplaySessionDialog 2024-12-24 22:10:42 +01:00
Rosalie Wanders 2bea2f07f7 RMG: fix storing ROM data duplicates in RomBrowserWidget.cpp 2024-12-24 22:10:11 +01:00
Rosalie Wanders b75aea7f26 RMG-Core: move Settings.{cpp,hpp} and include SettingsID.hpp 2024-12-24 17:38:33 +01:00
Rosalie Wanders e9f0f427b8 RMG: remove unrequired Settings.hpp include 2024-12-24 17:36:42 +01:00
Rosalie Wanders a5e685becd RMG-Audio: remove unrequired Settings.hpp includes 2024-12-24 17:36:31 +01:00
Rosalie Wanders f3986284ab RMG: remove unrequired include in CreateNetplaySessionDialog.cpp 2024-12-24 17:28:57 +01:00
Rosalie Wanders 33650061aa RMG-Core: change default of RomBrowser_MaxItems setting 2024-12-24 17:27:29 +01:00
Rosalie Wanders 421f1d105a Package: v0.6.8 2024-12-22 18:49:39 +01:00
Rosalie Wanders b6cbc52cb8 RMG: add refresh button to NetplaySessionBrowserDialog 2024-12-22 17:47:09 +01:00
Rosalie Wanders 82687d5db3 RMG: implement netplay support 2024-12-22 16:35:16 +01:00
Rosalie Wanders 08eb1e5ba4 RMG-Core: add netplay settings 2024-12-22 16:33:24 +01:00
Rosalie Wanders 83bc8f8c20 RMG-Core: implement netplay support 2024-12-22 16:33:11 +01:00
Rosalie Wanders cb9eb2ddee ci: install SDL2_net 2024-12-22 16:31:57 +01:00
Rosalie Wanders 3e61a72cf1 cmake: add NETPLAY option 2024-12-22 16:31:34 +01:00
Rosalie Wanders cc75ce55cb RMG-Core: fix crash on windows when opening an archive in Rom.cpp 2024-12-22 02:55:31 +01:00
Rosalie Wanders 1a84d6b7c4 RMG: fix vulkan video extension function definitions in VidExt.cpp 2024-12-20 14:15:52 +01:00
Rosalie Wanders 5fd460d4b9 Package: v0.6.7 2024-12-16 01:39:47 +01:00
Rosalie Wanders fea5ed99f8 RMG: add cursedUs64-git as contributor to AboutDialog.ui 2024-12-16 01:38:18 +01:00
Rosalie Wanders aa824cc1f7 3rdParty: update LZMA SDK to v24.09 2024-12-16 01:38:18 +01:00
Rosalie Wanders a575eff7ec 3rdParty: update SDL_GameControllerDB 2024-12-16 01:38:18 +01:00
Rosalie Wanders 4eaa2a9b5f 3rdParty: update mupen64plus-video-GLideN64 2024-12-16 01:38:18 +01:00
cursedUs64-git d406a421e9 RMG-Input: fix typo in ControllerWidget.ui (#306)
Fix a typo, instead of being `left:` it should be `Left:` to match with the other instances of the same.
2024-11-30 13:40:04 +01:00
Rosalie Wanders b6b1e9138c RMG-Core: correct error message in Volume.cpp 2024-11-22 13:08:11 +01:00
orbea 4596d2e6cf 3rdParty: remove -fno-strict-aliasing from mupen64plus-input-raphnetraw (#301)
The build succeeds with -Werror=strict-aliasing so this is not needed.
2024-11-04 18:21:51 +01:00
Rosalie Wanders 4cd4f4c6ea 3rdParty: update mupen64plus-core 2024-11-03 16:46:38 +01:00
Rosalie Wanders 37839b0178 RMG: fix out of bounds read in SettingsDialog::loadGamePluginSettings() 2024-10-21 21:20:08 +02:00
orbea 69c24b9131 3rdParty: improve the hidapi check in mupen64plus-input-raphnetraw (#297)
Better matches the style in mupen64plus-core.

Upstream-PR: https://github.com/raphnet/mupen64plus-input-raphnetraw/pull/17
2024-10-21 07:09:23 +02:00
Rosalie Wanders e68483fce2 3rdParty: update mupen64plus-video-GLideN64 2024-10-20 18:01:04 +02:00
orbea f6b73b86c6 3rdParty: don't hard-code pkg-config in mupen64plus-input-raphnetraw (#296) 2024-10-20 17:59:56 +02:00
1402 changed files with 118693 additions and 222403 deletions
+102 -30
View File
@@ -3,78 +3,131 @@ name: RMG
on: [push, pull_request]
jobs:
Linux:
runs-on: ubuntu-20.04
build-linux:
strategy:
matrix:
include:
- { os: ubuntu-24.04, features: ON, architecture: x86_64 }
- { os: ubuntu-24.04, features: OFF, architecture: x86_64 }
- { os: ubuntu-24.04-arm, features: ON, architecture: aarch64 }
- { os: ubuntu-24.04-arm, features: OFF, architecture: aarch64 }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hendrikmuhs/ccache-action@v1.2
with:
key: Linux
key: linux-${{ matrix.architecture }}-features-${{ matrix.features }}
- name: Install Packages
run: |
sudo add-apt-repository ppa:okirby/qt6-backports --yes
sudo apt-get -y install cmake ninja-build libhidapi-dev libsamplerate0-dev libspeex-dev libminizip-dev libsdl2-dev libfreetype6-dev libgl1-mesa-dev libglu1-mesa-dev pkg-config zlib1g-dev binutils-dev libspeexdsp-dev qt6-base-dev libqt6svg6-dev libvulkan-dev build-essential nasm git zip appstream
# remove and disable snap, this fixes long update times
# taken from https://github.com/ading2210/gh-actions-remove-snap/blob/main/workflow.sh
sudo systemctl disable --now snapd
sudo apt-get purge -y snapd
echo "Package: snapd" | sudo tee /etc/apt/preferences.d/disable-snap.pref
echo "Pin: release a=*" | sudo tee -a /etc/apt/preferences.d/disable-snap.pref
echo "Pin-Priority: -10" | sudo tee -a /etc/apt/preferences.d/disable-snap.pref
sudo apt-mark hold firefox
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install cmake libusb-1.0-0-dev libhidapi-dev libsamplerate0-dev libspeex-dev libminizip-dev libfreetype6-dev \
libgl1-mesa-dev libglu1-mesa-dev pkg-config zlib1g-dev binutils-dev libspeexdsp-dev qt6-base-dev libqt6svg6-dev libqt6websockets6-dev libvulkan-dev \
build-essential nasm git zip appstream xvfb qt6ct mesa-vulkan-drivers
# sdl3 dependencies
sudo apt-get -y install build-essential git make \
pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \
libaudio-dev libjack-dev libsndio-dev libx11-dev libxext-dev \
libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev \
libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \
libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev
- name: Prepare Environment
run: |
echo "GIT_REVISION=$(git describe --tags --always)" >> $GITHUB_ENV
- name: Build SDL3
run: |
export sdl_dir="$(pwd)/../SDL3"
git clone https://github.com/libsdl-org/SDL.git "$sdl_dir" -b release-3.2.24 --depth=1
mkdir -p "$sdl_dir/build"
cmake -S "$sdl_dir" -B "$sdl_dir/build" \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_LIBDIR="lib/${{ matrix.architecture }}-linux-gnu" \
-DCMAKE_INSTALL_FULL_LIBDIR="/usr/lib/${{ matrix.architecture }}-linux-gnu" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build "$sdl_dir/build" --parallel "$(nproc)"
sudo cmake --install "$sdl_dir/build" --prefix /usr/
- name: Build RMG (AppImage)
run: |
mkdir Build Build/AppImage Bin/ -p
export src_dir="$(pwd)"
export build_dir="$(pwd)/Build/AppImage"
export bin_dir="$(pwd)/Bin/AppImage"
mkdir $build_dir Bin/ -p
cmake -S "$src_dir" -B "$build_dir" -DCMAKE_BUILD_TYPE="Release" \
-DUSE_ANGRYLION=ON \
-DDRAG_DROP=${{ matrix.features }} \
-DNETPLAY=${{ matrix.features }} \
-DVRU=${{ matrix.features }} \
-DUSE_ANGRYLION=${{ matrix.features }} \
-DUPDATER=${{ matrix.features }} \
-DAPPIMAGE_UPDATER=${{ matrix.features }} \
-DPORTABLE_INSTALL=OFF \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DPORTABLE_INSTALL="OFF" \
-DUPDATER=ON -DAPPIMAGE_UPDATER=ON \
-G "Ninja"
cmake --build "$build_dir"
-G "Unix Makefiles"
cmake --build "$build_dir" --parallel "$(nproc)"
cmake --install "$build_dir" --strip --prefix="$bin_dir/usr"
shell: bash
- name: Create AppImage
if: ${{ matrix.features == 'ON' && matrix.architecture == 'x86_64' }}
run: |
./Package/AppImage/Create.sh
shell: bash
- name: Upload RMG (AppImage)
if: ${{ matrix.features == 'ON' && matrix.architecture == 'x86_64' }}
uses: actions/upload-artifact@v4
with:
name: RMG-Portable-Linux64-${{ env.GIT_REVISION }}
path: Bin/*.AppImage
Windows:
runs-on: windows-2019
build-windows:
runs-on: windows-2022
strategy:
matrix:
features: [ ON, OFF ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hendrikmuhs/ccache-action@v1.2
with:
key: Windows
key: windows-features-${{ matrix.features }}
- uses: msys2/setup-msys2@v2
with:
path-type: inherit
update: true
msystem: ucrt64
install: >-
make
mingw-w64-x86_64-cmake
mingw-w64-x86_64-ninja
mingw-w64-x86_64-gcc
mingw-w64-x86_64-hidapi
mingw-w64-x86_64-freetype
mingw-w64-x86_64-libpng
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-qt6
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-hidapi
mingw-w64-x86_64-speexdsp
mingw-w64-x86_64-libsamplerate
mingw-w64-x86_64-nasm
mingw-w64-x86_64-minizip
mingw-w64-x86_64-vulkan-headers
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-freetype
mingw-w64-ucrt-x86_64-libpng
mingw-w64-ucrt-x86_64-sdl3
mingw-w64-ucrt-x86_64-qt6
mingw-w64-ucrt-x86_64-libusb
mingw-w64-ucrt-x86_64-hidapi
mingw-w64-ucrt-x86_64-speexdsp
mingw-w64-ucrt-x86_64-libsamplerate
mingw-w64-ucrt-x86_64-nasm
mingw-w64-ucrt-x86_64-minizip
mingw-w64-ucrt-x86_64-vulkan-headers
git
- name: Prepare Environment
run: |
@@ -82,19 +135,38 @@ jobs:
echo "GIT_REVISION=$env:revision" >> $env:GITHUB_ENV
shell: pwsh
- name: Build RMG (Portable)
run: ./Source/Script/Build.sh Release
run: |
export src_dir="$(pwd)"
export build_dir="$(pwd)/Build/Release"
cmake -S "$src_dir" -B "$build_dir" -DCMAKE_BUILD_TYPE="Release" \
-DDRAG_DROP=${{ matrix.features }} \
-DNETPLAY=${{ matrix.features }} \
-DVRU=${{ matrix.features }} \
-DUSE_ANGRYLION=${{ matrix.features }} \
-DUPDATER=${{ matrix.features }} \
-DPORTABLE_INSTALL=ON \
-G "MSYS Makefiles"
cmake --build "$build_dir" --parallel "$(nproc)"
cmake --install "$build_dir" --strip --prefix="$src_dir"
cmake --build "$build_dir" --target=bundle_dependencies
shell: msys2 {0}
- name: Create Installer
if: ${{ matrix.features == 'ON' }}
run: .\Build\Release\Source\Installer\CreateInstaller.bat
- name: Configure RMG (Portable)
if: ${{ matrix.features == 'ON' }}
run: touch Bin/Release/portable.txt
shell: msys2 {0}
- name: Upload RMG (Portable)
if: ${{ matrix.features == 'ON' }}
uses: actions/upload-artifact@v4
with:
name: RMG-Portable-Windows64-${{ env.GIT_REVISION }}
path: Bin/Release/*
- name: Upload RMG (Installer)
if: ${{ matrix.features == 'ON' }}
uses: actions/upload-artifact@v4
with:
name: RMG-Setup-Windows64-${{ env.GIT_REVISION }}
+3
View File
@@ -17,6 +17,9 @@ compile_commands.json
# AppImage
squashfs-root
*.AppImage
Package/AppImage/appimagetool
Package/AppImage/lib4bin
Package/AppImage/sharun
# 3rdParty Build
Source/3rdParty/mupen64plus-core/src/asm_defines/asm_defines_gas.h
Source/3rdParty/mupen64plus-core/src/asm_defines/asm_defines_nasm.h
+4 -30
View File
@@ -6,14 +6,12 @@ cmake_minimum_required(VERSION 3.15)
option(PORTABLE_INSTALL "Portable Installation" ON)
option(UPDATER "Enables updater" ${WIN32})
option(APPIMAGE_UPDATER "Enables AppImage updater" OFF)
option(DISCORD_RPC "Enables Discord Rich Presence" ON)
option(DRAG_DROP "Enables drag and drop" ON)
option(NETPLAY "Enables netplay" ON)
option(VRU "Enables VRU support in RMG-Input" ON)
option(USE_CCACHE "Enables usage of ccache when ccache has been found" ON)
option(USE_LTO "Enables building with LTO/IPO when compiler supports it" ON)
option(NO_ASM "Disables the usage of assembly in the mupen64plus-core" OFF)
option(NO_RUST "Disables the building of rust subprojects" OFF)
option(USE_LIBFMT "Enables usage of libfmt instead of detecting whether std::format is supported" OFF)
option(USE_ANGRYLION "Enables building angrylion-rdp-plus which uses a non-GPL compliant license" OFF)
project(RMG)
@@ -57,27 +55,6 @@ if (USE_LTO)
endif()
endif(USE_LTO)
if (NOT USE_LIBFMT)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("
#include <format>
int main(void)
{
std::string str = std::format(\"number: {}\", 10);
return 0;
}" HAVE_STDFORMAT)
# fallback to libfmt if std::format
# isn't supported in the compiler
if (NOT HAVE_STDFORMAT)
set(USE_LIBFMT ON)
endif(NOT HAVE_STDFORMAT)
endif(NOT USE_LIBFMT)
if (NOT PORTABLE_INSTALL AND WIN32)
message(WARNING "Not-Portable build not supported on windows, re-enabling PORTABLE_INSTALL!")
set(PORTABLE_INSTALL ON)
@@ -137,6 +114,7 @@ add_subdirectory(Source/RMG-Core)
add_subdirectory(Source/RMG)
add_subdirectory(Source/RMG-Audio)
add_subdirectory(Source/RMG-Input)
add_subdirectory(Source/RMG-Input-GCA)
install(TARGETS RMG-Core
DESTINATION ${SYSTEM_LIB_INSTALL_PATH}
)
@@ -146,7 +124,7 @@ install(TARGETS RMG
install(TARGETS RMG-Audio
DESTINATION ${PLUGIN_INSTALL_PATH}/Audio
)
install(TARGETS RMG-Input
install(TARGETS RMG-Input RMG-Input-GCA
DESTINATION ${PLUGIN_INSTALL_PATH}/Input
)
@@ -154,7 +132,7 @@ if (WIN32)
add_subdirectory(Source/Installer)
add_custom_target(bundle_dependencies
COMMAND bash "${CMAKE_SOURCE_DIR}/Source/Script/BundleDependencies.sh" "${CMAKE_SOURCE_DIR}/Bin/${CMAKE_BUILD_TYPE}/RMG.exe" "${CMAKE_SOURCE_DIR}/Bin/${CMAKE_BUILD_TYPE}" "/mingw64/bin"
COMMAND bash "${CMAKE_SOURCE_DIR}/Source/Script/BundleDependencies.sh" "${CMAKE_SOURCE_DIR}/Bin/${CMAKE_BUILD_TYPE}/RMG.exe" "${CMAKE_SOURCE_DIR}/Bin/${CMAKE_BUILD_TYPE}"
)
endif(WIN32)
@@ -202,10 +180,6 @@ install(FILES ${MUPEN64PLUS_PLUGIN_INPUT_RAPHNET}
DESTINATION ${PLUGIN_INSTALL_PATH}/Input
PERMISSIONS ${LIB_PERMISSIONS}
)
install(FILES ${MUPEN64PLUS_PLUGIN_INPUT_GCA}
DESTINATION ${PLUGIN_INSTALL_PATH}/Input
PERMISSIONS ${LIB_PERMISSIONS}
)
if (USE_ANGRYLION)
install(FILES ${MUPEN64PLUS_PLUGIN_GFX_ANGRYLION}
DESTINATION ${PLUGIN_INSTALL_PATH}/GFX
+148
View File
@@ -0,0 +1,148 @@
[34AEB154-A4253B86-C:45]
Name=Conker's Bad Fur Day (U) [T+Spa1.1_Blade133bo]
$$Acceso\Todos los Capítulos, Escenas & Personajes Multijugador
50000401 0000
800E9D01 00FF
$$Acceso\Todos los Personajes & Armas en Multi Race
810E9D02 ??FF
FF Todos los Personajes & Bate de Béisbol
FB Todos los Personajes & Sartén
F3 Todos los Personajes & Huesos
$$Seleccionar Velocidad de Conker
810CC318 ????
3F00 Conker Lento
3F80 Conker Normal
3FF0 Conker Rápido
4030 Conker Superrápido
$$Infinito\Recuento de Precisión Jugador 1
Note=SOLO EN MULTI. Solo pon este código una vez que estés en el juego.
800E0B67 0001
$$Infinito\Bolsas En Heist
800E0BE4 00FF
$$Infinito\Bombas
802055CA 0030
$$Infinito\Recuento de Disparos a la Cabeza Jugador 1
Note=SOLO EN MULTI. Solo pon este código una vez que estés en el juego. Una vez que recojas un arma y dispares una vez, acertarás al 100%.
800E0B6B 03E7
$$Infinito\Salud\Jugador 1
800CC49A 0006
$$Infinito\Salud\Jugador 2
800CC7C6 270F
$$Infinito\Salud\Jugador 3
800CCAF2 270F
$$Infinito\Salud\Jugador 4
800CCE1E 270F
$$Infinito\Vidas Jugador 1
800D2144 0064
$$Infinito\Máximo de Muertes Jugador 1
800E0B47 03E7
$$Infinito\Lotes de Dinero
810D214A FFFF
$$Infinito\Tiempo En Multi
8108FD7A 7500
$$Modo Matrix (En Cualquier Momento)
Note=Pulsa R para activar y luego C-Derecha para salir.
D1042A14 0010
800BEA0C 0001
D1042A14 0010
810BE574 D202
D1042A14 0001
800BEA0C 0000
D1042A14 0001
810BE574 0000
$$Jugar como Opción 1
Note=Aquí puedes elegir con quién quieres jugar, pero solo una opción a la vez. La sombra no será visible, excepto cuando juegues como Conker.
800D213F 00??
01 Comadreja
02 Comadreja (Traje negro)
03 Tedi
04 Ardilla de Combate
05 Conker
08 Tanque (No se puede mover)
09 Dinosaurio (No se puede mover)
0B Uga
0C Cavernícola Calvo
0D Cavernícola
0E Cavernícola Mohicano
0F Cavernícola Spikey
10 Conker Neo
11 Aldeano Masculino
12 Aldeano Masculino (con gafas)
13 Aldeano Masculino (con bigote)
14 Aldeano Masculino (con gafas y bigote)
15 Aldeano Masculino (con sombrero)
16 Aldeano Masculino (con sombrero y gafas)
17 Aldeano Masculino (con sombrero y bigote)
18 Aldeano Masculino (con sombrero y gafas y bigote)
19 Aldeano Masculino (con gorra)
1A Aldeano Masculino (con gorra y gafas)
1B Aldeano Masculino (con gorra y bigote)
1C Aldeano Masculino (con gorra y gafas y bigote)
1D Aldeana Femenina
1F Aldeana Femenina (con capucha y gafas)
21 Zombi Masculino
22 Zombi Femenino
23 Murciélago Enemigo
24 Conker el Murciélago
25 Capitán del Ejercito
26 Jefe Tedi
27 Gregg
28 Gregg Huesudo
$$Pulsa L Para Levitar\Jugador 1
Note=Pulsa el Botón L para Levitar y Sueltalo para bajar
D0042A15 0020
810CC2F0 41CB
$$Pulsa L Para Levitar\Jugador 2
Note=Pulsa el Botón L para Levitar y Sueltalo para bajar
D0042A1D 0020
810CC61C 41CB
$$Pulsa L Para Levitar\Jugador 3
Note=Pulsa el Botón L para Levitar y Sueltalo para bajar
D0042A25 0020
810CC948 41CB
$$Pulsa L Para Levitar\Jugador 4
Note=Pulsa el Botón L para Levitar y Sueltalo para bajar
D0042A2D 0020
810CCC74 41CB
$$Activador de Animación de Espera
800CC5C8 00??
00 Por defecto como máximo
02 Animaciones de espera deshabilitadas
$$Selección de Arma en Multi (Al recoger)
Note=Selecciona el arma que quieras en el modo multijugador y luego, en una recogida de armas, tendrás el arma de tu elección. (Debes tener un arma ya recogida para cambiar por la próxima.)
80180873 00??
01 Espada
02 Nada
03 Motosierra Amarilla
04 Cuchillos Arrojadizos
05 Rifle
06 Revolver con Mira
07 Lanzacohetes
08 Escopeta
0A Rifle Francotirador Con Alcance
0C Metralletas Dobles
13 Máscara Antigás
+112
View File
@@ -0,0 +1,112 @@
[3A03E50F-E78D1CA7-C:45]
Name=GoldenEye 007 (U) [T+Spa2.0_Sogun&IlDucci]
$$Modo Depuración
Note=Pulsa A o Start para habilitar la opción actualmente seleccionada. Al pulsar Start cuando tengas el control del jugador, abrirá el menú reloj y cerrará el menú de depuración.
80036FCB 0001
$$Tener Todo\64 personajes en multijugador
Note=Habilita todos los personajes seleccionables para jugar en multijugador
8002B197 0040
$$Tener Todo\Objetivos Completados
80036FD3 0001
$$Todo Desbloqueado\Guardado 1
Note=Esto desbloquea todos los niveles, etapas, personajes en el modo multijugador y elementos del menú de trucos (habilite Invencible en el menú de trucos para tener salud infinita)
50002902 0000
810699EE FFFF
$$Todo Desbloqueado\Guardado 2
Note=Esto desbloquea todos los niveles, etapas, personajes en el modo multijugador y elementos del menú de trucos (habilite Invencible en el menú de trucos para tener salud infinita)
50002902 0000
8106992E FFFF
$$Todo Desbloqueado\Guardado 3
Note=Esto desbloquea todos los niveles, etapas, personajes en el modo multijugador y elementos del menú de trucos (habilite Invencible en el menú de trucos para tener salud infinita)
50002902 0000
81069A4E FFFF
$$Todo Desbloqueado\Guardado 4
Note=Esto desbloquea todos los niveles, etapas, personajes en el modo multijugador y elementos del menú de trucos (habilite Invencible en el menú de trucos para tener salud infinita)
50002902 0000
8106998E FFFF
$$Infinito\Munición (Todos los Niveles)
80079E3B 0001
$$Tener\Tiempo Infinito 00:00 (Todos los Niveles)
8004837E 0000
8004838E 0000
80048396 0000
80079A22 0000
80079F26 0000
$$Infinito\Salud (Todos los Niveles)
8100C0F4 0801
8100C0F6 8090
8100C0F8 AFA4
8100C0FA 0000
81060240 0004
81060242 7600
81060244 3C02
81060246 8008
81060248 8C42
8106024A 9EE0
8106024C 3401
8106024E 3F80
81060250 A441
81060252 00DC
81060254 0800
81060256 303F
$f
80048673 0013
81048678 3FC0
80048677 00D0
8004867F 000D
80048683 000A
8004868B 0013
81048690 3FC0
8004868F 00D0
80048697 000D
8004869B 000A
800486A3 0019
810486A8 3FC0
800486A7 00D3
800486AF 0006
800486B3 0003
800486BB 0019
810486C0 3FC0
800486BF 00D3
800486C7 0006
800486CB 0003
800486D3 0013
810486D8 3FC0
800486D7 00D0
800486DF 000D
800486E3 000A
800486EB 0013
810486F0 3FC0
800486EF 00D0
800486F7 000D
800486FB 000A
80048703 0019
81048708 3FC0
80048707 00D3
8004870F 0006
80048713 0003
8004871B 0019
81048720 3FC0
8004871F 00D3
80048727 0006
8004872B 0003
812AEA50 476F
812AEA52 6C64
812AEA54 656E
812AEA56 2047
812AEA58 756E
812AEA5A 2046
812AEA5C 756E
802AEA5E 0000
@@ -0,0 +1,50 @@
[D8C74049-29CDD8C4-C:50]
Name=007 - The World is Not Enough (E) [T+Spa1.0.1_IlDucci]
$$Acceso\Todos los Gadgets e Items
801147DD 0001
$$Acceso\Todas las Armas
Note=Viene con munición
801147DC 0001
$$Acceso\Todos los Niveles & Dificultades
81103B66 0021
50000D01 0000
80118F38 0001
$$Infinito\Oxígeno
800E25E4 0004
$$Infinito\Tiempo
81103B82 0000
$$Invencible
811147D8 0101
$$Multijugador\Acceso a Todos los Personajes Malvados
801147EB 0001
811147EC 0101
801147EE 0001
$$Multijugador\Acceso a Todas las Arenas
50005C0C 0000
800C0167 0081
$$Multijugador\Acceso a Todos los Escenarios
801147EF 0001
811147F0 0101
$$Multijugador\Acceso a Todos los Modos de Armamento
811147F2 0101
801147F4 0001
$$Multijugador\Acceso a Q Malvado
800C06EF 0081
$$Multijugador\Acceso a Q Bueno
800C06EF 0001
$$Multijugador\Invencible
811147D8 0101
Regular → Executable
+9 -9
View File
@@ -1,11 +1,11 @@
#!/usr/bin/env bash
set -e
#!/usr/bin/env sh
[ -f "$APPIMAGE".stylesheet ] && APPIMAGE_QT_THEME="$APPIMAGE.stylesheet"
[ -f "$APPIMAGE_QT_THEME" ] && set -- "$@" "-stylesheet" "$APPIMAGE_QT_THEME"
cur_dir="$(readlink -f "$(dirname "$0")")"
exec "$cur_dir/usr/bin/RMG" \
--lib-path="$cur_dir/usr/lib/RMG" \
--core-path="$cur_dir/usr/lib/RMG/Core" \
--plugin-path="$cur_dir/usr/lib/RMG/Plugin" \
--shared-data-path="$cur_dir/usr/share/RMG" \
"$@"
exec "$cur_dir/bin/RMG" \
--lib-path="$cur_dir/shared/lib/RMG" \
--core-path="$cur_dir/shared/lib/RMG/Core" \
--plugin-path="$cur_dir/shared/lib/RMG/Plugin" \
--shared-data-path="$cur_dir/share/RMG" \
"$@"
+66 -21
View File
@@ -4,37 +4,82 @@ set -ex
script_dir="$(dirname "$0")"
toplvl_dir="$(realpath "$script_dir/../../")"
bin_dir="$toplvl_dir/Bin/AppImage" # RMG should be installed here
lib_dir="/usr/lib64"
arch="$(uname -m)"
export QMAKE="$(which qmake6)"
export EXTRA_QT_PLUGINS="imageformats;iconengines;"
XVFB_RUN="xvfb-run -a --"
LIB4BIN_URL="https://raw.githubusercontent.com/VHSgunzo/sharun/refs/heads/main/lib4bin"
APPIMAGETOOL_URL="https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$arch.AppImage"
SHARUN_URL="https://github.com/VHSgunzo/sharun/releases/latest/download/sharun-$arch"
export ARCH="$arch"
export APPIMAGE_EXTRACT_AND_RUN=1
export VERSION="$(git describe --tags --always)"
export OUTPUT="$bin_dir/../RMG-Portable-Linux64-$VERSION.AppImage"
export LD_LIBRARY_PATH="$toplvl_dir/Build/AppImage/Source/RMG-Core" # hack
export SHARUN="$script_dir/sharun"
if [ ! -f "$script_dir/linuxdeploy-x86_64.AppImage" ]
if [[ ! -f "$script_dir/lib4bin" ]]
then
curl -L https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage \
-o "$script_dir/linuxdeploy-x86_64.AppImage"
chmod +x "$script_dir/linuxdeploy-x86_64.AppImage"
curl -L "$LIB4BIN_URL" -o "$script_dir/lib4bin"
chmod +x "$script_dir/lib4bin"
fi
if [ ! -f "$script_dir/linuxdeploy-plugin-qt-x86_64.AppImage" ]
if [[ ! -f "$script_dir/appimagetool" ]]
then
curl -L https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage \
-o "$script_dir/linuxdeploy-plugin-qt-x86_64.AppImage"
chmod +x "$script_dir/linuxdeploy-plugin-qt-x86_64.AppImage"
curl -L "$APPIMAGETOOL_URL" -o "$script_dir/appimagetool"
chmod +x "$script_dir/appimagetool"
fi
"$script_dir/linuxdeploy-plugin-qt-x86_64.AppImage" --appimage-extract
"$script_dir/linuxdeploy-x86_64.AppImage" --appimage-extract
if [[ ! -f "$script_dir/sharun" ]]
then
curl -L "$SHARUN_URL" -o "$script_dir/sharun"
chmod +x "$script_dir/sharun"
fi
# delete appimages
rm "$script_dir/linuxdeploy-x86_64.AppImage" \
"$script_dir/linuxdeploy-plugin-qt-x86_64.AppImage"
if [[ "x$DISPLAY" != "x" ]]
then
XVFB_RUN=""
fi
"$(pwd)/squashfs-root/AppRun" \
--plugin=qt \
--appdir="$bin_dir" \
--custom-apprun="$script_dir/AppRun" \
--output=appimage \
--desktop-file="$bin_dir/usr/share/applications/com.github.Rosalie241.RMG.desktop"
if [[ -d "/usr/lib/$arch-linux-gnu/" ]]
then
lib_dir="/usr/lib/$arch-linux-gnu/"
fi
cp "$bin_dir/usr/share/applications/com.github.Rosalie241.RMG.desktop" "$bin_dir"
cp "$bin_dir/usr/share/icons/hicolor/scalable/apps/com.github.Rosalie241.RMG.svg" "$bin_dir"
ln -s ./com.github.Rosalie241.RMG.svg "$bin_dir"/.DirIcon
mv "$bin_dir/usr/share" "$bin_dir/share"
mv "$bin_dir/usr" "$bin_dir/shared"
$XVFB_RUN "$script_dir/lib4bin" --dst-dir "$bin_dir" \
--hard-links --strip --with-hooks \
--strace-mode --with-sharun \
"$bin_dir/shared/bin/RMG" \
"$lib_dir"/libSDL* \
"$lib_dir"/libspeexdsp* \
"$lib_dir"/libhidapi-hidraw* \
"$lib_dir"/libGL* \
"$lib_dir"/libEGL* \
"$lib_dir"/libvulkan* \
"$lib_dir"/dri/* \
"$lib_dir"/libssl.so* \
"$lib_dir"/qt6/plugins/iconengines/* \
"$lib_dir"/qt6/plugins/imageformats/* \
"$lib_dir"/qt6/plugins/platforms/* \
"$lib_dir"/qt6/plugins/platformthemes/* \
"$lib_dir"/qt6/plugins/styles/* \
"$lib_dir"/qt6/plugins/xcbglintegrations/* \
"$lib_dir"/qt6/plugins/tls/* \
"$lib_dir"/qt6/plugins/wayland-*/*
# Prepare sharun
"$bin_dir/sharun" -g
cp "$script_dir/AppRun" "$bin_dir"
# make appimage
"$script_dir/appimagetool" --comp zstd \
--mksquashfs-opt -Xcompression-level --mksquashfs-opt 22 \
-n "$bin_dir" "$OUTPUT"
+4 -5
View File
@@ -1,14 +1,14 @@
# Maintainer: Rosalie Wanders <rosalie@mailbox.org>
pkgname=rmg
pkgver=0.6.6
pkgver=0.8.5
pkgrel=1
pkgdesc="Rosalie's Mupen GUI"
arch=('x86_64' 'aarch64')
url="https://github.com/Rosalie241/$pkgname"
license=('GPL3')
depends=("hidapi" "libsamplerate" "speexdsp" "minizip" "sdl2" "zlib" "freetype2" "qt6-base" "qt6-svg")
makedepends=("git" "nasm" "cmake" "ninja")
depends=("libusb" "hidapi" "libsamplerate" "speexdsp" "minizip" "sdl3" "zlib" "freetype2" "qt6-base" "qt6-svg" "qt6-websockets")
makedepends=("git" "nasm" "cmake" "vulkan-headers")
source=("git+https://github.com/Rosalie241/$pkgname.git#tag=v$pkgver")
sha256sums=('SKIP')
@@ -24,8 +24,7 @@ build()
-DCMAKE_BUILD_TYPE="Release" \
-DPORTABLE_INSTALL="OFF" \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DNO_RUST="ON" \
-G "Ninja"
-G "Unix Makefiles"
cmake --build "$srcdir/$pkgname/build"
}
+8 -4
View File
@@ -1,5 +1,5 @@
Name: RMG
Version: 0.6.6
Version: 0.8.5
Release: %autorelease
Summary: Rosalie's Mupen GUI
@@ -11,10 +11,11 @@ BuildRequires: gcc
BuildRequires: g++
BuildRequires: nasm
BuildRequires: cmake
BuildRequires: libusb1-devel
BuildRequires: hidapi-devel
BuildRequires: libsamplerate-devel
BuildRequires: minizip-compat-devel
BuildRequires: SDL2-devel
BuildRequires: SDL3-devel
BuildRequires: freetype-devel
BuildRequires: mesa-libGL-devel
BuildRequires: mesa-libGLU-devel
@@ -23,15 +24,18 @@ BuildRequires: binutils-devel
BuildRequires: speexdsp-devel
BuildRequires: qt6-qtbase-devel
BuildRequires: qt6-qtsvg-devel
BuildRequires: qt6-qtwebsockets-devel
BuildRequires: libxkbcommon-devel
Requires: libusb1
Requires: hidapi
Requires: SDL2
Requires: SDL3
Requires: zlib-ng
Requires: libsamplerate
Requires: speexdsp
Requires: qt6-qtbase
Requires: qt6-qtsvg
Requires: qt6-qtwebsockets
%description
Rosalie's Mupen GUI is a free and open-source mupen64plus front-end written in C++
@@ -40,7 +44,7 @@ Rosalie's Mupen GUI is a free and open-source mupen64plus front-end written in C
%autosetup
%build
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPORTABLE_INSTALL=OFF -DDISCORD_RPC=OFF
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPORTABLE_INSTALL=OFF
%cmake_build
%install
Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 KiB

After

Width:  |  Height:  |  Size: 460 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 80 KiB

@@ -29,6 +29,276 @@
</screenshot>
</screenshots>
<releases>
<release version="v0.8.5" date="2025-10-09" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix buttons being stuck as pressed in the configuration GUI of RMG-Input in some cases</li>
</ul>
</description>
</release>
<release version="v0.8.4" date="2025-10-09" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix 'Test Rumble' functionality in RMG-Input not checking for rumble support since v0.8.1</li>
<li>Fix exit confirmation checkbox saving the setting when rejecting the dialog</li>
<li>Remove discord rich presence support</li>
<li>Remove mupen64plus-input-gca</li>
<li>Remove fallback to libfmt when 'std::format' isn't supported by the compiler</li>
<li>Introduce RMG-Input-GCA</li>
<li>Update mupen64plus-core, GLideN64 and SDL_GameControllerDB</li>
</ul>
</description>
</release>
<release version="v0.8.3" date="2025-09-28" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix supported 64DD games not having the transfer pak functionality enabled</li>
<li>Fix crash in Mario Artist Talent Studio when using mupen64plus-rsp-hle since v0.8.2</li>
<li>Fix frame count not increasing from 0 since v0.8.2</li>
<li>Fix loading save states freezing since v0.8.2</li>
<li>Add clear buttons to 64DD IPL settings in the settings dialog</li>
</ul>
</description>
</release>
<release version="v0.8.2" date="2025-09-26" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix screenshot filename being incorrect when playing 64DD games</li>
<li>Fix GameBoy tower functionality not working in Pokemon Stadium 1 and 2</li>
<li>Add clear buttons to transfer pak settings in RMG-Input</li>
<li>Add support for the GameBoy camera by implementing a SDL3 backend in mupen64plus-core</li>
<li>Improve accuracy of RSP</li>
</ul>
</description>
</release>
<release version="v0.8.1" date="2025-09-23" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix incorrect usage of 'i.e' and replace it with 'e.g.' in the settings dialog</li>
<li>Fix 7zip archives not supporting the PPMd compression method</li>
<li>Fix being able to open another game while emulation is being started</li>
<li>Fix allowing drag and drop events while emulation is being started</li>
<li>Add 'Ask for confirmation on exit while in-game' setting</li>
<li>Migrate RMG-Audio to SDL3 (thank you loganmc10 for the help)</li>
<li>Migrate RMG-Input to SDL3</li>
<li>Migrate RMG to SDL3</li>
<li>Migrate mupen64plus-core to SDL3 and SDL3_net</li>
<li>Update GLideN64 and LZMA SDK</li>
</ul>
</description>
</release>
<release version="v0.8.0" date="2025-09-10" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix 64DD games crashing in some cases since v0.7.8</li>
<li>Add Windows Vista theme to settings on Windows (thank you RibShark)</li>
<li>Add support for the netplay dispatch server</li>
</ul>
</description>
</release>
<release version="v0.7.9" date="2025-05-19" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix netplay allocating UDP packets during emulation</li>
<li>Fix 'Game List' and 'Game Grid' UI elements not being disabled during emulation</li>
<li>Fix compilation error with newer minizip-ng versions</li>
<li>Add search feature to the ROM browser</li>
<li>Add crop settings for each side in mupen64plus-video-parallel</li>
<li>Change default ROM search limit to 2048</li>
<li>Update mupen64plus-video-GLideN64 and mupen64plus-rsp-hle</li>
</ul>
</description>
</release>
<release version="v0.7.8" date="2025-03-23" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix ROM browser loading screen showing '[0/0]'</li>
<li>Fix configuration dialog of RMG-Input not closing when pressing escape</li>
<li>Fix AppImage not including libhidapi-hidraw</li>
<li>Fix AppImage not working on nvidia GPUs since v0.7.7 (thank you Samueru-sama)</li>
<li>Fix casing in error message in RMG-Core</li>
<li>Fix missing space for 'Start:' label in RMG-Input</li>
<li>Fix inconsistent height for UI elements in RMG-Input</li>
<li>Fix mupen64plus not being shutdown properly</li>
<li>Fix high memory requirement introduced in v0.7.1</li>
<li>Add bounds checking for some DMA operations</li>
<li>Add new controller image to RMG-Input (thank you Jaffacakelover)</li>
<li>Add support for using a local file path for the netplay server list URL</li>
<li>Swap Z-Trigger and Start UI elements in RMG-Input</li>
</ul>
</description>
</release>
<release version="v0.7.7" date="2025-03-05" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix error messages not being shown when initialization fails</li>
<li>Fix emulation error not being shown when launched with '--quit-after-emulation'</li>
<li>Fix AppImage not including libspeexdsp</li>
<li>Fix mupen64plus-video-parallel not respecting rdp full sync</li>
<li>Fix crash when quitting RMG while the ROM browser is refreshing</li>
<li>Fix initial column sizes being incorrect in some cases</li>
<li>Add exception handler for Windows which generates a minidump</li>
<li>Change "Join Session" to "Browse Sessions" in the Netplay menu</li>
<li>Change ROM browser cache limit to 250000</li>
<li>Remove "Synchronize RDP and CPU" setting from mupen64plus-video-parallel</li>
<li>Improve loading time of the ROM browser when there are invalid ROMs in the ROM directory</li>
</ul>
</description>
</release>
<release version="v0.7.6" date="2025-02-22" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix possible crash in parallel when vulkan initialization fails</li>
<li>Remove support for hotplugging controllers while in-game in RMG-Input</li>
</ul>
</description>
</release>
<release version="v0.7.5" date="2025-02-16" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix incorrect error message in RMG-Core</li>
<li>Fix possible crash on Windows (thank you Thirteen1355 for assisting with debugging)</li>
<li>Fix missing space between 'L-Shoulder' and 'R-Shoulder' in RMG-Input</li>
<li>Fix 'L-Trigger' and 'R-Trigger' names by changing it to 'L-Shoulder' and 'R-Shoulder' in RMG-Input</li>
<li>Improve opening time of 'Edit Game Input Settings' by utilizing the ROM browser cache</li>
<li>Improve configuration dialogs from plugins by setting the parent window</li>
</ul>
</description>
</release>
<release version="v0.7.4" date="2025-02-15" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix covers in JPEG format not loading on windows since v0.7.3</li>
<li>Fix RMG not inhibiting the screensaver during emulation</li>
<li>Fix not having supported archives listed when opening 64DD Disks through 'Open Combo'</li>
<li>Fix RMG-Audio spamming the log with sample warnings</li>
<li>Add captions to all file and directory dialogs</li>
<li>Improve logging when retrieving OpenGL context fails</li>
</ul>
</description>
</release>
<release version="v0.7.3" date="2025-02-09" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix portable windows version not being able to find update file</li>
<li>Fix cheat sections being able to be hidden in Netplay Session dialog</li>
<li>Fix 'You're already on the latest version' message being shown as an error</li>
<li>Fix empty messages being able to be sent in the Netplay Session dialog</li>
<li>Fix flicker in the Netplay Session Browser dialog</li>
<li>Fix 'Controller pak' typo in the settings dialog</li>
<li>Fix potential crashes when using the dynamic recompiler</li>
<li>Add cheats for Spanish translation of 007 The world is not enough, Conker's Bad Fur Day and Goldeneye 007 (thank you Pcgaming575)</li>
<li>Add 'View Session' to 'Netplay' menu allowing you to re-open the Netplay Session dialog after closing it when in-game</li>
<li>Improve message boxes by expanding the details by default</li>
<li>Improve windows build by building in an UCRT64 environment</li>
<li>Improve cheats dialog, settings dialog and ROM Information dialog opening time by utilizing the ROM browser cache</li>
<li>Implement register mirroring</li>
<li>Change 'RMG_WAYLAND' variable name to 'RMG_ALLOW_WAYLAND'</li>
<li>Remove 'Sort results after search' setting</li>
<li>Remove 'RMG_SHOW_DEBUG_QT_MESSAGES' variable</li>
<li>Update GLideN64 and paraLLEl</li>
</ul>
</description>
</release>
<release version="v0.7.2" date="2025-01-31" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix Log dialog and Netplay Session dialog not having a minimize button</li>
<li>Fix Netplay Session dialog not having an icon</li>
<li>Fix cheats not applying at emulation start</li>
<li>Improve netplay dialogs by saving and restoring the server selection</li>
<li>Improve netplay dialogs by adding icons to some buttons</li>
<li>Improve netplay dialogs by showing the ping</li>
<li>Improve device detection of RMG-Input</li>
<li>Implement cheat support for netplay</li>
</ul>
</description>
</release>
<release version="v0.7.1" date="2025-01-21" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix RDRAM initialization allowing for libdragon IPL3 to boot</li>
<li>Fix AppImage not working on some Linux distributions (thank you Samueru-sama)</li>
<li>Fix 64DD disks being shown in the Create Netplay Session dialog</li>
<li>Add support for ROMs that are bigger than 64MiB</li>
<li>Add support for launching a cartridge + disk combo where the disk is in an archive</li>
<li>Add stricter filename validation in the update dialog</li>
<li>Improve Netplay Session dialog by keeping it open while in-game</li>
<li>Improve 'Play Game with Disk' by turning it into a context menu</li>
</ul>
</description>
</release>
<release version="v0.7.0" date="2025-01-05" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix Netplay Session Browser dialog not resetting properly when requesting sessions fails</li>
<li>Fix freeze when opening the input configuration GUI from RMG-Input during netplay</li>
<li>Fix nickname validation not being consistent in the netplay dialogs</li>
<li>Fix downloading server list not having a timeout</li>
<li>Fix update check not having a timeout</li>
<li>Fix build failure when building with netplay disabled</li>
<li>Fix minimap in Mario Kart 64 not displaying properly during splitscreen in GLideN64</li>
</ul>
</description>
</release>
<release version="v0.6.9" date="2024-12-28" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix ROM browser storing multiple copies of the ROM information in memory</li>
<li>Fix game names in the Create Netplay Session dialog</li>
<li>Fix same CPU emulator setting being enforced during netplay</li>
<li>Fix VRU being able to be initialized during netplay</li>
<li>Fix enter key not clicking on the 'Send' button in the Netplay Session dialog</li>
<li>Fix vsync being able to be enabled during netplay</li>
<li>Fix 'Synchronize audio' in RMG-Audio being able to be enabled during netplay</li>
<li>Fix OSD tab of GLideN64 not listing all installed fonts on Linux</li>
<li>Add more error messages to the netplay dialogs</li>
<li>Add loading screen to the Netplay Session Browser dialog</li>
<li>Add no sessions screen to the Netplay Session Browser dialog</li>
<li>Add no ROMs screen to the Create Netplay Session dialog</li>
<li>Change default ROM search limit from 250 to 1024</li>
<li>Change 'Server URL' to 'Server list URL' in the settings dialog</li>
</ul>
</description>
</release>
<release version="v0.6.8" date="2024-12-22" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix crash on windows when opening a archive with files with an invalid character sequence</li>
<li>Fix video extension function definitions to prevent them from being exported</li>
<li>Implement netplay support (thank you loganmc10 for the hosted servers)</li>
</ul>
</description>
</release>
<release version="v0.6.7" date="2024-12-16" type="stable">
<description>
<p>Changes:</p>
<ul>
<li>Fix out of bounds read in game specific plugin settings</li>
<li>Fix inconsistent casing for the 'Left:' label in RMG-Input (thank you cursedUs64-git)</li>
<li>Fix incorrect error message in RMG-Core</li>
<li>Update mupen64plus-video-GLideN64, mupen64plus-core, LZMA SDK and SDL_GameControllerDB</li>
</ul>
</description>
</release>
<release version="v0.6.6" date="2024-09-30" type="stable">
<description>
<p>Changes:</p>
+6 -6
View File
@@ -38,25 +38,25 @@ Rosalie's Mupen GUI is licensed under the [GNU General Public License v3.0](http
* Portable Debian/Ubuntu
```bash
sudo apt-get -y install cmake libhidapi-dev libsamplerate0-dev libspeex-dev libminizip-dev libsdl2-dev libfreetype6-dev libgl1-mesa-dev libglu1-mesa-dev pkg-config zlib1g-dev binutils-dev libspeexdsp-dev qt6-base-dev libqt6svg6-dev libvulkan-dev build-essential nasm git zip ninja-build
sudo apt-get -y install cmake libusb-1.0-0-dev libhidapi-dev libsamplerate0-dev libspeex-dev libminizip-dev libsdl3-dev libfreetype6-dev libgl1-mesa-dev libglu1-mesa-dev pkg-config zlib1g-dev binutils-dev libspeexdsp-dev qt6-base-dev libqt6svg6-dev libvulkan-dev build-essential nasm git zip ninja-build
./Source/Script/Build.sh Release
```
* Portable Fedora
```bash
sudo dnf install hidapi-devel libsamplerate-devel minizip-compat-devel SDL2-devel freetype-devel mesa-libGL-devel mesa-libGLU-devel pkgconfig zlib-ng-devel binutils-devel speexdsp-devel qt6-qtbase-devel qt6-qtsvg-devel vulkan-devel gcc-c++ nasm git ninja-build
sudo dnf install libusb1-devel hidapi-devel libsamplerate-devel minizip-compat-devel SDL3-devel freetype-devel mesa-libGL-devel mesa-libGLU-devel pkgconfig zlib-ng-devel binutils-devel speexdsp-devel qt6-qtbase-devel qt6-qtsvg-devel vulkan-devel gcc-c++ nasm git ninja-build
./Source/Script/Build.sh Release
```
* Portable Arch Linux
```bash
sudo pacman -S --needed make cmake gcc hidapi freetype2 libpng qt6 sdl2 libsamplerate nasm minizip pkgconf vulkan-headers git
sudo pacman -S --needed make cmake gcc libusb hidapi freetype2 libpng qt6 sdl3 libsamplerate nasm minizip pkgconf vulkan-headers git
./Source/Script/Build.sh Release
```
* Portable OpenSUSE Tumbleweed
```bash
sudo zypper install SDL2-devel cmake freetype2-devel gcc gcc-c++ libhidapi-devel libhidapi-hidraw0 libpng16-devel libsamplerate-devel make nasm ninja pkgconf-pkg-config speex-devel vulkan-devel zlib-devel qt6-tools-devel qt6-opengl-devel qt6-widgets-devel qt6-svg-devel minizip-devel git
sudo zypper install SDL3-devel cmake freetype2-devel gcc gcc-c++ libusb-1_0-devel libhidapi-devel libhidapi-hidraw0 libpng16-devel libsamplerate-devel make nasm ninja pkgconf-pkg-config speex-devel vulkan-devel zlib-devel qt6-tools-devel qt6-opengl-devel qt6-widgets-devel qt6-svg-devel minizip-devel git
./Source/Script/Build.sh Release
```
@@ -73,9 +73,9 @@ cmake --install "$build_dir" --prefix="/usr"
```
#### Windows
* Download & Install [MSYS2](https://www.msys2.org/)
* Download & Install [MSYS2](https://www.msys2.org/) (UCRT64)
```bash
pacman -S --needed make mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc mingw-w64-x86_64-hidapi mingw-w64-x86_64-freetype mingw-w64-x86_64-libpng mingw-w64-x86_64-qt6 mingw-w64-x86_64-SDL2 mingw-w64-x86_64-speexdsp mingw-w64-x86_64-libsamplerate mingw-w64-x86_64-nasm mingw-w64-x86_64-minizip mingw-w64-x86_64-vulkan-headers git
pacman -S --needed make mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-libusb mingw-w64-ucrt-x86_64-hidapi mingw-w64-ucrt-x86_64-freetype mingw-w64-ucrt-x86_64-libpng mingw-w64-ucrt-x86_64-qt6 mingw-w64-ucrt-x86_64-sdl3 mingw-w64-ucrt-x86_64-speexdsp mingw-w64-ucrt-x86_64-libsamplerate mingw-w64-ucrt-x86_64-libusb mingw-w64-ucrt-x86_64-nasm mingw-w64-ucrt-x86_64-minizip mingw-w64-ucrt-x86_64-vulkan-headers git
./Source/Script/Build.sh Release
```
+33 -86
View File
@@ -3,15 +3,7 @@
#
include(ExternalProject)
find_program(RUST_CARGO cargo)
if(NO_RUST)
set(BUILD_INPUT_GCA OFF)
elseif(${RUST_CARGO} STREQUAL "RUST_CARGO-NOTFOUND")
message(WARNING "mupen64plus-input-gca will not be built due to not having cargo installed")
set(BUILD_INPUT_GCA OFF)
else()
set(BUILD_INPUT_GCA ON)
endif()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(M64P_CORE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/mupen64plus-core)
if(WIN32)
@@ -62,6 +54,20 @@ else()
set(MAKE_DEBUG "0")
endif()
# TODO: when SDL3_net has made a release,
# remove the vendored SDL3_net
set(SDL3NET_DIR ${CMAKE_CURRENT_SOURCE_DIR}/SDL_net)
set(SDL3NET_SOURCES
${SDL3NET_DIR}/src/SDL_net.c
)
add_library(SDL3_net STATIC ${SDL3NET_SOURCES})
target_include_directories(SDL3_net PRIVATE ${SDL3NET_DIR}/include)
set(SDL3NET_CFLAGS "-DUSE_SDL3NET -I${SDL3NET_DIR}/include")
set(SDL3NET_LDLIBS "$<TARGET_FILE:SDL3_net>")
if (WIN32)
set(SDL3NET_LDLIBS "${SDL3NET_LDLIBS} -liphlpapi -lws2_32")
endif (WIN32)
ExternalProject_Add(mupen64plus-core
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/mupen64plus-core/
@@ -71,15 +77,20 @@ ExternalProject_Add(mupen64plus-core
BUILD_COMMAND ${MAKE_CMD} all -f ${M64P_CORE_DIR}/projects/unix/Makefile
SRCDIR=${CMAKE_CURRENT_SOURCE_DIR}/mupen64plus-core/src
SUBDIR=${CMAKE_CURRENT_SOURCE_DIR}/mupen64plus-core/subprojects
OSD=0 NEW_DYNAREC=1 NO_ASM=$<BOOL:${NO_ASM}> KEYBINDINGS=0 ACCURATE_FPU=1 VULKAN=0
OSD=0 NEW_DYNAREC=1 NO_ASM=$<BOOL:${NO_ASM}>
KEYBINDINGS=0 ACCURATE_FPU=1 VULKAN=0 NETPLAY=$<BOOL:${NETPLAY}>
TARGET=${CORE_FILE} DEBUG=${MAKE_DEBUG}
CC=${MAKE_CC_COMPILER} CXX=${MAKE_CXX_COMPILER}
OPTFLAGS=${MAKE_OPTFLAGS}
# TODO: when SDL3_net has made a release,
# remove the vendored SDL3_net
SDLNET_CFLAGS=${SDL3NET_CFLAGS} SDLNET_LDLIBS=${SDL3NET_LDLIBS}
BUILD_IN_SOURCE False
BUILD_ALWAYS True
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/mupen64plus-core
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/mupen64plus-core/${CORE_FILE}
DEPENDS SDL3_net
)
set(APIDIR "${CMAKE_SOURCE_DIR}/Source/3rdParty/mupen64plus-core/src/api")
@@ -151,37 +162,17 @@ ExternalProject_Add(mupen64plus-input-raphnetraw
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/mupen64plus-input-raphnetraw/mupen64plus-input-raphnetraw.${SO_EXT}
)
if (BUILD_INPUT_GCA)
ExternalProject_Add(mupen64plus-input-gca
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/mupen64plus-input-gca/
CONFIGURE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND cargo build --manifest-path ${CMAKE_CURRENT_SOURCE_DIR}/mupen64plus-input-gca/Cargo.toml --release --features "m64p_compat" --target-dir=${CMAKE_CURRENT_BINARY_DIR}/mupen64plus-input-gca/target
BUILD_IN_SOURCE False
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/mupen64plus-input-gca/target/release
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/mupen64plus-input-gca/target/release/${GCA_LIB}
)
endif(BUILD_INPUT_GCA)
set(GLIDEN64_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mupen64plus-video-GLideN64")
set(GLIDEN64_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/mupen64plus-video-GLideN64")
set(GLIDEN64_CUSTOM_INI "${GLIDEN64_DIR}/ini/GLideN64.custom.ini")
if (WIN32)
set(GLIDEN64_LIB "${GLIDEN64_BUILD_DIR}/mupen64plus-video-GLideN64.${SO_EXT}")
else(WIN32)
# taken from GLideN64's CMakeLists.txt
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR
"${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel" OR
"${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
set(GLIDEN64_BUILD_TYPE Release)
elseif("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
set(GLIDEN64_BUILD_TYPE Debug)
endif()
set(GLIDEN64_LIB "${GLIDEN64_BUILD_DIR}/plugin/${GLIDEN64_BUILD_TYPE}/mupen64plus-video-GLideN64.${SO_EXT}")
endif(WIN32)
# taken from GLideN64's CMakeLists.txt
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR
"${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel" OR
"${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
set(GLIDEN64_BUILD_TYPE Release)
elseif("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
set(GLIDEN64_BUILD_TYPE Debug)
endif()
set(GLIDENUI_TRANSLATIONS_LANGS "de;es;fr;it;ja;pl;pt_BR")
foreach(LANG ${GLIDENUI_TRANSLATIONS_LANGS})
@@ -215,7 +206,7 @@ ExternalProject_Add(mupen64plus-video-GLideN64
SOURCE_SUBDIR ./src/
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/mupen64plus-video-GLideN64
BUILD_BYPRODUCTS ${GLIDEN64_LIB}
BUILD_BYPRODUCTS ${GLIDEN64_BUILD_DIR}/plugin/${GLIDEN64_BUILD_TYPE}/mupen64plus-video-GLideN64.${SO_EXT}
)
ExternalProject_Add(mupen64plus-video-parallel
@@ -231,24 +222,8 @@ ExternalProject_Add(mupen64plus-video-parallel
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/mupen64plus-video-parallel/mupen64plus-video-parallel.${SO_EXT}
)
if (DISCORD_RPC)
ExternalProject_Add(discord-rpc
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/discord-rpc
INSTALL_COMMAND ""
BUILD_IN_SOURCE False
BUILD_ALWAYS True
CMAKE_ARGS -DBUILD_EXAMPLES=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON ${CMAKE_CONFIGURE_ARGS}
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/discord-rpc
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/discord-rpc/src/libdiscord-rpc.a
)
endif(DISCORD_RPC)
set(IMGUI_DIR ${CMAKE_CURRENT_SOURCE_DIR}/imgui)
set(IMGUI_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/imgui/)
set(IMGUI_SOURCES_IN
set(IMGUI_SOURCES
${IMGUI_DIR}/imgui_draw.cpp
${IMGUI_DIR}/imgui_tables.cpp
${IMGUI_DIR}/imgui_widgets.cpp
@@ -257,24 +232,8 @@ set(IMGUI_SOURCES_IN
${IMGUI_DIR}/backends/imgui_impl_opengl3.h
${IMGUI_DIR}/backends/imgui_impl_opengl3_loader.h
)
set(IMGUI_SOURCES_OUT
${IMGUI_BUILD_DIR}/imgui_draw.cpp
${IMGUI_BUILD_DIR}/imgui_tables.cpp
${IMGUI_BUILD_DIR}/imgui_widgets.cpp
${IMGUI_BUILD_DIR}/imgui.cpp
${IMGUI_BUILD_DIR}/imgui_impl_opengl3.cpp
${IMGUI_BUILD_DIR}/imgui_impl_opengl3.h
${IMGUI_BUILD_DIR}/imgui_impl_opengl3_loader.h
)
ExternalProject_Add(imgui
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/imgui
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory ${IMGUI_BUILD_DIR}
BUILD_COMMAND ${CMAKE_COMMAND} -E copy ${IMGUI_SOURCES_IN} ${IMGUI_BUILD_DIR}
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ${IMGUI_SOURCES_OUT}
)
add_library(imgui STATIC ${IMGUI_SOURCES})
target_include_directories(imgui PRIVATE ${IMGUI_DIR})
set(SDL_GAMECONTROLLERDB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/SDL_GameControllerDB)
set(SDL_GAMECONTROLLERDB_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/SDL_GameControllerDB)
@@ -310,11 +269,6 @@ set(MUPEN64PLUS_PLUGIN_RSP_PARALLEL ${BUILD_BYPRODUCTS} PARENT_SCOPE)
ExternalProject_Get_property(mupen64plus-input-raphnetraw BUILD_BYPRODUCTS)
set(MUPEN64PLUS_PLUGIN_INPUT_RAPHNET ${BUILD_BYPRODUCTS} PARENT_SCOPE)
if (BUILD_INPUT_GCA)
ExternalProject_Get_property(mupen64plus-input-gca BUILD_BYPRODUCTS)
set(MUPEN64PLUS_PLUGIN_INPUT_GCA ${BUILD_BYPRODUCTS} PARENT_SCOPE)
endif(BUILD_INPUT_GCA)
if (USE_ANGRYLION)
ExternalProject_Get_property(mupen64plus-video-angrylion-plus BUILD_BYPRODUCTS)
set(MUPEN64PLUS_PLUGIN_GFX_ANGRYLION ${BUILD_BYPRODUCTS} PARENT_SCOPE)
@@ -327,13 +281,6 @@ set(MUPEN64PLUS_PLUGIN_GFX_GLIDEN64_DATA ${GLIDENUI_TRANSLATIONS} ${GLIDEN64_CUS
ExternalProject_Get_property(mupen64plus-video-parallel BUILD_BYPRODUCTS)
set(MUPEN64PLUS_PLUGIN_GFX_PARALLEL ${BUILD_BYPRODUCTS} PARENT_SCOPE)
if (DISCORD_RPC)
ExternalProject_Get_property(discord-rpc BUILD_BYPRODUCTS)
set(DISCORD_RPC_LIB ${BUILD_BYPRODUCTS} PARENT_SCOPE)
endif(DISCORD_RPC)
ExternalProject_Get_property(imgui BUILD_BYPRODUCTS)
set(IMGUI_SOURCES ${BUILD_BYPRODUCTS} PARENT_SCOPE)
set(IMGUI_DIR ${CMAKE_CURRENT_SOURCE_DIR}/imgui PARENT_SCOPE)
ExternalProject_Get_property(SDL_GameControllerDB BUILD_BYPRODUCTS)
@@ -4,8 +4,8 @@ on:
branches: [master]
jobs:
duplicates:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
python duplicates.py
python duplicates.py
+3 -3
View File
@@ -6,7 +6,7 @@
[subrepo]
remote = git@github.com:/gabomdq/SDL_GameControllerDB.git
branch = master
commit = 0f4081f054c85b983c5464f0d0ee759b9fddaa0a
parent = dfd0958b21741d8783e7135166fab4a2436ecc58
commit = 38fc811c715365e963a6942092cae147eddddc90
parent = f0bc3df81827953535b8d8702be34a0ed1edd227
method = merge
cmdver = 0.4.6
cmdver = 0.4.9
+2 -1
View File
@@ -1,4 +1,4 @@
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -15,3 +15,4 @@ freely, subject to the following restrictions:
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.
+7 -9
View File
@@ -36,22 +36,20 @@ There are a few different tools that let you create mappings.
### [SDL2 Gamepad Tool](http://www.generalarcade.com/gamepadtool/)
Third party cross-platform tool with GUI (Windows, macOS and Linux)
#### Note: While convenient, this tool has fallen out of date as SDL has amended and added new features for gamepad support (see issue [#478](https://github.com/gabomdq/SDL_GameControllerDB/issues/476)). As such, maps authored with this tool require greater scrutiny to ensure they will not break support for explicit mappings the SDL project provides.
### [SDL2 Gamepad Mapper](https://gitlab.com/ryochan7/sdl2-gamepad-mapper/-/releases)
Open source GUI app for authoring mappings. Builds available for Windows and Linux.
*While convenient, this tool has fallen out of date as SDL has amended and added new features for gamepad support (see [#478](https://github.com/gabomdq/SDL_GameControllerDB/issues/476)). Maps authored with this tool require maintainer scrutiny to ensure they will not break support for explicit mappings the SDL project provides.*
### [SDL](https://github.com/libsdl-org/SDL/releases/latest)
[testcontroller (SDL3)](https://github.com/libsdl-org/SDL/blob/main/test/testcontroller.c) and [controllermap (SDL2)](https://github.com/libsdl-org/SDL/blob/SDL2/test/controllermap.c) utilities are the official tools to create these mappings on all SDL supported platforms (Windows, Mac, Linux, iOS, Android, etc).
### [Steam](http://store.steampowered.com)
In Steam's Big Picture mode, configure your gamepad. Then look in `[steam_installation_directory]/config/config.vdf` in your Steam installation directory for the `SDL_GamepadBind` entry. It is one of the last entries, it will look something like this:
```
"SDL_GamepadBind" "030000004c050000c405000000010000,PS4 Controller,platform:Windows,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,"
```
## Resources
* [SDL2](http://www.libsdl.org)
* [SDL_GameControllerAddMappingsFromFile](http://wiki.libsdl.org/SDL_GameControllerAddMappingsFromFile)
### [SDL2](https://wiki.libsdl.org/SDL2/)
* [Game Controller Support](https://wiki.libsdl.org/SDL2/CategoryGameController)
* [SDL_GameControllerAddMappingsFromFile](https://wiki.libsdl.org/SDL2/SDL_GameControllerAddMappingsFromFile)
### [SDL3](https://wiki.libsdl.org/SDL3/)
* [Gamepad Support](https://wiki.libsdl.org/SDL3/CategoryGamepad)
* [SDL_AddGamepadMappingsFromFile](https://wiki.libsdl.org/SDL3/SDL_AddGamepadMappingsFromFile)
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,62 @@
name: 'Setup ninja'
description: 'Download ninja and add it to the PATH environment variable'
inputs:
version:
description: 'Ninja version'
default: '1.12.1'
runs:
using: 'composite'
steps:
- name: 'Calculate variables'
id: calc
shell: sh
run: |
case "${{ runner.os }}-${{ runner.arch }}" in
"Linux-X86" | "Linux-X64")
archive="ninja-linux.zip"
;;
"Linux-ARM64")
archive="ninja-linux-aarch64.zip"
;;
"macOS-X86" | "macOS-X64" | "macOS-ARM64")
archive="ninja-mac.zip"
;;
"Windows-X86" | "Windows-X64")
archive="ninja-win.zip"
;;
"Windows-ARM64")
archive="ninja-winarm64.zip"
;;
*)
echo "Unsupported ${{ runner.os }}-${{ runner.arch }}"
exit 1;
;;
esac
echo "archive=${archive}" >> ${GITHUB_OUTPUT}
echo "cache-key=${archive}-${{ inputs.version }}-${{ runner.os }}-${{ runner.arch }}" >> ${GITHUB_OUTPUT}
- name: 'Restore cached ${{ steps.calc.outputs.archive }}'
id: cache-restore
uses: actions/cache/restore@v4
with:
path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}'
key: ${{ steps.calc.outputs.cache-key }}
- name: 'Download ninja ${{ inputs.version }} for ${{ runner.os }} (${{ runner.arch }})'
if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
shell: pwsh
run: |
Invoke-WebRequest "https://github.com/ninja-build/ninja/releases/download/v${{ inputs.version }}/${{ steps.calc.outputs.archive }}" -OutFile "${{ runner.temp }}/${{ steps.calc.outputs.archive }}"
- name: 'Cache ${{ steps.calc.outputs.archive }}'
if: ${{ !steps.cache-restore.outputs.cache-hit || steps.cache-restore.outputs.cache-hit == 'false' }}
uses: actions/cache/save@v4
with:
path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}'
key: ${{ steps.calc.outputs.cache-key }}
- name: 'Extract ninja'
shell: pwsh
run: |
7z "-o${{ runner.temp }}/ninja-${{ inputs.version }}-${{ runner.arch }}" x "${{ runner.temp }}/${{ steps.calc.outputs.archive }}"
- name: 'Set output variables'
id: final
shell: pwsh
run: |
echo "${{ runner.temp }}/ninja-${{ inputs.version }}-${{ runner.arch }}" >> $env:GITHUB_PATH
+90
View File
@@ -0,0 +1,90 @@
name: Build
on:
pull_request:
push:
jobs:
Build:
name: '${{ matrix.platform.name }}'
runs-on: '${{ matrix.platform.os }}'
strategy:
fail-fast: false
matrix:
platform:
- { name: 'Linux', os: ubuntu-latest, shell: sh }
- { name: 'MacOS', os: macos-latest, shell: sh }
# - { name: 'Windows msys2 (mingw32)', os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
- { name: 'Windows msys2 (mingw64)', os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 }
# - { name: 'Windows msys2 (clang32)', os: windows-latest, shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686 }
- { name: 'Windows msys2 (clang64)', os: windows-latest, shell: 'msys2 {0}', msystem: clang64, msys-env: mingw-w64-clang-x86_64 }
# - { name: 'Windows MSVC (x86)', os: windows-latest, shell: sh, msvc: true, msvc-arch: x86, cmake: '-DPerl_ROOT=C:/Strawberry/perl/bin/' }
- { name: 'Windows MSVC (x64)', os: windows-latest, shell: sh, msvc: true, msvc-arch: x64, cmake: '-DPerl_ROOT=C:/Strawberry/perl/bin/' }
# - { name: 'Windows MSVC (arm32)', os: windows-latest, shell: sh, msvc: true, msvc-arch: amd64_arm, cross: true }
# - { name: 'Windows MSVC (arm64)', os: windows-latest, shell: sh, msvc: true, msvc-arch: amd64_arm64, cross: true }
defaults:
run:
shell: ${{ matrix.platform.shell }}
steps:
- uses: ilammy/msvc-dev-cmd@v1
if: ${{ matrix.platform.msvc }}
with:
arch: ${{ matrix.platform.msvc-arch }}
- name: Set up MSYS2
if: ${{ contains(matrix.platform.shell, 'msys2') }}
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.platform.msystem }}
install: >-
${{ matrix.platform.msys-env }}-cc
${{ matrix.platform.msys-env }}-cmake
${{ matrix.platform.msys-env }}-crt
${{ matrix.platform.msys-env }}-ninja
${{ matrix.platform.msys-env }}-perl
- name: Get SDL3_net sources
uses: actions/checkout@v4
- name: Install Ninja
if: ${{ !contains(matrix.platform.shell, 'msys2') }}
uses: aseprite/get-ninja@main
- name: Set up SDL3
uses: libsdl-org/setup-sdl@main
id: sdl
with:
cmake-generator: Ninja
version: 3-head
sdl-test: true
shell: ${{ matrix.platform.shell }}
add-to-environment: true
- name: Configure (CMake)
run: |
cmake -B build -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=prefix \
-DSDLNET_WERROR=ON \
-DSDLNET_INSTALL_MAN=ON \
-DCMAKE_INSTALL_PREFIX=prefix \
${{ matrix.platform.cmake }}
- name: Build (CMake)
run: |
cmake --build build/ --verbose
- name: Install (CMake)
if: ${{ matrix.platform.shell == 'sh' || contains(matrix.platform.shell, 'msys2') }}
run: |
set -eu
rm -fr DESTDIR-cmake
cmake --install build/ --config Release
echo "SDL3_net_ROOT=$(pwd)/prefix" >> $GITHUB_ENV
( cd prefix; find . ) | LC_ALL=C sort -u
- name: Verify CMake configuration files
run: |
cmake -S cmake/test -B cmake_config_build \
-DCMAKE_BUILD_TYPE=Release \
-DTEST_SHARED=TRUE \
-DTEST_STATIC=FALSE
cmake --build cmake_config_build --verbose
- name: Check that versioning is consistent
# We only need to run this once: arbitrarily use the Linux build
if: ${{ runner.os == 'Linux' }}
run: ./build-scripts/test-versioning.sh
+737
View File
@@ -0,0 +1,737 @@
name: 'release'
run-name: 'Create SDL_net release artifacts for ${{ inputs.commit }}'
on:
workflow_dispatch:
inputs:
commit:
description: 'Commit of SDL_net'
required: true
jobs:
src:
runs-on: ubuntu-latest
outputs:
project: ${{ steps.releaser.outputs.project }}
version: ${{ steps.releaser.outputs.version }}
src-tar-gz: ${{ steps.releaser.outputs.src-tar-gz }}
src-tar-xz: ${{ steps.releaser.outputs.src-tar-xz }}
src-zip: ${{ steps.releaser.outputs.src-zip }}
steps:
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: 'Fetch build-release.py'
uses: actions/checkout@v4
with:
ref: ${{ inputs.commit }}
sparse-checkout: 'build-scripts/build-release.py'
- name: 'Set up SDL sources'
uses: actions/checkout@v4
with:
ref: ${{ inputs.commit }}
path: 'SDL'
fetch-depth: 0
- name: 'Build Source archive'
id: releaser
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
python build-scripts/build-release.py \
--actions source \
--commit ${{ inputs.commit }} \
--root "${{ github.workspace }}/SDL" \
--github \
--debug
- name: 'Store source archives'
uses: actions/upload-artifact@v4
with:
name: sources
path: '${{ github.workspace}}/dist'
- name: 'Generate summary'
run: |
echo "Run the following commands to download all artifacts:" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "mkdir -p /tmp/${{ steps.releaser.outputs.project }}-${{ steps.releaser.outputs.version }}" >> $GITHUB_STEP_SUMMARY
echo "cd /tmp/${{ steps.releaser.outputs.project }}-${{ steps.releaser.outputs.version }}" >> $GITHUB_STEP_SUMMARY
echo "gh run -R ${{ github.repository }} download ${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
linux-verify:
needs: [src]
runs-on: ubuntu-latest
steps:
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '/tmp'
- name: 'Unzip ${{ needs.src.outputs.src-zip }}'
id: zip
run: |
set -e
mkdir /tmp/zipdir
cd /tmp/zipdir
unzip "/tmp/${{ needs.src.outputs.src-zip }}"
echo "path=/tmp/zipdir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
id: tar
run: |
set -e
mkdir -p /tmp/tardir
tar -C /tmp/tardir -v -x -f "/tmp/${{ needs.src.outputs.src-tar-gz }}"
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Compare contents of ${{ needs.src.outputs.src-zip }} and ${{ needs.src.outputs.src-tar-gz }}'
run: |
set -e
diff "${{ steps.zip.outputs.path }}" "${{ steps.tar.outputs.path }}"
- name: 'Test versioning'
shell: bash
run: |
${{ steps.tar.outputs.path }}/build-scripts/test-versioning.sh
- name: 'Fetch build-release.py'
uses: actions/checkout@v4
with:
ref: ${{ inputs.commit }}
sparse-checkout: 'build-scripts/build-release.py'
- name: 'Download dependencies'
id: deps
env:
GH_TOKEN: ${{ github.token }}
run: |
python build-scripts/build-release.py \
--actions download \
--commit ${{ inputs.commit }} \
--root "${{ steps.tar.outputs.path }}" \
--github \
--debug
- name: 'Install Linux dependencies'
run: |
sudo apt-get update -y
sudo apt-get install -y \
gnome-desktop-testing libasound2-dev libpulse-dev libaudio-dev libjack-dev libsndio-dev \
libusb-1.0-0-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev \
libxss-dev libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \
libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev
- name: 'Extract dependencies, build and install them'
id: deps-build
run: |
tar -C /tmp -v -x -f "${{ steps.deps.outputs.dep-path }}/SDL3-${{ steps.deps.outputs.dep-sdl-version }}.tar.gz"
cmake -S /tmp/SDL3-${{ steps.deps.outputs.dep-sdl-version }} -B /tmp/SDL-build -DCMAKE_INSTALL_PREFIX=/tmp/deps-prefix
cmake --build /tmp/SDL-build
cmake --install /tmp/SDL-build
echo "path=/tmp/deps-prefix" >>$GITHUB_OUTPUT
- name: 'CMake (configure + build)'
run: |
cmake \
-S ${{ steps.tar.outputs.path }} \
-B /tmp/build \
-DSDL3net_SAMPLES=ON \
-DSDL3net_TESTS=ON \
-DCMAKE_PREFIX_PATH="${{ steps.deps-build.outputs.path }}"
cmake --build /tmp/build --verbose
# ctest --test-dir /tmp/build --no-tests=error --output-on-failure
# dmg:
# needs: [src]
# runs-on: macos-latest
# outputs:
# dmg: ${{ steps.releaser.outputs.dmg }}
# steps:
# - name: 'Set up Python'
# uses: actions/setup-python@v5
# with:
# python-version: '3.11'
# - name: 'Fetch build-release.py'
# uses: actions/checkout@v4
# with:
# ref: ${{ inputs.commit }}
# sparse-checkout: 'build-scripts/build-release.py'
# - name: 'Download source archives'
# uses: actions/download-artifact@v4
# with:
# name: sources
# path: '${{ github.workspace }}'
# - name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
# id: tar
# run: |
# mkdir -p "${{ github.workspace }}/tardir"
# tar -C "${{ github.workspace }}/tardir" -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
# echo "path=${{ github.workspace }}/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
## - name: 'Download external dependencies'
## run: |
## sh "${{ steps.tar.outputs.path }}/external/download.sh" --depth 1
# - name: 'Build SDL3_net.dmg'
# id: releaser
# shell: bash
# env:
# GH_TOKEN: ${{ github.token }}
# run: |
# python build-scripts/build-release.py \
# --actions dmg \
# --commit ${{ inputs.commit }} \
# --root "${{ steps.tar.outputs.path }}" \
# --github \
# --debug
# - name: 'Store DMG image file'
# uses: actions/upload-artifact@v4
# with:
# name: dmg
# path: '${{ github.workspace }}/dist'
#
# dmg-verify:
# needs: [dmg, src]
# runs-on: macos-latest
# steps:
# - name: 'Set up Python'
# uses: actions/setup-python@v5
# with:
# python-version: '3.11'
# - name: 'Fetch build-release.py'
# uses: actions/checkout@v4
# with:
# ref: ${{ inputs.commit }}
# sparse-checkout: 'build-scripts/build-release.py'
# - name: 'Download source archives'
# uses: actions/download-artifact@v4
# with:
# name: sources
# path: '${{ github.workspace }}'
# - name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
# id: src
# run: |
# mkdir -p /tmp/tardir
# tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
# echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
# - name: 'Download dependencies'
# id: deps
# env:
# GH_TOKEN: ${{ github.token }}
# run: |
# python build-scripts/build-release.py \
# --actions download \
# --commit ${{ inputs.commit }} \
# --root "${{ steps.src.outputs.path }}" \
# --github \
# --debug
# - name: 'Mount dependencies'
# id: deps-mount
# run: |
# hdiutil attach "${{ steps.deps.outputs.dep-path }}/SDL3-${{ steps.deps.outputs.dep-sdl-version }}.dmg"
# sdl_mount_pount="/Volumes/SDL3"
# if [ ! -d "$sdl_mount_pount/SDL3.xcframework" ]; then
# echo "Cannot find SDL3.xcframework!"
# exit 1
# fi
# echo "path=${sdl_mount_pount}" >>$GITHUB_OUTPUT
# - name: 'Download ${{ needs.dmg.outputs.dmg }}'
# uses: actions/download-artifact@v4
# with:
# name: dmg
# path: '${{ github.workspace }}'
# - name: 'Mount ${{ needs.dmg.outputs.dmg }}'
# id: mount
# run: |
# hdiutil attach '${{ github.workspace }}/${{ needs.dmg.outputs.dmg }}'
# mount_point="/Volumes/${{ needs.src.outputs.project }}"
# if [ ! -d "$mount_point/${{ needs.src.outputs.project }}.xcframework" ]; then
# echo "Cannot find ${{ needs.src.outputs.project }}.xcframework!"
# exit 1
# fi
# echo "mount-point=${mount_point}">>$GITHUB_OUTPUT
# - name: 'CMake (configure + build) Darwin'
# run: |
# set -e
# cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
# -DTEST_SHARED=TRUE \
# -DTEST_SHARED=TRUE \
# -DTEST_STATIC=FALSE \
# -DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount-point }};${{ steps.deps-mount.outputs.path }}" \
# -DCMAKE_SYSTEM_NAME=Darwin \
# -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
# -Werror=dev \
# -B build_darwin
# cmake --build build_darwin --config Release --verbose
#
# - name: 'CMake (configure + build) iOS'
# run: |
# cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
# -DTEST_SHARED=TRUE \
# -DTEST_STATIC=FALSE \
# -DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount-point }};${{ steps.deps-mount.outputs.path }}" \
# -DCMAKE_SYSTEM_NAME=iOS \
# -DCMAKE_OSX_ARCHITECTURES="arm64" \
# -Werror=dev \
# -B build_ios
# cmake --build build_ios --config Release --verbose
# - name: 'CMake (configure + build) tvOS'
# run: |
# cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
# -DTEST_SHARED=TRUE \
# -DTEST_STATIC=FALSE \
# -DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount-point }};${{ steps.deps-mount.outputs.path }}" \
# -DCMAKE_SYSTEM_NAME=tvOS \
# -DCMAKE_OSX_ARCHITECTURES="arm64" \
# -Werror=dev \
# -B build_tvos
# cmake --build build_tvos --config Release --verbose
# - name: 'CMake (configure + build) iOS simulator'
# run: |
# sysroot=$(xcodebuild -version -sdk iphonesimulator Path)
# echo "sysroot=$sysroot"
# cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
# -DTEST_SHARED=TRUE \
# -DTEST_STATIC=FALSE \
# -DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount-point }};${{ steps.deps-mount.outputs.path }}" \
# -DCMAKE_SYSTEM_NAME=iOS \
# -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
# -DCMAKE_OSX_SYSROOT="${sysroot}" \
# -Werror=dev \
# -B build_ios_simulator
# cmake --build build_ios_simulator --config Release --verbose
# - name: 'CMake (configure + build) tvOS simulator'
# run: |
# sysroot=$(xcodebuild -version -sdk appletvsimulator Path)
# echo "sysroot=$sysroot"
# cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
# -DTEST_SHARED=TRUE \
# -DTEST_STATIC=FALSE \
# -DCMAKE_PREFIX_PATH="${{ steps.mount.outputs.mount-point }};${{ steps.deps-mount.outputs.path }}" \
# -DCMAKE_SYSTEM_NAME=tvOS \
# -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
# -DCMAKE_OSX_SYSROOT="${sysroot}" \
# -Werror=dev \
# -B build_tvos_simulator
# cmake --build build_tvos_simulator --config Release --verbose
msvc:
needs: [src]
runs-on: windows-2025
outputs:
VC-x86: ${{ steps.releaser.outputs.VC-x86 }}
VC-x64: ${{ steps.releaser.outputs.VC-x64 }}
VC-devel: ${{ steps.releaser.outputs.VC-devel }}
steps:
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: 'Fetch build-release.py'
uses: actions/checkout@v4
with:
ref: ${{ inputs.commit }}
sparse-checkout: 'build-scripts/build-release.py'
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Unzip ${{ needs.src.outputs.src-zip }}'
id: zip
run: |
New-Item C:\temp -ItemType Directory -ErrorAction SilentlyContinue
cd C:\temp
unzip "${{ github.workspace }}/${{ needs.src.outputs.src-zip }}"
echo "path=C:\temp\${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$Env:GITHUB_OUTPUT
# - name: 'Download external dependencies'
# run: |
# ${{ steps.zip.outputs.path }}/external/Get-GitModules.ps1
- name: 'Build MSVC binary archives'
id: releaser
env:
GH_TOKEN: ${{ github.token }}
run: |
python build-scripts/build-release.py `
--actions download msvc `
--commit ${{ inputs.commit }} `
--root "${{ steps.zip.outputs.path }}" `
--github `
--debug
- name: 'Store MSVC archives'
uses: actions/upload-artifact@v4
with:
name: msvc
path: '${{ github.workspace }}/dist'
msvc-verify:
needs: [msvc, src]
runs-on: windows-latest
steps:
- name: 'Fetch .github/actions/setup-ninja/action.yml'
uses: actions/checkout@v4
with:
ref: ${{ inputs.commit }}
sparse-checkout: |
.github/actions/setup-ninja/action.yml
build-scripts/build-release.py
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Set up ninja
uses: ./.github/actions/setup-ninja
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Unzip ${{ needs.src.outputs.src-zip }}'
id: src
run: |
mkdir '${{ github.workspace }}/sources'
cd '${{ github.workspace }}/sources'
unzip "${{ github.workspace }}/${{ needs.src.outputs.src-zip }}"
echo "path=${{ github.workspace }}/sources/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$env:GITHUB_OUTPUT
- name: 'Download dependencies'
id: deps
env:
GH_TOKEN: ${{ github.token }}
run: |
python build-scripts/build-release.py `
--actions download `
--commit ${{ inputs.commit }} `
--root "${{ steps.src.outputs.path }}" `
--github `
--debug
- name: 'Extract dependencies'
id: deps-extract
run: |
mkdir '${{ github.workspace }}/deps-vc'
cd '${{ github.workspace }}/deps-vc'
unzip "${{ steps.deps.outputs.dep-path }}/SDL3-devel-${{ steps.deps.outputs.dep-sdl-version }}-VC.zip"
echo "path=${{ github.workspace }}/deps-vc" >>$env:GITHUB_OUTPUT
- name: 'Download MSVC binaries'
uses: actions/download-artifact@v4
with:
name: msvc
path: '${{ github.workspace }}'
- name: 'Unzip ${{ needs.msvc.outputs.VC-devel }}'
id: bin
run: |
mkdir '${{ github.workspace }}/vc'
cd '${{ github.workspace }}/vc'
unzip "${{ github.workspace }}/${{ needs.msvc.outputs.VC-devel }}"
echo "path=${{ github.workspace }}/vc/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$env:GITHUB_OUTPUT
- name: 'Configure vcvars x86'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64_x86
- name: 'CMake (configure + build + tests) x86'
run: |
cmake -S "${{ steps.src.outputs.path }}/cmake/test" `
-B build_x86 `
-GNinja `
-DCMAKE_BUILD_TYPE=Debug `
-Werror=dev `
-DTEST_SHARED=TRUE `
-DTEST_STATIC=FALSE `
-DCMAKE_SUPPRESS_REGENERATION=TRUE `
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }};${{ steps.deps-extract.outputs.path }}"
Start-Sleep -Seconds 2
cmake --build build_x86 --config Release --verbose
- name: 'Configure vcvars x64'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: 'CMake (configure + build + tests) x64'
run: |
cmake -S "${{ steps.src.outputs.path }}/cmake/test" `
-B build_x64 `
-GNinja `
-DCMAKE_BUILD_TYPE=Debug `
-Werror=dev `
-DTEST_SHARED=TRUE `
-DTEST_STATIC=FALSE `
-DCMAKE_SUPPRESS_REGENERATION=TRUE `
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }};${{ steps.deps-extract.outputs.path }}"
Start-Sleep -Seconds 2
cmake --build build_x64 --config Release --verbose
- name: 'Configure vcvars arm64'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64_arm64
- name: 'CMake (configure + build + tests) arm64'
run: |
cmake -S "${{ steps.src.outputs.path }}/cmake/test" `
-B build_arm64 `
-GNinja `
-DCMAKE_BUILD_TYPE=Debug `
-Werror=dev `
-DTEST_SHARED=TRUE `
-DTEST_STATIC=FALSE `
-DCMAKE_SUPPRESS_REGENERATION=TRUE `
-DCMAKE_PREFIX_PATH="${{ steps.bin.outputs.path }};${{ steps.deps-extract.outputs.path }}"
Start-Sleep -Seconds 2
cmake --build build_arm64 --config Release --verbose
mingw:
needs: [src]
runs-on: ubuntu-24.04 # FIXME: current ubuntu-latest ships an outdated mingw, replace with ubuntu-latest once 24.04 becomes the new default
outputs:
mingw-devel-tar-gz: ${{ steps.releaser.outputs.mingw-devel-tar-gz }}
mingw-devel-tar-xz: ${{ steps.releaser.outputs.mingw-devel-tar-xz }}
steps:
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: 'Fetch build-release.py'
uses: actions/checkout@v4
with:
ref: ${{ inputs.commit }}
sparse-checkout: 'build-scripts/build-release.py'
- name: 'Install Mingw toolchain'
run: |
sudo apt-get update -y
sudo apt-get install -y gcc-mingw-w64 g++-mingw-w64 ninja-build
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
id: tar
run: |
mkdir -p /tmp/tardir
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Build MinGW binary archives'
id: releaser
env:
GH_TOKEN: ${{ github.token }}
run: |
python build-scripts/build-release.py \
--actions download mingw \
--commit ${{ inputs.commit }} \
--root "${{ steps.tar.outputs.path }}" \
--github \
--debug
- name: 'Store MinGW archives'
uses: actions/upload-artifact@v4
with:
name: mingw
path: '${{ github.workspace }}/dist'
mingw-verify:
needs: [mingw, src]
runs-on: ubuntu-latest
steps:
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: 'Fetch build-release.py'
uses: actions/checkout@v4
with:
ref: ${{ inputs.commit }}
sparse-checkout: 'build-scripts/build-release.py'
- name: 'Install Mingw toolchain'
run: |
sudo apt-get update -y
sudo apt-get install -y gcc-mingw-w64 g++-mingw-w64 ninja-build
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
id: src
run: |
mkdir -p /tmp/tardir
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Download dependencies'
id: deps
env:
GH_TOKEN: ${{ github.token }}
run: |
python build-scripts/build-release.py \
--actions download \
--commit ${{ inputs.commit }} \
--root "${{ steps.src.outputs.path }}" \
--github \
--debug
- name: 'Untar and install dependencies'
id: deps-extract
run: |
mkdir -p /tmp/deps-mingw/cmake
mkdir -p /tmp/deps-mingw/i686-w64-mingw32
mkdir -p /tmp/deps-mingw/x86_64-w64-mingw32
mkdir -p /tmp/deps-mingw-extract/sdl3
tar -C /tmp/deps-mingw-extract/sdl3 -v -x -f "${{ steps.deps.outputs.dep-path }}/SDL3-devel-${{ steps.deps.outputs.dep-sdl-version }}-mingw.tar.gz"
make -C /tmp/deps-mingw-extract/sdl3/SDL3-${{ steps.deps.outputs.dep-sdl-version }} install-all DESTDIR=/tmp/deps-mingw
# FIXME: this should be fixed in SDL3 releases after 3.1.3
mkdir -p /tmp/deps-mingw/cmake
cp -rv /tmp/deps-mingw-extract/sdl3/SDL3-${{ steps.deps.outputs.dep-sdl-version }}/cmake/* /tmp/deps-mingw/cmake
- name: 'Download MinGW binaries'
uses: actions/download-artifact@v4
with:
name: mingw
path: '${{ github.workspace }}'
- name: 'Untar and install ${{ needs.mingw.outputs.mingw-devel-tar-gz }}'
id: bin
run: |
mkdir -p /tmp/mingw-tardir
tar -C /tmp/mingw-tardir -v -x -f "${{ github.workspace }}/${{ needs.mingw.outputs.mingw-devel-tar-gz }}"
make -C /tmp/mingw-tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }} install-all DESTDIR=/tmp/deps-mingw
- name: 'CMake (configure + build) i686'
run: |
set -e
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DCMAKE_BUILD_TYPE="Release" \
-DTEST_SHARED=TRUE \
-DTEST_STATIC=FALSE \
-DCMAKE_PREFIX_PATH="/tmp/deps-mingw" \
-DCMAKE_TOOLCHAIN_FILE="${{ steps.src.outputs.path }}/build-scripts/cmake-toolchain-mingw64-i686.cmake" \
-Werror=dev \
-B build_x86
cmake --build build_x86 --config Release --verbose
- name: 'CMake (configure + build) x86_64'
run: |
set -e
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-DCMAKE_BUILD_TYPE="Release" \
-DTEST_SHARED=TRUE \
-DTEST_STATIC=FALSE \
-DCMAKE_PREFIX_PATH="/tmp/deps-mingw" \
-DCMAKE_TOOLCHAIN_FILE="${{ steps.src.outputs.path }}/build-scripts/cmake-toolchain-mingw64-x86_64.cmake" \
-Werror=dev \
-B build_x64
cmake --build build_x64 --config Release --verbose
android:
needs: [src]
runs-on: ubuntu-latest
outputs:
android-aar: ${{ steps.releaser.outputs.android-aar }}
steps:
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: 'Fetch build-release.py'
uses: actions/checkout@v4
with:
sparse-checkout: 'build-scripts/build-release.py'
- name: 'Setup Android NDK'
uses: nttld/setup-ndk@v1
with:
local-cache: true
ndk-version: r28c
- name: 'Setup Java JDK'
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: 'Install ninja'
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
id: tar
run: |
mkdir -p /tmp/tardir
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Build Android prefab binary archive(s)'
id: releaser
env:
GH_TOKEN: ${{ github.token }}
run: |
python build-scripts/build-release.py \
--actions download android \
--commit ${{ inputs.commit }} \
--root "${{ steps.tar.outputs.path }}" \
--github \
--debug
- name: 'Store Android archive(s)'
uses: actions/upload-artifact@v4
with:
name: android
path: '${{ github.workspace }}/dist'
android-verify:
needs: [android, src]
runs-on: ubuntu-latest
steps:
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: 'Download source archives'
uses: actions/download-artifact@v4
with:
name: sources
path: '${{ github.workspace }}'
- name: 'Download Android .aar archive'
uses: actions/download-artifact@v4
with:
name: android
path: '${{ github.workspace }}'
- name: 'Untar ${{ needs.src.outputs.src-tar-gz }}'
id: src
run: |
mkdir -p /tmp/tardir
tar -C /tmp/tardir -v -x -f "${{ github.workspace }}/${{ needs.src.outputs.src-tar-gz }}"
echo "path=/tmp/tardir/${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$GITHUB_OUTPUT
- name: 'Extract Android SDK from AAR'
id: sdk
run: |
unzip -o "${{ github.workspace }}/${{ needs.android.outputs.android-aar }}"
python "${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}.aar" -o /tmp/SDL3_net-android
echo "prefix=/tmp/SDL3_net-android" >>$GITHUB_OUTPUT
- name: 'Download dependencies'
id: deps
env:
GH_TOKEN: ${{ github.token }}
run: |
python "${{ steps.src.outputs.path }}/build-scripts/build-release.py" \
--actions download \
--commit ${{ inputs.commit }} \
--root "${{ steps.src.outputs.path }}" \
--github \
--debug
- name: 'Extract dependencies'
id: deps-extract
run: |
unzip -o "${{ steps.deps.outputs.dep-path }}/SDL3-devel-${{ steps.deps.outputs.dep-sdl-version }}-android.zip"
python "SDL3-${{ steps.deps.outputs.dep-sdl-version }}.aar" -o /tmp/SDL3-android
echo "sdl3-prefix=/tmp/SDL3-android" >>$GITHUB_OUTPUT
- name: 'Install ninja'
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build
- name: 'CMake (configure + build) x86, x64, arm32, arm64'
run: |
android_abis="x86 x86_64 armeabi-v7a arm64-v8a"
for android_abi in ${android_abis}; do
echo "Configuring ${android_abi}..."
cmake -S "${{ steps.src.outputs.path }}/cmake/test" \
-GNinja \
-DTEST_FULL=TRUE \
-DTEST_STATIC=FALSE \
-DCMAKE_PREFIX_PATH="${{ steps.sdk.outputs.prefix }};${{ steps.deps-extract.outputs.sdl3-prefix }}" \
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=${android_abi} \
-DCMAKE_BUILD_TYPE=Release \
-B "${android_abi}"
echo "Building ${android_abi}..."
cmake --build "${android_abi}" --config Release --verbose
done
+68
View File
@@ -0,0 +1,68 @@
build/
buildbot/
/VERSION.txt
*.so
*.so.*
*.dylib
*.dll
*.exe
*.o
*.obj
*.res
*.lib
*.a
*.la
*.dSYM
*,e1f
*,ff8
*.lnk
*.err
*.exp
*.map
*.orig
*~
*.swp
*.tmp
*.rej
sdl3-net.pc
get-local-addrs
resolve-hostnames
simple-http-get
voipchat
# for CMake
CMakeFiles/
CMakeScripts/
CMakeCache.txt
cmake_install.cmake
cmake_uninstall.cmake
SDL3_netConfig.cmake
SDL3_netConfigVersion.cmake
compile_commands.json
Makefile
.ninja_*
*.ninja
SDL3_net.xcodeproj
Debug/
Release/
RelWithDebInfo/
MinSizeRel/
dummy.sym
# for CLion
.idea
cmake-build-*
# for Visual C++
.vs
CMakeSettings.json
out/
/*.sln
/*.vcxproj*
*.dir
*.user
*.ncb
*.suo
*.sdf
@@ -4,9 +4,9 @@
; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme
;
[subrepo]
remote = git@github.com:fmtlib/fmt.git
branch = 10.0.0
commit = a0b8a92e3d1532361c2f7feb63babc5c18d00ef2
parent = bc68f99693d6e9465a8251a89cc018baf65f7052
remote = git@github.com:libsdl-org/SDL_net.git
branch = main
commit = 93a9967a91ccab166ecd0d7e992284066ab01cc9
parent = 679bf7b60dca7cc8c4e892cffdeca83cfb6d1d00
method = merge
cmdver = 0.4.6
+22
View File
@@ -0,0 +1,22 @@
projectfullname = SDL_net
projectshortname = SDL_net
incsubdir = include/SDL3_net
wikisubdir = SDL3_net
apiprefixregex = (NET_|SDL_NET_)
mainincludefname = SDL3_net/SDL_net.h
versionfname = include/SDL3_net/SDL_net.h
versionmajorregex = \A\#define\s+SDL_NET_MAJOR_VERSION\s+(\d+)\Z
versionminorregex = \A\#define\s+SDL_NET_MINOR_VERSION\s+(\d+)\Z
versionmicroregex = \A\#define\s+SDL_NET_MICRO_VERSION\s+(\d+)\Z
selectheaderregex = \ASDL_net\.h\Z
projecturl = https://libsdl.org/projects/SDL_net
wikiurl = https://wiki.libsdl.org/SDL_net
bugreporturl = https://github.com/libsdl-org/sdlwiki/issues/new
warn_about_missing = 0
wikipreamble = (This function is part of SDL_net, a separate library from SDL.)
wikiheaderfiletext = Defined in [<SDL3_net/%fname%>](https://github.com/libsdl-org/SDL_net/blob/main/include/SDL3_net/%fname%)
manpageheaderfiletext = Defined in SDL3_net/%fname%
quickrefenabled = 1
quickreftitle = SDL3_net API Quick Reference
quickrefurl = https://libsdl.org/
quickrefdesc = The latest version of this document can be found at https://wiki.libsdl.org/SDL3_net/QuickReference
+57
View File
@@ -0,0 +1,57 @@
LOCAL_PATH := $(call my-dir)
###########################
#
# SDL_net shared library
#
###########################
include $(CLEAR_VARS)
LOCAL_MODULE := SDL3_net
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_SRC_FILES := \
$(subst $(LOCAL_PATH)/,,) \
$(wildcard $(LOCAL_PATH)/src/*.c) \
LOCAL_CFLAGS =
# Warnings we haven't fixed (yet)
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare
LOCAL_LDLIBS :=
LOCAL_LDFLAGS := -Wl,--no-undefined -Wl,--no-undefined-version -Wl,--version-script=$(LOCAL_PATH)/src/SDL_net.sym
ifeq ($(NDK_DEBUG),1)
cmd-strip :=
endif
LOCAL_SHARED_LIBRARIES := SDL3
include $(BUILD_SHARED_LIBRARY)
###########################
#
# SDL_net static library
#
###########################
LOCAL_MODULE := SDL3_net_static
LOCAL_MODULE_FILENAME := libSDL3_net
LOCAL_LDLIBS :=
LOCAL_LDFLAGS :=
LOCAL_EXPORT_LDLIBS :=
LOCAL_STATIC_LIBRARIES := SDL3
LOCAL_SHARED_LIBRARIES :=
include $(BUILD_STATIC_LIBRARY)
+321
View File
@@ -0,0 +1,321 @@
cmake_minimum_required(VERSION 3.16...4.0)
if(NOT DEFINED CMAKE_BUILD_TYPE)
set(cmake_build_type_undefined 1)
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
# See docs/release_checklist.md
set(MAJOR_VERSION 3)
set(MINOR_VERSION 0)
set(MICRO_VERSION 0)
set(SDL_REQUIRED_VERSION 3.0.0)
project(SDL3_net
LANGUAGES C
VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}"
)
include("${SDL3_net_SOURCE_DIR}/cmake/GetGitRevisionDescription.cmake")
include("${SDL3_net_SOURCE_DIR}/cmake/PrivateSdlFunctions.cmake")
include("${SDL3_net_SOURCE_DIR}/cmake/sdlmanpages.cmake")
sdl_calculate_derived_version_variables(${MAJOR_VERSION} ${MINOR_VERSION} ${MICRO_VERSION})
message(STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}")
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
set(SDLNET_ROOTPROJECT ON)
else()
set(SDLNET_ROOTPROJECT OFF)
endif()
# By default, configure in RelWithDebInfo configuration
if(SDLNET_ROOTPROJECT)
get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(is_multi_config)
# The first item in CMAKE_CONFIGURATION_TYPES is the default configuration
if(DEFINED CMAKE_CONFIGURATION_TYPES AND "RelWithDebInfo" IN_LIST CMAKE_CONFIGURATION_TYPES)
list(REMOVE_ITEM CMAKE_CONFIGURATION_TYPES "RelWithDebInfo")
list(INSERT CMAKE_CONFIGURATION_TYPES 0 "RelWithDebInfo")
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "CMake configuration types" FORCE)
endif()
else()
if(cmake_build_type_undefined)
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "CMake build type" FORCE)
endif()
endif()
endif()
set(SDLNET_SAMPLES_DEFAULT ${SDLNET_ROOTPROJECT})
if(ANDROID)
set(SDLNET_SAMPLES_DEFAULT OFF)
endif()
set(sdl3net_install_enableable ON)
if((TARGET SDL3-shared OR TARGET SDL3-static) AND SDL_DISABLE_INSTALL)
# Cannot install SDL3_net when SDL3 is built in same built, and is not installed.
set(sdl3net_install_enableable OFF)
endif()
if(NOT DEFINED CMAKE_FIND_PACKAGE_PREFER_CONFIG)
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
endif()
include(CMakeDependentOption)
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
set(PLATFORM_SUPPORTS_SHARED ON)
if(EMSCRIPTEN OR VITA OR PSP OR PS2 OR N3DS OR RISCOS)
set(PLATFORM_SUPPORTS_SHARED OFF)
endif()
option(CMAKE_POSITION_INDEPENDENT_CODE "Build static libraries with -fPIC" ${PLATFORM_SUPPORTS_SHARED})
cmake_dependent_option(BUILD_SHARED_LIBS "Build the library as a shared library" ON PLATFORM_SUPPORTS_SHARED OFF)
cmake_dependent_option(SDLNET_INSTALL "Enable SDL3_net install target" ${SDLNET_ROOTPROJECT} "${sdl3net_install_enableable}" OFF)
cmake_dependent_option(SDLNET_INSTALL_MAN "Install man pages for SDL3_net" OFF "SDLNET_INSTALL" OFF)
cmake_dependent_option(SDLNET_RELOCATABLE "Create relocatable SDL_net package" "${MSVC}" SDLNET_INSTALL OFF)
option(SDLNET_WERROR "Treat warnings as errors" OFF)
option(SDLNET_SAMPLES "Build the SDL3_net sample program(s)" ${SDLNET_SAMPLES_DEFAULT})
cmake_dependent_option(SDLNET_SAMPLES_INSTALL "Install the SDL3_net sample program(s)" OFF "SDLNET_SAMPLES;SDLNET_INSTALL" OFF)
# Save BUILD_SHARED_LIBS variable
set(SDLNET_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
set(sdl_required_components Headers)
if(SDLNET_BUILD_SHARED_LIBS)
set(sdl3_net_target_name SDL3_net-shared)
set(sdl3_target_name SDL3::SDL3-shared)
list(APPEND sdl_required_components SDL3-shared)
else()
set(sdl3_net_target_name SDL3_net-static)
set(sdl3_target_name SDL3::SDL3)
endif()
if(NOT TARGET SDL3::Headers OR NOT TARGET ${sdl3_target_name})
find_package(SDL3 ${SDL_REQUIRED_VERSION} REQUIRED COMPONENTS ${sdl_required_components})
endif()
set(PC_LIBS)
set(PC_REQUIRES)
add_library(${sdl3_net_target_name} src/SDL_net.c)
add_library(SDL3_net::${sdl3_net_target_name} ALIAS ${sdl3_net_target_name})
set_property(TARGET ${sdl3_net_target_name} PROPERTY C_STANDARD 99)
if(NOT TARGET SDL3_net::SDL3_net)
add_library(SDL3_net::SDL3_net ALIAS ${sdl3_net_target_name})
endif()
target_include_directories(${sdl3_net_target_name}
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
)
target_compile_definitions(${sdl3_net_target_name} PRIVATE
BUILD_SDL
SDL_BUILD_MAJOR_VERSION=${MAJOR_VERSION}
SDL_BUILD_MINOR_VERSION=${MINOR_VERSION}
SDL_BUILD_MICRO_VERSION=${MICRO_VERSION}
)
target_link_libraries(${sdl3_net_target_name} PUBLIC SDL3::Headers)
if(SDLNET_BUILD_SHARED_LIBS)
target_link_libraries(${sdl3_net_target_name} PRIVATE SDL3::SDL3-shared)
endif()
sdl_add_warning_options(${sdl3_net_target_name} WARNING_AS_ERROR ${SDLNET_WERROR})
if(WIN32)
if(SDLNET_BUILD_SHARED_LIBS)
target_sources(${sdl3_net_target_name} PRIVATE
src/version.rc
)
if(MINGW)
target_link_options(${sdl3_net_target_name} PRIVATE -static-libgcc)
endif()
endif()
target_link_libraries(${sdl3_net_target_name} PRIVATE iphlpapi ws2_32)
list(APPEND PC_LIBS -liphlpapi -lws2_32)
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Haiku.*")
target_link_libraries(${sdl3_net_target_name} PRIVATE network)
endif()
set_target_properties(${sdl3_net_target_name} PROPERTIES
OUTPUT_NAME "SDL3_net"
DEFINE_SYMBOL DLL_EXPORT
EXPORT_NAME ${sdl3_net_target_name}
C_VISIBILITY_PRESET "hidden"
)
sdl_target_link_option_version_file(${sdl3_net_target_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/SDL_net.sym")
if(NOT ANDROID)
set_target_properties(${sdl3_net_target_name} PROPERTIES
SOVERSION "${SO_VERSION_MAJOR}"
VERSION "${SO_VERSION}"
)
if(APPLE)
cmake_minimum_required(VERSION 3.17...3.28)
set_target_properties(${sdl3_net_target_name} PROPERTIES
MACHO_COMPATIBILITY_VERSION "${DYLIB_COMPAT_VERSION}"
MACHO_CURRENT_VERSION "${DYLIB_CURRENT_VERSION}"
)
sdl_no_deprecated_errors(${sdl3_net_target_name})
endif()
endif()
if(SDLNET_BUILD_SHARED_LIBS)
if(WIN32)
set_target_properties(${sdl3_net_target_name} PROPERTIES
PREFIX ""
)
endif()
else()
if(MSVC)
set_target_properties(${sdl3_net_target_name} PROPERTIES
OUTPUT_NAME "SDL3_net-static"
)
endif()
endif()
# Use `Compatible Interface Properties` to ensure a shared SDL3_net is built with a shared SDL3
if(SDLNET_BUILD_SHARED_LIBS)
set_property(TARGET ${sdl3_net_target_name} PROPERTY INTERFACE_SDL3_SHARED TRUE)
set_property(TARGET ${sdl3_net_target_name} APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL SDL3_SHARED)
endif()
if(SDLNET_BUILD_SHARED_LIBS)
sdl_target_link_options_no_undefined(${sdl3_net_target_name})
endif()
if(SDLNET_INSTALL)
install(
TARGETS ${sdl3_net_target_name}
EXPORT SDL3NetExports
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT devel
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT library
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT library
)
install(
FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SDL3_net/SDL_net.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/SDL3_net" COMPONENT devel
)
if(WIN32 AND NOT MINGW)
set(SDLNET_INSTALL_CMAKEDIR_ROOT_DEFAULT "cmake")
else()
set(SDLNET_INSTALL_CMAKEDIR_ROOT_DEFAULT "${CMAKE_INSTALL_LIBDIR}/cmake")
endif()
set(SDLNET_INSTALL_CMAKEDIR_ROOT "${SDLNET_INSTALL_CMAKEDIR_ROOT_DEFAULT}" CACHE STRING "Root folder where to install SDL3_netConfig.cmake related files (SDL3_net subfolder for MSVC projects)")
set(SDLNET_PKGCONFIG_INSTALLDIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
if(WIN32 AND NOT MINGW)
set(SDLNET_INSTALL_CMAKEDIR "${SDLNET_INSTALL_CMAKEDIR_ROOT}")
set(LICENSES_PREFIX "licenses/SDL3_net")
else()
set(SDLNET_INSTALL_CMAKEDIR "${SDLNET_INSTALL_CMAKEDIR_ROOT}/SDL3_net")
set(LICENSES_PREFIX "${CMAKE_INSTALL_DATAROOTDIR}/licenses/SDL3_net")
endif()
configure_package_config_file(cmake/SDL3_netConfig.cmake.in SDL3_netConfig.cmake
INSTALL_DESTINATION "${SDLNET_INSTALL_CMAKEDIR}"
)
write_basic_package_version_file("${PROJECT_BINARY_DIR}/SDL3_netConfigVersion.cmake"
COMPATIBILITY AnyNewerVersion
)
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/SDL3_netConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/SDL3_netConfigVersion.cmake"
DESTINATION "${SDLNET_INSTALL_CMAKEDIR}"
COMPONENT devel
)
install(EXPORT SDL3NetExports
FILE ${sdl3_net_target_name}-targets.cmake
NAMESPACE SDL3_net::
DESTINATION "${SDLNET_INSTALL_CMAKEDIR}"
COMPONENT devel
)
if(SDLNET_RELOCATABLE)
file(RELATIVE_PATH SDL_PATH_PREFIX_RELATIVE_TO_PKGCONFIG "${CMAKE_INSTALL_PREFIX}/${SDLNET_PKGCONFIG_INSTALLDIR}" "${CMAKE_INSTALL_PREFIX}")
string(REGEX REPLACE "[/]+$" "" SDL_PATH_PREFIX_RELATIVE_TO_PKGCONFIG "${SDL_PATH_PREFIX_RELATIVE_TO_PKGCONFIG}")
set(SDL_PKGCONFIG_PREFIX "\${pcfiledir}/${SDL_PATH_PREFIX_RELATIVE_TO_PKGCONFIG}")
else()
set(SDL_PKGCONFIG_PREFIX "${CMAKE_PREFIX_PATH}")
endif()
if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}")
set(INCLUDEDIR_FOR_PKG_CONFIG "${CMAKE_INSTALL_INCLUDEDIR}")
else()
set(INCLUDEDIR_FOR_PKG_CONFIG "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
endif()
if(IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}")
set(LIBDIR_FOR_PKG_CONFIG "${CMAKE_INSTALL_LIBDIR}")
else()
set(LIBDIR_FOR_PKG_CONFIG "\${prefix}/${CMAKE_INSTALL_LIBDIR}")
endif()
string(JOIN " " PC_REQUIRES ${PC_REQUIRES})
string(JOIN " " PC_LIBS ${PC_LIBS})
configure_file(cmake/sdl3-net.pc.in sdl3-net.pc @ONLY)
# Always install sdl3-net.pc file: libraries might be different between config modes
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sdl3-net.pc"
DESTINATION "${SDLNET_PKGCONFIG_INSTALLDIR}" COMPONENT devel)
if(BUILD_SHARED_LIBS)
set(pdbdir "${CMAKE_INSTALL_BINDIR}")
else()
set(pdbdir "${CMAKE_INSTALL_LIBDIR}")
endif()
if(MSVC)
SDL_install_pdb("${sdl3_net_target_name}" "${pdbdir}")
endif()
install(FILES "LICENSE.txt"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/licenses/${PROJECT_NAME}"
COMPONENT library
)
export(TARGETS ${sdl3_net_target_name} NAMESPACE "SDL3_net::" FILE "${sdl3_net_target_name}-targets.cmake")
if(SDLNET_INSTALL_MAN)
sdl_get_git_revision_hash(SDLNET_REVISION)
SDL_generate_manpages(
HEADERS_DIR "${PROJECT_SOURCE_DIR}/include/SDL3_net"
SYMBOL "NET_Init"
WIKIHEADERS_PL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build-scripts/wikiheaders.pl"
REVISION "${SDLNET_REVISION}"
)
endif()
endif()
if(SDLNET_SAMPLES)
function(add_sdl_net_example_executable TARGET)
if(ANDROID)
add_library(${TARGET} SHARED ${ARGN})
else()
add_executable(${TARGET} ${ARGN})
endif()
sdl_add_warning_options(${TARGET} WARNING_AS_ERROR ${SDLTTF_WERROR})
sdl_target_link_options_no_undefined(${TARGET})
target_link_libraries(${TARGET} PRIVATE SDL3_net::${sdl3_net_target_name})
target_link_libraries(${TARGET} PRIVATE ${sdl3_target_name})
set_property(TARGET ${TARGET} PROPERTY C_STANDARD 99)
set_property(TARGET ${TARGET} PROPERTY C_EXTENSIONS FALSE)
if(SDLNET_SAMPLES_INSTALL)
install(TARGETS ${TARGET}
RUNTIME DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/installed-tests/SDL3_net"
)
endif()
endfunction()
add_sdl_net_example_executable(voipchat examples/voipchat.c)
add_sdl_net_example_executable(simple-http-get examples/simple-http-get.c)
add_sdl_net_example_executable(resolve-hostnames examples/resolve-hostnames.c)
add_sdl_net_example_executable(get-local-addrs examples/get-local-addrs.c)
add_sdl_net_example_executable(echo-server examples/echo-server.c)
# Build at least one example in C90
set_property(TARGET get-local-addrs PROPERTY C_STANDARD 90)
endif()
+18
View File
@@ -0,0 +1,18 @@
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
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.
+19
View File
@@ -0,0 +1,19 @@
# SDL_net 3.0
The latest version of this library is available from GitHub:
https://github.com/libsdl-org/SDL_net/releases
This is a portable network library for use with SDL. It's goal is to
simplify the use of the usual socket interfaces and use SDL infrastructure
to handle some portability things (such as threading and reporting
errors).
It is available under the zlib license, found in the file LICENSE.txt.
The API can be found in the file SDL_net.h and online at https://wiki.libsdl.org/SDL3_net
This library supports most platforms that offer both SDL3 and networking.
This is a work in progress!
Enjoy!
+80
View File
@@ -0,0 +1,80 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL3_net", "SDL_net.vcxproj", "{8AB3504F-5E58-4910-AFE8-7A1E595AC3F4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "get-local-addrs", "examples\get-local-addrs.vcxproj", "{7B1F60CD-2A09-4514-937C-D9DD044428FB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "resolve-hostnames", "examples\resolve-hostnames.vcxproj", "{8DAC2820-128D-4FAF-9416-A8AD4C6D7A9A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple-http-get", "examples\simple-http-get.vcxproj", "{35F14669-ED09-4105-A035-7984B94FDFBC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "voipchat", "examples\voipchat.vcxproj", "{A01E2216-139A-480E-8458-03CB4E90FE61}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "echo-server", "examples\echo-server.vcxproj", "{DFDBDF0E-87C3-4421-B6D1-90B2C5C28C2B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{642C114F-3ABE-4CFE-8C08-8CC5EF0D2324}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8AB3504F-5E58-4910-AFE8-7A1E595AC3F4}.Debug|Win32.ActiveCfg = Debug|Win32
{8AB3504F-5E58-4910-AFE8-7A1E595AC3F4}.Debug|Win32.Build.0 = Debug|Win32
{8AB3504F-5E58-4910-AFE8-7A1E595AC3F4}.Debug|x64.ActiveCfg = Debug|x64
{8AB3504F-5E58-4910-AFE8-7A1E595AC3F4}.Debug|x64.Build.0 = Debug|x64
{8AB3504F-5E58-4910-AFE8-7A1E595AC3F4}.Release|Win32.ActiveCfg = Release|Win32
{8AB3504F-5E58-4910-AFE8-7A1E595AC3F4}.Release|Win32.Build.0 = Release|Win32
{8AB3504F-5E58-4910-AFE8-7A1E595AC3F4}.Release|x64.ActiveCfg = Release|x64
{8AB3504F-5E58-4910-AFE8-7A1E595AC3F4}.Release|x64.Build.0 = Release|x64
{7B1F60CD-2A09-4514-937C-D9DD044428FB}.Debug|Win32.ActiveCfg = Debug|Win32
{7B1F60CD-2A09-4514-937C-D9DD044428FB}.Debug|Win32.Build.0 = Debug|Win32
{7B1F60CD-2A09-4514-937C-D9DD044428FB}.Debug|x64.ActiveCfg = Debug|x64
{7B1F60CD-2A09-4514-937C-D9DD044428FB}.Debug|x64.Build.0 = Debug|x64
{7B1F60CD-2A09-4514-937C-D9DD044428FB}.Release|Win32.ActiveCfg = Release|Win32
{7B1F60CD-2A09-4514-937C-D9DD044428FB}.Release|Win32.Build.0 = Release|Win32
{7B1F60CD-2A09-4514-937C-D9DD044428FB}.Release|x64.ActiveCfg = Release|x64
{7B1F60CD-2A09-4514-937C-D9DD044428FB}.Release|x64.Build.0 = Release|x64
{8DAC2820-128D-4FAF-9416-A8AD4C6D7A9A}.Debug|Win32.ActiveCfg = Debug|Win32
{8DAC2820-128D-4FAF-9416-A8AD4C6D7A9A}.Debug|Win32.Build.0 = Debug|Win32
{8DAC2820-128D-4FAF-9416-A8AD4C6D7A9A}.Debug|x64.ActiveCfg = Debug|x64
{8DAC2820-128D-4FAF-9416-A8AD4C6D7A9A}.Debug|x64.Build.0 = Debug|x64
{8DAC2820-128D-4FAF-9416-A8AD4C6D7A9A}.Release|Win32.ActiveCfg = Release|Win32
{8DAC2820-128D-4FAF-9416-A8AD4C6D7A9A}.Release|Win32.Build.0 = Release|Win32
{8DAC2820-128D-4FAF-9416-A8AD4C6D7A9A}.Release|x64.ActiveCfg = Release|x64
{8DAC2820-128D-4FAF-9416-A8AD4C6D7A9A}.Release|x64.Build.0 = Release|x64
{35F14669-ED09-4105-A035-7984B94FDFBC}.Debug|Win32.ActiveCfg = Debug|Win32
{35F14669-ED09-4105-A035-7984B94FDFBC}.Debug|Win32.Build.0 = Debug|Win32
{35F14669-ED09-4105-A035-7984B94FDFBC}.Debug|x64.ActiveCfg = Debug|x64
{35F14669-ED09-4105-A035-7984B94FDFBC}.Debug|x64.Build.0 = Debug|x64
{35F14669-ED09-4105-A035-7984B94FDFBC}.Release|Win32.ActiveCfg = Release|Win32
{35F14669-ED09-4105-A035-7984B94FDFBC}.Release|Win32.Build.0 = Release|Win32
{35F14669-ED09-4105-A035-7984B94FDFBC}.Release|x64.ActiveCfg = Release|x64
{35F14669-ED09-4105-A035-7984B94FDFBC}.Release|x64.Build.0 = Release|x64
{A01E2216-139A-480E-8458-03CB4E90FE61}.Debug|Win32.ActiveCfg = Debug|Win32
{A01E2216-139A-480E-8458-03CB4E90FE61}.Debug|Win32.Build.0 = Debug|Win32
{A01E2216-139A-480E-8458-03CB4E90FE61}.Debug|x64.ActiveCfg = Debug|x64
{A01E2216-139A-480E-8458-03CB4E90FE61}.Debug|x64.Build.0 = Debug|x64
{A01E2216-139A-480E-8458-03CB4E90FE61}.Release|Win32.ActiveCfg = Release|Win32
{A01E2216-139A-480E-8458-03CB4E90FE61}.Release|Win32.Build.0 = Release|Win32
{A01E2216-139A-480E-8458-03CB4E90FE61}.Release|x64.ActiveCfg = Release|x64
{A01E2216-139A-480E-8458-03CB4E90FE61}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{7B1F60CD-2A09-4514-937C-D9DD044428FB} = {642C114F-3ABE-4CFE-8C08-8CC5EF0D2324}
{8DAC2820-128D-4FAF-9416-A8AD4C6D7A9A} = {642C114F-3ABE-4CFE-8C08-8CC5EF0D2324}
{35F14669-ED09-4105-A035-7984B94FDFBC} = {642C114F-3ABE-4CFE-8C08-8CC5EF0D2324}
{A01E2216-139A-480E-8458-03CB4E90FE61} = {642C114F-3ABE-4CFE-8C08-8CC5EF0D2324}
{DFDBDF0E-87C3-4421-B6D1-90B2C5C28C2B} = {642C114F-3ABE-4CFE-8C08-8CC5EF0D2324}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F2325A01-6A77-410B-B0DA-E0F6B9313F15}
EndGlobalSection
EndGlobal
+210
View File
@@ -0,0 +1,210 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>SDL3_net</ProjectName>
<ProjectGuid>{8AB3504F-5E58-4910-AFE8-7A1E595AC3F4}</ProjectGuid>
<RootNamespace>SDL_net</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IncludePath>$(ProjectDir)..\..\SDL\include;$(ProjectDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(ProjectDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IncludePath>$(ProjectDir)..\..\SDL\include;$(ProjectDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(ProjectDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IncludePath>$(ProjectDir)..\..\SDL\include;$(ProjectDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(ProjectDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>$(ProjectDir)..\..\SDL\include;$(ProjectDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(ProjectDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Debug/SDL3_net.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>DLL_EXPORT;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>ws2_32.lib;iphlpapi.lib;SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Debug/SDL3_net.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>DLL_EXPORT;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>ws2_32.lib;iphlpapi.lib;SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Release/SDL3_net.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<PreprocessorDefinitions>DLL_EXPORT;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>ws2_32.lib;iphlpapi.lib;SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<Bscmake />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Release/SDL3_net.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<PreprocessorDefinitions>DLL_EXPORT;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>ws2_32.lib;iphlpapi.lib;SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\src\SDL_net.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\SDL3_net/SDL_net.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\src\version.rc">
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
+26
View File
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Sources">
<UniqueIdentifier>{2cc01156-0219-4532-b5cc-4deb572c8d16}</UniqueIdentifier>
</Filter>
<Filter Include="Public Headers">
<UniqueIdentifier>{64a63be2-c42b-4b99-a06a-61d4cc4efa21}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\SDL_net.c">
<Filter>Sources</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\SDL3_net/SDL_net.h">
<Filter>Public Headers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\src\version.rc">
<Filter>Sources</Filter>
</ResourceCompile>
</ItemGroup>
</Project>
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
find . -type f \( -name '*.user' -o -name '*.sdf' -o -name '*.ncb' -o -name '*.suo' \) -print -delete
rm -rvf Win32 */Win32 x64 */x64
@@ -0,0 +1,238 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{DFDBDF0E-87C3-4421-B6D1-90B2C5C28C2B}</ProjectGuid>
<RootNamespace>echo-server</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Release/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Release/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Debug/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Debug/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\examples\echo-server.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SDL_net.vcxproj">
<Project>{8ab3504f-5e58-4910-afe8-7a1e595ac3f4}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,238 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{7B1F60CD-2A09-4514-937C-D9DD044428FB}</ProjectGuid>
<RootNamespace>get-local-addrs</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Release/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Release/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Debug/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Debug/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\examples\get-local-addrs.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SDL_net.vcxproj">
<Project>{8ab3504f-5e58-4910-afe8-7a1e595ac3f4}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,238 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{8DAC2820-128D-4FAF-9416-A8AD4C6D7A9A}</ProjectGuid>
<RootNamespace>resolve-hostnames</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Release/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Release/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Debug/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Debug/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\examples\resolve-hostnames.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SDL_net.vcxproj">
<Project>{8ab3504f-5e58-4910-afe8-7a1e595ac3f4}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,238 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{35F14669-ED09-4105-A035-7984B94FDFBC}</ProjectGuid>
<RootNamespace>simple-http-get</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Release/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Release/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Debug/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Debug/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\examples\simple-http-get.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SDL_net.vcxproj">
<Project>{8ab3504f-5e58-4910-afe8-7a1e595ac3f4}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,238 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{A01E2216-139A-480E-8458-03CB4E90FE61}</ProjectGuid>
<RootNamespace>voipchat</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)' != '10.0'">$(DefaultPlatformToolset)</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>$(SolutionDir)..\..\SDL\include;$(SolutionDir)..\include;$(IncludePath)</IncludePath>
<LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Release/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Release/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Debug/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Debug/showinterfaces.tlb</TypeLibraryName>
<HeaderFileName>
</HeaderFileName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>SDL3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
<PostBuildEvent>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\examples\voipchat.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SDL_net.vcxproj">
<Project>{8ab3504f-5e58-4910-afe8-7a1e595ac3f4}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,18 @@
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_PROCESSOR x86)
find_program(CMAKE_C_COMPILER NAMES i686-w64-mingw32-gcc)
find_program(CMAKE_CXX_COMPILER NAMES i686-w64-mingw32-g++)
find_program(CMAKE_RC_COMPILER NAMES i686-w64-mingw32-windres windres)
if(NOT CMAKE_C_COMPILER)
message(FATAL_ERROR "Failed to find CMAKE_C_COMPILER.")
endif()
if(NOT CMAKE_CXX_COMPILER)
message(FATAL_ERROR "Failed to find CMAKE_CXX_COMPILER.")
endif()
if(NOT CMAKE_RC_COMPILER)
message(FATAL_ERROR "Failed to find CMAKE_RC_COMPILER.")
endif()
@@ -0,0 +1,18 @@
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
find_program(CMAKE_C_COMPILER NAMES x86_64-w64-mingw32-gcc)
find_program(CMAKE_CXX_COMPILER NAMES x86_64-w64-mingw32-g++)
find_program(CMAKE_RC_COMPILER NAMES x86_64-w64-mingw32-windres windres)
if(NOT CMAKE_C_COMPILER)
message(FATAL_ERROR "Failed to find CMAKE_C_COMPILER.")
endif()
if(NOT CMAKE_CXX_COMPILER)
message(FATAL_ERROR "Failed to find CMAKE_CXX_COMPILER.")
endif()
if(NOT CMAKE_RC_COMPILER)
message(FATAL_ERROR "Failed to find CMAKE_RC_COMPILER.")
endif()
+45
View File
@@ -0,0 +1,45 @@
#!/usr/bin/env python3
import argparse
from pathlib import Path
import json
import logging
import re
import subprocess
ROOT = Path(__file__).resolve().parents[1]
def determine_remote() -> str:
text = (ROOT / "build-scripts/release-info.json").read_text()
release_info = json.loads(text)
if "remote" in release_info:
return release_info["remote"]
project_with_version = release_info["name"]
project, _ = re.subn("([^a-zA-Z_])", "", project_with_version)
return f"libsdl-org/{project}"
def main():
default_remote = determine_remote()
parser = argparse.ArgumentParser(allow_abbrev=False)
parser.add_argument("--ref", required=True, help=f"Name of branch or tag containing release.yml")
parser.add_argument("--remote", "-R", default=default_remote, help=f"Remote repo (default={default_remote})")
parser.add_argument("--commit", help=f"Input 'commit' of release.yml (default is the hash of the ref)")
args = parser.parse_args()
if args.commit is None:
args.commit = subprocess.check_output(["git", "rev-parse", args.ref], cwd=ROOT, text=True).strip()
print(f"Running release.yml workflow:")
print(f" remote = {args.remote}")
print(f" ref = {args.ref}")
print(f" commit = {args.commit}")
subprocess.check_call(["gh", "-R", args.remote, "workflow", "run", "release.yml", "--ref", args.ref, "-f", f"commit={args.commit}"], cwd=ROOT)
if __name__ == "__main__":
raise SystemExit(main())
@@ -0,0 +1,77 @@
The Simple DirectMedia Layer (SDL for short) is a cross-platform library
designed to make it easy to write multi-media software, such as games
and emulators.
The Simple DirectMedia Layer library source code is available from:
https://www.libsdl.org/
This library is distributed under the terms of the zlib license:
http://www.zlib.net/zlib_license.html
# @<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar
This Android archive allows use of @<@PROJECT_NAME@>@ in your Android project, without needing to copy any SDL source.
## Gradle integration
For integration with CMake/ndk-build, it uses [prefab](https://google.github.io/prefab/).
Copy the aar archive (@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar) to a `app/libs` directory of your project.
In `app/build.gradle` of your Android project, add:
```
android {
/* ... */
buildFeatures {
prefab true
}
}
dependencies {
implementation files('libs/@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar')
/* ... */
}
```
If you're using CMake, add the following to your CMakeLists.txt:
```
find_package(@<@PROJECT_NAME@>@ REQUIRED CONFIG)
target_link_libraries(yourgame PRIVATE @<@PROJECT_NAME@>@::@<@PROJECT_NAME@>@)
```
If you use ndk-build, add the following before `include $(BUILD_SHARED_LIBRARY)` to your `Android.mk`:
```
LOCAL_SHARED_LIBARARIES := @<@PROJECT_NAME@>@
```
And add the following at the bottom:
```
# https://google.github.io/prefab/build-systems.html
# Add the prefab modules to the import path.
$(call import-add-path,/out)
# Import @<@PROJECT_NAME@>@ so we can depend on it.
$(call import-module,prefab/@<@PROJECT_NAME@>@)
```
---
## Other build systems (advanced)
If you want to build a project without Gradle,
running the following command will extract the Android archive into a more common directory structure.
```
python @<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar -o android_prefix
```
Add `--help` for a list of all available options.
Look at the example programs in ./examples (of the source archive), and check out online documentation:
https://wiki.libsdl.org/SDL3/FrontPage
Join the SDL discourse server if you want to join the community:
https://discourse.libsdl.org/
That's it!
Sam Lantinga <slouken@libsdl.org>
@@ -0,0 +1,104 @@
#!/usr/bin/env python
"""
Create a @<@PROJECT_NAME@>@ SDK prefix from an Android archive
This file is meant to be placed in a the root of an android .aar archive
Example usage:
```sh
python @<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar -o /usr/opt/android-sdks
cmake -S my-project \
-DCMAKE_PREFIX_PATH=/usr/opt/android-sdks \
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \
-B build-arm64 -DANDROID_ABI=arm64-v8a \
-DCMAKE_BUILD_TYPE=Releaase
cmake --build build-arm64
```
"""
import argparse
import io
import json
import os
import pathlib
import re
import stat
import zipfile
AAR_PATH = pathlib.Path(__file__).resolve().parent
ANDROID_ARCHS = { "armeabi-v7a", "arm64-v8a", "x86", "x86_64" }
def main():
parser = argparse.ArgumentParser(
description="Convert a @<@PROJECT_NAME@>@ Android .aar archive into a SDK",
allow_abbrev=False,
)
parser.add_argument("--version", action="version", version="@<@PROJECT_NAME@>@ @<@PROJECT_VERSION@>@")
parser.add_argument("-o", dest="output", type=pathlib.Path, required=True, help="Folder where to store the SDK")
args = parser.parse_args()
print(f"Creating a @<@PROJECT_NAME@>@ SDK at {args.output}...")
prefix = args.output
incdir = prefix / "include"
libdir = prefix / "lib"
RE_LIB_MODULE_ARCH = re.compile(r"prefab/modules/(?P<module>[A-Za-z0-9_-]+)/libs/android\.(?P<arch>[a-zA-Z0-9_-]+)/(?P<filename>lib[A-Za-z0-9_]+\.(?:so|a))")
RE_INC_MODULE_ARCH = re.compile(r"prefab/modules/(?P<module>[A-Za-z0-9_-]+)/include/(?P<header>[a-zA-Z0-9_./-]+)")
RE_LICENSE = re.compile(r"(?:.*/)?(?P<filename>(?:license|copying)(?:\.md|\.txt)?)", flags=re.I)
RE_PROGUARD = re.compile(r"(?:.*/)?(?P<filename>proguard.*\.(?:pro|txt))", flags=re.I)
RE_CMAKE = re.compile(r"(?:.*/)?(?P<filename>.*\.cmake)", flags=re.I)
with zipfile.ZipFile(AAR_PATH) as zf:
project_description = json.loads(zf.read("description.json"))
project_name = project_description["name"]
project_version = project_description["version"]
licensedir = prefix / "share/licenses" / project_name
cmakedir = libdir / "cmake" / project_name
javadir = prefix / "share/java" / project_name
javadocdir = prefix / "share/javadoc" / project_name
def read_zipfile_and_write(path: pathlib.Path, zippath: str):
data = zf.read(zippath)
path.parent.mkdir(parents=True, exist_ok=True)
path.write_bytes(data)
for zip_info in zf.infolist():
zippath = zip_info.filename
if m := RE_LIB_MODULE_ARCH.match(zippath):
lib_path = libdir / m["arch"] / m["filename"]
read_zipfile_and_write(lib_path, zippath)
if m["filename"].endswith(".so"):
os.chmod(lib_path, stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
elif m := RE_INC_MODULE_ARCH.match(zippath):
header_path = incdir / m["header"]
read_zipfile_and_write(header_path, zippath)
elif m:= RE_LICENSE.match(zippath):
license_path = licensedir / m["filename"]
read_zipfile_and_write(license_path, zippath)
elif m:= RE_PROGUARD.match(zippath):
proguard_path = javadir / m["filename"]
read_zipfile_and_write(proguard_path, zippath)
elif m:= RE_CMAKE.match(zippath):
cmake_path = cmakedir / m["filename"]
read_zipfile_and_write(cmake_path, zippath)
elif zippath == "classes.jar":
versioned_jar_path = javadir / f"{project_name}-{project_version}.jar"
unversioned_jar_path = javadir / f"{project_name}.jar"
read_zipfile_and_write(versioned_jar_path, zippath)
os.symlink(src=versioned_jar_path.name, dst=unversioned_jar_path)
elif zippath == "classes-sources.jar":
jarpath = javadir / f"{project_name}-{project_version}-sources.jar"
read_zipfile_and_write(jarpath, zippath)
elif zippath == "classes-doc.jar":
jarpath = javadocdir / f"{project_name}-{project_version}-javadoc.jar"
read_zipfile_and_write(jarpath, zippath)
print("... done")
return 0
if __name__ == "__main__":
raise SystemExit(main())
@@ -0,0 +1,102 @@
# SDL CMake configuration file:
# This file is meant to be placed in lib/cmake/SDL3_net subfolder of a reconstructed Android SDL3_net SDK
cmake_minimum_required(VERSION 3.0...3.28)
include(FeatureSummary)
set_package_properties(SDL3_net PROPERTIES
URL "https://www.libsdl.org/projects/SDL_net/"
DESCRIPTION "SDL_net is a simple, cross-platform wrapper over sockets"
)
# Copied from `configure_package_config_file`
macro(set_and_check _var _file)
set(${_var} "${_file}")
if(NOT EXISTS "${_file}")
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
endif()
endmacro()
# Copied from `configure_package_config_file`
macro(check_required_components _NAME)
foreach(comp ${${_NAME}_FIND_COMPONENTS})
if(NOT ${_NAME}_${comp}_FOUND)
if(${_NAME}_FIND_REQUIRED_${comp})
set(${_NAME}_FOUND FALSE)
endif()
endif()
endforeach()
endmacro()
set(SDL3_net_FOUND TRUE)
if(SDL_CPU_X86)
set(_sdl_arch_subdir "x86")
elseif(SDL_CPU_X64)
set(_sdl_arch_subdir "x86_64")
elseif(SDL_CPU_ARM32)
set(_sdl_arch_subdir "armeabi-v7a")
elseif(SDL_CPU_ARM64)
set(_sdl_arch_subdir "arm64-v8a")
else()
set(SDL3_net_FOUND FALSE)
return()
endif()
get_filename_component(_sdl3net_prefix "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE)
get_filename_component(_sdl3net_prefix "${_sdl3net_prefix}/.." ABSOLUTE)
get_filename_component(_sdl3net_prefix "${_sdl3net_prefix}/.." ABSOLUTE)
set_and_check(_sdl3net_prefix "${_sdl3net_prefix}")
set_and_check(_sdl3net_include_dirs "${_sdl3net_prefix}/include")
set_and_check(_sdl3net_lib "${_sdl3net_prefix}/lib/${_sdl_arch_subdir}/libSDL3_net.so")
unset(_sdl_arch_subdir)
unset(_sdl3net_prefix)
# All targets are created, even when some might not be requested though COMPONENTS.
# This is done for compatibility with CMake generated SDL3_net-target.cmake files.
set(SDL3_net_SDL3_net-shared_FOUND FALSE)
if(EXISTS "${_sdl3net_lib}")
if(NOT TARGET SDL3_net::SDL3_net-shared)
add_library(SDL3_net::SDL3_net-shared SHARED IMPORTED)
set_target_properties(SDL3_net::SDL3_net-shared
PROPERTIES
IMPORTED_LOCATION "${_sdl3net_lib}"
INTERFACE_INCLUDE_DIRECTORIES "${_sdl3net_include_dirs}"
COMPATIBLE_INTERFACE_BOOL "SDL3_SHARED"
INTERFACE_SDL3_SHARED "ON"
COMPATIBLE_INTERFACE_STRING "SDL_VERSION"
INTERFACE_SDL_VERSION "SDL3"
)
endif()
set(SDL3_net_SDL3_net-shared_FOUND TRUE)
endif()
unset(_sdl3net_include_dirs)
unset(_sdl3net_lib)
set(SDL3_net_SDL3_net-static_FOUND FALSE)
if(SDL3_net_SDL3_net-shared_FOUND)
set(SDL3_net_SDL3_net_FOUND TRUE)
endif()
function(_sdl_create_target_alias_compat NEW_TARGET TARGET)
if(CMAKE_VERSION VERSION_LESS "3.18")
# Aliasing local targets is not supported on CMake < 3.18, so make it global.
add_library(${NEW_TARGET} INTERFACE IMPORTED)
set_target_properties(${NEW_TARGET} PROPERTIES INTERFACE_LINK_LIBRARIES "${TARGET}")
else()
add_library(${NEW_TARGET} ALIAS ${TARGET})
endif()
endfunction()
# Make sure SDL3_net::SDL3_net always exists
if(NOT TARGET SDL3_net::SDL3_net)
if(TARGET SDL3_net::SDL3_net-shared)
_sdl_create_target_alias_compat(SDL3_net::SDL3_net SDL3_net::SDL3_net-shared)
endif()
endif()
check_required_components(SDL3_net)
@@ -0,0 +1,38 @@
# SDL_net CMake version configuration file:
# This file is meant to be placed in a lib/cmake/SDL3_net subfolder of a reconstructed Android SDL3_net SDK
set(PACKAGE_VERSION "@<@PROJECT_VERSION@>@")
if(PACKAGE_FIND_VERSION_RANGE)
# Package version must be in the requested version range
if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX)
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX)))
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
endif()
else()
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
endif()
# if the using project doesn't have CMAKE_SIZEOF_VOID_P set, fail.
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/sdlcpu.cmake")
SDL_DetectTargetCPUArchitectures(_detected_archs)
# check that the installed version has a compatible architecture as the one which is currently searching:
if(NOT(SDL_CPU_X86 OR SDL_CPU_X64 OR SDL_CPU_ARM32 OR SDL_CPU_ARM64))
set(PACKAGE_VERSION "${PACKAGE_VERSION} (X86,X64,ARM32,ARM64)")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()
@@ -0,0 +1,5 @@
{
"name": "@<@PROJECT_NAME@>@",
"version": "@<@PROJECT_VERSION@>@",
"git-hash": "@<@PROJECT_COMMIT@>@"
}
@@ -0,0 +1,39 @@
#
# Makefile for installing the mingw32 version of the SDL_net library
DESTDIR = /usr/local
ARCHITECTURES := i686-w64-mingw32 x86_64-w64-mingw32
default:
@echo "Run \"make install-i686\" to install 32-bit"
@echo "Run \"make install-x86_64\" to install 64-bit"
@echo "Run \"make install-all\" to install both"
@echo "Add DESTDIR=/custom/path to change the destination folder"
install:
@if test -d $(ARCH) && test -d $(DESTDIR); then \
(cd $(ARCH) && cp -rv bin include lib share $(DESTDIR)/); \
else \
echo "*** ERROR: $(ARCH) or $(DESTDIR) does not exist!"; \
exit 1; \
fi
install-i686:
$(MAKE) install ARCH=i686-w64-mingw32
install-x86_64:
$(MAKE) install ARCH=x86_64-w64-mingw32
install-all:
@if test -d $(DESTDIR); then \
mkdir -p $(DESTDIR)/cmake; \
cp -rv cmake/* $(DESTDIR)/cmake; \
for arch in $(ARCHITECTURES); do \
$(MAKE) install ARCH=$$arch DESTDIR=$(DESTDIR)/$$arch; \
done \
else \
echo "*** ERROR: $(DESTDIR) does not exist!"; \
exit 1; \
fi
.PHONY: default install install-i686 install-x86_64 install-all
@@ -0,0 +1,19 @@
# SDL3_net CMake configuration file:
# This file is meant to be placed in a cmake subfolder of SDL3_net-devel-3.x.y-mingw
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(sdl3_net_config_path "${CMAKE_CURRENT_LIST_DIR}/../i686-w64-mingw32/lib/cmake/SDL3_net/SDL3_netConfig.cmake")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(sdl3_net_config_path "${CMAKE_CURRENT_LIST_DIR}/../x86_64-w64-mingw32/lib/cmake/SDL3_net/SDL3_netConfig.cmake")
else("${CMAKE_SIZEOF_VOID_P}" STREQUAL "")
set(SDL3_net_FOUND FALSE)
return()
endif()
if(NOT EXISTS "${sdl3_net_config_path}")
message(WARNING "${sdl3_net_config_path} does not exist: MinGW development package is corrupted")
set(SDL3_net_FOUND FALSE)
return()
endif()
include("${sdl3_net_config_path}")
@@ -0,0 +1,19 @@
# SDL3_net CMake version configuration file:
# This file is meant to be placed in a cmake subfolder of SDL3_net-devel-3.x.y-mingw
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(sdl3_net_config_path "${CMAKE_CURRENT_LIST_DIR}/../i686-w64-mingw32/lib/cmake/SDL3_net/SDL3_netConfigVersion.cmake")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(sdl3_net_config_path "${CMAKE_CURRENT_LIST_DIR}/../x86_64-w64-mingw32/lib/cmake/SDL3_net/SDL3_netConfigVersion.cmake")
else("${CMAKE_SIZEOF_VOID_P}" STREQUAL "")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
return()
endif()
if(NOT EXISTS "${sdl3_net_config_path}")
message(WARNING "${sdl3_net_config_path} does not exist: MinGW development package is corrupted")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
return()
endif()
include("${sdl3_net_config_path}")
@@ -0,0 +1,85 @@
# @<@PROJECT_NAME@>@ CMake configuration file:
# This file is meant to be placed in a cmake subfolder of @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip
include(FeatureSummary)
set_package_properties(SDL3_net PROPERTIES
URL "https://www.libsdl.org/projects/SDL_net/"
DESCRIPTION "SDL_net is a simple, cross-platform wrapper over sockets"
)
cmake_minimum_required(VERSION 3.0...3.28)
# Copied from `configure_package_config_file`
macro(check_required_components _NAME)
foreach(comp ${${_NAME}_FIND_COMPONENTS})
if(NOT ${_NAME}_${comp}_FOUND)
if(${_NAME}_FIND_REQUIRED_${comp})
set(${_NAME}_FOUND FALSE)
endif()
endif()
endforeach()
endmacro()
set(SDL3_net_FOUND TRUE)
if(SDL_CPU_X86)
set(_sdl3_net_arch_subdir "x86")
elseif(SDL_CPU_X64 OR SDL_CPU_ARM64EC)
set(_sdl3_net_arch_subdir "x64")
elseif(SDL_CPU_ARM64)
set(_sdl3_net_arch_subdir "arm64")
else()
set(SDL3_net_FOUND FALSE)
return()
endif()
set(_sdl3_net_incdir "${CMAKE_CURRENT_LIST_DIR}/../include")
set(_sdl3_net_library "${CMAKE_CURRENT_LIST_DIR}/../lib/${_sdl3_net_arch_subdir}/SDL3_net.lib")
set(_sdl3_net_dll "${CMAKE_CURRENT_LIST_DIR}/../lib/${_sdl3_net_arch_subdir}/SDL3_net.dll")
# All targets are created, even when some might not be requested though COMPONENTS.
# This is done for compatibility with CMake generated SDL3_net-target.cmake files.
set(SDL3_net_SDL3_net-shared_FOUND TRUE)
if(NOT TARGET SDL3_net::SDL3_net-shared)
add_library(SDL3_net::SDL3_net-shared SHARED IMPORTED)
set_target_properties(SDL3_net::SDL3_net-shared
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_sdl3_net_incdir}"
IMPORTED_IMPLIB "${_sdl3_net_library}"
IMPORTED_LOCATION "${_sdl3_net_dll}"
COMPATIBLE_INTERFACE_BOOL "SDL3_SHARED"
INTERFACE_SDL3_SHARED "ON"
)
endif()
set(SDL3_net_SDL3_net-static_FOUND FALSE)
if(SDL3_net_SDL3_net-shared_FOUND OR SDL3_net_SDL3_net-static_FOUND)
set(SDL3_net_SDL3_net_FOUND TRUE)
endif()
function(_sdl_create_target_alias_compat NEW_TARGET TARGET)
if(CMAKE_VERSION VERSION_LESS "3.18")
# Aliasing local targets is not supported on CMake < 3.18, so make it global.
add_library(${NEW_TARGET} INTERFACE IMPORTED)
set_target_properties(${NEW_TARGET} PROPERTIES INTERFACE_LINK_LIBRARIES "${TARGET}")
else()
add_library(${NEW_TARGET} ALIAS ${TARGET})
endif()
endfunction()
# Make sure SDL3_net::SDL3_net always exists
if(NOT TARGET SDL3_net::SDL3_net)
if(TARGET SDL3_net::SDL3_net-shared)
_sdl_create_target_alias_compat(SDL3_net::SDL3_net SDL3_net::SDL3_net-shared)
endif()
endif()
unset(_sdl3_net_arch_subdir)
unset(_sdl3_net_incdir)
unset(_sdl3_net_library)
unset(_sdl3_net_dll)
check_required_components(SDL3_net)
@@ -0,0 +1,36 @@
# @<@PROJECT_NAME@>@ CMake version configuration file:
# This file is meant to be placed in a cmake subfolder of @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip
set(PACKAGE_VERSION "@<@PROJECT_VERSION@>@")
include("${CMAKE_CURRENT_LIST_DIR}/sdlcpu.cmake")
SDL_DetectTargetCPUArchitectures(_detected_archs)
if(PACKAGE_FIND_VERSION_RANGE)
# Package version must be in the requested version range
if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX)
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX)))
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
endif()
else()
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
endif()
include("${CMAKE_CURRENT_LIST_DIR}/sdlcpu.cmake")
SDL_DetectTargetCPUArchitectures(_detected_archs)
# check that the installed version has a compatible architecture as the one which is currently searching:
if(NOT(SDL_CPU_X86 OR SDL_CPU_X64 OR SDL_CPU_ARM64 OR SDL_CPU_ARM64EC))
set(PACKAGE_VERSION "${PACKAGE_VERSION} (X86,X64,ARM64)")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()
+200
View File
@@ -0,0 +1,200 @@
{
"name": "SDL3_net",
"remote": "libsdl-org/SDL_net",
"dependencies": {
"SDL": {
"startswith": "3.",
"repo": "libsdl-org/SDL"
}
},
"version": {
"file": "include/SDL3_net/SDL_net.h",
"re_major": "^#define SDL_NET_MAJOR_VERSION\\s+([0-9]+)$",
"re_minor": "^#define SDL_NET_MINOR_VERSION\\s+([0-9]+)$",
"re_micro": "^#define SDL_NET_MICRO_VERSION\\s+([0-9]+)$"
},
"source": {
"checks": [
"src/SDL_net.c",
"include/SDL3_net/SDL_net.h",
"examples/voipchat.c"
]
},
"dmg": {
"project": "Xcode/SDL_net.xcodeproj",
"path": "Xcode/build/SDL3_net.dmg",
"scheme": "SDL3_net.dmg",
"dependencies": {
"SDL": {
"artifact": "SDL3-*.dmg"
}
}
},
"mingw": {
"cmake": {
"archs": ["x86", "x64"],
"args": [
"-DBUILD_SHARED_LIBS=ON",
"-DSDLNET_RELOCATABLE=ON",
"-DSDLNET_SAMPLES=OFF",
"-DSDLNET_INSTALL=ON",
"-DSDLNET_INSTALL_MAN=OFF"
],
"shared-static": "args"
},
"files": {
"": [
"LICENSE.txt",
"README.md",
"build-scripts/pkg-support/mingw/Makefile"
],
"cmake": [
"build-scripts/pkg-support/mingw/cmake/SDL3_netConfig.cmake",
"build-scripts/pkg-support/mingw/cmake/SDL3_netConfigVersion.cmake"
]
},
"dependencies": {
"SDL": {
"artifact": "SDL3-devel-*-mingw.tar.gz",
"install-command": "make install-@<@ARCH@>@ DESTDIR=@<@PREFIX@>@"
}
}
},
"msvc": {
"msbuild": {
"archs": [
"x86",
"x64"
],
"projects": [
"VisualC/SDL_net.vcxproj"
],
"files-lib": {
"": [
"VisualC/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL3_net.dll"
]
},
"files-devel": {
"lib/@<@ARCH@>@": [
"VisualC/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL3_net.dll",
"VisualC/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL3_net.lib",
"VisualC/@<@PLATFORM@>@/@<@CONFIGURATION@>@/SDL3_net.pdb"
]
}
},
"cmake": {
"archs": [
"arm64"
],
"args": [
"-DBUILD_SHARED_LIBS=ON",
"-DSDLNET_RELOCATABLE=ON",
"-DSDLNET_SAMPLES=OFF",
"-DSDLNET_INSTALL=ON",
"-DSDLNET_INSTALL_MAN=OFF"
],
"files-lib": {
"": [
"bin/SDL3_net.dll"
]
},
"files-devel": {
"lib/@<@ARCH@>@": [
"bin/SDL3_net.dll",
"bin/SDL3_net.pdb",
"lib/SDL3_net.lib"
]
}
},
"files-lib": {
"": [
"README.md"
]
},
"files-devel": {
"": [
"LICENSE.txt",
"README.md"
],
"cmake": [
"build-scripts/pkg-support/msvc/cmake/SDL3_netConfig.cmake.in:SDL3_netConfig.cmake",
"build-scripts/pkg-support/msvc/cmake/SDL3_netConfigVersion.cmake.in:SDL3_netConvigVersion.cmake",
"cmake/sdlcpu.cmake"
],
"include/SDL3_net": [
"include/SDL3_net/SDL_net.h"
]
},
"dependencies": {
"SDL": {
"artifact": "SDL3-devel-*-VC.zip",
"copy": [
{
"src": "lib/@<@ARCH@>@/SDL3.*",
"dst": "../SDL/VisualC/@<@PLATFORM@>@/@<@CONFIGURATION@>@"
},
{
"src": "include/SDL3/*",
"dst": "../SDL/include/SDL3"
}
]
}
}
},
"android": {
"cmake": {
"args": [
"-DBUILD_SHARED_LIBS=ON",
"-DSDLNET_SAMPLES=OFF",
"-DSDLNET_INSTALL=ON",
"-DSDLNET_INSTALL_MAN=OFF"
]
},
"modules": {
"SDL3_net-shared": {
"type": "library",
"library": "lib/libSDL3_net.so",
"includes": {
"SDL3_net": ["include/SDL3_net/*.h"]
}
},
"SDL3_net": {
"type": "interface",
"export-libraries": [":SDL3_net-shared"]
}
},
"abis": [
"armeabi-v7a",
"arm64-v8a",
"x86",
"x86_64"
],
"api-minimum": 19,
"api-target": 29,
"ndk-minimum": 28,
"aar-files": {
"": [
"build-scripts/pkg-support/android/aar/__main__.py.in:__main__.py",
"build-scripts/pkg-support/android/aar/description.json.in:description.json"
],
"META-INF": [
"LICENSE.txt"
],
"cmake": [
"cmake/sdlcpu.cmake",
"build-scripts/pkg-support/android/aar/cmake/SDL3_netConfig.cmake",
"build-scripts/pkg-support/android/aar/cmake/SDL3_netConfigVersion.cmake.in:SDL3_netConfigVersion.cmake"
]
},
"files": {
"": [
"build-scripts/pkg-support/android/README.md.in:README.md"
]
},
"dependencies": {
"SDL": {
"artifact": "SDL3-devel-*-android.zip"
}
}
}
}
+141
View File
@@ -0,0 +1,141 @@
#!/bin/sh
# Copyright 2022 Collabora Ltd.
# SPDX-License-Identifier: Zlib
set -eu
cd `dirname $0`/..
# Needed so sed doesn't report illegal byte sequences on macOS
export LC_CTYPE=C
header=include/SDL3_net/SDL_net.h
ref_major=$(sed -ne 's/^#define SDL_NET_MAJOR_VERSION *//p' $header)
ref_minor=$(sed -ne 's/^#define SDL_NET_MINOR_VERSION *//p' $header)
ref_micro=$(sed -ne 's/^#define SDL_NET_MICRO_VERSION *//p' $header)
ref_version="${ref_major}.${ref_minor}.${ref_micro}"
tests=0
failed=0
ok () {
tests=$(( tests + 1 ))
echo "ok - $*"
}
not_ok () {
tests=$(( tests + 1 ))
echo "not ok - $*"
failed=1
}
major=$(sed -ne 's/^set(MAJOR_VERSION \([0-9]*\))$/\1/p' CMakeLists.txt)
minor=$(sed -ne 's/^set(MINOR_VERSION \([0-9]*\))$/\1/p' CMakeLists.txt)
micro=$(sed -ne 's/^set(MICRO_VERSION \([0-9]*\))$/\1/p' CMakeLists.txt)
version="${major}.${minor}.${micro}"
if [ "$ref_version" = "$version" ]; then
ok "CMakeLists.txt $version"
else
not_ok "CMakeLists.txt $version disagrees with SDL_net.h $ref_version"
fi
for rcfile in src/version.rc; do
tuple=$(sed -ne 's/^ *FILEVERSION *//p' "$rcfile" | tr -d '\r')
ref_tuple="${ref_major},${ref_minor},${ref_micro},0"
if [ "$ref_tuple" = "$tuple" ]; then
ok "$rcfile FILEVERSION $tuple"
else
not_ok "$rcfile FILEVERSION $tuple disagrees with SDL_net.h $ref_tuple"
fi
tuple=$(sed -ne 's/^ *PRODUCTVERSION *//p' "$rcfile" | tr -d '\r')
if [ "$ref_tuple" = "$tuple" ]; then
ok "$rcfile PRODUCTVERSION $tuple"
else
not_ok "$rcfile PRODUCTVERSION $tuple disagrees with SDL_net.h $ref_tuple"
fi
tuple=$(sed -Ene 's/^ *VALUE "FileVersion", "([0-9, ]*)\\0"\r?$/\1/p' "$rcfile" | tr -d '\r')
ref_tuple="${ref_major}, ${ref_minor}, ${ref_micro}, 0"
if [ "$ref_tuple" = "$tuple" ]; then
ok "$rcfile FileVersion $tuple"
else
not_ok "$rcfile FileVersion $tuple disagrees with SDL_net.h $ref_tuple"
fi
tuple=$(sed -Ene 's/^ *VALUE "ProductVersion", "([0-9, ]*)\\0"\r?$/\1/p' "$rcfile" | tr -d '\r')
if [ "$ref_tuple" = "$tuple" ]; then
ok "$rcfile ProductVersion $tuple"
else
not_ok "$rcfile ProductVersion $tuple disagrees with SDL_net.h $ref_tuple"
fi
done
#version=$(sed -Ene '/CFBundleShortVersionString/,+1 s/.*<string>(.*)<\/string>.*/\1/p' Xcode/Info-Framework.plist)
#
#if [ "$ref_version" = "$version" ]; then
# ok "Info-Framework.plist CFBundleShortVersionString $version"
#else
# not_ok "Info-Framework.plist CFBundleShortVersionString $version disagrees with SDL_net.h $ref_version"
#fi
#
#version=$(sed -Ene '/CFBundleVersion/,+1 s/.*<string>(.*)<\/string>.*/\1/p' Xcode/Info-Framework.plist)
#
#if [ "$ref_version" = "$version" ]; then
# ok "Info-Framework.plist CFBundleVersion $version"
#else
# not_ok "Info-Framework.plist CFBundleVersion $version disagrees with SDL_net.h $ref_version"
#fi
#
## For simplicity this assumes we'll never break ABI before SDL 3.
#dylib_compat=$(sed -Ene 's/.*DYLIB_COMPATIBILITY_VERSION = (.*);$/\1/p' Xcode/SDL_net.xcodeproj/project.pbxproj)
#
#case "$ref_minor" in
# (*[02468])
# major="$(( ref_minor * 100 + 1 ))"
# minor="0"
# ;;
# (*)
# major="$(( ref_minor * 100 + ref_micro + 1 ))"
# minor="0"
# ;;
#esac
#
#ref="${major}.${minor}.0
#${major}.${minor}.0"
#
#if [ "$ref" = "$dylib_compat" ]; then
# ok "project.pbxproj DYLIB_COMPATIBILITY_VERSION is consistent"
#else
# not_ok "project.pbxproj DYLIB_COMPATIBILITY_VERSION is inconsistent, expected $ref, got $dylib_compat"
#fi
#
#dylib_cur=$(sed -Ene 's/.*DYLIB_CURRENT_VERSION = (.*);$/\1/p' Xcode/SDL_net.xcodeproj/project.pbxproj)
#
#case "$ref_minor" in
# (*[02468])
# major="$(( ref_minor * 100 + 1 ))"
# minor="$ref_micro"
# ;;
# (*)
# major="$(( ref_minor * 100 + ref_micro + 1 ))"
# minor="0"
# ;;
#esac
#
#ref="${major}.${minor}.0
#${major}.${minor}.0"
#
#if [ "$ref" = "$dylib_cur" ]; then
# ok "project.pbxproj DYLIB_CURRENT_VERSION is consistent"
#else
# not_ok "project.pbxproj DYLIB_CURRENT_VERSION is inconsistent, expected $ref, got $dylib_cur"
#fi
echo "1..$tests"
exit "$failed"
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,284 @@
# - Returns a version string from Git
#
# These functions force a re-configure on each git commit so that you can
# trust the values of the variables in your build system.
#
# get_git_head_revision(<refspecvar> <hashvar> [ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR])
#
# Returns the refspec and sha hash of the current head revision
#
# git_describe(<var> [<additional arguments to git describe> ...])
#
# Returns the results of git describe on the source tree, and adjusting
# the output so that it tests false if an error occurs.
#
# git_describe_working_tree(<var> [<additional arguments to git describe> ...])
#
# Returns the results of git describe on the working tree (--dirty option),
# and adjusting the output so that it tests false if an error occurs.
#
# git_get_exact_tag(<var> [<additional arguments to git describe> ...])
#
# Returns the results of git describe --exact-match on the source tree,
# and adjusting the output so that it tests false if there was no exact
# matching tag.
#
# git_local_changes(<var>)
#
# Returns either "CLEAN" or "DIRTY" with respect to uncommitted changes.
# Uses the return code of "git diff-index --quiet HEAD --".
# Does not regard untracked files.
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Original Author:
# 2009-2020 Ryan Pavlik <ryan.pavlik@gmail.com> <abiryan@ryand.net>
# http://academic.cleardefinition.com
#
# Copyright 2009-2013, Iowa State University.
# Copyright 2013-2020, Ryan Pavlik
# Copyright 2013-2020, Contributors
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
if(__get_git_revision_description)
return()
endif()
set(__get_git_revision_description YES)
# We must run the following at "include" time, not at function call time,
# to find the path to this module rather than the path to a calling list file
get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
# Function _git_find_closest_git_dir finds the next closest .git directory
# that is part of any directory in the path defined by _start_dir.
# The result is returned in the parent scope variable whose name is passed
# as variable _git_dir_var. If no .git directory can be found, the
# function returns an empty string via _git_dir_var.
#
# Example: Given a path C:/bla/foo/bar and assuming C:/bla/.git exists and
# neither foo nor bar contain a file/directory .git. This will return
# C:/bla/.git
#
function(_git_find_closest_git_dir _start_dir _git_dir_var)
set(cur_dir "${_start_dir}")
set(git_dir "${_start_dir}/.git")
while(NOT EXISTS "${git_dir}")
# .git dir not found, search parent directories
set(git_previous_parent "${cur_dir}")
get_filename_component(cur_dir "${cur_dir}" DIRECTORY)
if(cur_dir STREQUAL git_previous_parent)
# We have reached the root directory, we are not in git
set(${_git_dir_var}
""
PARENT_SCOPE)
return()
endif()
set(git_dir "${cur_dir}/.git")
endwhile()
set(${_git_dir_var}
"${git_dir}"
PARENT_SCOPE)
endfunction()
function(get_git_head_revision _refspecvar _hashvar)
_git_find_closest_git_dir("${CMAKE_CURRENT_SOURCE_DIR}" GIT_DIR)
if("${ARGN}" STREQUAL "ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR")
set(ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR TRUE)
else()
set(ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR FALSE)
endif()
if(NOT "${GIT_DIR}" STREQUAL "")
file(RELATIVE_PATH _relative_to_source_dir "${CMAKE_SOURCE_DIR}"
"${GIT_DIR}")
if("${_relative_to_source_dir}" MATCHES "[.][.]" AND NOT ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR)
# We've gone above the CMake root dir.
set(GIT_DIR "")
endif()
endif()
if("${GIT_DIR}" STREQUAL "")
set(${_refspecvar}
"GITDIR-NOTFOUND"
PARENT_SCOPE)
set(${_hashvar}
"GITDIR-NOTFOUND"
PARENT_SCOPE)
return()
endif()
# Check if the current source dir is a git submodule or a worktree.
# In both cases .git is a file instead of a directory.
#
if(NOT IS_DIRECTORY ${GIT_DIR})
# The following git command will return a non empty string that
# points to the super project working tree if the current
# source dir is inside a git submodule.
# Otherwise the command will return an empty string.
#
execute_process(
COMMAND "${GIT_EXECUTABLE}" rev-parse
--show-superproject-working-tree
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
OUTPUT_VARIABLE out
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT "${out}" STREQUAL "")
# If out is empty, GIT_DIR/CMAKE_CURRENT_SOURCE_DIR is in a submodule
file(READ ${GIT_DIR} submodule)
string(REGEX REPLACE "gitdir: (.*)$" "\\1" GIT_DIR_RELATIVE
${submodule})
string(STRIP ${GIT_DIR_RELATIVE} GIT_DIR_RELATIVE)
get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH)
get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE}
ABSOLUTE)
set(HEAD_SOURCE_FILE "${GIT_DIR}/HEAD")
else()
# GIT_DIR/CMAKE_CURRENT_SOURCE_DIR is in a worktree
file(READ ${GIT_DIR} worktree_ref)
# The .git directory contains a path to the worktree information directory
# inside the parent git repo of the worktree.
#
string(REGEX REPLACE "gitdir: (.*)$" "\\1" git_worktree_dir
${worktree_ref})
string(STRIP ${git_worktree_dir} git_worktree_dir)
_git_find_closest_git_dir("${git_worktree_dir}" GIT_DIR)
set(HEAD_SOURCE_FILE "${git_worktree_dir}/HEAD")
endif()
else()
set(HEAD_SOURCE_FILE "${GIT_DIR}/HEAD")
endif()
set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
if(NOT EXISTS "${GIT_DATA}")
file(MAKE_DIRECTORY "${GIT_DATA}")
endif()
if(NOT EXISTS "${HEAD_SOURCE_FILE}")
return()
endif()
set(HEAD_FILE "${GIT_DATA}/HEAD")
configure_file("${HEAD_SOURCE_FILE}" "${HEAD_FILE}" COPYONLY)
configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in"
"${GIT_DATA}/grabRef.cmake" @ONLY)
include("${GIT_DATA}/grabRef.cmake")
set(${_refspecvar}
"${HEAD_REF}"
PARENT_SCOPE)
set(${_hashvar}
"${HEAD_HASH}"
PARENT_SCOPE)
endfunction()
function(git_describe _var)
if(NOT GIT_FOUND)
find_package(Git QUIET)
endif()
get_git_head_revision(refspec hash)
if(NOT GIT_FOUND)
set(${_var}
"GIT-NOTFOUND"
PARENT_SCOPE)
return()
endif()
if(NOT hash)
set(${_var}
"HEAD-HASH-NOTFOUND"
PARENT_SCOPE)
return()
endif()
# TODO sanitize
#if((${ARGN}" MATCHES "&&") OR
# (ARGN MATCHES "||") OR
# (ARGN MATCHES "\\;"))
# message("Please report the following error to the project!")
# message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}")
#endif()
#message(STATUS "Arguments to execute_process: ${ARGN}")
execute_process(
COMMAND "${GIT_EXECUTABLE}" describe --tags --always ${hash} ${ARGN}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
RESULT_VARIABLE res
OUTPUT_VARIABLE out
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT res EQUAL 0)
set(out "${out}-${res}-NOTFOUND")
endif()
set(${_var}
"${out}"
PARENT_SCOPE)
endfunction()
function(git_describe_working_tree _var)
if(NOT GIT_FOUND)
find_package(Git QUIET)
endif()
if(NOT GIT_FOUND)
set(${_var}
"GIT-NOTFOUND"
PARENT_SCOPE)
return()
endif()
execute_process(
COMMAND "${GIT_EXECUTABLE}" describe --dirty ${ARGN}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
RESULT_VARIABLE res
OUTPUT_VARIABLE out
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT res EQUAL 0)
set(out "${out}-${res}-NOTFOUND")
endif()
set(${_var}
"${out}"
PARENT_SCOPE)
endfunction()
function(git_get_exact_tag _var)
git_describe(out --exact-match ${ARGN})
set(${_var}
"${out}"
PARENT_SCOPE)
endfunction()
function(git_local_changes _var)
if(NOT GIT_FOUND)
find_package(Git QUIET)
endif()
get_git_head_revision(refspec hash)
if(NOT GIT_FOUND)
set(${_var}
"GIT-NOTFOUND"
PARENT_SCOPE)
return()
endif()
if(NOT hash)
set(${_var}
"HEAD-HASH-NOTFOUND"
PARENT_SCOPE)
return()
endif()
execute_process(
COMMAND "${GIT_EXECUTABLE}" diff-index --quiet HEAD --
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
RESULT_VARIABLE res
OUTPUT_VARIABLE out
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if(res EQUAL 0)
set(${_var}
"CLEAN"
PARENT_SCOPE)
else()
set(${_var}
"DIRTY"
PARENT_SCOPE)
endif()
endfunction()
@@ -0,0 +1,43 @@
#
# Internal file for GetGitRevisionDescription.cmake
#
# Requires CMake 2.6 or newer (uses the 'function' command)
#
# Original Author:
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright 2009-2012, Iowa State University
# Copyright 2011-2015, Contributors
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# SPDX-License-Identifier: BSL-1.0
set(HEAD_HASH)
file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
if(HEAD_CONTENTS MATCHES "ref")
# named branch
string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
if(EXISTS "@GIT_DIR@/${HEAD_REF}")
configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
else()
configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY)
file(READ "@GIT_DATA@/packed-refs" PACKED_REFS)
if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}")
set(HEAD_HASH "${CMAKE_MATCH_1}")
endif()
endif()
else()
# detached HEAD
configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
endif()
if(NOT HEAD_HASH)
file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
string(STRIP "${HEAD_HASH}" HEAD_HASH)
endif()
+363
View File
@@ -0,0 +1,363 @@
# This file is shared amongst SDL_image/SDL_mixer/SDL_ttf
include(CheckCCompilerFlag)
include(CheckCSourceCompiles)
include(CMakePushCheckState)
macro(sdl_calculate_derived_version_variables MAJOR MINOR MICRO)
set(SO_VERSION_MAJOR "0")
set(SO_VERSION_MINOR "${MINOR_VERSION}")
set(SO_VERSION_MICRO "${MICRO_VERSION}")
set(SO_VERSION "${SO_VERSION_MAJOR}.${SO_VERSION_MINOR}.${SO_VERSION_MICRO}")
if(MINOR MATCHES "[02468]$")
math(EXPR DYLIB_COMPAT_VERSION_MAJOR "100 * ${MINOR} + 1")
set(DYLIB_COMPAT_VERSION_MINOR "0")
math(EXPR DYLIB_CURRENT_VERSION_MAJOR "${DYLIB_COMPAT_VERSION_MAJOR}")
set(DYLIB_CURRENT_VERSION_MINOR "${MICRO}")
else()
math(EXPR DYLIB_COMPAT_VERSION_MAJOR "100 * ${MINOR} + ${MICRO} + 1")
set(DYLIB_COMPAT_VERSION_MINOR "0")
math(EXPR DYLIB_CURRENT_VERSION_MAJOR "${DYLIB_COMPAT_VERSION_MAJOR}")
set(DYLIB_CURRENT_VERSION_MINOR "0")
endif()
set(DYLIB_COMPAT_VERSION_MICRO "0")
set(DYLIB_CURRENT_VERSION_MICRO "0")
set(DYLIB_CURRENT_VERSION "${DYLIB_CURRENT_VERSION_MAJOR}.${DYLIB_CURRENT_VERSION_MINOR}.${DYLIB_CURRENT_VERSION_MICRO}")
set(DYLIB_COMPAT_VERSION "${DYLIB_COMPAT_VERSION_MAJOR}.${DYLIB_COMPAT_VERSION_MINOR}.${DYLIB_COMPAT_VERSION_MICRO}")
endmacro()
function(read_absolute_symlink DEST PATH)
file(READ_SYMLINK "${PATH}" p)
if(NOT IS_ABSOLUTE "${p}")
get_filename_component(pdir "${PATH}" DIRECTORY)
set(p "${pdir}/${p}")
endif()
get_filename_component(p "${p}" ABSOLUTE)
set("${DEST}" "${p}" PARENT_SCOPE)
endfunction()
function(win32_implib_identify_dll DEST IMPLIB)
cmake_parse_arguments(ARGS "NOTFATAL" "" "" ${ARGN})
if(CMAKE_DLLTOOL)
execute_process(
COMMAND "${CMAKE_DLLTOOL}" --identify "${IMPLIB}"
RESULT_VARIABLE retcode
OUTPUT_VARIABLE stdout
ERROR_VARIABLE stderr)
if(NOT retcode EQUAL 0)
if(NOT ARGS_NOTFATAL)
message(FATAL_ERROR "${CMAKE_DLLTOOL} failed.")
else()
set("${DEST}" "${DEST}-NOTFOUND" PARENT_SCOPE)
return()
endif()
endif()
string(STRIP "${stdout}" result)
set(${DEST} "${result}" PARENT_SCOPE)
elseif(MSVC)
get_filename_component(CMAKE_C_COMPILER_DIRECTORY "${CMAKE_C_COMPILER}" DIRECTORY CACHE)
find_program(CMAKE_DUMPBIN NAMES dumpbin PATHS "${CMAKE_C_COMPILER_DIRECTORY}")
if(CMAKE_DUMPBIN)
execute_process(
COMMAND "${CMAKE_DUMPBIN}" "-headers" "${IMPLIB}"
RESULT_VARIABLE retcode
OUTPUT_VARIABLE stdout
ERROR_VARIABLE stderr)
if(NOT retcode EQUAL 0)
if(NOT ARGS_NOTFATAL)
message(FATAL_ERROR "dumpbin failed.")
else()
set(${DEST} "${DEST}-NOTFOUND" PARENT_SCOPE)
return()
endif()
endif()
string(REGEX MATCH "DLL name[ ]+:[ ]+([^\n]+)\n" match "${stdout}")
if(NOT match)
if(NOT ARGS_NOTFATAL)
message(FATAL_ERROR "dumpbin did not find any associated dll for ${IMPLIB}.")
else()
set(${DEST} "${DEST}-NOTFOUND" PARENT_SCOPE)
return()
endif()
endif()
set(result "${CMAKE_MATCH_1}")
set(${DEST} "${result}" PARENT_SCOPE)
else()
message(FATAL_ERROR "Cannot find dumpbin, please set CMAKE_DUMPBIN cmake variable")
endif()
else()
if(NOT ARGS_NOTFATAL)
message(FATAL_ERROR "Don't know how to identify dll from import library. Set CMAKE_DLLTOOL (for mingw) or CMAKE_DUMPBIN (for MSVC)")
else()
set(${DEST} "${DEST}-NOTFOUND")
endif()
endif()
endfunction()
function(get_actual_target)
set(dst "${ARGV0}")
set(target "${${dst}}")
set(input "${target}")
get_target_property(alias "${target}" ALIASED_TARGET)
while(alias)
set(target "${alias}")
get_target_property(alias "${target}" ALIASED_TARGET)
endwhile()
message(DEBUG "get_actual_target(\"${input}\") -> \"${target}\"")
set("${dst}" "${target}" PARENT_SCOPE)
endfunction()
function(target_get_dynamic_library DEST TARGET)
set(result)
if(DEFINED ${DEST})
if(NOT EXISTS "${${DEST}}")
message(FATAL_ERROR "${DEST}=${${DEST}} does not exist")
endif()
get_filename_component(filename ${${DEST}} NAME)
set(${DEST} ${filename} PARENT_SCOPE)
else()
get_actual_target(TARGET)
if(WIN32)
# Use the target dll of the import library
set(props_to_check IMPORTED_IMPLIB)
if(CMAKE_BUILD_TYPE)
list(APPEND props_to_check IMPORTED_IMPLIB_${CMAKE_BUILD_TYPE})
endif()
list(APPEND props_to_check IMPORTED_LOCATION)
if(CMAKE_BUILD_TYPE)
list(APPEND props_to_check IMPORTED_LOCATION_${CMAKE_BUILD_TYPE})
endif()
foreach (config_type ${CMAKE_CONFIGURATION_TYPES} RELEASE DEBUG RELWITHDEBINFO MINSIZEREL)
list(APPEND props_to_check IMPORTED_IMPLIB_${config_type})
list(APPEND props_to_check IMPORTED_LOCATION_${config_type})
endforeach()
foreach(prop_to_check ${props_to_check})
if(NOT result)
get_target_property(propvalue "${TARGET}" ${prop_to_check})
if(propvalue AND EXISTS "${propvalue}")
win32_implib_identify_dll(result "${propvalue}" NOTFATAL)
endif()
endif()
endforeach()
else()
# 1. find the target library a file might be symbolic linking to
# 2. find all other files in the same folder that symolic link to it
# 3. sort all these files, and select the 1st item on Linux, and last on Macos
set(location_properties IMPORTED_LOCATION)
if(CMAKE_BUILD_TYPE)
list(APPEND location_properties IMPORTED_LOCATION_${CMAKE_BUILD_TYPE})
endif()
foreach (config_type ${CMAKE_CONFIGURATION_TYPES} RELEASE DEBUG RELWITHDEBINFO MINSIZEREL)
list(APPEND location_properties IMPORTED_LOCATION_${config_type})
endforeach()
if(APPLE)
set(valid_shared_library_regex "\\.[0-9]+\\.dylib$")
else()
set(valid_shared_library_regex "\\.so\\.([0-9.]+)?[0-9]")
endif()
foreach(location_property ${location_properties})
if(NOT result)
get_target_property(library_path "${TARGET}" ${location_property})
message(DEBUG "get_target_property(${TARGET} ${location_propert}) -> ${library_path}")
if(EXISTS "${library_path}")
get_filename_component(library_path "${library_path}" ABSOLUTE)
while (IS_SYMLINK "${library_path}")
read_absolute_symlink(library_path "${library_path}")
endwhile()
message(DEBUG "${TARGET} -> ${library_path}")
get_filename_component(libdir "${library_path}" DIRECTORY)
file(GLOB subfiles "${libdir}/*")
set(similar_files "${library_path}")
foreach(subfile ${subfiles})
if(IS_SYMLINK "${subfile}")
read_absolute_symlink(subfile_target "${subfile}")
while(IS_SYMLINK "${subfile_target}")
read_absolute_symlink(subfile_target "${subfile_target}")
endwhile()
get_filename_component(subfile_target "${subfile_target}" ABSOLUTE)
if(subfile_target STREQUAL library_path AND subfile MATCHES "${valid_shared_library_regex}")
list(APPEND similar_files "${subfile}")
endif()
endif()
endforeach()
list(SORT similar_files)
message(DEBUG "files that are similar to \"${library_path}\"=${similar_files}")
if(APPLE)
list(REVERSE similar_files)
endif()
list(GET similar_files 0 item)
get_filename_component(result "${item}" NAME)
endif()
endif()
endforeach()
endif()
if(result)
string(TOLOWER "${result}" result_lower)
if(WIN32 OR OS2)
if(NOT result_lower MATCHES ".*dll")
message(FATAL_ERROR "\"${result}\" is not a .dll library")
endif()
elseif(APPLE)
if(NOT result_lower MATCHES ".*dylib.*")
message(FATAL_ERROR "\"${result}\" is not a .dylib shared library")
endif()
else()
if(NOT result_lower MATCHES ".*so.*")
message(FATAL_ERROR "\"${result}\" is not a .so shared library")
endif()
endif()
else()
get_target_property(target_type ${TARGET} TYPE)
if(target_type MATCHES "SHARED_LIBRARY|MODULE_LIBRARY")
# OK
elseif(target_type MATCHES "STATIC_LIBRARY|OBJECT_LIBRARY|INTERFACE_LIBRARY|EXECUTABLE")
message(SEND_ERROR "${TARGET} is not a shared library, but has type=${target_type}")
else()
message(WARNING "Unable to extract dynamic library from target=${TARGET}, type=${target_type}.")
endif()
# TARGET_SONAME_FILE is not allowed for DLL target platforms.
if(WIN32)
set(result "$<TARGET_FILE_NAME:${TARGET}>")
else()
set(result "$<TARGET_SONAME_FILE_NAME:${TARGET}>")
endif()
endif()
set(${DEST} ${result} PARENT_SCOPE)
endif()
endfunction()
function(sdl_check_project_in_subfolder relative_subfolder name vendored_option)
cmake_parse_arguments(ARG "" "FILE" "" ${ARGN})
if(NOT ARG_FILE)
set(ARG_FILE "CMakeLists.txt")
endif()
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/${relative_subfolder}/${ARG_FILE}")
message(FATAL_ERROR "Could not find ${ARG_FILE} for ${name} in ${relative_subfolder}.\n"
"Run the download script in the external folder, or re-configure with -D${vendored_option}=OFF to use system packages.")
endif()
endfunction()
macro(sdl_check_linker_flag flag var)
# FIXME: Use CheckLinkerFlag module once cmake minimum version >= 3.18
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_LINK_OPTIONS "${flag}")
check_c_source_compiles("int main() { return 0; }" ${var} FAIL_REGEX "(unsupported|syntax error|unrecognized option)")
cmake_pop_check_state()
endmacro()
function(SDL_detect_linker)
if(CMAKE_VERSION VERSION_LESS 3.29)
if(NOT DEFINED SDL_CMAKE_C_COMPILER_LINKER_ID)
execute_process(COMMAND ${CMAKE_LINKER} -v OUTPUT_VARIABLE LINKER_OUTPUT ERROR_VARIABLE LINKER_OUTPUT)
string(REGEX REPLACE "[\r\n]" " " LINKER_OUTPUT "${LINKER_OUTPUT}")
if(LINKER_OUTPUT MATCHES ".*Microsoft.*")
set(linker MSVC)
else()
set(linker GNUlike)
endif()
message(STATUS "Linker identification: ${linker}")
set(SDL_CMAKE_C_COMPILER_LINKER_ID "${linker}" CACHE STRING "Linker identification")
mark_as_advanced(SDL_CMAKE_C_COMPILER_LINKER_ID)
endif()
set(CMAKE_C_COMPILER_LINKER_ID "${SDL_CMAKE_C_COMPILER_LINKER_ID}" PARENT_SCOPE)
endif()
endfunction()
function(check_linker_support_version_script VAR)
SDL_detect_linker()
if(CMAKE_C_COMPILER_LINKER_ID MATCHES "^(MSVC)$")
set(LINKER_SUPPORTS_VERSION_SCRIPT FALSE)
else()
cmake_push_check_state(RESET)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummy.sym" "n_0 {\n global:\n func;\n local: *;\n};\n")
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/dummy.sym")
check_c_source_compiles("int func(void) {return 0;} int main(int argc,char*argv[]){(void)argc;(void)argv;return func();}" LINKER_SUPPORTS_VERSION_SCRIPT FAIL_REGEX "(unsupported|syntax error|unrecognized option)")
cmake_pop_check_state()
endif()
set(${VAR} "${LINKER_SUPPORTS_VERSION_SCRIPT}" PARENT_SCOPE)
endfunction()
function(sdl_target_link_options_no_undefined TARGET)
if(NOT MSVC AND NOT CMAKE_SYSTEM_NAME MATCHES ".*OpenBSD.*")
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang")
target_link_options(${TARGET} PRIVATE "-Wl,-undefined,error")
else()
sdl_check_linker_flag("-Wl,--no-undefined" HAVE_WL_NO_UNDEFINED)
if(HAVE_WL_NO_UNDEFINED AND NOT ((CMAKE_C_COMPILER_ID MATCHES "Clang") AND WIN32))
target_link_options(${TARGET} PRIVATE "-Wl,--no-undefined")
endif()
endif()
endif()
endfunction()
function(sdl_target_link_option_version_file TARGET VERSION_SCRIPT)
check_linker_support_version_script(HAVE_WL_VERSION_SCRIPT)
if(HAVE_WL_VERSION_SCRIPT)
target_link_options(${TARGET} PRIVATE "-Wl,--version-script=${VERSION_SCRIPT}")
set_property(TARGET ${TARGET} APPEND PROPERTY LINK_DEPENDS "${VERSION_SCRIPT}")
else()
if(LINUX OR ANDROID)
message(FATAL_ERROR "Linker does not support '-Wl,--version-script=xxx.sym'. This is required on the current host platform.")
endif()
endif()
endfunction()
function(sdl_add_warning_options TARGET)
cmake_parse_arguments(ARGS "" "WARNING_AS_ERROR" "" ${ARGN})
if(MSVC)
target_compile_options(${TARGET} PRIVATE /W2)
else()
target_compile_options(${TARGET} PRIVATE -Wall -Wextra)
endif()
if(ARGS_WARNING_AS_ERROR)
if(MSVC)
target_compile_options(${TARGET} PRIVATE /WX)
else()
target_compile_options(${TARGET} PRIVATE -Werror)
endif()
endif()
endfunction()
function(sdl_no_deprecated_errors TARGET)
check_c_compiler_flag(-Wno-error=deprecated-declarations HAVE_WNO_ERROR_DEPRECATED_DECLARATIONS)
if(HAVE_WNO_ERROR_DEPRECATED_DECLARATIONS)
target_compile_options(${TARGET} PRIVATE "-Wno-error=deprecated-declarations")
endif()
endfunction()
function(sdl_get_git_revision_hash VARNAME)
set("${VARNAME}" "" CACHE STRING "${PROJECT_NAME} revision")
set(revision "${${VARNAME}}")
if(NOT revision)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt")
# If VERSION.txt exists, it contains the SDL version
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt" revision_version)
string(STRIP "${revision_version}" revision_version)
else()
# If VERSION.txt does not exist, use git to calculate a version
git_describe(revision_version)
if(NOT revision_version)
set(revision_version "${PROJECT_VERSION}-no-vcs")
endif()
endif()
set(revision "${revision_version}")
endif()
set("${VARNAME}" "${revision}" PARENT_SCOPE)
endfunction()
function(SDL_install_pdb TARGET DIRECTORY)
get_property(type TARGET ${TARGET} PROPERTY TYPE)
if(type MATCHES "^(SHARED_LIBRARY|EXECUTABLE)$")
install(FILES $<TARGET_PDB_FILE:${TARGET}> DESTINATION "${DIRECTORY}" OPTIONAL)
elseif(type STREQUAL "STATIC_LIBRARY")
# FIXME: Use $<TARGET_COMPILE_PDB_FILE:${TARGET} once it becomes available (https://gitlab.kitware.com/cmake/cmake/-/issues/25244)
if(CMAKE_GENERATOR MATCHES "^Visual Studio.*")
install(CODE "file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/${DIRECTORY}\" TYPE FILE OPTIONAL FILES \"${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/${TARGET}.pdb\")")
else()
install(CODE "file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/${DIRECTORY}\" TYPE FILE OPTIONAL FILES \"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${TARGET}.dir/${TARGET}.pdb\")")
endif()
endif()
endfunction()
+38
View File
@@ -0,0 +1,38 @@
# sdl3_net cmake project-config input for CMakeLists.txt script
include(FeatureSummary)
set_package_properties(SDL3_net PROPERTIES
URL "https://www.libsdl.org/projects/SDL_net/"
DESCRIPTION "SDL_net is a simple, cross-platform wrapper over sockets"
)
set(SDL3_net_FOUND ON)
set(SDLNET_SDL3_REQUIRED_VERSION @SDL_REQUIRED_VERSION@)
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3_net-shared-targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/SDL3_net-shared-targets.cmake")
endif()
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL3_net-static-targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/SDL3_net-static-targets.cmake")
endif()
function(_sdl_create_target_alias_compat NEW_TARGET TARGET)
if(CMAKE_VERSION VERSION_LESS "3.18")
# Aliasing local targets is not supported on CMake < 3.18, so make it global.
add_library(${NEW_TARGET} INTERFACE IMPORTED)
set_target_properties(${NEW_TARGET} PROPERTIES INTERFACE_LINK_LIBRARIES "${TARGET}")
else()
add_library(${NEW_TARGET} ALIAS ${TARGET})
endif()
endfunction()
# Make sure SDL3_net::SDL3_net always exists
if(NOT TARGET SDL3_net::SDL3_net)
if(TARGET SDL3_net::SDL3_net-shared)
_sdl_create_target_alias_compat(SDL3_net::SDL3_net SDL3_net::SDL3_net-shared)
else()
_sdl_create_target_alias_compat(SDL3_net::SDL3_net SDL3_net::SDL3_net-static)
endif()
endif()
+13
View File
@@ -0,0 +1,13 @@
prefix=@SDL_PKGCONFIG_PREFIX@
exec_prefix=${prefix}
libdir=@LIBDIR_FOR_PKG_CONFIG@
includedir=@INCLUDEDIR_FOR_PKG_CONFIG@
Name: @PROJECT_NAME@
Description: net library for Simple DirectMedia Layer
Version: @PROJECT_VERSION@
Requires: sdl3 >= @SDL_REQUIRED_VERSION@
Libs: -L${libdir} -lSDL3_net
Requires.private: @PC_REQUIRES@
Libs.private: @PC_LIBS@
Cflags: -I${includedir}
+156
View File
@@ -0,0 +1,156 @@
function(SDL_DetectTargetCPUArchitectures DETECTED_ARCHS)
set(known_archs EMSCRIPTEN ARM32 ARM64 ARM64EC LOONGARCH64 POWERPC32 POWERPC64 X86 X64)
if(APPLE AND CMAKE_OSX_ARCHITECTURES)
foreach(known_arch IN LISTS known_archs)
set(SDL_CPU_${known_arch} "0")
endforeach()
set(detected_archs)
foreach(osx_arch IN LISTS CMAKE_OSX_ARCHITECTURES)
if(osx_arch STREQUAL "x86_64")
set(SDL_CPU_X64 "1")
list(APPEND detected_archs "X64")
elseif(osx_arch STREQUAL "arm64")
set(SDL_CPU_ARM64 "1")
list(APPEND detected_archs "ARM64")
endif()
endforeach()
set("${DETECTED_ARCHS}" "${detected_archs}" PARENT_SCOPE)
return()
endif()
set(detected_archs)
foreach(known_arch IN LISTS known_archs)
if(SDL_CPU_${known_arch})
list(APPEND detected_archs "${known_arch}")
endif()
endforeach()
if(detected_archs)
set("${DETECTED_ARCHS}" "${detected_archs}" PARENT_SCOPE)
return()
endif()
set(arch_check_ARM32 "defined(__arm__) || defined(_M_ARM)")
set(arch_check_ARM64 "defined(__aarch64__) || defined(_M_ARM64)")
set(arch_check_ARM64EC "defined(_M_ARM64EC)")
set(arch_check_EMSCRIPTEN "defined(__EMSCRIPTEN__)")
set(arch_check_LOONGARCH64 "defined(__loongarch64)")
set(arch_check_POWERPC32 "(defined(__PPC__) || defined(__powerpc__)) && !defined(__powerpc64__)")
set(arch_check_POWERPC64 "defined(__PPC64__) || defined(__powerpc64__)")
set(arch_check_X86 "defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) ||defined( __i386) || defined(_M_IX86)")
set(arch_check_X64 "(defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64)) && !defined(_M_ARM64EC)")
set(src_vars "")
set(src_main "")
foreach(known_arch IN LISTS known_archs)
set(detected_${known_arch} "0")
string(APPEND src_vars "
#if ${arch_check_${known_arch}}
#define ARCH_${known_arch} \"1\"
#else
#define ARCH_${known_arch} \"0\"
#endif
const char *arch_${known_arch} = \"INFO<${known_arch}=\" ARCH_${known_arch} \">\";
")
string(APPEND src_main "
result += arch_${known_arch}[argc];")
endforeach()
set(src_arch_detect "${src_vars}
int main(int argc, char *argv[]) {
int result = 0;
(void)argv;
${src_main}
return result;
}")
if(CMAKE_C_COMPILER)
set(ext ".c")
elseif(CMAKE_CXX_COMPILER)
set(ext ".cpp")
else()
enable_language(C)
set(ext ".c")
endif()
set(path_src_arch_detect "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeTmp/SDL_detect_arch${ext}")
file(WRITE "${path_src_arch_detect}" "${src_arch_detect}")
set(path_dir_arch_detect "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeTmp/SDL_detect_arch")
set(path_bin_arch_detect "${path_dir_arch_detect}/bin")
set(detected_archs)
set(msg "Detecting Target CPU Architecture")
message(STATUS "${msg}")
include(CMakePushCheckState)
set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
cmake_push_check_state(RESET)
try_compile(SDL_CPU_CHECK_ALL
"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeTmp/SDL_detect_arch"
SOURCES "${path_src_arch_detect}"
COPY_FILE "${path_bin_arch_detect}"
)
cmake_pop_check_state()
if(NOT SDL_CPU_CHECK_ALL)
message(STATUS "${msg} - <ERROR>")
message(WARNING "Failed to compile source detecting the target CPU architecture")
else()
set(re "INFO<([A-Z0-9]+)=([01])>")
file(STRINGS "${path_bin_arch_detect}" infos REGEX "${re}")
foreach(info_arch_01 IN LISTS infos)
string(REGEX MATCH "${re}" A "${info_arch_01}")
if(NOT "${CMAKE_MATCH_1}" IN_LIST known_archs)
message(WARNING "Unknown architecture: \"${CMAKE_MATCH_1}\"")
continue()
endif()
set(arch "${CMAKE_MATCH_1}")
set(arch_01 "${CMAKE_MATCH_2}")
set(detected_${arch} "${arch_01}")
endforeach()
foreach(known_arch IN LISTS known_archs)
if(detected_${known_arch})
list(APPEND detected_archs ${known_arch})
endif()
endforeach()
endif()
if(detected_archs)
foreach(known_arch IN LISTS known_archs)
set("SDL_CPU_${known_arch}" "${detected_${known_arch}}" CACHE BOOL "Detected architecture ${known_arch}")
endforeach()
message(STATUS "${msg} - ${detected_archs}")
else()
include(CheckCSourceCompiles)
cmake_push_check_state(RESET)
foreach(known_arch IN LISTS known_archs)
if(NOT detected_archs)
set(cache_variable "SDL_CPU_${known_arch}")
set(test_src "
int main(int argc, char *argv[]) {
#if ${arch_check_${known_arch}}
return 0;
#else
choke
#endif
}
")
check_c_source_compiles("${test_src}" "${cache_variable}")
if(${cache_variable})
set(SDL_CPU_${known_arch} "1" CACHE BOOL "Detected architecture ${known_arch}")
set(detected_archs ${known_arch})
else()
set(SDL_CPU_${known_arch} "0" CACHE BOOL "Detected architecture ${known_arch}")
endif()
endif()
endforeach()
cmake_pop_check_state()
endif()
set("${DETECTED_ARCHS}" "${detected_archs}" PARENT_SCOPE)
endfunction()
+68
View File
@@ -0,0 +1,68 @@
include(CMakeParseArguments)
include(GNUInstallDirs)
function(SDL_generate_manpages)
cmake_parse_arguments(ARG "" "RESULT_VARIABLE;NAME;BUILD_DOCDIR;HEADERS_DIR;SOURCE_DIR;SYMBOL;OPTION_FILE;WIKIHEADERS_PL_PATH;REVISION" "" ${ARGN})
set(wikiheaders_extra_args)
if(NOT ARG_NAME)
set(ARG_NAME "${PROJECT_NAME}")
endif()
if(NOT ARG_SOURCE_DIR)
set(ARG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
endif()
if(NOT ARG_OPTION_FILE)
set(ARG_OPTION_FILE "${PROJECT_SOURCE_DIR}/.wikiheaders-options")
endif()
if(NOT ARG_HEADERS_DIR)
message(FATAL_ERROR "Missing required HEADERS_DIR argument")
endif()
# FIXME: get rid of SYMBOL and let the perl script figure out the dependencies
if(NOT ARG_SYMBOL)
message(FATAL_ERROR "Missing required SYMBOL argument")
endif()
if(ARG_REVISION)
list(APPEND wikiheaders_extra_args "--rev=${ARG_REVISION}")
endif()
if(NOT ARG_BUILD_DOCDIR)
set(ARG_BUILD_DOCDIR "${CMAKE_CURRENT_BINARY_DIR}/docs")
endif()
set(BUILD_WIKIDIR "${ARG_BUILD_DOCDIR}/wiki")
set(BUILD_MANDIR "${ARG_BUILD_DOCDIR}/man")
find_package(Perl)
file(GLOB HEADER_FILES "${ARG_HEADERS_DIR}/*.h")
set(result FALSE)
if(PERL_FOUND AND EXISTS "${ARG_WIKIHEADERS_PL_PATH}")
add_custom_command(
OUTPUT "${BUILD_WIKIDIR}/${ARG_SYMBOL}.md"
COMMAND "${CMAKE_COMMAND}" -E make_directory "${BUILD_WIKIDIR}"
COMMAND "${PERL_EXECUTABLE}" "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_SOURCE_DIR}" "${BUILD_WIKIDIR}" "--options=${ARG_OPTION_FILE}" --copy-to-wiki ${wikiheaders_extra_args}
DEPENDS ${HEADER_FILES} "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_OPTION_FILE}"
COMMENT "Generating ${ARG_NAME} wiki markdown files"
)
add_custom_command(
OUTPUT "${BUILD_MANDIR}/man3/${ARG_SYMBOL}.3"
COMMAND "${PERL_EXECUTABLE}" "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_SOURCE_DIR}" "${BUILD_WIKIDIR}" "--options=${ARG_OPTION_FILE}" "--manpath=${BUILD_MANDIR}" --copy-to-manpages ${wikiheaders_extra_args}
DEPENDS "${BUILD_WIKIDIR}/${ARG_SYMBOL}.md" "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_OPTION_FILE}"
COMMENT "Generating ${ARG_NAME} man pages"
)
add_custom_target(${ARG_NAME}-docs ALL DEPENDS "${BUILD_MANDIR}/man3/${ARG_SYMBOL}.3")
install(DIRECTORY "${BUILD_MANDIR}/" DESTINATION "${CMAKE_INSTALL_MANDIR}")
set(result TRUE)
endif()
if(ARG_RESULT_VARIABLE)
set(${ARG_RESULT_VARIABLE} ${result} PARENT_SCOPE)
endif()
endfunction()
+44
View File
@@ -0,0 +1,44 @@
# This cmake build script is meant for verifying the various CMake configuration script.
cmake_minimum_required(VERSION 3.12...3.28)
project(sdl_test LANGUAGES C)
cmake_policy(SET CMP0074 NEW)
# Override CMAKE_FIND_ROOT_PATH_MODE to allow search for SDL3 outside of sysroot
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE NEVER)
include(FeatureSummary)
option(TEST_SHARED "Test linking to shared SDL3_net library" ON)
add_feature_info("TEST_SHARED" TEST_SHARED "Test linking with shared library")
option(TEST_STATIC "Test linking to static SDL3_net library" ON)
add_feature_info("TEST_STATIC" TEST_STATIC "Test linking with static library")
if(ANDROID)
macro(add_executable NAME)
set(args ${ARGN})
list(REMOVE_ITEM args WIN32)
add_library(${NAME} SHARED ${args})
unset(args)
endmacro()
endif()
if(TEST_SHARED)
find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3)
find_package(SDL3_net REQUIRED CONFIG)
add_executable(main_shared main.c)
target_link_libraries(main_shared PRIVATE SDL3_net::SDL3_net-shared SDL3::SDL3)
endif()
if(TEST_STATIC)
find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3)
# some static vendored libraries use c++ (enable CXX after `find_package` might show a warning)
enable_language(CXX)
find_package(SDL3_net REQUIRED CONFIG)
add_executable(main_static main.c)
target_link_libraries(main_static PRIVATE SDL3_net::SDL3_net-static SDL3::SDL3)
endif()
feature_summary(WHAT ALL)
+19
View File
@@ -0,0 +1,19 @@
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <SDL3_net/SDL_net.h>
int main(int argc, char *argv[])
{
if (!SDL_Init(0)) {
SDL_Log("SDL_Init(0) failed: %s", SDL_GetError());
return 1;
}
if (!NET_Init()) {
SDL_Log("NET_Init() failed: %s", SDL_GetError());
}
NET_Quit();
SDL_Quit();
return 0;
}
+121
View File
@@ -0,0 +1,121 @@
#include <SDL3/SDL_main.h>
#include <SDL3/SDL.h>
#include <SDL3_net/SDL_net.h>
int main(int argc, char **argv)
{
const char *interface = NULL;
Uint16 server_port = 2382;
int simulate_failure = 0;
for (int i = 1; i < argc; i++) {
const char *arg = argv[i];
if ((SDL_strcmp(arg, "--port") == 0) && (i < (argc-1))) {
server_port = (Uint16) SDL_atoi(argv[++i]);
} else if ((SDL_strcmp(arg, "--simulate-failure") == 0) && (i < (argc-1))) {
simulate_failure = (int) SDL_atoi(argv[++i]);
} else {
interface = arg;
}
}
if (!NET_Init()) {
SDL_Log("NET_Init failed: %s\n", SDL_GetError());
SDL_Quit();
return 1;
}
if (interface) {
SDL_Log("Attempting to listen on interface '%s', port %d", interface, (int) server_port);
} else {
SDL_Log("Attempting to listen on all interfaces, port %d", (int) server_port);
}
simulate_failure = SDL_clamp(simulate_failure, 0, 100);
if (simulate_failure) {
SDL_Log("Simulating failure at %d percent", simulate_failure);
}
NET_Address *server_addr = NULL;
if (interface) {
server_addr = NET_ResolveHostname(interface);
if (!server_addr || (NET_WaitUntilResolved(server_addr, -1) != NET_SUCCESS)) {
SDL_Log("Failed to resolve interface for '%s': %s", interface, SDL_GetError());
if (server_addr) {
NET_UnrefAddress(server_addr);
}
NET_Quit();
SDL_Quit();
return 1;
} else {
SDL_Log("Interface '%s' resolves to '%s' ...", interface, NET_GetAddressString(server_addr));
}
}
NET_Server *server = NET_CreateServer(server_addr, server_port);
if (!server) {
SDL_Log("Failed to create server: %s", SDL_GetError());
} else {
SDL_Log("Server is ready! Connect to port %d and send text!", (int) server_port);
int num_vsockets = 1;
void *vsockets[128];
SDL_zeroa(vsockets);
vsockets[0] = server;
while (NET_WaitUntilInputAvailable(vsockets, num_vsockets, -1) >= 0) {
NET_StreamSocket *streamsocket = NULL;
if (!NET_AcceptClient(server, &streamsocket)) {
SDL_Log("NET_AcceptClient failed: %s", SDL_GetError());
break;
} else if (streamsocket) { // new connection!
SDL_Log("New connection from %s!", NET_GetAddressString(NET_GetStreamSocketAddress(streamsocket)));
if (num_vsockets >= (int) (SDL_arraysize(vsockets) - 1)) {
SDL_Log(" (too many connections, though, so dropping immediately.)");
NET_DestroyStreamSocket(streamsocket);
} else {
if (simulate_failure) {
NET_SimulateStreamPacketLoss(streamsocket, simulate_failure);
}
vsockets[num_vsockets++] = streamsocket;
}
}
// see if anything has new stuff.
char buffer[1024];
for (int i = 1; i < num_vsockets; i++) {
bool kill_socket = false;
streamsocket = (NET_StreamSocket *) vsockets[i];
const int br = NET_ReadFromStreamSocket(streamsocket, buffer, sizeof (buffer));
if (br < 0) { // uhoh, socket failed!
kill_socket = true;
} else if (br > 0) {
const char *addrstr = NET_GetAddressString(NET_GetStreamSocketAddress(streamsocket));
SDL_Log("Got %d more bytes from '%s'", br, addrstr);
if (!NET_WriteToStreamSocket(streamsocket, buffer, br)) {
SDL_Log("Failed to echo data back to '%s': %s", addrstr, SDL_GetError());
kill_socket = true;
}
}
if (kill_socket) {
SDL_Log("Dropping connection to '%s'", NET_GetAddressString(NET_GetStreamSocketAddress(streamsocket)));
NET_DestroyStreamSocket(streamsocket);
vsockets[i] = NULL;
if (i < (num_vsockets - 1)) {
SDL_memmove(&vsockets[i], &vsockets[i+1], sizeof (vsockets[0]) * ((num_vsockets - i) - 1));
}
num_vsockets--;
i--;
}
}
}
SDL_Log("Destroying server...");
NET_DestroyServer(server);
}
SDL_Log("Shutting down...");
NET_Quit();
SDL_Quit();
return 0;
}
+43
View File
@@ -0,0 +1,43 @@
/*
* This is just for demonstration purposes! This doesn't
* do anything as complicated as, say, the `ifconfig` utility.
*
* All this to say: don't use this for anything serious!
*/
#include <stdio.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <SDL3_net/SDL_net.h>
int main(int argc, char **argv)
{
NET_Address **addrs = NULL;
int num_addrs = 0;
int i;
(void)argc;
(void)argv;
if (!NET_Init()) {
SDL_Log("NET_Init() failed: %s", SDL_GetError());
return 1;
}
addrs = NET_GetLocalAddresses(&num_addrs);
if (addrs == NULL) {
SDL_Log("Failed to determine local addresses: %s", SDL_GetError());
NET_Quit();
return 1;
}
SDL_Log("We saw %d local addresses:", num_addrs);
for (i = 0; i < num_addrs; i++) {
SDL_Log(" - %s", NET_GetAddressString(addrs[i]));
}
NET_FreeLocalAddresses(addrs);
NET_Quit();
return 0;
}
+42
View File
@@ -0,0 +1,42 @@
/*
* This is just for demonstration purposes! This doesn't
* do anything as complicated as, say, the `dig` utility.
*
* All this to say: don't use this for anything serious!
*/
#include <stdio.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <SDL3_net/SDL_net.h>
int main(int argc, char **argv)
{
if (!NET_Init()) {
SDL_Log("NET_Init() failed: %s", SDL_GetError());
return 1;
}
//NET_SimulateAddressResolutionLoss(3000, 30);
NET_Address **addrs = (NET_Address **) SDL_calloc(argc, sizeof (NET_Address *));
for (int i = 1; i < argc; i++) {
addrs[i] = NET_ResolveHostname(argv[i]);
}
for (int i = 1; i < argc; i++) {
NET_WaitUntilResolved(addrs[i], -1);
if (NET_GetAddressStatus(addrs[i]) == NET_FAILURE) {
SDL_Log("%s: [FAILED TO RESOLVE: %s]", argv[i], SDL_GetError());
} else {
SDL_Log("%s: %s", argv[i], NET_GetAddressString(addrs[i]));
}
NET_UnrefAddress(addrs[i]);
}
NET_Quit();
return 0;
}
+65
View File
@@ -0,0 +1,65 @@
/*
* This is just for demonstration purposes! A real HTTP solution would
* be WAY more complicated, support HTTPS, cookies, etc. Use curl or
* wget for real stuff, not this.
*
* All this to say: don't use this for anything serious!
*/
#include <stdio.h>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <SDL3_net/SDL_net.h>
int main(int argc, char **argv)
{
if (!NET_Init()) {
SDL_Log("NET_Init() failed: %s", SDL_GetError());
return 1;
}
for (int i = 1; i < argc; i++) {
SDL_Log("Looking up %s ...", argv[i]);
NET_Address *addr = NET_ResolveHostname(argv[i]);
if (NET_WaitUntilResolved(addr, -1) == NET_FAILURE) {
SDL_Log("Failed to lookup %s: %s", argv[i], SDL_GetError());
} else {
SDL_Log("%s is %s", argv[i], NET_GetAddressString(addr));
char *req = NULL;
SDL_asprintf(&req, "GET / HTTP/1.0\r\nHost: %s\r\n\r\n", argv[i]);
NET_StreamSocket *sock = req ? NET_CreateClient(addr, 80) : NULL;
if (!req) {
SDL_Log("Out of memory!");
} else if (!sock) {
SDL_Log("Failed to create stream socket to %s: %s\n", argv[i], SDL_GetError());
} else if (NET_WaitUntilConnected(sock, -1) == NET_FAILURE) {
SDL_Log("Failed to connect to %s: %s", argv[i], SDL_GetError());
} else if (!NET_WriteToStreamSocket(sock, req, (int) SDL_strlen(req))) {
SDL_Log("Failed to write to %s: %s", argv[i], SDL_GetError());
} else if (NET_WaitUntilStreamSocketDrained(sock, -1) < 0) {
SDL_Log("Failed to finish write to %s: %s", argv[i], SDL_GetError());
} else {
char buf[512];
int br;
while ((br = NET_ReadFromStreamSocket(sock, buf, sizeof (buf))) >= 0) {
fwrite(buf, 1, br, stdout);
}
printf("\n\n\n%s\n\n\n", SDL_GetError());
fflush(stdout);
}
if (sock) {
NET_DestroyStreamSocket(sock);
}
SDL_free(req);
}
}
NET_Quit();
return 0;
}
+405
View File
@@ -0,0 +1,405 @@
#include <SDL3/SDL_main.h>
#include <SDL3/SDL.h>
#include <SDL3_net/SDL_net.h>
/*
* This is just for demonstration purposes! A real VoIP solution would
* definitely compress audio with a speech codec of some sort, it would
* deal with packet loss better, it would have encryption, NAT punching,
* and it wouldn't just allow _anyone_ to talk to you without some sort
* of authorization step.
*
* All this to say: don't use this for anything serious!
*/
typedef struct Voice
{
SDL_AudioStream *stream;
NET_Address *addr;
Uint16 port;
Uint64 idnum;
Uint64 last_seen;
Uint64 last_packetnum;
struct Voice *prev;
struct Voice *next;
} Voice;
static NET_DatagramSocket *sock = NULL; /* you talk over this, client or server. */
static NET_Address *server_addr = NULL; /* address of the server you're talking to, NULL if you _are_ the server. */
static Uint16 server_port = 3025;
static int max_datagram = 0;
static Voice *voices = NULL;
static Uint64 next_idnum = 0;
static SDL_Window *window = NULL;
static SDL_Renderer *renderer = NULL;
static SDL_AudioDeviceID audio_device = 0;
static SDL_AudioDeviceID capture_device = 0;
static SDL_AudioStream *capture_stream = NULL;
static const SDL_AudioSpec audio_spec = { SDL_AUDIO_S16LE, 1, 8000 };
static Uint64 scratch_area[512];
static Voice *FindVoiceByAddr(const NET_Address *addr, const Uint16 port)
{
Voice *i;
for (i = voices; i != NULL; i = i->next) {
if ((i->port == port) && (NET_CompareAddresses(i->addr, addr) == 0)) {
return i;
}
}
return NULL;
}
static Voice *FindVoiceByIdNum(const Uint64 idnum)
{
Voice *i;
for (i = voices; i != NULL; i = i->next) {
if (i->idnum == idnum) {
return i;
}
}
return NULL;
}
static void ClearOldVoices(const Uint64 now)
{
Voice *i;
Voice *next;
for (i = voices; i != NULL; i = next) {
next = i->next;
if (!now || ((now - i->last_seen) > 60000)) { /* nothing new in 60+ seconds? (or shutting down?) */
if (!i->stream || (SDL_GetAudioStreamAvailable(i->stream) == 0)) { /* they'll get a reprieve if data is still playing out */
SDL_Log("Destroying voice #%" SDL_PRIu64, i->idnum);
SDL_DestroyAudioStream(i->stream);
NET_UnrefAddress(i->addr);
if (i->prev) {
i->prev->next = next;
} else {
voices = next;
}
if (next) {
next->prev = i->prev;
}
SDL_free(i);
}
}
}
}
static const int extra = (int) (sizeof (Uint64) * 2);
static void SendClientAudioToServer(void)
{
const int br = SDL_GetAudioStreamData(capture_stream, scratch_area + (extra / sizeof(Uint64)), max_datagram - extra);
if (br > 0) {
next_idnum++;
scratch_area[0] = SDL_Swap64LE(0); /* just being nice and leaving space in the buffer for the server to replace. */
scratch_area[1] = SDL_Swap64LE(next_idnum);
SDL_Log("CLIENT: Sending %d new bytes to server at %s:%d...", br + extra, NET_GetAddressString(server_addr), (int) server_port);
if (!NET_SendDatagram(sock, server_addr, server_port, scratch_area, br + extra)) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "NET_SendDatagram failed: %s", SDL_GetError());
}
}
}
static void mainloop(void)
{
const bool is_client = (server_addr != NULL) ? true : false;
bool done = false;
Uint64 last_send_ticks = 0;
if (is_client) {
SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255); /* red by default (green when recording) */
}
while (!done) {
bool activity = false;
const Uint64 now = SDL_GetTicks();
SDL_Event event;
NET_Datagram *dgram = NULL;
int rc;
while (((rc = NET_ReceiveDatagram(sock, &dgram)) == true) && (dgram != NULL)) {
SDL_Log("%s: got %d-byte datagram from %s:%d", is_client ? "CLIENT" : "SERVER", (int) dgram->buflen, NET_GetAddressString(dgram->addr), (int) dgram->port);
activity = true;
if (!is_client) { /* we're the server? */
Voice *voice = FindVoiceByAddr(dgram->addr, dgram->port);
Voice *i;
if (!voice) {
SDL_Log("SERVER: Creating voice idnum=%" SDL_PRIu64 " from %s:%d", next_idnum + 1, NET_GetAddressString(dgram->addr), (int) dgram->port);
voice = (Voice *) SDL_calloc(1, sizeof (Voice));
voice->addr = NET_RefAddress(dgram->addr);
voice->port = dgram->port;
voice->idnum = ++next_idnum;
if (voices) {
voice->next = voices;
voices->prev = voice;
}
voices = voice;
}
voice->last_seen = now;
/* send this new voice data to all recent speakers. */
if (dgram->buflen > extra) { /* ignore it if too small, might just be a keepalive packet. */
*((Uint64 *) dgram->buf) = SDL_Swap64LE(voice->idnum); /* the client leaves space to fill this in for convenience. */
for (i = voices; i != NULL; i = i->next) {
if ((voice->port != i->port) || (NET_CompareAddresses(voice->addr, i->addr) != 0)) { /* don't send client's own voice back to them. */
SDL_Log("SERVER: sending %d-byte datagram to %s:%d", (int) dgram->buflen, NET_GetAddressString(i->addr), (int) i->port);
NET_SendDatagram(sock, i->addr, i->port, dgram->buf, dgram->buflen);
}
}
}
} else { /* we're the client. */
if ((dgram->port != server_port) || (NET_CompareAddresses(dgram->addr, server_addr) != 0)) {
SDL_Log("CLIENT: Got packet from non-server address %s:%d. Ignoring.", NET_GetAddressString(dgram->addr), (int) dgram->port);
} else if (dgram->buflen < extra) {
SDL_Log("CLIENT: Got bogus packet from the server. Ignoring.");
} else {
const Uint64 idnum = SDL_Swap64LE(((const Uint64 *) dgram->buf)[0]);
const Uint64 packetnum = SDL_Swap64LE(((const Uint64 *) dgram->buf)[1]);
Voice *voice = FindVoiceByIdNum(idnum);
if (!voice) {
SDL_Log("CLIENT: Creating voice idnum=#%" SDL_PRIu64, idnum);
voice = (Voice *) SDL_calloc(1, sizeof (Voice));
if (audio_device) {
voice->stream = SDL_CreateAudioStream(&audio_spec, &audio_spec);
if (voice->stream) {
SDL_BindAudioStream(audio_device, voice->stream);
}
}
voice->idnum = idnum;
if (voices) {
voice->next = voices;
voices->prev = voice;
}
voices = voice;
}
voice->last_seen = now;
if (packetnum > voice->last_packetnum) { /* if packet arrived out of order, don't queue it for playing. */
voice->last_packetnum = packetnum;
SDL_PutAudioStreamData(voice->stream, dgram->buf + extra, dgram->buflen - extra);
SDL_FlushAudioStream(voice->stream); /* flush right away so we have all data if the stream dries up. We can still safely add more data later. */
}
}
}
NET_DestroyDatagram(dgram);
}
while (SDL_PollEvent(&event)) {
activity = true;
switch (event.type) {
case SDL_EVENT_QUIT:
done = 1;
break;
case SDL_EVENT_MOUSE_BUTTON_DOWN:
if (is_client && capture_stream && (event.button.button == SDL_BUTTON_LEFT)) {
if (SDL_BindAudioStream(capture_device, capture_stream)) {
SDL_SetRenderDrawColor(renderer, 0, 255, 0, 255); /* green when recording */
}
}
break;
case SDL_EVENT_MOUSE_BUTTON_UP:
if (is_client && capture_stream && (event.button.button == SDL_BUTTON_LEFT)) {
SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255); /* red when not recording */
SDL_UnbindAudioStream(capture_stream);
SDL_FlushAudioStream(capture_stream);
while (SDL_GetAudioStreamAvailable(capture_stream) > 0) {
SendClientAudioToServer();
last_send_ticks = now;
}
}
break;
}
}
if (is_client) {
if (capture_stream) {
while (SDL_GetAudioStreamAvailable(capture_stream) > max_datagram) {
SendClientAudioToServer();
last_send_ticks = now;
activity = true;
}
}
if (!last_send_ticks || ((now - last_send_ticks) > 5000)) { /* send a keepalive packet if we haven't transmitted for a bit. */
next_idnum++;
scratch_area[0] = SDL_Swap64LE(0);
scratch_area[1] = SDL_Swap64LE(next_idnum);
SDL_Log("CLIENT: Sending %d keepalive bytes to server at %s:%d...", extra, NET_GetAddressString(server_addr), (int) server_port);
NET_SendDatagram(sock, server_addr, server_port, scratch_area, extra);
last_send_ticks = now;
}
}
ClearOldVoices(now);
if (!activity) {
SDL_Delay(10);
}
SDL_RenderClear(renderer);
SDL_RenderPresent(renderer);
}
}
static void print_usage(const char *prog) {
SDL_Log("USAGE: %s <hostname|ip> [--help] [--server] [--port X] [--simulate-failure Y]", prog);
}
static void run_voipchat(int argc, char **argv)
{
const char *hostname = NULL;
bool is_server = false;
int simulate_failure = 0;
int i;
NET_Address *socket_address = NULL;
for (i = 1; i < argc; i++) {
const char *arg = argv[i];
if (SDL_strcmp(arg, "--help") == 0) {
print_usage(argv[0]);
return;
} else if (SDL_strcmp(arg, "--server") == 0) {
is_server = true;
} else if ((SDL_strcmp(arg, "--port") == 0) && (i < (argc-1))) {
server_port = (Uint16) SDL_atoi(argv[++i]);
} else if ((SDL_strcmp(arg, "--simulate-failure") == 0) && (i < (argc-1))) {
simulate_failure = (int) SDL_atoi(argv[++i]);
} else {
hostname = arg;
}
}
simulate_failure = SDL_clamp(simulate_failure, 0, 100);
if (simulate_failure) {
SDL_Log("Simulating failure at %d percent", simulate_failure);
}
if (!is_server && !hostname) {
print_usage(argv[0]);
return;
}
if (is_server) {
if (hostname) {
SDL_Log("SERVER: Resolving binding hostname '%s' ...", hostname);
socket_address = NET_ResolveHostname(hostname);
if (socket_address) {
if (NET_WaitUntilResolved(socket_address, -1) == NET_FAILURE) {
NET_UnrefAddress(socket_address);
socket_address = NULL;
}
}
} else {
int num_addresses;
NET_Address **addresses;
addresses = NET_GetLocalAddresses(&num_addresses);
if (addresses == NULL || num_addresses <= 0) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to to get local addresses: %s", SDL_GetError());
} else {
socket_address = addresses[0];
NET_RefAddress(socket_address);
}
}
if (socket_address) {
SDL_Log("SERVER: Listening on %s:%d.", NET_GetAddressString(socket_address), server_port);
} else {
SDL_Log("SERVER: Listening on port %d", server_port);
}
} else {
SDL_Log("CLIENT: Resolving server hostname '%s' ...", hostname);
server_addr = NET_ResolveHostname(hostname);
if (server_addr) {
if (NET_WaitUntilResolved(server_addr, -1) == NET_FAILURE) {
NET_UnrefAddress(server_addr);
server_addr = NULL;
}
}
if (!server_addr) {
SDL_Log("CLIENT: Failed! %s", SDL_GetError());
SDL_Log("CLIENT: Giving up.");
return;
}
SDL_Log("CLIENT: Server is at %s:%d.", NET_GetAddressString(server_addr), (int) server_port);
audio_device = SDL_OpenAudioDevice(SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK, &audio_spec);
if (!audio_device) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "CLIENT: Failed to open output audio device (%s), going on without sound playback!", SDL_GetError());
}
capture_device = SDL_OpenAudioDevice(SDL_AUDIO_DEVICE_DEFAULT_RECORDING, &audio_spec);
if (!capture_device) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "CLIENT: Failed to open capture audio device (%s), going on without sound recording!", SDL_GetError());
} else {
capture_stream = SDL_CreateAudioStream(&audio_spec, &audio_spec);
if (!capture_stream) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "CLIENT: Failed to create capture audio stream (%s), going on without sound recording!", SDL_GetError());
SDL_CloseAudioDevice(capture_device);
capture_device = 0;
}
}
}
/* server _must_ be on the requested port. Clients can take anything available, server will respond to where it sees it come from. */
sock = NET_CreateDatagramSocket(socket_address, is_server ? server_port : 0);
NET_UnrefAddress(socket_address);
if (!sock) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to create datagram socket: %s", SDL_GetError());
} else {
if (simulate_failure) {
NET_SimulateDatagramPacketLoss(sock, simulate_failure);
}
mainloop();
}
SDL_Log("Shutting down...");
ClearOldVoices(0);
SDL_DestroyAudioStream(capture_stream);
SDL_CloseAudioDevice(audio_device);
SDL_CloseAudioDevice(capture_device);
audio_device = capture_device = 0;
NET_UnrefAddress(server_addr);
server_addr = NULL;
NET_DestroyDatagramSocket(sock);
sock = NULL;
}
int main(int argc, char **argv)
{
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO)) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Init failed: %s", SDL_GetError());
return 1;
}
if (!NET_Init()) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "NET_Init failed: %s", SDL_GetError());
SDL_Quit();
return 1;
}
window = SDL_CreateWindow("SDL3_net voipchat example", 640, 480, 0);
renderer = SDL_CreateRenderer(window, NULL);
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
max_datagram = SDL_min(1200, (int) sizeof (scratch_area));
run_voipchat(argc, argv);
SDL_DestroyRenderer(renderer);
SDL_DestroyWindow(window);
NET_Quit();
SDL_Quit();
return 0;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+37
View File
@@ -0,0 +1,37 @@
SDL3_net_0.0.0 {
global:
NET_AcceptClient;
NET_CompareAddresses;
NET_CreateClient;
NET_CreateDatagramSocket;
NET_CreateServer;
NET_DestroyDatagram;
NET_DestroyDatagramSocket;
NET_DestroyServer;
NET_DestroyStreamSocket;
NET_FreeLocalAddresses;
NET_GetAddressStatus;
NET_GetAddressString;
NET_GetConnectionStatus;
NET_GetLocalAddresses;
NET_GetStreamSocketAddress;
NET_GetStreamSocketPendingWrites;
NET_Version;
NET_Init;
NET_Quit;
NET_ReadFromStreamSocket;
NET_ReceiveDatagram;
NET_RefAddress;
NET_ResolveHostname;
NET_SendDatagram;
NET_SimulateAddressResolutionLoss;
NET_SimulateDatagramPacketLoss;
NET_SimulateStreamPacketLoss;
NET_UnrefAddress;
NET_WaitUntilConnected;
NET_WaitUntilInputAvailable;
NET_WaitUntilResolved;
NET_WaitUntilStreamSocketDrained;
NET_WriteToStreamSocket;
local: *;
};
+38
View File
@@ -0,0 +1,38 @@
#include "winresrc.h"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,0,0,0
PRODUCTVERSION 3,0,0,0
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "SDL_net\0"
VALUE "FileVersion", "3, 0, 0, 0\0"
VALUE "InternalName", "SDL_net\0"
VALUE "LegalCopyright", "Copyright (C) 2025 Sam Lantinga\0"
VALUE "OriginalFilename", "SDL3_net.dll\0"
VALUE "ProductName", "Simple DirectMedia Layer\0"
VALUE "ProductVersion", "3, 0, 0, 0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
-92
View File
@@ -1,92 +0,0 @@
---
AccessModifierOffset: -4
AlignAfterOpenBracket: true
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Stroustrup
BreakBeforeInheritanceComma: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakStringLiterals: true
ColumnLimit: 100
CommentPragmas: ''
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
FixNamespaceComments: true
ForEachMacros: []
IndentCaseLabels: false
IncludeCategories:
- Regex: '^("|<)stdafx\.h(pp)?("|>)'
Priority: -1
- Regex: '^<(W|w)indows.h>'
Priority: 1
- Regex: '^<'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: '(_test|_win|_linux|_mac|_ios|_osx|_null)?$'
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PenaltyBreakAssignment: 0
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 9999999
PointerAlignment: Left
ReflowComments: true
SortIncludes: false
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 4
UseTab: Never
---
Language: Cpp
---
Language: ObjC
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: false
---
Language: Java
BasedOnStyle: Google
BreakAfterJavaFieldAnnotations: true
...
-5
View File
@@ -1,5 +0,0 @@
/build*/
/.vscode/
/thirdparty/
.vs/
.DS_Store
-12
View File
@@ -1,12 +0,0 @@
; DO NOT EDIT (unless you know what you are doing)
;
; This subdirectory is a git "subrepo", and this file is maintained by the
; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme
;
[subrepo]
remote = git@github.com:/discord/discord-rpc.git
branch = 963aa9f3e5ce81a4682c6ca3d136cddda614db33
commit = 963aa9f3e5ce81a4682c6ca3d136cddda614db33
parent = d28c28e9d34337b80c906572e2046a77ab3cb9dd
method = merge
cmdver = 0.4.6
-47
View File
@@ -1,47 +0,0 @@
language: cpp
env:
global:
- CLANG_FORMAT_SUFFIX="-dummy" # don't use formatting on Travis, this is
# needed not to use default 3.5 version
# which is too old.
matrix:
include:
- os: linux
env: MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
- os: linux
env: MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0"
addons:
apt:
sources:
- llvm-toolchain-trusty-4.0
packages:
- clang-4.0
- os: linux
env: MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"
addons:
apt:
sources:
- llvm-toolchain-trusty-5.0
packages:
- clang-5.0
- os: osx
osx_image: xcode9
# prevent Travis from overwriting our CXX variables
before_install:
- eval "${MATRIX_EVAL}"
- echo $CXX
script:
- mkdir build
- cd build
- cmake -DCLANG_FORMAT_SUFFIX=$CLANG_FORMAT_SUFFIX -DWARNINGS_AS_ERRORS=On --config Release ..
- cmake --build . -- -j2
-56
View File
@@ -1,56 +0,0 @@
cmake_minimum_required (VERSION 3.5.0)
project (DiscordRPC)
include(GNUInstallDirs)
option(BUILD_EXAMPLES "Build example apps" ON)
# format
file(GLOB_RECURSE ALL_SOURCE_FILES
examples/*.cpp examples/*.h examples/*.c
include/*.h
src/*.cpp src/*.h src/*.c
)
# Set CLANG_FORMAT_SUFFIX if you are using custom clang-format, e.g. clang-format-5.0
#find_program(CLANG_FORMAT_CMD clang-format${CLANG_FORMAT_SUFFIX})
set(CLANG_FORMAT_CMD OFF)
if (CLANG_FORMAT_CMD)
add_custom_target(
clangformat
COMMAND ${CLANG_FORMAT_CMD}
-i -style=file -fallback-style=none
${ALL_SOURCE_FILES}
DEPENDS
${ALL_SOURCE_FILES}
)
endif(CLANG_FORMAT_CMD)
# thirdparty stuff
execute_process(
COMMAND mkdir ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty
ERROR_QUIET
)
find_file(RAPIDJSONTEST NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
if (NOT RAPIDJSONTEST)
message("no rapidjson, download")
set(RJ_TAR_FILE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/v1.1.0.tar.gz)
file(DOWNLOAD https://github.com/miloyip/rapidjson/archive/v1.1.0.tar.gz ${RJ_TAR_FILE})
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar xzf ${RJ_TAR_FILE}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty
)
file(REMOVE ${RJ_TAR_FILE})
endif(NOT RAPIDJSONTEST)
find_file(RAPIDJSON NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
add_library(rapidjson STATIC IMPORTED ${RAPIDJSON})
# add subdirs
add_subdirectory(src)
if (BUILD_EXAMPLES)
add_subdirectory(examples/send-presence)
endif(BUILD_EXAMPLES)
-19
View File
@@ -1,19 +0,0 @@
Copyright 2017 Discord, Inc.
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.
-158
View File
@@ -1,158 +0,0 @@
# Discord RPC
## Deprecation Notice
This library has been deprecated in favor of Discord's GameSDK. [Learn more here](https://discordapp.com/developers/docs/game-sdk/sdk-starter-guide)
---
This is a library for interfacing your game with a locally running Discord desktop client. It's known to work on Windows, macOS, and Linux. You can use the lib directly if you like, or use it as a guide to writing your own if it doesn't suit your game as is. PRs/feedback welcome if you have an improvement everyone might want, or can describe how this doesn't meet your needs.
Included here are some quick demos that implement the very minimal subset to show current status, and
have callbacks for where a more complete game would do more things (joining, spectating, etc).
## Documentation
The most up to date documentation for Rich Presence can always be found on our [developer site](https://discordapp.com/developers/docs/rich-presence/how-to)! If you're interested in rolling your own native implementation of Rich Presence via IPC sockets instead of using our SDK—hey, you've got free time, right?—check out the ["Hard Mode" documentation](https://github.com/discordapp/discord-rpc/blob/master/documentation/hard-mode.md).
## Basic Usage
Zeroith, you should be set up to build things because you are a game developer, right?
First, head on over to the [Discord developers site](https://discordapp.com/developers/applications/me) and make yourself an app. Keep track of `Client ID` -- you'll need it here to pass to the init function.
### Unreal Engine 4 Setup
To use the Rich Presense plugin with Unreal Engine Projects:
1. Download the latest [release](https://github.com/discordapp/discord-rpc/releases) for each operating system you are targeting and the zipped source code
2. In the source code zip, copy the UE plugin—`examples/unrealstatus/Plugins/discordrpc`—to your project's plugin directory
3. At `[YOUR_UE_PROJECT]/Plugins/discordrpc/source/ThirdParty/DiscordRpcLibrary/`, create an `Include` folder and copy `discord_rpc.h` and `discord_register.h` to it from the zip
4. Follow the steps below for each OS
5. Build your UE4 project
6. Launch the editor, and enable the Discord plugin.
#### Windows
- At `[YOUR_UE_PROJECT]/Plugins/discordrpc/source/ThirdParty/DiscordRpcLibrary/`, create a `Win64` folder
- Copy `lib/discord-rpc.lib` and `bin/discord-rpc.dll` from `[RELEASE_ZIP]/win64-dynamic` to the `Win64` folder
#### Mac
- At `[YOUR_UE_PROJECT]/Plugins/discordrpc/source/ThirdParty/DiscordRpcLibrary/`, create a `Mac` folder
- Copy `libdiscord-rpc.dylib` from `[RELEASE_ZIP]/osx-dynamic/lib` to the `Mac` folder
#### Linux
- At `[YOUR_UE_PROJECT]/Plugins/discordrpc/source/ThirdParty/DiscordRpcLibrary/`, create a `Linux` folder
- Inside, create another folder `x86_64-unknown-linux-gnu`
- Copy `libdiscord-rpc.so` from `[RELEASE_ZIP]/linux-dynamic/lib` to `Linux/x86_64-unknown-linux-gnu`
### Unity Setup
If you're a Unity developer looking to integrate Rich Presence into your game, follow this simple guide to get started towards success:
1. Download the DLLs for any platform that you need from [our releases](https://github.com/discordapp/discord-rpc/releases)
2. In your Unity project, create a `Plugins` folder inside your `Assets` folder if you don't already have one
3. Copy the file `DiscordRpc.cs` from [here](https://github.com/discordapp/discord-rpc/blob/master/examples/button-clicker/Assets/DiscordRpc.cs) into your `Assets` folder. This is basically your header file for the SDK
We've got our `Plugins` folder ready, so let's get platform-specific!
#### Windows
4. Create `x86` and `x86_64` folders inside `Assets/Plugins/`
5. Copy `discord-rpc-win/win64-dynamic/bin/discord-rpc.dll` to `Assets/Plugins/x86_64/`
6. Copy `discord-rpc-win/win32-dynamic/bin/discord-rpc.dll` to `Assets/Plugins/x86/`
7. Click on both DLLs and make sure they are targetting the correct architectures in the Unity editor properties pane
8. Done!
#### MacOS
4. Copy `discord-rpc-osx/osx-dynamic/lib/libdiscord-rpc.dylib` to `Assets/Plugins/`
5. Rename `libdiscord-rpc.dylib` to `discord-rpc.bundle`
6. Done!
#### Linux
4. Copy `discord-rpc-linux/linux-dynamic-lib/libdiscord-rpc.so` to `Assets/Plugins/`
5. Done!
You're ready to roll! For code examples on how to interact with the SDK using the `DiscordRpc.cs` header file, check out [our example](https://github.com/discordapp/discord-rpc/blob/master/examples/button-clicker/Assets/DiscordController.cs)
### From package
Download a release package for your platform(s) -- they have subdirs with various prebuilt options, select the one you need add `/include` to your compile includes, `/lib` to your linker paths, and link with `discord-rpc`. For the dynamically linked builds, you'll need to ship the associated file along with your game.
### From repo
First-eth, you'll want `CMake`. There's a few different ways to install it on your system, and you should refer to [their website](https://cmake.org/install/). Many package managers provide ways of installing CMake as well.
To make sure it's installed correctly, type `cmake --version` into your flavor of terminal/cmd. If you get a response with a version number, you're good to go!
There's a [CMake](https://cmake.org/download/) file that should be able to generate the lib for you; Sometimes I use it like this:
```sh
cd <path to discord-rpc>
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=<path to install discord-rpc to>
cmake --build . --config Release --target install
```
There is a wrapper build script `build.py` that runs `cmake` with a few different options.
Usually, I run `build.py` to get things started, then use the generated project files as I work on things. It does depend on `click` library, so do a quick `pip install click` to make sure you have it if you want to run `build.py`.
There are some CMake options you might care about:
| flag | default | does |
| ---------------------------------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ENABLE_IO_THREAD` | `ON` | When enabled, we start up a thread to do io processing, if disabled you should call `Discord_UpdateConnection` yourself. |
| `USE_STATIC_CRT` | `OFF` | (Windows) Enable to statically link the CRT, avoiding requiring users install the redistributable package. (The prebuilt binaries enable this option) |
| [`BUILD_SHARED_LIBS`](https://cmake.org/cmake/help/v3.7/variable/BUILD_SHARED_LIBS.html) | `OFF` | Build library as a DLL |
| `WARNINGS_AS_ERRORS` | `OFF` | When enabled, compiles with `-Werror` (on \*nix platforms). |
## Continuous Builds
Why do we have three of these? Three times the fun!
| CI | badge |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| TravisCI | [![Build status](https://travis-ci.org/discordapp/discord-rpc.svg?branch=master)](https://travis-ci.org/discordapp/discord-rpc) |
| AppVeyor | [![Build status](https://ci.appveyor.com/api/projects/status/qvkoc0w1c4f4b8tj?svg=true)](https://ci.appveyor.com/project/crmarsh/discord-rpc) |
| Buildkite (internal) | [![Build status](https://badge.buildkite.com/e103d79d247f6776605a15246352a04b8fd83d69211b836111.svg)](https://buildkite.com/discord/discord-rpc) |
## Sample: send-presence
This is a text adventure "game" that inits/deinits the connection to Discord, and sends a presence update on each command.
## Sample: button-clicker
This is a sample [Unity](https://unity3d.com/) project that wraps a DLL version of the library, and sends presence updates when you click on a button. Run `python build.py unity` in the root directory to build the correct library files and place them in their respective folders.
## Sample: unrealstatus
This is a sample [Unreal](https://www.unrealengine.com) project that wraps the DLL version of the library with an Unreal plugin, exposes a blueprint class for interacting with it, and uses that to make a very simple UI. Run `python build.py unreal` in the root directory to build the correct library files and place them in their respective folders.
## Wrappers and Implementations
Below is a table of unofficial, community-developed wrappers for and implementations of Rich Presence in various languages. If you would like to have yours added, please make a pull request adding your repository to the table. The repository should include:
- The code
- A brief ReadMe of how to use it
- A working example
###### Rich Presence Wrappers and Implementations
| Name | Language |
| ------------------------------------------------------------------------- | --------------------------------- |
| [Discord RPC C#](https://github.com/Lachee/discord-rpc-csharp) | C# |
| [Discord RPC D](https://github.com/voidblaster/discord-rpc-d) | [D](https://dlang.org/) |
| [discord-rpc.jar](https://github.com/Vatuu/discord-rpc 'Discord-RPC.jar') | Java |
| [java-discord-rpc](https://github.com/MinnDevelopment/java-discord-rpc) | Java |
| [Discord-IPC](https://github.com/jagrosh/DiscordIPC) | Java |
| [Discord Rich Presence](https://npmjs.org/discord-rich-presence) | JavaScript |
| [drpc4k](https://github.com/Bluexin/drpc4k) | [Kotlin](https://kotlinlang.org/) |
| [lua-discordRPC](https://github.com/pfirsich/lua-discordRPC) | LuaJIT (FFI) |
| [pypresence](https://github.com/qwertyquerty/pypresence) | [Python](https://python.org/) |
| [SwordRPC](https://github.com/Azoy/SwordRPC) | [Swift](https://swift.org) |
-17
View File
@@ -1,17 +0,0 @@
version: '{build}'
install:
- python -m pip install click
build_script:
- mkdir examples\unrealstatus\Plugins\discordrpc\Binaries\ThirdParty\discordrpcLibrary\Win64
- python build.py
artifacts:
- path: builds\install\win32-dynamic
name: win32-dynamic
- path: builds\install\win32-static
name: win32-static
- path: builds\install\win64-dynamic
name: win64-dynamic
- path: builds\install\win64-static
name: win64-static
-304
View File
@@ -1,304 +0,0 @@
#!/usr/bin/env python
import os
import subprocess
import sys
import shutil
import zipfile
from contextlib import contextmanager
import click
def get_platform():
""" a name for the platform """
if sys.platform.startswith('win'):
return 'win'
elif sys.platform == 'darwin':
return 'osx'
elif sys.platform.startswith('linux'):
return 'linux'
raise Exception('Unsupported platform ' + sys.platform)
SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__))
# we use Buildkite which sets this env variable by default
IS_BUILD_MACHINE = os.environ.get('CI', '') == 'true'
PLATFORM = get_platform()
INSTALL_ROOT = os.path.join(SCRIPT_PATH, 'builds', 'install')
def get_signtool():
""" get path to code signing tool """
if PLATFORM == 'win':
sdk_dir = 'c:\\Program Files (x86)\\Windows Kits\\10' # os.environ['WindowsSdkDir']
return os.path.join(sdk_dir, 'bin', 'x86', 'signtool.exe')
elif PLATFORM == 'osx':
return '/usr/bin/codesign'
@contextmanager
def cd(new_dir):
""" Temporarily change current directory """
if new_dir:
old_dir = os.getcwd()
os.chdir(new_dir)
yield
if new_dir:
os.chdir(old_dir)
def mkdir_p(path):
""" mkdir -p """
if not os.path.isdir(path):
click.secho('Making ' + path, fg='yellow')
os.makedirs(path)
@click.group(invoke_without_command=True)
@click.pass_context
@click.option('--clean', is_flag=True)
def cli(ctx, clean):
""" click wrapper for command line stuff """
if ctx.invoked_subcommand is None:
ctx.invoke(libs, clean=clean)
if IS_BUILD_MACHINE:
ctx.invoke(sign)
ctx.invoke(archive)
@cli.command()
@click.pass_context
def unity(ctx):
""" build just dynamic libs for use in unity project """
ctx.invoke(libs, clean=False, static=False, shared=True, skip_formatter=True, just_release=True)
BUILDS = []
click.echo('--- Copying libs and header into unity example')
UNITY_PROJECT_PATH = os.path.join(SCRIPT_PATH, 'examples', 'button-clicker', 'Assets', 'Plugins')
if sys.platform.startswith('win'):
LIBRARY_NAME = 'discord-rpc.dll'
BUILD_64_BASE_PATH = os.path.join(SCRIPT_PATH, 'builds', 'win64-dynamic', 'src', 'Release')
UNITY_64_DLL_PATH = os.path.join(UNITY_PROJECT_PATH, 'x86_64')
BUILDS.append({BUILD_64_BASE_PATH: UNITY_64_DLL_PATH})
BUILD_32_BASE_PATH = os.path.join(SCRIPT_PATH, 'builds', 'win32-dynamic', 'src', 'Release')
UNITY_32_DLL_PATH = os.path.join(UNITY_PROJECT_PATH, 'x86')
BUILDS.append({BUILD_32_BASE_PATH: UNITY_32_DLL_PATH})
elif sys.platform == 'darwin':
LIBRARY_NAME = 'discord-rpc.bundle'
BUILD_BASE_PATH = os.path.join(SCRIPT_PATH, 'builds', 'osx-dynamic', 'src')
UNITY_DLL_PATH = UNITY_PROJECT_PATH
os.rename(
os.path.join(BUILD_BASE_PATH, 'libdiscord-rpc.dylib'), os.path.join(BUILD_BASE_PATH, 'discord-rpc.bundle'))
BUILDS.append({BUILD_BASE_PATH: UNITY_DLL_PATH})
elif sys.platform.startswith('linux'):
LIBRARY_NAME = 'discord-rpc.so'
BUILD_BASE_PATH = os.path.join(SCRIPT_PATH, 'builds', 'linux-dynamic', 'src')
UNITY_DLL_PATH = os.path.join(UNITY_PROJECT_PATH, 'x86')
os.rename(os.path.join(BUILD_BASE_PATH, 'libdiscord-rpc.so'), os.path.join(BUILD_BASE_PATH, 'discord-rpc.so'))
BUILDS.append({BUILD_BASE_PATH: UNITY_DLL_PATH})
else:
raise Exception('Unsupported platform ' + sys.platform)
for build in BUILDS:
for i in build:
mkdir_p(build[i])
shutil.copy(os.path.join(i, LIBRARY_NAME), build[i])
@cli.command()
@click.pass_context
def unreal(ctx):
""" build libs and copy them into the unreal project """
ctx.invoke(libs, clean=False, static=False, shared=True, skip_formatter=True, just_release=True)
BUILDS = []
click.echo('--- Copying libs and header into unreal example')
UNREAL_PROJECT_PATH = os.path.join(SCRIPT_PATH, 'examples', 'unrealstatus', 'Plugins', 'discordrpc')
UNREAL_INCLUDE_PATH = os.path.join(UNREAL_PROJECT_PATH, 'Source', 'ThirdParty', 'DiscordRpcLibrary', 'Include')
mkdir_p(UNREAL_INCLUDE_PATH)
shutil.copy(os.path.join(SCRIPT_PATH, 'include', 'discord_rpc.h'), UNREAL_INCLUDE_PATH)
if sys.platform.startswith('win'):
LIBRARY_NAME = 'discord-rpc.lib'
BUILD_64_BASE_PATH = os.path.join(SCRIPT_PATH, 'builds', 'win64-dynamic', 'src', 'Release')
UNREAL_64_DLL_PATH = os.path.join(UNREAL_PROJECT_PATH, 'Source', 'ThirdParty', 'DiscordRpcLibrary', 'Win64')
BUILDS.append({BUILD_64_BASE_PATH: UNREAL_64_DLL_PATH})
BUILD_32_BASE_PATH = os.path.join(SCRIPT_PATH, 'builds', 'win32-dynamic', 'src', 'Release')
UNREAL_32_DLL_PATH = os.path.join(UNREAL_PROJECT_PATH, 'Source', 'ThirdParty', 'DiscordRpcLibrary', 'Win32')
BUILDS.append({BUILD_32_BASE_PATH: UNREAL_32_DLL_PATH})
elif sys.platform == 'darwin':
LIBRARY_NAME = 'libdiscord-rpc.dylib'
BUILD_BASE_PATH = os.path.join(SCRIPT_PATH, 'builds', 'osx-dynamic', 'src')
UNREAL_DLL_PATH = os.path.join(UNREAL_PROJECT_PATH, 'Source', 'ThirdParty', 'DiscordRpcLibrary', 'Mac')
BUILDS.append({BUILD_BASE_PATH: UNREAL_DLL_PATH})
elif sys.platform.startswith('linux'):
LIBRARY_NAME = 'libdiscord-rpc.so'
BUILD_BASE_PATH = os.path.join(SCRIPT_PATH, 'builds', 'linux-dynamic', 'src')
UNREAL_DLL_PATH = os.path.join(UNREAL_PROJECT_PATH, 'Source', 'ThirdParty', 'DiscordRpcLibrary', 'Linux')
BUILDS.append({BUILD_BASE_PATH: UNREAL_DLL_PATH})
else:
raise Exception('Unsupported platform ' + sys.platform)
for build in BUILDS:
for i in build:
mkdir_p(build[i])
shutil.copy(os.path.join(i, LIBRARY_NAME), build[i])
def build_lib(build_name, generator, options, just_release):
""" Create a dir under builds, run build and install in it """
build_path = os.path.join(SCRIPT_PATH, 'builds', build_name)
install_path = os.path.join(INSTALL_ROOT, build_name)
mkdir_p(build_path)
mkdir_p(install_path)
with cd(build_path):
initial_cmake = ['cmake', SCRIPT_PATH, '-DCMAKE_INSTALL_PREFIX=%s' % os.path.join('..', 'install', build_name)]
if generator:
initial_cmake.extend(['-G', generator])
for key in options:
val = options[key]
if type(val) is bool:
val = 'ON' if val else 'OFF'
initial_cmake.append('-D%s=%s' % (key, val))
click.echo('--- Building ' + build_name)
subprocess.check_call(initial_cmake)
if not just_release:
subprocess.check_call(['cmake', '--build', '.', '--config', 'Debug'])
subprocess.check_call(['cmake', '--build', '.', '--config', 'Release', '--target', 'install'])
@cli.command()
def archive():
""" create zip of install dir """
click.echo('--- Archiving')
archive_file_path = os.path.join(SCRIPT_PATH, 'builds', 'discord-rpc-%s.zip' % get_platform())
archive_file = zipfile.ZipFile(archive_file_path, 'w', zipfile.ZIP_DEFLATED)
archive_src_base_path = INSTALL_ROOT
archive_dst_base_path = 'discord-rpc'
with cd(archive_src_base_path):
for path, _, filenames in os.walk('.'):
for fname in filenames:
fpath = os.path.join(path, fname)
dst_path = os.path.normpath(os.path.join(archive_dst_base_path, fpath))
click.echo('Adding ' + dst_path)
archive_file.write(fpath, dst_path)
@cli.command()
def sign():
""" Do code signing within install directory using our cert """
tool = get_signtool()
signable_extensions = set()
if PLATFORM == 'win':
signable_extensions.add('.dll')
sign_command_base = [
tool,
'sign',
'/n',
'Discord Inc.',
'/a',
'/tr',
'http://timestamp.digicert.com/rfc3161',
'/as',
'/td',
'sha256',
'/fd',
'sha256',
]
elif PLATFORM == 'osx':
signable_extensions.add('.dylib')
sign_command_base = [
tool,
'--keychain',
os.path.expanduser('~/Library/Keychains/login.keychain'),
'-vvvv',
'--deep',
'--force',
'--sign',
'Developer ID Application: Hammer & Chisel Inc. (53Q6R32WPB)',
]
else:
click.secho('Not signing things on this platform yet', fg='red')
return
click.echo('--- Signing')
for path, _, filenames in os.walk(INSTALL_ROOT):
for fname in filenames:
ext = os.path.splitext(fname)[1]
if ext not in signable_extensions:
continue
fpath = os.path.join(path, fname)
click.echo('Sign ' + fpath)
sign_command = sign_command_base + [fpath]
subprocess.check_call(sign_command)
@cli.command()
@click.option('--clean', is_flag=True)
@click.option('--static', is_flag=True)
@click.option('--shared', is_flag=True)
@click.option('--skip_formatter', is_flag=True)
@click.option('--just_release', is_flag=True)
def libs(clean, static, shared, skip_formatter, just_release):
""" Do all the builds for this platform """
if clean:
shutil.rmtree('builds', ignore_errors=True)
mkdir_p('builds')
if not (static or shared):
static = True
shared = True
static_options = {}
dynamic_options = {
'BUILD_SHARED_LIBS': True,
'USE_STATIC_CRT': True,
}
if skip_formatter or IS_BUILD_MACHINE:
static_options['CLANG_FORMAT_SUFFIX'] = 'none'
dynamic_options['CLANG_FORMAT_SUFFIX'] = 'none'
if IS_BUILD_MACHINE:
just_release = True
static_options['WARNINGS_AS_ERRORS'] = True
dynamic_options['WARNINGS_AS_ERRORS'] = True
if PLATFORM == 'win':
generator32 = 'Visual Studio 14 2015'
generator64 = 'Visual Studio 14 2015 Win64'
if static:
build_lib('win32-static', generator32, static_options, just_release)
build_lib('win64-static', generator64, static_options, just_release)
if shared:
build_lib('win32-dynamic', generator32, dynamic_options, just_release)
build_lib('win64-dynamic', generator64, dynamic_options, just_release)
elif PLATFORM == 'osx':
if static:
build_lib('osx-static', None, static_options, just_release)
if shared:
build_lib('osx-dynamic', None, dynamic_options, just_release)
elif PLATFORM == 'linux':
if static:
build_lib('linux-static', None, static_options, just_release)
if shared:
build_lib('linux-dynamic', None, dynamic_options, just_release)
if __name__ == '__main__':
os.chdir(SCRIPT_PATH)
sys.exit(cli())
-164
View File
@@ -1,164 +0,0 @@
# Hard Mode: Roll Your Own Client
Discord's Rich Presence feature is designed as an obfuscated addition to our existing [RPC infrastructure](https://discordapp.com/developers/docs/topics/rpc). The standalone library and header files make it easy for any dev to drop it into their game.
Our library communicates with Discord over the local Discord RPC socket. We've already done the work in connecting properly, handling disconnects and reconnects, and other RPC intracacies, but those who have done this implementation for our private alpha Voice and Chat SDK can simply make use of the new RPC commands and events to implement Rich Presence.
## Hark! A warning!
By committing to an RPC-only integration, you decide to forego the work our library and header file have done for you in the way of error handling, state storage, disconnecting and reconnecting, and other quality of life abstractions. While simply implementing the new RPC command and events will enable Rich Presence for your game, we highly suggest that you do your best to mimic the functionality of the SDK the most that you can. It ensure not only code quality on your part, but also an excellent experience on the part of your players.
## Application Protocol Registration
One thing that cannot be explicitly done over RPC is registering an application protocol for your game. If you choose to do an RPC-only implementation, you will have to register your application protocol yourself in the format of `discord-[your_app_id]://`. You can use `Discord_Register()` as a good(?) example of how to properly register an application protocol for use with Discord. For OSX and Linux it is probably simpler to handle the protocol registration as part of your install/packaging.
## New RPC Command
The new RPC command for Rich Presence is `SET_ACTIVITY`. The fields are similar to what is outlined in the SDK; we've combined similar fields into objects for the sake of less data on the wire.
The one major difference is the `party.size` field. It is an array with a size of two. The first element is the current party size, `partySize` from the main documentation. The second element is the maximum party size, `partyMax` from the main documentation.
Below is a full example of a `SET_ACTIVITY` command. Field restrictions like size are the same as outlined in the main documentation.
```
{
"cmd": "SET_ACTIVITY",
"args": {
"pid": 9999, // Your application's process id - required field
"activity": {
"state": "In a Group",
"details": "Competitive | In a Match",
"timestamps": {
"start": time(nullptr),
"end": time(nullptr) + ((60 * 5) + 23)
},
"assets": {
"large_image": "numbani_map",
"large_text": "Numbani",
"small_image": "pharah_profile",
"small_text": "Pharah"
},
"party": {
"id": GameEngine.GetPartyId(),
"size": [3, 6]
},
"secrets": {
"join": "025ed05c71f639de8bfaa0d679d7c94b2fdce12f",
"spectate": "e7eb30d2ee025ed05c71ea495f770b76454ee4e0",
"match": "4b2fdce12f639de8bfa7e3591b71a0d679d7c93f"
},
"instance": true
}
},
"nonce": "647d814a-4cf8-4fbb-948f-898abd24f55b"
}
```
## New RPC Events
The three new RPC events for Rich Presence power the ability to join and spectate your friends' games.
First is the `ACTIVITY_JOIN` event:
```json
{
"cmd": "DISPATCH",
"data": {
"secret": "025ed05c71f639de8bfaa0d679d7c94b2fdce12f"
},
"evt": "ACTIVITY_JOIN"
}
```
Second is the `ACTIVITY_SPECTATE` event:
```json
{
"cmd": "DISPATCH",
"data": {
"secret": "e7eb30d2ee025ed05c71ea495f770b76454ee4e0"
},
"evt": "ACTIVITY_SPECTATE"
}
```
And third is the `ACTIVITY_JOIN_REQUEST` event:
```json
{
"cmd": "DISPATCH",
"data": {
"user": {
"id": "53908232506183680",
"username": "Mason",
"discriminator": "1337",
"avatar": "a_bab14f271d565501444b2ca3be944b25"
}
},
"evt": "ACTIVITY_JOIN_REQUEST"
}
```
In order to receive these events, you need to [subscribe](https://discordapp.com/developers/docs/topics/rpc#subscribe) to them like so:
```json
{
"nonce": "be9a6de3-31d0-4767-a8e9-4818c5690015",
"evt": "ACTIVITY_JOIN",
"cmd": "SUBSCRIBE"
}
```
```json
{
"nonce": "ae9qdde3-31d0-8989-a8e9-dnakwy174he",
"evt": "ACTIVITY_SPECTATE",
"cmd": "SUBSCRIBE"
}
```
```json
{
"nonce": "5dc0c062-98c6-47a0-8922-bbb52e9d6afa",
"evt": "ACTIVITY_JOIN_REQUEST",
"cmd": "SUBSCRIBE"
}
```
To unsubscribe from these events, resend with the command `UNSUBSCRIBE`
## Responding
A discord user will request access to the game. If the ACTIVITY_JOIN_REQUEST has been subscribed too, the ACTIVITY_JOIN_REQUEST event will be sent to the host's game. Accept it with following model:
```json
{
"nonce": "5dc0c062-98c6-47a0-8922-15aerg126",
"cmd": "SEND_ACTIVITY_JOIN_INVITE",
"args":
{
"user_id": "53908232506183680"
}
}
```
To reject the request, use `CLOSE_ACTIVITY_REQUEST`:
```json
{
"nonce": "5dc0c062-98c6-47a0-8922-dasg256eafg",
"cmd": "CLOSE_ACTIVITY_REQUEST",
"args":
{
"user_id": "53908232506183680"
}
}
```
## Notes
Here are just some quick notes to help with some common troubleshooting problems.
* IPC will echo back every command you send as a response. Use this as a lock-step feature to avoid flooding messages. Can be used to validate messages such as the Presence or Subscribes.
* The pipe expects for frames to be written in a single byte array. You cannot do multiple `stream.Write(opcode);` `stream.Write(length);` as it will break the pipe. Instead create a buffer, write the data to the buffer, then send the entire buffer to the stream.
* Discord can be on any pipe ranging from `discord-ipc-0` to `discord-ipc-9`. It is a good idea to try and connect to each one and keeping the first one you connect too. For multiple clients (eg Discord and Canary), you might want to add a feature to manually select the pipe so you can more easily debug the application.
* All enums are `lower_snake_case`.
* The opcode and length in the header are `Little Endian Unsigned Integers (32bits)`. In some languages, you must convert them as they can be architecture specific.
* [Discord Rich Presence How-To](https://discordapp.com/developers/docs/rich-presence/how-to) contains a lot of the information this document doesn't. For example, it will tell you about the response payload.
* In the documentation, DISCORD_REPLY_IGNORE is just implemented the same as DISCORD_REPLY_NO.
* You can test the Join / Spectate feature by enabling them in your profile and whitelisting a test account. Use Canary to run 2 accounts on the same machine.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

@@ -1,8 +0,0 @@
/Library/
/Temp/
/obj/
/Assets/Plugins/
/Assets/Plugins.meta
*.sln
*.csproj
*.userprefs
@@ -1,125 +0,0 @@
using UnityEngine;
[System.Serializable]
public class DiscordJoinEvent : UnityEngine.Events.UnityEvent<string> { }
[System.Serializable]
public class DiscordSpectateEvent : UnityEngine.Events.UnityEvent<string> { }
[System.Serializable]
public class DiscordJoinRequestEvent : UnityEngine.Events.UnityEvent<DiscordRpc.DiscordUser> { }
public class DiscordController : MonoBehaviour
{
public DiscordRpc.RichPresence presence = new DiscordRpc.RichPresence();
public string applicationId;
public string optionalSteamId;
public int clickCounter;
public DiscordRpc.DiscordUser joinRequest;
public UnityEngine.Events.UnityEvent onConnect;
public UnityEngine.Events.UnityEvent onDisconnect;
public UnityEngine.Events.UnityEvent hasResponded;
public DiscordJoinEvent onJoin;
public DiscordJoinEvent onSpectate;
public DiscordJoinRequestEvent onJoinRequest;
DiscordRpc.EventHandlers handlers;
public void OnClick()
{
Debug.Log("Discord: on click!");
clickCounter++;
presence.details = string.Format("Button clicked {0} times", clickCounter);
presence.joinSecret = "aSecret";
presence.partyId = "aPartyId";
presence.partySize = 1;
presence.partyMax = 3;
presence.partyPrivacy = DiscordRpc.PartyPrivacy.Public;
DiscordRpc.UpdatePresence(presence);
}
public void RequestRespondYes()
{
Debug.Log("Discord: responding yes to Ask to Join request");
DiscordRpc.Respond(joinRequest.userId, DiscordRpc.Reply.Yes);
hasResponded.Invoke();
}
public void RequestRespondNo()
{
Debug.Log("Discord: responding no to Ask to Join request");
DiscordRpc.Respond(joinRequest.userId, DiscordRpc.Reply.No);
hasResponded.Invoke();
}
public void ReadyCallback(ref DiscordRpc.DiscordUser connectedUser)
{
Debug.Log(string.Format("Discord: connected to {0}#{1}: {2}", connectedUser.username, connectedUser.discriminator, connectedUser.userId));
onConnect.Invoke();
}
public void DisconnectedCallback(int errorCode, string message)
{
Debug.Log(string.Format("Discord: disconnect {0}: {1}", errorCode, message));
onDisconnect.Invoke();
}
public void ErrorCallback(int errorCode, string message)
{
Debug.Log(string.Format("Discord: error {0}: {1}", errorCode, message));
}
public void JoinCallback(string secret)
{
Debug.Log(string.Format("Discord: join ({0})", secret));
onJoin.Invoke(secret);
}
public void SpectateCallback(string secret)
{
Debug.Log(string.Format("Discord: spectate ({0})", secret));
onSpectate.Invoke(secret);
}
public void RequestCallback(ref DiscordRpc.DiscordUser request)
{
Debug.Log(string.Format("Discord: join request {0}#{1}: {2}", request.username, request.discriminator, request.userId));
joinRequest = request;
onJoinRequest.Invoke(request);
}
void Start()
{
}
void Update()
{
DiscordRpc.RunCallbacks();
}
void OnEnable()
{
Debug.Log("Discord: init");
handlers = new DiscordRpc.EventHandlers();
handlers.readyCallback += ReadyCallback;
handlers.disconnectedCallback += DisconnectedCallback;
handlers.errorCallback += ErrorCallback;
handlers.joinCallback += JoinCallback;
handlers.spectateCallback += SpectateCallback;
handlers.requestCallback += RequestCallback;
DiscordRpc.Initialize(applicationId, ref handlers, true, optionalSteamId);
}
void OnDisable()
{
Debug.Log("Discord: shutdown");
DiscordRpc.Shutdown();
}
void OnDestroy()
{
}
}
@@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 27f0a5f59ffffa84c86547736e2e730a
timeCreated: 1501697692
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,231 +0,0 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
using AOT;
public class DiscordRpc
{
[MonoPInvokeCallback(typeof(OnReadyInfo))]
public static void ReadyCallback(ref DiscordUser connectedUser) { Callbacks.readyCallback(ref connectedUser); }
public delegate void OnReadyInfo(ref DiscordUser connectedUser);
[MonoPInvokeCallback(typeof(OnDisconnectedInfo))]
public static void DisconnectedCallback(int errorCode, string message) { Callbacks.disconnectedCallback(errorCode, message); }
public delegate void OnDisconnectedInfo(int errorCode, string message);
[MonoPInvokeCallback(typeof(OnErrorInfo))]
public static void ErrorCallback(int errorCode, string message) { Callbacks.errorCallback(errorCode, message); }
public delegate void OnErrorInfo(int errorCode, string message);
[MonoPInvokeCallback(typeof(OnJoinInfo))]
public static void JoinCallback(string secret) { Callbacks.joinCallback(secret); }
public delegate void OnJoinInfo(string secret);
[MonoPInvokeCallback(typeof(OnSpectateInfo))]
public static void SpectateCallback(string secret) { Callbacks.spectateCallback(secret); }
public delegate void OnSpectateInfo(string secret);
[MonoPInvokeCallback(typeof(OnRequestInfo))]
public static void RequestCallback(ref DiscordUser request) { Callbacks.requestCallback(ref request); }
public delegate void OnRequestInfo(ref DiscordUser request);
static EventHandlers Callbacks { get; set; }
public struct EventHandlers
{
public OnReadyInfo readyCallback;
public OnDisconnectedInfo disconnectedCallback;
public OnErrorInfo errorCallback;
public OnJoinInfo joinCallback;
public OnSpectateInfo spectateCallback;
public OnRequestInfo requestCallback;
}
[Serializable, StructLayout(LayoutKind.Sequential)]
public struct RichPresenceStruct
{
public IntPtr state; /* max 128 bytes */
public IntPtr details; /* max 128 bytes */
public long startTimestamp;
public long endTimestamp;
public IntPtr largeImageKey; /* max 32 bytes */
public IntPtr largeImageText; /* max 128 bytes */
public IntPtr smallImageKey; /* max 32 bytes */
public IntPtr smallImageText; /* max 128 bytes */
public IntPtr partyId; /* max 128 bytes */
public int partySize;
public int partyMax;
public int partyPrivacy;
public IntPtr matchSecret; /* max 128 bytes */
public IntPtr joinSecret; /* max 128 bytes */
public IntPtr spectateSecret; /* max 128 bytes */
public bool instance;
}
[Serializable]
public struct DiscordUser
{
public string userId;
public string username;
public string discriminator;
public string avatar;
}
public enum Reply
{
No = 0,
Yes = 1,
Ignore = 2
}
public enum PartyPrivacy
{
Private = 0,
Public = 1
}
public static void Initialize(string applicationId, ref EventHandlers handlers, bool autoRegister, string optionalSteamId)
{
Callbacks = handlers;
EventHandlers staticEventHandlers = new EventHandlers();
staticEventHandlers.readyCallback += DiscordRpc.ReadyCallback;
staticEventHandlers.disconnectedCallback += DiscordRpc.DisconnectedCallback;
staticEventHandlers.errorCallback += DiscordRpc.ErrorCallback;
staticEventHandlers.joinCallback += DiscordRpc.JoinCallback;
staticEventHandlers.spectateCallback += DiscordRpc.SpectateCallback;
staticEventHandlers.requestCallback += DiscordRpc.RequestCallback;
InitializeInternal(applicationId, ref staticEventHandlers, autoRegister, optionalSteamId);
}
[DllImport("discord-rpc", EntryPoint = "Discord_Initialize", CallingConvention = CallingConvention.Cdecl)]
static extern void InitializeInternal(string applicationId, ref EventHandlers handlers, bool autoRegister, string optionalSteamId);
[DllImport("discord-rpc", EntryPoint = "Discord_Shutdown", CallingConvention = CallingConvention.Cdecl)]
public static extern void Shutdown();
[DllImport("discord-rpc", EntryPoint = "Discord_RunCallbacks", CallingConvention = CallingConvention.Cdecl)]
public static extern void RunCallbacks();
[DllImport("discord-rpc", EntryPoint = "Discord_UpdatePresence", CallingConvention = CallingConvention.Cdecl)]
private static extern void UpdatePresenceNative(ref RichPresenceStruct presence);
[DllImport("discord-rpc", EntryPoint = "Discord_ClearPresence", CallingConvention = CallingConvention.Cdecl)]
public static extern void ClearPresence();
[DllImport("discord-rpc", EntryPoint = "Discord_Respond", CallingConvention = CallingConvention.Cdecl)]
public static extern void Respond(string userId, Reply reply);
[DllImport("discord-rpc", EntryPoint = "Discord_UpdateHandlers", CallingConvention = CallingConvention.Cdecl)]
public static extern void UpdateHandlers(ref EventHandlers handlers);
public static void UpdatePresence(RichPresence presence)
{
var presencestruct = presence.GetStruct();
UpdatePresenceNative(ref presencestruct);
presence.FreeMem();
}
public class RichPresence
{
private RichPresenceStruct _presence;
private readonly List<IntPtr> _buffers = new List<IntPtr>(10);
public string state; /* max 128 bytes */
public string details; /* max 128 bytes */
public long startTimestamp;
public long endTimestamp;
public string largeImageKey; /* max 32 bytes */
public string largeImageText; /* max 128 bytes */
public string smallImageKey; /* max 32 bytes */
public string smallImageText; /* max 128 bytes */
public string partyId; /* max 128 bytes */
public int partySize;
public int partyMax;
public PartyPrivacy partyPrivacy;
public string matchSecret; /* max 128 bytes */
public string joinSecret; /* max 128 bytes */
public string spectateSecret; /* max 128 bytes */
public bool instance;
/// <summary>
/// Get the <see cref="RichPresenceStruct"/> reprensentation of this instance
/// </summary>
/// <returns><see cref="RichPresenceStruct"/> reprensentation of this instance</returns>
internal RichPresenceStruct GetStruct()
{
if (_buffers.Count > 0)
{
FreeMem();
}
_presence.state = StrToPtr(state);
_presence.details = StrToPtr(details);
_presence.startTimestamp = startTimestamp;
_presence.endTimestamp = endTimestamp;
_presence.largeImageKey = StrToPtr(largeImageKey);
_presence.largeImageText = StrToPtr(largeImageText);
_presence.smallImageKey = StrToPtr(smallImageKey);
_presence.smallImageText = StrToPtr(smallImageText);
_presence.partyId = StrToPtr(partyId);
_presence.partySize = partySize;
_presence.partyMax = partyMax;
_presence.partyPrivacy = (int)partyPrivacy;
_presence.matchSecret = StrToPtr(matchSecret);
_presence.joinSecret = StrToPtr(joinSecret);
_presence.spectateSecret = StrToPtr(spectateSecret);
_presence.instance = instance;
return _presence;
}
/// <summary>
/// Returns a pointer to a representation of the given string with a size of maxbytes
/// </summary>
/// <param name="input">String to convert</param>
/// <returns>Pointer to the UTF-8 representation of <see cref="input"/></returns>
private IntPtr StrToPtr(string input)
{
if (string.IsNullOrEmpty(input)) return IntPtr.Zero;
var convbytecnt = Encoding.UTF8.GetByteCount(input);
var buffer = Marshal.AllocHGlobal(convbytecnt + 1);
for (int i = 0; i < convbytecnt + 1; i++)
{
Marshal.WriteByte(buffer, i, 0);
}
_buffers.Add(buffer);
Marshal.Copy(Encoding.UTF8.GetBytes(input), 0, buffer, convbytecnt);
return buffer;
}
/// <summary>
/// Convert string to UTF-8 and add null termination
/// </summary>
/// <param name="toconv">string to convert</param>
/// <returns>UTF-8 representation of <see cref="toconv"/> with added null termination</returns>
private static string StrToUtf8NullTerm(string toconv)
{
var str = toconv.Trim();
var bytes = Encoding.Default.GetBytes(str);
if (bytes.Length > 0 && bytes[bytes.Length - 1] != 0)
{
str += "\0\0";
}
return Encoding.UTF8.GetString(Encoding.UTF8.GetBytes(str));
}
/// <summary>
/// Free the allocated memory for conversion to <see cref="RichPresenceStruct"/>
/// </summary>
internal void FreeMem()
{
for (var i = _buffers.Count - 1; i >= 0; i--)
{
Marshal.FreeHGlobal(_buffers[i]);
_buffers.RemoveAt(i);
}
}
}
}
@@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: b4474a677de9d80409e98c5393ec5b1e
timeCreated: 1501697692
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,101 +0,0 @@
using UnityEditor;
using System.Diagnostics;
using System.IO;
[InitializeOnLoad]
public class ScriptBatch
{
static ScriptBatch()
{
EnsureDLL();
}
public static bool FileExists(string filename)
{
return new FileInfo(filename).Exists;
}
public static bool RunRpcBuildScript()
{
UnityEngine.Debug.Log("Try to run build script");
Process proc = new Process();
#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX
proc.StartInfo.UseShellExecute = false;
// brew installs cmake in /usr/local/bin, which Unity seems to strip from PATH?
string newPath = proc.StartInfo.EnvironmentVariables["PATH"] + ":/usr/local/bin";
proc.StartInfo.EnvironmentVariables["PATH"] = newPath;
#endif
proc.StartInfo.FileName = "python";
proc.StartInfo.Arguments = "build.py unity";
proc.StartInfo.WorkingDirectory = "../..";
proc.Start();
proc.WaitForExit();
return proc.ExitCode == 0;
}
public static void EnsureDLL()
{
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
string[] dstDirs = { "Assets/Plugins", "Assets/Plugins/x86", "Assets/Plugins/x86_64" };
string[] dstDlls = { "Assets/Plugins/x86/discord-rpc.dll", "Assets/Plugins/x86_64/discord-rpc.dll" };
string[] srcDlls = { "../../builds/install/win64-dynamic/bin/discord-rpc.dll", "../../builds/install/win64-dynamic/bin/discord-rpc.dll" };
#elif UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX
string[] dstDirs = { "Assets/Plugins" };
string[] dstDlls = { "Assets/Plugins/discord-rpc.bundle" };
string[] srcDlls = { "../../builds/install/osx-dynamic/lib/libdiscord-rpc.dylib" };
#else
string[] dstDirs = { "Assets/Plugins", "Assets/Plugins/x86", "Assets/Plugins/x86_64" };
string[] dstDlls = { "Assets/Plugins/discord-rpc.so" };
string[] srcDlls = { "../../builds/install/linux-dynamic/lib/libdiscord-rpc.so" };
#endif
Debug.Assert(dstDlls.Length == srcDlls.Length);
bool exists = true;
foreach (string fname in dstDlls)
{
if (!FileExists(fname))
{
exists = false;
break;
}
}
if (exists)
{
return;
}
exists = true;
foreach (string fname in srcDlls)
{
if (!FileExists(fname))
{
exists = false;
break;
}
}
if (!exists)
{
if (!RunRpcBuildScript())
{
UnityEngine.Debug.LogError("Build failed");
return;
}
}
// make sure the dirs exist
foreach (string dirname in dstDirs)
{
Directory.CreateDirectory(dirname);
}
// Copy dlls
for (int i = 0; i < dstDlls.Length; ++i)
{
FileUtil.CopyFileOrDirectory(srcDlls[i], dstDlls[i]);
}
}
}
@@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: e5aecc4633e5f594b85eaa39f49bb402
timeCreated: 1512071254
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 3b03d21bb25fa494e8694cd6e4b6d769
timeCreated: 1501696924
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
@@ -1,17 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!11 &1
AudioManager:
m_ObjectHideFlags: 0
m_Volume: 1
Rolloff Scale: 1
Doppler Factor: 1
Default Speaker Mode: 2
m_SampleRate: 0
m_DSPBufferSize: 0
m_VirtualVoiceCount: 512
m_RealVoiceCount: 32
m_SpatializerPlugin:
m_AmbisonicDecoderPlugin:
m_DisableAudio: 0
m_VirtualizeEffects: 1
@@ -1,6 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!236 &1
ClusterInputManager:
m_ObjectHideFlags: 0
m_Inputs: []
@@ -1,20 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!55 &1
PhysicsManager:
m_ObjectHideFlags: 0
serializedVersion: 3
m_Gravity: {x: 0, y: -9.81, z: 0}
m_DefaultMaterial: {fileID: 0}
m_BounceThreshold: 2
m_SleepThreshold: 0.005
m_DefaultContactOffset: 0.01
m_DefaultSolverIterations: 6
m_DefaultSolverVelocityIterations: 1
m_QueriesHitBackfaces: 0
m_QueriesHitTriggers: 1
m_EnableAdaptiveForce: 0
m_EnablePCM: 1
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
m_AutoSimulation: 1
m_AutoSyncTransforms: 1

Some files were not shown because too many files have changed in this diff Show More