Compare commits
580 Commits
core-rsp-patch
...
v0.8.6
| Author | SHA1 | Date | |
|---|---|---|---|
| 7b4b7a80ae | |||
| 5ccf15b852 | |||
| c991721faf | |||
| 2679fd41d5 | |||
| dc10430315 | |||
| cbe455c640 | |||
| 9662f7095a | |||
| de77034fa4 | |||
| a955e7b272 | |||
| 6ade361df3 | |||
| aba3676b1e | |||
| 2927d86d49 | |||
| 2af46a43a6 | |||
| 30121f2db7 | |||
| 72d13568fb | |||
| a6d9187e56 | |||
| 939db73b0b | |||
| 7154725520 | |||
| b6ab15de37 | |||
| a38866563b | |||
| 66f5962494 | |||
| 471cce3fdb | |||
| 4276491a37 | |||
| 928a9427a2 | |||
| 903d44f73c | |||
| d577dd4194 | |||
| 5732775246 | |||
| 0b93d54643 | |||
| 604b50eb7d | |||
| 5e6ac33048 | |||
| 470c94df9f | |||
| 5caf80a43d | |||
| 1f82d47c09 | |||
| a9efdf3db9 | |||
| 511f8fdcad | |||
| d9f5921657 | |||
| 72ab4f5a9b | |||
| 19876e14cf | |||
| 9384e2d15c | |||
| d8069293e0 | |||
| 05b905dd67 | |||
| 4eb18e2a60 | |||
| 3c37df1bcf | |||
| 09dc63bf2c | |||
| e2ece3464a | |||
| 0807e18e78 | |||
| f0bc3df818 | |||
| d6f82ba739 | |||
| 5e9ff89a40 | |||
| e1f76e129d | |||
| 39ffbc9fc8 | |||
| 2beead6169 | |||
| df8d8091ed | |||
| 85294ce7ae | |||
| f9f69b2bf1 | |||
| 265ff17068 | |||
| bbc2ac3146 | |||
| 925493f5b5 | |||
| 8682c1a583 | |||
| 9c53a846b8 | |||
| 816bb4c426 | |||
| c119e5f128 | |||
| d64b23bdfe | |||
| b03f118b04 | |||
| d18ac4076f | |||
| 4620c1beb8 | |||
| 55431be957 | |||
| 18946b1d92 | |||
| c517862b3c | |||
| e8d4d6341b | |||
| 2246b6f25b | |||
| cd754fafa9 | |||
| 8660ced35f | |||
| 1c7276b4f8 | |||
| 4b793c4ad4 | |||
| e9dc24d947 | |||
| 51b712a8c9 | |||
| 1ce70fba22 | |||
| 0c06aebf72 | |||
| 12cd56e5f1 | |||
| e9cef9b76b | |||
| 7395e1ed6a | |||
| c22a7560f0 | |||
| 40c8e117c1 | |||
| fb7744625c | |||
| f11eebae9a | |||
| 762e24a110 | |||
| f0a1c1f377 | |||
| 543dde0de2 | |||
| ff5190ac66 | |||
| 410e54f0b2 | |||
| c0c5e0dc8e | |||
| 56fd26ae4f | |||
| 11550cc71a | |||
| 53e0c157f1 | |||
| e57e52c6c8 | |||
| 089160278c | |||
| a3deb185a4 | |||
| 80e813baee | |||
| ff49835b22 | |||
| 1af3e28d83 | |||
| 0dce7ddaf4 | |||
| 0d1fc16a53 | |||
| 9032008a63 | |||
| 4788d643da | |||
| e1db6c24b0 | |||
| 81f98505ca | |||
| 7270e0dfbe | |||
| bc3e3b3f9c | |||
| d7b17cd494 | |||
| e5cd034b4f | |||
| 1c6210f964 | |||
| 9ce1e45d64 | |||
| be738f0cb7 | |||
| e882e0f22c | |||
| f7a1d0f952 | |||
| 6b8990fa1a | |||
| a74cff50f8 | |||
| d4ac45a9c5 | |||
| 32aebfec1a | |||
| aee7da8068 | |||
| 078361e2e6 | |||
| e0cae9c1a9 | |||
| c8d46ee919 | |||
| c5965b3940 | |||
| affb0ee0ee | |||
| dd6ea4f22a | |||
| 006a7c8eff | |||
| 5f10f39ac0 | |||
| 6e1df7fc79 | |||
| 5cab9282e7 | |||
| 1c6d8a6f59 | |||
| c43f43e634 | |||
| 409aac2caa | |||
| 21b187dacc | |||
| a110f48fad | |||
| 1f24d20054 | |||
| 8e61b79ecf | |||
| f459c456de | |||
| 0813a6e3ea | |||
| 606eb976cb | |||
| 443ff545ab | |||
| 3c615c8459 | |||
| 7973b5d151 | |||
| 8f0cd29366 | |||
| b39357efda | |||
| 3e0efac610 | |||
| 595427aa98 | |||
| 62c30a4b4d | |||
| 13f7ede034 | |||
| f89b73cec1 | |||
| 30d1f17329 | |||
| b8ad7d1dce | |||
| 6552aa23ec | |||
| 6d81b8cda3 | |||
| f5de7e8320 | |||
| 0d2b88037f | |||
| ac7b9bce27 | |||
| d87bcc3a21 | |||
| 7261903186 | |||
| 2e6263ea5c | |||
| fa9a288e0a | |||
| 7fced2d3eb | |||
| 9bc56e90ee | |||
| 64d4c41d1d | |||
| c2197b3053 | |||
| 3f7c1584a4 | |||
| 17dc26779e | |||
| edc8c0bb98 | |||
| 5bf5d0ed16 | |||
| 7114338cec | |||
| 64d0a90b82 | |||
| d6b0f024da | |||
| 3b2668977d | |||
| 5aa7ee0fe3 | |||
| f0119ec75d | |||
| 249654a879 | |||
| 950becc1b3 | |||
| b3424f3fc5 | |||
| e0e19824a5 | |||
| b3b8c2d8b1 | |||
| d9cd714c2c | |||
| fb85a42477 | |||
| 1458f3df0b | |||
| ad3973998f | |||
| 8ef1da8e0b | |||
| 06cc95852e | |||
| 44c6c17191 | |||
| fc9a249dd9 | |||
| 648c7fbc26 | |||
| 59fc11c8f4 | |||
| 7d9e34abcf | |||
| d05fa8b91b | |||
| 10bb0b9df2 | |||
| 5311d04957 | |||
| f9de2fe9ef | |||
| 6d77fd7e1e | |||
| 5fc0de6da7 | |||
| 0d114412e6 | |||
| 9a5c151de5 | |||
| 97c58d6e66 | |||
| 4a931f81c4 | |||
| 3c3c0d2b16 | |||
| 39877ae948 | |||
| f9137d3a63 | |||
| ac1274eba4 | |||
| d88db0fb88 | |||
| 9c121ad436 | |||
| 70598b1fcd | |||
| bfd3d078ad | |||
| 7d99159388 | |||
| f77475ee7f | |||
| 048772344b | |||
| 23120150f9 | |||
| 2c32dfd552 | |||
| 1624b1a4cc | |||
| 1db6a578b2 | |||
| acc2c808f5 | |||
| e1bbf66ff1 | |||
| b4a0642122 | |||
| e7906c93a7 | |||
| d5af42a7a5 | |||
| e4cbfc388f | |||
| 572792a1c8 | |||
| 3570200e53 | |||
| e11d1884c8 | |||
| 77a201f52a | |||
| 4416343761 | |||
| 88a6685a6b | |||
| e0def96cb7 | |||
| dfca82520d | |||
| ea9313aa1b | |||
| 9ef92c3578 | |||
| ef3a68f509 | |||
| 2060facc2a | |||
| 474eff65fb | |||
| 6345ec6eb3 | |||
| b65692f12b | |||
| 8615c5efe1 | |||
| ae5813a635 | |||
| 219f74bb8b | |||
| 91b4213044 | |||
| 297968f319 | |||
| a40d1d34f5 | |||
| b964415ac7 | |||
| 4707fe143c | |||
| 66fc3492ca | |||
| 45e0231214 | |||
| b05b0faeea | |||
| 7b4b8c5c90 | |||
| 97bd81c287 | |||
| 3222b962cc | |||
| 37f89b448f | |||
| f91ed8d848 | |||
| 437733c9fd | |||
| 8f6496db86 | |||
| e1cd2f8400 | |||
| 94341526d7 | |||
| e1bc2e4a89 | |||
| 7a28f1df17 | |||
| 4a67f98a3b | |||
| 9908431e0a | |||
| a6dca6618e | |||
| 56ebe38849 | |||
| 32a1a26fcf | |||
| cbdfa2b307 | |||
| 2be09f9e03 | |||
| 51ce612bd9 | |||
| e37bc3faf9 | |||
| 7059a974ed | |||
| 4b17a8a494 | |||
| 428ef7549a | |||
| c0d81fdc9f | |||
| 78a9ae5fe1 | |||
| 80f9fd0234 | |||
| c046984a37 | |||
| 1ec02c59f3 | |||
| 383eab48c8 | |||
| 358cb337dc | |||
| 141aefd81a | |||
| 39a7887b35 | |||
| 653d0f49a3 | |||
| 3e8b3656e7 | |||
| 4d975a731e | |||
| 0dee590f75 | |||
| f5bed2b464 | |||
| 38a78e2627 | |||
| f94ea3b6f8 | |||
| 2af3c8a7f5 | |||
| 92dfc7c4d0 | |||
| 4ff94efa4b | |||
| ef493de942 | |||
| 3067049d5c | |||
| 08be74297f | |||
| 6122d4ff21 | |||
| 27665e7221 | |||
| 6a5d0d6547 | |||
| a2c6a54b90 | |||
| 0c88d6584f | |||
| f0f0795733 | |||
| e32fe57080 | |||
| d536e20da8 | |||
| 4f850136fa | |||
| 612a9192d3 | |||
| 0480872e40 | |||
| 88be43a1b1 | |||
| 808960b1c1 | |||
| 0962c6969f | |||
| c4929d9ac7 | |||
| 85159348a1 | |||
| 3b385d48f9 | |||
| a396b372dd | |||
| f5b0452e77 | |||
| b82dcbac57 | |||
| 964ed7837b | |||
| 5e592ed9c0 | |||
| 018de840ab | |||
| e3086fb6a8 | |||
| 1ed5a39345 | |||
| 7e546b351a | |||
| 4b0cd7562d | |||
| 3b1e5153d3 | |||
| f0d9bbfbbb | |||
| e0925e564b | |||
| 85b4daa005 | |||
| c7dd5a6a29 | |||
| 701d1f9ab7 | |||
| aa32706de0 | |||
| b9a58101f9 | |||
| c0cdfb2db8 | |||
| ffc45e2bce | |||
| 5d078322a7 | |||
| 988c4f030a | |||
| d217d0bae3 | |||
| 6ca31dbb82 | |||
| 5f97be5e94 | |||
| b014fdf424 | |||
| 31110c01f1 | |||
| 9dc250694b | |||
| 80d6d8a07e | |||
| c8d8e2ac71 | |||
| 7e90d59d86 | |||
| 8e02a0ecda | |||
| d468794979 | |||
| 7b4629b1f9 | |||
| 8312b2a299 | |||
| 5fd9b780e5 | |||
| 881e0c9582 | |||
| 82291ce5f0 | |||
| 191c7b1def | |||
| 393a9e40fe | |||
| 4752e1530c | |||
| 847f832aff | |||
| c93f82928f | |||
| c1db77afea | |||
| 667c2d5272 | |||
| fe7abb585a | |||
| c0ebf11420 | |||
| 26b35eb299 | |||
| a2a9ea2648 | |||
| 42fd1827b3 | |||
| 053f9931c4 | |||
| 5e3315b471 | |||
| da1d7fcd2e | |||
| f6039bad01 | |||
| 7aeeb70db2 | |||
| 50ee41435e | |||
| 592994ee87 | |||
| 216284faff | |||
| 6f67e1edd5 | |||
| 2ada580a30 | |||
| 7f02a764ce | |||
| ddaf58c7b6 | |||
| 817ef4535b | |||
| 530a48a30c | |||
| 116eeb35d4 | |||
| b266371fa3 | |||
| d4e6db211c | |||
| 0ec790e61f | |||
| ae5b141d16 | |||
| 66364892f9 | |||
| 5144e1748b | |||
| 6375a30d00 | |||
| 4514b530ab | |||
| c102aa042d | |||
| 0f28fb6d13 | |||
| 4e8ab796ba | |||
| 91feda3427 | |||
| a8e4f058be | |||
| e9168e935d | |||
| 73be38bedc | |||
| 8a69d687ab | |||
| 4f20b94b7a | |||
| 7f4ff9eb54 | |||
| 72b3b4fb75 | |||
| 9b5a7848d3 | |||
| 6ca2cbf297 | |||
| d3d1facadd | |||
| bc723bffb0 | |||
| 8f0299c302 | |||
| abdcb74978 | |||
| 80565331d8 | |||
| 38cabc1ced | |||
| 84fb6243c8 | |||
| 48e21f1450 | |||
| 7c76e8c3ff | |||
| 5a443348cc | |||
| c6480e258c | |||
| 9602aa2ef7 | |||
| a0369def10 | |||
| 7930965ff2 | |||
| 2bea2f07f7 | |||
| b75aea7f26 | |||
| e9f0f427b8 | |||
| a5e685becd | |||
| f3986284ab | |||
| 33650061aa | |||
| 421f1d105a | |||
| b6cbc52cb8 | |||
| 82687d5db3 | |||
| 08eb1e5ba4 | |||
| 83bc8f8c20 | |||
| cb9eb2ddee | |||
| 3e61a72cf1 | |||
| cc75ce55cb | |||
| 1a84d6b7c4 | |||
| 5fd460d4b9 | |||
| fea5ed99f8 | |||
| aa824cc1f7 | |||
| a575eff7ec | |||
| 4eaa2a9b5f | |||
| d406a421e9 | |||
| b6b1e9138c | |||
| 4596d2e6cf | |||
| 4cd4f4c6ea | |||
| 37839b0178 | |||
| 69c24b9131 | |||
| e68483fce2 | |||
| f6b73b86c6 | |||
| 9cae93b9bb | |||
| 63e24586d4 | |||
| dfd0958b21 | |||
| 6e2d29dc60 | |||
| 1b45907ab2 | |||
| 53c0c3310a | |||
| 0a7c1094e7 | |||
| 8a1e4b57cd | |||
| 8fed4db258 | |||
| 9b5cc05b9f | |||
| e112e324f7 | |||
| 51fd8393d8 | |||
| 6fcff85201 | |||
| 240e8d7b39 | |||
| d67187a90a | |||
| 0f6834b196 | |||
| f237d8872c | |||
| d71f65e3b7 | |||
| a51cb04e4d | |||
| 1ade89723d | |||
| 1047b1bd9a | |||
| e90376a800 | |||
| 21272091e1 | |||
| 330c91d024 | |||
| fce18f0ccf | |||
| 3d145e2d71 | |||
| f65a9be6b4 | |||
| 92cd2b90c6 | |||
| acf425611e | |||
| 7604f9789d | |||
| cd36bdbd59 | |||
| acb551d21d | |||
| e17685f906 | |||
| ec60999e02 | |||
| 4b8b453cf8 | |||
| 5c069c7abe | |||
| b3c1b4558f | |||
| 80546108b9 | |||
| b785f93a4e | |||
| c930f6a2c8 | |||
| 147533ea45 | |||
| ce4321dcea | |||
| 41ef46b284 | |||
| cc97608bb7 | |||
| 425dbf4eb5 | |||
| 365752e128 | |||
| f297929e49 | |||
| f85fc5b461 | |||
| fce1c94ade | |||
| 67cf2814c0 | |||
| 247b0c97ce | |||
| efff2e8bdd | |||
| 7ed3ad165a | |||
| b874af19b7 | |||
| d477722da1 | |||
| 6eab08cce5 | |||
| 08bd7580fe | |||
| 70300d1557 | |||
| 71fb623ac9 | |||
| 4d8015daa5 | |||
| 2c438fefbc | |||
| 3203c25495 | |||
| e040c56a26 | |||
| 0d63f9248b | |||
| 9e57d50f6e | |||
| 927e447034 | |||
| d2a59fa18d | |||
| 3160c26c77 | |||
| 0b629a015a | |||
| 0ba52c4483 | |||
| 4af1d47a3a | |||
| d9c754a11b | |||
| f0efdd9142 | |||
| e78b849c7f | |||
| ad22d40769 | |||
| ed43a4bdd8 | |||
| 1fa2c06119 | |||
| 9a1e77c689 | |||
| ea958fe70c | |||
| e76fcd3bd3 | |||
| 487c84c085 | |||
| 87d1413c99 | |||
| 550fb0ebb4 | |||
| 4467c6ba75 | |||
| a8f522d0ab | |||
| b46eb87220 | |||
| 848d852395 | |||
| 26c35c7bb5 | |||
| efaafc0156 | |||
| c4c03c5186 | |||
| b985e6a4bc | |||
| 02713ae1ff | |||
| f01e3e33ab | |||
| 8adc8000a4 | |||
| 30d14ff95f | |||
| a4f993b424 | |||
| 8fd4be7452 | |||
| e576da6cba | |||
| f0405d769e | |||
| fd9623bef8 | |||
| f2e09157db | |||
| 334d7cdd6b | |||
| 525c7a4b60 | |||
| 940344c70c | |||
| 0c2f7a19b6 | |||
| 6acb03e155 | |||
| 9742deb7ac | |||
| a234cb0463 | |||
| 85c1c1af91 | |||
| c81575610c | |||
| f306caa55b | |||
| 5febea43de | |||
| 8ce42a52ce | |||
| 7d9b6175f5 | |||
| ec9f4f9806 | |||
| 82295c8394 | |||
| 6b050464ba | |||
| 1a05e6aec0 | |||
| 49c7db75ba | |||
| e62094efcf | |||
| 4a30160398 | |||
| 478f226cad | |||
| 6746711bc3 | |||
| 7bd9c320ea | |||
| ec197c3ee9 | |||
| 4c000101e3 | |||
| 4107ee598b | |||
| 1b4820c7f7 | |||
| cc398720b6 | |||
| 256d1c512a | |||
| 642e768e92 | |||
| 8660efe2dc | |||
| a47160714a | |||
| 9155faf1d2 | |||
| 042717c3a4 | |||
| 5e0c5bfbb0 | |||
| 08ff5a5ad4 | |||
| b89655e4b3 | |||
| c6cbda856b | |||
| b5b97b187a | |||
| c6ec9c0686 |
@@ -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 }}
|
||||
|
||||
@@ -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
|
||||
@@ -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)
|
||||
@@ -122,7 +99,7 @@ else()
|
||||
set(PLUGIN_INSTALL_PATH "${SYSTEM_LIB_INSTALL_PATH}/RMG/Plugin")
|
||||
set(DATA_INSTALL_PATH "${CMAKE_INSTALL_DATADIR}/RMG")
|
||||
set(INSTALL_DESKTOP_FILE ON)
|
||||
set(APPDATA_INSTALL_PATH "${CMAKE_INSTALL_DATADIR}/metainfo/")
|
||||
set(METAINFO_INSTALL_PATH "${CMAKE_INSTALL_DATADIR}/metainfo/")
|
||||
set(DESKTOP_INSTALL_PATH "${CMAKE_INSTALL_DATADIR}/applications")
|
||||
set(ICON_INSTALL_PATH "${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps/")
|
||||
endif()
|
||||
@@ -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,12 +132,17 @@ 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)
|
||||
|
||||
set(LIB_PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE)
|
||||
|
||||
install(FILES ${MUPEN64PLUSCORE_LIB}
|
||||
DESTINATION ${CORE_INSTALL_PATH}
|
||||
PERMISSIONS ${LIB_PERMISSIONS}
|
||||
)
|
||||
install(FILES ${MUPEN64PLUSCORE_INI} Data/font.ttf
|
||||
DESTINATION ${DATA_INSTALL_PATH}
|
||||
@@ -167,12 +150,13 @@ install(FILES ${MUPEN64PLUSCORE_INI} Data/font.ttf
|
||||
if (VRU)
|
||||
install(FILES ${VOSK_API_LIBRARY}
|
||||
DESTINATION ${LIB_INSTALL_PATH}
|
||||
PERMISSIONS ${LIB_PERMISSIONS}
|
||||
)
|
||||
install(FILES ${VOSK_API_MODEL}
|
||||
DESTINATION ${DATA_INSTALL_PATH}
|
||||
)
|
||||
endif(VRU)
|
||||
install(FILES ${SDL_GAMECONTROLLERDB}
|
||||
install(FILES ${SDL_GAMECONTROLLERDB} ${CMAKE_SOURCE_DIR}/Data/InputProfileDB.json
|
||||
DESTINATION ${DATA_INSTALL_PATH}
|
||||
)
|
||||
file(GLOB GENERATED_CHEAT_FILES ${CMAKE_SOURCE_DIR}/Data/Cheats/Generated/*.cht)
|
||||
@@ -182,29 +166,36 @@ install(FILES ${GENERATED_CHEAT_FILES} ${CUSTOM_CHEAT_FILES}
|
||||
)
|
||||
install(FILES ${MUPEN64PLUS_PLUGIN_RSP_CXD4}
|
||||
DESTINATION ${PLUGIN_INSTALL_PATH}/RSP
|
||||
PERMISSIONS ${LIB_PERMISSIONS}
|
||||
)
|
||||
install(FILES ${MUPEN64PLUS_PLUGIN_RSP_HLE}
|
||||
DESTINATION ${PLUGIN_INSTALL_PATH}/RSP
|
||||
PERMISSIONS ${LIB_PERMISSIONS}
|
||||
)
|
||||
install(FILES ${MUPEN64PLUS_PLUGIN_RSP_PARALLEL}
|
||||
DESTINATION ${PLUGIN_INSTALL_PATH}/RSP
|
||||
PERMISSIONS ${LIB_PERMISSIONS}
|
||||
)
|
||||
install(FILES ${MUPEN64PLUS_PLUGIN_INPUT_RAPHNET}
|
||||
DESTINATION ${PLUGIN_INSTALL_PATH}/Input
|
||||
)
|
||||
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
|
||||
PERMISSIONS ${LIB_PERMISSIONS}
|
||||
)
|
||||
endif(USE_ANGRYLION)
|
||||
install(FILES ${MUPEN64PLUS_PLUGIN_GFX_GLIDEN64}
|
||||
DESTINATION ${PLUGIN_INSTALL_PATH}/GFX
|
||||
PERMISSIONS ${LIB_PERMISSIONS}
|
||||
)
|
||||
install(FILES ${MUPEN64PLUS_PLUGIN_GFX_GLIDEN64_DATA}
|
||||
DESTINATION ${PLUGIN_INSTALL_PATH}/GFX
|
||||
)
|
||||
install(FILES ${MUPEN64PLUS_PLUGIN_GFX_PARALLEL}
|
||||
DESTINATION ${PLUGIN_INSTALL_PATH}/GFX
|
||||
PERMISSIONS ${LIB_PERMISSIONS}
|
||||
)
|
||||
|
||||
if (INSTALL_DESKTOP_FILE)
|
||||
@@ -214,7 +205,7 @@ if (INSTALL_DESKTOP_FILE)
|
||||
install(FILES Package/com.github.Rosalie241.RMG.svg
|
||||
DESTINATION ${ICON_INSTALL_PATH}
|
||||
)
|
||||
install(FILES Package/com.github.Rosalie241.RMG.appdata.xml
|
||||
DESTINATION ${APPDATA_INSTALL_PATH}
|
||||
install(FILES Package/com.github.Rosalie241.RMG.metainfo.xml
|
||||
DESTINATION ${METAINFO_INSTALL_PATH}
|
||||
)
|
||||
endif(INSTALL_DESKTOP_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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -377,3 +377,12 @@ Note=Put this code on and it will now take where you wanted to go, turn it back
|
||||
9214 Zora Shop
|
||||
B214 Snowhead (Path to temple - warp in)
|
||||
D214 East Clock Down
|
||||
|
||||
$Time Control
|
||||
Note=Control the speed of time with the D-pad. Up stops the time, left enables double time, and down restores the notmal speed.
|
||||
D01F30F6 0008
|
||||
811E6F06 FFFD
|
||||
D01F30F6 0004
|
||||
811E6F06 0000
|
||||
D01F30F6 0002
|
||||
811E6F06 FFFE
|
||||
|
||||
@@ -421,3 +421,12 @@ D03E6B3A 0000
|
||||
9214 Zora Shop
|
||||
B214 Snowhead (Path to temple - warp in)
|
||||
D214 East Clock Down
|
||||
|
||||
$Time Control
|
||||
Note=Control the speed of time with the D-pad. Up stops the time, left enables double time, and down restores the notmal speed.
|
||||
D01FB876 0008
|
||||
811EF686 FFFD
|
||||
D01FB876 0004
|
||||
811EF686 0000
|
||||
D01FB876 0002
|
||||
811EF686 FFFE
|
||||
|
||||
@@ -361,3 +361,12 @@ D03E6FCA 0000
|
||||
9214 Zora Shop
|
||||
B214 Snowhead (Path to temple - warp in)
|
||||
D214 East Clock Down
|
||||
|
||||
$Time Control
|
||||
Note=Control the speed of time with the D-pad. Up stops the time, left enables double time, and down restores the notmal speed.
|
||||
D01FBC96 0008
|
||||
811EF726 FFFD
|
||||
D01FBC96 0004
|
||||
811EF726 0000
|
||||
D01FBC96 0002
|
||||
811EF726 FFFE
|
||||
|
||||
@@ -388,3 +388,12 @@ Note=Put this code on and it will now take where you wanted to go, turn it back
|
||||
9214 Zora Shop
|
||||
B214 Snowhead (Path to temple - warp in)
|
||||
D214 East Clock Down
|
||||
|
||||
$Time Control
|
||||
Note=Control the speed of time with the D-pad. Up stops the time, left enables double time, and down restores the notmal speed.
|
||||
D01F0496 0008
|
||||
811E5496 FFFD
|
||||
D01F0496 0004
|
||||
811E5496 0000
|
||||
D01F0496 0002
|
||||
811E5496 FFFE
|
||||
|
||||
@@ -383,3 +383,12 @@ Note=Put this code on and it will now take where you wanted to go, turn it back
|
||||
9214 Zora Shop
|
||||
B214 Snowhead (Path to temple - warp in)
|
||||
D214 East Clock Down
|
||||
|
||||
$Time Control
|
||||
Note=Control the speed of time with the D-pad. Up stops the time, left enables double time, and down restores the notmal speed.
|
||||
D01F8836 0008
|
||||
811ED836 FFFD
|
||||
D01F8836 0004
|
||||
811ED836 0000
|
||||
D01F8836 0002
|
||||
811ED836 FFFE
|
||||
|
||||
@@ -418,3 +418,12 @@ D03E4CFA 0000
|
||||
9214 Zora Shop
|
||||
B214 Snowhead (Path to temple - warp in)
|
||||
D214 East Clock Down
|
||||
|
||||
$Time Control
|
||||
Note=Control the speed of time with the D-pad. Up stops the time, left enables double time, and down restores the notmal speed.
|
||||
D01F88A0 0008
|
||||
811ED846 FFFD
|
||||
D01F88A0 0004
|
||||
811ED846 0000
|
||||
D01F88A0 0002
|
||||
811ED846 FFFE
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[C0F6DB17-80E0D532-C:44]
|
||||
Name=Armorines Project S.
|
||||
Name=Armorines - Project S.W.A.R.M. (G)
|
||||
|
||||
$[Press L For Levitate]
|
||||
D10F7550 0020
|
||||
|
||||
@@ -394,3 +394,12 @@ Note=Put this code on and it will now take where you wanted to go, turn it back
|
||||
9214 Zora Shop
|
||||
B214 Snowhead (Path to temple - warp in)
|
||||
D214 East Clock Down
|
||||
|
||||
$Time Control
|
||||
Note=Control the speed of time with the D-pad. Up stops the time, left enables double time, and down restores the notmal speed.
|
||||
D01F2D56 0008
|
||||
811E6B66 FFFD
|
||||
D01F2D56 0004
|
||||
811E6B66 0000
|
||||
D01F2D56 0002
|
||||
811E6B66 FFFE
|
||||
|
||||
@@ -361,3 +361,12 @@ D05EC55A 0000
|
||||
9214 Zora Shop
|
||||
B214 Snowhead (Path to temple - warp in)
|
||||
D214 East Clock Down
|
||||
|
||||
$Time Control
|
||||
Note=Control the speed of time with the D-pad. Up stops the time, left enables double time, and down restores the notmal speed.
|
||||
D01FBA40 0008
|
||||
811EF476 FFFD
|
||||
D01FBA40 0004
|
||||
811EF476 0000
|
||||
D01FBA40 0002
|
||||
811EF476 FFFE
|
||||
|
||||
@@ -0,0 +1,230 @@
|
||||
[
|
||||
{
|
||||
"DeviceName": [ "fallback_profile" ],
|
||||
"DeviceType": 4,
|
||||
"A_InputType": "0",
|
||||
"A_Name": "a",
|
||||
"A_Data": "0",
|
||||
"A_ExtraData": "0",
|
||||
"B_InputType": "0",
|
||||
"B_Name": "x",
|
||||
"B_Data": "2",
|
||||
"B_ExtraData": "0",
|
||||
"Start_InputType": "0",
|
||||
"Start_Name": "start",
|
||||
"Start_Data": "6",
|
||||
"Start_ExtraData": "0",
|
||||
"DpadUp_InputType": "0",
|
||||
"DpadUp_Name": "dpup",
|
||||
"DpadUp_Data": "11",
|
||||
"DpadUp_ExtraData": "0",
|
||||
"DpadDown_InputType": "0",
|
||||
"DpadDown_Name": "dpdown",
|
||||
"DpadDown_Data": "12",
|
||||
"DpadDown_ExtraData": "0",
|
||||
"DpadLeft_InputType": "0",
|
||||
"DpadLeft_Name": "dpleft",
|
||||
"DpadLeft_Data": "13",
|
||||
"DpadLeft_ExtraData": "0",
|
||||
"DpadRight_InputType": "0",
|
||||
"DpadRight_Name": "dpright",
|
||||
"DpadRight_Data": "14",
|
||||
"DpadRight_ExtraData": "0",
|
||||
"CButtonUp_InputType": "1",
|
||||
"CButtonUp_Name": "righty-",
|
||||
"CButtonUp_Data": "3",
|
||||
"CButtonUp_ExtraData": "0",
|
||||
"CButtonDown_InputType": "1",
|
||||
"CButtonDown_Name": "righty+",
|
||||
"CButtonDown_Data": "3",
|
||||
"CButtonDown_ExtraData": "1",
|
||||
"CButtonLeft_InputType": "1",
|
||||
"CButtonLeft_Name": "rightx-",
|
||||
"CButtonLeft_Data": "2",
|
||||
"CButtonLeft_ExtraData": "0",
|
||||
"CButtonRight_InputType": "1",
|
||||
"CButtonRight_Name": "rightx+",
|
||||
"CButtonRight_Data": "2",
|
||||
"CButtonRight_ExtraData": "1",
|
||||
"LeftTrigger_InputType": "0",
|
||||
"LeftTrigger_Name": "leftshoulder",
|
||||
"LeftTrigger_Data": "9",
|
||||
"LeftTrigger_ExtraData": "0",
|
||||
"RightTrigger_InputType": "0",
|
||||
"RightTrigger_Name": "rightshoulder",
|
||||
"RightTrigger_Data": "10",
|
||||
"RightTrigger_ExtraData": "0",
|
||||
"ZTrigger_InputType": "1",
|
||||
"ZTrigger_Name": "lefttrigger+",
|
||||
"ZTrigger_Data": "4",
|
||||
"ZTrigger_ExtraData": "1",
|
||||
"AnalogStickUp_InputType": "1",
|
||||
"AnalogStickUp_Name": "lefty-",
|
||||
"AnalogStickUp_Data": "1",
|
||||
"AnalogStickUp_ExtraData": "0",
|
||||
"AnalogStickDown_InputType": "1",
|
||||
"AnalogStickDown_Name": "lefty+",
|
||||
"AnalogStickDown_Data": "1",
|
||||
"AnalogStickDown_ExtraData": "1",
|
||||
"AnalogStickLeft_InputType": "1",
|
||||
"AnalogStickLeft_Name": "leftx-",
|
||||
"AnalogStickLeft_Data": "0",
|
||||
"AnalogStickLeft_ExtraData": "0",
|
||||
"AnalogStickRight_InputType": "1",
|
||||
"AnalogStickRight_Name": "leftx+",
|
||||
"AnalogStickRight_Data": "0",
|
||||
"AnalogStickRight_ExtraData": "1"
|
||||
},
|
||||
{
|
||||
"DeviceName": [ "Nintendo N64 Controller" ],
|
||||
"DeviceType": 4,
|
||||
"A_InputType": "0",
|
||||
"A_Name": "a",
|
||||
"A_Data": "0",
|
||||
"A_ExtraData": "0",
|
||||
"B_InputType": "0",
|
||||
"B_Name": "b",
|
||||
"B_Data": "1",
|
||||
"B_ExtraData": "0",
|
||||
"Start_InputType": "0",
|
||||
"Start_Name": "start",
|
||||
"Start_Data": "6",
|
||||
"Start_ExtraData": "0",
|
||||
"DpadUp_InputType": "0",
|
||||
"DpadUp_Name": "dpup",
|
||||
"DpadUp_Data": "11",
|
||||
"DpadUp_ExtraData": "0",
|
||||
"DpadDown_InputType": "0",
|
||||
"DpadDown_Name": "dpdown",
|
||||
"DpadDown_Data": "12",
|
||||
"DpadDown_ExtraData": "0",
|
||||
"DpadLeft_InputType": "0",
|
||||
"DpadLeft_Name": "dpleft",
|
||||
"DpadLeft_Data": "13",
|
||||
"DpadLeft_ExtraData": "0",
|
||||
"DpadRight_InputType": "0",
|
||||
"DpadRight_Name": "dpright",
|
||||
"DpadRight_Data": "14",
|
||||
"DpadRight_ExtraData": "0",
|
||||
"CButtonUp_InputType": "0",
|
||||
"CButtonUp_Name": "y",
|
||||
"CButtonUp_Data": "3",
|
||||
"CButtonUp_ExtraData": "0",
|
||||
"CButtonDown_InputType": "1",
|
||||
"CButtonDown_Name": "righttrigger+",
|
||||
"CButtonDown_Data": "5",
|
||||
"CButtonDown_ExtraData": "1",
|
||||
"CButtonLeft_InputType": "0",
|
||||
"CButtonLeft_Name": "x",
|
||||
"CButtonLeft_Data": "2",
|
||||
"CButtonLeft_ExtraData": "0",
|
||||
"CButtonRight_InputType": "0",
|
||||
"CButtonRight_Name": "back",
|
||||
"CButtonRight_Data": "4",
|
||||
"CButtonRight_ExtraData": "0",
|
||||
"LeftTrigger_InputType": "0",
|
||||
"LeftTrigger_Name": "leftshoulder",
|
||||
"LeftTrigger_Data": "9",
|
||||
"LeftTrigger_ExtraData": "0",
|
||||
"RightTrigger_InputType": "0",
|
||||
"RightTrigger_Name": "rightshoulder",
|
||||
"RightTrigger_Data": "10",
|
||||
"RightTrigger_ExtraData": "0",
|
||||
"ZTrigger_InputType": "1",
|
||||
"ZTrigger_Name": "lefttrigger+",
|
||||
"ZTrigger_Data": "4",
|
||||
"ZTrigger_ExtraData": "1",
|
||||
"AnalogStickUp_InputType": "1",
|
||||
"AnalogStickUp_Name": "lefty-",
|
||||
"AnalogStickUp_Data": "1",
|
||||
"AnalogStickUp_ExtraData": "0",
|
||||
"AnalogStickDown_InputType": "1",
|
||||
"AnalogStickDown_Name": "lefty+",
|
||||
"AnalogStickDown_Data": "1",
|
||||
"AnalogStickDown_ExtraData": "1",
|
||||
"AnalogStickLeft_InputType": "1",
|
||||
"AnalogStickLeft_Name": "leftx-",
|
||||
"AnalogStickLeft_Data": "0",
|
||||
"AnalogStickLeft_ExtraData": "0",
|
||||
"AnalogStickRight_InputType": "1",
|
||||
"AnalogStickRight_Name": "leftx+",
|
||||
"AnalogStickRight_Data": "0",
|
||||
"AnalogStickRight_ExtraData": "1"
|
||||
},
|
||||
{
|
||||
"DeviceName": [ "Nintendo GameCube Controller" ],
|
||||
"DeviceType": 4,
|
||||
"A_InputType": "0",
|
||||
"A_Name": "a",
|
||||
"A_Data": "0",
|
||||
"A_ExtraData": "0",
|
||||
"B_InputType": "0",
|
||||
"B_Name": "b",
|
||||
"B_Data": "1",
|
||||
"B_ExtraData": "0",
|
||||
"Start_InputType": "0",
|
||||
"Start_Name": "start",
|
||||
"Start_Data": "6",
|
||||
"Start_ExtraData": "0",
|
||||
"DpadUp_InputType": "0",
|
||||
"DpadUp_Name": "dpup",
|
||||
"DpadUp_Data": "11",
|
||||
"DpadUp_ExtraData": "0",
|
||||
"DpadDown_InputType": "0",
|
||||
"DpadDown_Name": "dpdown",
|
||||
"DpadDown_Data": "12",
|
||||
"DpadDown_ExtraData": "0",
|
||||
"DpadLeft_InputType": "0",
|
||||
"DpadLeft_Name": "dpleft",
|
||||
"DpadLeft_Data": "13",
|
||||
"DpadLeft_ExtraData": "0",
|
||||
"DpadRight_InputType": "0",
|
||||
"DpadRight_Name": "dpright",
|
||||
"DpadRight_Data": "14",
|
||||
"DpadRight_ExtraData": "0",
|
||||
"CButtonUp_InputType": "1;0",
|
||||
"CButtonUp_Name": "righty-;y",
|
||||
"CButtonUp_Data": "3;3",
|
||||
"CButtonUp_ExtraData": "0;0",
|
||||
"CButtonDown_InputType": "1",
|
||||
"CButtonDown_Name": "righty+",
|
||||
"CButtonDown_Data": "3",
|
||||
"CButtonDown_ExtraData": "1",
|
||||
"CButtonLeft_InputType": "1",
|
||||
"CButtonLeft_Name": "rightx-",
|
||||
"CButtonLeft_Data": "2",
|
||||
"CButtonLeft_ExtraData": "0",
|
||||
"CButtonRight_InputType": "1;0",
|
||||
"CButtonRight_Name": "rightx+;x",
|
||||
"CButtonRight_Data": "2;2",
|
||||
"CButtonRight_ExtraData": "1;0",
|
||||
"LeftTrigger_InputType": "0",
|
||||
"LeftTrigger_Name": "rightshoulder",
|
||||
"LeftTrigger_Data": "10",
|
||||
"LeftTrigger_ExtraData": "0",
|
||||
"RightTrigger_InputType": "1",
|
||||
"RightTrigger_Name": "righttrigger+",
|
||||
"RightTrigger_Data": "5",
|
||||
"RightTrigger_ExtraData": "1",
|
||||
"ZTrigger_InputType": "1",
|
||||
"ZTrigger_Name": "lefttrigger+",
|
||||
"ZTrigger_Data": "4",
|
||||
"ZTrigger_ExtraData": "1",
|
||||
"AnalogStickUp_InputType": "1",
|
||||
"AnalogStickUp_Name": "lefty-",
|
||||
"AnalogStickUp_Data": "1",
|
||||
"AnalogStickUp_ExtraData": "0",
|
||||
"AnalogStickDown_InputType": "1",
|
||||
"AnalogStickDown_Name": "lefty+",
|
||||
"AnalogStickDown_Data": "1",
|
||||
"AnalogStickDown_ExtraData": "1",
|
||||
"AnalogStickLeft_InputType": "1",
|
||||
"AnalogStickLeft_Name": "leftx-",
|
||||
"AnalogStickLeft_Data": "0",
|
||||
"AnalogStickLeft_ExtraData": "0",
|
||||
"AnalogStickRight_InputType": "1",
|
||||
"AnalogStickRight_Name": "leftx+",
|
||||
"AnalogStickRight_Data": "0",
|
||||
"AnalogStickRight_ExtraData": "1"
|
||||
}
|
||||
]
|
||||
@@ -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" \
|
||||
"$@"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# Maintainer: Rosalie Wanders <rosalie@mailbox.org>
|
||||
pkgname=rmg
|
||||
pkgver=0.5.8
|
||||
pkgver=0.8.6
|
||||
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" "xdg-user-dirs")
|
||||
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"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Name: RMG
|
||||
Version: 0.5.8
|
||||
Version: 0.8.6
|
||||
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,14 +44,11 @@ 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
|
||||
%cmake_install
|
||||
chmod +x %{buildroot}/usr/lib64/RMG/*.so
|
||||
chmod +x %{buildroot}/usr/lib64/RMG/*/*.so
|
||||
chmod +x %{buildroot}/usr/lib64/RMG/*/*/*.so
|
||||
|
||||
%files
|
||||
/usr/bin/RMG
|
||||
@@ -56,7 +57,7 @@ chmod +x %{buildroot}/usr/lib64/RMG/*/*/*.so
|
||||
/usr/share/RMG/
|
||||
/usr/share/applications/com.github.Rosalie241.RMG.desktop
|
||||
/usr/share/icons/hicolor/scalable/apps/com.github.Rosalie241.RMG.svg
|
||||
/usr/share/metainfo/com.github.Rosalie241.RMG.appdata.xml
|
||||
/usr/share/metainfo/com.github.Rosalie241.RMG.metainfo.xml
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
|
||||
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 277 KiB After Width: | Height: | Size: 460 KiB |
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 55 KiB |
@@ -1,38 +1,436 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!-- Copyright 2022 Rosalie Wanders -->
|
||||
<component type="desktop">
|
||||
<!--Created with jdAppdataEdit 2.1-->
|
||||
<!-- Copyright 2024 Rosalie Wanders -->
|
||||
<component type="desktop-application">
|
||||
<!--Created with jdAppStreamEdit 9.1-->
|
||||
<id>com.github.Rosalie241.RMG</id>
|
||||
<name>Rosalie's Mupen GUI</name>
|
||||
<summary>An easy to use & cross-platform mupen64plus front-end written in C++ & Qt</summary>
|
||||
<developer_name>Rosalie</developer_name>
|
||||
<launchable type="desktop-id">com.github.Rosalie241.RMG.desktop</launchable>
|
||||
<summary>Play Nintendo 64 games easily</summary>
|
||||
<developer id="com.github.rosalie241">
|
||||
<name>Rosalie</name>
|
||||
</developer>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>GPL-3.0-only</project_license>
|
||||
<description><p>Rosalie's Mupen GUI is an easy to use yet customizable mupen64plus front-end, allowing you to easily play N64 games.</p></description>
|
||||
<update_contact>rosalie@mailbox.org</update_contact>
|
||||
<description>
|
||||
<p>Rosalie's Mupen GUI is an easy to use yet customizable mupen64plus front-end, allowing you to easily play Nintendo 64 games.</p>
|
||||
</description>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<caption>01 - The Rom Browser</caption>
|
||||
<caption>The Rom Browser</caption>
|
||||
<image type="source">https://github.com/Rosalie241/RMG/raw/master/Package/Screenshots/RomBrowser.png</image>
|
||||
</screenshot>
|
||||
<screenshot type="default">
|
||||
<caption>02 - During A Game</caption>
|
||||
<caption>During A Game</caption>
|
||||
<image type="source">https://github.com/Rosalie241/RMG/raw/master/Package/Screenshots/InGame.png</image>
|
||||
</screenshot>
|
||||
<screenshot type="default">
|
||||
<caption>03 - Cheats</caption>
|
||||
<image type="source">https://github.com/Rosalie241/RMG/raw/master/Package/Screenshots/Cheats.png</image>
|
||||
</screenshot>
|
||||
<screenshot type="default">
|
||||
<caption>04 - Settings</caption>
|
||||
<image type="source">https://github.com/Rosalie241/RMG/raw/master/Package/Screenshots/Settings.png</image>
|
||||
</screenshot>
|
||||
<screenshot type="default">
|
||||
<caption>05 - Input Settings</caption>
|
||||
<caption>Input Settings</caption>
|
||||
<image type="source">https://github.com/Rosalie241/RMG/raw/master/Package/Screenshots/InputSettings.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<releases>
|
||||
<release version="v0.8.6" date="2025-10-19" type="stable">
|
||||
<description>
|
||||
<p>Changes:</p>
|
||||
<ul>
|
||||
<li>Fix game specific profile name being empty for ROMs with no internal ROM name in RMG-Input</li>
|
||||
<li>Fix GameBoy tower functionality not working in Pokemon Stadium when using a GameBoy save</li>
|
||||
<li>Fix currently set directory not being the starting directory in directory dialogs</li>
|
||||
<li>Fix ROM browser refreshing after 'Edit ROM Directory...' when the directory is the same</li>
|
||||
<li>Fix settings dialog not allowing you to select all supported PIF file variants</li>
|
||||
<li>Fix slowdown when using RMG-Input-GCA by polling input on a different thread</li>
|
||||
<li>Fix RMG-Input not using native controller button names for the face buttons in the configuration GUI</li>
|
||||
<li>Add icons to the cheats dialog</li>
|
||||
<li>Add icons to the context menu of the ROM browser</li>
|
||||
<li>Add icons to the buttons of the settings dialog</li>
|
||||
<li>Add icons to the buttons of the options dialog in RMG-Input</li>
|
||||
<li>Add 'Swap Z and L' setting to RMG-Input-GCA</li>
|
||||
<li>Add Auto-Configure feature to RMG-Input</li>
|
||||
<li>Add more bounds checking to mupen64plus-core</li>
|
||||
<li>Remove user directories override settings</li>
|
||||
<li>Update mupen64plus-core</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<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>
|
||||
<ul>
|
||||
<li>Fix mupen64plus-core URL in the about dialog</li>
|
||||
<li>Fix GLideN64 not showing native path seperator in the configuration dialog</li>
|
||||
<li>Add 'SDL controller mode' option to the options dialog of RMG-Input</li>
|
||||
<li>Add 'None' option to configuration file of mupen64plus-input-gca (thank you GhostlyDark)</li>
|
||||
<li>Update GLideN64, mupen64plus-core and SDL_GameControllerDB</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="v0.6.5" date="2024-07-04" type="stable">
|
||||
<description>
|
||||
<p>Changes:</p>
|
||||
<ul>
|
||||
<li>Fix not showing an error when per-game plugin settings are invalid</li>
|
||||
<li>Fix settings dialog behavior for plugins not being the same for per-game plugin settings</li>
|
||||
<li>Add 'restore defaults' button to configuration GUI of paraLLEl and angrylion-rdp-plus</li>
|
||||
<li>Add 'OpenGL type' option to the settings dialog which allows choosing OpenGL ES</li>
|
||||
<li>Add dynamic OpenGL ES detection to angrylion-rdp-plus</li>
|
||||
<li>Improve screen size selection by making it editable in the configuration GUI of paraLLEl and angrylion-rdp-plus</li>
|
||||
<li>Improve letter casing in settings dialog, RMG-Input and RMG-Audio</li>
|
||||
<li>Improve about dialog</li>
|
||||
<li>Change 'Miscellaneous' tab name to 'General' and change position in settings dialog</li>
|
||||
<li>Update GLideN64 and SDL_GameControllerDB</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="v0.6.4" date="2024-06-25" type="stable">
|
||||
<description>
|
||||
<p>Changes:</p>
|
||||
<ul>
|
||||
<li>Fix soft and hard reset freezing RMG when using parallel-rsp</li>
|
||||
<li>Add 'System Region' to ROM Information dialog</li>
|
||||
<li>Add defaults for the audio hotkey settings</li>
|
||||
<li>Improve settings dialog behavior when having plugins with the same name</li>
|
||||
<li>Improve settings dialog behavior by sorting the plugins</li>
|
||||
<li>Change audio resampler default to "src-linear" in RMG-Audio (thank you Fanatic-64)</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="v0.6.3" date="2024-06-24" type="stable">
|
||||
<description>
|
||||
<p>Changes:</p>
|
||||
<ul>
|
||||
<li>Fix possible memory leak in the cheat dialog</li>
|
||||
<li>Add log messages when initializing OpenGL or Vulkan fails</li>
|
||||
<li>Add PIF ROM settings to the settings dialog</li>
|
||||
<li>Add Transfer Pak setting to the settings dialog</li>
|
||||
<li>Improve settings dialog behavior when a plugin hasn't been found</li>
|
||||
<li>Improve error messages by removing the exclamation mark</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="v0.6.2" date="2024-06-08" type="stable">
|
||||
<description>
|
||||
<p>Changes:</p>
|
||||
<ul>
|
||||
<li>Fix updater not working on windows with non-portable installs</li>
|
||||
<li>Fix OSD not showing native path separator when saving and loading a state from a file</li>
|
||||
<li>Fix statusbar message not being up-to-date in some cases</li>
|
||||
<li>Fix GLideN64 regression introduced in v0.6.1</li>
|
||||
<li>Fix cmake not making installed libraries executable</li>
|
||||
<li>Add 'Project64 Save State' option when saving a state to a file</li>
|
||||
<li>Revert update to mupen64plus-video-parallel (thank you themaister for looking into the regression)</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="v0.6.1" date="2024-06-05" type="stable">
|
||||
<description>
|
||||
<p>Changes:</p>
|
||||
<ul>
|
||||
<li>Fix vulkan video plugins crashing on second emulation run on some systems</li>
|
||||
<li>Fix log dialog not showing a monospace font on windows</li>
|
||||
<li>Remove settings dialog storing and restoring the window size</li>
|
||||
<li>Add missing vsync option to angrylion-rdp-plus</li>
|
||||
<li>Update imgui, mupen64plus-video-parallel, GLideN64 and SDL_GameControllerDB</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="v0.6.0" date="2024-05-24" type="stable">
|
||||
<description>
|
||||
<p>Changes:</p>
|
||||
<ul>
|
||||
<li>Fix 7z not being listed in the ROM browser when there are no ROMs found</li>
|
||||
<li>Fix crash in GLideN64 with certain texture packs</li>
|
||||
<li>Fix GLideN64 being able to create a large log file</li>
|
||||
<li>Fix possible freezing by rate limiting callback messages</li>
|
||||
<li>Update mupen64plus-core, angrylion-rdp-plus, GLideN64 and SDL_GameControllerDB</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="v0.5.9" date="2024-05-01" type="stable">
|
||||
<description>
|
||||
<p>Changes:</p>
|
||||
<ul>
|
||||
<li>Fix parallel-rsp regression introduced in v0.5.8</li>
|
||||
<li>Fix corruption when using GLideN64 and resizing the window</li>
|
||||
<li>Fix changing save state slot always selecting slot 0 on some system configurations</li>
|
||||
<li>Fix changing speed factor always using 0% on some system configurations</li>
|
||||
<li>Add color settings for the OSD in the settings dialog</li>
|
||||
<li>Add 'Test Rumble' button to the options dialog in RMG-Input</li>
|
||||
<li>Add 'Play Game with State' to the context menu of the ROM browser</li>
|
||||
<li>Add '--load-state-slot' commandline option</li>
|
||||
<li>Update cheats and GLideN64</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="v0.5.8" date="2024-03-25" type="stable">
|
||||
<description>
|
||||
<p>Changes:</p>
|
||||
@@ -269,7 +667,7 @@
|
||||
<description>
|
||||
<p>Changes:</p>
|
||||
<ul>
|
||||
<li>Fix "Don't check for updates again" checkbox appearing when requesting an update check through Help -> Check For Updates</li>
|
||||
<li>Fix "Don't check for updates again" checkbox appearing when requesting an update check through Help -> Check For Updates</li>
|
||||
<li>Add game format, file name, file extension, file size, game I.D. and game region columns to the list view of the ROM browser which can be toggled in the "Show/Hide Columns" menu of the context menu in the list view of the ROM browser (thank you RetraCarteR)</li>
|
||||
<li>Add "Reset Column Sizes" to context menu of the list view of the ROM browser (thank you RetraCarteR)</li>
|
||||
<li>Add "Analog Stick Sensitivity" setting to RMG-Input (thank you JaxonWasTaken)</li>
|
||||
@@ -422,7 +820,7 @@
|
||||
<li>Add "Play Game with Cartridge" to context menu when a 64DD disk is selected in the ROM Browser</li>
|
||||
<li>Add "Open ROM Directory" to context menu in the ROM Browser</li>
|
||||
<li>Add an On-Screen Display (see the OSD tab in the settings dialog for settings)</li>
|
||||
<li>Add Theme setting to settings dialog (see Interface -> Miscellaneous, this is a replacement for the previous Styles settings)</li>
|
||||
<li>Add Theme setting to settings dialog (see Interface -> Miscellaneous, this is a replacement for the previous Styles settings)</li>
|
||||
<li>Improve error message when opening a zip file fails</li>
|
||||
<li>Improve tab order and naming in settings dialog</li>
|
||||
</ul>
|
||||
@@ -566,7 +964,7 @@
|
||||
<li>Fix --fullscreen not working like expected</li>
|
||||
<li>Fix crash on windows when exiting</li>
|
||||
<li>Implement octagon simulation in RMG-Input (thank you Jaxon)</li>
|
||||
<li>implement cheat support</li>
|
||||
<li>Implement cheat support</li>
|
||||
<li>Add 'Invert Axis Mapped To LRZ' option to RMG-Input</li>
|
||||
<li>Add --disk commandline argument (for opening N64 ROMs with 64DD disk files)</li>
|
||||
<li>Add configuration GUI to angrylion-rdp-plus (thank you GhostlyDark)</li>
|
||||
@@ -603,8 +1001,13 @@
|
||||
<recommends>
|
||||
<control>pointing</control>
|
||||
<control>keyboard</control>
|
||||
<control>gamepad</control>
|
||||
</recommends>
|
||||
<supports>
|
||||
<control>voice</control>
|
||||
</supports>
|
||||
<content_rating type="oars-1.1"/>
|
||||
<launchable type="desktop-id">com.github.Rosalie241.RMG.desktop</launchable>
|
||||
<keywords>
|
||||
<keyword>mupen64plus</keyword>
|
||||
<keyword>RMG</keyword>
|
||||
@@ -38,13 +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 zlib-ng-devel binutils-devel speexdsp-devel qt6-qtbase-devel qt6-qtsvg-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 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 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
|
||||
```
|
||||
|
||||
@@ -61,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-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 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
|
||||
```
|
||||
|
||||
|
||||
@@ -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
|
||||
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,36 +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 --release --features "m64p_compat"
|
||||
BUILD_IN_SOURCE True
|
||||
|
||||
BUILD_BYPRODUCTS ${CMAKE_CURRENT_SOURCE_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})
|
||||
@@ -214,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
|
||||
@@ -230,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
|
||||
@@ -256,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)
|
||||
@@ -309,29 +269,18 @@ 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)
|
||||
endif(USE_ANGRYLION)
|
||||
|
||||
ExternalProject_Get_property(mupen64plus-video-GLideN64 BUILD_BYPRODUCTS)
|
||||
set(MUPEN64PLUS_PLUGIN_GFX_GLIDEN64 ${BUILD_BYPRODUCTS} ${GLIDENUI_TRANSLATIONS} ${GLIDEN64_CUSTOM_INI} PARENT_SCOPE)
|
||||
set(MUPEN64PLUS_PLUGIN_GFX_GLIDEN64 ${BUILD_BYPRODUCTS} PARENT_SCOPE)
|
||||
set(MUPEN64PLUS_PLUGIN_GFX_GLIDEN64_DATA ${GLIDENUI_TRANSLATIONS} ${GLIDEN64_CUSTOM_INI} PARENT_SCOPE)
|
||||
|
||||
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
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
[subrepo]
|
||||
remote = git@github.com:/gabomdq/SDL_GameControllerDB.git
|
||||
branch = master
|
||||
commit = e5a5fa2ac6e645d72c619ea99520a3a4586ee005
|
||||
parent = cb07131fbbf9cf9f139ef4281799613a71580182
|
||||
commit = 38fc811c715365e963a6942092cae147eddddc90
|
||||
parent = f0bc3df81827953535b8d8702be34a0ed1edd227
|
||||
method = merge
|
||||
cmdver = 0.4.6
|
||||
cmdver = 0.4.9
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SDL_GameControllerDB
|
||||
|
||||
A community sourced database of game controller mappings to be used with SDL2 Game Controller functionality.
|
||||
A community sourced database of game controller mappings to be used with SDL2 and SDL3 Game Controller functionality.
|
||||
|
||||
# Usage
|
||||
Download gamecontrollerdb.txt, place it in your app's directory and load it.
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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)
|
||||
@@ -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()
|
||||
@@ -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.
|
||||
|
||||
@@ -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!
|
||||
|
||||
@@ -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
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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()
|
||||
@@ -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()
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
@@ -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()
|
||||
@@ -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()
|
||||
@@ -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()
|
||||
@@ -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}
|
||||
@@ -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()
|
||||
@@ -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()
|
||||
@@ -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)
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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: *;
|
||||
};
|
||||
@@ -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
|
||||
@@ -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
|
||||
...
|
||||
@@ -1,5 +0,0 @@
|
||||
/build*/
|
||||
/.vscode/
|
||||
/thirdparty/
|
||||
.vs/
|
||||
.DS_Store
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -1,56 +0,0 @@
|
||||
cmake_minimum_required (VERSION 3.2.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)
|
||||
@@ -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.
|
||||
@@ -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 | [](https://travis-ci.org/discordapp/discord-rpc) |
|
||||
| AppVeyor | [](https://ci.appveyor.com/project/crmarsh/discord-rpc) |
|
||||
| Buildkite (internal) | [](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) |
|
||||
@@ -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
|
||||
@@ -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())
|
||||
@@ -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.
|
||||
|
Before Width: | Height: | Size: 318 KiB |
|
Before Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 14 KiB |