mirror of
https://github.com/visualboyadvance-m/visualboyadvance-m
synced 2025-10-06 08:02:50 +02:00
Compare commits
462 Commits
gcc-clang-
...
game-contr
Author | SHA1 | Date | |
---|---|---|---|
|
d3f345208d | ||
|
8183a005af | ||
|
75a34cd098 | ||
|
23e1573442 | ||
|
98b51910eb | ||
|
c3f0aa2edf | ||
|
ea596e4cb0 | ||
|
68adb14b07 | ||
|
a565cea8e9 | ||
|
6ac95d373f | ||
|
d4430ca440 | ||
|
000c7f854c | ||
|
047bd935ea | ||
|
33cb9a66d4 | ||
|
f8374b52a8 | ||
|
2f10e71f1d | ||
|
8f92d99968 | ||
|
ce12db1e06 | ||
|
d8a1886ccb | ||
|
1d051d0e6e | ||
|
f96e42fe04 | ||
|
aa59d94490 | ||
|
07e490254c | ||
|
18b97b4342 | ||
|
b45a4066b1 | ||
|
1fff5cb1f7 | ||
|
13a16eb79c | ||
|
69769c1bef | ||
|
e998a4016a | ||
|
f17a9855f3 | ||
|
85b7cf7aec | ||
|
f46da1c525 | ||
|
404e9a1a55 | ||
|
3ec8960f1a | ||
|
613bd4038a | ||
|
ecb69a240a | ||
|
215e3c5ae9 | ||
|
e5aa685f70 | ||
|
53e1f44a69 | ||
|
9e4c8e1753 | ||
|
5f853b99ad | ||
|
e7d135dbf1 | ||
|
60fc096f1a | ||
|
32bc9c9dc7 | ||
|
84b0a3e366 | ||
|
418b7b64dc | ||
|
2ad7dd1a79 | ||
|
f915ec5972 | ||
|
37acfc8d50 | ||
|
9202bfd55e | ||
|
23ef8ef0f9 | ||
|
390482a719 | ||
|
d1aa4eb23d | ||
|
7dc95076e5 | ||
|
92d9230e2c | ||
|
6e2f1f1103 | ||
|
fa720aea07 | ||
|
e70e57a5c0 | ||
|
9e2a9b479a | ||
|
3ab048bebf | ||
|
a045270164 | ||
|
3c5348983b | ||
|
db355126d3 | ||
|
eea649ae16 | ||
|
9e9fe812d2 | ||
|
c0e71b0cb4 | ||
|
ddc6fd7080 | ||
|
8184522c6d | ||
|
e955501f61 | ||
|
ef09fca4d1 | ||
|
78b99d8b23 | ||
|
717ac7ed74 | ||
|
59d67fe703 | ||
|
de1f4dffba | ||
|
491f104b89 | ||
|
244ee8ebfa | ||
|
3683938ec7 | ||
|
64d8cfffc2 | ||
|
18f3449c31 | ||
|
8db618625d | ||
|
a262a2facf | ||
|
beab088139 | ||
|
215e9b1ac2 | ||
|
0e68a2340c | ||
|
0eb65a0eb3 | ||
|
1af7aa2333 | ||
|
e9162a0d28 | ||
|
99923dd126 | ||
|
3a1b577d0a | ||
|
bf2452aab9 | ||
|
71ca0fb270 | ||
|
e19e13fa0a | ||
|
1c76e3b0f4 | ||
|
c36c3e0250 | ||
|
6c38eaa2a5 | ||
|
7e1afcd37c | ||
|
d8d3ee2b48 | ||
|
df83b4ba80 | ||
|
32581966ae | ||
|
67af67278e | ||
|
e17d2cbaf5 | ||
|
7e46939826 | ||
|
0501f985a3 | ||
|
cee1789259 | ||
|
aca206a721 | ||
|
93a24bee3c | ||
|
ea5cbba016 | ||
|
f6e3daf9d8 | ||
|
0f4ec57557 | ||
|
7a7778c644 | ||
|
803ab35269 | ||
|
24b6ac5a28 | ||
|
0e5d63cd9a | ||
|
cd8d65bddd | ||
|
2407923fc0 | ||
|
37f4affe55 | ||
|
76cb71464d | ||
|
0cd79a96f5 | ||
|
3745eea419 | ||
|
a2378f05f6 | ||
|
f7d4370789 | ||
|
46de99a0da | ||
|
5583175559 | ||
|
14a4b6f820 | ||
|
5f421b53c0 | ||
|
32d273ad78 | ||
|
774fbab7cc | ||
|
00645906a5 | ||
|
bde372bc72 | ||
|
d0194d9a75 | ||
|
7561ca97c1 | ||
|
24b92462f9 | ||
|
ffec5aba5e | ||
|
882957a2d3 | ||
|
5b65066bf8 | ||
|
790618102d | ||
|
9331dbf9c8 | ||
|
6f68bfcf71 | ||
|
7b8c4242fb | ||
|
df84f2b005 | ||
|
d08c9137c1 | ||
|
7aafce0665 | ||
|
e26f807355 | ||
|
4c8b54de89 | ||
|
bad388e0aa | ||
|
d1f6500098 | ||
|
fda429fc64 | ||
|
b139572424 | ||
|
b9694e1900 | ||
|
5aa3ea92b9 | ||
|
7b5d4a82d7 | ||
|
1f57d5f797 | ||
|
0e29be8735 | ||
|
75b79d91f1 | ||
|
52c05c7147 | ||
|
d8d6991c4b | ||
|
36e88fafb6 | ||
|
93fbb5618d | ||
|
6a1be5d4ad | ||
|
23aa083cd4 | ||
|
40711fa5c9 | ||
|
86bef62faf | ||
|
928a61704f | ||
|
019fcda9c1 | ||
|
7005b92840 | ||
|
e91e4dcf17 | ||
|
88b07df394 | ||
|
3cef52b72d | ||
|
d3f8cc1714 | ||
|
df81959825 | ||
|
0132c76100 | ||
|
e505236ec4 | ||
|
785af394f6 | ||
|
f15b09f8e5 | ||
|
1ab46f704f | ||
|
9889ef4fa8 | ||
|
1d7e8ae4ed | ||
|
892527e53b | ||
|
bd7eac6c4b | ||
|
efffe7c333 | ||
|
a529ddfe49 | ||
|
9a8a077443 | ||
|
a9284b3d66 | ||
|
166299cda6 | ||
|
1a63a27c62 | ||
|
640ce45325 | ||
|
83d24828df | ||
|
f1d3f631d2 | ||
|
d1733c4505 | ||
|
d37a3a32e1 | ||
|
3f507b6c6a | ||
|
e560efb08f | ||
|
ca841e9bae | ||
|
4b605b4b1a | ||
|
d756f6716f | ||
|
49140fe5dd | ||
|
5d4f1bd0d9 | ||
|
91873254d3 | ||
|
ae09ae7d59 | ||
|
950a4070c1 | ||
|
216bf4d7e4 | ||
|
f0fd9208b7 | ||
|
31e17c1ba4 | ||
|
2b950e282f | ||
|
f84a164072 | ||
|
60568d26e0 | ||
|
64921c6535 | ||
|
257150f46b | ||
|
61046c76bf | ||
|
fad2e7a310 | ||
|
2cec46f825 | ||
|
dc6659857c | ||
|
1c2a62f055 | ||
|
7d9cb2b5f0 | ||
|
5385b477da | ||
|
aabb70cb85 | ||
|
266512fbbc | ||
|
be1e5ca18c | ||
|
1fb18b320f | ||
|
561d6e1ab0 | ||
|
78724bc893 | ||
|
addd53b69d | ||
|
2e3ce863c7 | ||
|
4c4ce3cf37 | ||
|
ca7ae3363e | ||
|
25bcf2e42d | ||
|
b34448c9eb | ||
|
3989146fa5 | ||
|
0a96d84581 | ||
|
6a4115ca45 | ||
|
6307348cbc | ||
|
77f1235a95 | ||
|
9963b81506 | ||
|
7a45c16539 | ||
|
87bdc93e15 | ||
|
ab4ae96e05 | ||
|
8e4acfc91d | ||
|
3c41b68d51 | ||
|
e10bf7bc4b | ||
|
8329ba9646 | ||
|
7aa1f59128 | ||
|
a16dd2c9f7 | ||
|
26818177e8 | ||
|
22578d02eb | ||
|
f8c1d31294 | ||
|
fd2df853b6 | ||
|
cf600890bf | ||
|
0ca1771a49 | ||
|
1ac7ac999b | ||
|
77e9ea6a2f | ||
|
ccb9af2c64 | ||
|
dcc5ae07d0 | ||
|
ea10306daa | ||
|
a42e166e94 | ||
|
2a65e92da2 | ||
|
6d8ca723d0 | ||
|
5807376fba | ||
|
1a687e564b | ||
|
8f1b5dae90 | ||
|
0483524870 | ||
|
61b503ada4 | ||
|
d6aa168718 | ||
|
364dad84a9 | ||
|
02f516f646 | ||
|
f138b44a50 | ||
|
080be1a325 | ||
|
0a104a9a9d | ||
|
0bfb88d0e3 | ||
|
873de5f667 | ||
|
9bf6a25048 | ||
|
ea2a929f5e | ||
|
0ca5184dda | ||
|
d2d070b52f | ||
|
c40a141792 | ||
|
5d2dd01e85 | ||
|
00344ca8f1 | ||
|
af4951511e | ||
|
da686a4827 | ||
|
ec27885c36 | ||
|
c27d384a53 | ||
|
75e46b7117 | ||
|
c249115b7a | ||
|
d23b374fbf | ||
|
2985b46926 | ||
|
54b8192d30 | ||
|
927ccf0bc8 | ||
|
8c1bd84f40 | ||
|
297d7c06c4 | ||
|
0d86432a31 | ||
|
95337da558 | ||
|
d6331ff92e | ||
|
69a4061ab9 | ||
|
8f27869715 | ||
|
7e30b03889 | ||
|
09bb3c3acf | ||
|
655cfb929d | ||
|
e2f3a64143 | ||
|
1c95df1212 | ||
|
3158b73d69 | ||
|
62671753a9 | ||
|
cb3fc44789 | ||
|
ac2a56be7f | ||
|
ba2513b511 | ||
|
0594fa2a2c | ||
|
9864dc2853 | ||
|
12f39b86b1 | ||
|
eed171aac0 | ||
|
603d6a3872 | ||
|
f8974d8870 | ||
|
6be626d4c7 | ||
|
8771172d19 | ||
|
85a95dcde0 | ||
|
343eafc477 | ||
|
1425248072 | ||
|
4bdd3798f1 | ||
|
7c25d64d69 | ||
|
69d24fb53e | ||
|
b027e64753 | ||
|
1d4eb48a68 | ||
|
1e1451c57f | ||
|
b2ec1544be | ||
|
239b244640 | ||
|
9cc45c355b | ||
|
4a056c7720 | ||
|
c4d46a713f | ||
|
dd6071e5cb | ||
|
c10338a854 | ||
|
a92c448405 | ||
|
90fc3e12e2 | ||
|
a57d81e1af | ||
|
97c24ec2d2 | ||
|
2d3610b5c6 | ||
|
adb9f62080 | ||
|
67e7cfc200 | ||
|
bad9538ed4 | ||
|
8e83209121 | ||
|
13c558ac9f | ||
|
3eb9fbdb7e | ||
|
e140ba816c | ||
|
355c8efeb4 | ||
|
7d606f7065 | ||
|
ec90072c28 | ||
|
0fd1daae54 | ||
|
913db72d12 | ||
|
2da9696a50 | ||
|
b1c7476f2c | ||
|
cf57af4a83 | ||
|
e0ae114f2e | ||
|
6b8b6b6450 | ||
|
7f1d49d3d0 | ||
|
9bda107d3c | ||
|
dd10b8075f | ||
|
2d5fdf8e79 | ||
|
f68492cbbf | ||
|
639003a8b6 | ||
|
a3b2a35395 | ||
|
60caad8666 | ||
|
a87a6a2cc1 | ||
|
236cffb42b | ||
|
643ec0f7b6 | ||
|
395ed0eb2a | ||
|
50a1391232 | ||
|
a56ea0225a | ||
|
60d7ead565 | ||
|
d2fee771fd | ||
|
5008ffbacf | ||
|
e29032d48a | ||
|
fb99a07625 | ||
|
51473a7c53 | ||
|
3f2d3c139d | ||
|
1cfe275012 | ||
|
4aebd0b802 | ||
|
d7abc27438 | ||
|
76bf554161 | ||
|
f132e15511 | ||
|
37dc95b930 | ||
|
941eef918b | ||
|
94627c1e8e | ||
|
3e224bab40 | ||
|
72d772189a | ||
|
a413eb048c | ||
|
fed8c3697e | ||
|
3abf084f2f | ||
|
05e58ba0a7 | ||
|
c9994c284a | ||
|
595a9e49c0 | ||
|
732524a77b | ||
|
f7ce25f496 | ||
|
61d494af4e | ||
|
17038c27d1 | ||
|
75f0a061be | ||
|
27a0d41ad8 | ||
|
4f9d161c02 | ||
|
571d42d2fa | ||
|
1bd2f049cb | ||
|
b28982a89a | ||
|
d91e5db524 | ||
|
cbd7d7d2d1 | ||
|
570596266f | ||
|
cf39d9bbd1 | ||
|
d014ebd2b2 | ||
|
8483fde365 | ||
|
ad7dbf253c | ||
|
461c4a7bd4 | ||
|
1fc449b2c7 | ||
|
1a6f40a79c | ||
|
1e0eea3c08 | ||
|
9a325f086e | ||
|
2810f4b228 | ||
|
8caea3ae6c | ||
|
8c1ebf4d59 | ||
|
715c66b52c | ||
|
dedfb615d5 | ||
|
ec434a7c2f | ||
|
a6affd3807 | ||
|
7f4b5b6f93 | ||
|
287bb5f3a2 | ||
|
50f64b0e8b | ||
|
e7924caca0 | ||
|
f16d1d0725 | ||
|
8ea020d373 | ||
|
7726d26f9c | ||
|
252b65b13c | ||
|
56ffb12758 | ||
|
66c224e122 | ||
|
dc4d431d7a | ||
|
09eb6628e8 | ||
|
9b84396adb | ||
|
bb1d44ae0a | ||
|
df991bae0a | ||
|
a00e4345d0 | ||
|
be7b1ef1d2 | ||
|
f7633ca274 | ||
|
03d962dfea | ||
|
c1c4daf5e3 | ||
|
a9e594a38a | ||
|
18a84e5cad | ||
|
bd1adc87e0 | ||
|
2d6457c0f4 | ||
|
85e991a0e8 | ||
|
265342135d | ||
|
d729ac3ff2 | ||
|
8688d9f8e7 | ||
|
256008dffc | ||
|
a1f2ac8caf | ||
|
32503fd03a | ||
|
fd3029c858 | ||
|
27213d9626 | ||
|
b198c6b549 | ||
|
5961c1480b | ||
|
961b27f21d | ||
|
738b6406b8 | ||
|
5583effa89 | ||
|
ef8efd3187 | ||
|
6c9c53a119 | ||
|
12ec072b25 | ||
|
cdeb1027cc | ||
|
796dfe78f9 | ||
|
87e41300f1 | ||
|
7853718627 | ||
|
a7eeb17645 | ||
|
347df44497 |
63
.github/ISSUE_TEMPLATE.md
vendored
63
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,63 +0,0 @@
|
||||
<!---
|
||||
|
||||
BEFORE REPORTING AN ISSUE PLEASE TRY THE NIGHTLY FROM:
|
||||
|
||||
http://win.vba-m.com/nightly
|
||||
|
||||
AND DO A FACTORY RESET!
|
||||
|
||||
On Linux build master from source or use the edge snap.
|
||||
|
||||
-->
|
||||
|
||||
<!--- Please fill out this form and delete any sections you are not using. -->
|
||||
|
||||
### Expected behavior
|
||||
|
||||
### Actual behavior
|
||||
|
||||
### Steps to reproduce the behavior
|
||||
|
||||
<!--- Crash bugs
|
||||
|
||||
If this is a crash bug, and you have the time and inclination, please provide a
|
||||
symblic backtrace.
|
||||
|
||||
Instructions for doing so are
|
||||
[here](https://github.com/visualboyadvance-m/visualboyadvance-m/blob/master/README.md#reporting-crash-bugs).
|
||||
-->
|
||||
|
||||
### ROM details
|
||||
|
||||
Which games are affected by the issue (please state if GBA or GB game):
|
||||
|
||||
Which games, if any, are NOT affected by the issue (please state if GBA or GB game):
|
||||
|
||||
Include screenshots of ROM Information (File > ROM Information):
|
||||
|
||||
If you are using a BIOS file, please say which one.
|
||||
|
||||
### Option details
|
||||
|
||||
Video driver (simple, opengl):
|
||||
|
||||
Sound driver (directsound, xaudio, openal, SDL):
|
||||
|
||||
### Build details
|
||||
|
||||
Operating System (Windows, Mac, Linux (state distribution), etc.):
|
||||
|
||||
If using Linux, specify if using xorg or Wayland:
|
||||
|
||||
Version of code (pre-built binary version, or commit ref, or just "master"):
|
||||
|
||||
<!--- Hardware details:
|
||||
|
||||
If your joystick or gamepad isn't working in Linux, please try to troubleshoot
|
||||
using the information on this page:
|
||||
https://wiki.archlinux.org/index.php/Gamepad **BEFORE** filing an issue. We use
|
||||
SDL for joystick support, any problems will generally be an issue with SDL and
|
||||
**NOT** the emulator.
|
||||
|
||||
If relevant, the joystick you are using and the drivers you are using for it:
|
||||
-->
|
116
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
116
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
name: Bug Report
|
||||
description: If you experience a bug in the Emulator, please open an issue here and fill out the template.
|
||||
title: "[Bug]: "
|
||||
labels: ["bug", "triage"]
|
||||
assignees:
|
||||
-
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "## BEFORE REPORTING AN ISSUE"
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please try the nightly build from: https://nightly.vba-m.com and factory resetting the emulator from the Help menu.
|
||||
On Linux build master from source or use the edge snap.
|
||||
And last but not least, search for existing reports via the filters bar on the issues page.
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "## If your joystick or gamepad isn't working in Linux"
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please try to troubleshoot using the information on this page:h ttps://wiki.archlinux.org/index.php/Gamepad **BEFORE** filing an issue.
|
||||
We use SDL for joystick support, any problems will generally be an issue with SDL and **NOT** the emulator.
|
||||
If relevant, the joystick you are using and the drivers you are using for it:
|
||||
- type: textarea
|
||||
id: what-should-happen
|
||||
attributes:
|
||||
label: Expected behavior?
|
||||
description: How was the emulator supposed to behave
|
||||
placeholder: Tell us what you expect to see!; use screenshots if necessary.
|
||||
value:
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: Actual behavior?
|
||||
description: Describe the issue you encountered.
|
||||
placeholder: Tell us what you see!; use screenshots if necessary.
|
||||
value:
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: repro
|
||||
attributes:
|
||||
label: Steps to reproduce the problem
|
||||
description: "How do you trigger this bug? Please walk us through it step by step."
|
||||
value: |
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
4.
|
||||
5.
|
||||
...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: error-messages
|
||||
attributes:
|
||||
label: Error messages?
|
||||
description: Was there an error message?
|
||||
placeholder: List any exception messages here!; use screenshots if necessary.
|
||||
value: |
|
||||
If this is a crash bug, and you have the time and inclination, please provide a symbolic backtrace.
|
||||
Instructions for doing so are [here](https://github.com/visualboyadvance-m/visualboyadvance-m/blob/master/README.md#reporting-crash-bugs).
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: Rom_Details
|
||||
attributes:
|
||||
label: What game were you playing
|
||||
description: "What is the specific rom that you encountered an issue with"
|
||||
value: |
|
||||
<Some of this information can be provided with a screenshot of Rom Information, SAVE TYPE for GBA titles can be obtained from Options > Game Boy Advance > Config>
|
||||
Title:
|
||||
GB, GBC or GBA:
|
||||
ROM CODE:
|
||||
BIOS Used?: (Share crc hash)
|
||||
SAVE TYPE: (Attach Battery or Savestate here)
|
||||
Clean, Intro'd or Hacked?:(Attach Patch here)
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: Settings
|
||||
attributes:
|
||||
label: What settings are you using?
|
||||
description: "Please list them"
|
||||
value: |
|
||||
Video driver (simple, opengl):
|
||||
Sound driver (directsound, xaudio, openal, SDL):
|
||||
Scale Filter Used?:
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: SysInfo
|
||||
attributes:
|
||||
label: Specifications and Build details
|
||||
description: "List your system information, you can obtain this from MSINFO32 and the emulators Titlebar."
|
||||
value: |
|
||||
VBA-M: (include commit version number and whether you are using the 32-bit or 64-bit version)
|
||||
OS: (include version and OS build number using WinVer if on Windows):
|
||||
If using Linux, specify if using xorg or Wayland:
|
||||
CPU:
|
||||
GPU:
|
||||
RAM:
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
id: Copyright_Compliance
|
||||
attributes:
|
||||
label: Copyright Compliance
|
||||
description: Please do not attach any files that infringe on the copyright of Nintendo or its partners.
|
||||
options:
|
||||
- label: There are no infringing files attached to this bug report.
|
||||
required: true
|
9
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
9
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: VBA-M Forum
|
||||
url: https://board.vba-m.com/
|
||||
about: For general questions and support please join our forum or our
|
||||
- name: VBA-M IRC Channel
|
||||
url: https://web.libera.chat/#vba-m
|
||||
about: For realtime discussion and support
|
||||
|
46
.github/ISSUE_TEMPLATE/feature.yml
vendored
Normal file
46
.github/ISSUE_TEMPLATE/feature.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Feature request
|
||||
description: >-
|
||||
If you would like a new feature in Visual Boy Advance - M, please
|
||||
open an issue here and fill out the template.
|
||||
title: '[Feature request]: '
|
||||
labels:
|
||||
- enhancement
|
||||
assignees:
|
||||
- null
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "## BEFORE CREATING A FEATURE REQUEST"
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please try a nightly build from: https://nightly.vba-m.com to see if your idea has already been implemented.
|
||||
On Linux build master from source or use the edge snap.
|
||||
And last but not least, search for existing requests via the filters bar on the issues page.
|
||||
- type: textarea
|
||||
id: feature-request
|
||||
attributes:
|
||||
label: Request box
|
||||
description: What feature would you like to see added?
|
||||
placeholder: Tell us what you would like to see added to Visual Boy Advance - M!
|
||||
value: null
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reason-why
|
||||
attributes:
|
||||
label: Reason box
|
||||
description: Provide reasoning for the new feature
|
||||
placeholder: Tell us why you'd like to see this feature added
|
||||
value: null
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: Examples
|
||||
attributes:
|
||||
label: Examples
|
||||
description: Provide examples of this feature
|
||||
placeholder: Provide examples or screenshots of this feature in other software
|
||||
value: null
|
||||
validations:
|
||||
required: true
|
27
.github/workflows/macos-build.yml
vendored
Normal file
27
.github/workflows/macos-build.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: macOS Latest Build
|
||||
on: [push, pull_request]
|
||||
#on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
cmake_build: ['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_BUILD_TYPE=Debug']
|
||||
cmake_options: ['', '-DENABLE_LINK=OFF', '-DENABLE_SDL=ON']
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install nix
|
||||
uses: cachix/install-nix-action@v22
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- name: Configure
|
||||
run: >-
|
||||
nix-shell --command 'cmake -B build -G Ninja ${{ matrix.cmake_build }} -DENABLE_LTO=OFF ${{ matrix.cmake_options }}'
|
||||
- name: Build
|
||||
run: >-
|
||||
nix-shell --command 'ninja -C build'
|
77
.github/workflows/msys2-build.yml
vendored
77
.github/workflows/msys2-build.yml
vendored
@@ -1,40 +1,37 @@
|
||||
name: MSYS2 Build
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
MSYSTEM: CLANG64
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
run: >-
|
||||
git config --global core.autocrlf true
|
||||
|
||||
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: CLANG64
|
||||
install: >-
|
||||
mingw-w64-clang-x86_64-toolchain
|
||||
mingw-w64-clang-x86_64-pkg-config
|
||||
mingw-w64-clang-x86_64-ffmpeg
|
||||
mingw-w64-clang-x86_64-FAudio
|
||||
mingw-w64-clang-x86_64-cmake
|
||||
mingw-w64-clang-x86_64-ninja
|
||||
mingw-w64-clang-x86_64-wxmsw3.1
|
||||
mingw-w64-clang-x86_64-sfml
|
||||
mingw-w64-clang-x86_64-SDL2
|
||||
zip
|
||||
- name: Configure
|
||||
run: >-
|
||||
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DVBAM_STATIC=ON -DENABLE_SSP=ON -DENABLE_ONLINEUPDATES=OFF
|
||||
- name: Build
|
||||
run: ninja -C build
|
||||
|
||||
- name: Install
|
||||
run: ninja -C build install
|
||||
name: MSYS2 Build
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
cmake_build: ['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_BUILD_TYPE=Debug']
|
||||
cmake_options: ['', '-DENABLE_LINK=OFF', '-DENABLE_SDL=ON']
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
MSYSTEM: CLANG64
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
|
||||
steps:
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Setup msys2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: CLANG64
|
||||
update: true
|
||||
- name: Install deps
|
||||
run: >-
|
||||
bash installdeps
|
||||
- name: Configure
|
||||
run: >-
|
||||
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
|
||||
- name: Build
|
||||
run: ninja -C build
|
||||
|
||||
- name: Install
|
||||
run: ninja -C build install
|
||||
|
30
.github/workflows/ubuntu-build.yml
vendored
Normal file
30
.github/workflows/ubuntu-build.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Ubuntu Latest Build
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
cmake_compiler: ['-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++', '-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++']
|
||||
cmake_build: ['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_BUILD_TYPE=Debug']
|
||||
cmake_options: ['', '-DENABLE_LINK=OFF', '-DENABLE_SDL=ON']
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Dependencies
|
||||
run: >-
|
||||
bash installdeps; if [ "${{ matrix.compiler }}" = clang ]; then sudo apt -y install clang; fi
|
||||
|
||||
- name: Configure
|
||||
run: >-
|
||||
cmake -B build -G Ninja ${{ matrix.cmake_compiler }} ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
|
||||
|
||||
- name: Build
|
||||
run: ninja -C build
|
||||
|
||||
- name: Install
|
||||
run: sudo ninja -C build install
|
36
.github/workflows/visual-studio-build.yml
vendored
Normal file
36
.github/workflows/visual-studio-build.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Visual Studio Build
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
msvc_arch: ['x64', 'x64_x86']
|
||||
cmake_generator: ['Ninja']
|
||||
# cmake_generator: ['Ninja', '"Visual Studio 17 2022"']
|
||||
cmake_build: ['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_BUILD_TYPE=Debug']
|
||||
cmake_options: ['', '-DENABLE_LINK=OFF', '-DENABLE_SDL=ON']
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Prepare Visual Studio environment
|
||||
uses: ilammy/msvc-dev-cmd@v1.12.0
|
||||
with:
|
||||
arch: ${{ matrix.msvc_arch }}
|
||||
|
||||
- name: Configure (x64)
|
||||
if: matrix.msvc_arch == 'x64'
|
||||
run: >-
|
||||
cmake -B build -G ${{ matrix.cmake_generator }} -DVCPKG_TARGET_TRIPLET=x64-windows-static ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
|
||||
|
||||
- name: Configure (x86)
|
||||
if: matrix.msvc_arch == 'x64_x86'
|
||||
run: >-
|
||||
cmake -B build -G ${{ matrix.cmake_generator }} -DVCPKG_TARGET_TRIPLET=x86-windows-static ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build
|
6
.gitignore
vendored
6
.gitignore
vendored
@@ -5,7 +5,11 @@
|
||||
*.so
|
||||
*.dll
|
||||
*.exe
|
||||
.vscode
|
||||
.vscode/
|
||||
|
||||
# clangd files
|
||||
compile_commands.json
|
||||
.cache/
|
||||
|
||||
# vim swap files
|
||||
*.sw?
|
||||
|
@@ -56,7 +56,19 @@ include:
|
||||
# PlayStation Vita
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/vita-static.yml'
|
||||
|
||||
|
||||
# Nintendo GameCube
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/ngc-static.yml'
|
||||
|
||||
# Nintendo Wii
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/wii-static.yml'
|
||||
|
||||
# Nintendo WiiU
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/wiiu-static.yml'
|
||||
|
||||
# Nintendo Switch
|
||||
- project: 'libretro-infrastructure/ci-templates'
|
||||
file: '/libnx-static.yml'
|
||||
@@ -164,6 +176,24 @@ libretro-build-vita:
|
||||
- .libretro-vita-static-retroarch-master
|
||||
- .core-defs
|
||||
|
||||
# Nintendo GameCube
|
||||
libretro-build-ngc:
|
||||
extends:
|
||||
- .libretro-ngc-static-retroarch-master
|
||||
- .core-defs
|
||||
|
||||
# Nintendo Wii
|
||||
libretro-build-wii:
|
||||
extends:
|
||||
- .libretro-wii-static-retroarch-master
|
||||
- .core-defs
|
||||
|
||||
# Nintendo WiiU
|
||||
libretro-build-wiiu:
|
||||
extends:
|
||||
- .libretro-wiiu-static-retroarch-master
|
||||
- .core-defs
|
||||
|
||||
# Nintendo Switch
|
||||
libretro-build-libnx-aarch64:
|
||||
extends:
|
||||
|
11
.tx/config
Normal file → Executable file
11
.tx/config
Normal file → Executable file
@@ -1,9 +1,10 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[vba-m.wxvbam]
|
||||
file_filter = po/wxvbam/<lang>.po
|
||||
source_file = po/wxvbam/wxvbam.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
[o:bgk:p:vba-m:r:wxvbam]
|
||||
file_filter = po/wxvbam/<lang>.po
|
||||
source_file = po/wxvbam/wxvbam.pot
|
||||
type = PO
|
||||
source_lang = en
|
||||
minimum_perc = 0
|
||||
|
||||
|
179
CHANGELOG.md
179
CHANGELOG.md
@@ -4,6 +4,185 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [2.1.9] - 2024-02-03
|
||||
=======================
|
||||
* 84b0a3e3 - Remove SDL sound driver [rkitover]
|
||||
* 2ad7dd1a - Fix wav audio recording [40356555+Aikku93]
|
||||
* 23ef8ef0 - Dialog appearance improvements + link warning [zachbacon]
|
||||
* a0452701 - build: don't fseeko64()/ftello64() on musl libc [rkitover]
|
||||
* 9e9fe812 - visualboyadvance-m.metainfo.xml: add screenshots to the metainfo [zachbacon]
|
||||
|
||||
## [2.1.8] - 2023-12-13
|
||||
|
||||
========================
|
||||
* beab0881 - Store the PC register at the appropriate offset [steelskin]
|
||||
* bf2452aa - Resize GameArea after MainFrame initialization [steelskin]
|
||||
* 71ca0fb2 - Properly hide the status bar at startup [steelskin]
|
||||
* 7e1afcd3 - Fix reading joystick hat config values [rkitover]
|
||||
* 32581966 - Link: Fix menu not refreshing correctly [74248064+nuive]
|
||||
|
||||
## [2.1.7] - 11.09.2023
|
||||
|
||||
=========================
|
||||
* aca206a7 - Launch on xwayland under Wayland if no EGL [rkitover]
|
||||
* 93a24bee - Disable mirroring for ROMs > 32MB [rkitover]
|
||||
* 0f4ec575 - [Build] Fix the NO_LINK build [steelskin]
|
||||
* 803ab352 - [GB] Save MBC7 EEPROM data to `gbRam` [steelskin]
|
||||
* 24b6ac5a - [GBA] Implement missing Thumb instruction [steelskin]
|
||||
* 14a4b6f8 - [dialogs] Move JoypadConfig to its own class. [steelskin]
|
||||
|
||||
## [2.1.6] - 09.07.2023
|
||||
|
||||
=========================
|
||||
* 7561ca97 - Fix Discord streaming for OpenGL [danialhorton]
|
||||
* e26f8073 - [bios] Fix lz77 and add BIOS_SndDriverVsyncOn [steelskin]
|
||||
* d1f65000 - Refactor accelerator / global shortcuts handling [steelskin]
|
||||
* fda429fc - [GBA] Do not draw BG tiles from outside of BG VRAM [steelskin]
|
||||
* 5aa3ea92 - Properly initialize wxAcceleratorTable [steelskin]
|
||||
* 0e29be87 - Support multiple RAM sizes for MBC7 [steelskin]
|
||||
* 75b79d91 - Change MBC7 reported RAM size to 512 bytes [steelskin]
|
||||
* 36e88faf - Fix dsound looping when moving/resizing window [rkitover]
|
||||
* 019fcda9 - Sanitize and improve the GB header parsing (#1109) [Steelskin]
|
||||
* 7005b928 - Sanitize allocations in the Game Boy emulator (#1105) [Steelskin]
|
||||
* 3cef52b7 - Fix pause/next-frame [rkitover]
|
||||
* d3f8cc17 - Option to suspend the X11 screensaver when running [2306079+multiSnow]
|
||||
* df819598 - builder: update macOS build to 10.10, Wx 3.2.2.1 [rkitover]
|
||||
* 1ab46f70 - Update SIOCNT when the link driver is disconnected [steelskin]
|
||||
* 1d7e8ae4 - build: fix build with new OpenAL [rkitover]
|
||||
* a9284b3d - workaround for Stuart Little 2 crashing when set to none [danialhorton]
|
||||
* 166299cd - Implements Read/Writes for HUC3 [danialhorton]
|
||||
* 640ce453 - Change SOUND_CLOCK_TICKS to 280896 cycles - ~1074 samples per frame [reallibretroretroarch]
|
||||
* f1d3f631 - Fix automatic dynamic frame skipping [steelskin]
|
||||
* d756f671 - translations: fix some source strings [stanley.udr.kid]
|
||||
* 91873254 - Add INI file versioning [steelskin]
|
||||
* 7d9cb2b5 - Default GBA LCD filter to off. [rkitover]
|
||||
* be1e5ca1 - Check for wx < 3.2.2 for EGL move fix backport [rkitover]
|
||||
* 1fb18b32 - Rename appdata to metainfo [polynomial-c]
|
||||
* ca7ae336 - Fix regression in bios, port DMA fix from libretro [danialhorton]
|
||||
* b34448c9 - Fix record/play dialogs for native recordings [danialhorton]
|
||||
* 6307348c - build: support MSVC arm64 cross build on x86 [rkitover]
|
||||
* 87bdc93e - Revert "translations: use %% instead of percent" [rkitover]
|
||||
* ab4ae96e - Clarify/set condition: wayland && !wayland_egl [rkitover]
|
||||
* 8e4acfc9 - Fix build w/wxUSE_GLCANVAS_EGL=0, on Fedora [rkitover]
|
||||
* 3c41b68d - Fix the Windows ARM64 build [steelskin]
|
||||
* 22578d02 - Increase MAX_CART_SIZE from 32MiB to 128MiB [rkitover]
|
||||
|
||||
## [2.1.5] - 2022-12-15
|
||||
=======================
|
||||
* ea2a929f - Backport 800d6ed69b from wx to fix Wayland EGL pos [rkitover]
|
||||
* c40a1417 - Write vsync toggle msg to debug log not OSD [rkitover]
|
||||
* 5d2dd01e - Call Layout() after DrawingPanel OnSize event [rkitover]
|
||||
* da686a48 - Reinit panel on vsync toggle. [rkitover]
|
||||
* ec27885c - Support EGL VSync on Wayland. [rkitover]
|
||||
* c27d384a - Enable GL on Wayland for wx 3.2+, no vsync. [rkitover]
|
||||
* c249115b - build: set -mtune=generic [rkitover]
|
||||
* 297d7c06 - [hidpi] Use wxWidgets 3.2 on Windows [steelskin]
|
||||
* 0d86432a - [hidpi] Implement full HiDPI support [steelskin]
|
||||
* 69d24fb5 - [build][msvc] Fix debug information and set hidpi support [steelskin]
|
||||
* 90fc3e12 - Default CTRL+I to change interframe blender [rkitover]
|
||||
* a57d81e1 - Show name of interframe blender not num in OSD [rkitover]
|
||||
* 13c558ac - Disable wireless link type [rkitover]
|
||||
* 639003a8 - Show pixel filter name not number on cycle [rkitover]
|
||||
* 236cffb4 - Make another adjustment to glXQueryExtensions [rkitover]
|
||||
* 643ec0f7 - Pass DefaultScreen(display) to glXQueryExtensions [rkitover]
|
||||
* 60d7ead5 - Fix menu state after playing a movie [laqieer]
|
||||
* d2fee771 - Add VBA Movie Version 2 [laqieer]
|
||||
* 3f2d3c13 - Remove manual joystick polling [steelskin]
|
||||
* 7726d26f - Enable full optimizations and fix x86 builds [danialhorton]
|
||||
* 73223445 - MSVC opt /fp:fast /Oi, intrinsic sqrt() w/ XBRZ. [rkitover]
|
||||
* 972f1513 - Enable GB colorization hack support in GUI. [danialhorton]
|
||||
* 1741fa32 - Fix autosaveloadcheat and rename pref [danialhorton]
|
||||
* a31a7a30 - in Wx, the Option is Enable MMX, make the variable also enableMMX and set its default to on. [danialhorton]
|
||||
* 983ea451 - Flash : Erased memory is FFh-filled [negativeExponent]
|
||||
* 18e387d1 - Fix Flash chip's erase operation: erased memory is FFh-filled, not zero-filled. [laqieer]
|
||||
* c05056ab - HuC3: Update [negativeExponent]
|
||||
* 93084990 - HuC3: Refactoring to avoid breaking savestates [negativeExponent]
|
||||
* 05a046e7 - HuC3: Enable battery save, update RTC support [negativeExponent]
|
||||
* 70477dcd - GBA:Fix serial emulation if compiled with NO_LINK [negativeExponent]
|
||||
* 15bcad13 - GB:Fix serial emulation when compiled with NO_LINK [negativeExponent]
|
||||
* 025f3079 - GBA:Fix a few memory read/write issues [negativeExponent]
|
||||
* 210e79bb - Add descriptions for the 'Interframe Blending' and 'LCD Color Filter' options [jrb22x]
|
||||
* 8a3456f8 - Default to not change battery on state load. [rkitover]
|
||||
* b50ff858 - add a missing break in half word reads [danialhorton]
|
||||
* 064fa7b0 - Fix SDL audio delay [Clownacy]
|
||||
* 7db3c817 - Fixed SDL audio using the wrong audio specification [Clownacy]
|
||||
* cb0933bf - Stop changing plane ptrs in rec. audio frames. [rkitover]
|
||||
* 80634683 - Force a panel update when configuring bilinear. [briansrls]
|
||||
* 6a714281 - Differentiate between SDL joy index/instance_id. [rkitover]
|
||||
* 11693d83 - Clean up GB MBC30 check. [rkitover]
|
||||
* 020daad8 - Fix joy accels when emulation is paused. [rkitover]
|
||||
* def5d3e4 - Stop timer when game is loaded again. [rkitover]
|
||||
* e0816b0e - Fix weird input/buttons memory leak. [edenisfa]
|
||||
* 7031c1d1 - [LINUX,WINDOWS] Key/Joy background input. [edenisfa]
|
||||
* 84f3e8ce - Allow joystick background input. [edenisfa]
|
||||
* 40741580 - Add GUI cmd line option for config file. (#724) [Steelskin]
|
||||
* c169420f - Turbo/throttle config and DirectSound fixes. [rkitover]
|
||||
* 378c9493 - Fix joystick config when game is loaded. [rkitover]
|
||||
* 95213a6d - GB: Only use mapperLastTime to see if RTC data was loaded [negativeExponent]
|
||||
* 86fcffef - GB: Add support for 4MB MBC30 [negativeExponent]
|
||||
* 2f9933ae - GBA BIOS: ArcTan/ArcTan2 fixes for HLE bios [negativeExponent]
|
||||
* d9732f68 - Fix clock cycle count for MUL, MLA instructions... (https://github.com/libretro/vba-next/commit/b91f39c787cc99ace97546cb94985f3b658c8b57) - backport Fix clock cycle count for some arm/thumb instructions (https://github.com/libretro/vba-next/commit/5243b2d8064dd2145888ced7cbfe127594ecf6db) - backport Fix base cycle count for MUL, MLA series (https://github.com/libretro/vba-next/commit/b91f39c787cc99ace97546cb94985f3b658c8b57) [negativeExponent]
|
||||
* c07d5b65 - Fix vram 16/32 bit unaligned reads(backport https://github.com/libretro/vba-next/commit/7f18771165dd4a6d71a598c51d91668920572eaa) [negativeExponent]
|
||||
* 18c2ea61 - Further fixing Multi Buffer formatting. [briansrls]
|
||||
* 1e569300 - Addressing audio plugin crash [briansrls]
|
||||
* 9c314a15 - Use proper string `"wglGetExtensionsStringEXT"`. [edenisfa]
|
||||
* 3ba05295 - Improve BIOS Math tests score from 425 to 625. [edenisfa]
|
||||
* 6f2e320d - Improve clock cycle count for THUMB operations. [edenisfa]
|
||||
* 9e537a8f - Improve cycle count for MUL, MLA. [edenisfa]
|
||||
* 306f92f5 - Check game kbd input with wxGetKeyState() again. [rkitover]
|
||||
* 6b257d52 - Avoid override of variable `throttle` for turbo. [edenisfa]
|
||||
* bd2483ca - Allow changing connection type without restart. [edenisfa]
|
||||
* d379a076 - Decrease mouse sensitivity for menu hiding. [rkitover]
|
||||
* 0c5ee994 - Fix PNG capture screen. [edenisfa]
|
||||
* 1347026d - Turbo config refactor followup. [rkitover]
|
||||
* 1bced474 - Codesign fix for mac. [rkitover]
|
||||
* 07064c87 - [Windows,MacOS] Auto-updater refactoring. (#639) [denisfa]
|
||||
* 09e8da43 - Joystick refactor pt. Deux: Support Joysticks. [rkitover]
|
||||
* 504ca08b - Hide menubar + minor UI refactor. [rkitover]
|
||||
* 2868c1b7 - Fix changing aspect ratio option. [rkitover]
|
||||
* 045e95ab - GB: Support 4MiB MBC30 ROM bank select. [rkitover]
|
||||
* 0b14e9f8 - [WINDOWS] Add function to open unicode files. (#644) [denisfa]
|
||||
* 8e3978b3 - Speedup/Turbo/Throttle fixes. [rkitover]
|
||||
* 166cf446 - Disable menu LCD filter unless playing GB or GBA. [edenisfa]
|
||||
* 06001069 - Init systemColorMaps after output module init. [edenisfa]
|
||||
* cd029ae6 - Fix video recording with frame skip enabled. [edenisfa]
|
||||
* 008aecde - [LINUX] Fix display of `RGB` values on viewers. [edenisfa]
|
||||
* 834d1537 - Fix accel shortcuts when using some menu options. [edenisfa]
|
||||
* 994726dd - Do not pause while opening configuration windows. [edenisfa]
|
||||
* 54335dc6 - [WINDOWS] Fix weird WX errors messages. [edenisfa]
|
||||
* 7bac34ed - Remove duplicate variable `winFlashSize`. [edenisfa]
|
||||
* 8d62a790 - Change default options for GB. [edenisfa]
|
||||
* 99b66e13 - Expose LCD filter for GBA and GB color saturation. [edenisfa]
|
||||
* c789020e - Fix `Save` button on OAM Viewer for GB and GBA. [edenisfa]
|
||||
* dcaa1b9a - Fix `Save` button on Tile Viewer for GB and GBA. [edenisfa]
|
||||
* d05e8fc1 - Make AGBPrint output to our Logging. [edenisfa]
|
||||
* abb82341 - Allow binding specific server IP. (#633) [rkitover]
|
||||
* 6c64db07 - cmake: Windows codesigning refactor. [rkitover]
|
||||
* 4f1a351d - Try to configure vsync for multiple options. [edenisfa]
|
||||
* ed8a9af2 - Use proper functions and checks for OpenGL VSYNC. [edenisfa]
|
||||
* 6092082e - Fix Save Failed error for Super Monkey Ball Jr. [54053706+negativeExponent]
|
||||
* f1099a21 - Check return value of soundInit(). [rkitover]
|
||||
* 410ede54 - Check for null pointer in soundReset(). [alexjnewt]
|
||||
* 9d1d707c - Limit ROM size to 32 MiB. [negativeExponent]
|
||||
* fd319d21 - GB: Check header for a valid ROM file. [negativeExponent]
|
||||
* 513af13d - Replace `libpng` code for `stb_image` one. [edenisfa]
|
||||
* 8f48c1f0 - Fix weird `wxWidgets>=3.0` error message. [edenisfa]
|
||||
* 2f065382 - Enable XAudio2 for Windows vcpkg build. [rkitover]
|
||||
* a3203770 - Fix: a issue with loading e-Reader dot code (#608) [sony.pcv.s520]
|
||||
* 83614290 - Turn on winsparkle update checking support. [rkitover]
|
||||
* 4aab08c4 - Set link timeout default to 500ms, fix prev. dflt. [rkitover]
|
||||
* 136c094f - Add option to set link network port. [rkitover]
|
||||
* f69febfd - Add `.wav` support for sound recording. [edenisfa]
|
||||
* 6a8a9e62 - Fix integer overflow in cheatsImportGSACodeFile length check. [zack.ref]
|
||||
* b50d4845 - GBA: Fix crash when new size is larger than rom size after soft-patching [negativeExponent]
|
||||
* 9e1a63af - support for patches in BPS format [ArtiiP]
|
||||
* 72d0725b - Allow game window to resize on-the-fly when enabling/disabling borders [negativeExponent]
|
||||
* 225e4dc9 - Remove top border black line when using filters. [edenisfa]
|
||||
* 0535d5c7 - Optimize CRC32. [mudlord]
|
||||
* 4bc9bb84 - Implement joystick rumble. #522 [rkitover]
|
||||
* 384f4487 - Fix key accel overriding menus and dialogs. [edenisfa]
|
||||
* af0de1c4 - xbrz: fix inline asm check [rkitover]
|
||||
|
||||
## [2.1.4]
|
||||
=======================
|
||||
* c93e017d - builder: minor changes to support mac 32 bit (4 days ago)
|
||||
|
1165
CMakeLists.txt
1165
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
@@ -1,46 +1,6 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "x64-Debug",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "Debug",
|
||||
"inheritEnvironments": [
|
||||
"msvc_x64"
|
||||
],
|
||||
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
|
||||
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
|
||||
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x64-windows -DENABLE_SDL=TRUE"
|
||||
}, {
|
||||
"name": "x64-Release",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "Release",
|
||||
"inheritEnvironments": [
|
||||
"msvc_x64"
|
||||
],
|
||||
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
|
||||
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
|
||||
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x64-windows -DENABLE_SDL=TRUE"
|
||||
}, {
|
||||
"name": "x86-Debug",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "Debug",
|
||||
"inheritEnvironments": [
|
||||
"msvc_x86"
|
||||
],
|
||||
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
|
||||
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
|
||||
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x86-windows -DENABLE_SDL=TRUE"
|
||||
}, {
|
||||
"name": "x86-Release",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "Release",
|
||||
"inheritEnvironments": [
|
||||
"msvc_x86"
|
||||
],
|
||||
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
|
||||
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
|
||||
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x86-windows -DENABLE_SDL=TRUE"
|
||||
}, {
|
||||
"name": "x64-static-Debug",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "Debug",
|
||||
@@ -60,6 +20,16 @@
|
||||
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
|
||||
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
|
||||
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x64-windows-static -DENABLE_SDL=TRUE"
|
||||
}, {
|
||||
"name": "x64-static-RelWithDebInfo",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "RelWithDebInfo",
|
||||
"inheritEnvironments": [
|
||||
"msvc_x64"
|
||||
],
|
||||
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
|
||||
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
|
||||
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x64-windows-static -DENABLE_SDL=TRUE"
|
||||
}, {
|
||||
"name": "x86-static-Debug",
|
||||
"generator": "Ninja",
|
||||
@@ -80,6 +50,46 @@
|
||||
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
|
||||
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
|
||||
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x86-windows-static -DENABLE_SDL=TRUE"
|
||||
}, {
|
||||
"name": "x86-static-RelWithDebInfo",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "RelWithDebInfo",
|
||||
"inheritEnvironments": [
|
||||
"msvc_x86"
|
||||
],
|
||||
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
|
||||
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
|
||||
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x86-windows-static -DENABLE_SDL=TRUE"
|
||||
}, {
|
||||
"name": "arm64-static-Debug",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "Debug",
|
||||
"inheritEnvironments": [
|
||||
"msvc_arm64"
|
||||
],
|
||||
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
|
||||
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
|
||||
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=arm64-windows-static -DENABLE_SDL=TRUE"
|
||||
}, {
|
||||
"name": "arm64-static-Release",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "Release",
|
||||
"inheritEnvironments": [
|
||||
"msvc_arm64"
|
||||
],
|
||||
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
|
||||
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
|
||||
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=arm64-windows-static -DENABLE_SDL=TRUE"
|
||||
}, {
|
||||
"name": "arm64-static-RelWithDebInfo",
|
||||
"generator": "Ninja",
|
||||
"configurationType": "RelWithDebInfo",
|
||||
"inheritEnvironments": [
|
||||
"msvc_arm64"
|
||||
],
|
||||
"buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
|
||||
"installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
|
||||
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=arm64-windows-static -DENABLE_SDL=TRUE"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -73,8 +73,61 @@ https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
||||
the description of your work should be in the **commit message NOT the pull
|
||||
request description**.
|
||||
|
||||
Make sure your git history is clean and logical, edit when necessary with
|
||||
`rebase -i`.
|
||||
The title line must be no more than 50 characters and the description must be
|
||||
wrapped at 72 characters. Most commit message editor interfaces will help you
|
||||
with this. The title line must not end with a period.
|
||||
|
||||
Write everything in the imperative mood, e.g. change, fix, **NOT** changes,
|
||||
changed, fixed, fixes etc..
|
||||
|
||||
A commit message must always have a title and a description, the description
|
||||
must be independent of the title line, if necessary repeat the information in
|
||||
the title line in the description.
|
||||
|
||||
Make sure the git history in your branch is clean and logical, edit when
|
||||
necessary with `rebase -i`.
|
||||
|
||||
Use one commit per logical change if necessary, most work can be squashed into
|
||||
one commit when you are done. It is not necessary to have separate commits
|
||||
per-file if they are one logical change. We are less strict about this than
|
||||
other projects, fewer is better.
|
||||
|
||||
The commit title line should be prefixed with an area, unless it involves the
|
||||
wxWidgets GUI app, in which case it should **NOT** have a prefix.
|
||||
|
||||
The text after the area prefix should not be capitalized.
|
||||
|
||||
Please use one of these area prefixes otherwise:
|
||||
|
||||
- doc: documentation, README.md etc.
|
||||
- build: cmake, installdeps, preprocessor compatibility defines, etc.
|
||||
- gb-core: the GameBoy emulator core
|
||||
- gba-core: the GameBoy Advance emulator core
|
||||
- libretro: the libretro core glue and build
|
||||
- sdl-app: anything for the SDL app
|
||||
- translations: anything related to translations
|
||||
|
||||
. Add other areas here if needed.
|
||||
|
||||
If a commit fixes a regression, use a title line such as:
|
||||
|
||||
```console
|
||||
Fix regression <PROBLEM> in <SHORT-SHA>
|
||||
```
|
||||
, you can get the short sha from `git log --oneline -100` or similar.
|
||||
|
||||
The commit description for a regression must refer to the breaking change in
|
||||
reference format, which you can get from e.g. `git log --format=reference -20`.
|
||||
|
||||
You can refer to github issues using `#<ISSUE-NUMBER>` freely in the description
|
||||
text.
|
||||
|
||||
If a commit fixes an issue, add a line at the end of the description such as:
|
||||
|
||||
```console
|
||||
Fix #<ISSUE-NUMBER>.
|
||||
```
|
||||
.
|
||||
|
||||
#### Collaboration on a Branch
|
||||
|
||||
|
47
README.md
47
README.md
@@ -6,6 +6,7 @@
|
||||
- [Building](#building)
|
||||
- [Building a Libretro core](#building-a-libretro-core)
|
||||
- [Visual Studio Support](#visual-studio-support)
|
||||
- [Visual Studio Code Support](#visual-studio-code-support)
|
||||
- [Dependencies](#dependencies)
|
||||
- [Cross compiling for 32 bit on a 64 bit host](#cross-compiling-for-32-bit-on-a-64-bit-host)
|
||||
- [Cross Compiling for Win32](#cross-compiling-for-win32)
|
||||
@@ -18,22 +19,30 @@
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
[](https://gitter.im/visualboyadvance-m/Lobby)
|
||||
[](https://travis-ci.org/visualboyadvance-m/visualboyadvance-m)
|
||||
[](https://ci.appveyor.com/project/ZachBacon65337/visualboyadvance-m-2ys5r)
|
||||
|
||||
Our bridged Discord server is [Here](https://discord.gg/EpfxEuGMKH).
|
||||
|
||||
We are also on *`#vba-m`* on [Libera IRC](https://libera.chat/) which has a [Web
|
||||
Chat](https://web.libera.chat/).
|
||||
|
||||
[](https://flathub.org/apps/com.vba_m.visualboyadvance-m)
|
||||
[](https://snapcraft.io/visualboyadvance-m)
|
||||
|
||||
***Want to know where you can install visualboyadvance-m in your linux distribution?***
|
||||
|
||||
[](https://repology.org/project/visualboyadvance-m/versions)
|
||||
|
||||
# Visual Boy Advance - M
|
||||
|
||||
Game Boy and Game Boy Advance Emulator
|
||||
|
||||
The forums are [here](https://board.vba-m.com/).
|
||||
The forums are [here](https://board.visualboyadvance-m.org/).
|
||||
|
||||
Windows and Mac builds are in the [releases tab](https://github.com/visualboyadvance-m/visualboyadvance-m/releases).
|
||||
|
||||
Nightly builds for Windows and macOS are at [https://nightly.vba-m.com/](https://nightly.vba-m.com/).
|
||||
Nightly builds for Windows and macOS are at [https://nightly.visualboyadvance-m.org/](https://nightly.visualboyadvance-m.org/).
|
||||
|
||||
**PLESE TEST THE NIGHTLY OR MASTER WITH A FACTORY RESET BEFORE REPORTING
|
||||
**PLEASE TEST THE NIGHTLY OR MASTER WITH A FACTORY RESET BEFORE REPORTING
|
||||
ISSUES**
|
||||
|
||||
Your distribution may have packages available as well, search for
|
||||
@@ -106,6 +115,24 @@ cmake .. -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_BUILD_TYPE=Debug -G N
|
||||
ninja
|
||||
```
|
||||
|
||||
## Visual Studio Code Support
|
||||
|
||||
Make sure the
|
||||
[C/C++](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)
|
||||
and [CMake
|
||||
Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools)
|
||||
extensions are installed.
|
||||
|
||||
Add the following to your `settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"cmake.configureOnOpen": true,
|
||||
"cmake.preferredGenerators": [ "Ninja" ]
|
||||
}
|
||||
```
|
||||
.
|
||||
|
||||
## Dependencies
|
||||
|
||||
If your OS is not supported, you will need the following:
|
||||
@@ -121,10 +148,10 @@ And the following development libraries:
|
||||
- [zlib](https://zlib.net/) (required)
|
||||
- [mesa](https://mesa3d.org/) (if using X11 or any OpenGL otherwise)
|
||||
- [ffmpeg](https://ffmpeg.org/) (optional, at least version `4.0.4`, for game recording)
|
||||
- [gettext](https://www.gnu.org/software/gettext/) and gettext-tools (optional, with ENABLE_NLS)
|
||||
- [gettext](https://www.gnu.org/software/gettext/) and gettext-tools
|
||||
- [SDL2](https://www.libsdl.org/) (required)
|
||||
- [SFML](https://www.sfml-dev.org/) (optional, for link)
|
||||
- [OpenAL](https://www.openal.org/) or [openal-soft](https://kcat.strangesoft.net/openal.html) (optional, a sound interface)
|
||||
- [OpenAL](https://www.openal.org/) or [openal-soft](https://kcat.strangesoft.net/openal.html) (required, a sound interface)
|
||||
- [wxWidgets](https://wxwidgets.org/) (required for GUI, 2.8 and non-stl builds are no longer supported)
|
||||
|
||||
On Linux and similar, you also need the version of GTK your wxWidgets is linked
|
||||
@@ -142,7 +169,7 @@ This is supported on Fedora, Arch, Solus and MSYS2.
|
||||
|
||||
`./installdeps` takes one optional parameter for cross-compiling target, which
|
||||
may be `win32` which is an alias for `mingw-w64-i686` to target 32 bit Windows,
|
||||
or `mingw-gw64-x86_64` for 64 bit Windows targets.
|
||||
or `mingw-w64-x86_64` for 64 bit Windows targets.
|
||||
|
||||
The target is implicit on MSys2 depending on which MINGW shell you started (the
|
||||
value of `$MSYSTEM`.)
|
||||
@@ -178,7 +205,6 @@ Here is the complete list:
|
||||
| ENABLE_SDL | Build the SDL port | OFF |
|
||||
| ENABLE_WX | Build the wxWidgets port | ON |
|
||||
| ENABLE_DEBUGGER | Enable the debugger | ON |
|
||||
| ENABLE_NLS | Enable translations | ON |
|
||||
| ENABLE_ASM_CORE | Enable x86 ASM CPU cores (**BUGGY AND DANGEROUS**) | OFF |
|
||||
| ENABLE_ASM | Enable the following two ASM options | ON for 32 bit builds |
|
||||
| ENABLE_ASM_SCALERS | Enable x86 ASM graphic filters | ON for 32 bit builds |
|
||||
@@ -192,7 +218,6 @@ Here is the complete list:
|
||||
| ENABLE_DIRECT3D | Direct3D rendering for wxWidgets (Windows, **NOT IMPLEMENTED!!!**) | ON |
|
||||
| ENABLE_XAUDIO2 | Enable xaudio2 sound output for wxWidgets (Windows only) | ON |
|
||||
| ENABLE_OPENAL | Enable OpenAL for the wxWidgets port | AUTO |
|
||||
| ENABLE_SSP | Enable gcc stack protector support (gcc only) | OFF |
|
||||
| ENABLE_ASAN | Enable libasan sanitizers (by default address, only in debug mode) | OFF |
|
||||
| UPSTREAM_RELEASE | Do some release tasks, like codesigning, making zip and gpg sigs. | OFF |
|
||||
| BUILD_TESTING | Build the tests and enable ctest support. | ON |
|
||||
@@ -200,9 +225,7 @@ Here is the complete list:
|
||||
| SDL2_STATIC | Try to link static SDL2 libraries | OFF |
|
||||
| SFML_STATIC_LIBRARIES | Try to link static SFML libraries | OFF |
|
||||
| FFMPEG_STATIC | Try to link static ffmpeg libraries | OFF |
|
||||
| SSP_STATIC | Try to link static gcc stack protector library (gcc only) | OFF except Win32 |
|
||||
| OPENAL_STATIC | Try to link static OpenAL libraries | OFF |
|
||||
| SSP_STATIC | Link gcc stack protecter libssp statically (gcc, with ENABLE_SSP) | OFF |
|
||||
| TRANSLATIONS_ONLY | Build only the translations.zip and nothing else | OFF |
|
||||
|
||||
Note for distro packagers, we use the CMake module
|
||||
|
52
cmake-variants.yaml
Normal file
52
cmake-variants.yaml
Normal file
@@ -0,0 +1,52 @@
|
||||
buildType:
|
||||
default: debug
|
||||
choices:
|
||||
debug:
|
||||
short: Debug
|
||||
long: Emit debug information
|
||||
buildType: Debug
|
||||
release:
|
||||
short: Release
|
||||
long: Optimize generated code
|
||||
buildType: Release
|
||||
|
||||
linkage:
|
||||
default: static
|
||||
choices:
|
||||
static:
|
||||
short: Static
|
||||
long: Create static libraries
|
||||
linkage: static
|
||||
shared:
|
||||
short: Shared
|
||||
long: Create shared libraries/DLLs
|
||||
linkage: shared
|
||||
|
||||
useLink:
|
||||
default: withlink
|
||||
choices:
|
||||
withlink:
|
||||
short: WithLink
|
||||
long: Enable the Link feature
|
||||
settings:
|
||||
ENABLE_LINK: ON
|
||||
nolink:
|
||||
short: NoLink
|
||||
long: Disable the Link feature
|
||||
settings:
|
||||
ENABLE_LINK: OFF
|
||||
|
||||
useDebugger:
|
||||
default: withdebugger
|
||||
choices:
|
||||
withdebugger:
|
||||
short: WithDebugger
|
||||
long: Enable the Debugger feature
|
||||
settings:
|
||||
ENABLE_DEBUGGER: ON
|
||||
nodebugger:
|
||||
short: NoDebugger
|
||||
long: Disable the Debugger feature
|
||||
settings:
|
||||
ENABLE_DEBUGGER: OFF
|
||||
ENABLE_SDL: OFF
|
@@ -21,19 +21,25 @@ elseif(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
|
||||
set(BITS 64)
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_TRIPLET MATCHES "^[aA][rR][mM]64")
|
||||
set(CMAKE_SYSTEM_PROCESSOR ARM64)
|
||||
elseif(VCPKG_TARGET_TRIPLET MATCHES "^[aA][rR][mM]-")
|
||||
set(CMAKE_SYSTEM_PROCESSOR ARM)
|
||||
endif()
|
||||
|
||||
# Turn asm on by default on 32bit x86 and set WINARCH for windows stuff.
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "[xX]86|i[3-9]86|[aA][mM][dD]64")
|
||||
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 4) # 32 bit
|
||||
set(ASM_DEFAULT ON)
|
||||
set(X86_32 ON)
|
||||
set(X86 ON)
|
||||
set(WINARCH x86)
|
||||
set(WINARCH x86)
|
||||
set(ARCH_NAME x86_32)
|
||||
elseif(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
|
||||
set(AMD64 ON)
|
||||
set(X64 ON)
|
||||
set(X86_64 ON)
|
||||
set(WINARCH x64)
|
||||
set(WINARCH x64)
|
||||
set(ARCH_NAME x86_64)
|
||||
endif()
|
||||
|
||||
@@ -47,7 +53,13 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "[xX]86|i[3-9]86|[aA][mM][dD]64")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "[aA][aA][rR][cC][hH]|[aA][rR][mM]")
|
||||
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 4) # 32 bit
|
||||
set(ARCH_NAME arm32)
|
||||
set(WINARCH arm)
|
||||
elseif(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
|
||||
set(ARCH_NAME arm64)
|
||||
set(WINARCH arm64)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "[aA][aA][rR][cC][hH]|[aA][rR][mM]")
|
||||
set(CMAKE_CROSSCOMPILING TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
@@ -1,54 +0,0 @@
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2010 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# support for the nasm assembler
|
||||
|
||||
set(CMAKE_ASM_NASM_SOURCE_FILE_EXTENSIONS nasm asm)
|
||||
|
||||
if(NOT CMAKE_ASM_NASM_OBJECT_FORMAT)
|
||||
if(WIN32)
|
||||
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
|
||||
SET(CMAKE_ASM_NASM_OBJECT_FORMAT win64)
|
||||
else()
|
||||
SET(CMAKE_ASM_NASM_OBJECT_FORMAT win32)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
EXECUTE_PROCESS(COMMAND ${CMAKE_ASM_NASM_COMPILER} -v COMMAND awk "{print \$3}" OUTPUT_VARIABLE NASM_VERSION)
|
||||
IF(NASM_VERSION VERSION_LESS 2.0)
|
||||
IF(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
|
||||
MESSAGE(FATAL_ERROR "Your nasm is too old to support AMD64, please install nasm from Homebrew or MacPorts.")
|
||||
ENDIF()
|
||||
SET(CMAKE_ASM_NAMS_OBJECT_FORMAT macho)
|
||||
ELSE()
|
||||
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
|
||||
SET(CMAKE_ASM_NASM_OBJECT_FORMAT macho64)
|
||||
else()
|
||||
SET(CMAKE_ASM_NASM_OBJECT_FORMAT macho32)
|
||||
endif()
|
||||
ENDIF()
|
||||
else()
|
||||
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
|
||||
SET(CMAKE_ASM_NASM_OBJECT_FORMAT elf64)
|
||||
else()
|
||||
SET(CMAKE_ASM_NASM_OBJECT_FORMAT elf32)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> <DEFINES> <FLAGS> -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} -o <OBJECT> <SOURCE>")
|
||||
|
||||
# Load the generic ASMInformation file:
|
||||
set(ASM_DIALECT "_NASM")
|
||||
include(CMakeASMInformation)
|
||||
set(ASM_DIALECT)
|
@@ -1,27 +0,0 @@
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2010 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# Find the nasm assembler. yasm (http://www.tortall.net/projects/yasm/) is nasm compatible
|
||||
|
||||
SET(CMAKE_ASM_NASM_COMPILER_INIT nasm yasm)
|
||||
|
||||
IF(NOT CMAKE_ASM_NASM_COMPILER)
|
||||
FIND_PROGRAM(CMAKE_ASM_NASM_COMPILER nasm
|
||||
"$ENV{ProgramFiles}/NASM")
|
||||
ENDIF(NOT CMAKE_ASM_NASM_COMPILER)
|
||||
|
||||
# Load the generic DetermineASM compiler file with the DIALECT set properly:
|
||||
SET(ASM_DIALECT "_NASM")
|
||||
INCLUDE(CMakeDetermineASMCompiler)
|
||||
SET(ASM_DIALECT)
|
@@ -1,23 +0,0 @@
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2010 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# This file is used by EnableLanguage in cmGlobalGenerator to
|
||||
# determine that the selected ASM_NASM "compiler" works.
|
||||
# For assembler this can only check whether the compiler has been found,
|
||||
# because otherwise there would have to be a separate assembler source file
|
||||
# for each assembler on every architecture.
|
||||
|
||||
SET(ASM_DIALECT "_NASM")
|
||||
INCLUDE(CMakeTestASMCompiler)
|
||||
SET(ASM_DIALECT)
|
@@ -15,7 +15,6 @@
|
||||
# - AVUTIL
|
||||
# - POSTPROC
|
||||
# - SWSCALE
|
||||
# - SWRESAMPLE
|
||||
# the following variables will be defined
|
||||
# <component>_FOUND - System has <component>
|
||||
# <component>_INCLUDE_DIRS - Include directory necessary for using the <component> headers
|
||||
@@ -70,20 +69,19 @@ macro(find_component _component _pkgconfig _library _header)
|
||||
|
||||
find_path(${_component}_INCLUDE_DIRS ${_header}
|
||||
HINTS
|
||||
${PC_LIB${_component}_INCLUDEDIR}
|
||||
${PC_LIB${_component}_INCLUDE_DIRS}
|
||||
${PC_${_component}_INCLUDEDIR}
|
||||
${PC_${_component}_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES
|
||||
ffmpeg
|
||||
)
|
||||
|
||||
find_library(${_component}_LIBRARIES NAMES ${_library}
|
||||
HINTS
|
||||
${PC_LIB${_component}_LIBDIR}
|
||||
${PC_LIB${_component}_LIBRARY_DIRS}
|
||||
${PC_${_component}_LIBDIR}
|
||||
${PC_${_component}_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
set(${_component}_DEFINITIONS ${PC_${_component}_CFLAGS_OTHER} CACHE STRING "The ${_component} CFLAGS.")
|
||||
set(${_component}_LDFLAGS ${PC_${_component}_LDFLAGS} CACHE STRING "The ${_component} LDFLAGS.")
|
||||
set(${_component}_VERSION ${PC_${_component}_VERSION} CACHE STRING "The ${_component} version number.")
|
||||
|
||||
set_component_found(${_component})
|
||||
@@ -114,9 +112,8 @@ if (NOT FFMPEG_LIBRARIES)
|
||||
foreach (_component ${FFmpeg_FIND_COMPONENTS})
|
||||
if (${_component}_FOUND)
|
||||
# message(STATUS "Required component ${_component} present.")
|
||||
list(APPEND FFMPEG_LIBRARIES ${${_component}_LIBRARIES})
|
||||
list(APPEND FFMPEG_DEFINITIONS ${${_component}_DEFINITIONS})
|
||||
list(APPEND FFMPEG_LDFLAGS ${${_component}_LDFLAGS})
|
||||
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${${_component}_LIBRARIES})
|
||||
set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} ${${_component}_DEFINITIONS})
|
||||
list(APPEND FFMPEG_INCLUDE_DIRS ${${_component}_INCLUDE_DIRS})
|
||||
else ()
|
||||
# message(STATUS "Required component ${_component} missing.")
|
||||
@@ -130,12 +127,10 @@ if (NOT FFMPEG_LIBRARIES)
|
||||
|
||||
# cache the vars.
|
||||
set(FFMPEG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIRS} CACHE STRING "The FFmpeg include directories." FORCE)
|
||||
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} CACHE STRING "The FFmpeg libraries." FORCE)
|
||||
set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} CACHE STRING "The FFmpeg CFLAGS." FORCE)
|
||||
set(FFMPEG_LDFLAGS ${FFMPEG_LDFLAGS} CACHE STRING "The FFmpeg LDFLAGS." FORCE)
|
||||
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} CACHE STRING "The FFmpeg libraries." FORCE)
|
||||
set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} CACHE STRING "The FFmpeg cflags." FORCE)
|
||||
|
||||
mark_as_advanced(FFMPEG_INCLUDE_DIRS
|
||||
FFMPEG_LDFLAGS
|
||||
FFMPEG_LIBRARIES
|
||||
FFMPEG_DEFINITIONS)
|
||||
|
||||
@@ -146,18 +141,9 @@ foreach (_component AVCODEC AVDEVICE AVFORMAT AVUTIL POSTPROCESS SWSCALE)
|
||||
set_component_found(${_component})
|
||||
endforeach ()
|
||||
|
||||
# message(STATUS "FFmpeg_FIND_COMPONENTS: ${FFmpeg_FIND_COMPONENTS}")
|
||||
# message(STATUS "FFMPEG_LIBRARIES: ${FFMPEG_LIBRARIES}")
|
||||
# message(STATUS "FFMPEG_LDFLAGS: ${FFMPEG_LDFLAGS}")
|
||||
# message(STATUS "FFMPEG_INCLUDE_DIRS: ${FFMPEG_INCLUDE_DIRS}")
|
||||
|
||||
# Compile the list of required vars
|
||||
set(_FFmpeg_REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS)
|
||||
foreach (_component ${FFmpeg_FIND_COMPONENTS})
|
||||
# message(STATUS "${_component}_LIBRARIES: ${${_component}_LIBRARIES}")
|
||||
# message(STATUS "${_component}_LDFLAGS: ${${_component}_LDFLAGS}")
|
||||
# message(STATUS "${_component}_INCLUDE_DIRS: ${${_component}_INCLUDE_DIRS}")
|
||||
|
||||
list(APPEND _FFmpeg_REQUIRED_VARS ${_component}_LIBRARIES ${_component}_INCLUDE_DIRS)
|
||||
endforeach ()
|
||||
|
||||
|
@@ -1,226 +0,0 @@
|
||||
# This module defines
|
||||
# SDL2_LIBRARY, the name of the library to link against
|
||||
# SDL2_FOUND, if false, do not try to link to SDL2
|
||||
# SDL2_INCLUDE_DIR, where to find SDL.h
|
||||
#
|
||||
# If you have pkg-config, these extra variables are also defined:
|
||||
# SDL2_DEFINITIONS, extra CFLAGS
|
||||
# SDL2_EXTRA_LIBS, extra link libs
|
||||
# SDL2_LINKER_FLAGS, extra link flags
|
||||
#
|
||||
# The latter two are automatically added to SDL2_LIBRARY
|
||||
#
|
||||
# To use them, add code such as:
|
||||
#
|
||||
# # SET(SDL2_STATIC ON) # if you want to link SDL2 statically
|
||||
# FIND_PACKAGE(SDL2 REQUIRED)
|
||||
# ADD_DEFINITIONS(${SDL2_DEFINITIONS})
|
||||
# TARGET_LINK_LIBRARIES(your-executable-target ${SDL2_LIBRARY} ...)
|
||||
#
|
||||
# This module responds to the the flag:
|
||||
# SDL2_BUILDING_LIBRARY
|
||||
# If this is defined, then no SDL2main will be linked in because
|
||||
# only applications need main().
|
||||
# Otherwise, it is assumed you are building an application and this
|
||||
# module will attempt to locate and set the the proper link flags
|
||||
# as part of the returned SDL2_LIBRARY variable.
|
||||
#
|
||||
# If you want to link SDL2 statically, set SDL2_STATIC to ON.
|
||||
#
|
||||
# Don't forget to include SDLmain.h and SDLmain.m your project for the
|
||||
# OS X framework based version. (Other versions link to -lSDL2main which
|
||||
# this module will try to find on your behalf.) Also for OS X, this
|
||||
# module will automatically add the -framework Cocoa on your behalf.
|
||||
#
|
||||
#
|
||||
# Additional Note: If you see an empty SDL2_LIBRARY_TEMP in your configuration
|
||||
# and no SDL2_LIBRARY, it means CMake did not find your SDL2 library
|
||||
# (SDL2.dll, libsdl2.so, SDL2.framework, etc).
|
||||
# Set SDL2_LIBRARY_TEMP to point to your SDL2 library, and configure again.
|
||||
# Similarly, if you see an empty SDL2MAIN_LIBRARY, you should set this value
|
||||
# as appropriate. These values are used to generate the final SDL2_LIBRARY
|
||||
# variable, but when these values are unset, SDL2_LIBRARY does not get created.
|
||||
#
|
||||
#
|
||||
# $SDL2DIR is an environment variable that would
|
||||
# correspond to the ./configure --prefix=$SDL2DIR
|
||||
# used in building SDL2.
|
||||
# l.e.galup 9-20-02
|
||||
#
|
||||
# Modified by Eric Wing.
|
||||
# Added code to assist with automated building by using environmental variables
|
||||
# and providing a more controlled/consistent search behavior.
|
||||
# Added new modifications to recognize OS X frameworks and
|
||||
# additional Unix paths (FreeBSD, etc).
|
||||
# Also corrected the header search path to follow "proper" SDL guidelines.
|
||||
# Added a search for SDL2main which is needed by some platforms.
|
||||
# Added a search for threads which is needed by some platforms.
|
||||
# Added needed compile switches for MinGW.
|
||||
#
|
||||
# On OSX, this will prefer the Framework version (if found) over others.
|
||||
# People will have to manually change the cache values of
|
||||
# SDL2_LIBRARY to override this selection or set the CMake environment
|
||||
# CMAKE_INCLUDE_PATH to modify the search paths.
|
||||
#
|
||||
# Note that the header path has changed from SDL3/SDL.h to just SDL.h
|
||||
# This needed to change because "proper" SDL convention
|
||||
# is #include "SDL.h", not <SDL2/SDL.h>. This is done for portability
|
||||
# reasons because not all systems place things in SDL2/ (see FreeBSD).
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2003-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
SET(SDL2_SEARCH_PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local # Mac Homebrew and local installs
|
||||
/usr
|
||||
/sw # Fink
|
||||
/opt/local # MacPorts
|
||||
/opt/csw # OpenCSW (Solaris)
|
||||
/opt
|
||||
${SDL2_PATH}/include
|
||||
${SDL2_PATH}/lib
|
||||
)
|
||||
|
||||
FIND_PATH(SDL2_INCLUDE_DIR SDL.h
|
||||
HINTS $ENV{SDL2DIR}
|
||||
PATH_SUFFIXES SDL2
|
||||
PATHS ${SDL2_SEARCH_PATHS}
|
||||
)
|
||||
|
||||
SET(CURRENT_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
|
||||
if(SDL2_STATIC)
|
||||
if(WIN32)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a)
|
||||
else()
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
unset(lib_suffix)
|
||||
if(MSVC AND CMAKE_BUILD_TYPE MATCHES "^(Debug|RelWithDebInfo)$")
|
||||
set(lib_suffix d)
|
||||
endif()
|
||||
|
||||
FIND_LIBRARY(SDL2_LIBRARY_TEMP
|
||||
NAMES SDL2${lib_suffix}
|
||||
HINTS $ENV{SDL2DIR}
|
||||
PATH_SUFFIXES lib64 lib lib/x64 lib/x86
|
||||
PATHS ${SDL2_SEARCH_PATHS}
|
||||
)
|
||||
|
||||
if(NOT (SDL2_BUILDING_LIBRARY OR ${SDL2_INCLUDE_DIR} MATCHES ".framework"))
|
||||
# Non-OS X framework versions expect you to also dynamically link to
|
||||
# SDL2main. This is mainly for Windows and OS X. Other (Unix) platforms
|
||||
# seem to provide SDL2main for compatibility even though they don't
|
||||
# necessarily need it.
|
||||
find_library(SDL2MAIN_LIBRARY
|
||||
NAMES SDL2main${lib_suffix}
|
||||
HINTS $ENV{SDL2DIR}
|
||||
PATH_SUFFIXES lib64 lib lib/x64 lib/x86
|
||||
PATHS ${SDL2_SEARCH_PATHS}
|
||||
)
|
||||
endif()
|
||||
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CURRENT_FIND_LIBRARY_SUFFIXES})
|
||||
UNSET(CURRENT_FIND_LIBRARY_SUFFIXES)
|
||||
|
||||
# SDL2 may require threads on your system.
|
||||
# The Apple build may not need an explicit flag because one of the
|
||||
# frameworks may already provide it.
|
||||
# But for non-OSX systems, I will use the CMake Threads package.
|
||||
IF(NOT APPLE)
|
||||
FIND_PACKAGE(Threads)
|
||||
ENDIF(NOT APPLE)
|
||||
|
||||
# MinGW needs an additional link flag, -mwindows (to make a GUI app)
|
||||
# but we only add it when not making a Debug build.
|
||||
# It's total link flags should look like -lmingw32 -lSDL2main -lSDL2 -mwindows
|
||||
IF(MINGW)
|
||||
SET(MINGW32_LIBRARY -lmingw32 CACHE STRING "MinGW library")
|
||||
|
||||
IF(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
SET(MINGW32_LIBRARY ${MINGW32_LIBRARY} -mwindows)
|
||||
ENDIF()
|
||||
ENDIF(MINGW)
|
||||
|
||||
IF(SDL2_LIBRARY_TEMP)
|
||||
# For SDL2main
|
||||
if(SDL2MAIN_LIBRARY AND NOT WIN32)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY_TEMP})
|
||||
endif()
|
||||
|
||||
# For OS X, SDL2 uses Cocoa as a backend so it must link to Cocoa.
|
||||
# CMake doesn't display the -framework Cocoa string in the UI even
|
||||
# though it actually is there if I modify a pre-used variable.
|
||||
# I think it has something to do with the CACHE STRING.
|
||||
# So I use a temporary variable until the end so I can set the
|
||||
# "real" variable in one-shot.
|
||||
IF(APPLE)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa")
|
||||
ENDIF(APPLE)
|
||||
|
||||
# For threads, as mentioned Apple doesn't need this.
|
||||
# In fact, there seems to be a problem if I used the Threads package
|
||||
# and try using this line, so I'm just skipping it entirely for OS X.
|
||||
IF(NOT APPLE)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
|
||||
ENDIF(NOT APPLE)
|
||||
|
||||
# For MinGW library
|
||||
IF(MINGW)
|
||||
SET(SDL2_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL2_LIBRARY_TEMP} -lversion -limm32)
|
||||
ENDIF(MINGW)
|
||||
|
||||
# Add some stuff from pkg-config, if available
|
||||
IF(NOT PKG_CONFIG_EXECUTABLE)
|
||||
FIND_PACKAGE(PkgConfig QUIET)
|
||||
ENDIF(NOT PKG_CONFIG_EXECUTABLE)
|
||||
|
||||
IF(PKG_CONFIG_EXECUTABLE)
|
||||
# get any definitions
|
||||
EXECUTE_PROCESS(COMMAND ${PKG_CONFIG_EXECUTABLE} --cflags-only-other sdl2 OUTPUT_VARIABLE SDL2_DEFINITIONS ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
SET(SDL2_DEFINITIONS ${SDL2_DEFINITIONS} CACHE STRING "Extra CFLAGS for SDL2 from pkg-config")
|
||||
|
||||
# get any extra stuff needed for linking
|
||||
IF(NOT SDL2_STATIC)
|
||||
EXECUTE_PROCESS(COMMAND ${PKG_CONFIG_EXECUTABLE} --libs-only-other sdl2 OUTPUT_VARIABLE SDL2_LINKER_FLAGS_RAW ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
EXECUTE_PROCESS(COMMAND ${PKG_CONFIG_EXECUTABLE} --libs-only-l sdl2 OUTPUT_VARIABLE SDL2_EXTRA_LIBS_RAW ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
ELSE(NOT SDL2_STATIC)
|
||||
EXECUTE_PROCESS(COMMAND ${PKG_CONFIG_EXECUTABLE} --static --libs-only-other sdl2 OUTPUT_VARIABLE SDL2_LINKER_FLAGS_RAW ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
EXECUTE_PROCESS(COMMAND ${PKG_CONFIG_EXECUTABLE} --static --libs-only-l sdl2 OUTPUT_VARIABLE SDL2_EXTRA_LIBS_RAW ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
ENDIF(NOT SDL2_STATIC)
|
||||
|
||||
STRING(REGEX REPLACE "[^ ]+SDL2[^ ]*" "" SDL2_EXTRA_LIBS_RAW2 "${SDL2_EXTRA_LIBS_RAW}")
|
||||
STRING(REGEX REPLACE " +" ";" SDL2_EXTRA_LIBS "${SDL2_EXTRA_LIBS_RAW2}")
|
||||
STRING(REGEX REPLACE " +" ";" SDL2_LINKER_FLAGS "${SDL2_LINKER_FLAGS_RAW}")
|
||||
|
||||
SET(SDL2_LINKER_FLAGS ${SDL2_LINKER_FLAGS} CACHE STRING "Linker flags for linking SDL2")
|
||||
SET(SDL2_EXTRA_LIBS ${SDL2_EXTRA_LIBS} CACHE STRING "Extra libraries for linking SDL2")
|
||||
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${SDL2_EXTRA_LIBS} ${SDL2_LINKER_FLAGS})
|
||||
ENDIF(PKG_CONFIG_EXECUTABLE)
|
||||
|
||||
# Set the final string here so the GUI reflects the final state.
|
||||
SET(SDL2_LIBRARY ${SDL2_LIBRARY_TEMP} CACHE STRING "Where the SDL2 Library can be found")
|
||||
# Set the temp variable to INTERNAL so it is not seen in the CMake GUI
|
||||
SET(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "")
|
||||
ENDIF(SDL2_LIBRARY_TEMP)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR)
|
@@ -57,7 +57,7 @@
|
||||
|
||||
# define the SFML_STATIC macro if static build was chosen
|
||||
if(SFML_STATIC_LIBRARIES)
|
||||
add_definitions(-DSFML_STATIC)
|
||||
add_compile_definitions(SFML_STATIC)
|
||||
endif()
|
||||
|
||||
# define the list of search paths for headers and libraries
|
||||
@@ -89,9 +89,9 @@ if(SFML_FIND_VERSION AND SFML_INCLUDE_DIR)
|
||||
set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/SFML/Config.hpp")
|
||||
endif()
|
||||
FILE(READ "${SFML_CONFIG_HPP_INPUT}" SFML_CONFIG_HPP_CONTENTS)
|
||||
STRING(REGEX REPLACE ".*#define SFML_VERSION_MAJOR ([0-9]+).*" "\\1" SFML_VERSION_MAJOR "${SFML_CONFIG_HPP_CONTENTS}")
|
||||
STRING(REGEX REPLACE ".*#define SFML_VERSION_MINOR ([0-9]+).*" "\\1" SFML_VERSION_MINOR "${SFML_CONFIG_HPP_CONTENTS}")
|
||||
STRING(REGEX REPLACE ".*#define SFML_VERSION_PATCH ([0-9]+).*" "\\1" SFML_VERSION_PATCH "${SFML_CONFIG_HPP_CONTENTS}")
|
||||
STRING(REGEX REPLACE ".*#define *SFML_VERSION_MAJOR *([0-9]+).*" "\\1" SFML_VERSION_MAJOR "${SFML_CONFIG_HPP_CONTENTS}")
|
||||
STRING(REGEX REPLACE ".*#define *SFML_VERSION_MINOR *([0-9]+).*" "\\1" SFML_VERSION_MINOR "${SFML_CONFIG_HPP_CONTENTS}")
|
||||
STRING(REGEX REPLACE ".*#define *SFML_VERSION_PATCH *([0-9]+).*" "\\1" SFML_VERSION_PATCH "${SFML_CONFIG_HPP_CONTENTS}")
|
||||
if (NOT "${SFML_VERSION_PATCH}" MATCHES "^[0-9]+$")
|
||||
set(SFML_VERSION_PATCH 0)
|
||||
endif()
|
||||
|
@@ -1,76 +0,0 @@
|
||||
# FindSSP.cmake
|
||||
#
|
||||
# Find libssp necessary when using gcc with e.g. -fstack-protector=strong
|
||||
#
|
||||
# See: http://wiki.osdev.org/Stack_Smashing_Protector
|
||||
#
|
||||
# To use:
|
||||
#
|
||||
# put a copy into your <project_root>/cmake/
|
||||
#
|
||||
# In your main CMakeLists.txt do something like this:
|
||||
#
|
||||
# if(WIN32)
|
||||
# set(SSP_STATIC ON)
|
||||
# endif()
|
||||
#
|
||||
# find_package(SSP)
|
||||
#
|
||||
# if(SSP_LIBRARY)
|
||||
# set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} ${SSP_LIBRARY}")
|
||||
# set(CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE} ${SSP_LIBRARY}")
|
||||
# endif()
|
||||
|
||||
# only do this when compiling with gcc/g++
|
||||
if(NOT CMAKE_COMPILER_IS_GNUCXX)
|
||||
return()
|
||||
endif()
|
||||
|
||||
function(FindSSP)
|
||||
if(NOT CMAKE_CXX_COMPILER AND CMAKE_C_COMPILER)
|
||||
set(CMAKE_CXX_COMPILER ${CMAKE_C_COMPILER})
|
||||
endif()
|
||||
|
||||
foreach(arg ${CMAKE_CXX_COMPILER_ARG1} ${CMAKE_CXX_COMPILER_ARG2} ${CMAKE_CXX_COMPILER_ARG3} ${CMAKE_CXX_COMPILER_ARG4} ${CMAKE_CXX_COMPILER_ARG5} ${CMAKE_CXX_COMPILER_ARG6} ${CMAKE_CXX_COMPILER_ARG7} ${CMAKE_CXX_COMPILER_ARG8} ${CMAKE_CXX_COMPILER_ARG9})
|
||||
string(STRIP ${arg} arg)
|
||||
set(gcc_args "${gcc_args};${arg}")
|
||||
endforeach()
|
||||
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${gcc_args} --print-prog-name=gcc OUTPUT_VARIABLE GCC_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(WIN32 AND NOT MSYS)
|
||||
execute_process(COMMAND where.exe ${GCC_EXECUTABLE} OUTPUT_VARIABLE GCC_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
else()
|
||||
execute_process(COMMAND sh -c "command -v ${GCC_EXECUTABLE}" OUTPUT_VARIABLE GCC_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
|
||||
get_filename_component(GCC_DIRNAME "${GCC_EXECUTABLE}" DIRECTORY)
|
||||
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${gcc_args} --print-libgcc-file-name OUTPUT_VARIABLE LIBGCC_FILE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
get_filename_component(LIBGCC_DIRNAME "${LIBGCC_FILE}" DIRECTORY)
|
||||
|
||||
set(SSP_SEARCH_PATHS ${GCC_DIRNAME} ${LIBGCC_DIRNAME})
|
||||
|
||||
if(SSP_STATIC)
|
||||
if(WIN32)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a)
|
||||
else()
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_library(SSP_LIBRARY
|
||||
NAMES ssp libssp
|
||||
HINTS ${SSP_SEARCH_PATHS}
|
||||
PATH_SUFFIXES lib64 lib lib/x64 lib/x86
|
||||
)
|
||||
|
||||
set(SSP_LIBRARY PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
FindSSP()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(SSP REQUIRED_VARS SSP_LIBRARY)
|
@@ -7,23 +7,6 @@
|
||||
#
|
||||
# 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_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:
|
||||
@@ -85,84 +68,3 @@ function(get_git_head_revision _refspecvar _hashvar)
|
||||
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
|
||||
${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_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()
|
||||
|
@@ -3,10 +3,9 @@ function(git_version version revision version_release)
|
||||
set(${revision} "" CACHE STRING "Latest Git Tag Revision" FORCE)
|
||||
set(${version_release} 0 CACHE STRING "Is this a versioned release without revision" FORCE)
|
||||
|
||||
find_package(Git)
|
||||
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||
# get latest version from tag history
|
||||
execute_process(COMMAND "${GIT_EXECUTABLE}" tag "--format=%(align:width=20)%(refname:short)%(end)%(if)%(*objectname)%(then)%(*objectname)%(else)%(objectname)%(end)" --sort=-creatordate OUTPUT_VARIABLE tags OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
||||
execute_process(COMMAND "${GIT_EXECUTABLE}" tag "--format=%(align:width=20)%(refname:short)%(end)%(if)%(*objectname)%(then)%(*objectname)%(else)%(objectname)%(end)" --sort=-v:refname OUTPUT_VARIABLE tags OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
||||
|
||||
# if no tags (e.g. shallow clone) do nothing
|
||||
if(tags STREQUAL "")
|
||||
|
@@ -1,23 +1,34 @@
|
||||
function(host_compile src dst_cmd)
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
unset(link_flags)
|
||||
set(dst "${dst_cmd}")
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
set(dst "${dst_cmd}.exe")
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(link_flags -Wl,--subsystem,console)
|
||||
endif()
|
||||
else()
|
||||
set(dst ${dst_cmd})
|
||||
endif()
|
||||
|
||||
# assume cc foo.c -o foo # will work on most hosts
|
||||
add_custom_command(
|
||||
OUTPUT ${dst}
|
||||
COMMAND cc ${src} -o ${dst} ${link_flags}
|
||||
DEPENDS ${src}
|
||||
)
|
||||
if(MSVC)
|
||||
set(msvc_compile_script ${CMAKE_SOURCE_DIR}/cmake/MSVC_x86_Host_Compile.cmake)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${dst}
|
||||
DEPENDS ${src} ${msvc_compile_script}
|
||||
COMMAND ${CMAKE_COMMAND} -D "src=${src}" -D "dst=${dst}" -P ${msvc_compile_script}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
else()
|
||||
set(dst ${dst_cmd})
|
||||
|
||||
# Assume: cc foo.c -o foo # will work on most hosts
|
||||
add_custom_command(
|
||||
OUTPUT ${dst}
|
||||
DEPENDS ${src}
|
||||
COMMAND cc ${src} -o ${dst} ${link_flags}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
get_filename_component(dst ${dst_cmd} NAME)
|
||||
|
||||
|
@@ -1,44 +0,0 @@
|
||||
function(use_llvm_toolchain)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL Clang)
|
||||
set(compiler "${CMAKE_C_COMPILER}")
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||
set(compiler "${CMAKE_CXX_COMPILER}")
|
||||
else()
|
||||
return()
|
||||
endif()
|
||||
|
||||
foreach(tool ar ranlib ld nm objdump as)
|
||||
execute_process(
|
||||
COMMAND "${compiler}" -print-prog-name=llvm-${tool}
|
||||
OUTPUT_VARIABLE prog_path
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# for FreeBSD
|
||||
if(NOT prog_path MATCHES "^/")
|
||||
get_filename_component(
|
||||
abs_path ${prog_path} ABSOLUTE
|
||||
BASE_DIR /usr/local/llvm-devel/bin
|
||||
)
|
||||
|
||||
if(EXISTS ${abs_path})
|
||||
set(prog_path ${abs_path})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(prog_path MATCHES "^/")
|
||||
if(tool STREQUAL ld)
|
||||
set(tool linker)
|
||||
elseif(tool STREQUAL as)
|
||||
set(tool asm_compiler)
|
||||
endif()
|
||||
|
||||
string(TOUPPER ${tool} utool)
|
||||
|
||||
set(CMAKE_${utool} "${prog_path}" PARENT_SCOPE)
|
||||
set(CMAKE_${utool} "${prog_path}" CACHE FILEPATH "${tool}" FORCE)
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
use_llvm_toolchain()
|
24
cmake/MSVC_x86_Host_Compile.cmake
Normal file
24
cmake/MSVC_x86_Host_Compile.cmake
Normal file
@@ -0,0 +1,24 @@
|
||||
# This is a hack to be run with cmake -P to compile a source C program passed
|
||||
# in `src` to the `dst` executable using the host MSVC x86 toolchain.
|
||||
|
||||
find_program(cl_path NAME cl.exe HINTS ENV PATH)
|
||||
|
||||
string(REGEX REPLACE "[^/]+/cl\\.exe$" "x86/cl.exe" cl_path "${cl_path}")
|
||||
|
||||
set(orig_lib "$ENV{LIB}")
|
||||
set(new_lib)
|
||||
|
||||
foreach(lib $ENV{LIB})
|
||||
string(REGEX REPLACE "[^\\]+$" "x86" lib "${lib}")
|
||||
|
||||
list(APPEND new_lib "${lib}")
|
||||
endforeach()
|
||||
|
||||
set(ENV{LIB} "${new_lib}")
|
||||
|
||||
execute_process(
|
||||
COMMAND ${cl_path} /nologo ${src} /Fe:${dst}
|
||||
OUTPUT_QUIET
|
||||
)
|
||||
|
||||
set(ENV{LIB} "${orig_lib}")
|
@@ -62,6 +62,8 @@ IF(EXISTS /usr/local/bin/brew AND $ENV{PATH} MATCHES "(^|:)/usr/local/bin/?(:|$)
|
||||
LINK_DIRECTORIES("/usr/local/lib")
|
||||
|
||||
SET(CMAKE_PROGRAM_PATH /usr/local/bin ${CMAKE_PROGRAM_PATH})
|
||||
|
||||
set(ZLIB_ROOT /usr/local/opt/zlib)
|
||||
ELSEIF(EXISTS /opt/local/bin/port AND $ENV{PATH} MATCHES "(^|:)/opt/local/bin/?(:|$)")
|
||||
MESSAGE("-- Configuring for MacPorts")
|
||||
|
||||
|
@@ -10,8 +10,6 @@ if(NOT EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||
message(FATAL_ERROR "releases can only be done from a git clone")
|
||||
endif()
|
||||
|
||||
find_package(Git)
|
||||
|
||||
if(NOT GIT_FOUND)
|
||||
message(FATAL_ERROR "git is required to make a release")
|
||||
endif()
|
||||
@@ -186,10 +184,12 @@ Ignore the following cmake error.
|
||||
endwhile()
|
||||
|
||||
# Convert to UNIX line endings on Windows, just copy the file otherwise.
|
||||
|
||||
if(CMAKE_HOST_SYSTEM MATCHES Windows OR ((NOT DEFINED CMAKE_HOST_SYSTEM) AND WIN32))
|
||||
if(NOT DEFINED POWERSHELL)
|
||||
message(FATAL_ERROR "Powershell is required to convert line endings on Windows.")
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command [=[
|
||||
COMMAND ${POWERSHELL} -NoLogo -NoProfile -ExecutionPolicy Bypass -Command [=[
|
||||
$text = [IO.File]::ReadAllText("CHANGELOG.md.work") -replace "`r`n", "`n"
|
||||
[IO.File]::WriteAllText("CHANGELOG.md", $text)
|
||||
]=]
|
||||
|
141
cmake/Options.cmake
Normal file
141
cmake/Options.cmake
Normal file
@@ -0,0 +1,141 @@
|
||||
option(BUILD_TESTING "Build testing" ON)
|
||||
option(BUILD_SHARED_LIBS "Build dynamic libraries" OFF)
|
||||
|
||||
option(TRANSLATIONS_ONLY "Build only the translations.zip" OFF)
|
||||
if(TRANSLATIONS_ONLY)
|
||||
set(BUILD_DEFAULT OFF)
|
||||
else()
|
||||
set(BUILD_DEFAULT ON)
|
||||
endif()
|
||||
|
||||
option(ENABLE_SDL "Build the SDL port" ${BUILD_DEFAULT})
|
||||
option(ENABLE_WX "Build the wxWidgets port" ${BUILD_DEFAULT})
|
||||
option(ENABLE_DEBUGGER "Enable the debugger" ON)
|
||||
option(ENABLE_ASAN "Enable -fsanitize=address by default. Requires debug build with GCC/Clang" OFF)
|
||||
|
||||
# Static linking
|
||||
set(VBAM_STATIC_DEFAULT OFF)
|
||||
if(VCPKG_TARGET_TRIPLET MATCHES -static OR CMAKE_TOOLCHAIN_FILE MATCHES "mxe|-static")
|
||||
set(VBAM_STATIC_DEFAULT ON)
|
||||
elseif(MINGW OR (NOT "$ENV{MSYSTEM_PREFIX}" STREQUAL ""))
|
||||
# Default to static builds on MinGW and all MSYS2 envs.
|
||||
set(VBAM_STATIC_DEFAULT ON)
|
||||
endif()
|
||||
option(VBAM_STATIC "Try to link all libraries statically" ${VBAM_STATIC_DEFAULT})
|
||||
|
||||
if(VBAM_STATIC)
|
||||
set(SDL2_STATIC ON)
|
||||
set(SFML_STATIC_LIBRARIES ON)
|
||||
set(FFMPEG_STATIC ON)
|
||||
set(OPENAL_STATIC ON)
|
||||
set_property(GLOBAL PROPERTY LINK_SEARCH_START_STATIC ON)
|
||||
set_property(GLOBAL PROPERTY LINK_SEARCH_END_STATIC ON)
|
||||
|
||||
if(MSVC)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib)
|
||||
else()
|
||||
list(INSERT CMAKE_FIND_LIBRARY_SUFFIXES 0 .a)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(ENABLE_ASM "Enable x86 ASM related options" OFF)
|
||||
|
||||
# The ARM ASM core seems to be very buggy, see #98 and #54. Default to it being
|
||||
# OFF for the time being, until it is either fixed or replaced.
|
||||
option(ENABLE_ASM_CORE "Enable x86 ASM CPU cores (EXPERIMENTAL)" OFF)
|
||||
|
||||
set(ASM_SCALERS_DEFAULT ${ENABLE_ASM})
|
||||
set(MMX_DEFAULT ${ENABLE_ASM})
|
||||
|
||||
option(ENABLE_ASM_SCALERS "Enable x86 ASM graphic filters" ${ASM_SCALERS_DEFAULT})
|
||||
|
||||
include(CMakeDependentOption)
|
||||
cmake_dependent_option(ENABLE_MMX "Enable MMX" ${MMX_DEFAULT} "ENABLE_ASM_SCALERS" OFF)
|
||||
|
||||
option(ENABLE_LIRC "Enable LIRC support" OFF)
|
||||
|
||||
# Link / SFML
|
||||
find_package(SFML 2.4 COMPONENTS network system)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||
if(SFML_STATIC_LIBRARIES AND SFML_NETWORK_LIBRARY_STATIC_DEBUG AND SFML_SYSTEM_LIBRARY_STATIC_DEBUG)
|
||||
set(SFML_LIBRARIES ${SFML_NETWORK_LIBRARY_STATIC_DEBUG} ${SFML_SYSTEM_LIBRARY_STATIC_DEBUG})
|
||||
elseif(SFML_NETWORK_LIBRARY_DYNAMIC_DEBUG AND SFML_SYSTEM_LIBRARY_DYNAMIC_DEBUG)
|
||||
set(SFML_LIBRARIES ${SFML_NETWORK_LIBRARY_DYNAMIC_DEBUG} ${SFML_SYSTEM_LIBRARY_DYNAMIC_DEBUG})
|
||||
endif()
|
||||
endif()
|
||||
set(ENABLE_LINK_DEFAULT OFF)
|
||||
if(SFML_FOUND)
|
||||
set(ENABLE_LINK_DEFAULT ON)
|
||||
endif()
|
||||
option(ENABLE_LINK "Enable GBA linking functionality" ${ENABLE_LINK_DEFAULT})
|
||||
|
||||
# FFMpeg
|
||||
set(FFMPEG_DEFAULT OFF)
|
||||
set(FFMPEG_COMPONENTS AVCODEC AVFORMAT SWSCALE AVUTIL SWRESAMPLE)
|
||||
set(FFMPEG_COMPONENT_VERSIONS AVCODEC>=58.18.100 AVFORMAT>=58.12.100 SWSCALE>=5.1.100 AVUTIL>=56.14.100 SWRESAMPLE>=3.1.100)
|
||||
|
||||
if(NOT DEFINED ENABLE_FFMPEG OR ENABLE_FFMPEG)
|
||||
set(FFMPEG_DEFAULT ON)
|
||||
|
||||
find_package(FFmpeg COMPONENTS ${FFMPEG_COMPONENTS})
|
||||
# check versions, but only if pkgconfig is available
|
||||
if(FFMPEG_FOUND AND PKG_CONFIG_FOUND AND NOT CMAKE_TOOLCHAIN_FILE MATCHES vcpkg)
|
||||
foreach(component ${FFMPEG_COMPONENT_VERSIONS})
|
||||
string(REPLACE ">=" ";" parts ${component})
|
||||
list(GET parts 0 name)
|
||||
list(GET parts 1 version)
|
||||
|
||||
if((NOT DEFINED ${name}_VERSION) OR ${name}_VERSION VERSION_LESS ${version})
|
||||
set(FFMPEG_FOUND OFF)
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(NOT FFMPEG_FOUND)
|
||||
set(FFMPEG_DEFAULT OFF)
|
||||
endif()
|
||||
endif()
|
||||
option(ENABLE_FFMPEG "Enable ffmpeg A/V recording" ${FFMPEG_DEFAULT})
|
||||
|
||||
# Online Updates
|
||||
set(ONLINEUPDATES_DEFAULT OFF)
|
||||
if(DEFINED(UPSTREAM_RELEASE) AND UPSTREAM_RELEASE)
|
||||
set(ONLINEUPDATES_DEFAULT ON)
|
||||
endif()
|
||||
option(ENABLE_ONLINEUPDATES "Enable online update checks" ${ONLINEUPDATES_DEFAULT})
|
||||
option(HTTPS "Use https URL for winsparkle" ON)
|
||||
|
||||
# We generally don't want LTO when debugging because it makes linking slow
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(LTO_DEFAULT OFF)
|
||||
else()
|
||||
set(LTO_DEFAULT ON)
|
||||
endif()
|
||||
option(ENABLE_LTO "Compile with Link Time Optimization" ${LTO_DEFAULT})
|
||||
|
||||
option(ENABLE_GBA_LOGGING "Enable extended GBA logging" ON)
|
||||
|
||||
# Add support for Homebrew, MacPorts and Fink on macOS
|
||||
option(DISABLE_MACOS_PACKAGE_MANAGERS "Set to TRUE to disable support for macOS Homebrew, MacPorts and Fink." FALSE)
|
||||
if(APPLE AND NOT DISABLE_MACOS_PACKAGE_MANAGERS)
|
||||
include(MacPackageManagers)
|
||||
endif()
|
||||
|
||||
option(UPSTREAM_RELEASE "do some optimizations and release automation tasks" OFF)
|
||||
|
||||
if(WIN32)
|
||||
# not yet implemented
|
||||
option(ENABLE_DIRECT3D "Enable Direct3D rendering for the wxWidgets port" OFF)
|
||||
|
||||
set(XAUDIO2_DEFAULT ON)
|
||||
if (MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||
# TODO: We should update the XAudio headers to build with clang-cl. See
|
||||
# https://github.com/visualboyadvance-m/visualboyadvance-m/issues/1021
|
||||
set(XAUDIO2_DEFAULT OFF)
|
||||
endif()
|
||||
option(ENABLE_XAUDIO2 "Enable xaudio2 sound output for the wxWidgets port" ${XAUDIO2_DEFAULT})
|
||||
endif()
|
||||
|
||||
option(ENABLE_FAUDIO "Enable FAudio sound output for the wxWidgets port" OFF)
|
||||
|
||||
option(ZIP_SUFFIX [=[suffix for release zip files, e.g. "-somebranch".zip]=] OFF)
|
@@ -1,16 +0,0 @@
|
||||
function(make_path_run_wrapper cmd target)
|
||||
get_filename_component(name "${target}" NAME)
|
||||
get_filename_component(cmd_resolved "${cmd}" REALPATH)
|
||||
get_filename_component(base_name "${cmd_resolved}" NAME)
|
||||
get_filename_component(dir_name "${cmd_resolved}" DIRECTORY)
|
||||
|
||||
set(source "${target}.c")
|
||||
|
||||
configure_file(src/gcc-wrap.c.in "${source}")
|
||||
|
||||
include(HostCompile)
|
||||
host_compile("${source}" "${target}")
|
||||
|
||||
add_custom_target(generate_${name} DEPENDS "${CMAKE_BINARY_DIR}/${name}")
|
||||
add_dependencies(generate generate_${name})
|
||||
endfunction()
|
13
cmake/RemoveStrawberryPerlFromPATH.cmake
Normal file
13
cmake/RemoveStrawberryPerlFromPATH.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
# Remove StrawberryPerl from the PATH environment variable due to various build
|
||||
# pollution.
|
||||
unset(new_path)
|
||||
|
||||
foreach(p $ENV{PATH})
|
||||
if(NOT p MATCHES "(^|\\\\)[Ss]trawberry\\\\([Pp]erl|[Cc])\\\\(.*\\\\)?[Bb]in$")
|
||||
list(APPEND new_path ${p})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(ENV{PATH} "${new_path}")
|
||||
|
||||
# vim:sw=4 et sts=4 ts=8:
|
@@ -1,35 +1,55 @@
|
||||
if(POLICY CMP0012)
|
||||
cmake_policy(SET CMP0012 NEW) # Saner if() behavior.
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VCPKG_TARGET_TRIPLET)
|
||||
return()
|
||||
endif()
|
||||
|
||||
function(vcpkg_seconds)
|
||||
if(CMAKE_HOST_SYSTEM MATCHES Windows OR ((NOT DEFINED CMAKE_HOST_SYSTEM) AND WIN32))
|
||||
execute_process(
|
||||
COMMAND cmd /c echo %TIME:~0,8%
|
||||
OUTPUT_VARIABLE time
|
||||
)
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND date +'%H:%M:%S'
|
||||
OUTPUT_VARIABLE time
|
||||
)
|
||||
if(NOT WIN32)
|
||||
return()
|
||||
endif()
|
||||
|
||||
string(SUBSTRING "${time}" 0 2 hours)
|
||||
string(SUBSTRING "${time}" 3 2 minutes)
|
||||
string(SUBSTRING "${time}" 6 2 secs)
|
||||
# Check if we are in an MSVC environment.
|
||||
find_program(cl_exe_path NAME cl.exe HINTS ENV PATH)
|
||||
|
||||
math(EXPR seconds "(${hours} * 60 * 60) + (${minutes} * 60) + ${secs}")
|
||||
if($ENV{CXX} MATCHES "cl.exe$" OR cl_exe_path)
|
||||
# Infer the architecture from the LIB folders.
|
||||
foreach(LIB $ENV{LIB})
|
||||
if(${LIB} MATCHES "x64$")
|
||||
set(VBAM_VCPKG_PLATFORM "x64-windows-static")
|
||||
break()
|
||||
endif()
|
||||
if(${LIB} MATCHES "x86$")
|
||||
set(VBAM_VCPKG_PLATFORM "x86-windows-static")
|
||||
break()
|
||||
endif()
|
||||
if(${LIB} MATCHES "ARM64$")
|
||||
set(VBAM_VCPKG_PLATFORM "arm64-windows-static")
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(seconds ${seconds} PARENT_SCOPE)
|
||||
endfunction()
|
||||
# If all else fails, try to use a sensible default.
|
||||
if(NOT DEFINED VBAM_VCPKG_PLATFORM)
|
||||
set(VBAM_VCPKG_PLATFORM "x64-windows-static")
|
||||
endif()
|
||||
|
||||
unset(cl_exe_path)
|
||||
elseif (NOT DEFINED CMAKE_CXX_COMPILER)
|
||||
# No way to infer the compiler.
|
||||
return()
|
||||
|
||||
elseif(${CMAKE_CXX_COMPILER} MATCHES "clang-cl.exe$" OR ${CMAKE_CXX_COMPILER} MATCHES "clang-cl$")
|
||||
# For stand-alone clang-cl, assume x64.
|
||||
set(VBAM_VCPKG_PLATFORM "x64-windows-static")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED VBAM_VCPKG_PLATFORM)
|
||||
# Probably not an MSVC environment.
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(VCPKG_TARGET_TRIPLET ${VBAM_VCPKG_PLATFORM} CACHE STRING "Vcpkg target triplet (ex. x64-windows-static)" FORCE)
|
||||
message(STATUS "Inferred VCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET}")
|
||||
endif()
|
||||
|
||||
function(vcpkg_check_git_status git_status)
|
||||
if(NOT git_status EQUAL 0)
|
||||
# The VS vcpkg component cannot be written to without elevation.
|
||||
if(NOT git_status EQUAL 0 AND NOT VCPKG_ROOT MATCHES "^C:/Program Files/Microsoft Visual Studio/")
|
||||
message(FATAL_ERROR "Error updating vcpkg from git, please make sure git for windows is installed correctly, it can be installed from Visual Studio components")
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -86,6 +106,201 @@ function(vcpkg_deps_fixup vcpkg_exe)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(vcpkg_is_installed vcpkg_exe pkg_name pkg_ver pkg_triplet powershell outvar)
|
||||
set(${outvar} FALSE PARENT_SCOPE)
|
||||
|
||||
unset(CMAKE_MATCH_1)
|
||||
string(REGEX REPLACE "-r([0-9]+)\$" "" pkg_ver ${pkg_ver})
|
||||
set(pkg_rev ${CMAKE_MATCH_1})
|
||||
|
||||
string(REPLACE "-" "." pkg_ver ${pkg_ver})
|
||||
|
||||
if(NOT DEFINED VCPKG_INSTALLED_COUNT)
|
||||
if(VCPKG_ROOT MATCHES "^C:/Program Files/Microsoft Visual Studio/")
|
||||
execute_process(
|
||||
COMMAND ${powershell}
|
||||
-executionpolicy bypass -noprofile
|
||||
-command "import-module '${CMAKE_BINARY_DIR}/vcpkg-binpkg/vcpkg-binpkg.psm1'; vcpkg-list"
|
||||
OUTPUT_VARIABLE vcpkg_list_text
|
||||
)
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND ${vcpkg_exe} list
|
||||
OUTPUT_VARIABLE vcpkg_list_text
|
||||
ERROR_QUIET
|
||||
)
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE "\r?\n" ";" vcpkg_list_raw "${vcpkg_list_text}")
|
||||
|
||||
set(VCPKG_INSTALLED_COUNT 0 PARENT_SCOPE)
|
||||
foreach(pkg ${vcpkg_list_raw})
|
||||
if(NOT pkg MATCHES "^([^:[]+)[^:]*:([^ ]+) +([0-9][^ ]*) +.*\$")
|
||||
continue()
|
||||
endif()
|
||||
set(inst_pkg_name ${CMAKE_MATCH_1})
|
||||
set(inst_pkg_ver ${CMAKE_MATCH_3})
|
||||
set(inst_pkg_triplet ${CMAKE_MATCH_2})
|
||||
|
||||
unset(CMAKE_MATCH_1)
|
||||
string(REGEX REPLACE "#([0-9]+)\$" "" inst_pkg_ver ${inst_pkg_ver})
|
||||
if(CMAKE_MATCH_1)
|
||||
set(inst_pkg_rev ${CMAKE_MATCH_1})
|
||||
else()
|
||||
set(inst_pkg_rev FALSE)
|
||||
endif()
|
||||
|
||||
string(REPLACE "-" "." inst_pkg_ver ${inst_pkg_ver})
|
||||
|
||||
list(APPEND VCPKG_INSTALLED ${inst_pkg_name} ${inst_pkg_ver} ${inst_pkg_rev} ${inst_pkg_triplet})
|
||||
math(EXPR VCPKG_INSTALLED_COUNT "${VCPKG_INSTALLED_COUNT} + 1")
|
||||
endforeach()
|
||||
set(VCPKG_INSTALLED ${VCPKG_INSTALLED} PARENT_SCOPE)
|
||||
set(VCPKG_INSTALLED_COUNT ${VCPKG_INSTALLED_COUNT} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
if(NOT VCPKG_INSTALLED_COUNT GREATER 0)
|
||||
return()
|
||||
endif()
|
||||
|
||||
math(EXPR idx_max "(${VCPKG_INSTALLED_COUNT} - 1) * 4")
|
||||
|
||||
foreach(idx RANGE 0 ${idx_max} 4)
|
||||
math(EXPR idx_ver "${idx} + 1")
|
||||
math(EXPR idx_rev "${idx} + 2")
|
||||
math(EXPR idx_triplet "${idx} + 3")
|
||||
list(GET VCPKG_INSTALLED ${idx} inst_pkg_name)
|
||||
list(GET VCPKG_INSTALLED ${idx_ver} inst_pkg_ver)
|
||||
list(GET VCPKG_INSTALLED ${idx_rev} inst_pkg_rev)
|
||||
list(GET VCPKG_INSTALLED ${idx_triplet} inst_pkg_triplet)
|
||||
|
||||
if(NOT inst_pkg_triplet STREQUAL pkg_triplet)
|
||||
continue()
|
||||
endif()
|
||||
|
||||
if(inst_pkg_name STREQUAL pkg_name
|
||||
AND pkg_ver VERSION_LESS inst_pkg_ver
|
||||
OR (pkg_ver VERSION_EQUAL inst_pkg_ver
|
||||
AND ((NOT pkg_rev AND NOT inst_pkg_rev)
|
||||
OR (pkg_rev AND inst_pkg_rev AND (NOT pkg_rev GREATER inst_pkg_rev)))))
|
||||
|
||||
set(${outvar} TRUE PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(get_binary_packages vcpkg_exe)
|
||||
set(binary_packages_installed FALSE PARENT_SCOPE)
|
||||
|
||||
unset(triplets)
|
||||
unset(host_triplet)
|
||||
# Determine host triplet for vcpkg build dependencies
|
||||
if(WIN32)
|
||||
if($ENV{PROCESSOR_ARCHITECTURE} MATCHES "[Aa][Rr][Mm]64")
|
||||
set(host_triplet "arm64-windows")
|
||||
elseif($ENV{PROCESSOR_ARCHITECTURE} MATCHES "[Aa][Mm][Dd]64|[Xx]64")
|
||||
set(host_triplet "x64-windows")
|
||||
else()
|
||||
set(host_triplet "x86-windows")
|
||||
endif()
|
||||
endif()
|
||||
if(DEFINED host_triplet)
|
||||
list(APPEND triplets ${host_triplet})
|
||||
endif()
|
||||
list(APPEND triplets ${VCPKG_TARGET_TRIPLET})
|
||||
|
||||
foreach(triplet ${triplets})
|
||||
file(
|
||||
DOWNLOAD "https://nightly.visualboyadvance-m.org/vcpkg/${triplet}/" "${CMAKE_BINARY_DIR}/binary_package_list_${triplet}.html"
|
||||
STATUS pkg_list_status
|
||||
)
|
||||
list(GET pkg_list_status 1 pkg_list_error)
|
||||
list(GET pkg_list_status 0 pkg_list_status)
|
||||
|
||||
if(NOT pkg_list_status EQUAL 0)
|
||||
message(STATUS "Failed to download vcpkg binary package list: ${pkg_list_status} - ${pkg_list_error}")
|
||||
return()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
unset(binary_packages)
|
||||
foreach(triplet ${triplets})
|
||||
file(READ "${CMAKE_BINARY_DIR}/binary_package_list_${triplet}.html" raw_html)
|
||||
string(REGEX MATCHALL "<a href=\"[^\"]+[.]zip\"" links ${raw_html})
|
||||
foreach(link ${links})
|
||||
string(REGEX REPLACE "<a href=\"([^\"]+[.]zip)\"" "\\1" pkg ${link})
|
||||
list(APPEND binary_packages ${pkg})
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
set(vcpkg_binpkg_dir ${CMAKE_BINARY_DIR}/vcpkg-binpkg)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
vcpkg_binpkg
|
||||
URL "https://github.com/rkitover/vcpkg-binpkg-prototype/archive/refs/heads/master.zip"
|
||||
SOURCE_DIR ${vcpkg_binpkg_dir}
|
||||
)
|
||||
|
||||
FetchContent_GetProperties(vcpkg_binpkg)
|
||||
if(NOT vcpkg_binpkg_POPULATED)
|
||||
FetchContent_Populate(vcpkg_binpkg)
|
||||
endif()
|
||||
|
||||
unset(to_install)
|
||||
foreach(pkg ${binary_packages})
|
||||
if(NOT pkg MATCHES "([^_]+)_([^_]+)_([^.]+)[.]zip")
|
||||
continue()
|
||||
endif()
|
||||
set(pkg_name ${CMAKE_MATCH_1})
|
||||
set(pkg_version ${CMAKE_MATCH_2})
|
||||
set(pkg_triplet ${CMAKE_MATCH_3})
|
||||
|
||||
vcpkg_is_installed(${vcpkg_exe} ${pkg_name} ${pkg_version} ${pkg_triplet} ${POWERSHELL} pkg_installed)
|
||||
|
||||
if(NOT pkg_installed)
|
||||
list(APPEND to_install ${pkg})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(to_install)
|
||||
set(bin_pkgs_dir ${CMAKE_BINARY_DIR}/vcpkg-binary-packages)
|
||||
file(MAKE_DIRECTORY ${bin_pkgs_dir})
|
||||
|
||||
foreach(pkg ${to_install})
|
||||
string(REGEX REPLACE "^[^_]+_[^_]+_([^.]+)[.]zip\$" "\\1" pkg_triplet ${pkg})
|
||||
|
||||
message(STATUS "Downloading https://nightly.visualboyadvance-m.org/vcpkg/${pkg_triplet}/${pkg} ...")
|
||||
|
||||
file(
|
||||
DOWNLOAD "https://nightly.visualboyadvance-m.org/vcpkg/${pkg_triplet}/${pkg}" "${bin_pkgs_dir}/${pkg}"
|
||||
STATUS pkg_download_status
|
||||
)
|
||||
list(GET pkg_download_status 1 pkg_download_error)
|
||||
list(GET pkg_download_status 0 pkg_download_status)
|
||||
|
||||
if(NOT pkg_download_status EQUAL 0)
|
||||
message(STATUS "Failed to download vcpkg binary package '${pkg}': ${pkg_download_status} - ${pkg_download_error}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS "done.")
|
||||
endforeach()
|
||||
|
||||
# -command "import-module ($env:USERPROFILE + '/source/repos/vcpkg-binpkg-prototype/vcpkg-binpkg.psm1'); vcpkg-instpkg ."
|
||||
execute_process(
|
||||
COMMAND ${POWERSHELL}
|
||||
-executionpolicy bypass -noprofile
|
||||
-command "import-module '${CMAKE_BINARY_DIR}/vcpkg-binpkg/vcpkg-binpkg.psm1'; vcpkg-instpkg ."
|
||||
WORKING_DIRECTORY ${bin_pkgs_dir}
|
||||
)
|
||||
|
||||
file(REMOVE_RECURSE ${bin_pkgs_dir})
|
||||
endif()
|
||||
|
||||
set(binary_packages_installed TRUE PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(vcpkg_remove_optional_deps vcpkg_exe)
|
||||
list(LENGTH VCPKG_DEPS_OPTIONAL optionals_list_len)
|
||||
math(EXPR optionals_list_last "${optionals_list_len} - 1")
|
||||
@@ -105,17 +320,34 @@ function(vcpkg_remove_optional_deps vcpkg_exe)
|
||||
endfunction()
|
||||
|
||||
function(vcpkg_set_toolchain)
|
||||
if(NOT DEFINED POWERSHELL)
|
||||
message(FATAL_ERROR "Powershell is required to use vcpkg binaries.")
|
||||
endif()
|
||||
if(NOT DEFINED ENV{VCPKG_ROOT})
|
||||
get_filename_component(preferred_root ${CMAKE_SOURCE_DIR}/../vcpkg ABSOLUTE)
|
||||
|
||||
if(WIN32)
|
||||
if(DEFINED ENV{CI} OR EXISTS /vcpkg)
|
||||
set(VCPKG_ROOT /vcpkg)
|
||||
elseif(EXISTS c:/vcpkg)
|
||||
set(VCPKG_ROOT c:/vcpkg)
|
||||
# Prefer the preferred root to the VS default which is more difficult to deal with, if it exists.
|
||||
elseif(EXISTS ${preferred_root})
|
||||
set(VCPKG_ROOT ${preferred_root})
|
||||
else()
|
||||
find_program(vcpkg_exe_path NAME vcpkg.exe HINTS ENV PATH)
|
||||
|
||||
if(vcpkg_exe_path)
|
||||
get_filename_component(VCPKG_ROOT ${vcpkg_exe_path} DIRECTORY)
|
||||
get_filename_component(VCPKG_ROOT ${VCPKG_ROOT} ABSOLUTE)
|
||||
endif()
|
||||
|
||||
unset(vcpkg_exe_path)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VCPKG_ROOT)
|
||||
get_filename_component(VCPKG_ROOT ${CMAKE_SOURCE_DIR}/../vcpkg ABSOLUTE)
|
||||
set(VCPKG_ROOT ${preferred_root})
|
||||
endif()
|
||||
|
||||
set(ENV{VCPKG_ROOT} ${VCPKG_ROOT})
|
||||
@@ -188,8 +420,6 @@ function(vcpkg_set_toolchain)
|
||||
vcpkg_check_git_status(${git_status})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
vcpkg_check_git_status(${git_status})
|
||||
endif()
|
||||
|
||||
# build latest vcpkg, if needed
|
||||
@@ -212,9 +442,9 @@ function(vcpkg_set_toolchain)
|
||||
endforeach()
|
||||
|
||||
if(WIN32)
|
||||
set(vcpkg_exe vcpkg)
|
||||
set(vcpkg_exe "${VCPKG_ROOT}/vcpkg.exe")
|
||||
else()
|
||||
set(vcpkg_exe ./vcpkg)
|
||||
set(vcpkg_exe "${VCPKG_ROOT}/vcpkg")
|
||||
endif()
|
||||
|
||||
# update portfiles
|
||||
@@ -223,74 +453,78 @@ function(vcpkg_set_toolchain)
|
||||
WORKING_DIRECTORY ${VCPKG_ROOT}
|
||||
)
|
||||
|
||||
# Get number of seconds since midnight (might be wrong if am/pm is in effect on Windows.)
|
||||
vcpkg_seconds()
|
||||
set(began ${seconds})
|
||||
get_binary_packages(${vcpkg_exe})
|
||||
|
||||
# Limit total installation time to 20 minutes to not overrun CI time limit.
|
||||
math(EXPR time_limit "${began} + (20 * 60)")
|
||||
if(NOT binary_packages_installed)
|
||||
# Get number of seconds since midnight (might be wrong if am/pm is in effect on Windows.)
|
||||
vcpkg_seconds()
|
||||
set(began ${seconds})
|
||||
|
||||
vcpkg_deps_fixup("${vcpkg_exe}")
|
||||
# Limit total installation time to 20 minutes to not overrun CI time limit.
|
||||
math(EXPR time_limit "${began} + (20 * 60)")
|
||||
|
||||
# Install core deps.
|
||||
execute_process(
|
||||
COMMAND ${vcpkg_exe} install ${VCPKG_DEPS_QUALIFIED}
|
||||
WORKING_DIRECTORY ${VCPKG_ROOT}
|
||||
)
|
||||
vcpkg_deps_fixup("${vcpkg_exe}")
|
||||
|
||||
# If ports have been updated, and there is time, rebuild cache one at a time to not overrun the CI time limit.
|
||||
vcpkg_seconds()
|
||||
|
||||
if(seconds LESS time_limit)
|
||||
vcpkg_get_first_upgrade(${vcpkg_exe})
|
||||
|
||||
if(DEFINED first_upgrade)
|
||||
# If we have to upgrade zlib, remove optional deps first so that
|
||||
# the build doesn't overrun the CI time limit.
|
||||
if(first_upgrade STREQUAL "zlib")
|
||||
vcpkg_remove_optional_deps(${vcpkg_exe})
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${vcpkg_exe} upgrade --no-dry-run "${first_upgrade}:${VCPKG_TARGET_TRIPLET}"
|
||||
WORKING_DIRECTORY ${VCPKG_ROOT}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Install optional deps, within time limit.
|
||||
list(LENGTH VCPKG_DEPS_OPTIONAL optionals_list_len)
|
||||
math(EXPR optionals_list_last "${optionals_list_len} - 1")
|
||||
|
||||
foreach(i RANGE 0 ${optionals_list_last} 2)
|
||||
list(GET VCPKG_DEPS_OPTIONAL ${i} dep)
|
||||
|
||||
math(EXPR var_idx "${i} + 1")
|
||||
|
||||
list(GET VCPKG_DEPS_OPTIONAL ${var_idx} var)
|
||||
set(val "${${var}}")
|
||||
# Install core deps.
|
||||
execute_process(
|
||||
COMMAND ${vcpkg_exe} install ${VCPKG_DEPS_QUALIFIED}
|
||||
WORKING_DIRECTORY ${VCPKG_ROOT}
|
||||
)
|
||||
|
||||
# If ports have been updated, and there is time, rebuild cache one at a time to not overrun the CI time limit.
|
||||
vcpkg_seconds()
|
||||
|
||||
if("${val}" OR (seconds LESS time_limit AND ("${val}" OR "${val}" STREQUAL "")))
|
||||
set(dep_qualified "${dep}:${VCPKG_TARGET_TRIPLET}")
|
||||
if(seconds LESS time_limit)
|
||||
vcpkg_get_first_upgrade(${vcpkg_exe})
|
||||
|
||||
execute_process(
|
||||
COMMAND ${vcpkg_exe} install ${dep_qualified}
|
||||
WORKING_DIRECTORY ${VCPKG_ROOT}
|
||||
)
|
||||
if(DEFINED first_upgrade)
|
||||
# If we have to upgrade zlib, remove optional deps first so that
|
||||
# the build doesn't overrun the CI time limit.
|
||||
if(first_upgrade STREQUAL "zlib")
|
||||
vcpkg_remove_optional_deps(${vcpkg_exe})
|
||||
endif()
|
||||
|
||||
set(${var} ON)
|
||||
else()
|
||||
set(${var} OFF)
|
||||
execute_process(
|
||||
COMMAND ${vcpkg_exe} upgrade --no-dry-run "${first_upgrade}:${VCPKG_TARGET_TRIPLET}"
|
||||
WORKING_DIRECTORY ${VCPKG_ROOT}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Install optional deps, within time limit.
|
||||
list(LENGTH VCPKG_DEPS_OPTIONAL optionals_list_len)
|
||||
math(EXPR optionals_list_last "${optionals_list_len} - 1")
|
||||
|
||||
foreach(i RANGE 0 ${optionals_list_last} 2)
|
||||
list(GET VCPKG_DEPS_OPTIONAL ${i} dep)
|
||||
|
||||
math(EXPR var_idx "${i} + 1")
|
||||
|
||||
list(GET VCPKG_DEPS_OPTIONAL ${var_idx} var)
|
||||
set(val "${${var}}")
|
||||
|
||||
vcpkg_seconds()
|
||||
|
||||
if("${val}" OR (seconds LESS time_limit AND ("${val}" OR "${val}" STREQUAL "")))
|
||||
set(dep_qualified "${dep}:${VCPKG_TARGET_TRIPLET}")
|
||||
|
||||
execute_process(
|
||||
COMMAND ${vcpkg_exe} install ${dep_qualified}
|
||||
WORKING_DIRECTORY ${VCPKG_ROOT}
|
||||
)
|
||||
|
||||
set(${var} ON)
|
||||
else()
|
||||
set(${var} OFF)
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(WIN32 AND VCPKG_TARGET_TRIPLET MATCHES x64 AND CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
set(CMAKE_GENERATOR_PLATFORM x64 CACHE STRING "visual studio build architecture" FORCE)
|
||||
endif()
|
||||
|
||||
if(WIN32 AND NOT CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
if(WIN32 AND NOT CMAKE_GENERATOR MATCHES "Visual Studio" AND NOT DEFINED CMAKE_CXX_COMPILER)
|
||||
if(VCPKG_TARGET_TRIPLET MATCHES "^x[68][46]-windows-")
|
||||
# set toolchain to VS for e.g. Ninja or jom
|
||||
set(CMAKE_C_COMPILER cl CACHE STRING "Microsoft C/C++ Compiler" FORCE)
|
||||
@@ -307,4 +541,14 @@ endfunction()
|
||||
|
||||
vcpkg_set_toolchain()
|
||||
|
||||
# Make vcpkg use debug libs for RelWithDebInfo
|
||||
set(orig_build_type ${CMAKE_BUILD_TYPE})
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
endif()
|
||||
|
||||
include(${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake)
|
||||
|
||||
set(CMAKE_BUILD_TYPE ${orig_build_type})
|
||||
unset(orig_build_type)
|
||||
|
@@ -1,44 +0,0 @@
|
||||
include(VbamFunctions)
|
||||
|
||||
function(add_compiler_flags)
|
||||
foreach(var RELEASE DEBUG RELWITHDEBINFO MINSIZEREL)
|
||||
set("CMAKE_CXX_FLAGS_${var}" "" CACHE STRING "MUST BE UNSET" FORCE)
|
||||
set("CMAKE_CXX_FLAGS_${var}" "" PARENT_SCOPE)
|
||||
set("CMAKE_C_FLAGS_${var}" "" CACHE STRING "MUST BE UNSET" FORCE)
|
||||
set("CMAKE_C_FLAGS_${var}" "" PARENT_SCOPE)
|
||||
endforeach()
|
||||
|
||||
# Set C and CXX flags if not already set.
|
||||
foreach(flag ${ARGV})
|
||||
foreach(var CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
|
||||
# Remove any duplicates first.
|
||||
remove_dupes("${${var}}" "${var}")
|
||||
|
||||
string(FIND "${${var}}" "${flag}" found)
|
||||
|
||||
if(found EQUAL -1)
|
||||
set("${var}" "${${var}} ${flag}" CACHE STRING "Compiler Flags" FORCE)
|
||||
set("${var}" "${${var}} ${flag}" PARENT_SCOPE)
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(add_linker_flags)
|
||||
# Set linker flags if not already set.
|
||||
foreach(flag ${ARGV})
|
||||
foreach(var EXE SHARED MODULE STATIC)
|
||||
set(var "CMAKE_${var}_LINKER_FLAGS")
|
||||
|
||||
# Remove any duplicates first.
|
||||
remove_dupes("${${var}}" "${var}")
|
||||
|
||||
string(FIND "${${var}}" "${flag}" found)
|
||||
|
||||
if(found EQUAL -1)
|
||||
set("${var}" "${${var}} ${flag}" CACHE STRING "Linker Flags" FORCE)
|
||||
set("${var}" "${${var}} ${flag}" PARENT_SCOPE)
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
endfunction()
|
37
cmake/Toolchain-asan.cmake
Normal file
37
cmake/Toolchain-asan.cmake
Normal file
@@ -0,0 +1,37 @@
|
||||
if(NOT ENABLE_ASAN)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
check_cxx_compiler_flag(/fsanitize=address MSVC_ASAN_SUPPORTED)
|
||||
if(MSVC_ASAN_SUPPORTED)
|
||||
add_compile_options(/fsanitize=address)
|
||||
add_compile_definitions(_DISABLE_VECTOR_ANNOTATION _DISABLE_STRING_ANNOTATION)
|
||||
else()
|
||||
message(WARNING "ASAN not available for the compiler, disabling.")
|
||||
set(ENABLE_ASAN OFF)
|
||||
return()
|
||||
endif()
|
||||
else()
|
||||
# ASAN does not work on non-debug builds for GCC and Clang.
|
||||
if(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
message(WARNING "ASAN requires debug build, set -DCMAKE_BUILD_TYPE=Debug, disabling.")
|
||||
set(ENABLE_ASAN OFF)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# It is necessary to modify the linker flagas for the compiler check to work.
|
||||
set(BACKUP_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-fsanitize=address")
|
||||
check_cxx_compiler_flag(-fsanitize=address ASAN_SUPPORTED)
|
||||
set(CMAKE_EXE_LINKER_FLAGS ${BACKUP_LINKER_FLAGS})
|
||||
|
||||
if(ASAN_SUPPORTED)
|
||||
add_compile_options(-fsanitize=address)
|
||||
add_link_options(-fsanitize=address)
|
||||
else()
|
||||
message(WARNING "ASAN not available for the compiler, disabling.")
|
||||
set(ENABLE_ASAN OFF)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
51
cmake/Toolchain-gcc-clang.cmake
Normal file
51
cmake/Toolchain-gcc-clang.cmake
Normal file
@@ -0,0 +1,51 @@
|
||||
if(X86_32 OR X86_64)
|
||||
add_compile_options(-mfpmath=sse -msse2)
|
||||
endif()
|
||||
|
||||
if(X86_64)
|
||||
# Require and optimize for Core2 level support, tune for generic.
|
||||
add_compile_options(-march=core2 -mtune=generic)
|
||||
elseif(X86_32)
|
||||
# Optimize for pentium-mmx and tune for generic for older builds.
|
||||
add_compile_options(-march=pentium-mmx -mtune=generic)
|
||||
endif()
|
||||
|
||||
# Common flags.
|
||||
add_compile_options(
|
||||
-pipe
|
||||
-Wno-unused-command-line-argument
|
||||
-Wno-deprecated-copy
|
||||
-Wformat
|
||||
-Wformat-security
|
||||
-feliminate-unused-debug-types
|
||||
-fdiagnostics-color=always
|
||||
)
|
||||
|
||||
# check if ssp flags are supported.
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
check_cxx_compiler_flag(-fstack-protector-strong STACK_PROTECTOR_SUPPORTED)
|
||||
|
||||
if(STACK_PROTECTOR_SUPPORTED)
|
||||
add_compile_options(-fstack-protector-strong)
|
||||
|
||||
check_cxx_compiler_flag("--param ssp-buffer-size=4" SSP_BUFFER_SIZE_SUPPORTED)
|
||||
if(SSP_BUFFER_SIZE_SUPPORTED)
|
||||
add_compile_options(--param ssp-buffer-size=4)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ENABLE_ASM) # inline asm is not allowed with -fPIC
|
||||
add_compile_options(-fPIC)
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
add_compile_options(-ggdb3 -Og -fno-omit-frame-pointer -Wall -Wextra)
|
||||
else()
|
||||
add_compile_options(-Ofast -fomit-frame-pointer)
|
||||
endif()
|
||||
|
||||
# for some reason this is necessary
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
|
||||
include_directories(/usr/local/include)
|
||||
endif()
|
28
cmake/Toolchain-mingw.cmake
Normal file
28
cmake/Toolchain-mingw.cmake
Normal file
@@ -0,0 +1,28 @@
|
||||
if (NOT MINGW)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# this has to run after the toolchain is initialized.
|
||||
include_directories("${CMAKE_SOURCE_DIR}/dependencies/mingw-include")
|
||||
include_directories("${CMAKE_SOURCE_DIR}/dependencies/mingw-xaudio/include")
|
||||
|
||||
# link libgcc/libstdc++ statically on GCC/mingw
|
||||
# and adjust link command when making a static binary
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND VBAM_STATIC)
|
||||
# some dists don't have a static libpthread
|
||||
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread ")
|
||||
|
||||
if(WIN32)
|
||||
add_custom_command(
|
||||
TARGET visualboyadvance-m PRE_LINK
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/msys-link-static.cmake
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
else()
|
||||
add_custom_command(
|
||||
TARGET visualboyadvance-m PRE_LINK
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/link-static.cmake
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
endif()
|
||||
endif()
|
83
cmake/Toolchain-msvc.cmake
Normal file
83
cmake/Toolchain-msvc.cmake
Normal file
@@ -0,0 +1,83 @@
|
||||
# Set the runtime library properly.
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:DEBUG>:Debug>" CACHE INTERNAL "")
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
# MSVC-specific flags (not supported by clang-cl).
|
||||
add_compile_options(/nologo)
|
||||
if (NOT CMAKE_GENERATOR MATCHES "Ninja")
|
||||
# Multi-processor compilation does not work well with Ninja.
|
||||
add_compile_options(/MP)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include_directories("${CMAKE_SOURCE_DIR}/dependencies/msvc")
|
||||
|
||||
add_compile_definitions(
|
||||
_FORCENAMELESSUNION
|
||||
WIN32_LEAN_AND_MEAN
|
||||
WIN32
|
||||
_WINDOWS
|
||||
__STDC_LIMIT_MACROS
|
||||
__STDC_CONSTANT_MACROS
|
||||
_CRT_SECURE_NO_WARNINGS
|
||||
_UNICODE
|
||||
UNICODE
|
||||
WINVER=0x0A00
|
||||
NTDDI_VERSION=0x0A000007
|
||||
NOMINMAX
|
||||
)
|
||||
add_compile_options(
|
||||
/W4
|
||||
/GR
|
||||
/EHsc
|
||||
)
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
add_compile_definitions(_DEBUG)
|
||||
add_compile_options(/Ob0 /Od /RTC1)
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND NOT ENABLE_ASAN)
|
||||
# Use Edit and Continue with MSVC.
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "EditAndContinue" CACHE STRING "" FORCE)
|
||||
else()
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "ProgramDatabase" CACHE STRING "" FORCE)
|
||||
endif()
|
||||
else()
|
||||
add_compile_options(/MT /Oi /Gy)
|
||||
add_link_options(/OPT:REF /OPT:ICF)
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "ProgramDatabase" CACHE STRING "" FORCE)
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
|
||||
add_compile_options(/O1 /Ob1)
|
||||
elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||
add_compile_options(/O2 /Ob1)
|
||||
else()
|
||||
add_compile_options(/O2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS "3.25")
|
||||
# Backwards-compatible way of setting the /Z option.
|
||||
if(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT STREQUAL "EditAndContinue")
|
||||
add_compile_options(/ZI)
|
||||
elseif(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT STREQUAL "ProgramDatabase")
|
||||
add_compile_options(/Zi)
|
||||
elseif(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT STREQUAL "Embedded")
|
||||
add_compile_options(/Z7)
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown value for CMAKE_MSVC_DEBUG_INFORMATION_FORMAT: ${CMAKE_MSVC_DEBUG_INFORMATION_FORMAT}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_RC_FLAGS "-c65001 /DWIN32" CACHE STRING "" FORCE)
|
||||
|
||||
# We need to explicitly set all of these to override the CMake defaults.
|
||||
set(CMAKE_CXX_FLAGS "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS_DEBUG "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS_RELEASE "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS_MINSIZEREL "" CACHE STRING "" FORCE)
|
73
cmake/Toolchain.cmake
Normal file
73
cmake/Toolchain.cmake
Normal file
@@ -0,0 +1,73 @@
|
||||
# Compiler stuff
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
include(ProcessorCount)
|
||||
ProcessorCount(num_cpus)
|
||||
|
||||
if (ENABLE_LTO)
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT LTO_SUPPORTED)
|
||||
if (LTO_SUPPORTED)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
else()
|
||||
message(WARNING "LTO is not supported by the compiler, diasabling LTO")
|
||||
set(ENABLE_LTO OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Common compiler settings.
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
add_compile_definitions(DEBUG)
|
||||
else()
|
||||
add_compile_definitions(NDEBUG)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
add_compile_definitions(MACHO)
|
||||
elseif("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
add_compile_definitions(ELF)
|
||||
endif()
|
||||
|
||||
if(X86_64)
|
||||
add_compile_definitions(__AMD64__ __X86_64__)
|
||||
endif()
|
||||
|
||||
# Enable ASAN if requested and supported.
|
||||
include(Toolchain-asan)
|
||||
|
||||
# MINGW/MSYS-specific settings.
|
||||
include(Toolchain-mingw)
|
||||
|
||||
# Toolchain-specific settings.
|
||||
if(MSVC)
|
||||
# This also includes clang-cl.
|
||||
include(Toolchain-msvc)
|
||||
else()
|
||||
include(Toolchain-gcc-clang)
|
||||
endif()
|
||||
|
||||
# Assembler flags.
|
||||
if(ENABLE_ASM_CORE OR ENABLE_ASM_SCALERS)
|
||||
if(MSVC)
|
||||
if(NOT EXISTS ${CMAKE_BINARY_DIR}/nuget.exe)
|
||||
file(DOWNLOAD "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" ${CMAKE_BINARY_DIR}/nuget.exe)
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND nuget.exe install nasm2 -OutputDirectory ${CMAKE_BINARY_DIR}/nuget
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
file(GLOB pkg ${CMAKE_BINARY_DIR}/nuget/nasm2*)
|
||||
|
||||
list(APPEND CMAKE_PROGRAM_PATH ${pkg}/tools)
|
||||
endif()
|
||||
|
||||
enable_language(ASM_NASM)
|
||||
|
||||
set(ASM_ENABLED ON)
|
||||
endif()
|
||||
|
||||
if(ASM_ENABLED)
|
||||
string(REGEX REPLACE "<FLAGS>" "-I${CMAKE_SOURCE_DIR}/src/filters/hq/asm/ -O1 -w-orphan-labels" CMAKE_ASM_NASM_COMPILE_OBJECT ${CMAKE_ASM_NASM_COMPILE_OBJECT})
|
||||
endif()
|
@@ -2,12 +2,6 @@
|
||||
# Update version in appcast.xml to latest tag.
|
||||
# Commit web-data.
|
||||
|
||||
find_package(Git)
|
||||
|
||||
if(NOT GIT_FOUND)
|
||||
message(FATAL_ERROR "git is required to update the appcast")
|
||||
endif()
|
||||
|
||||
function(update_appcast)
|
||||
if(UPDATE_APPCAST STREQUAL UNDO)
|
||||
file(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/web-data)
|
||||
@@ -81,10 +75,12 @@ Ignore the following cmake error.
|
||||
endwhile()
|
||||
|
||||
# Convert to UNIX line endings on Windows, just copy the file otherwise.
|
||||
|
||||
if(CMAKE_HOST_SYSTEM MATCHES Windows OR ((NOT DEFINED CMAKE_HOST_SYSTEM) AND WIN32))
|
||||
if(NOT DEFINED POWERSHELL)
|
||||
message(FATAL_ERROR "Powershell is required to convert line endings on Windows.")
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command [=[
|
||||
COMMAND ${POWERSHELL} -NoLogo -NoProfile -ExecutionPolicy Bypass -Command [=[
|
||||
$text = [IO.File]::ReadAllText("appcast.xml.work") -replace "`r`n", "`n"
|
||||
[IO.File]::WriteAllText("appcast.xml", $text)
|
||||
]=]
|
||||
|
@@ -1,103 +0,0 @@
|
||||
# UseGCCBinUtilsWrappers.cmake
|
||||
#
|
||||
# Use gcc binutils wrappers such as gcc-ar, this may be necessary for LTO.
|
||||
#
|
||||
# To use:
|
||||
#
|
||||
# put a copy into your <project_root>/CMakeScripts/
|
||||
#
|
||||
# In your main CMakeLists.txt add the command:
|
||||
#
|
||||
# INCLUDE(UseGCCBinUtilsWrappers)
|
||||
#
|
||||
# BSD 2-Clause License
|
||||
#
|
||||
# Copyright (c) 2016, Rafael Kitover
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice, this
|
||||
# list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# only do this when compiling with gcc/g++
|
||||
IF(NOT (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC))
|
||||
RETURN()
|
||||
ENDIF()
|
||||
|
||||
# first try appending -util to basename of compiler
|
||||
STRING(REGEX MATCH "\\.(exe|EXE)$" GCC_EXE_SUFFIX ${CMAKE_C_COMPILER})
|
||||
STRING(REGEX REPLACE "\\.(exe|EXE)$" "" GCC_BASENAME ${CMAKE_C_COMPILER})
|
||||
|
||||
SET(GCC_AR "${GCC_BASENAME}-ar${GCC_EXE_SUFFIX}")
|
||||
SET(GCC_NM "${GCC_BASENAME}-nm${GCC_EXE_SUFFIX}")
|
||||
SET(GCC_RANLIB "${GCC_BASENAME}-ranlib${GCC_EXE_SUFFIX}")
|
||||
|
||||
# if that does not work, try looking for gcc-util in the compiler directory,
|
||||
# and failing that in the PATH
|
||||
|
||||
GET_FILENAME_COMPONENT(GCC_DIRNAME ${CMAKE_C_COMPILER} DIRECTORY)
|
||||
|
||||
IF(NOT EXISTS ${GCC_AR})
|
||||
UNSET(GCC_AR)
|
||||
|
||||
FIND_PROGRAM(GCC_AR NAMES gcc-ar gcc-ar.exe GCC-AR.EXE HINTS ${GCC_DIRNAME})
|
||||
ENDIF()
|
||||
|
||||
IF(NOT EXISTS ${GCC_NM})
|
||||
UNSET(GCC_NM)
|
||||
|
||||
FIND_PROGRAM(GCC_NM NAMES gcc-nm gcc-nm.exe GCC-NM.EXE HINTS ${GCC_DIRNAME})
|
||||
ENDIF()
|
||||
|
||||
IF(NOT EXISTS ${GCC_RANLIB})
|
||||
UNSET(GCC_RANLIB)
|
||||
|
||||
FIND_PROGRAM(GCC_RANLIB NAMES gcc-ranlib gcc-ranlib.exe GCC-RANLIB.EXE HINTS ${GCC_DIRNAME})
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(PathRun)
|
||||
|
||||
IF(EXISTS ${GCC_AR})
|
||||
MESSAGE("-- Found gcc-ar: ${GCC_AR}")
|
||||
|
||||
SET(target "${CMAKE_BINARY_DIR}/gcc-ar-wrap")
|
||||
MAKE_PATH_RUN_WRAPPER("${GCC_AR}" "${target}")
|
||||
SET(CMAKE_AR "${target}")
|
||||
ENDIF()
|
||||
|
||||
IF(EXISTS ${GCC_NM})
|
||||
MESSAGE("-- Found gcc-nm: ${GCC_NM}")
|
||||
|
||||
SET(target "${CMAKE_BINARY_DIR}/gcc-nm-wrap")
|
||||
MAKE_PATH_RUN_WRAPPER("${GCC_NM}" "${target}")
|
||||
SET(CMAKE_NM "${target}")
|
||||
ENDIF()
|
||||
|
||||
IF(EXISTS ${GCC_RANLIB})
|
||||
MESSAGE("-- Found gcc-ranlib: ${GCC_RANLIB}")
|
||||
|
||||
SET(target "${CMAKE_BINARY_DIR}/gcc-ranlib-wrap")
|
||||
MAKE_PATH_RUN_WRAPPER("${GCC_RANLIB}" "${target}")
|
||||
SET(CMAKE_RANLIB "${target}")
|
||||
ENDIF()
|
||||
|
||||
FOREACH(VAR "GCC_AR" "GCC_NM" "GCC_RANLIB" "GCC_DIRNAME" "GCC_BASENAME" "GCC_EXE_SUFFIX" "target")
|
||||
UNSET(${VAR})
|
||||
ENDFOREACH()
|
@@ -1,43 +1,3 @@
|
||||
# From: https://stackoverflow.com/a/41416298/262458
|
||||
function(REMOVE_DUPES ARG_STR OUTPUT)
|
||||
set(ARG_LIST ${ARG_STR})
|
||||
separate_arguments(ARG_LIST)
|
||||
list(REMOVE_DUPLICATES ARG_LIST)
|
||||
string (REGEX REPLACE "([^\\]|^);" "\\1 " _TMP_STR "${ARG_LIST}")
|
||||
string (REGEX REPLACE "[\\](.)" "\\1" _TMP_STR "${_TMP_STR}") #fixes escaping
|
||||
set (${OUTPUT} "${_TMP_STR}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# From: https://stackoverflow.com/a/7216542
|
||||
function(JOIN VALUES GLUE OUTPUT)
|
||||
string (REGEX REPLACE "([^\\]|^);" "\\1${GLUE}" _TMP_STR "${VALUES}")
|
||||
string (REGEX REPLACE "[\\](.)" "\\1" _TMP_STR "${_TMP_STR}") #fixes escaping
|
||||
set (${OUTPUT} "${_TMP_STR}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# convert msys paths like /c/foo to windows paths like c:/foo
|
||||
# for variables set by FindWxWidgets
|
||||
function(normalize_wx_paths)
|
||||
if(MSYS)
|
||||
unset(new_paths)
|
||||
foreach(p ${wxWidgets_LIBRARY_DIRS})
|
||||
execute_process(COMMAND cygpath -m "${p}" OUTPUT_VARIABLE p_win OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
list(APPEND new_paths "${p_win}")
|
||||
endforeach()
|
||||
|
||||
set(wxWidgets_LIBRARY_DIRS ${new_paths} PARENT_SCOPE)
|
||||
|
||||
string(REGEX REPLACE "((^| )[^/]*)/([a-zA-Z])/" "\\1\\3:/" new_libs "${wxWidgets_LIBRARIES}")
|
||||
|
||||
set(wxWidgets_LIBRARIES ${new_libs} PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
macro(cleanup_wx_vars)
|
||||
if(wxWidgets_CXX_FLAGS)
|
||||
list(REMOVE_ITEM wxWidgets_CXX_FLAGS -fpermissive)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
function(cygpath var path)
|
||||
execute_process(
|
||||
@@ -78,22 +38,23 @@ function(check_clean_exit var)
|
||||
endfunction()
|
||||
|
||||
function(find_wx_util var util)
|
||||
if(EXISTS /etc/gentoo-release)
|
||||
# On win32, including cross builds we prefer the plain utility name
|
||||
# first from PATH.
|
||||
if(WIN32 OR EXISTS /etc/gentoo-release)
|
||||
# On win32, including cross builds we prefer the plain utility
|
||||
# name first from PATH, with the exception of -static for static
|
||||
# builds.
|
||||
#
|
||||
# On Gentoo /usr/bin/wx-config loads the eselected build, so we want
|
||||
# to try that first.
|
||||
# On Gentoo /usr/bin/wx-config loads the eselected build, so we
|
||||
# want to try that first.
|
||||
#
|
||||
# This makes a one element of empty string list.
|
||||
set(conf_suffixes ";")
|
||||
set(major_versions ";")
|
||||
elseif(WIN32)
|
||||
set(major_versions ";")
|
||||
endif()
|
||||
|
||||
if(VBAM_STATIC)
|
||||
list(APPEND conf_suffixes static)
|
||||
if(VBAM_STATIC)
|
||||
set(conf_suffixes "static;")
|
||||
else()
|
||||
set(conf_suffixes ";")
|
||||
endif()
|
||||
|
||||
set(major_versions ";")
|
||||
endif()
|
||||
|
||||
list(APPEND conf_suffixes gtk4u gtk4 gtk3u gtk3 gtk2u gtk2 "")
|
||||
@@ -151,5 +112,3 @@ function(find_wx_util var util)
|
||||
set(${var} ${util} PARENT_SCOPE)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# vim:sw=4 sts et:
|
||||
|
@@ -1,7 +1,8 @@
|
||||
with import <nixpkgs> {};
|
||||
stdenv.mkDerivation {
|
||||
name = "visualboyadvance-m";
|
||||
buildInputs = [ ninja cmake gcc nasm gettext pkg-config zip sfml zlib ffmpeg wxGTK31-gtk3 mesa glfw SDL2 gtk3-x11 pcre util-linuxMinimal libselinux libsepol libthai libdatrie xorg.libXdmcp xorg.libXtst libxkbcommon epoxy dbus_libs at-spi2-core ];
|
||||
# WIP: Trying to get this to work on mac nix.
|
||||
# buildInputs = [ ninja cmake gcc nasm gettext pkg-config zip sfml zlib ffmpeg wxmac SDL2 pcre ];
|
||||
buildInputs = if stdenv.isDarwin then
|
||||
[ ninja cmake gcc nasm gettext pkg-config zip sfml zlib openal ffmpeg wxGTK32 SDL2 pcre pcre2 darwin.apple_sdk.frameworks.IOKit darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa darwin.apple_sdk.frameworks.QuartzCore darwin.apple_sdk.frameworks.AudioToolbox darwin.apple_sdk.frameworks.OpenGL darwin.apple_sdk.frameworks.OpenAL llvmPackages_latest.clang llvmPackages_latest.bintools ]
|
||||
else
|
||||
[ ninja cmake gcc nasm gettext pkg-config zip sfml zlib openal ffmpeg wxGTK32 mesa glfw SDL2 gtk3-x11 pcre pcre2 util-linuxMinimal libselinux libsepol libthai libdatrie xorg.libXdmcp xorg.libXtst libxkbcommon epoxy dbus at-spi2-core ];
|
||||
}
|
||||
|
Submodule dependencies updated: a39ddbb983...e8ce758a98
@@ -8,9 +8,8 @@ Known preprocessor switches:
|
||||
- SDL: Defined for the SDL version
|
||||
- GBA_LOGGING: Enables logging for the GBA core
|
||||
- FINAL_VERSION: Defined for release versions, disables additional GBA logging and completely disables GB logging. Increases the amount of CPU cycles being emulated in one go.
|
||||
- BKPT_SUPPORT
|
||||
- VBAM_ENABLE_DEBUGGER: Enable remote debugging support
|
||||
- MMX: Enable MMX instruction set
|
||||
- NO_ASM: Use C++ version of hq3x/4x filters
|
||||
- RGB555: Use 16bit colors with 5bit green instead of 6bit green in hq3x/4x filters (C++ version)
|
||||
- NO_OGL: Exclude OpenGL code
|
||||
- NO_D3D: Exclude Direct3D code
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
VisualBoyAdvance-M
|
||||
Nintendo Game Boy & Game Boy Advance Emulator
|
||||
Project Homepage: http://vba-m.com
|
||||
Project Homepage: http://visualboyadvance-m.org
|
||||
|
||||
This program is distributed under the GNU General Public License
|
||||
http://www.gnu.org/licenses/gpl.html
|
||||
|
@@ -1,46 +0,0 @@
|
||||
#Do not use this file directly. Always use the top level CMakeLists.txt file
|
||||
#File extractors so the user doesn't have to extract the rom before playing it
|
||||
|
||||
# Source files definition
|
||||
SET(SRC_FEX
|
||||
7z_C/7zAlloc.c
|
||||
7z_C/7zBuf.c
|
||||
7z_C/7zCrc.c
|
||||
7z_C/7zCrcOpt.c
|
||||
7z_C/7zDec.c
|
||||
7z_C/7zIn.c
|
||||
7z_C/7zStream.c
|
||||
7z_C/Bcj2.c
|
||||
7z_C/Bra86.c
|
||||
7z_C/Bra.c
|
||||
7z_C/CpuArch.c
|
||||
7z_C/Lzma2Dec.c
|
||||
7z_C/LzmaDec.c
|
||||
7z_C/Ppmd7.c
|
||||
7z_C/Ppmd7Dec.c
|
||||
fex/Binary_Extractor.cpp
|
||||
fex/blargg_common.cpp
|
||||
fex/blargg_errors.cpp
|
||||
fex/Data_Reader.cpp
|
||||
fex/fex.cpp
|
||||
fex/File_Extractor.cpp
|
||||
fex/Gzip_Extractor.cpp
|
||||
fex/Gzip_Reader.cpp
|
||||
fex/Rar_Extractor.cpp
|
||||
fex/Zip7_Extractor.cpp
|
||||
fex/Zip_Extractor.cpp
|
||||
fex/Zlib_Inflater.cpp
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
.
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
ADD_LIBRARY(
|
||||
fex
|
||||
STATIC
|
||||
${SRC_FEX}
|
||||
)
|
||||
|
||||
add_dependencies(fex generate)
|
137
installdeps
137
installdeps
@@ -88,7 +88,7 @@ This program may require [1;35msudo[0m.
|
||||
|
||||
A cross-compile target may be specified as the only parameter, of either [1;35mm32[0m which targets the host in 32 bit mode (e.g. x86 on an amd64 host) or [1;35mwin32[0m, [1;35mMinGW-w64-i686[0m or [1;35mMinGW-w64-x86_64[0m. [1;35mwin32[0m is an alias for [1;35mMinGW-w64-i686[0m to target Windows via MinGW. Cross compiling for Windows is only supported on Debian/Ubuntu, Fedora, Arch Linux and MSYS2.
|
||||
|
||||
On MSYS2 the [1;35mMinGW-w64-clang-x86_64[0m target for CLANG64 and the [1;35mMinGW-w64-clang-i686[0m target for CLANG32 are also supported.
|
||||
On MSYS2 the [1;35mMinGW-w64-clang-x86_64[0m target for CLANG64 and the [1;35mMinGW-w64-clang-i686[0m target for CLANG32 are also supported, as well as [1;35mMinGW-w64-ucrt-x86_64[0m for UCRT64.
|
||||
|
||||
On MSYS2 dependencies are installed for 32 or 64 bit native Windows targets based on which shell you started (the value of $MSYSTEM) unless you specify one or the other. You can specify a cross target of [1;35mm32[0m or [1;35mm64[0m as aliases for the 32 bit or 64 bit MinGW gcc targets respectively. MSYS2 POSIX layer builds are not supported.
|
||||
|
||||
@@ -179,6 +179,9 @@ linux_installdeps() {
|
||||
nixos)
|
||||
nixos_installdeps
|
||||
;;
|
||||
alpine)
|
||||
alpine_installdeps
|
||||
;;
|
||||
*)
|
||||
error "Don't know how to install deps on your version of Linux"
|
||||
;;
|
||||
@@ -253,6 +256,9 @@ check_cross() {
|
||||
CLANG64)
|
||||
target='mingw-w64-clang-x86_64'
|
||||
;;
|
||||
UCRT64)
|
||||
target='mingw-w64-ucrt-x86_64'
|
||||
;;
|
||||
MSYS)
|
||||
error 'host builds in MSYS mode are not supported, supply a target or start a MINGW shell'
|
||||
;;
|
||||
@@ -278,10 +284,10 @@ check_cross() {
|
||||
win64)
|
||||
target='mingw-w64-x86_64'
|
||||
;;
|
||||
mingw-w64-x86_64|mingw-w64-i686|mingw-w64-clang-x86_64|mingw-w64-clang-i686)
|
||||
mingw-w64-x86_64|mingw-w64-i686|mingw-w64-clang-x86_64|mingw-w64-ucrt-x86_64|mingw-w64-clang-i686)
|
||||
;;
|
||||
*)
|
||||
error "target must be one of 'm32', 'win32', 'win64', or one of the MinGW/clang targets supported by MSYS2: mingw-w64-[clang-](x86_64|i686)."
|
||||
error "target must be one of 'm32', 'win32', 'win64', or one of the MinGW/clang/ucrt targets supported by MSYS2: mingw-w64-[clang|ucrt]-(x86_64|i686)."
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
@@ -317,25 +323,39 @@ debian_installdeps() {
|
||||
if [ -z "$target" ]; then
|
||||
sudo apt-get -qq -y update
|
||||
|
||||
sfml_libs=$(apt-cache search libsfml | grep -E 'graphics|window|network' | sed 's/ - .*//')
|
||||
sfml_libs=
|
||||
|
||||
glew_lib=$(apt-cache search libglew | grep '^libglew[0-9]' | sed 's/ - .*//')
|
||||
for lib in graphics window network; do
|
||||
sfml_libs="$sfml_libs $(apt-cache search "libsfml-$lib" | sed 's/ - .*//' | sort -r | head -1)"
|
||||
done
|
||||
|
||||
glew_lib=$(apt-cache search libglew | grep '^libglew[0-9]' | sed 's/ - .*//' | sort -r | head -1)
|
||||
|
||||
sdl_lib=$(apt-cache search '^libsdl2-2.0' | sed 's/ - .*//' | sort -r | head -1)
|
||||
|
||||
# not present in trusty
|
||||
if [ -n "$ENABLE_FFMPEG" ]; then
|
||||
libswresample_dev=$(apt-cache search libswresample-dev | awk '{print $1}')
|
||||
fi
|
||||
|
||||
# in newer distros
|
||||
wx_lib=$(apt-cache search 'libwxgtk3.0-gtk3(-[^[:space:]]+)?$' | grep -v -- -dev | sed 's/ - .*//')
|
||||
wx_lib_dev=$(apt-cache search 'libwxgtk3.0-gtk3-dev(-[^[:space:]]+)?$' | sed 's/ - .*//')
|
||||
wx_libs=$(apt-cache search 'libwxgtk[0-9]' | sed 's/ - .*//')
|
||||
|
||||
if [ -z "$wx_lib" ] || [ -z "$wx_lib_dev" ]; then
|
||||
wx_lib=libwxgtk3.0
|
||||
wx_lib_dev=libwxgtk3.0-dev
|
||||
fi
|
||||
# Use -gtk3 variant on older distros.
|
||||
case "$wx_libs" in
|
||||
*-gtk3*)
|
||||
new_wx_libs=
|
||||
for pkg in $wx_libs; do
|
||||
case "$pkg" in
|
||||
*-gtk3*)
|
||||
new_wx_libs="$new_wx_libs $pkg"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
wx_libs=$new_wx_libs
|
||||
;;
|
||||
esac
|
||||
|
||||
pkgs="build-essential g++ nasm cmake ccache gettext zlib1g-dev libgl1-mesa-dev libgettextpo-dev libsdl2-dev libsdl2-2.0 libglu1-mesa-dev libglu1-mesa libgles2-mesa-dev libsfml-dev $sfml_libs $glew_lib $wx_lib $wx_lib_dev libgtk2.0-dev libgtk-3-dev ccache zip ninja-build"
|
||||
pkgs="build-essential g++ nasm cmake ccache gettext zlib1g-dev libgl1-mesa-dev libgettextpo-dev libsdl2-dev $sdl_lib libglu1-mesa-dev libglu1-mesa libgles2-mesa-dev libsfml-dev $sfml_libs $glew_lib $wx_libs libgtk2.0-dev libgtk-3-dev ccache zip ninja-build"
|
||||
|
||||
[ -n "$ENABLE_OPENAL" ] && pkgs="$pkgs libopenal-dev"
|
||||
[ -n "$ENABLE_FFMPEG" ] && pkgs="$pkgs libavcodec-dev libavformat-dev libswscale-dev libavutil-dev $libswresample_dev"
|
||||
@@ -485,7 +505,7 @@ fedora_installdeps() {
|
||||
# this is sometimes necessary for rawhide
|
||||
set -- --exclude='glibc32*'
|
||||
fi
|
||||
for pkg in zlib-devel mesa-libGL-devel ffmpeg-devel gettext-devel SDL2-devel SFML-devel openal-soft-devel wxGTK3-devel gtk3-devel; do
|
||||
for pkg in zlib-devel mesa-libGL-devel ffmpeg-devel gettext-devel SDL2-devel SFML-devel openal-soft-devel wxGTK-devel gtk3-devel; do
|
||||
case $pkg in
|
||||
*ffmpeg*)
|
||||
[ -z "$ENABLE_FFMPEG" ] && continue
|
||||
@@ -495,15 +515,23 @@ fedora_installdeps() {
|
||||
;;
|
||||
esac
|
||||
|
||||
pkg_arch=
|
||||
if [ -n "$amd64" ]; then
|
||||
pkg_arch=.x86_64
|
||||
|
||||
if [ "$target" = m32 ]; then
|
||||
set -- "$@" "${pkg}.i686"
|
||||
else
|
||||
set -- "$@" "${pkg}.x86_64"
|
||||
pkg_arch=.i686
|
||||
fi
|
||||
else
|
||||
set -- "$@" "$pkg"
|
||||
fi
|
||||
|
||||
# Check which is newer, wxGTK or wxGTK3.
|
||||
if [ "$pkg" = wxGTK-devel ]; then
|
||||
pkg=$(dnf -q --releasever=$(rpm -E %fedora) --showduplicates list wxGTK-devel wxGTK3-devel 2>/dev/null | awk '{ print $1 "\t" $2 }' | grep -Ev '^(Installed|Available)' | sort -rVu -k 2,2 | head -1 | awk '{ print $1 }' | sed -E 's/\.[^.]+//')
|
||||
|
||||
[ -z "$pkg" ] && pkg=wxGTK3-devel
|
||||
fi
|
||||
|
||||
set -- "$@" "${pkg}${pkg_arch}"
|
||||
done
|
||||
|
||||
# fedora has a bug where all necessary -devel packages are not pulled in for 32 bit direct -devel deps
|
||||
@@ -873,8 +901,13 @@ archlinux_installdeps() {
|
||||
|
||||
if [ -z "$target" -o "$target" = m32 ]; then
|
||||
if [ -z "$target" -o -z "$amd64" ]; then
|
||||
# native build
|
||||
check $pacman --noconfirm --needed -S "$gcc_pkg" $libs
|
||||
# Native build.
|
||||
#
|
||||
# On newer versions wxgtk2 may have to be manually removed.
|
||||
if ! $pacman --noconfirm --needed -S "$gcc_pkg" $libs; then
|
||||
$pacman --noconfirm -R wxgtk2
|
||||
fi
|
||||
$pacman --noconfirm --needed -S "$gcc_pkg" $libs
|
||||
else
|
||||
# try to build 32 bit binaries
|
||||
|
||||
@@ -991,7 +1024,7 @@ solus_installdeps() {
|
||||
check sudo eopkg -y install -c system.devel
|
||||
check sudo eopkg -y install git ccache ninja
|
||||
|
||||
set -- sdl2-devel wxwidgets-devel libgtk-2-devel libgtk-3-devel
|
||||
set -- sdl2-devel wxwidgets-devel libgtk-2-devel libgtk-3-devel libglu-devel
|
||||
|
||||
[ -n "$ENABLE_OPENAL" ] && set -- "$@" openal-soft-devel
|
||||
|
||||
@@ -1062,19 +1095,37 @@ gentoo_installdeps() {
|
||||
wx_slot=$(equery -qC list -p -F '$slot' x11-libs/wxGTK | grep gtk3 | sort -rV | head -1)
|
||||
|
||||
ebuilds="\
|
||||
sys-devel/gcc sys-devel/make dev-util/cmake dev-util/ccache sys-devel/binutils \
|
||||
media-libs/libsdl2 media-libs/libsfml x11-libs/wxGTK:$wx_slot sys-libs/zlib dev-util/pkgconf \
|
||||
dev-lang/nasm dev-util/ninja"
|
||||
sys-devel/gcc \
|
||||
dev-build/make \
|
||||
dev-build/cmake \
|
||||
dev-util/ccache \
|
||||
sys-devel/binutils \
|
||||
media-libs/libsdl2 \
|
||||
media-libs/libsfml \
|
||||
x11-libs/wxGTK:$wx_slot \
|
||||
sys-libs/zlib \
|
||||
dev-util/pkgconf \
|
||||
dev-lang/nasm \
|
||||
dev-build/ninja"
|
||||
|
||||
[ -n "$ENABLE_OPENAL" ] && ebuilds="$ebuilds media-libs/openal"
|
||||
|
||||
[ -n "$ENABLE_FFMPEG" ] && ebuilds="$ebuilds media-video/ffmpeg"
|
||||
|
||||
check sudo emerge -vn $ebuilds
|
||||
check sudo emerge -vna $ebuilds
|
||||
|
||||
build_instructions
|
||||
}
|
||||
|
||||
alpine_installdeps() {
|
||||
installing
|
||||
|
||||
check sudo apk add cmake ninja g++ ccache nasm gettext-dev zlib-dev mesa-dev sdl2-dev glu-dev sfml-dev wxwidgets-dev gtk+3.0-dev zip
|
||||
|
||||
build_instructions
|
||||
}
|
||||
|
||||
|
||||
windows_installdeps() {
|
||||
msys2=1
|
||||
|
||||
@@ -1088,10 +1139,10 @@ windows_installdeps() {
|
||||
|
||||
case "$target" in
|
||||
*clang*)
|
||||
pkgs="lldb"
|
||||
pkgs="lldb clang"
|
||||
;;
|
||||
*)
|
||||
pkgs="$pkgs gcc gcc-libs gcc-libgfortran"
|
||||
pkgs="gcc gcc-libs gcc-libgfortran"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1101,7 +1152,7 @@ windows_installdeps() {
|
||||
;;
|
||||
esac
|
||||
|
||||
pkgs="$pkgs SDL2 sfml wxWidgets zlib binutils cmake crt-git extra-cmake-modules headers-git make pkgconf tools-git windows-default-manifest libmangle-git ninja gdb"
|
||||
pkgs="$pkgs SDL2 sfml wxWidgets3.2 zlib binutils cmake crt-git extra-cmake-modules headers-git make pkgconf tools-git windows-default-manifest libmangle-git ninja gdb ccache"
|
||||
|
||||
[ -n "$ENABLE_OPENAL" ] && pkgs="$pkgs openal"
|
||||
[ -n "$ENABLE_FFMPEG" ] && pkgs="$pkgs ffmpeg"
|
||||
@@ -1111,6 +1162,13 @@ windows_installdeps() {
|
||||
set -- "$@" "${target}-${p}"
|
||||
done
|
||||
|
||||
case "$target" in
|
||||
*clang*)
|
||||
# We use gcc windres for now, llvm-rc is sometimes broken.
|
||||
set -- "$@" mingw-w64-x86_64-binutils
|
||||
;;
|
||||
esac
|
||||
|
||||
# install
|
||||
check pacman --noconfirm --needed -S git make zip "$@"
|
||||
|
||||
@@ -1161,7 +1219,7 @@ brew_installdeps() {
|
||||
|
||||
check brew -v update
|
||||
|
||||
brews="nasm cmake ccache gettext pkg-config sdl2 wxmac ccache ninja"
|
||||
brews="nasm cmake ccache gettext pkg-config sdl2 wxwidgets ccache ninja"
|
||||
|
||||
[ -n "$ENABLE_FFMPEG" ] && brews="$brews ffmpeg"
|
||||
|
||||
@@ -1170,15 +1228,16 @@ brew_installdeps() {
|
||||
brews="$brews sfml"
|
||||
# fi
|
||||
|
||||
set --
|
||||
for f in $brews; do
|
||||
if brew info "$f" | grep -Eq '^Not installed$'; then
|
||||
set -- "$@" "$f"
|
||||
fi
|
||||
done
|
||||
[ $# -gt 0 ] && check brew -v install "$@"
|
||||
# This is necessary for the GitHub Actions CI:
|
||||
brew -v install python
|
||||
brew link --overwrite python
|
||||
|
||||
brew link gettext --force
|
||||
check brew -v install -f $brews
|
||||
|
||||
for brew in gettext wxwidgets; do
|
||||
brew unlink $brew
|
||||
brew link $brew --force
|
||||
done
|
||||
|
||||
brew -v cleanup
|
||||
|
||||
@@ -1223,7 +1282,7 @@ build_instructions() {
|
||||
|
||||
$pre_build
|
||||
mkdir build && cd build
|
||||
$CMAKE .. $cmake_flags -G Ninja
|
||||
$CMAKE .. -DCMAKE_BUILD_TYPE=Release $cmake_flags -G Ninja
|
||||
ninja
|
||||
$post_build
|
||||
|
||||
|
@@ -1,4 +0,0 @@
|
||||
IF(ENABLE_WX)
|
||||
add_subdirectory(wxvbam)
|
||||
ENDIF(ENABLE_WX)
|
||||
|
@@ -1,8 +1,7 @@
|
||||
if(NOT TRANSLATIONS_ONLY AND NOT ENABLE_WX)
|
||||
return()
|
||||
endif()
|
||||
|
||||
file(GLOB po_files "${CMAKE_CURRENT_SOURCE_DIR}/*.po")
|
||||
|
||||
gettext_create_translations(
|
||||
wxvbam.pot
|
||||
${po_files}
|
||||
)
|
||||
|
||||
add_dependencies(translations-zip translations)
|
||||
gettext_create_translations(wxvbam.pot ${po_files})
|
||||
|
3646
po/wxvbam/af.po
3646
po/wxvbam/af.po
File diff suppressed because it is too large
Load Diff
3649
po/wxvbam/ar.po
3649
po/wxvbam/ar.po
File diff suppressed because it is too large
Load Diff
3790
po/wxvbam/bg.po
Normal file
3790
po/wxvbam/bg.po
Normal file
File diff suppressed because it is too large
Load Diff
4091
po/wxvbam/br.po
4091
po/wxvbam/br.po
File diff suppressed because it is too large
Load Diff
3646
po/wxvbam/bs.po
3646
po/wxvbam/bs.po
File diff suppressed because it is too large
Load Diff
3646
po/wxvbam/ca.po
3646
po/wxvbam/ca.po
File diff suppressed because it is too large
Load Diff
3646
po/wxvbam/ca_ES.po
3646
po/wxvbam/ca_ES.po
File diff suppressed because it is too large
Load Diff
3646
po/wxvbam/co.po
3646
po/wxvbam/co.po
File diff suppressed because it is too large
Load Diff
4047
po/wxvbam/cs.po
4047
po/wxvbam/cs.po
File diff suppressed because it is too large
Load Diff
3646
po/wxvbam/cs_CZ.po
3646
po/wxvbam/cs_CZ.po
File diff suppressed because it is too large
Load Diff
3646
po/wxvbam/da.po
3646
po/wxvbam/da.po
File diff suppressed because it is too large
Load Diff
3646
po/wxvbam/da_DK.po
3646
po/wxvbam/da_DK.po
File diff suppressed because it is too large
Load Diff
4083
po/wxvbam/de.po
4083
po/wxvbam/de.po
File diff suppressed because it is too large
Load Diff
3648
po/wxvbam/de_DE.po
3648
po/wxvbam/de_DE.po
File diff suppressed because it is too large
Load Diff
4069
po/wxvbam/el.po
4069
po/wxvbam/el.po
File diff suppressed because it is too large
Load Diff
3646
po/wxvbam/en_BR.po
3646
po/wxvbam/en_BR.po
File diff suppressed because it is too large
Load Diff
3646
po/wxvbam/en_GB.po
3646
po/wxvbam/en_GB.po
File diff suppressed because it is too large
Load Diff
3646
po/wxvbam/en_PL.po
3646
po/wxvbam/en_PL.po
File diff suppressed because it is too large
Load Diff
2898
po/wxvbam/en_US.po
2898
po/wxvbam/en_US.po
File diff suppressed because it is too large
Load Diff
4312
po/wxvbam/es.po
4312
po/wxvbam/es.po
File diff suppressed because it is too large
Load Diff
3781
po/wxvbam/es_419.po
3781
po/wxvbam/es_419.po
File diff suppressed because it is too large
Load Diff
3648
po/wxvbam/es_AR.po
3648
po/wxvbam/es_AR.po
File diff suppressed because it is too large
Load Diff
3648
po/wxvbam/es_CL.po
3648
po/wxvbam/es_CL.po
File diff suppressed because it is too large
Load Diff
3887
po/wxvbam/es_CO.po
3887
po/wxvbam/es_CO.po
File diff suppressed because it is too large
Load Diff
3646
po/wxvbam/es_CR.po
3646
po/wxvbam/es_CR.po
File diff suppressed because it is too large
Load Diff
3647
po/wxvbam/es_CU.po
3647
po/wxvbam/es_CU.po
File diff suppressed because it is too large
Load Diff
3651
po/wxvbam/es_ES.po
3651
po/wxvbam/es_ES.po
File diff suppressed because it is too large
Load Diff
3646
po/wxvbam/es_HN.po
3646
po/wxvbam/es_HN.po
File diff suppressed because it is too large
Load Diff
3654
po/wxvbam/es_MX.po
3654
po/wxvbam/es_MX.po
File diff suppressed because it is too large
Load Diff
2897
po/wxvbam/es_PE.po
2897
po/wxvbam/es_PE.po
File diff suppressed because it is too large
Load Diff
3646
po/wxvbam/es_PR.po
3646
po/wxvbam/es_PR.po
File diff suppressed because it is too large
Load Diff
2897
po/wxvbam/es_US.po
2897
po/wxvbam/es_US.po
File diff suppressed because it is too large
Load Diff
3647
po/wxvbam/es_VE.po
3647
po/wxvbam/es_VE.po
File diff suppressed because it is too large
Load Diff
3648
po/wxvbam/fa.po
3648
po/wxvbam/fa.po
File diff suppressed because it is too large
Load Diff
3646
po/wxvbam/fil.po
3646
po/wxvbam/fil.po
File diff suppressed because it is too large
Load Diff
2918
po/wxvbam/fr.po
2918
po/wxvbam/fr.po
File diff suppressed because it is too large
Load Diff
3646
po/wxvbam/fr_CA.po
3646
po/wxvbam/fr_CA.po
File diff suppressed because it is too large
Load Diff
4089
po/wxvbam/fr_FR.po
4089
po/wxvbam/fr_FR.po
File diff suppressed because it is too large
Load Diff
4087
po/wxvbam/gl.po
4087
po/wxvbam/gl.po
File diff suppressed because it is too large
Load Diff
3646
po/wxvbam/haw.po
3646
po/wxvbam/haw.po
File diff suppressed because it is too large
Load Diff
3648
po/wxvbam/he.po
3648
po/wxvbam/he.po
File diff suppressed because it is too large
Load Diff
4419
po/wxvbam/he_IL.po
4419
po/wxvbam/he_IL.po
File diff suppressed because it is too large
Load Diff
3646
po/wxvbam/hr.po
3646
po/wxvbam/hr.po
File diff suppressed because it is too large
Load Diff
2901
po/wxvbam/hu.po
2901
po/wxvbam/hu.po
File diff suppressed because it is too large
Load Diff
4087
po/wxvbam/hu_HU.po
4087
po/wxvbam/hu_HU.po
File diff suppressed because it is too large
Load Diff
4092
po/wxvbam/id.po
4092
po/wxvbam/id.po
File diff suppressed because it is too large
Load Diff
3647
po/wxvbam/id_ID.po
3647
po/wxvbam/id_ID.po
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user