Commit Graph

3362 Commits (5e37f84bc7207eea696b6fa08777ae64c4134ef2)

Author SHA1 Message Date
MrSimbax 8390d85e46 Refactor the mod manager
Moved list of mods logic to a new CModManager class.

The list of enabled mods is now managed by a flag instead of directory
names of mods.

Mods are now disabled by default.

Also general cleanup, fixing issues from the code review in
https://github.com/colobot/colobot/pull/1191 and fixing linter issues.

Regression: the state of enabled/disabled mods is now not persistent.
The plan is to use some kind of config file for this.
2020-07-18 14:30:50 +02:00
Fiftytwo 95cab790c1 Rename 'freemissions' back to 'free' 2020-07-17 19:33:53 +02:00
Fiftytwo b72bedaf60 Add BrownMushroom and GreenMushroom categories in CBOT 2020-07-17 18:00:36 +02:00
MrSimbax 5f76722ecb Add error dialogs for open path/url buttons 2020-07-17 17:27:09 +02:00
MrSimbax 4905abe30b Merge branch 'dev-mod-manager' of https://github.com/DavivaD/colobot into dev-mod-manager 2020-07-17 11:49:51 +02:00
Fiftytwo ac32e40003 Add Ruin, Bush, GraviPlant, and Crystal categories in CBOT 2020-07-17 03:37:13 +02:00
Mateusz Przybył 52ed8041f7
Merge pull request #1330 from colobot/dev-cmake-targets
Use CMake targets instead of variables
2020-07-15 11:32:33 +02:00
Emxx52 0a3cdd342b
Merge pull request #1322 from colobot/dev-update-translations
Update translations
2020-07-14 23:52:20 +02:00
Emxx52 d29570c20a
Merge pull request #1331 from colobot/dev-heavyduty
Update Heavy bots, fix collisions
2020-07-14 22:52:08 +02:00
Mateusz Przybył 174669ec92
Merge pull request #1257 from immibis/1164-fix
When game speed is 2 or higher, run multiple ticks.
2020-07-14 22:41:05 +02:00
MrSimbax f87ae45745 Update translations
Also add a Polish translation for "Mute sounds in background".
Related issue: #1316
2020-07-14 22:16:56 +02:00
MrSimbax 2fa706a123 Add x86 MSVC build to GH Actions 2020-07-14 21:43:34 +02:00
MrSimbax 73429315a7 Add USE_STATIC_RUNTIME option
Mainly useful for MSVC.
2020-07-14 20:43:42 +02:00
MrJohn10 61126af370
Update contact section in Readme - add Discord server, remove forum and IRC channels (#1328) 2020-07-14 18:32:51 +02:00
MrSimbax 419bd1cc21 Fix CBOT stack overflow test failing on MSVC
Increased the stack size to the default (?) stack size on Linux.

The failing test name: CBotUT.FunctionRecursionStackOverflow
2020-07-14 14:26:37 +02:00
MrSimbax 167dd01bbe Revert "Fix CBotUT.FunctionRecursionStackOverflow test"
This reverts commit 004c861ba9.
2020-07-14 13:54:32 +02:00
MrSimbax df7cdd4b8e Fix some minor issues after CR 2020-07-14 13:51:07 +02:00
MrSimbax 2143f21828 Fix linter 2020-07-14 13:43:33 +02:00
MrSimbax 17e38bf66c Install PDB file if available 2020-07-13 23:39:11 +02:00
MrSimbax 3ec39047e1 Fix MXE build 2020-07-13 22:46:32 +02:00
MrSimbax a9717206f3 Try to fix linter errors 2020-07-13 22:04:33 +02:00
MrSimbax 634efbcabd Fix GLEW_STATIC redefinition warnings 2020-07-13 21:33:36 +02:00
MrSimbax c15efbad7b Revert "Delete FindGLEW"
This reverts commit 86f595b8ef.
2020-07-13 21:27:56 +02:00
MrSimbax f0ba8ec325 Revert "Fix warnings about redefining GLEW_STATIC"
This reverts commit 9cf30fd9bc.
2020-07-13 21:27:31 +02:00
MrSimbax fde66a9422 Make MSVC Windows build a separate job
Bring back the old file for Linux (with MXE).

Find number of logical processors on Windows by using PowerShell magic.
2020-07-13 21:19:03 +02:00
MrSimbax 17ece36b3e Enable OpenAL in CI MSVC build
The issue with OpenAL not compiling with vcpkg was solved upstream.
2020-07-13 20:43:32 +02:00
Fiftytwo 83a32b36b3 Fix collision persistence of exploding Heavy bots 2020-07-13 20:27:40 +02:00
Fiftytwo c80a816808 Merge branch 'dev' into dev-heavyduty 2020-07-13 19:51:23 +02:00
Fiftytwo a2c62a9da6 Make Heavy bots destroy bushes on contact 2020-07-13 19:44:50 +02:00
MrSimbax 86f595b8ef Delete FindGLEW 2020-07-12 23:18:21 +02:00
MrSimbax cc4cfd2122 Fix linter 2020-07-12 23:18:21 +02:00
MrSimbax c4037a885f Make CI Windows build with MSVC instead of MXE 2020-07-12 23:17:42 +02:00
immibis a2aeef0155 When game speed is 2 or higher, run multiple ticks. 2020-07-11 21:20:55 +02:00
MrSimbax fa5cf01af0 Mark libraries includes as system includes 2020-07-11 17:21:44 +02:00
MrSimbax 1b9d40d2fb Set C++ standard the modern CMake way 2020-07-11 17:20:41 +02:00
MrSimbax 9e8ebe4595 Checkout Google Test in GH workflow
I hope this works.
2020-07-11 12:41:33 +02:00
MrSimbax e8f9c0292b Handle the case where GTest is not found 2020-07-11 12:26:35 +02:00
MrSimbax 004c861ba9 Fix CBotUT.FunctionRecursionStackOverflow test
On MSVC it throws StackOverflow exception. I reduced the stack size to
make the test pass.
2020-07-11 12:17:20 +02:00
MrSimbax 81ddda4515 Make tests work with targets 2020-07-11 12:16:20 +02:00
MrSimbax 3da26a38ed Replace Google Test with a submodule 2020-07-11 10:54:52 +02:00
MrSimbax 6c3012b8a1 Fix hippomocks target
.h file shouldn't be listed as source to add_library(... INTERFACE)
2020-07-11 10:53:13 +02:00
Mateusz Przybył 90af1d9c16
Merge pull request #1318 from Erihel/mute_fix
Save audio settings when option changes
2020-07-10 20:30:41 +02:00
Krzysztof Dermont 7d7a29117e Save audio settings when option changes
Mute/unmute option when game windowis in background relies on settings
being updates. This happens when users leaves Options screen. This
commit adds saving audio settings on each change.

This is a fix for #1315
2020-07-10 20:15:18 +02:00
MrSimbax 9cf30fd9bc Fix warnings about redefining GLEW_STATIC
I guess this flag is now set by CMake somehow so we no longer need
to define it ourselves.
2020-07-10 18:55:47 +02:00
MrSimbax df65862c49 Start using CMake targets instead of variables
Moved most of the variables to targets in the main src.

Made libraries in repo export targets.

Refactor STATIC flags a little and add more.

This commit definitely breaks a lot of things like tests
but the main game builds at least with MSVC.
2020-07-10 18:49:54 +02:00
MrSimbax f2d91cde80 Update Find*.cmake modules
Make them export targets instead of variables.

Some platforms need libintl, abstract it to a Find*.cmake module.

Static linking requires linking to dependencies of dependencies (it is
as horrific as it sounds). This commit handles this only for libsndfile.

SDL2_image and SDL2_ttf probably also have some hidden dependencies.

FindGLEW module is now bundled with CMake, hence it is deleted.

Added Copyright.txt since some modules are taken from CMake.
2020-07-10 18:38:06 +02:00
MrSimbax 4ae0360640 Remove source grouping temporarily
It's probably not how it should be done with modern CMake, so I'm
removing this for now to focus on other changes first.
2020-07-10 13:03:23 +02:00
Mateusz Przybył b8523aa1db
Merge pull request #1329 from colobot/dev-msvc-sed-fix
Fix update-pot not working with MSBuild
2020-07-10 11:33:41 +02:00
MrSimbax bf1982f4e4 Change `make update-pot` comment to cmake command
`make update-pot` only works if a generator producing Makefiles was
used with `cmake`. The `cmake` command to build a specific target
will work for any generator.
2020-07-10 11:01:47 +02:00
MrSimbax 963cd1b347 Fix sed cmd not working with MSBuild
Fixes the `'\1' is not recognized as an internal or external command`
error when trying to run the target `update-pot` with MSBuild.

The `|` characters probably messed with cmd.exe or PowerShell syntax
rules so they were replaced with slashes `/`.

Also, at least some implementations of sed for Windows would produce
CRLF line endings instead of LF line endings. The issue is fixed by
adding the flag `-b`.
2020-07-10 10:53:38 +02:00