Compare commits

...

2051 Commits

Author SHA1 Message Date
Brübach, Lukas
2c0c8b416a [Oracle] Qt version guard for regexp 2025-12-03 10:57:56 +01:00
Brübach, Lukas
65a3423009 [Oracle] Lint. 2025-12-03 10:53:08 +01:00
Brübach, Lukas
4ddbc8d018 [Oracle] Include QRegularExpression. 2025-12-03 10:51:11 +01:00
Brübach, Lukas
d4bf40694a [Oracle] Correct size and only do this if the user has not set a non-default url. 2025-12-03 10:44:40 +01:00
Brübach, Lukas
ec98bcf95d [Oracle] Add low-memory check (<=4GiB) and use mtgxml url instead. 2025-12-03 10:43:40 +01:00
BruebachL
a799cd097a [PrintingSelector] Sync modified and history state on bulk selection (#6379)
* [PrintingSelector] Emit deckModified when using bulk selection

* [PrintingSelector] Hook up history manager.

* [PrintingSelector] Remember card amount.

* Return early.

Took 18 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-12-03 08:23:34 +01:00
RickyRister
b4e3f2cba9 [Oracle] Support importing tokens and spoilers from local file (#6387) 2025-12-03 00:19:56 -05:00
RickyRister
658ae83157 [DeckList] Make DeckList not a QObject (#6383) 2025-12-03 00:18:46 -05:00
BruebachL
d29e72ce72 [CardInfo] Display set short name and collector number in info widget. (#6378)
* [CardInfo] Display set short name and collector number in info widget.

* Lint.

* Use reference.
2025-12-02 22:24:39 +01:00
BruebachL
30cc8ad6f9 [DeckEditor] Expand DeckDock TreeView when adding card through deck editor (#6388)
* [DeckEditor] Expand DeckDock TreeView when adding card through deck editor

* [DeckEditor] Expand first, then set selection.
2025-12-02 22:19:44 +01:00
BruebachL
f0ebd28148 [VDE] Consolidate statistical analysis into a separate object (#6392)
* [VDE] Consolidate statistical analysis into a separate object so multiple widgets can re-use calculations and calculation is only performed once on data change.

* [VDE] Lint.

* [VDE] Move struct up to not confuse compiler.

* [VDE] NoDiscards

* [VDE] Move variables

* [VDE] Lint.
2025-12-02 13:51:08 +01:00
BruebachL
364d0ca52b [EDHRec] Add background plate and "selection highlight" to card display widgets (#6390) 2025-12-01 09:37:48 +01:00
RickyRister
3ff2df2796 [DeckList] Move metadata into struct (#6380)
* [DeckList] Move metadata into struct

* wipe metadata if preserveMetadata is false
2025-11-30 13:09:09 +01:00
RickyRister
d57bec8ec6 [DeckList] Move decklist node classes into new folder (#6381)
* [DeckList] Move decklist node classes into new folder

* reformat

* fix
2025-11-30 13:05:49 +01:00
BruebachL
2b64e65f45 [CardInfoPictureEnlargedWidget] Fix DPR scaling. (#6382) 2025-11-30 13:03:18 +01:00
BruebachL
eab4d435f8 [Feature] TabArchidekt and Archidekt API integration (#6348)
* TabArchidekt and Archidekt API integration.


Took 37 seconds

Took 4 minutes

Took 40 seconds

Took 4 minutes

* Lint.

* Lont.

* Search bar, fancier display, resolve providerId

* Delegate click to base.

* Be explicit for pedantic compilers.

* Liiint.

* Leave them default I guess

* Leave them default I guess

* Small fixes.

* New utility display widgets.

* New style for deck listing.

* Lint.

* Lont.

* Scale things.

* Delegate paint to base.

* Use default Archidekt preview image for decks without featured.

* Consistent sizes.

* Increase font size, qt version guard.

* More version guards.

* Clean up filter layout, use mana symbols.

* Set content margins.

* Refresh on filter change.

* Lint.

* Better elision.

* Query actual new endpoints, new query parameters.

* Doxygen, reorder fields in constructor, readability.

* Update page size doc to min size.

* Update initial min deck size value.

* Add label to page selection.

* Okay, so, people upload a lot of 1 card decks frequently.

* Whoops.

* Add a selection combobox for sorting logic.

* Debounce and limit searches.

* Include.

* Lint.

* Don't imply that Archidekt supports multiple cards/commander names.

* Let's not lambda it and slot it instead.

* Overload.

* Add button to home tab.

Took 8 minutes

* Adjust to selection model change.

Took 5 minutes

* Cleanup auto-generated comments.

Took 8 minutes

* Remember card sizes.

Took 1 minute

* Initialize with correct size.

Took 3 minutes

* Use correct placeholders.

Took 2 minutes

* Style lint.

Took 16 minutes

* Parse double-faced cards correctly.

* Parse double-faced cards correctly.

* Allow TabArchidekt to use VDE group/sort/display buttons

* Lint.

* Indicate that things are clickable.

* Min treshold for nicer display.

* Lint.

* We have good labels at home.

* We do a little linting.

* Qt version guards.

* Qt5 is the devil.

* Update comments.

* Lint comments.

* More doxys.

* One more doxy.

* Lint.

* Update.

* Small fixes.

Took 7 minutes

Took 13 seconds

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-30 08:41:01 +01:00
BruebachL
de13c22552 [Fix-Warnings] Suppress C4100: unreferenced parameter for protobuf files (#6373)
* [Fix-Warnings] Suppress C4100: unreferenced parameter for protobuf files.

* [Fix-Warnings] Compiler specific options.

* [Fix-Warnings] Lint.
2025-11-29 18:58:39 +01:00
BruebachL
8ee7163014 [Printing Selector] Notify deck editor about history changes. (#6364)
Took 44 minutes

Took 2 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-29 18:56:06 +01:00
BruebachL
c5fde071e7 [Cleanup] Unused #includes (#6367)
* [Cleanup] Unused #includes

Took 44 minutes

* [Cleanup] More unused #includes

Took 55 minutes

* [Cleanup] Include QSet

Took 4 minutes

* [Cleanup] Include QDebug in deck_list.cpp

Took 3 minutes

* [Cleanup] Include protocol stuff in servatrice_database_interface.h

Took 3 minutes

* [Cleanup] Include QDialogButtonBox

Took 8 minutes

* [Cleanup] Include QUrl

Took 8 minutes

* [Cleanup] Include QTextOption in header.

Took 3 minutes

* [Cleanup] Include QMap in user_list_manager.h

Took 8 minutes

* [Cleanup] Adjust qjson

Took 8 minutes

* [Cleanup] include button box.

Took 3 minutes

* [Cleanup] Redo fwd declarations.

* [Cleanup] Redo last removed fwd declarations.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-29 18:53:11 +01:00
BruebachL
8abd04dab1 [Fix-Warnings] Remove more redundant empty declarations. (extra semicolons) (#6374) 2025-11-29 14:19:11 +01:00
RickyRister
858361e6d3 [DeckLoader] Refactor last load info into struct (#6366)
* [DeckLoader] Refactor last load info into struct

* Use constant

* [[nodiscard]]

* do discard, I guess.

---------

Co-authored-by: Brübach, Lukas <lukas.bruebach@student.fhws.de>
2025-11-28 23:41:11 +01:00
BruebachL
9ece4bfd9b [Fix-Warnings] Mark const getters as [[nodiscard]] (#6365)
Took 45 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-28 21:38:54 +01:00
BruebachL
a1a3b02d3a Add clearer labeling, more tooltips, condense layout. (#6361)
Took 17 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-28 00:42:46 +01:00
BruebachL
bc2ae6c486 Remember more card sizes. (#6360)
Took 22 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-27 23:41:44 +01:00
BruebachL
587a8bc524 [VDD] Add sorting (#6355)
* [VDD] Add sorting

Took 17 seconds

Took 3 minutes

* Adjust to contents.

Took 13 minutes

* Adjust sort order as well.

Took 5 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-27 23:31:40 +01:00
BruebachL
122926c6cd Deck Editor owns DeckHistoryManager (#6359)
Took 4 minutes
2025-11-27 23:11:43 +01:00
BruebachL
bac6beeb50 [VDE] Allow visual database display to toggle to table based display. (#6357) 2025-11-27 23:03:30 +01:00
BruebachL
c75a483ee6 [VDE] Add selection model (#6354)
Took 22 minutes

Took 1 minute


Took 17 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-27 22:16:12 +01:00
BruebachL
1c5bfdbabe Rebuild tree any time setDeckList is called. (#6353)
Took 2 hours 5 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-27 22:02:27 +01:00
BruebachL
553952132f [Game] Fix CardZoneLogic::clearContents() (#6356)
Took 6 minutes

Took 28 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-27 22:00:35 +01:00
BruebachL
1931eb11a9 [VDD] Change 'filter to most recent sets' default to false (#6358) 2025-11-27 21:56:49 +01:00
ebbit1q
65aef396fb do not allow other players to know which cards are in a player's hand (#6125) 2025-11-26 09:16:50 -05:00
ebbit1q
a21e45ed36 add phase to delete arrows in to protocol (#6159)
* protocol changes

* servatrice changes

* add new setting

* implement client side with static 4 phases

* reading the code explains the code

* add subphases to phase.cpp

* use new subphase definition
2025-11-26 09:16:10 -05:00
dependabot[bot]
adee67115c Bump actions/checkout from 5 to 6 (#6347) 2025-11-24 19:42:21 +01:00
tooomm
aea468bc7f Doxygen: Use newer version (#6345)
* readd properties

* use newer doxygen version + print config update diff

* readd config options

* fix config

* revert cache change

* GITHUB md

* graphviz version

* Add doxygen output to .gitignore
2025-11-23 19:06:00 +01:00
tooomm
621c6a8d73 Doxygen: Improve file structure and includes (#6344) 2025-11-22 19:38:39 +01:00
BruebachL
73591d5d0f [BannerCard] Try to restore by providerId (#6341)
* [BannerCard] Try to restore by providerId

Took 27 minutes

Took 41 seconds

* Style lint.

Took 2 minutes

* Don't look up by providerId if it's empty.

Took 8 minutes

* Add extra name guard to providerId clause.

Took 4 minutes

* Update cockatrice/src/interface/widgets/deck_editor/deck_editor_deck_dock_widget.cpp

Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>

* Update cockatrice/src/interface/widgets/deck_editor/deck_editor_deck_dock_widget.cpp

Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>

* Adjust to comments.

Took 11 minutes

* Extract to helper function.

Took 3 minutes

* Make helper static.

Took 5 minutes

* Remove const qualifier.

Took 3 minutes

* Finally.

Took 5 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>
2025-11-20 15:44:35 +01:00
BruebachL
846f16ddaa [DeckEditor] Deck List History Manager. (#6340)
* [DeckEditor] Deck List History Manager.

Took 23 minutes

Took 17 minutes

* Add icons.

Took 2 minutes


Took 3 seconds

* Small fixes.

Took 12 minutes

* Style lint.

Took 48 seconds

* tr() things.

Took 5 minutes

* Add tooltips for buttons.

Took 3 minutes

* Add explanation label to history.

Took 3 minutes

* Refactor to .cpp, delegate undo/redo to manager, don't return memento

Took 8 minutes

* Clear history when setting deck.

Took 6 minutes

* Move to value based stacks.

Took 52 seconds

* Default constructor.

Took 31 seconds

Took 3 minutes

Took 4 minutes

Took 2 minutes

* Have it listen to deck editor additions.

Took 18 minutes

* Don't connect buttons *and* actions.

Took 2 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-20 14:54:32 +01:00
RickyRister
c46f6d1178 Support flavorName in PrintingInfo and cache the altNames in CardInfo (#6335)
* Support flavorName property and cache altNames

* update oracleimporter

* update cards.xsd
2025-11-20 14:54:23 +01:00
BruebachL
ab5d6db8a2 [DeckList] Disable copy constructor (#6339)
* [DeckList] Disable copy constructor

Took 1 hour 44 minutes

Took 1 minute

# Commit time for manual adjustment:
# Took 28 seconds


Took 33 seconds

* Revert member to pointer.

Took 19 minutes

* Revert pulling up setters/getters now that getDeckList is no longer const.

Took 6 minutes

* Revert more.

Took 2 minutes

* One more fix.

Took 1 minute

* Update cockatrice/src/interface/deck_loader/deck_loader.cpp

Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>
2025-11-20 13:20:09 +01:00
BruebachL
9957cb20e2 [Refactor] Move AbstractGraphicsItem and GraphicsItemType to game_graphics/board (#6342)
* [Refactor] Move AbstractGraphicsItem and GraphicsItemType to game_graphics/board folder.

Took 3 minutes

* Update CMakeLists.txt

Took 12 minutes

* Update CMakeLists.txt

Took 12 minutes

Took 2 minutes


Took 16 seconds

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-20 12:52:14 +01:00
BruebachL
8788a7aada [DeckLoader] Disable copy constructor (#6338)
Took 1 hour 19 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-19 12:16:39 +01:00
RickyRister
16392c28c5 [DeckLoader] Refactor to make some methods static (#6336)
* Make forEachCard const

* Make some DeckLoader methods static

* Update usages

* Update method param documentation in deck_loader.cpp

---------

Co-authored-by: BruebachL <44814898+BruebachL@users.noreply.github.com>
2025-11-17 03:49:45 -08:00
BruebachL
a8ee0d7648 [Doxygen] PrintingSelector Extra Pages (#6334)
* [Doxygen] PrintingSelector extra pages

Took 46 minutes

* Update Doxyfile

* Subgroup it.

Took 5 minutes

* Update editing_decks_printings.md

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-17 10:19:53 +01:00
tooomm
a405758222 doxygen config changes (#6330) 2025-11-16 23:51:27 +01:00
BruebachL
537e29d937 [Game Selector] Add button to join game as judge as well as convenience filters and doxygen (#6325)
* Add button to join game as judge as well as convenience filters.

Took 1 hour 11 minutes

* Change button to filter to games created by buddies, set default filter settings to be very permissive.

Took 45 minutes

* Remove debug.

Took 3 minutes

* Update game_selector.cpp

* Add spacers, rearrange.

Took 20 minutes


Took 20 seconds

* Add explanation tooltip.

Took 39 seconds

* Try layouting.

Took 14 minutes

* Set min size, set spacing for mac os

Took 3 minutes

* Try without the labels.

Took 3 minutes

* Don't use labels.

Took 5 minutes

* Fine-tune.

Took 2 minutes

* AsJudge

Took 4 minutes

* Clear up comment.

Took 37 seconds

* Remove shift hotkey.

Took 4 minutes

* Spectate as judge.

Took 8 minutes

* Add checkBox to create game as judge.

Took 7 minutes

* Fix crash.

Took 12 minutes

* Rename, fix returns.

Took 19 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-16 18:04:42 +01:00
RickyRister
9a3104c5ac [CardInfo] refactor some fields into a UiAttributes struct (#6322)
* refactor CardInfo

* refactor everything else
2025-11-16 17:56:57 +01:00
BruebachL
722344967f [Home Tab] Don't add connect button with stretch (#6333)
Took 4 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-16 17:35:27 +01:00
tooomm
73ce5e051c Add min os and arch inspection (#6259) 2025-11-16 15:09:26 +01:00
tooomm
b8bbe141a0 Update prebuild.js (#6266) 2025-11-16 03:18:32 -05:00
BruebachL
3285596a93 [Doxygen] VDE: Include new pictures. (#6323)
* Include new pictures.

Took 57 minutes

* Update old pictures.

Took 6 minutes

Took 3 minutes

* Update export documentation.

Took 4 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-16 01:39:43 +01:00
BruebachL
73763b5ee6 Mark more functions as [[nodiscard]] (#6320)
* Fix local variable double declaration.

Took 44 seconds

* Mark functions as [[nodiscard]]

Took 31 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-16 01:39:24 +01:00
BruebachL
27708d5964 Adjust to proxy model indices (#6324)
Took 12 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-16 01:37:07 +01:00
BruebachL
827f22ed37 [Doxygen] Card Picture Loader (#6315)
* [Doxygen] Card Picture Loader

Took 25 minutes

Took 16 minutes

# Commit time for manual adjustment:
# Took 12 seconds


Took 14 seconds

* Remove placeholder file description.

Took 1 minute

* ... but do group PictureLoader again

Took 28 seconds

* Link to methods directly.

Took 6 minutes

* Forward declaration.

Took 49 seconds

* Remove redundant .cpp function documentation.

Took 15 minutes

* More fixes.

Took 7 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-15 17:26:32 +01:00
BruebachL
ace4063371 Helper to query deckList for DecklistCardNodes. (#6242)
* Helper to query deckList for DecklistCardNodes.

Took 30 minutes

Took 6 minutes

Took 2 minutes

* Fix unused.

Took 3 minutes


Took 1 minute

* Convert string to string list.

Took 2 minutes

* Adjust to rebase.

Took 2 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-15 17:21:43 +01:00
BruebachL
f62e29f5d5 Give settings managers default groups instead of manually specifying them everywhere. (#6273)
* Give settings managers default groups instead of manually specifying them everywhere.

Took 1 hour 2 minutes


Took 41 seconds

Took 32 seconds

Took 5 minutes

* Fix dbconverter mock.

Took 2 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-15 15:58:25 +01:00
BruebachL
5df00de246 Avoid repeating type by using auto. (#6321)
Took 19 minutes


Took 22 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-15 14:06:53 +01:00
BruebachL
28dfd62163 [Doxygen] More extra-pages for cards/developer documentation and various fixes (#6316)
* Docu stash

Took 1 hour 53 minutes

Took 5 minutes


Took 16 seconds

Took 33 seconds

* Remove file headers.

Took 8 minutes

* Group to card set.

Took 8 seconds

* More extra pages.

Took 28 seconds

* Small fix for now.

Took 3 minutes

* Expand on picture loading.

Took 44 minutes

* Fix line break breaking link.

Took 2 minutes

* Images and user documentation.

Took 1 hour 49 minutes

* Update doc/doxygen-extra-pages/developer_documentation/primer_cards.md

Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>
2025-11-15 13:07:15 +01:00
RickyRister
1c1599a9f4 [Oracle] Move page classes to separate file (#6314)
* Move pages to separate file

* Fix shadowing complaint
2025-11-15 11:27:53 +01:00
RickyRister
6dff230e10 [Oracle] Use NoOp setting providers (#6312) 2025-11-15 11:26:39 +01:00
BruebachL
0f60824749 Set DeckList parent when ownership changes (#6317)
* Initialize all deck list member variables in constructor.

Took 10 minutes

* Revert "Initialize all deck list member variables in constructor."

This reverts commit fba2455808.

* setParent

Took 1 hour 2 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-15 10:28:54 +01:00
RickyRister
84e0732fb1 Fix crash when changing shortcut in game (#6318) 2025-11-14 15:29:05 +01:00
RickyRister
ae123587d7 [Oracle] clean up OracleImporter (#6313)
* Move variable declaration closer to usage

* Leave comments

* inline some constants

* make code easier to understand

* Use structured binding to iterate over maps

* move things around

* static const regex

* remove redundant parens

* Can't use asKeyValueRange because of Qt versions
2025-11-12 16:58:09 +01:00
BruebachL
2efcb48b7e Fix mistyped pointer. (#6310)
Took 25 minutes

Took 25 seconds

Took 22 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-12 06:00:45 +01:00
BruebachL
3d9cae717d Adjust min size. (#6311)
Took 2 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-12 05:56:29 +01:00
BruebachL
cc73a8cc85 Every card is legal for now. (#6309)
Took 28 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-11 22:57:23 -05:00
ebbit1q
648f028a63 fix use of wrong parent when removing arrows for a player (#6308) 2025-11-12 04:48:26 +01:00
ebbit1q
840ee1379f fix crash on force starting, kicking players (#6307)
* fix crash on force starting, kicking players

* Update server_game.cpp

---------

Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-11-12 04:44:58 +01:00
SlightlyCircuitous
3c85ca9cbc Remove Fedora 41 Build and Add Fedora 43 Build (#6305)
* Create Dockerfile

* Update Release Template

* Delete .ci/Fedora41 directory

* remove F41, add F43
2025-11-11 20:18:20 -05:00
BruebachL
8e88749078 A DeckLoader is not a DeckList. (#6306)
* A DeckLoader is not a DeckList.

Took 2 hours 39 minutes

* Explicitly initialize base class in copy constructor?

Took 3 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-11 20:16:44 -05:00
tooomm
4c431e98a6 Update Dockerfile (#6268)
* Update Dockerfile

Took 15 minutes

Took 43 seconds

Took 2 minutes

Took 13 seconds

Took 3 minutes

Took 4 minutes

Took 51 seconds

* Update docker-release.yml

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Multi stage build.

Took 11 minutes

* Add more arguments.

Took 8 minutes

* Remove apt cache.

Took 3 minutes

* Add workdir, undo tcp socket include.

Took 10 minutes

* Change runtime deps.

Took 8 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-11 15:31:12 +01:00
BruebachL
40cf3ced1a [Doxygen] Include libs in Doxyfile (#6302)
* Include libs in Doxyfile

Took 13 minutes

* Update Doxyfile

Co-authored-by: tooomm <tooomm@users.noreply.github.com>

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: tooomm <tooomm@users.noreply.github.com>
2025-11-11 14:48:22 +01:00
ebbit1q
c9ccab8771 Servatrice build failure (#6243)
* attempts to fix the problem

* add test to show the problem

* fix workflow

* move logger to cockatrice

* more attempts

* undo stuff

* mark different libraries as gui

* fix SC2145

* rename servatrice only build
2025-11-11 14:34:39 +01:00
BruebachL
7d2700ca65 Clean up link targets. (#6304)
Took 38 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-11 14:04:14 +01:00
BruebachL
bfedc12fa8 Deck loader is a gui class. (#6294)
* Deck loader is a gui class.

Took 31 minutes

Took 3 minutes

* Deck Loader is responsible for printing.

Took 8 minutes


Took 2 seconds

* Style proxy.

Took 14 minutes

Took 6 minutes

Took 1 minute

* Don't need to include QBrush anymore.

Took 3 minutes

Took 7 seconds

* Includes for printer.

Took 5 minutes

* Nuke getDeckList()

Took 9 minutes

* Adjust to rebase.

Took 35 seconds

* Lint.

Took 3 minutes

* Braces for one line return statements.

Took 13 minutes

Took 50 seconds

* Enum for model columns.

Took 9 minutes

* One more single line if.

Took 1 minute

* Another style lint on a sunday night

Took 5 minutes

* Move enum to namespace.

Took 3 minutes

* Fix a critical blocker.

Took 5 minutes

* Update docs.

Took 3 minutes

* Doxygen and namespace enums.

Took 2 minutes

Took 15 seconds

* Adjust to namespace.

Took 4 minutes

Took 1 minute

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-11 11:57:41 +01:00
BruebachL
c16267e60f Doxygen exact_card.h (#6301)
Took 8 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-11 06:46:30 +01:00
BruebachL
0bd9b84931 Doxygen printing_info.h (#6300)
Took 4 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-11 06:46:18 +01:00
BruebachL
e9a9475ed7 [Doxygen] Card Database and related (#6303)
Took 29 minutes


Took 24 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-11 06:46:08 +01:00
BruebachL
f00d415dd7 [Doxygen] card_relation.h (#6298)
* Doxygen card_relation.h

Took 31 minutes

* Doxygen card_relation_type.h

Took 3 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-10 09:12:14 +01:00
BruebachL
1e7ff3dbdf Doxygen card_set.h and card_set_list.h (#6299)
Took 13 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-10 09:11:58 +01:00
BruebachL
eb1c257484 Fix crash on rejoining game when reconnecting. (#6295)
* Fix crash on rejoining game when reconnecting.

Took 2 minutes


Took 13 minutes

* Proper lib include.

Took 1 minute

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-10 09:11:22 +01:00
RickyRister
4d652210dc Support shortcut for hand reveal actions (#6297)
* Support shortcut for hand reveal actions

* add docs
2025-11-09 12:34:09 +01:00
BruebachL
9f2ac78609 Split filters into libraries where applicable. (#6293)
* Split filters into libraries where applicable.

Took 23 minutes

Took 2 minutes

* Include filter string.

Took 5 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-09 12:19:27 +01:00
RickyRister
484e8e64a6 Create "Hand" shortcut group (#6296)
* Add new Hand ShortcutGroup

* Move hand shortcuts
2025-11-09 10:16:30 +01:00
Gauwal
e5d5dfa8d8 UI: highlight pinned printings in Printing Selector (#6252)
* UI: highlight pinned printings in Printing Selector

Fixes #5930.

Signed-off-by: Gauwal <gauwain2611@hotmail.com>

* Fix: adjust pin highlighting behavior + making it sharp/not blurry

* Using qceil

* Isolating pin badge init to it's own method + adding comments

* Cleaning up unnecessary #includes

---------

Signed-off-by: Gauwal <gauwain2611@hotmail.com>
2025-11-09 09:53:27 +01:00
ebbit1q
0ad31fea46 allow oracle to run in background with direct xml downloads (#6241)
Took 5 minutes
2025-11-09 09:52:46 +01:00
Chase Naples
ec2d8f231d Fix horizontal flip of VIP Moderator icon (#6292)
The VIP Moderator (Head Moderator) star icon was flipped horizontally
and did not match the orientation of other moderator icons. Fixed by
inverting the scaleX value in the transform matrix and adjusting the
translateX value to maintain the star's position.

Fixes #6290
2025-11-09 02:17:15 +01:00
BruebachL
aeec56f800 Sync up Visual Deck Editor group by combo box to Deck Editor Dock Widget combo box. (#6291)
Took 21 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-09 01:18:31 +01:00
BruebachL
7e6cad974f [Doxygen] abstract_tab_deck_editor (#6286)
* Doxygen abstract_tab_deck_editor

Took 15 minutes

Took 15 minutes


Took 4 seconds

* Lint.

Took 28 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-08 23:25:33 +01:00
RickyRister
757e9f3415 Add more sort options to hand sort (#6279)
* Add more sort options to hand sort


Took 14 minutes

* Move defaultOptions up a level

* Directly pass sort order as param

* fix include

* revert

* fallback expandSortOption
2025-11-08 23:03:44 +01:00
BruebachL
6bc2293292 Doxygen tab_deck_editor (#6287)
Took 21 seconds

Took 4 minutes

Took 4 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-08 22:30:19 +01:00
BruebachL
55aaca0e0d Introduce additional checks for playerMenu shortcut activation for judges (#6275)
* Introduce additional checks for playerMenu shortcut activation when they are accessed by a judge, only activating them if the player is a local player.

Took 2 hours 7 minutes


Took 17 minutes

* Undo example change.

Took 5 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-08 22:22:02 +01:00
BruebachL
a8a3fca8c9 Clean up inter-library dependencies with interfaces (#6280)
* Have CardDatabase::getPreferredPrintingInfo respect card provider ID overrides (pinned printings)

Took 13 minutes

Took 37 seconds

Took 10 seconds

Took 10 seconds

# Commit time for manual adjustment:
# Took 30 seconds

Took 15 seconds


Took 8 minutes

Took 21 seconds

* Move settings cache and settings card preference provider out of libcockatrice_settings and into cockatrice

Took 52 minutes

Took 9 minutes

Took 1 minute

* Temp cache.

Took 16 minutes

* Dependency Injection for SettingsCache

* Turn SettingsCache into a QSharedPointer.
* Implement interfaces for settings that need it

Took 2 hours 38 minutes

* Adjust oracle.

Took 5 minutes

* Move abstract/noop interfaces to libcockatrice_interfaces so they can be linked against independently.

Took 52 minutes

* Clean up some links.

Took 3 minutes

* Cleanup two includes.

Took 3 minutes

* More fixes.

Took 7 minutes

* More includes that slipped past.

Took 3 minutes

* Stop mocking and start injecting for tests.

Took 15 minutes

* I don't know why remote_client was including main.

Took 4 minutes

* Include.

Took 3 minutes

* Lint.

Took 2 minutes

* Don't use Qt pointers.

Took 1 hour 7 minutes

* Make parser use CardSettingsInterface

Took 13 minutes

* Also adjust constructor lol.

Took 8 minutes

* Lint.

Took 32 minutes

* Revert "Lint."

This reverts commit ecb596c39e.


Took 3 minutes

* Test.

Took 3 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-08 22:19:40 +01:00
BruebachL
fb30515f72 Doxygen tab_deck_editor_visual (#6288)
Took 15 seconds

Took 3 minutes

Took 3 minutes


Took 45 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-08 22:14:17 +01:00
BruebachL
9a39af6da0 Doxygen tab_deck_editor_visual_tab_widget (#6289)
Took 29 seconds


Took 3 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-08 21:23:10 +01:00
ebbit1q
6d75ce4b1c don't close dm tabs when disconnecting (#6285) 2025-11-08 20:06:54 +01:00
BruebachL
dbd1d30ca8 Forward opponent deck view signals to deck view container as well instead of just the player deck view signals. (#6283)
Took 25 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-08 13:25:40 +01:00
Zach H
8f80996515 Strip dashes in Yahoo addresses (#6284) 2025-11-07 13:35:44 -05:00
ebbit1q
d206a70b8a update format.sh (#6240)
* update format.sh

add shellcheck to format.sh
add statement macros to .clang-format
add no clang format to format.sh
add changed file list to format.sh diff
rename --cf-version to --print-version in format.sh
lint files

* enable --shell on ci runs

* remove useless semicolons

removes the semicolons after empty function definitions
these semicolons are optional, they don't do anything
this will have functions be consistently formatted
if we want to keep the option to have these on the same line like they
were before we should use the option AllowShortFunctionsOnASingleLine: None

* fix script

* update echo line in lint_cpp.sh which doesn't lint cpp only at all
2025-11-07 15:00:39 +01:00
Bruno Alexandre Rosa
bbec4d2c7e ci: unify vcpkg jobs (take 2) (#6263)
* ci: unify vcpkg jobs

* use build matrix variables: package_suffix

simplifying some convoluted logic, one variable at a time.  work in progress.

* use build matrix variables: artifact_name

* use build matrix variables: qt stuff

* display cmake flags in builds

* add type to windows builds

* use build matrix variables: cmake stuff

* use build matrix variables: USE_CCACHE

* formatting

* more formatting

* spaces

* address review comments
2025-11-06 23:20:47 +01:00
BruebachL
f24c36d6b1 Core qt module for libs (#6278)
* Move logger and key signals from libcockatrice_utility to Cockatrice.

Took 9 minutes

* Only link Qt::Core instead of COCKATRICE_QT_MODULES to libraries, if possible.

Took 2 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-05 18:51:08 +01:00
BruebachL
adff828415 Move models to lib (#6274)
* Move models to own library.

Took 35 minutes


Took 22 minutes

* Adjust CMakeLists

Took 20 seconds

* Reformat CMakeLists.

Took 2 minutes

* Revert "Reformat CMakeLists."

This reverts commit db5982ad1c.


Took 55 seconds

* Lint an include

Took 17 minutes

Took 9 seconds

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-11-05 18:33:40 +01:00
ebbit1q
d914667238 fix qt 6.10 debug build (#6271)
* fix qt 6.10 build

* fix games model parameter order and correct parameter names

* add missing include for qt5
2025-11-05 12:10:36 +01:00
RickyRister
1c209b3320 Fix names in qtlogging.ini (#6265) 2025-11-03 18:55:32 +01:00
tooomm
aa61032cdf Delete servatrice/scripts/mk_pypb.sh (#6267)
See https://github.com/Cockatrice/Cockatrice/pull/6212#issuecomment-3447840864
2025-11-03 18:32:35 +01:00
dependabot[bot]
3ae4a7d8a7 Bump actions/setup-node from 5 to 6 (#6250)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5 to 6.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-02 17:11:23 +01:00
dependabot[bot]
9fdecf21f2 Bump actions/upload-artifact from 4 to 5 (#6260)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-01 19:23:46 +01:00
transifex-integration[bot]
e4d256790f Updates for project Cockatrice and language en@pirate (#6256)
* Translate oracle_en@source.ts in en@pirate [Manual Sync]

7% of minimum 4% translated source file: 'oracle_en@source.ts'
on 'en@pirate'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate cockatrice_en@source.ts in en@pirate [Manual Sync]

8% of minimum 4% translated source file: 'cockatrice_en@source.ts'
on 'en@pirate'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-10-26 13:46:46 +01:00
transifex-integration[bot]
d9f4faf4ec Translate cockatrice_en@source.ts in tr [Manual Sync] (#6258)
4% of minimum 4% translated source file: 'cockatrice_en@source.ts'
on 'tr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-10-26 13:46:02 +01:00
transifex-integration[bot]
609a364971 Translate cockatrice_en@source.ts in nb [Manual Sync] (#6257)
7% of minimum 4% translated source file: 'cockatrice_en@source.ts'
on 'nb'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-10-26 13:44:26 +01:00
github-actions[bot]
2152ddd99b Update translation files (#6255)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-26 13:23:02 +01:00
github-actions[bot]
8caaf8515e Update translation source strings (#6254)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-26 13:11:56 +01:00
github-actions[bot]
ac822fa084 Update translation files (#6244)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-25 14:43:59 +02:00
transifex-integration[bot]
a265b865f6 Translate oracle/oracle_en@source.ts in nl (#6246)
100% translated source file: 'oracle/oracle_en@source.ts'
on 'nl'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-10-25 14:38:10 +02:00
transifex-integration[bot]
8efc4f4817 Translate cockatrice_en@source.ts in en_US (#6245)
100% translated source file: 'cockatrice_en@source.ts'
on 'en_US'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-10-25 14:35:29 +02:00
Bruno Alexandre Rosa
817a3f979e build: target macos 13 for x86 binaries (#6221)
* build: target older macos

* cleanup

* Align xcode versions

* Simplify --x86-macos

* use cmake flag in compile.sh i.s.o. env var in yml

* more cleanups

* adress initial reviews

* generate triplet file in compile.sh

* fix triplet name

* pass matrix.target as version

* small refactor

* another minor refactor

* ci: fix ccache cleaning

* add more comments

* try passing triplets config as cmake variables

* Revert "try passing triplets config as cmake variables"

This reverts commit 77e83e8590.

* move logic inside runner == macos if

* move logic to env var

* simplify script

* format script

"I just thinks it looks better like this"

* make script work for arm as well, might be useful

* use hyphen

* use DVCPKG_HOST_TRIPLET instead of DVCPKG_TARGET_TRIPLET

* use DVCPKG_HOST_TRIPLET AND DVCPKG_TARGET_TRIPLET

---------

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2025-10-22 01:00:25 +02:00
RickyRister
8ebfc40de5 Consolidate closeReplay action into leaveGame (#6239) 2025-10-09 18:59:53 -07:00
RickyRister
c42e953199 Fix unattach shortcut not working at all in remote games (#6238) 2025-10-09 18:59:10 -07:00
RickyRister
636aa72141 Remove redundant prefix from libcockatrice_card folders (#6237)
Took 28 minutes
2025-10-09 23:09:20 +02:00
github-actions[bot]
14e6e6eff4 Update translation source strings (#6203)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-09 23:05:12 +02:00
BruebachL
474c1d0d89 [Move refactor] Move dialogs to interface/widgets/ (#6234)
* Move dialogs/ underneath interface/widgets since QDialog inherits from QWidget.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-10-09 15:25:18 +02:00
BruebachL
b8983f27ab [Move refactor] Move tabs to interface/widgets (#6235)
* Move tabs to interface/widgets.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-10-09 14:51:47 +02:00
BruebachL
d9c65d4ae0 [Move refactor] Reparent orphan classes (#6236)
* Move orphaned classes to their correct parent folders.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-10-09 14:15:19 +02:00
BruebachL
1ef07309d6 Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212)
---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2025-10-09 07:36:12 +02:00
ebbit1q
be1403c920 add hdiutil repeat script (#6231) 2025-10-08 10:10:44 +02:00
transifex-integration[bot]
03e32f0a7c Translate cockatrice/cockatrice_en@source.ts in it (#6228)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'it'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-10-08 02:18:33 +02:00
tooomm
f4361d1b43 CI: More workflow paths updates (#6227)
* update trigger paths

* change to include paths trigger pattern

* refine selection

* more paths

* fix

* revert push trigger and add hint
2025-10-08 02:17:02 +02:00
ebbit1q
e1259e67d3 update vcpkg (#6230)
* update vcpkg

* trigger build workflow on vcpkg changes
2025-10-08 01:40:52 +02:00
BruebachL
ca1b9bf75f [PrintingSelector] Sync PrintingSelector availability to OverrideAllCardArtWithPersonalPreference setting. (#6218)
* [PrintingSelector] Clearly warn users about disabling the providerId change, hide and disable the printingSelector, clear the networkCache.

Took 56 minutes

Took 4 seconds

Took 9 minutes

* Defer rollback so the rollback isn't swallowed logically.

Took 7 minutes

* Immediately enable select printing action.

Took 7 minutes

* Remove restart label.

Took 8 seconds

* Clear PixmapCache as well as NetworkCache.

Took 4 minutes

* Lint.

Took 3 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-10-07 20:59:16 +02:00
ebbit1q
3cff55b0bb add abstract player in expectance of draft players (#6210)
* add abstract player in expectance of draft players
2025-10-07 15:09:30 +02:00
tooomm
c25b153185 CI: Update trigger paths for desktop workflows (#6223)
* update trigger paths

* change to include paths trigger pattern

* refine selection
2025-10-05 16:51:06 +02:00
RickyRister
9c58e6f90f Don't use vcpkg on local macOS (#6225)
* Don't use vcpkg on local macOS

* fix typo
2025-10-05 13:31:46 +02:00
BruebachL
cff16346ef [TabGame] Fix dangling PlayerMenus in gameMenu (#6215)
* Player manager is responsible for deleting players.

Took 21 minutes

* Clean up dangling QAction* wrappers for PlayerMenus in TabGame::processPlayerLeave(Player* leavingPlayer)

Took 37 seconds

* Lint.

Took 11 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-10-04 01:08:04 +02:00
BruebachL
30e6b52783 [Game] Populate playerLists for menus in their aboutToShow … (#6214)
* Populate playerLists for menus in their aboutToShow so they are always current and do not rely on playerMenu manually tracking them. Also add playerActions for previous playerListActions.

Took 1 hour 35 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-10-03 15:21:22 +02:00
BruebachL
015570c833 For the automatic card database update process, disconnect signals, terminate and wait for it to finish on window_main destruction. (#6216)
Took 1 minute

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-10-03 15:03:37 +02:00
BruebachL
7c31197b78 Correctly add filterWidget as a dock widget for VDE, make printingSelector visible in the default layout for DE. (#6217)
Took 18 minutes


Took 24 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-10-03 14:56:19 +02:00
ebbit1q
a69bfb8cb8 add scroll bar to properties in cardinfotextwidget (#6201)
* add scroll bar to properties in cardinfotextwidget

* remove resizeevent trigger
2025-10-02 22:55:18 -04:00
BruebachL
c5b361e94d [Documentation] Doxygen regroup files and reorder group structure (#6208)
* Regroup a whole bunch of files.

Took 1 hour 38 minutes

* Reorder the structure.

Took 15 minutes

* Link some more things.

Took 18 minutes

* More links.

Took 14 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-10-02 16:28:08 +02:00
BruebachL
201750c89f Do not log joins on gameStateChanged (resume events) (#6207)
Took 13 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-10-01 15:13:56 +02:00
BruebachL
89a8d0f6b8 [Refactor] Untangle card_info.cpp and split into individual files. (#6202)
* Untangle the card_info.cpp mess and split into individual files.

Took 53 minutes

* Auto-lint was disabled and my pre-commit hook didn't fire. Oh well.

Took 3 minutes

* Fix oracle.

Took 35 seconds

* Lint!

Took 20 seconds

* Fix tests.

Took 3 minutes

* CMakeLists.txt: The reason why I have to disable auto-lint.

Took 2 minutes

* dbconverter.

Took 3 minutes

* Oracle again.

Took 3 minutes

* dbconverter again.

Took 3 minutes

* dbconverter again again.

Took 2 minutes

* More fixes.

Took 4 minutes

Took 21 seconds

* Everything needs everything.

Took 3 minutes

* Everything means everything.

Took 4 minutes

* All the tests.

Took 4 minutes

* I hate everything about this.

Took 3 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-10-01 11:49:39 +02:00
BruebachL
835e4af3e4 [Documentation] Add a doxy group for the PictureLoader. (#6204)
* Add a doxy group for the PictureLoader.

Took 26 minutes

* Linting is a fun activity for children and adults of all ages and sizes.

Took 5 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-10-01 11:45:56 +02:00
BruebachL
c33106eab4 [UI] Remove @ from playerName since only the auto complete list cares about it. (#6205)
Took 5 minutes

Took 37 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-10-01 11:31:16 +02:00
BruebachL
bea8c3dbec Group game scene correctly and replace to-do. (#6199)
Took 35 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-30 22:36:33 +02:00
dependabot[bot]
b51d5d007b Bump peaceiris/actions-gh-pages from 3 to 4 (#6197)
Bumps [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) from 3 to 4.
- [Release notes](https://github.com/peaceiris/actions-gh-pages/releases)
- [Changelog](https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md)
- [Commits](https://github.com/peaceiris/actions-gh-pages/compare/v3...v4)

---
updated-dependencies:
- dependency-name: peaceiris/actions-gh-pages
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-30 12:14:01 +02:00
BruebachL
f8c4f774cf [Documentation] Sort *every* file into a doxygen group. (#6198)
* Sort *every* file into a doxygen group.

Took 7 hours 9 minutes

Took 18 seconds

Took 2 minutes

* Lint some ingroup definitions.

Took 10 minutes


Took 2 seconds

* Just include the groups in the Doxyfile in this commit.

Took 3 minutes

* Update some group comments so they link!

Took 14 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-30 12:13:32 +02:00
BruebachL
22c6756ce0 [Doxygen] Layout adjustments (#6196)
* Layout adjustments.

Took 1 hour 54 minutes

Took 2 minutes


Took 6 minutes

* Remove the empty building page.

Took 7 minutes

* Change to @page

Took 11 minutes

* Change to @page again

Took 52 seconds

* Change to @page again again

Took 2 minutes

* Fence the page declaration in CONTRIBUTING.md

Took 8 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-30 11:45:49 +02:00
ebbit1q
e318815025 nullcheck concede action (#6193) 2025-09-28 23:03:13 -04:00
BruebachL
0833f94502 [Doxygen] Add javascript to toggle call/caller graph visibility. (#6195)
Took 49 minutes

Took 26 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-28 21:22:37 +02:00
tooomm
ddbf5e1457 CI: Doxygen Docs workflow adjustments (#6194)
* Manual trigger, branch name fix, rename yml

* Update documentation-build.yml

* Run on changes to file but only deploy on tags

* Update documentation-build.yml
2025-09-28 19:58:32 +02:00
ebbit1q
2a032f3116 remove building docker images on code changes in prs (#6192) 2025-09-28 18:44:35 +02:00
BruebachL
5381562a5e [TabGame/GameEventHandler] Re-emit spectator addition signals in eventGameStateChanged (#6187)
* [TabGame/GameEventHandler] Re-emit spectator addition signals in eventGameStateChanged.

Took 36 minutes

* Check spectators as a whole.

Took 2 minutes

* Lint.

Took 42 seconds

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-28 12:39:40 +02:00
BruebachL
f2ce5e9693 [DeckEditor] Properly check if deck is blank. (#6188)
* [DeckEditor] Properly check if deck is blank.

Took 20 minutes

* Rename.

Took 17 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-28 11:56:45 +02:00
BruebachL
ed50fd98cd Add workflow to generate doxygen on tag push (#6189)
* Add workflow to generate doxygen on tag push.

Took 17 minutes

* Publish correct dir.

Took 3 minutes

* Don't include common/libs.

Took 20 minutes

* Update workflow

Took 1 hour 25 minutes

* Style Doxygen output.

Took 55 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-28 00:18:09 +02:00
BruebachL
14991e1f9e [GameScene] Refactor and doxygen (#6180)
* Clean up game scene code.

Took 18 minutes

* Doxygen.

Took 18 minutes

Took 5 seconds

Took 10 minutes

* Move some methods.

Took 6 minutes

* Restore the original warning, I guess.

Took 3 minutes

* Accidentally some methods.

Took 5 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-27 00:31:30 +02:00
Bruno Alexandre Rosa
5fa06746f1 build: use vcpkg for most dependencies on macos (#6170)
* build: use vcpkg for most dependencies on macos

* factor out common params

* refactor: factor out common parameters in macOS matrix

* use env vars instead of matrix

* add comment about jianmingyong/ccache-action

* Remove unused 'qt_tools' param

* Use system python

* Let ccache caches be handled by ccache-action

* Add comment about why we use install-qt-action

* set unique ccache key

* nit

* fix cache prefix

* pass gh-token

* Revert "pass gh-token"

This reverts commit cadfa253c6.

* Reapply "pass gh-token"

This reverts commit bd15e96e18.

* do not cache qt on macos
2025-09-27 00:29:13 +02:00
BruebachL
d31b044529 [Card DB] Split out database loading and querying from main class (#6175)
* Simplify add card.

Took 25 minutes

Took 8 minutes

# Commit time for manual adjustment:
# Took 16 minutes

Took 7 seconds

* Refactor out db loading from card db.

Took 39 minutes

Took 9 minutes

Took 2 minutes


Took 17 seconds

* Refactor out db queries from card db.

Took 42 minutes

* Lint.

Took 3 minutes

* I guess.

Took 7 minutes

* Tests.

Took 15 minutes

* I don't understand this.

Took 9 minutes

* fix linker errors

* Rename to querier and promote to QObject

Took 39 minutes

* Lint.

Took 3 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2025-09-27 00:27:15 +02:00
BruebachL
754dd904d2 [TabRoom] Re-layout game creation dialog. (#6182)
* [TabRoom] Re-layout game creation dialog.

Took 18 minutes

* Don't squish because then they overlap. Use new layout instead.

Took 8 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-27 00:23:26 +02:00
BruebachL
1503394662 [Game/DB] Have landscape cards enter tapped and not untap normally when played to table. (#6183)
Took 16 minutes


Took 12 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-27 00:22:01 +02:00
BruebachL
436d69b710 Reconnect remote player deck selection signals to game event handler. (#6181)
Took 14 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-27 00:20:55 +02:00
BruebachL
891e7bf6e4 [TabGame/PlayerManager] Handle concession properly. (#6178)
* Handle concession properly.

Took 57 minutes

Took 38 seconds

Took 18 seconds

Took 21 seconds

* Set text and enable/disable on game start/stop. (Does not fix the translation issue but at least disables the button.)

Took 51 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-26 19:58:48 +02:00
BruebachL
fad1280185 [Game] Fix game timer starting twice, not stopping and not resetting correctly. (#6177)
* Fix timer starting twice, not stopping and not resetting correctly.

Took 39 minutes

* Don't stop/start, just start.

Took 29 minutes

* Fix build.

Took 2 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-26 19:28:07 +02:00
RickyRister
6187c7268f [Game] Fix double concede in log (#6179) 2025-09-26 19:12:20 +02:00
BruebachL
762ea47b8e [Card DB] Various little fixes and cleanups (#6174)
* Simplify add card.

Took 25 minutes


Took 6 minutes

* Simplify guessCard.

Took 2 minutes

* Simplify loadCardDatabases.

Took 3 minutes

Took 6 seconds

* Clean up mutexes instead of manually locking/unlocking.

Took 5 minutes

* Fix null/empty check.

Took 3 minutes

* Move some stuff around inside the file.

Took 4 minutes

* Move some more things.

Took 2 minutes

* Clean up refreshCachedReverseRelatedCards.

Took 2 minutes

Took 6 seconds

* Clean up getCardFromSameSet.

Took 2 minutes

* Lint.

Took 5 minutes

* Fix compiler warning.

Took 4 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-25 19:36:46 +02:00
BruebachL
23612ba6ec [Card DB Models] Move refactor (#6172)
* Refactor CardDatabaseDisplayModel, TokenDisplayModel and TokenEditModel out of CardDatabaseModel. Move every model into an appropriate folder.

Took 54 minutes

* No folder for database models.

Took 6 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-25 16:35:29 +02:00
BruebachL
217646f031 Fix a bounds check to load the last page of cards in VDD as well. (#6169)
Took 18 minutes

Took 17 seconds

Took 14 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-23 17:05:30 +02:00
Bruno Alexandre Rosa
91667d9ecd build: update vcpkg (#6168) 2025-09-23 15:40:05 +02:00
RickyRister
3501ee9a9d Sort pb cmake and add comments to proto files (#6163)
* sort cmake

* copy over comments

* clean up comments
2025-09-22 01:57:42 +02:00
ebbit1q
f0c3860032 squash #6156 (#6161)
* move common server files

* update includes with move

* create participant, move code

* fix linker errors

* fix regressions

* mark function as override to make clang happy

* split out spectator to new file

* forgot to add to cmakelists

* autocompleter picking wrong casing for var name

* clean up forwards declarations in player

* fix includes in game
2025-09-20 14:37:12 +02:00
ebbit1q
17dcaf9afa squash #6158 (#6160)
* move message_log_widget to game

* move files

* update headers

* fix cmakelists

* oracle fixes

* split implementation out to cpp

* fix recursive import

* fix main file

* format
2025-09-20 14:35:52 +02:00
transifex-integration[bot]
f484c98152 Translate cockatrice/cockatrice_en@source.ts in de (#6157)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-09-18 22:10:29 +02:00
github-actions[bot]
46f68115b2 Update translation source strings (#6155)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-17 12:58:05 +02:00
RickyRister
7ac22a6ce8 Move cards and filters folder out of game (#6145)
* big move

* also move game_specific_terms

* fix imports

* alphabetize cmake

* fix build failure

* create database folder and move files into it

* fix includes

* run formatter
2025-09-16 12:02:57 +02:00
BruebachL
bed79ef89e Remove unused layers from cardback.svg (#6154)
Took 42 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-15 22:20:12 +02:00
BruebachL
54095b9a89 [Home Tab] Disable random art crop shuffle if frequency is set to 0. (#6153)
* Disable shuffle if frequency is set to 0.

Took 13 minutes


Took 26 seconds

* Set special value text.

Took 12 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-15 21:34:42 +02:00
BruebachL
4b58060ab6 Don't set opaque paint event. (#6151)
Took 9 minutes


Took 20 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-15 21:12:58 +02:00
BruebachL
dbbb554735 Only use normal layout cards as a background source. (#6152)
Took 11 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-15 21:12:09 +02:00
BruebachL
9c3be1b851 check for null zone during card item teardown (#6149)
* check for null zone during card item teardown

Took 1 hour 32 minutes


Took 24 seconds

* Also check for it in the successful branch.

Took 6 minutes

* Comment.

Took 5 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-15 20:06:20 +02:00
BruebachL
190ab211e3 More player leaving fixes (#6148)
* Remove unnecessary parentheses.

Took 16 minutes

* Reorder player-left signals

Took 11 seconds

* Connect PlayerManager::playerRemoved signal to TabGame::processPlayerLeave.

Took 21 seconds

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-15 20:03:00 +02:00
RickyRister
f4fbe90a72 Fix segfault when creating token of opponent's card (#6144)
* Fix segfault when creating token of opponent's card

* clean up code
2025-09-15 12:18:51 +02:00
RickyRister
a9cbd5a172 Make TabHome a managed tab (#6147)
* Make TabHome a managed tab

* Add shortcut
2025-09-15 12:07:57 +02:00
RickyRister
94ba1c83c6 Removed unused fields in GameMetaInfo and GameState (#6142)
* Removed unused fields in GameMetaInfo and GameState

* revert parent to AbstractGame

* init activePlayer to -1
2025-09-15 10:22:11 +02:00
BruebachL
9b3756e591 Don't setText() in paintEvent() which causes infinite recursion on MacOs. Use a styleOption to paint base class directly instead. (#6146)
Took 18 minutes

Took 5 seconds


Took 19 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-15 10:19:12 +02:00
BruebachL
aff775f488 Don't get local ID from playerInfo on concession (#6143)
* Don't get local ID from playerInfo.

Took 39 minutes


Took 39 seconds

* Introduce isLocalPlayer convenience method.

Took 21 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-15 01:09:30 +02:00
BruebachL
4de5274996 Check if card has no PT set yet if dropped on table. (#6137)
* Check if card has no PT set yet if dropped on table.

Took 22 minutes

* Use isEmpty() for comparison.

Took 6 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-14 12:38:17 +02:00
dependabot[bot]
4e57868037 Bump actions/setup-node from 4 to 5 (#6111)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-14 10:50:33 +02:00
BruebachL
ab6b32b8ba Respect default deck editor choice (#6136)
* Respect default deck editor choice.

Took 5 minutes

* Don't force open default deck editor on startup.

Took 1 minute

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-13 22:03:10 +02:00
BruebachL
46285a499e Add a style for disabled buttons (#6134)
* Disable view card database button until card db is loaded, add a new style for disabled buttons.

Took 4 minutes

Took 21 seconds

* Lint.

Took 8 minutes

* Rename variables, don't disable DB button anymore.

Took 4 minutes

Took 4 seconds

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-13 22:01:49 +02:00
BruebachL
ce6cad5dfe Use a scope disconnect. (#6135)
Took 7 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-13 16:35:59 +02:00
BruebachL
d5ea86bc81 Guard against not-loaded database by delaying initialization. (#6133)
Took 20 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-13 15:00:30 +02:00
BruebachL
41ea424359 table_zone_logic now sets the PT of the cardItem to the cardInfos PT, which ensures consistency of this functionality when the card is added from a hidden zone. (#6129)
Took 27 minutes


Took 43 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-13 13:37:04 +02:00
BruebachL
87b0259b97 Properly delete enlargedPixmapWidget (#6131)
* Properly delete enlargedPixmapWidget.

Took 23 minutes

Took 13 seconds


Took 16 seconds

* Connect to QObject instead of emitting own signal.

Took 12 minutes

Took 7 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-13 13:35:59 +02:00
BruebachL
2490e97ea0 Switch to replay tab if already open. (#6130)
Took 11 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-13 12:44:46 +02:00
BruebachL
eecfe9d387 Forward playerActions signals to playerEventHandler (#6126)
Took 54 minutes

Took 7 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-13 12:44:09 +02:00
BruebachL
9ca5ee52e7 Connect signals correctly. (#6124)
Took 58 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-13 03:31:05 +02:00
BruebachL
fb23cc8c7a Refactor player menus into helper classes (#6121)
* Refactor player menus into helper classes.

Took 2 hours 6 minutes


Took 11 minutes

* Lint.

Took 6 minutes

Took 22 seconds

* Refactor card and move menu.

Took 1 hour 6 minutes

Took 36 seconds

Took 52 seconds

* Set active shortcuts, move player info stuff to card menu.

Took 25 minutes


Took 18 seconds

* Refactor say and utility menu.

Took 54 minutes

Took 2 minutes

Took 5 minutes

Took 11 minutes

* Rename folder.

Took 24 minutes

Took 6 minutes

* Refactor sideboard menu.

Took 26 minutes

* Remove unused variable in constructor.

Took 42 seconds

* Lint.

Took 11 minutes

* Nullptr check

Took 8 minutes

* Use localOrJudge check

Took 6 minutes

* Fix the build.

Took 7 minutes

Took 35 seconds

* PlayerList things.

Took 16 minutes

* Retranslate and set shortcuts for everything.

Took 10 minutes

* Correctly nullptr out sayMenu if not local

Took 3 minutes

* Don't check playerInfo in sbMenu shortcutsActive

Took 3 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-12 13:52:05 -04:00
RickyRister
ff7ce39841 Fix hand visible (#6122) 2025-09-12 09:46:38 -04:00
RickyRister
0f05d6bd74 Move doc comments to correct place (#6123)
* Move docs for ViewZone

* Update docs

* move docs for updateCardMenu

* Fix link in doc

* format
2025-09-12 09:46:18 -04:00
BruebachL
93c15c8151 Home tab to replace generic deck editor on startup (#6114) 2025-09-11 15:36:34 -04:00
Zach H
22c8268f02 Require min 3.10 for external deps (#6119) 2025-09-11 14:50:31 -04:00
ebbit1q
216cd491cc fix #6115 (#6118)
* fix #6115

* rename all instances of player when relevant
2025-09-11 12:00:49 -04:00
BruebachL
5efc573783 Also nullptr incrementAllCardsCounter (#6117)
Took 34 minutes


Took 41 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-11 11:39:56 -04:00
RickyRister
bca0da6bd4 Fix segfault when drawing arrow (#6116) 2025-09-11 09:49:54 -04:00
BruebachL
9601a1fa4e Player refactor (#6112)
* Player refactor.

Took 1 hour 43 minutes

Took 1 minute


Took 23 seconds

* Tiny lint.

Took 3 minutes

* Hook up tap logic again.

Took 13 minutes

* Fix an include.

Took 3 minutes

* Stuff.

Took 6 minutes

* Fix typo.

Took 7 minutes

* Include.

Took 1 minute

* Reorganize method/variable definitions, remove unused ones.

Took 1 hour 8 minutes


Took 24 seconds

* Clean up some unused imports.

Took 6 minutes

* Player holds the deck, emits deckChanged(), other elements player->getDeck() to respond to changes.

Took 37 minutes

* Connect player->openDeckEditor signal directly in the player constructor

Took 6 minutes

* Emit openDeckEditor signal in player_actions again.

Took 3 minutes

* Do to-do's

Took 3 hours 32 minutes

* Lint.

Took 3 minutes

* Lint again.

Took 2 minutes

* Fix include.

Took 32 minutes

* The stack should ensure card visibility.

Took 21 minutes

* Fine, the game can remember the tab.

Took 10 minutes

Took 21 seconds

Took 9 seconds

* zoneId is a dynamic gameplay property and thus belongs in player.cpp

Took 11 minutes

Took 19 seconds

* Signal view removal, addition.

Took 5 minutes

* Ensure all players are considered local in local game.

Took 10 minutes

* ENSURE they are.

Took 8 minutes

* Bounds check data sent by QAction()

Took 54 minutes

* Move comment.

Took 20 seconds

* Reimplement logging category for game_event_handler.cpp, remove linebreaks.

Took 36 seconds

* PlayerGraphicsItem is responsible for retranslateUi, not Player.


Took 14 seconds

* Set menu for sideboard again, translate some menu titles, reimplement actIncPT action

Took 54 seconds

* Comment spacing.

Took 43 seconds

* Change message_log_widget.cpp slots to take CardZoneLogic parameters as emitted by PlayerEventHandler.

Took 7 minutes

Took 14 seconds

* Remove unused player_logger.cpp

Took 2 minutes

* Query local game state correctly from tab_supervisor again

Took 3 minutes

* Revert Deck legality checker.

Took 3 minutes

* Instantiate menu before graphics item.

Took 1 hour 5 minutes

Took 55 minutes

* Differentiate games and replays.


Took 9 seconds

* Lint.

Took 10 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-10 18:49:33 -04:00
BruebachL
b8e545bfa4 Move game state and event handling out of tab_game and into separate classes (#6090)
* Move game state and event handling out of tab_game and into separate classes.

Took 6 hours 38 minutes

Took 23 seconds

* Meta Info

Took 14 hours 36 minutes

* Properly respond to game started again.

Took 49 minutes

* Hook up the message log widgets to game events again.

Took 33 minutes

Took 7 seconds

* Lint.

Took 4 minutes

* Hook up playerListWidget.

Took 1 hour 2 minutes

Took 10 seconds

* Hook up playerListWidget properly.

Took 1 hour 17 minutes

* Fix regressions.

Took 17 minutes

Took 9 seconds

* Log the local player joining too.

Took 2 minutes

* Connect some player signals unrelated to this refactor again.

Took 5 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-10 18:40:29 -04:00
ebbit1q
5c16f0d027 update the address of the fsf in the license (#6113)
the fsf closed its office in august this year, it's now remote only and
the address has been replaced with its url, the license text can be
found here: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
2025-09-10 18:18:34 -04:00
ebbit1q
1b4441baac add libqt6sql6-mysql to debian package recommends (#6110) 2025-09-08 09:59:18 -04:00
ebbit1q
0147a1d41f disallow users on your ignore list to get your current games (#6109) 2025-09-07 11:58:52 -04:00
BruebachL
0f11fbe599 Use pinned printing when adding to deck. (#6108) 2025-09-07 00:26:39 -04:00
BruebachL
9c18e99fe2 Correctly reset banner card if none was set but card appears in new deck. (#6107) 2025-09-07 00:26:07 -04:00
BruebachL
6e0a7de9cc Move quick filters from right to left to be closer to the color filters. (#6106) 2025-09-06 18:11:43 -04:00
BruebachL
b141a65838 Refactor page loading so it's uniform, display every printing from every filtered set instead of just one. (#6105) 2025-09-06 18:11:36 -04:00
BruebachL
7f842bb1e8 Sort VDE groups internally (#6102) 2025-09-06 09:06:59 -04:00
RickyRister
bd65aae81e Fix Logs tab close button not working (#6104) 2025-09-06 11:04:50 +02:00
BruebachL
b8dedb568c Use modelReset from new grouping in deck_list_model in VDE (#6100) 2025-09-05 11:12:30 -04:00
dependabot[bot]
ec94c29ed9 Bump actions/attest-build-provenance from 2 to 3 (#6095)
Bumps [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) from 2 to 3.
- [Release notes](https://github.com/actions/attest-build-provenance/releases)
- [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
- [Commits](https://github.com/actions/attest-build-provenance/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/attest-build-provenance
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-04 22:54:35 -04:00
github-actions[bot]
c77943d01c Update translation files (#6094)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-04 22:54:27 -04:00
BruebachL
fc5fb956df Properly allow resizing the printing selector (#6097)
* Properly allow resizing the printing selector.
* Don't restrict central widget sizing in regular deck editor, don't size hidden widget in visual deck editor.
* Reset layout in VDE properly and introduce new default layout.
* Gives hover signal correct parameters (fix for exact card refactor issue)
2025-09-04 22:54:07 -04:00
BruebachL
2eba126ed7 Modularize and Doxygen decklist.cpp (#6099) 2025-09-04 22:52:46 -04:00
dependabot[bot]
da52d677c7 Bump actions/checkout from 4 to 5 (#6084) 2025-08-31 09:06:26 +02:00
RickyRister
ab4373d025 Implement replay sharing (#6066)
* new protos

* implement commands on server

* add buttons

* icons

* run formatter

* Message on get replay code failure

* Add new commands to switch statement

* Better failure messages

* Fix permission check query

* Change hash method

* Prevent adding duplicate replays

* Clean up TabReplay ui

* Copy over replay name

* base64 encode the hash

* Shorten hash

* Better failure messages

* change icon back to search icon

* check hash before checking if user already has access

* update share icon

* Update label text
2025-08-24 22:40:44 -04:00
Paul Carroll
5e88a0f0cc Fix multi-word type matching in card filters (#6060)
* Fix multi-word type matching in card filters

Add phrase matching to StringValue before word-based fallback.
Enables searches like t:"time lord" for multi-word creature types.

* Use existing typedef

* Don't inline lambda

* update filter func

* Update card type FilterString unit tests

* refactor string matcher

* update card db test

* fix sets count in test

* Add regex cache in string matcher

* Update cockatrice/src/game/filters/filter_string.cpp

* Revert "Add regex cache in string matcher"

---------

Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>
2025-08-24 12:37:25 -04:00
BruebachL
ba794c2b60 Add a guard in case the printing info is empty for a related card. (#6087)
Took 4 hours 19 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-08-23 23:34:41 -04:00
SlightlyCircuitous
268559d8de Add Debian 13 'Trixie' build (#6068)
* Create Dockerfile

* Add Debian 13 to release template

* Add Debian 13 to desktop-build

* Add ca-certificates package to build

attempting to fix SSL issues
2025-08-23 23:34:07 -04:00
transifex-integration[bot]
473d147333 Translate cockatrice/cockatrice_en@source.ts in it (#6083)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'it'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-08-22 23:26:59 -04:00
RickyRister
d5d9f9bedc Refactor: Remove unused fields in InnerDecklistNode (#6086) 2025-08-22 23:26:16 -04:00
RickyRister
f31d30bf84 [PictureLoader] Remove manual multithreading (#6078) 2025-08-16 20:38:49 -04:00
transifex-integration[bot]
03b216a6b4 Translate cockatrice/cockatrice_en@source.ts in it (#6081)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'it'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-08-16 20:36:12 -04:00
BruebachL
3e6510b935 Buffer decklists to display until player processing is done instead of reordering player creation. (#6080)
Took 28 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-08-16 20:35:57 -04:00
transifex-integration[bot]
e87b35e0bb Updates for project Cockatrice and language fr (#6079)
* Translate oracle/oracle_en@source.ts in fr

100% translated source file: 'oracle/oracle_en@source.ts'
on 'fr'.

* Translate cockatrice/cockatrice_en@source.ts in fr

100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'fr'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-08-16 14:27:37 -04:00
RickyRister
322fdb14de Fix segfault when selecting card in replay (#6077) 2025-08-16 14:27:28 -04:00
BruebachL
09381575a7 Add option to share decklists on load. (#6029)
* Add option to share decklists on load.

Took 1 hour 58 minutes

Took 9 minutes


Took 39 minutes

* Lint.

Took 14 minutes


Took 2 minutes

* Stuffs

Took 39 minutes

Took 4 seconds

Took 43 minutes

* Process local player first.

Took 45 minutes

* Consider if the setting is set on the game info first.

Took 4 minutes

* Save an indent level.

Took 43 seconds

* Don't commit logging config.

Took 3 minutes

* Remove a debug print.

Took 10 seconds


Took 7 seconds

* Add another optional guard.

Took 5 minutes

* Hide the tab bar if only one (own deck) is visible.

Took 9 minutes

* Rename setting label for clarity

Took 2 minutes

* Capitalization.

Took 3 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-08-15 17:31:05 -04:00
RickyRister
881243da6a Refactor TabReplay creation (#6064) 2025-08-15 01:15:02 -04:00
transifex-integration[bot]
851fad3e3f Updates for project Cockatrice and language it (#6065)
* Translate oracle/oracle_en@source.ts in it

100% translated source file: 'oracle/oracle_en@source.ts'
on 'it'.

* Translate cockatrice/cockatrice_en@source.ts in it

100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'it'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-08-15 01:14:05 -04:00
RickyRister
46d65f0b7e Refactor: rename and consolidate getSpectator (#6067) 2025-08-15 01:13:53 -04:00
RickyRister
03bebbe4c2 Rework card menu handling (#6069)
* extract cardMenu from CardItem

* move cardMenu saving to TabGame

* delete TabGame::updateCardMenu

* move checking to updateCardMenu

* unset activeCard when all cards are unselected
2025-08-15 01:13:28 -04:00
RickyRister
1649f30389 [PictureLoader] Use thread pool instead of creating new thread (#6072)
* delete threads

* Run reply processing in thread pool
2025-08-15 01:11:39 -04:00
BruebachL
38f76d449a Fix providerId cards getting removed from deckList by convenience replacement function (#6074)
Took 2 hours 25 minutes

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-08-15 01:11:02 -04:00
BruebachL
f2cbdae829 Allow tokens to consider providerIds. (#6075)
Tokens created through Ctrl + T use the pinned printing, if available.
Tokens created through a related card menu use a token from the same set, if available.

Took 2 hours 25 minutes

Took 10 seconds

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-08-15 01:10:36 -04:00
RickyRister
3a42354efd Refactor: Move files in src/client/game_logic (#6070)
* move abstract_client to src/server

* move key_signals to src/utility
2025-08-07 16:47:48 +02:00
Zach H
fe7853a389 Fix a crash case for aIncrementAllCardCounters access (#6063) 2025-08-02 16:43:24 -04:00
Paul Carroll
06738cae93 Add menu option and hotkey to sort hand (#6057)
* Add sort hand shortcut

* add function to sort hand by type and name

* rig up the sort hand to the player

* fix sorting param

* use getShortcut instead of getSingleShortcut

* use correct method

* change default sorting

---------

Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-08-02 00:40:17 -04:00
Paul Carroll
d6243a2dd2 Add menu option and shortcut to auto increment counters (#6055)
* Add method to increment all counters on cards on table

* add keyboard shortcut

* register action for menu

* register action for menu

* Change menu text

* Move to Counters submenu

* Change function name

* Change menu, update function to handle selected vs non selected cards

* Use getShortcut instead of getSingleShortcut

Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>

---------

Co-authored-by: Paul Carroll <paul.x.carroll@questdiagnostics.com>
Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>
Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-08-02 00:25:36 -04:00
RickyRister
04be0fe634 Refactor: Simplify closeRequest and remove closed signal (#6062)
* Refactor: simplify closeRequest and remove closed signal

* clean up closeRequest usages
2025-08-01 22:45:54 -04:00
RickyRister
fd12a1f6be Fix certain game actions only recognizing first shortcut (#6059)
* doc

* Fix non-counter shortcuts

* Fix counter shortcuts
2025-08-01 22:45:26 -04:00
RickyRister
e10dd4ef42 Refactor: Don't call stop in TabSupervisor dtor (#6061) 2025-08-01 08:53:06 -04:00
RickyRister
62c02e3fce Also clear redirect cache when clearing network cache (#6052) 2025-07-29 09:35:09 -04:00
RickyRister
ae2c55c33b Refactor: use ExactCard to represent specific printings (#6049)
* Create new class

* Update CardInfo and CardDatabase

* Use new class instead of CardInfoPtr

* fix cmake
2025-07-28 21:04:45 -04:00
RickyRister
4a2a646943 Fix server crash from out-of-bounds index when players is empty (#6048) 2025-07-19 00:31:50 -04:00
RickyRister
ae47ee802b Refactor: Add PrintingInfo::getUuid (#6046) 2025-07-17 09:06:34 -04:00
RickyRister
4fd2f1f974 Fix turning cards face-up not having correct printing (#6043) 2025-07-16 13:03:05 +02:00
BruebachL
b9f16e8cce Refactor replay code in TabGame to replayManager (#6026)
* Refactor replay code to replayManager

* Lint.

* Refresh shortcuts.

Took 13 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-07-16 06:33:48 -04:00
RickyRister
70b4843bc4 Refactor: clean up CardDatabase pt2 (#6042)
* findPrintingWithId

* remove a param

* cleanup up usage of getCardInfo
2025-07-16 06:33:38 -04:00
RickyRister
95190c321c Refactor: remove second param from CardZone::getCard (#6041) 2025-07-16 05:54:31 -04:00
RickyRister
a9b3be33e0 Refactor: Represent cardName + providerId with CardRef struct (#6039)
* card_ref.h

* update CardDatabase signatures

* make everything compile

* rename methods

* add docs

* mark stuff const

* set cardRef in CardItem

* cleanup

* fix build failure

* Fix builds on mac

---------

Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2025-07-15 22:14:02 -04:00
BruebachL
e05dad4267 Add the option to load decklists from Archidekt, Deckstats, Moxfield, TappedOut in deck editor and lobby (#6030)
* Add the option to load decklists from Archidekt, Deckstats, Moxfield, TappedOut in deck editor and lobby.

Took 3 hours 34 minutes

Took 9 seconds


Took 12 seconds

* Properly set quantities.

Took 11 minutes

* Warnings.

Took 5 minutes

* Static regexes.

Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>

* Category loggings and better warnings.

Took 18 minutes


Took 42 seconds

* use loadFromStream_Plain instead of manually adding CardNodes to the DeckList.

Took 30 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>
2025-07-14 23:12:25 -04:00
github-actions[bot]
83b90d472f Update translation files (#6037)
Co-authored-by: github-actions <github-actions@github.com>
2025-07-14 23:07:14 -04:00
BruebachL
ee4ff6e732 Allow more naming schemes for custom pictures (#6021)
* Allow more naming schemes for custom pictures.

Order is cardName_providerId, cardName_setName_collectorNumber, setName-collectorNumber-cardName and then just generically cardName, if the user has decided to override every printing. Most-to-least specific.


Took 2 minutes

Took 8 seconds

* Fixups.

Took 2 minutes

* Even more naming schemes.

Took 6 minutes

* Finally yeet the bug warning in PrintingSelector

Took 3 minutes

* Adjust to PrintingInfo change.

Took 5 minutes

* Don't use suffixes.

Took 7 minutes

Took 9 seconds

* Comments.

Took 2 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-07-14 23:07:03 -04:00
RickyRister
2267d38352 [Refactor] Clean up CardDatabase (#6034)
* Inline getCardFromMap

map.value already returns a default-constructed value if the key is not present

* Use for-each instead of iterator

* Add new method

* clean up method order

* fix build failure

* clean up getPreferredPrinting usage

* early returns
2025-07-12 23:29:02 -04:00
transifex-integration[bot]
4fbb47300e Translate cockatrice/cockatrice_en@source.ts in de (#6028)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-07-09 17:55:54 -04:00
BruebachL
836e168a6c Properly and consistently capitalize EDHRec (#6027)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-07-09 17:55:04 -04:00
RickyRister
a9684f67cc Refactor: rename CardInfoPerSet to PrintingInfo (#6024)
* remove unnecessary consts

* removed unused

* rename class

* rename variables and methods

* rename again

* rename variables again

* rename field

* run formatter
2025-07-07 23:41:19 -04:00
RickyRister
686e90d0ed [PictureLoader] Fix status bar not updating (#6023)
* [PictureLoader] Fix status bar not updating

* rename methods
2025-07-05 23:14:46 -04:00
RickyRister
0b9b39fef7 [PictureLoader] Reduce downtime between load attempts (#6020)
* [PictureLoader] Reduce downtime between load attempts

* rename some stuff

* better comments

* Fix segfault from status bar

Pass just the relevant data through the signals to the status bar, instead of passing the entire Work object.
That way the data is detached from the Work object and we won't segfault when Work self-deletes before status bar tries to use that data.

* Rename method
2025-07-05 22:42:54 -04:00
transifex-integration[bot]
67a3b03b07 Translate oracle/oracle_en@source.ts in de (#6022)
100% translated source file: 'oracle/oracle_en@source.ts'
on 'de'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-07-05 11:56:02 -04:00
RickyRister
388db4e995 [PictureLoader] Properly run reply processing on Work's thread (#6016)
* [PictureLoader] Properly run reply processing on Work's thread

* emit cachedImageHit first

* Remove unused fields

* Remove unused fields

* Fix double free requests from cache hit

If we hit a cached url, the request already gets to skip the queue.
By sending another free request once the cached request finishes, we're actually sending two free requests on each cache hit.
2025-07-04 23:01:25 -04:00
RickyRister
a28a1aa601 Fix segfault when filtering card view that have blank cards (#6017) 2025-07-04 10:18:07 -04:00
RickyRister
ed82106359 [PictureLoader] Fix double-queueing bug (#6014) 2025-07-02 23:08:31 -04:00
github-actions[bot]
c57b84cb17 Update translation source strings (#6012)
Co-authored-by: github-actions <github-actions@github.com>
2025-07-01 15:29:57 -04:00
BruebachL
2dfe9fcf45 Add as set instance on subsequent loads as well. (#6013)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-07-01 15:29:48 -04:00
ZeldaZach
51f978ac72 Support GH Token in binary attestation step (pt2) 2025-06-29 23:19:22 -04:00
ZeldaZach
c216677e1e Support GH Token in binary attestation step 2025-06-29 23:09:39 -04:00
ZeldaZach
8a5d275136 Remove Subject Path 2025-06-29 22:55:28 -04:00
Zach H
a36b76ba15 Re-add contents permissino 2025-06-29 22:37:25 -04:00
BruebachL
f3913949b2 Automatic Card Database Updates (#6004)
* Add the option to background the oracle wizard, add an option to automatically launch oracle wizard in background every X days since last launch.

* Mocks and a typo.

* Lint.

* Lint?

* qOverload the spinBox.

* Change to a prompt instead.

* An Label.

* Update window_main.cpp

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-06-29 22:21:52 -04:00
RickyRister
76fdbfaa2f [PictureLoader] Dumb hack to fix segfault (#6010) 2025-06-29 22:21:12 -04:00
RickyRister
6b44b9ae1e Revert changes related to #5999 to unbreak CI (#6011)
* Revert "Attempt to fix Sign MacOS Pt1"

This reverts commit 208f8349a6.

* Revert "fetch logs on error (#6003)"

This reverts commit 32e71b0386.

* Revert "Fix Build Attest pt3"

This reverts commit 1c687e7a45.

* Revert "Fix Build Attest pt2"

This reverts commit 53ed028663.

* Revert "Fix Build Attest"

This reverts commit 2a4ebe1b3e.

* Revert "Add write permissions for `contents` (#6002)"

This reverts commit df863355b7.

* Revert "make script executable (#6000)"

This reverts commit b69091a51a.

* Revert "move signing mac apps to own script (#5999)"

This reverts commit 0fe30ebe49.
2025-06-29 21:49:47 -04:00
RickyRister
8615c4c3b0 [PictureLoader] Refactor PictureLoaderWorkerWork (#6009)
* Extract tryLoadImageFromReply

* Make imageIsBlackListed static

* Make picDownloadFailed private
2025-06-25 09:22:51 -04:00
RickyRister
f976bd3fff Make qtlogging.ini nicer to use (#6008) 2025-06-25 09:21:58 -04:00
RickyRister
db55a2664f Skip cards with empty names when loading xml (#6007) 2025-06-25 09:21:17 -04:00
RickyRister
4f1b4b1283 Log xml parse errors when loading card database (#6006) 2025-06-25 09:20:29 -04:00
ZeldaZach
208f8349a6 Attempt to fix Sign MacOS Pt1 2025-06-23 20:50:22 -04:00
tooomm
32e71b0386 fetch logs on error (#6003) 2025-06-23 19:58:28 -04:00
ZeldaZach
1c687e7a45 Fix Build Attest pt3 2025-06-22 19:08:20 -04:00
ZeldaZach
53ed028663 Fix Build Attest pt2 2025-06-22 19:00:42 -04:00
ZeldaZach
2a4ebe1b3e Fix Build Attest 2025-06-22 18:48:52 -04:00
tooomm
df863355b7 Add write permissions for contents (#6002) 2025-06-22 18:29:43 -04:00
RickyRister
66e44f3448 [PictureLoader] Fix worker leak (#6001) 2025-06-22 18:29:20 -04:00
RickyRister
c1f12f52ae [PictureLoader] Periodically refresh the local images index (#5997) 2025-06-22 18:25:04 -04:00
tooomm
b69091a51a make script executable (#6000) 2025-06-22 17:53:16 -04:00
tooomm
0fe30ebe49 move signing mac apps to own script (#5999) 2025-06-22 16:21:33 -04:00
RickyRister
34f5552c7d [PictureLoader] Remove redundant startNextPicDownload calls; clean up (#5998)
* Add docs

* Remove unused signal

* Remove redundant startNextPicDownload

* explicitly emit signals

* delete reply first if able

* Log download fail at warning
2025-06-22 16:19:20 -04:00
BruebachL
53e27ff4d3 Printing Selector Bulk Editor (#5993)
* Bulk editing dialog.

* Bulk editing dialog functionality.

* Performance fixes, hide sets which can't offer any new cards, better dragging indicators.

* Update count label.

* Add a display for modified cards.

* Include long setName in checkbox label

* Fix drag & drop.

* New layout updating?

* Re-layout, add instruction label.

* Qt version check.

* Add buttons to clear and set all to preferred printing.

* tr UI

* Add the button to the print selector instead.

* Qt5 compatibility stuff.

* Qt5 compatibility stuff again.

* Toggled works, I guess.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-06-21 21:15:48 -04:00
tooomm
f4569c513f CI: Move and clarify macOS signing certificate step (#5996)
* Update compile.sh

* Update desktop-build.yml
2025-06-21 21:14:51 -04:00
RickyRister
90ce5f2c57 [GDE] Fix add card always grouping by type (#5995) 2025-06-21 21:12:24 -04:00
RickyRister
6f3a07b756 [PictureLoader] Fix freezes from local image search (#5994)
* [PictureLoader] Fix freezes/crashes from parallel folder search

* fix build failure
2025-06-21 21:10:29 -04:00
RickyRister
d42bfa88e1 Fix QString missing arg warning in logMoveCard (#5992) 2025-06-14 11:11:00 -04:00
RickyRister
61a6b32137 Game filter for games created by buddy (#5991) 2025-06-14 11:10:24 -04:00
RickyRister
6cb4e203f1 Move "show status bar" action under Help menu (#5989) 2025-06-14 11:08:39 -04:00
tooomm
2d27a721f8 Fix workflow permissions for attestations (#5987) 2025-06-13 19:11:33 -04:00
BruebachL
867a8e855b Sort after addition again. (#5988)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-06-13 19:11:17 -04:00
BruebachL
d5dc70ccee More granular decklist signals (#5981)
* Performance stuffs.

* Actually make widgets track their indices.

* Functional stuff.

* More display stuff.

* Determine where we will insert the card before actually inserting it in the model.

* Allow overlap layouts to insert widgets at specific positions.

* Modified signals.

* Raise trailing widgets on overlap layout widget insertion.

* Nix the logging config changes.

* Lint.

* Address comments.

* Address comments.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-06-13 13:21:34 -04:00
BruebachL
18d9c1d609 Default show status bar to false. (#5986)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-06-13 13:21:09 -04:00
BruebachL
c388cee1fe Add a new dialog that allows editing the default suggested tags. (#5979)
* Add a new dialog that allows editing the default suggested tags.

* Lint.

* Actually hand linting, lol.

* Fix Build

* Add dialog.

* Use show() instead of exec(), properly size hint list item widgets.

* Fix... something to do with the build?

* Cast to abstract tab deck editor instead of regular.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2025-06-13 09:16:57 -04:00
RickyRister
da2488f7d8 Add option to hide status bar (#5983)
* reorganize actions

* add setting to settingsCache

* use setting

* add shortcut

* fix typo
2025-06-13 08:55:04 -04:00
BruebachL
f059643187 [Picture Loader] Consider local images, remove some unused variables. (#5985)
* Consider local images, remove some unused variables.

* Move checking for local card images outside of card download loop, add NOT found debug line.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-06-13 08:54:43 -04:00
RickyRister
30730fe632 Fix crash due to null mCardCounters (#5984) 2025-06-13 08:48:39 -04:00
RickyRister
39df168891 Fix picDownloadFinished not being called on failure (#5982) 2025-06-13 08:46:58 -04:00
Basile Clement
33946e61bb feat: Configurable colors for card counter (#5882)
* feat: Configurable colors for card counter

This patch adds support for:

 - User-defined colors for card counters;
 - 3 additional types of card counters.

The colors used for counters is stored locally and not shared with other
users. This is intentional as the feature is likely to be used for
improved accessibility.

In order to preserve backwards-compatibility, and because I don't have a
better idea, counters keep their existing color-based names (Red, Green,
Yellow) in menus and in the message log. For consistency, the new
counters also get assigned color-based names (Cyan, Purple, Magenta).

This choice is a compromise, as allowing user-defined names for counters
raises many additional (UI/UX) questions that I don't know how to
answer. A good long-term solution would be to include counter names as
part of a game definition system and hence would be in scope for #1740.

The choice of adding 3 additional types of counters and the Cyan, Purple
and Magenta names are not random. The existing code for determining
counter colors goes: Red, Green, Yellow, Cyan, Purple, Magenta, Black
(unreadable) and thus 6 is the maximum number of counters that existing
versions of Cockatrice are able to support. This way, released clients
get a degraded experience (cannot interact with the new counters,
messages in the server log say "Player X places 1 on Card (now 1)"
without specifying 1 of what), but do see the counters properly.

Fixes #2020

* Do not use %n

* Use SettingsManager

* Use qSin instead of sin

Fix build failures with old GCC.

* Use letters for card counter names

* Place card counter actions in separate menu

* Remove copy-paste error

* include QtMath

* Do not color whole settings page

* derp

---------

Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-06-12 22:12:46 -04:00
SlightlyCircuitous
0b34d20716 Add "landscapeOrientation" as a valid element (#5966) 2025-06-12 21:53:07 -04:00
RickyRister
8d0b36d2d4 [VDS] add deck search query options for name, filename, and path (#5975)
* implement search expressions

* update syntax help
2025-06-12 21:16:35 -04:00
RickyRister
7e08f7df67 [VDS] Remove searchFolderName setting (#5970)
* [VDS] Remove searchFolderName setting

* rename property in ExtraDeckSearchInfo
2025-06-12 20:45:01 -04:00
BruebachL
a688a5fe72 [VDD] Filter performance (#5974)
* Sort saved filters by name.

* Optimize performance, allow loading name filters from clipboard.

* Fix include.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-06-12 19:47:03 -04:00
BruebachL
fe57efb1a8 Parallel picture loader (#5977)
* Parallelize picture loader.

* Queue requests instead.

* Include a status bar for the picture loader.

* Save redirect cache on destruction.

* Address comments.

* Let's not overwrite an ambigious variable name.

* Lint.

* Oracle needs the status bar too.

* We actually get a free request if we hit a cached image.

* Fix cmake list.

* toString() the url.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-06-12 19:44:38 -04:00
BruebachL
9af3fbc35f Propagate display type from visual deck editor to card group display widget correctly on initialization. (#5978)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-06-12 19:37:57 -04:00
RickyRister
7495d2dc65 [VDS] Use display name for generic search expression (#5976) 2025-06-12 19:32:24 -04:00
RickyRister
456da93465 Support regex in card search (#5971) 2025-06-12 19:30:43 -04:00
justross
e7a6126fbd Web client: Updated packages with vulnerabilities using npm audit fix (#5955) 2025-06-08 22:29:57 -04:00
tooomm
aa41eb5da4 Add build attestations for releases (#5967) 2025-06-08 22:29:49 -04:00
RickyRister
87767be4a6 Put mutex around returning cards on concede (#5964) 2025-06-08 22:28:59 -04:00
tooomm
1e0a356cd2 fix transifex link (#5969) 2025-06-09 02:05:24 +02:00
tooomm
1b40c9e692 CI: Some cleanup (#5959)
* Update desktop-build.yml

* Update desktop-build.yml

* use CMAKE_GENERATOR in docker.sh

* revert to mtime
2025-06-06 18:42:55 -04:00
tooomm
2cc7565841 Only sign & notarize on master or tags (#5958) 2025-06-06 18:41:31 -04:00
Bruno Alexandre Rosa
cee67f4301 ci: use ccache on macos (#5952) 2025-05-24 15:24:15 +02:00
Bruno Alexandre Rosa
452bf61ef9 FIX: re-add CMAKE_GENERATOR_PLATFORM: 'x64' (#5954) 2025-05-22 19:01:53 -04:00
RickyRister
50d3dfb98b Load deck from clipboard in Game Lobby (#5950) 2025-05-20 10:36:17 -04:00
RickyRister
d729df5cba Add missing shortcuts for Game Lobby buttons (#5951) 2025-05-19 08:09:03 -04:00
RickyRister
a5638ccc3b Parent the "new sets found" dialog (#5948) 2025-05-18 22:06:32 -04:00
RickyRister
46643065ef Refactor banner card ComboBox (#5947) 2025-05-18 22:06:18 -04:00
RickyRister
b270562a44 Fix wrong Message Dock widget order from #5942 (#5946)
* fix

* refactor
2025-05-18 22:05:27 -04:00
BruebachL
cfbe59868b [VDS] Add prompt before overwriting existing files when converting to .cod (#5926)
* Add prompt before overwriting existing files.

* Lint.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-17 22:25:13 -04:00
tooomm
207211facc CI: Tweak ccache for Linux builds (#5938)
* rework ccache

* use branch name
2025-05-17 22:25:01 -04:00
Bruno Alexandre Rosa
269523a034 ci: use Ninja on Linux and macOS builds (#5939)
* ci: use Ninja on linux and macos

* ci: simplify parallelism
2025-05-17 22:24:14 -04:00
RickyRister
1eee314d17 [VDS] Add ability to search by deck contents (#5943)
* [VDS] Add ability to search by deck contents

* add deck search syntax help

* fix build failure
2025-05-17 22:23:54 -04:00
RickyRister
8cc64bf44e Refactor TabGame: inline some QLayout and QWidget class fields (#5942)
* inline layouts

* inline widgets
2025-05-17 22:23:30 -04:00
RickyRister
5dd027ad63 [VDS] Deselect tag if clicked while already selected (#5944) 2025-05-16 14:39:33 -04:00
RickyRister
d51620640b [VDS] Add setting to show deck filepath in tooltip (#5899)
* [VDS] Show deck filepath in tooltip

* Make tooltip type into a setting

* Fix build failure
2025-05-12 17:39:58 -04:00
BruebachL
17c767fa42 [GDE] Add a group criteria to the deck list model (#5931)
* Add a group criteria to the deck list model and a combo box to the deck dock widget to change it.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-12 17:36:55 -04:00
tooomm
b2749a0c4e Add debug log (#5937) 2025-05-11 17:40:04 -04:00
tooomm
3b0c7a3a30 Re-add vcpkg binary caching (#5933) 2025-05-11 17:39:45 -04:00
tooomm
797681883b CI: Remove Ubuntu 20.04 (EOL May 31st) (#5849)
* ubuntu 20.04 eol

* Update release_template.md

* [skip ci] Delete .ci/Ubuntu20.04 directory
2025-05-11 17:38:13 -04:00
ebbit1q
48b6e1590c increase cache size for ccache on linux ci (#5935) 2025-05-11 11:48:58 +02:00
RickyRister
b423edf2b5 Fix segfault when multiple cards are dragged from view zone (#5934) 2025-05-11 01:44:32 +02:00
BruebachL
9cf979d154 [GDE/VDE] More granular modification signals. (#5927)
* More granular modification signals.

* Bruh.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-08 21:32:00 -04:00
RickyRister
033c8b269d [VDS] Refactor: move quick settings to separate class (#5905) 2025-05-06 23:00:11 -04:00
RickyRister
c4e42b94f9 Refactor CardSizeWidget: don't update setting directly (#5903) 2025-05-06 21:31:01 -04:00
tooomm
5b9cb4fc8d Small changes related to docker image build+upload (#5907)
* ci label

* naming

* downloads

* run

* fix toc
2025-05-06 21:29:09 -04:00
BruebachL
99d9ce10c3 [GDE, VDS & VDE] Tooltips and labels (#5916)
* Add correct inversion for isHidden() on bannerCardLabel.

* Add tooltips to VDS buttons.

* Add tooltip to GDE button.

* Add tooltips to visual deck editor buttons.

* Add tooltips to visual database display buttons.

* Lint.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-06 21:28:50 -04:00
BruebachL
34400c7f60 [VDE] Sample Hand Improvements (#5917)
* Actually call retranslateUi, add spinBox to change sample hand size, add card size slider.

* Lint.

* Fix include.

* Fix include again.

* Fix overloads.

* Update visual_deck_editor_sample_hand_widget.cpp

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-05-06 21:28:03 -04:00
transifex-integration[bot]
05914e38f0 Translate oracle/oracle_en@source.ts in pt_BR (#5918)
100% translated source file: 'oracle/oracle_en@source.ts'
on 'pt_BR'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-05-06 21:26:27 -04:00
BruebachL
bddb54ef4c [VDE] Deck analytics visibility (#5919)
* Add scrollArea, I guess.

* Set mana curve bar color to grey for visibility.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-06 21:24:24 -04:00
BruebachL
46e146b34a [VDS] Allow tags to toggle to a NOT state to hide non-matching decks (#5920)
* Allow excluding tags.

* Lint.

* My linter is broken, don't ask.

* Zzz.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-06 21:23:49 -04:00
BruebachL
f16ba6861b Forward scroll event to scrollable parents if possible in NoScrollFilter. (#5921)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-06 21:22:37 -04:00
BruebachL
fb6af544e2 Set Banner Card again when restoring index on deckList data changes. (#5922)
* Set Banner Card again when restoring index on deckList data changes.

* Lint.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-06 21:20:38 -04:00
Bruno Alexandre Rosa
4c3cfc8c2d fix: fix qt5 builds on macos 15 (#5923)
Although this config is not built on CI, while trying to compile locally, the build failed due to warnings and -Werror.
Some qt functions were actually deprecated (but not removed) before version 6.0.0 and clang (righfully) complains about comparison between different types of enums.
2025-05-06 21:18:59 -04:00
Basile Clement
286a7494d3 client: Support arbitrary game zones (#5877)
* Remove `isView` flag from CardZone

This flag is used for two purposes:

 1. It is used as a check for casting to a zone to a `ZoneViewZone`;

 2. Non-view zones are added to the player's zones on construction

This patch removes the `isView` flag and instead:

 1. We directly cast zones to `ZoneViewZone` using a dynamic (qobject)
    cast and use the result of the cast instead of the `isView` flag to
    detect if we are a view zone or not;

 2. The player records its own zones when they are created, simplifying
    control flow.

* Review

* client: Support arbitrary game zones

Currently, the client ignores cards in unknown zones, as there is an
implicit assumption that the set of zones known by the server and the
client are the same.

This patch makes it so that the client accept "custom zones" from the
server (zones outside the builtin deck, graveyard, exile, sideboard,
table, stack and hand zones) using the information from the
ServerInfo_CardZone. Moving cards from/into these zones happens
through a "View custom zone" action in the Game > Player menu and
properly appears in the chat.

Note that this patch intentionally does not introduce any support for
having the server actually create such zones. Instead, this patch aims
to improve backwards compatibility for when we do get to adding this
capability in the future, by making sure that current clients will be
able to interact with future new zones (even if suboptimally).
2025-05-06 21:18:08 -04:00
RickyRister
a07c1badd8 Add "copy to clipboard" button to Debug Log window (#5913) 2025-05-05 11:45:22 -04:00
RickyRister
29d93fb9c1 Delete CardDragItem when referenced CardItem is destroyed (#5911) 2025-05-05 09:50:34 -04:00
RickyRister
4a54412d47 Pass log messages by const ref (#5914)
* Pass log messages by const ref

* Rename method
2025-05-05 09:46:29 -04:00
RickyRister
bd8306bd33 Strip color escape codes in Debug Log window (#5915) 2025-05-05 09:38:46 -04:00
RickyRister
69107f79e3 Add setting to auto focus search bar when opening card view window (#5906)
* add new setting

* implement thing

* Rename setting

* fix build failure
2025-05-04 20:09:11 -04:00
Bruno Alexandre Rosa
2687a34019 ci: temporarily remove run-vcpkg step (#5902)
There is an issue with run-vcpkg GHA not caching properly. This ends up wasting 20 minutes of redundant vcpkg depency compilation.
See https://github.com/lukka/run-vcpkg/issues/243
2025-05-04 15:02:11 +02:00
BruebachL
9ae6357c34 Properly manage hover-zoom child widget in CardInfoPictureWidget destructor. (#5900)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-03 20:03:53 -04:00
Sebastian Di Luzio
baa7e25e30 feat: build and release docker images using github actions and container registry (#5807)
* feat: build and release docker images using github cicd

* fix: attempt to publish to specific image name

* fix: typo in pipeline step

* typo

* typo

* limit to certain paths for PRs & naming

* ci: configure image title and url

* docker: include only necessary files and directories

this should make caching more powerful

* docker: reorder COPY with best guess of what changes least

* build(docker): remove seemingly unnecessary files

* fix: clean up docker metadata

remove annotations, it seems they're applied from the labels already, add description

* fix(ci): add back docker image annotations

* Update desktop-build.yml

* Update desktop-lint.yml

* Update desktop-build.yml

* Update docker-release.yml

* fix: remove run on master and add affected files to PR trigger

* metadata

* ci: run pipeline on main

this will ensure the container can always build and keep caches ready for release. push should only happen on tag triggers

It also removes some files from the PR trigger that should never break the build, and would just invalidate cache.

* Update docker-release.yml

---------

Co-authored-by: tooomm <tooomm@users.noreply.github.com>
2025-05-02 18:10:09 -04:00
BruebachL
700feb68af Don't require .svg for mana symbols. (#5897)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-05-02 14:34:41 -04:00
RickyRister
57c6f2716f Add setting for which deck editor tab to open deck in (#5895)
* Create new setting

* Update settings dlg

* implement functionality

* Make setting into an enum
2025-05-02 13:00:32 -04:00
Basile Clement
24e27d3c31 fix: Prevent dragged cards getting stuck (#5896)
* fix: Prevent dragged cards getting stuck

Update the position of the card even if it is not above any zone.

* Also update the currentZone
2025-05-02 12:58:21 -04:00
SlightlyCircuitous
77d13090b5 Remove Fedora 40 build and Add Fedora 42 build (#5893)
* Create Fedora 42 Dockerfile

* Delete .ci/Fedora40 directory

* Update Fedora releases

* Update Fedora builds
2025-04-29 22:18:18 -04:00
tooomm
fc40fea97a Fix install Qt step (#5883) 2025-04-28 00:31:00 -04:00
RickyRister
bb8213deb5 Support creating face-down tokens (#5800)
* add new fields to proto

* update token dlg

* send facedown in command

* update server to get it to work

* disable certain edits when face down

* update client event processing

* log face-down token creation

* Don't support colors on face-down tokens

The other client doesn't know about the color, so it causes a desync

* Update wording

Co-authored-by: Basile Clement <Elarnon@users.noreply.github.com>

* Allow annotations on face-down tokens

---------

Co-authored-by: Basile Clement <Elarnon@users.noreply.github.com>
2025-04-28 00:30:23 -04:00
RickyRister
e3465be8c1 Allow cards to transform directly on stack (#5888) 2025-04-28 00:27:22 -04:00
RickyRister
42ce9f4d89 Allow tokens on the stack (#5886) 2025-04-26 19:59:59 -04:00
Basile Clement
1409dcc2e8 Remove isView flag from CardZone (#5728)
* Remove `isView` flag from CardZone

This flag is used for two purposes:

 1. It is used as a check for casting to a zone to a `ZoneViewZone`;

 2. Non-view zones are added to the player's zones on construction

This patch removes the `isView` flag and instead:

 1. We directly cast zones to `ZoneViewZone` using a dynamic (qobject)
    cast and use the result of the cast instead of the `isView` flag to
    detect if we are a view zone or not;

 2. The player records its own zones when they are created, simplifying
    control flow.

* Review
2025-04-26 19:55:54 -04:00
dependabot[bot]
6fd1e9a4c4 Bump serialize-javascript from 6.0.0 to 6.0.2 in /webclient (#5878)
Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) from 6.0.0 to 6.0.2.
- [Release notes](https://github.com/yahoo/serialize-javascript/releases)
- [Commits](https://github.com/yahoo/serialize-javascript/compare/v6.0.0...v6.0.2)

---
updated-dependencies:
- dependency-name: serialize-javascript
  dependency-version: 6.0.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-24 22:42:18 -04:00
transifex-integration[bot]
95a86703b3 Updates for project Cockatrice and language it (#5876)
* Translate cockatrice/cockatrice_en@source.ts in it

100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'it'.

* Translate cockatrice/cockatrice_en@source.ts in it

100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'it'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-04-24 22:39:35 -04:00
RickyRister
bcaa6c6b8a Refactor files in common to new Qt Slot/Signal syntax (#5872) 2025-04-21 16:30:40 -04:00
RickyRister
ffe02e59c7 Refactor: clean up OracleImporter (#5871)
* remove unused dataDir variable

* inline setsMap

* join declaration and assignment

* make the protected methods static

* make getSetPriority static

* inline mainCardTypes list and make the method static

* pass by const ref when able

* rename param to match
2025-04-21 16:29:42 -04:00
RickyRister
f7152befec Refactor: clean up MessageLogWidget (#5870)
* use constants instead of static methods

* make static methods static

* remove unused variables
2025-04-21 16:28:45 -04:00
RickyRister
ca73033aea Refactor files in oracle to new Qt Slot/Signal syntax (#5869)
* Refactor files in oracle to new Qt Slot/Signal syntax

* fix build failure
2025-04-20 23:53:37 -04:00
RickyRister
a1499854f9 Make OracleImporter not extend CardDatabase (#5868)
* Move TOKENS_SETNAME to CardSet

* make OracleImporter no longer extend CardDatabase
2025-04-21 01:48:13 +00:00
BruebachL
873e0d346e Make a setting for filtering to the most recent sets. (#5865)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-20 14:39:20 +00:00
RickyRister
44ac782978 Move card_item and related to src/game/board (#5867)
* move files

* update includes

* update cmake
2025-04-20 14:37:52 +00:00
ebbit1q
6b39f6f6fa fix indenting in test cards.xml (#5866) 2025-04-20 14:36:38 +00:00
BruebachL
dcbb8bab75 [VDD] Defer filter tree assignment (#5864)
* RetranslateUi instead of updating filter mode.

* Defer setting the filter tree on the database display model until AFTER all the filter widgets are initialized.

* Update visual_database_display_set_filter_widget.cpp

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-04-20 04:17:25 +00:00
BruebachL
acd9a163f0 [VDD] Saner and more performant color filtering, allow deleting specific filter from filterTree (#5863)
* Saner and more performant color filtering.

* Update visual_database_display_color_filter_widget.cpp

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-04-20 04:15:28 +00:00
BruebachL
795149e776 Don't force size unnecessarily, correctly parent scrollArea. (#5862)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-20 04:12:46 +00:00
BruebachL
55bff6b52f Make sample hand flow widget a scrollbar one until we figure out why non-scrollbar ones don't resize correctly. (#5861)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-20 04:12:30 +00:00
BruebachL
82be0a8898 Propagate display updates to found widgets. (#5860)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-20 04:12:16 +00:00
BruebachL
f98aad57d3 Add filter connection after toggling buttons and emit on end. (#5858)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-20 04:11:52 +00:00
BruebachL
81a911dc11 Add the option to hide banner card and tags in deck editor. (#5857)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-20 04:11:32 +00:00
RickyRister
39f87a5e78 VDS: Optimize refreshTags in VisualDeckStorageTagFilterWidget (#5856)
* make methods const

* remove redundant calls to gatherAllTags

* make methods private

* use QSet instead of QStringList
2025-04-20 04:10:32 +00:00
BruebachL
aff4ffdf83 [GDE] Disable add tag button until text is entered. (#5855)
* Disable add tag button until text is entered.

* Reduce capture scope.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-20 04:09:25 +00:00
lilyhuang-github
574ea01e08 update handling of keywords: AND, OR, NOT in card search (#5788)
* update hnadling of keywords: AND, OR, NOT in card search

* added and

* update test

* update test

* update OR to not be [oO][rR] and just look for OR

* keyword testing

* adjusted new test

* implement test case for cards with keyword in name

* implement test case to cards with keyword in name

* format

* update test case

* change test cas

* update truth test case

* changed test card search from real cards to fake and added cards

* Update tests/carddatabase/data/cards.xml

Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>

* Update tests/carddatabase/filter_string_test.cpp

Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>

* Update tests/carddatabase/filter_string_test.cpp

Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>

* update formatting

* update cardatabase_test to include +2 cards

* update test case +1 set + 1 type

---------

Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>
2025-04-20 04:08:00 +00:00
RickyRister
26dcb015ce Refactor function structs into lambdas (#5675)
* change signature to use lambda

* reuse comparator

* inline structs in forEachCard

* inline structs

* Refactor exportDeckToDecklist

* fix unit test
2025-04-20 04:07:22 +00:00
BruebachL
1d259a86c1 Don't add duplicate CardInfos to set. (#5852)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-18 19:27:50 -04:00
BruebachL
0c02d15e0d Allow empty collectorNumber. (#5853)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-18 19:26:17 -04:00
BruebachL
1e01c684c4 Display cards as set variants if only a single set is selected. (#5854)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-18 19:25:39 -04:00
BruebachL
3b1d6e394d [EDHRec] Display name above card, add bars for inclusion and synergy instead of coloring the whole label, card size slider (#5851)
* Display name above card, add bars for inclusion and synergy instead of coloring the whole label.

* Re-add commander label.

* Add a card size slider.

* Lint.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-18 22:28:44 +00:00
BruebachL
2fe639676b VDS performance fixes (#5848)
* Block updates, don't validate cardInfo and use ItemModel instead of looped addItem.

* Change to QVariant map directly.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-18 22:15:33 +00:00
tooomm
a35707ae18 Overhaul README (#5806)
* Update README.md

* Update README.md
2025-04-18 09:27:32 -04:00
tooomm
b1cf8ff0bb Update issue templates (#5824) 2025-04-18 09:26:23 -04:00
BruebachL
adaa31b34d Only emit cardClicked if it wasn't a right click. (#5838)
* Only emit cardClicked if it wasn't a right click.

* Oh.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-18 03:32:16 +00:00
BruebachL
00095cb71c Delete later where possible. (#5842)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-18 03:32:01 +00:00
BruebachL
8af1f2b6d9 Implement a little "raise on enter" animation for deck preview widgets. (#5844)
* Implement a little "raise on enter" animation for deck preview widgets.

* Why does the linter need to be run twice?

* Fix build.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-18 03:31:47 +00:00
RickyRister
2dc1b875d2 Refactor files in src/dialogs to new Qt Slot/Signal syntax (#5846)
* Refactor to use new signal/slot syntax in src/dialogs

* add todo comment

* fix build failure

* fix build failure
2025-04-18 03:30:26 +00:00
BruebachL
653362567b Refactor Tab EDHRec into folders, add navigation for budget and GC, add card prices (#5845)
* Refactor things into more sensible folders.

* Add navigation widget for budget and game changers.

* Lint.

* Add a card price display widget.

* Qt version check.

* Lint some thangs.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-18 03:28:04 +00:00
BruebachL
ca538399f6 Improved EDHrec tab (#5840) 2025-04-17 10:10:38 -04:00
RickyRister
36f9f65798 Fix intermittent segfault in VDS sort (#5843) 2025-04-17 10:10:08 -04:00
RickyRister
2189fc0a96 Include card_info.h over card_database.h if able (#5841)
* Move a typedef to card_info.h

* Include card_info.h over card_database.h if able
2025-04-17 00:38:57 -04:00
BruebachL
854208ea0a Implement deck analytics widgets. (#5837)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-16 14:23:13 +00:00
BruebachL
67db245aea Add a button to quickly clear all filters, correctly emit signals in filter tree when clearing. (#5835)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-16 12:32:57 +00:00
BruebachL
42c56898d5 Visual Deck Editor Base (#5834)
* Visual Deck Editor.

* Lint.

* Address comments.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-16 12:02:53 +00:00
BruebachL
a55a287a9d Pull the subfilters out. (#5836)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-15 22:16:19 +00:00
RickyRister
b4024ee552 Refactor DeckViewContainer (#5830) 2025-04-15 22:10:24 +00:00
RickyRister
181bef0057 Use the common search syntax window method in visual database display (#5829) 2025-04-15 22:09:36 +00:00
github-actions[bot]
e9d05e6271 Update translation files (#5828)
Co-authored-by: github-actions <github-actions@github.com>
2025-04-15 22:08:52 +00:00
RickyRister
15415afa9a Refactor files in src/server to new Qt Slot/Signal syntax (#5831)
* Refactor files in src/server to new Qt Slot/Signal syntax

* fix deprecation warning
2025-04-15 22:08:02 +00:00
RickyRister
728c87589f Refactor files in src/client/ui to new Qt Slot/Signal syntax (#5832) 2025-04-15 22:06:56 +00:00
RickyRister
686717e544 Refactor files in src/client/tabs to new Qt Slot/Signal syntax (#5833)
* Refactor files in src/client/tabs to new Qt Slot/Signal syntax

* Refactor DeckEditorMenu to use new signal/slot syntax

Add DeckEditorMenu as friend class to AbstractTabDeckEditor since the slots are protected

* fix build failure
2025-04-15 22:05:52 +00:00
BruebachL
c4d0921a15 Visual Database Display Tab. (#5822)
* Visual Database Display Tab.

* Address comments.

* Readd dropped method.

* Update filterTree properly in case the filter is empty after modification.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-15 01:25:49 +00:00
RickyRister
ae90b6c93f Add logging to LocalClient (#5827) 2025-04-15 01:25:17 +00:00
transifex-integration[bot]
ac1ae4fed5 Translate oracle/oracle_en@source.ts in it (#5826)
100% translated source file: 'oracle/oracle_en@source.ts'
on 'it'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-04-14 05:32:55 +00:00
transifex-integration[bot]
a1f2617931 Translate oracle/oracle_en@source.ts in de (#5825)
100% translated source file: 'oracle/oracle_en@source.ts'
on 'de'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-04-13 04:16:33 +02:00
ebbit1q
300a37a199 change settings entry of the cod conversion prompt to a combobox (#5801)
* change settings entry of the cod conversion prompt to a combobox

replace the two checkboxes of which one state is ignored if one is
checked with a three state combobox for better user experience

* Update dlg_settings.cpp

---------

Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-04-11 23:12:34 -04:00
ebbit1q
351c77182c put multiple printings of the same dual face/split cards in the xml (#5823) 2025-04-11 23:02:48 -04:00
Basile Clement
b214933da9 fix: Disable HTTP compression when downloading pictures (#5793)
This causes Qt to leak file descriptors and causes the "Too many open
file descriptors" error that we sporadically see, see
https://bugreports.qt.io/browse/QTBUG-135641
2025-04-11 23:01:35 -04:00
ebbit1q
9463390e80 fix client crash when server goes down during registration (#5787) 2025-04-11 23:01:14 -04:00
RickyRister
3b758962e4 Add search filter to card view window (#5791)
* refactor out search syntax help window

* add search bar to ZoneViewWidget

* implement filter logic
2025-04-11 23:00:46 -04:00
RickyRister
ad06814ac7 Fix game phases not being translated in game log (#5798) 2025-04-11 22:58:23 -04:00
BruebachL
13d18986b2 Set fixed width instead of maximum width for symbols. (#5821)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-09 22:38:07 -04:00
BruebachL
6171658c0c Add main and sub type as filter options, add helper functions to remove or get specific and all filters. (#5820)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-09 22:37:52 -04:00
BruebachL
9b5f5595b0 Add modelDirty signal, add helper functions to gather all main and sub card types. (#5819)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-09 22:21:02 -04:00
RickyRister
676ea0d5a7 Sort cockatrice sources alphabetically (#5818) 2025-04-09 22:20:55 -04:00
BruebachL
80b6d6a31f Properly calculate a lot of things related to these layouts. (#5817)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-09 12:09:04 -04:00
BruebachL
6661a5d946 Fix some display issues with settings button widget. (#5816)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-09 12:08:59 -04:00
BruebachL
53e9a91dc6 Emit more signals when data is changed and add utility functions to interact with a decklist in the context of cardinfoptrs. (#5815)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-09 12:08:54 -04:00
RickyRister
56bbd8a172 Refactor: move last token info into struct (#5808)
* add override

* refactor token info into struct

* correct default destroy value
2025-04-09 11:26:14 -04:00
BruebachL
0bd53d6dc7 Try to find the card again without providerId when searching fails during swap card. (#5814)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-09 11:19:21 -04:00
BruebachL
61cb3d1d7c Remove unnecessary parent argument from deck_editor_menu (#5813)
* Remove unnecessary parent argument.

* Correctly invoke new instance now.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-09 11:16:56 -04:00
BruebachL
e808d030db Correctly size hint card_info_picture_widget, adjust scaleFactor default and correctly parent hover-to-zoom scaled picture. (#5812)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-09 11:16:34 -04:00
RickyRister
4a68d9d3ea Use QMessageBox::question for force start confirmation (#5811) 2025-04-08 10:24:05 +02:00
BruebachL
730305f4d2 Revert source file globbing (#5799)
* Revert "Add CONFIGURE_DEPENDS to the cmake (#5739)"

This reverts commit 57b9f0e54c.

* Revert "Automatically find all files for cockatrice_SOURCES (#5716)"

This reverts commit 4a0e0ed954.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-04-07 19:32:57 +00:00
RickyRister
d17523ff17 Add confirmation dialog for force start (#5797) 2025-04-06 12:39:08 +02:00
RickyRister
195116d1de Bump to 2.11.0 for beta releases (#5796) 2025-04-06 12:27:11 +02:00
transifex-integration[bot]
92d7828a77 Translate webclient/src/i18n-default.json in it (#5790)
100% translated source file: 'webclient/src/i18n-default.json'
on 'it'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-04-05 13:31:46 +02:00
RickyRister
2a3b9a9a5e Fix QImage::mirrored deprecation warning (#5792) 2025-04-05 12:21:11 +02:00
transifex-integration[bot]
0e7d7ffcb2 Translate oracle/oracle_en@source.ts in it (#5786)
100% translated source file: 'oracle/oracle_en@source.ts'
on 'it'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-04-04 03:40:14 +00:00
RickyRister
b1fca404b7 Bump to 2.10.2 for hotfix release (#5785) 2025-04-03 00:24:11 -04:00
HypersonicWalrus
b6e6328e6a Modified setup_addfirstadmin script to bring it up to date to current cockatrice_users table (#5784)
Co-authored-by: Ben Boelens <bboelens@pop-os.tailc0350.ts.net>
2025-04-03 00:18:31 -04:00
tooomm
ecf0327378 Improve list of release binaries (#5783) 2025-04-03 00:17:44 -04:00
github-actions[bot]
787c551f5f Update translation source strings (#5781)
Co-authored-by: github-actions <github-actions@github.com>
2025-04-03 00:17:25 -04:00
RickyRister
d662152088 Change default log level to info (#5779)
* update qtlogging.ini

* bump some qCDebug to qCInfo and qCWarning
2025-04-03 00:17:10 -04:00
Basile Clement
2fcdb52157 fix: Use isRebalanced to detect Arena cards (#5778)
* fix: Use isRebalanced to detect Arena cards

In #5759 we introduced a setting (off by default) to disable the use of
Arena cards. This was done by checking the `isOnlineOnly` property of
the card, which accidentally also disabled online *printings* of cards
that otherwise exist in paper (e.g. Vintage Masters).

This PR does the same thing but uses the `isRebalanced` property
instead, which is `true` for Arena cards only and should have been used
from the start. This setting does not impact online-only printings such
as Vintage Masters. The settings is still on by default.

* Update setting to mention Alchemy rather than Arena
2025-04-03 00:16:38 -04:00
ZeldaZach
70f2a32fad Bump to 2.11.0 for beta releases 2025-03-27 21:34:03 -04:00
github-actions[bot]
37356317a4 Update translation files (#5775)
Co-authored-by: github-actions <github-actions@github.com>
2025-03-27 21:31:05 -04:00
RickyRister
08f3a56285 Fix crash when right click floating card info window (#5773) 2025-03-27 00:54:34 +00:00
RickyRister
5af71d1c2e Hardcode default log level for FlowWidget/FlowLayout (#5769) 2025-03-26 01:23:23 +00:00
Basile Clement
1ada5ea424 fix: Always prefer local cards if available (#5762)
* Try to better reproduce pre-provider ID behavior

If "override all card art with personal preference" setting is set, look
for custom art for all sets instead of just the most preferred set.

* Warning when using both custom art and the printing selector

* QDirIterator::nextFileInfo is Qt 6.3+

* Translation
2025-03-26 01:23:09 +00:00
transifex-integration[bot]
91ee6097d2 Translate oracle/oracle_en@source.ts in it (#5770)
100% translated source file: 'oracle/oracle_en@source.ts'
on 'it'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-03-24 22:11:47 +00:00
Zach H
a4b0cddcf8 Revert "Disable CardMenu iff no items selected (#5376)" (#5768)
This reverts commit b4036c8671.
2025-03-23 19:04:24 -04:00
RickyRister
9bc6ae1567 Fix delete action in filters not working (#5765)
* Fix delete action in filters not working

* move filterRemove under slots
2025-03-23 12:03:56 -04:00
Basile Clement
c71685b261 Add option to disable card rounding (#5760)
* Add option to disable card rounding

* Effing mocks

* format

* Get rid of cardCornerRadius property
2025-03-22 01:07:52 -04:00
Basile Clement
0ae7d01234 Hide arena only cards (#5759)
* Add settings (default: true) to ignore online-only cards

* Use QAbstractButton::toggled

Also, fix dbconverter build

* Mocks mocks mocks

* Update dlg_manage_sets.cpp

* translations

* Update dlg_manage_sets.cpp

---------

Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-03-22 01:07:42 -04:00
RickyRister
345606846f Enable shortcuts for the remaining export deck actions (#5761) 2025-03-21 02:49:02 +00:00
RickyRister
9decf78d2d Fix typo in comment about accepted decklist file formats (#5754) 2025-03-21 00:31:38 +00:00
Basile Clement
a6f2e69e1a vds: Allow editing tags more than once (#5752)
`refreshTags` is not connecting the signal to open the dialog to edit
the tags, so tags can only be edited once for a given deck.

Fix by only having the logic for creating the "Edit tags" button once
and call it from `connectDeckList`.
2025-03-21 00:31:25 +00:00
Basile Clement
76fa87c63e Fix StackZone crash when divideCardSpaceInZone overflows (#5751)
The divideCardSpaceInZone function introduced in #4930 is buggy and
sometimes returns an index that is too large for the current zone, which
causes us to call `cards.at(index)` with an `index` that's bigger than
the amount of cards.

This is the bug that #5609 intended to fix but was improperly diagnosed.
Remove part of #5609 as the cases it is guarding against (e.g. null card
pointer) cannot actually happen.
2025-03-21 00:30:46 +00:00
RickyRister
2e01dfd23a Remember past entries in "reveal card until X" window (#5755) 2025-03-21 00:29:59 +00:00
RickyRister
99376e75d6 Support exporting to decklist.xyz website (#5756)
* Support exporting to decklist.xyz

* fix typo
2025-03-21 00:28:15 +00:00
Basile Clement
be28d50997 Revert "Use native hover events (#5722)" (#5757)
This reverts commit e4f40a82a2.

This change had unintended consequences in the hover behavior, reverting
for now.
2025-03-21 00:25:20 +00:00
Basile Clement
d03f5388d4 Update translations (#5758) 2025-03-21 00:23:26 +00:00
Zach H
48123c8822 Revert "Display visual feedback of where cards will go (#5737)" (#5750)
This reverts commit a7641a571f.
2025-03-19 01:53:35 +00:00
RickyRister
0fa744f6ec Consolidate accepted decklist file extensions (#5749)
* Consolidate accepted decklist file extensions

* rename the other const
2025-03-19 01:53:14 +00:00
RickyRister
42301d4f1a Filter out non-deck files when building VDS (#5748) 2025-03-18 22:22:36 +00:00
RickyRister
6c19254abd Fix AttachTo tokens not having card info (#5747) 2025-03-18 22:22:16 +00:00
RickyRister
b5c5d221c4 Remove redundant "show unused color identities" settings (#5745)
* move setting to vds settings menu

* emit signal on change

* rename setting
2025-03-18 22:21:28 +00:00
Basile Clement
c219d8bdbb hotfix: Remove menus when closing game (#5744)
Version of #5740 that doesn't leave freed `QMenu`s lying around.
2025-03-17 22:54:16 -04:00
Basile Clement
4812508afc DeckEditor: Initialize the modified flag (#5743)
C++ does not require compilers to zero-initialize value types, so
depending on the platform (here: Linux), the deck editor starts up with
an uninitialized value in the `modified` flag, which is usually not
zero.
2025-03-17 21:43:14 -04:00
RickyRister
57b9f0e54c Add CONFIGURE_DEPENDS to the cmake (#5739) 2025-03-17 02:43:11 +00:00
RickyRister
0d2061365c Fix edit deck in clipboard clearing values (#5732)
* Fix edit deck in clipboard clearing values

* fix build failures
2025-03-16 23:30:12 +00:00
RickyRister
4d8a124822 Rename save to clipboard actions in DeckPreviewWidget (#5738) 2025-03-16 23:19:57 +00:00
Basile Clement
a7641a571f Display visual feedback of where cards will go (#5737)
This is part of the code from #4974, including an improved drag-and-drop
API and its use to display visual feedback of card destination on the
board.

It does not include the improved logic for pushing cards around as I
still need to figure out edge cases there - the logic for choosing where
cards go is not changed, so some of the artifacts described in #4817
and #4975 (particularly around multi-card) are still present.
2025-03-16 23:19:39 +00:00
BruebachL
bd28e04635 Reintroduce unused color identity opacity (#5733)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-03-16 23:05:38 +00:00
Basile Clement
37382dea44 Close the TabGames when closing the TabSupervisor (#5735)
* Close the `TabGame`s when closing the `TabSupervisor`

This ensures that we go through the same code path (in terms of Qt
events) when closing the whole supervisor as when closing a single tab.
Also, use the `close` event instead of the `hide` event to detect when
we are closing a game.

Fixes #5697

* Compat with old Qt versions

* Old Qt, reloaded

* Review: use hideEvent and call super
2025-03-16 23:05:04 +00:00
Basile Clement
57a8960841 Add declaration for setAttrRecur (#5734) 2025-03-16 23:02:31 +00:00
RickyRister
6b4ae8308a Reduce tag display widget spacing (#5731)
* Reduce tag display widget spacing

* Reduce bottom margin in deck dock
2025-03-16 23:02:06 +00:00
Basile Clement
2739550087 Use enum for ThemeManager brushes (#5730)
* Use enum for ThemeManager brushes

This patch introduces an enum to distinguish the different brushes that
can be set by the theme (hand, stack, etc.) and generic functions taking
the enum rather than having one copy of each function for each brush.

This is preliminary work before merging StackZone and HandZone to
simplify #4974.

* Include <array> header

* Header spacing
2025-03-16 23:01:25 +00:00
Basile Clement
4ada011632 game: Automatic update of arrow position (#5729)
Currently, zones must keep track of which cards they move in order to
manually call `updatePath` on arrows.

This patch sets the `ItemSendsScenePositionChanges` flag on
`ArrowTarget`s to automatically update arrow positions without requiring
zones to keep track of that information.
2025-03-16 22:58:06 +00:00
RickyRister
c99afe7956 Optimize cipt parsing by early returning (#5727) 2025-03-15 21:23:41 +00:00
RickyRister
b58b85dc0f Re-add old names for mana value property to oracle (#5711) 2025-03-15 19:13:13 +00:00
BruebachL
a407c8b956 Reintroduce ability to display unused mana symbol widgets. (#5726)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-03-15 19:11:46 +00:00
Basile Clement
1851f71850 Remove revealedCard flag from CardItem (#5723)
It is no longer used since #5254.
2025-03-15 19:09:14 +00:00
Basile Clement
e4f40a82a2 Use native hover events (#5722)
* Use native hover events

* Update cockatrice/src/game/cards/abstract_card_item.cpp

* Reorder

---------

Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-03-15 19:07:51 +00:00
Basile Clement
b9900e67a6 nix: Add development utilities to shell.nix (#5725)
- Remove hardening flags to allow debug builds (otherwise GCC complains
   because nix adds the FORTIFY_SOURCE flag, which is not compatible
   with -O0)

 - Allow ninja as build system

 - Add clang-tools dependency for LSP support
2025-03-15 19:03:26 +00:00
RickyRister
7d558edb3e Fix banner and tags not resetting on blank new deck (#5721)
* Fix bannerWidget not resetting when opening new blank deck

* also reset tags
2025-03-15 18:44:51 +00:00
RickyRister
eb4b1c2a07 Fix extra .cod in "save deck as" default name (#5720) 2025-03-15 18:44:03 +00:00
RickyRister
087f88146d Make internal updater failure message more user-friendly (#5718) 2025-03-15 05:19:07 +00:00
RickyRister
3a11ccb854 Update cipt parsing (#5712)
* refactor

* move thing out

* write unit tests

* get thing to work

* optimization?

* fix build failure
2025-03-14 21:44:13 -04:00
tooomm
068465143b Update CONTRIBUTING file (#5701)
* Update CONTRIBUTING.md

* cleanup

* Update CONTRIBUTING.md
2025-03-14 21:43:43 -04:00
tooomm
1f0846297f websocket is our default port/connection (#5679) 2025-03-14 21:43:11 -04:00
RickyRister
4a0e0ed954 Automatically find all files for cockatrice_SOURCES (#5716)
* Use GLOB_RECURSIVE to find all source files

* fix code style

---------

Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-03-14 21:42:56 -04:00
RickyRister
4b7d1ebb59 Refactor: split card_database into two files (#5715)
* make the duplicate

* restore original

* Refactor: split card_database into two files
2025-03-14 00:02:10 +00:00
RickyRister
ec536126b9 Compute deck hashes lazily (#5707)
* Calculate deck hashes lazily

* rename
2025-03-11 21:43:21 -04:00
Zach H
9b00bdcaea Merge pull request #5710 from lilyhuang-github/i18n
Change prebuild.js to allow i18n-default.json indentation to exist
2025-03-11 21:00:53 -04:00
Lily
da17c68830 Change prebuild.js to allow i18n-default.json indentation to exist 2025-03-11 19:59:20 -04:00
Zach H
badfb483b2 Merge pull request #5703 from RickyRister/5699-fix-printing
Show correct printing for top card of library
2025-03-10 20:45:05 -04:00
Zach H
fafe636b7c Merge pull request #5702 from RickyRister/rename-export-actions
Rename some save to clipboard actions
2025-03-10 20:44:33 -04:00
RickyRister
ef15aa2dcd Show correct printing for top card of library 2025-03-09 05:40:03 -07:00
RickyRister
2d44c9ad2f Rename some save to clipboard actions 2025-03-08 20:02:32 -08:00
RickyRister
0a1d0f650f Enable shortcuts for new save to clipboard actions (#5700)
* Enable shortcuts for new save to clipboard actions

* rename shortcut
2025-03-08 22:41:58 -05:00
RickyRister
2ba7c1ff9a Fix incorrect deck modified state (#5698) 2025-03-08 02:16:59 +00:00
RickyRister
0ecf6298a3 Add actions for shuffle top/bottom X cards (#5695)
* Add actions for shuffle top/bottom X cards

* fix typo

* move shuffle actions into existing menus
2025-03-08 01:48:48 +00:00
RickyRister
1d11bb19b8 Fix view bottom cards using the wrong default (#5696) 2025-03-07 16:17:40 -05:00
RickyRister
ff7f31ca33 add "Set Banner Card" action to VDS right-click menu (#5692) 2025-03-05 21:05:34 -05:00
RickyRister
6bb9ae92bf Update recently opened decks regardless of where the deck is opened from (#5691) 2025-03-05 21:04:53 -05:00
ZeldaZach
5238087ddf Parent bannerCardLabel to avoid popups 2025-03-04 22:45:53 -05:00
RickyRister
08bb18cefe Fix VDS filters not applying after refresh (#5662)
* reapply sort and filters after each reset

* fix unflatten folder still not applying afterwards
2025-03-05 00:57:28 +00:00
RickyRister
ecbdd32a2d Reduce redundant recursion in VDS (#5664)
* remove recursion from flattenFolderStructure

findChildren is already recursive by default

* only trigger the top-level updateVisibility on filter update

Every folder widget was connecting the filter update signals to their updateVisibility, but updateVisibility is already recursive.
That means a bunch of redundant updateVisibility calls happen every time a filter update signal is emitted

* reduce redundant recursion in updateVisibility

findChildren is recursive by default, so only the top-level updateVisibility needs to loop through the found children

* delete now-unused signals
2025-03-05 00:56:31 +00:00
RickyRister
2f415dcc6e Add action to Edit Deck via Clipboard (#5681)
* implement functionality in dlg

* add action to deck editor

* refactor and comments

* is this refactor even a good idea?

* remove the friend class stuff

* reorder

* add option for not annotated
2025-03-05 00:55:05 +00:00
BruebachL
8fc1b22889 Use the new mana symbols. (#5687)
* Use the new mana symbols.

* Fixup some thangs.

* Lint.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-03-05 00:53:42 +00:00
BruebachL
85a50ce9d5 Generic mana symbols. (#5685)
* Generic mana symbols.

* Update black mana symbol skull and symbol color.

* Update white mana symbol contrast.

* Update black mana symbol contrast.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-03-03 13:12:09 -05:00
BruebachL
b706e26a32 Fix image quality when fractional scaling is applied. (#5684)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-03-03 08:40:12 -05:00
BruebachL
15725c67c7 Fix banner widget buddy being uninitialized. (#5686)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-03-03 08:38:27 -05:00
RickyRister
d8da4473e2 add rename and delete actions to VDS right-click menu (#5683) 2025-03-03 08:35:50 -05:00
RickyRister
e1964f21de Fix memory leaks from DeckLoader usage (#5665)
* add comment

* stack allocate DeckLoader for loading tags

* deckModel now takes ownership of DeckLoader

* fix remaining

* add comment
2025-03-02 18:57:30 -05:00
RickyRister
87c5d07807 Switch current tab when opening a single-instance tab (#5651) 2025-03-02 09:30:55 -05:00
lilyhuang-github
3d0f4868df Focus tab for quit game dialog (#5670) 2025-03-02 09:29:17 -05:00
BruebachL
56bd11794e Set modification state correctly. (#5678)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-03-02 09:28:16 -05:00
BruebachL
e541b9d572 Silence picture loader warnings for null pixmaps by introducing checks. (#5677)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-03-02 09:27:52 -05:00
RickyRister
a7e8c1f59b Make BannerWidget's dropdown icon more robust (#5676)
* Make BannerWidget's dropdown icon more robust

* use isHidden

Otherwise, it doesn't work correctly if the BannerWidget is offscreen

* don't show icon if there's no buddy
2025-03-02 09:26:03 -05:00
BruebachL
ec452aabe2 Fallback to regular card name search in case the providerId one fails for the database display widget. (#5673)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-03-01 09:22:00 -05:00
RickyRister
2a9599eed8 refactor saveDeckToClipboard in AbstractTabDeckEditor (#5671)
* refactor saveDeckToClipboard in AbstractTabDeckEditor

* make deckloader functions const

* use const

* move method into DeckLoader
2025-03-01 09:21:31 -05:00
RickyRister
58a2b7ff39 Fix move to top of library shuffling an extra card (#5672)
* Fix move to top of library shuffling an extra card

* Update cockatrice/src/game/player/player.cpp

---------

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2025-03-01 13:32:07 +01:00
RickyRister
448903efe3 Add tip of the day for Expand Card View Window (#5666) 2025-02-28 11:29:09 -05:00
BruebachL
d76e8f9146 Clamp all DeckPreviewWidget children to the card size on resize. (#5669)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-02-28 11:10:40 -05:00
BruebachL
3620664a9f Cache correct providerId cards on deck load (#5668)
* Implement new method for DeckList to return cardlist with providerId, a new carddatabase method to fetch a cardlist with name and providerId and changed PictureLoader to use providerId versions of cards for caching.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-02-28 11:10:06 -05:00
lilyhuang-github
7ff43f15fc Add hint on version downloading (#5663) 2025-02-27 23:34:32 -05:00
lilyhuang-github
e271e6ecf8 Implement advertisement to FAQ page align right (#5657) 2025-02-27 23:34:06 -05:00
BruebachL
93d28717e0 Abstract deck editor (#5646)
* Generify TabDeckEditor.

* Connect dockTopLevelChanged signals.

* Connect eventFilters.

* Remove comments.

* Fix ze build (accidentally deleted a line)

* Fix some pointer chaining.

* Be a lot saner about some signals/slots, as in, individual Deck Editor widgets now internally determine their CardInfo and then simply communicate this to the DeckEditor

* Lint.

* DeckDock can handle its own menu.

* DeckDock can handle its own decrement.

* DeckDock now notifies the deck editor on deck change, instead of individually modifying menu items and modification status.

* Rename.

* Include pixelmap generator for icon.

* Directly use an AbstractTabDeckEditor as parent.

* Move clearing database filter into signal/slot relation.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-02-27 10:57:58 -05:00
RickyRister
6df97a156f Change "include folder name in VDS search" into a setting (#5659)
* add new setting

* implement thing
2025-02-26 12:01:30 -05:00
BruebachL
05d06f9016 Sort Tags in TagFilterWidget (#5660)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-02-26 11:59:59 -05:00
RickyRister
e8574641b0 use new rename icon in replays tab (#5658) 2025-02-26 00:14:27 -05:00
RickyRister
9ac13018c6 include folder name in VDS search when folders are enabled (#5637) 2025-02-25 18:39:34 -05:00
RickyRister
06b25f1cfc add "edit tags" to VDS right-click menu (#5631)
* refactor: move openTagEditDlg up a level

* add edit tags to menu

* set DeleteOnClose attribute on menu

* fix build failure
2025-02-25 18:38:55 -05:00
RickyRister
6f5d369416 Add folder dropdown icons to VDS (#5632)
* add svg

* update pixmap cache

* get icon to work

* hide icon when not clickable

* use consistent naming

* use expandOnly because apparently that leads to higher image quality
2025-02-25 18:36:48 -05:00
RickyRister
4543038fd8 add "open in deck editor" to VDS right-click menu (#5634) 2025-02-25 18:35:56 -05:00
RickyRister
345f8b772c show error message when open deck fails in VDS (#5642) 2025-02-25 18:33:16 -05:00
RickyRister
47311b1dfd Expand/shrink card view window on double click (#5652) 2025-02-25 18:32:45 -05:00
RickyRister
21e22ed5fb Destroy VDS in game lobby once game starts (#5643)
* push back setting change

* rename method and make it public

* destroy vds on game start
2025-02-25 18:31:44 -05:00
RickyRister
0d6497fcdc Fix banner card changing when opening deck in new tab (#5649) 2025-02-25 18:30:53 -05:00
RickyRister
bfaeeb5aea fix transform from non-table zones not moving card (#5648) 2025-02-25 18:30:38 -05:00
RickyRister
b46667f6db Fix memory leak when refreshing VDS (#5647)
* parent deckLoader

* leave comment
2025-02-25 18:30:20 -05:00
RickyRister
49932ee6f8 Fix segfault when oracle reads card without "num" field (#5654) 2025-02-25 18:29:43 -05:00
RickyRister
57e37e8f4d Allow loading local xml file in oracle (#5655) 2025-02-25 18:29:27 -05:00
RickyRister
af68a95964 Add rename action to deck storage tab (#5656)
* add icon

* add rename action
2025-02-25 18:29:07 -05:00
RickyRister
959a268f91 Mark deck as modified when banner card is changed (#5641)
* Mark deck as modified when banner card is changed

* set modified inside setBannerCard
2025-02-22 13:56:48 +00:00
RickyRister
77a3515470 Always download macOS 13 version on intel macs (#5630)
* Always download macOS 13 version for intel macs

* use contains instead of regex
2025-02-18 22:27:17 +00:00
BruebachL
6a008acb2b Enhance card update error description. (#5638)
* Enhance card update error description.

* Enhance card update error description.

* Lint.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-02-18 22:20:06 +00:00
RickyRister
247e1aff83 Also parse "colors" field in xml (#5635) 2025-02-18 20:04:59 +00:00
RickyRister
3df4efebaa Revert file watcher in VDS (#5636) 2025-02-18 20:04:37 +00:00
RickyRister
5c8d1f3cff Make AttachTo tokens work from non-table zones (#5629)
* move card to play before creating attached token

* leave comment

* hardcode createCard target zone to table

To get attached token from graveyard/exile to work
2025-02-16 17:02:45 -05:00
Zach H
01d5e58a5f Change Sorting Order of User List (#5626)
* 1) Online Users > Offline Users
* 2) Admins, judge/vip/donator status ignored
* 3) Moderators, judge/vip/donator status ignored
* 4) Judges
* 5) VIPs
* 6) Donators
* 7) Everyone else
2025-02-16 04:35:28 +00:00
RickyRister
a28300ac42 add "save deck to clipboard" to VDS right click menu (#5625) 2025-02-16 04:18:47 +00:00
RickyRister
0666483756 refactor saveDeckToClipboard in TabDeckEditor (#5623) 2025-02-16 02:43:44 +00:00
RickyRister
abca5514af support right-click menu in VDS (#5622)
* support right-click menu in VDS

* move methods around
2025-02-16 02:43:20 +00:00
RickyRister
2247c66ea6 refactor how double click signal gets passed up in VDS (#5621) 2025-02-15 19:06:11 -05:00
RickyRister
3b638598ad fix load remote deck window being empty (#5613) 2025-02-15 21:05:33 +00:00
RickyRister
63e3e3ceb1 refactor and add missing log categories to ReleaseChannel (#5615)
* adding missing log categories

* refactor version lookup

* refactor OS checking code
2025-02-15 21:05:12 +00:00
BruebachL
23f4c9c4e4 Tags in deck editor (#5608) 2025-02-12 03:18:00 +00:00
Zach H
356b00e8c7 Fix Ricky Crash (#5609) 2025-02-12 01:39:41 +00:00
RickyRister
8916e049bd fix printing selector dropdown not working on mac (#5606) 2025-02-11 04:42:31 +00:00
ZeldaZach
287b4a5597 Bump to 2.10.1 2025-02-10 23:26:35 -05:00
RickyRister
d77ee00e70 Fix crash when VDS show tags is unchecked (#5605)
* Fix crash when VDS show tags is unchecked

* revert the refactor since I don't know if there's a reason they did it that way
2025-02-11 04:24:08 +00:00
ZeldaZach
18ac4c2bd4 Set Release Name: Omenpath 2025-02-10 16:41:18 -05:00
Zach H
2dc614c6b7 Add new Tips of the Day (#5603)
- Thanks WargiCorgi!
2025-02-10 21:22:26 +00:00
BruebachL
7c9bf75393 Overhaul quick settings for VDS and PrintingSelector (#5602)
* Move show folders option next to the search bar.

* Add a new settings button and settings popup, move the folder visibility checkbox there and the ability to hide tags.

* Make popup not close when interacting with child widgets.

* Fix mocks.

* Include cog icon.

* Move PrintingSelector Display options to new quick settings widget.

* Adjust size before first show so as to not overflow.

* Add option to hide card size slider in VDS.

* Qt5 support.

* Fix some warnings by containerizing layouts because addChildLayout is silly.

* Fix an incorrect slot/signal assignment.

* Correct sub-categories for settings to persist them.

* Shuffle some slots and signals around to distinguish between the tag filter and the tags on the deck preview widgets.

* Add a quick setting to draw unused color identities and center them.

* Respect the setting on startup.

* Move card size slider to the quick settings menu.

* Move PrintingSelector card size slider to quick menu, adjust other layout from other options.

* Improve layout, add a gray border.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-02-10 16:50:08 +00:00
transifex-integration[bot]
d1102939a2 Translate cockatrice_en@source.ts in pt_BR (#5601)
100% translated source file: 'cockatrice_en@source.ts'
on 'pt_BR'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-02-09 22:12:38 +00:00
Zach H
cb060f43b5 Prevent server crash if DB is down and game is attempted to be created (#5600) 2025-02-09 22:11:00 +00:00
transifex-integration[bot]
80bd783d54 Updates for project Cockatrice and language de (#5595)
* Translate cockatrice/cockatrice_en@source.ts in de

100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

* Translate cockatrice/cockatrice_en@source.ts in de

100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-02-09 19:16:27 +01:00
tooomm
82b147d235 uniform artifact naming (#5592) 2025-02-09 12:40:07 +00:00
Zach H
6944f5f81c Put Logging config on MacOS (#5591) 2025-02-09 12:39:09 +00:00
danbopes
8cbfe85ed4 Fix db reconnecting issues (#5590)
See:

c1b0d50237 (diff-02a32f437187bd4cbfab74877100fee0cfc669dab2c05418681a3557c2cf73f2R109)

We should be checking to see if the query is notActive. In this case, we're literally closing and reopening the connection to the database every time `checkSql()` is called, which is called in numerous places.
2025-02-09 12:12:16 +00:00
Zach H
eb2c71d381 Fix MacOS Finding releases (#5589) 2025-02-09 02:26:04 -05:00
RickyRister
86161185d9 Use local-aware compare in VDS file name sort (#5588) 2025-02-09 04:38:48 +00:00
RickyRister
79bf3adb2a Re-sort decks in VDS after toggling show folders (#5587) 2025-02-09 04:38:22 +00:00
Zach H
07ca243d48 Update QT_LOGGING_CONF if not set (#5578) 2025-02-08 16:10:45 +00:00
Zach H
edaca772c5 Support logging config on install (#5577)
* Support logging config on install

* Support logging config on install
2025-02-08 16:10:37 +00:00
ZeldaZach
b30b72b7c3 Fix building & logging out 2025-02-07 14:19:53 -05:00
RickyRister
57eab3d48a turn off flow_widget logger (#5576) 2025-02-07 15:36:41 +00:00
RickyRister
2c6e7d4d3a Add option to hide folder structure in Visual Deck Storage (#5575) 2025-02-07 15:36:24 +00:00
RickyRister
9ec621a1ae fix wrong size flag bounding rect on linux (#5573)
* fix flag bounding box on linux

* use the non-deprecated macro
2025-02-07 06:21:56 +00:00
RickyRister
23223e10b5 actually delete VDS when hiding it in game lobby (#5572) 2025-02-07 05:20:42 +00:00
github-actions[bot]
94129607e5 Update translation source strings (#5571)
Co-authored-by: github-actions <github-actions@github.com>
2025-02-07 04:59:23 +00:00
RickyRister
d951b082c4 Add setting to hide visual deck storage in game lobby (#5570) 2025-02-06 13:44:33 +00:00
RickyRister
1ee0e87ba7 remove debug log that was accidentally left in (#5569) 2025-02-06 13:43:37 +00:00
Zach H
67091fff9c Fixup custom theme image loading (#5568) 2025-02-06 13:40:10 +00:00
Zach H
9b4f51d1e4 Increase Icon Size in User Lists (#5567) 2025-02-06 05:51:19 +00:00
Zach H
a6649d5401 Add Judge Pawns (+ Resize Donator Pawns) (#5566) 2025-02-06 05:51:01 +00:00
RickyRister
b509eed3e0 support shortcuts for tab menu actions (#5564)
* support shortcuts for tab menu actions

* refactor

* add migration
2025-02-06 04:00:43 +00:00
RickyRister
12ae7a9eeb Ignore unknown shortcut names in settings (#5565) 2025-02-06 04:00:31 +00:00
fluidvanadium
e6e3333673 Deck limit (#5559)
* increased MAX_FILE_LENGTH

* set MAX_FILE_LENGTH to about 2 megabytes
2025-02-04 22:22:15 +00:00
RickyRister
218ed726b6 Fix wrong position and scaling of svg pixmaps when zoomed out (#5563)
* fix scaling for player icon profile pic

* fix scaling for other svgs
2025-02-04 22:22:05 +00:00
RickyRister
0503fe589c fix playericon missing in local games (#5562) 2025-02-04 05:53:52 +00:00
Zach H
e599c6bdac Mods/Admins/PrivLevels not subject to server idle timeout policy (#5561) 2025-02-04 05:20:20 +00:00
Zach H
c2292c11a6 Support Purple Heart for Donators (#5560) 2025-02-04 05:06:05 +00:00
RickyRister
ec9feb9f50 fix wrong size flag bounding rect on windows (#5556)
* fix wrong size flag bounding rect on windows

* fix the values
2025-02-03 05:43:58 +00:00
RickyRister
9680e47bbc Deprecate userlevels icons (#5555)
* map old info to colors

* move caching up a level

* delete userlevels folder

* remove default vip color
2025-02-03 05:43:48 +00:00
RickyRister
f782bd709a preserve image quality when scaling svg (#5554)
* preserve image quality when scaling svg

* fix missing colorless counter

* do it in a way that doesn't cause warnings to be logged
2025-02-03 02:50:21 +00:00
RickyRister
c00b41f3bd add logging category for remote_client (#5553)
* add logging category for remote_client

* remove ifdef QT_DEBUG
2025-02-03 01:57:34 +00:00
BruebachL
94e2d64e55 Update sort order on VDS load. (#5552)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-02-02 20:16:38 +00:00
Zach H
4535a70b57 Define qtlogging.ini location (#5551) 2025-02-02 19:27:14 +00:00
BruebachL
6c1b7c83ec Debounce writing the setting to cache when adjusting card sizes. (#5550)
* Debounce writing the setting to cache when adjusting card sizes.

* Lint.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-02-02 18:45:26 +00:00
Zach H
f0adafb275 Reconnect Servatrice if DB Connection Dies (#5548) 2025-02-02 18:25:01 +00:00
BruebachL
9dd60d74d1 Hotfix VDS sizing scrollArea widget incorrectly when created while not visible by setting size in showEvent (#5547)
* Only resize on folder widget to make sure it doesn't squish the loading indicator.

* Clamp scrollArea widget to viewport width on showEvent to prevent widget being instantiated with wrong width when not visible.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-02-02 17:36:56 +00:00
RickyRister
1de09deb59 Fix size and image quality issues with new user icons (#5546) 2025-02-02 15:08:23 +00:00
BruebachL
a0b52ce450 Implement folder support for VDS. (#5545) 2025-02-02 15:08:04 +00:00
RickyRister
95cea0f191 Add custom server-side pawn colors (#5543) 2025-02-02 03:25:25 +00:00
RickyRister
0fc05e15cd pass ServerInfo_User down the chain (#5542) 2025-02-02 01:04:49 +00:00
RickyRister
26c0cdc072 Make settings window scrollable (#5539) 2025-02-01 05:03:30 +00:00
RickyRister
b1b48d50f3 move deck conversion settings into deck settings group (#5538) 2025-02-01 04:32:12 +00:00
Zach H
349c18aa6a Fix Crash with "c:" in deck editor (#5537) 2025-02-01 04:32:01 +00:00
Zach H
b956fd4bac Fix windows deck searching (#5536) 2025-02-01 04:13:46 +00:00
RickyRister
34e0130b90 fix view transform button disappearing on click (#5535) 2025-02-01 03:31:09 +00:00
BruebachL
33d8edeb9a Get file format from name. (#5532)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-27 19:41:29 -05:00
RickyRister
5d1e905255 remove refreshTree call in remote model's constructors (#5533) 2025-01-27 19:40:59 -05:00
RickyRister
51c542aa04 Disable add to deck submenu if no deck editor tabs are open (#5530)
* refactor

* just have the deck name

* clean up submenu parenting

* disable add to deck menu if no deck editor tabs are open
2025-01-26 10:24:09 -05:00
BruebachL
4d791f4d7a Edhrec tab (#5512)
---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-01-25 22:29:27 +00:00
RickyRister
aee68f8b00 add missing override and explicit specifiers in common (#5527) 2025-01-25 14:06:03 +00:00
RickyRister
b911ea6e28 add missing override and explicit specifiers in src/server (#5526) 2025-01-25 14:05:25 +00:00
RickyRister
a41e7c75c1 add missing override and explicit specifiers in src/deck and src/utility (#5525)
* add missing override and explicit specifiers in src/deck

* add missing override and explicit specifiers in src/utility
2025-01-25 14:05:00 +00:00
RickyRister
9f729bf636 add missing override and explicit specifiers in src/dialogs (#5524) 2025-01-25 14:04:26 +00:00
RickyRister
42e4c14a82 add missing override and explicit specifiers in src/client (#5523) 2025-01-25 14:03:54 +00:00
Zach H
37a0c00b3f Support right-click on game list menu (#5522) 2025-01-25 14:03:29 +00:00
Zach H
f6c31bf901 Invert "Show" games, so all games are visible by default (#5521) 2025-01-25 07:03:36 +00:00
Zach H
b48fe8b99c Better capitalization & Deck open first (#5520) 2025-01-25 05:45:44 +00:00
RickyRister
19b758591b Allow offline Replays tab (#5519) 2025-01-25 05:44:48 +00:00
Zach H
ec6a23de56 Support more indices (#5505)
* Support more indices

* Support more indices
2025-01-25 04:16:41 +00:00
BruebachL
ce416df3fb Add a dialog to prompt user to convert to .cod format if trying to apply tags to a .txt deck. (#5514)
* Add a dialog to prompt user to convert to .cod format if trying to apply tags to a .txt deck.

* Lint mocks.

* Address comments, move dialog to appropriate folder.

* Unlint.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-25 03:20:30 +00:00
BruebachL
4e96157091 Flow Layout fixes (#5515)
* Flow Layout fixes.

* Remove some comments.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-25 03:17:39 +00:00
RickyRister
f428148f64 Allow offline Deck Storage tab (#5518)
* make deck storage tab no longer close on disconnect

* add method for clearing remote decklist model

* handle connect/disconnect in deck storage tab
2025-01-25 03:16:40 +00:00
RickyRister
e8b1e3ef0c don't autoclose card view if single card gets dragged into same zone (#5517)
* rename canResize param to toNewZone

* pass toNewZone down

* don't autoclose card view if card gets dragged into same zone
2025-01-25 02:08:28 +00:00
RickyRister
085f0dd26c reduce unnecessary CardItem creation in ViewZone addCard process (#5513) 2025-01-24 05:13:08 +00:00
BruebachL
1d2ab8d3d3 Convert lastLoaded timestamp into proper QDateTime for correct comparison. (#5506)
* Convert lastLoaded timestamp into proper QDateTime for correct comparison.

* Reintroduce null check.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-22 12:58:19 +00:00
RickyRister
66e2e7a473 add missing override and explicit specifiers to all classes in src/game (#5511) 2025-01-22 12:57:56 +00:00
RickyRister
af161f00b7 Remove spacing in CardInfoWidget caused by invisible view transformation button (#5510) 2025-01-22 12:55:21 +00:00
RickyRister
420cca2402 fix after merge to use ZoneView::close (#5509) 2025-01-20 22:43:05 -05:00
RickyRister
97fdf11c8f Add setting to auto close card view when empty (#5502) 2025-01-21 03:08:01 +00:00
RickyRister
aeb1b9fb4f Fix segfault when game is closed while card view window is open (#5507) 2025-01-21 03:06:55 +00:00
RickyRister
b004e91aa4 fix segfault when bottoming card in deck view (#5508) 2025-01-21 03:06:00 +00:00
Zach H
090cc8c144 Support more indices (#5503) 2025-01-20 01:42:24 -05:00
tooomm
0467fae51b Add label to swap button (#5501) 2025-01-19 17:26:25 +00:00
BruebachL
aa24502129 Move logging from QDebug to QCDebug and introduce LoggingCategories. (#5491)
* Move logging from QDebug to QCDebug and introduce LoggingCategories.

* Lint.

* Unlint like one change.

* Remove .debug category since this is autofilled by Qt and used to differentiate between QCDebug and QCWarning and QCError.

* Uncomment defaults, include main category.

* Make PictureLoader logging a bit more useful.

* Lint...?

* Address comments.

* Clean up some unnecessary classes in logging statements.

* Add a new message format to the logging handler.

* Lint.

* Lint.

* Support Windows in Regex

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2025-01-19 13:14:23 +00:00
BruebachL
e752578d15 Add a button to easily view the transformed version of a card. (#5498)
* Add a button to easily view the transformed version of a card.

* Minor reword

* Minor fix

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2025-01-19 12:59:53 +00:00
BruebachL
724db755af Hide load from remote button in local games (#5499)
* Hide load from remote button in local games.

* Minor fix

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2025-01-19 12:59:33 +00:00
BruebachL
ec0caaf421 Give deckList a signal to emit when the tags change and hook up the display widget to that. (#5497)
* Give deckList a signal to emit when the tags change and hook up the display widget to that.

* Reload from file when loading a visual deck to ensure latest changes propagate to the decklist.

* Eliminate loadVisualDeck and use loadDeckFromFile instead.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-19 12:32:39 +00:00
Zach H
55b490ade0 Generate PDBs for Windows Builds (#5494) 2025-01-18 07:54:01 +00:00
ZeldaZach
1392bdd258 Fix Windows 7 Crash Dump 2025-01-18 00:33:30 -05:00
Zach H
648c96ac3d Allow Moderators to Grant Replay & Activate in TabAdmin (#5492) 2025-01-18 02:23:24 +00:00
Zach H
d3a1538af3 Fix Windows Crash Reporter (#5493)
* Fix Windows Crash Reporter

* Fix NSIS template
2025-01-18 02:23:05 +00:00
RickyRister
2bc71095dd get UserListProxy from TabSupervisor instead of passing it in the constructor (#5490) 2025-01-17 15:27:52 +00:00
RickyRister
92a903b035 fix chat messages not showing in the client (#5489) 2025-01-17 03:11:13 -05:00
transifex-integration[bot]
cd373edf3d Translate cockatrice_en@source.ts in pt_BR (#5487)
100% translated source file: 'cockatrice_en@source.ts'
on 'pt_BR'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-01-17 07:41:59 +00:00
RickyRister
ca2d438cda fix sideboard not being re-locked on load deck (#5486) 2025-01-17 05:25:01 +00:00
RickyRister
c148c8df7f replace foreach macro with standard for each loop (#5485) 2025-01-17 05:18:15 +00:00
Zach H
0cbad25385 General Cleanup of Unused Assets (#5484) 2025-01-17 05:08:53 +00:00
ZeldaZach
7b94d5d501 Better sanitization of pointers 2025-01-17 00:05:08 -05:00
RickyRister
ee938342f3 Change visible buttons in game lobby depending on if deck is loaded (#5480)
* rename method

* delete unused method

* refactor

* increase margins

* change visible buttons depending on if deck is loaded

* correctly send the ReadyStart command on unload

* fix force start button still being visible
2025-01-17 04:52:33 +00:00
Zach H
cb64a5eea0 Populate TabAccount if reopened (#5483) 2025-01-17 04:28:18 +00:00
BruebachL
80165c28a9 Add options to include/exclude set name and collector number during clipboard import/export. (#5482)
* Add options to include/exclude set name and collector number during clipboard import/export.

* Missing parentheses in action label.

* Revert the silliest lint in the world.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-17 02:38:01 +00:00
ZeldaZach
315c224f24 Fix crash on add/edit tags 2025-01-16 00:54:34 -05:00
ZeldaZach
55f624b634 Hide Loading Msg in VDE when not relevant 2025-01-16 00:06:25 -05:00
ZeldaZach
82b257b589 Fix index 0 tab not functioning 2025-01-15 23:55:51 -05:00
RickyRister
a51ca9f9cb fix incorrect values in deck editor tab's views menu on init (#5479) 2025-01-16 04:06:56 +00:00
RickyRister
7e19b52926 fix tab-specific menus not present when tab is opened on startup (#5478) 2025-01-16 04:04:15 +00:00
RickyRister
2d02955f8b delete overloaded signal in PendingCommand (#5477)
* remove overloaded signal since no one was using it

* remove usages of qOverload

* turns out new slot/signal syntax can ignore extra params
2025-01-15 13:16:06 +00:00
RickyRister
3a740f0bde group printings together when sorting in card reveal window (#5476) 2025-01-15 13:14:47 +00:00
RickyRister
455d68f9ea Move UserlistProxy to src/server/user and fix capitalization (#5475)
* move file

* fix capitalization
2025-01-15 13:14:16 +00:00
RickyRister
2def02e140 Remember which tabs are open between sessions (#5467) 2025-01-15 06:10:24 +00:00
RickyRister
23bd18a04c fix segfault that happens when account tab is closed (#5474) 2025-01-15 06:10:03 +00:00
RickyRister
d09b9eb533 Rename UserList class to UserListWidget (#5473) 2025-01-15 03:07:36 +00:00
github-actions[bot]
25caae6d0f Update translation files (#5472)
Co-authored-by: github-actions <github-actions@github.com>
2025-01-14 20:28:36 -05:00
BruebachL
a717e715b6 Introduce null checks, add setShortName and collectorNumber to deckList export. (#5471)
* Introduce null checks, add setShortName and collectorNumber to deckList export.

* Lint.

* Lint again.

* Lint AGAIN.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-14 10:54:15 -05:00
BruebachL
c079715c46 Properly check if a duplicate already exists in the list, no longer break loop. (#5470)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-14 10:12:53 -05:00
BruebachL
f6c1253e84 Add a placeholder label to indicate database is still loading. (#5469)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-14 14:19:32 +00:00
BruebachL
8462b6e906 Minor fix to sorted list reconstruction to fix duplication of cards in printing selector. (#5468)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-14 13:59:53 +00:00
RickyRister
cca82f59eb Don't re-sort VisualDeckStorage every time it gets tabbed to (#5466)
* remove showEvent

* refresh cards on init

* fix sort order not immediately being set
2025-01-14 13:58:44 +00:00
RickyRister
81662b7fec Reduce spacing in visual deck storage (#5465)
* move thing

* reduce spacing
2025-01-14 13:52:46 +00:00
RickyRister
d2c2128e9b Rename TabUserLists to TabAccount (#5464)
* rename class

* rename variables
2025-01-14 13:50:08 +00:00
RickyRister
686645c1e4 refactor DeckViewContainer into own file (#5455)
* cut-and-paste

* remove some includes

* move refreshShortcuts

* move deck_view into src/game/deckview

* move deck_view_container to src/game/deckview

* fix build failure
2025-01-14 07:00:09 +00:00
ZeldaZach
9df71fe1e8 Update VCPkg 2025-01-14 01:47:05 -05:00
Zach H
6309e7e318 Fix Windows FlowWidget duplication (#5460)
- Delete the item widget right away, as the delay is too great with deleteLater
2025-01-14 04:33:21 +00:00
Zach H
767e83c879 Disable Force Start for host on load (#5462)
- Fix #5444
2025-01-14 04:33:04 +00:00
RickyRister
78d54b0ef2 Remove unnecessary deck_view.h includes (#5461)
* remove unnecessary deck_view imports

* remove some more imports
2025-01-14 04:32:53 +00:00
BruebachL
497e4f1be0 Add loadFromFileAsync to deckLoader and connect VisualDeckStorageWidget to it. (#5456)
* Add loadFromFileAsync to deckLoader and connect VisualDeckStorageWidget to it.

* Address comments.

* Lint.

* Unlint something.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-14 03:02:33 +00:00
BruebachL
6072df3522 .txt decks reportedly don't get saved when they're loaded. (#5459)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-14 01:51:41 +00:00
BruebachL
ba89495dc0 Refactor Picture Loader (#5457) 2025-01-13 18:52:54 +00:00
RickyRister
a417b049da Make Visual Deck Storage tab be managed by TabSupervisor (#5453)
* remove closeRequest override

* remove visualDeckStorage from WindowMain

* manage visual deck storage in TabSupervisor

* open on startup

* refresh vds on db load finish

* open deck editor tab first on startup
2025-01-13 18:42:58 +00:00
github-actions[bot]
883f1a5c11 Update translation source strings (#5454)
Co-authored-by: github-actions <github-actions@github.com>
2025-01-13 11:08:32 -05:00
BruebachL
dd8ac14f99 Visual deck storage v2 (#5427)
* Restore some button states (ready/sideboard locked) to sensible defaults when unloading a deck.

* Update last loaded timestamp in decklist file and then restore original last modified timestamp if a user requests a deck load.

* Add some todos.

* Loading a deck from local file dialog should swap out scenes, enable unload button.

* Lint.

* Shuffle some classes and signals around.

* More sort options, sort widgets directly.

* Banner cards should respect providerIds.

* Properly updateSortOrder on load.

* Add the color identity to the Deck Preview Widget.

* Properly set sort indices.

* Change replace visualDeckStorageWidget with deckView to be in deckSelectFinished so that it also works on remote deck load.

* Include settings for unused color identities display.

* Change opacity scaling.

* Overload for Qt.

* Lint.

* Lint.

* Include QMouseEvent

* Template because MacOs.

* Include a quick filter for color identities.

* Include a quick filter for color identities.

* Save some space.

* Refactor DeckPreviewWidgets to reside in their own folder.

* Add Deck Loader logging category.

* Introduce a tagging system.

* Add some more default tags.

* Even more default tags.

* Lint.

* Lint a comma.

* Remove extra set of braces.

* Lint some stuff.

* Refresh banner cards when tags are added.

* Lint.

* Wrestle with Qt Checkboxes.

* Lint.

* Adjust some sizes, relayout.

* Address comments.

* Lint.

* Reorder kindred types.

* Add a search bar for tags.

* Remove close button (for now) and change "Add tags ..." to "Edit tags ..."

* Retranslate window title for Deck Tag Manager Dialog.

* Style tag addition widget to be consistent.

* Lint.

* Override paintEvent.

* Override sizeHint

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-12 17:46:22 -05:00
RickyRister
9bd024d39f Make all tabs closable; add tabs menu (#5451)
* make closeRequest call close by default

* make all tabs closable by default

* closeRequest instead of deleteLater on stop

* null out pointer on destroy

* no need to manually null out the tabs anymore

* comment

* pass tabsMenu into ctor

* comment

* implement tabs menu

* fix segfault on close (again)

* remove deck editor action from WindowMain
2025-01-12 16:15:19 -05:00
transifex-integration[bot]
e4611a8616 Translate cockatrice_en@source.ts in en_US (#5452)
100% translated source file: 'cockatrice_en@source.ts'
on 'en_US'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-01-12 12:41:05 -05:00
RickyRister
3f41e5dd77 don't close replay tabs and do close message tabs on disconnect (#5450) 2025-01-12 02:47:36 -05:00
RickyRister
a6fc88c79a Always set TabSupervisor as parent in Tab subclasses (#5449)
* refactor closeTab

* always set tab parent to tabSupervisor

* set tabSupervisor parent

* use close instead of deleteLater

* be more clear about overloads
2025-01-12 02:34:11 -05:00
transifex-integration[bot]
3a4ec1062b Translate cockatrice_en@source.ts in pt_BR (#5448)
100% translated source file: 'cockatrice_en@source.ts'
on 'pt_BR'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-01-11 23:41:57 -05:00
RickyRister
7347ba88ac fix segfault on disconnect (#5447)
* add new param to closeRequest

* don't emit signals in dtors

* send closeRequest

* fix build failure

* fix build failure

* see if we can get away with the overloaded triggered

* fix build failure
2025-01-11 22:19:45 -05:00
tooomm
3b544a36a8 Fix button label (#5441) 2025-01-11 21:28:23 -05:00
RickyRister
2851d0c7e6 add override specifier to tab subclasses (#5445) 2025-01-11 21:28:02 -05:00
transifex-integration[bot]
2b296badea Translate cockatrice_en@source.ts in zh-Hans (#5446)
100% translated source file: 'cockatrice_en@source.ts'
on 'zh-Hans'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-01-11 21:27:00 -05:00
ZeldaZach
a12c4ee909 Fix MacOS Builds for Non-Main Repo PRs 2025-01-11 21:21:11 -05:00
ZeldaZach
7db9c9115e Fix SoundEngine on Windows (again) 2025-01-11 00:19:00 -05:00
ZeldaZach
503985a080 Initialize audioOutput for SoundEngine 2025-01-11 00:12:32 -05:00
RickyRister
9f466162b0 disable starting life total edit in game information window (#5440) 2025-01-10 23:14:46 -05:00
Zach H
8bea3f8997 Fix sounds on Qt6 (#5439) 2025-01-10 23:10:47 -05:00
RickyRister
1a3df84f0a fix segfault on exit if any closable tabs were open (#5435) 2025-01-10 17:27:26 -05:00
Zach H
2b3c47148e GHA MacOS Only Sign/Notarize if self repo (#5437) 2025-01-10 16:46:05 -05:00
transifex-integration[bot]
59ca4397e2 Translate oracle/oracle_en@source.ts in zh-Hans (#5436)
100% translated source file: 'oracle/oracle_en@source.ts'
on 'zh-Hans'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-01-10 08:22:58 -05:00
transifex-integration[bot]
98266b0739 Translate oracle/oracle_en@source.ts in yue (#5434)
100% translated source file: 'oracle/oracle_en@source.ts'
on 'yue'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-01-10 08:22:48 -05:00
Zach H
5a82ff106d Update VCPkg (#5433) 2025-01-09 23:23:00 -05:00
Zach H
2194430019 Sign macOS Releases (#5396) 2025-01-09 22:32:53 -05:00
RickyRister
1f11015a2f Refactor files in src/utility and src/deck to new Qt Slot/Signal syntax (#5432)
* refactor in src/utility

* refactor in src/deck

* fix build failure
2025-01-09 06:33:20 -05:00
RickyRister
c3421669d5 Refactor files in src/game to new Qt Slot/Signal syntax (#5431)
* fix signals in CardDatabaseParser

* update remaining signals

* cleanup

* wait this was always just broken

* fix build failure

* fix build failure

* fix build failure
2025-01-09 06:32:25 -05:00
RickyRister
6e8adddc6d Refactor tab_supervisor to new Qt Slot/Signal syntax (#5430)
* Refactor tab_supervisor to new Qt Slot/Signal syntax

* fix build failure
2025-01-09 06:26:42 -05:00
RickyRister
22a6ded4f0 reduce vertical spacing in visual deck storage (#5422) 2025-01-09 06:25:40 -05:00
transifex-integration[bot]
0d7669db2c Translate cockatrice_en@source.ts in yue (#5428)
100% translated source file: 'cockatrice_en@source.ts'
on 'yue'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-01-08 19:23:49 -05:00
transifex-integration[bot]
9526bca168 Translate cockatrice/cockatrice_en@source.ts in de (#5429)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-01-08 19:23:38 -05:00
transifex-integration[bot]
0683431f35 Translate cockatrice_en@source.ts in en_US (#5426)
100% translated source file: 'cockatrice_en@source.ts'
on 'en_US'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-01-06 17:31:14 -05:00
github-actions[bot]
70790264b8 Update translation source strings (#5425)
Co-authored-by: github-actions <github-actions@github.com>
2025-01-06 12:42:46 -05:00
transifex-integration[bot]
c8a68c83e3 Translate cockatrice_en@source.ts in yue (#5424)
100% translated source file: 'cockatrice_en@source.ts'
on 'yue'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-01-06 12:38:58 -05:00
RickyRister
23171f79d0 Refactor window_main to new Qt Slot/Signal syntax (#5423) 2025-01-06 12:38:44 -05:00
RickyRister
b7f05a12a3 get swap cards button to work with multi-selections (#5421) 2025-01-05 22:44:40 -05:00
Zach H
6078dd092a Support viewing the bottom X cards of library (#5410)
* Get cardIds to update properly in bottom view (#5414)

* Get bottom view to update properly when card is inserted into known portion (#5415)

---------

Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>
2025-01-05 21:17:18 -05:00
BruebachL
81b85e97df Extend decklist parsing (#5316)
* Extend the decklist parsing from clipboard to also support SetName, CollectorNumber and Foil Status.

* Q_UNUSED foil for now but keep parsing logic for future PR's/compatibility.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-05 21:07:17 -05:00
RickyRister
cc16b8779c improve shortcut search to split by word (#5416) 2025-01-05 19:19:00 -05:00
BruebachL
62f7c7f9ce New visual deck storage (#5290)
* Add TabDeckStorageVisual

* Visual Deck Storage

* Add BannerCard to .cod format, use it in the visual deck storage widget.

* Show filename instead of deckname if deck name is empty.

* Lint.

* Don't delint cmake list through hooks.

* Add deck loading functionality.

* Open Decks on double click, not single click.

* Void event for now.

* Fix build issue with overload?

* Fix build issue with overload?

* Include QDebug.

* Turn the tab into a widget.

* Move the signals down to the widget, move the connections and slots up to the parent widgets.

* No banner card equals an empty CardInfoPtr.

* Add an option to sort by filename or last modified.

* Flip last modified comparison.

* Lint.

* Don't open decks twice in the storage tab.

* Fix unload deck not working by showing/hiding widgets instead of adding/removing to layout.

* Add a search bar.

* Add a card size slider.

* Lint.

* Lint.

* Lint.

* Fix settings mocks.

* No need to QDebug.

* No need to QDebug.

* Member variable.

* Member variable.

* Non-lambda.

* Change set to list conversion.

* Specify overload.

* Include MouseEvent

* Adjust font size dynamically.

* Add an option to show the visual deck storage on database load.

* Fix the close button not working on the tab, add an option to launch the visual deck storage tab to Cockatrice menu.

* Override virtual functions.

* Correct tab text.

* Add a setting to remember last used sorting order for visual deck storage widget.

* Update banner card combo box correctly.

* Fix mocks.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: Zach H <zahalpern+github@gmail.com>
2025-01-05 18:12:20 -05:00
BruebachL
7496e79e8c Add a button to swap the card between mainboard and sideboard to the DeckEditor (#5175)
* Add a button to swap the card between mainboard and sideboard to the deck editor.

* Add new icon to cockatrice.qrc and force update.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-05 17:57:37 -05:00
RickyRister
b8cf3e2cab add ctrl enter as shortcut for ok in load deck from clipboard (#5417) 2025-01-05 17:41:03 -05:00
RickyRister
93fab3d78f Remember last opened directory when loading decks (#5418)
* remember last directory when loading deck

* move shared code into new dlg class
2025-01-05 17:40:20 -05:00
BruebachL
9c38c9ed1b Differentiate logging in order to silence certain modules. (#5419)
* Differentiate logging in order to silence certain modules.

* Lint cmake.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-01-05 17:38:51 -05:00
RickyRister
38e99f2e87 implement /card command (#5413) 2025-01-04 02:07:43 +00:00
RickyRister
68226786a2 don't redraw PrintingSelector's FlowWidget unless cards actually changed (#5392) 2025-01-04 01:49:54 +00:00
RickyRister
455cd9717a add menu action to open settings folder (#5412) 2025-01-04 01:49:41 +00:00
RickyRister
fa79c5c36a populate default debug.ini with more values (#5411)
* populate default debug.ini with more values

* move the default debug.ini to a resource
2025-01-03 20:50:30 +00:00
RickyRister
0402d4b853 add debug setting to load deck and ready on join (#5409)
* new property

* refactor deck loading to new method

* another new method

* works now
2025-01-02 17:08:51 -05:00
RickyRister
8a427955e7 Add debug setting to start local game on startup (#5408)
* new properties

* refactor

* start local game on startup

* disable autoconnect
2025-01-02 09:51:59 -05:00
RickyRister
bb4214e28a Make SettingsManager params const ref (#5405)
* pass settingsPath by const ref

* pass params by const ref

* cleanup
2025-01-02 00:33:37 -05:00
RickyRister
f924b04efd add debug settings; option to show cardIds (#5404)
* add debug settings; option to show cardIds

* pass param by const ref

* change group structure again

* create debug.ini if not exists
2025-01-02 00:32:58 -05:00
transifex-integration[bot]
62f60867a9 Translate cockatrice_en@source.ts in pt_BR (#5407)
100% translated source file: 'cockatrice_en@source.ts'
on 'pt_BR'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-01-02 00:32:29 -05:00
transifex-integration[bot]
b5844f1244 Translate cockatrice/cockatrice_en@source.ts in it (#5406)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'it'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2025-01-01 22:28:42 -05:00
ryder052
8c0093d453 Crashfix for opening Deck editor (#5403)
* CardDatabase::getCards() no longer copies the whole database

---------

Co-authored-by: Jakub Mrowinski <ryder052@outlook.com>
2025-01-01 19:25:04 -05:00
RickyRister
34df4cd060 support multi-select in deck editor (#5397)
* support multiselect in deck editor

* fix crash

* don't reset selection after each action

* maintain old reselecting behavior when changing cards from left side

* fix crash for real (probably)

* maintain reselection behavior when deleting single selection
2025-01-01 00:43:47 -05:00
Zach H
99eea3a662 Improve Database Backup Speed (#5400)
* Support better indexes for Servatrice

- Prevent searching only on msg for logs
2025-01-01 00:28:57 -05:00
Zach H
6e1047032d Keep card annotations on stack (#5399) 2024-12-31 14:08:25 -05:00
transifex-integration[bot]
b2a8748bc6 Translate cockatrice/cockatrice_en@source.ts in it (#5398)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'it'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-31 13:57:14 -05:00
transifex-integration[bot]
ded6d5b8eb Translate cockatrice/cockatrice_en@source.ts in de (#5395)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-30 19:18:00 +00:00
transifex-integration[bot]
832842c20c Translate cockatrice_en@source.ts in en_US (#5394)
100% translated source file: 'cockatrice_en@source.ts'
on 'en_US'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-30 17:42:32 +00:00
github-actions[bot]
b43e4ae469 Update translation source strings (#5393)
Co-authored-by: github-actions <github-actions@github.com>
2024-12-30 12:38:30 +00:00
Zach H
026afeb885 Support auto-reconnect for Servatrice (#5391)
- Fix #5022
2024-12-30 04:35:32 +00:00
RickyRister
b6793a5e01 fix cards having the wrong printing if rejoin game before card db finishes loading (#5390)
* rename cardInfoUpdated to refreshCardInfo and make it public

* refresh card infos when db finishes loading
2024-12-30 03:25:11 +00:00
moryall
d231264a16 Update Dockerfile Ubuntu version to newest LTS (#5108)
* Update Dockerfile to non-outdated Ubuntu version

1. Updated image to jammy as it is still in it's LTS window. Didn't go with 24.04/Noble as it released after latest version of cockatrice released.
2. Had to add new ARG
3. No qt5-default library, so replaced with qt5-qmake

* Update Dockerfile

Upped from Jammy -> Noble
Upped from Qt5 -> Tt6

* Update Dockerfile - new port

Added Port 4748 for new features

* Update Dockerfile

Changed Noble - > 24.04

* indentation

* remove unused dependencies

---------

Co-authored-by: tooomm <tooomm@users.noreply.github.com>
2024-12-30 01:54:18 +00:00
ryder052
6e02bdec2e Fix crash on replay list sorting, fix error popups on win debug (#5388)
* Fix annoying popups on start

* Fix replay list item parent index calculation #5311

---------

Co-authored-by: Jakub Mrowinski <ryder052@outlook.com>
2024-12-30 01:10:12 +00:00
transifex-integration[bot]
cfaadc40b1 Translate cockatrice_en@source.ts in pt_BR (#5386)
100% translated source file: 'cockatrice_en@source.ts'
on 'pt_BR'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-30 00:57:51 +00:00
transifex-integration[bot]
93475b43a5 Updates for project Cockatrice and language it (#5387)
* Translate cockatrice/cockatrice_en@source.ts in it

100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'it'.

* Translate webclient/src/i18n-default.json in it

100% translated source file: 'webclient/src/i18n-default.json'
on 'it'.

* Translate oracle/oracle_en@source.ts in it

100% translated source file: 'oracle/oracle_en@source.ts'
on 'it'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-30 00:57:43 +00:00
RickyRister
3348e051a1 update recently opened decks when saving a new deck (#5389) 2024-12-30 00:57:31 +00:00
Zach H
dad1aea128 Show correct art on middle mouse popup (#5385) 2024-12-29 23:24:32 +00:00
Zach H
dec001114a Clone now clones the exact printing, when possible (#5384) 2024-12-29 23:24:20 +00:00
ZeldaZach
1ce7b9f7de Update number when 'Reveal top cards of library' used 2024-12-29 16:31:13 -05:00
Zach H
2ff99f12d8 Require Admin Permissions to install Cockatrice Windows (#5383)
Fix #5382
2024-12-29 16:22:39 +00:00
tooomm
6679705254 Simpler naming (#5381) 2024-12-29 15:41:30 +00:00
transifex-integration[bot]
7eafac5b1a Translate cockatrice_en@source.ts in en_US (#5377)
100% translated source file: 'cockatrice_en@source.ts'
on 'en_US'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-29 07:11:02 +00:00
RickyRister
ac3aa949ad add "view related cards" right click menu to card info widget (#5375) 2024-12-29 06:11:12 +00:00
Zach H
b4036c8671 Disable CardMenu iff no items selected (#5376)
- Fix #4372
2024-12-29 06:10:27 +00:00
github-actions[bot]
4e0de1c066 Update translation source strings (#5373)
Co-authored-by: github-actions <github-actions@github.com>
2024-12-29 03:37:53 +00:00
RickyRister
f32890916d don't disable autoconnect on disconnect (#5372)
* don't disable autoconnect on disconnect

* update autoConnect on clicking the checkbox
2024-12-29 03:07:00 +00:00
Zach H
24a0dac420 Fix Windows Portable Crash (#5371) 2024-12-29 03:02:52 +00:00
RickyRister
716bc00533 fix "forgot password" closing connection dialogue on cancel (#5369) 2024-12-29 02:23:58 +00:00
Zach H
32dd18998d Combine card legalities in Oracle (#5370)
- Some printings have different legalities, which cause Oracle to bug out
- Fix #4783
2024-12-29 02:23:39 +00:00
ZeldaZach
5e62069444 Fix Windows Crash due to nullptr 2024-12-28 21:02:10 -05:00
Zach H
bf63dc4ab7 Add option to remove saved sever (#5368)
* Add option to remove saved sever

- Fix #4099
- Removes old method that didn't work
2024-12-29 00:37:49 +00:00
Danny Piper
7679546e30 Add Nix shell (#5362) 2024-12-28 23:52:57 +00:00
Zach H
45b11dc984 Add password reset button label (#5367) 2024-12-28 23:52:14 +00:00
RickyRister
25d21a3da6 refactor: remove ReleaseChannel keeping track of its own indexes (#5366) 2024-12-28 23:51:37 +00:00
Zach H
c8d49b5bf9 Support macOS-15 Builds (#5364) 2024-12-28 23:09:01 +00:00
RickyRister
f737d9a794 fix bug with release channel setting not being remembered (#5365) 2024-12-28 23:08:07 +00:00
RickyRister
df9c5ae53c Check for client updates on startup (#5359) 2024-12-28 21:29:59 +00:00
transifex-integration[bot]
e0829a75d2 Translate cockatrice/cockatrice_en@source.ts in it (#5363)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'it'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-28 21:01:34 +00:00
Zach H
1f58f7e93d Support Mod/Admin Notes Section (#5361) 2024-12-28 18:05:49 +00:00
transifex-integration[bot]
14807ba036 Translate oracle/oracle_en@source.ts in pl (#5360)
100% translated source file: 'oracle/oracle_en@source.ts'
on 'pl'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-28 15:31:16 +00:00
transifex-integration[bot]
75fb3894a6 Translate oracle/oracle_en@source.ts in pt_BR (#5358)
100% translated source file: 'oracle/oracle_en@source.ts'
on 'pt_BR'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-28 12:08:58 +00:00
github-actions[bot]
18119bd11b Update translation source strings (#5357)
Co-authored-by: github-actions <github-actions@github.com>
2024-12-28 06:33:57 +00:00
RickyRister
4c7796537f Support folder download in deck storage tab (#5356)
* refactor

* support folder download
2024-12-28 06:31:18 +00:00
RickyRister
3452cb01d0 fix replay download not working if replay folder is empty (#5355)
* fix downloading single replays

* fix downloading replay folder
2024-12-28 06:15:25 +00:00
RickyRister
6a151ef97a Add button to open decks folder (#5354) 2024-12-28 05:09:46 +00:00
RickyRister
e3d651668c Add button to open replays folder (#5352) 2024-12-28 05:06:26 +00:00
Zach H
7a5704beaa Support Moderator/Admin force activating users (#5353) 2024-12-28 05:01:31 +00:00
RickyRister
37b78a9a4c change action's text to "unconcede" when player is conceded (#5351) 2024-12-28 00:01:36 +00:00
Zach H
8bc5a9d581 Merge pull request #5350 from Cockatrice/fix_1953
Allow Moderators/Admins to Grant Replay Access
2024-12-27 18:51:11 -05:00
ZeldaZach
57ed162b79 Fix Linter 2024-12-27 18:35:52 -05:00
ZeldaZach
3524231500 Allow Moderators/Admins to Grant Replay Access
- Only to themselves, at this time
- Automatically refreshes feed, no need to re-login
2024-12-27 18:32:39 -05:00
Zach H
5cfe2b4762 Merge pull request #5348 from Cockatrice/set_owner
Establish Card Ownership & Return on Player Leave
2024-12-27 18:26:45 -05:00
ZeldaZach
a8bac1e468 Return Tagged Cards to Owner, if possible, on concede/leave 2024-12-27 18:23:39 -05:00
ZeldaZach
4f798286af Establish Card Ownership Tag 2024-12-27 18:23:09 -05:00
transifex-integration[bot]
8a04b2d69d Translate cockatrice/cockatrice_en@source.ts in de (#5349)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-27 22:26:03 +00:00
transifex-integration[bot]
17893d9747 Translate oracle/oracle_en@source.ts in it (#5347)
100% translated source file: 'oracle/oracle_en@source.ts'
on 'it'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-27 20:13:57 +00:00
ZeldaZach
8af49406cd Un-translate 'ms' 2024-12-27 14:18:44 -05:00
transifex-integration[bot]
3b068b79fe Translate webclient/src/i18n-default.json in fr (#5346)
100% translated source file: 'webclient/src/i18n-default.json'
on 'fr'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-27 08:36:06 +00:00
transifex-integration[bot]
ce14e83e78 Translate webclient/src/i18n-default.json in es (#5345)
100% translated source file: 'webclient/src/i18n-default.json'
on 'es'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-27 08:35:58 +00:00
transifex-integration[bot]
f213d6fda7 Translate cockatrice_en@source.ts in en_US (#5344)
100% translated source file: 'cockatrice_en@source.ts'
on 'en_US'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-27 08:35:48 +00:00
RickyRister
83db00d7a3 reduce vertical spacing in PrintingSelector (#5342) 2024-12-27 08:35:38 +00:00
ZeldaZach
7e9bd88eb4 Fix Shutdown Server 2024-12-27 01:38:21 -05:00
github-actions[bot]
ea716ca440 Update translation source strings (#5343)
Co-authored-by: github-actions <github-actions@github.com>
2024-12-27 06:19:12 +00:00
ZeldaZach
3cd7a04002 Change Settings from Min to Base Size 2024-12-26 23:54:24 -05:00
RickyRister
914002f846 use grid instead of FlowWidget for PrintingSelector display options (#5341)
* use grid instead of FlowWidget for PrintingSelector display options

* remove one level of nesting
2024-12-27 02:08:07 +00:00
Zach H
17b82a186f Add QSet for faster lookups in CardDatabase (#5332) 2024-12-26 19:52:18 -05:00
RickyRister
7a8e957476 allow playing cards directly transformed from hand (#5339) 2024-12-26 19:51:58 -05:00
Zach H
6dfd354973 Support starting games with fewer than max players (#5338) 2024-12-26 18:32:20 -05:00
RickyRister
956c12eb32 remove shortcut workaround; always add card menu to player (#5337)
* remove workaround

* make aCardMenu less innocuous

* make card menus active for all players
2024-12-26 16:49:17 -05:00
RickyRister
d5ae4eed26 Ctrl drag now adds/removes to selection (#5336)
* refactor: clean up to use for-each loop

* track cards in rect so far and toggle isSelected on change

* only clear selection if ctrl isn't held

* fix build errors
2024-12-26 15:08:20 -05:00
RickyRister
ca486e5ed9 Don't display unusable actions in opponent's card menus (#5335) 2024-12-26 10:23:54 -05:00
RickyRister
de63066b0b fix deck storage open deck not working at all when folder is in selection (#5333) 2024-12-26 00:25:30 -05:00
Zach H
c7ca55ceb5 Support Picking Select Art per Card Basis (#5329) 2024-12-25 23:12:06 -05:00
RickyRister
024bef7ded add local rename button to replays tab (#5331) 2024-12-25 22:34:24 -05:00
RickyRister
34d3d60f95 fix text missing from chat macro list's buttons when hidden (#5330)
* fix text missing from chat macro list's buttons when hidden

* turns out you don't need to set tooltip if you already set text
2024-12-25 22:32:53 -05:00
RickyRister
ed907d7c6f Support downloading replay folders (#5325)
* rename old get replay match method to get enclosing

* creat raw getReplayMatch method

* implement thing
2024-12-25 07:33:36 -05:00
RickyRister
9d7fd66546 fix text missing from download url list's buttons when hidden (#5326) 2024-12-25 07:29:55 -05:00
RickyRister
9934841950 make better use of space in download url settings window (#5327) 2024-12-25 07:29:27 -05:00
RickyRister
432fe1100b gitignore all cmake-build folders (#5328) 2024-12-25 07:28:41 -05:00
Zach H
d987628935 Reorder String options for Filtering (#5324) 2024-12-25 00:58:59 -05:00
RickyRister
4c3ceae0e4 open replays on double-click in replays tab (#5323) 2024-12-25 00:34:43 -05:00
RickyRister
2b9d7538bf open decks on double-click in deck storage tab (#5322) 2024-12-25 00:33:48 -05:00
RickyRister
4ca1fc083d add "open recent" menu option to deck editor tab (#5319)
* add "open recent" menu option to deck editor tab

* change texts

* also get it to work with loading from deck storage tab

* add error message when fail to open

* only update recents on successful open

* only update recents on successful open

* reword to "Clear"
2024-12-24 19:55:04 -05:00
BruebachL
e7585271fb The printingSelector should set the deckEditor modified flag on adding/removing cards. (#5321)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2024-12-24 10:28:58 -05:00
RickyRister
6e6824117d add new folder button to local deck storage tab (#5318)
* add new folder button to local deck storage tab

* allow delete button to delete folders
2024-12-24 00:26:11 -05:00
RickyRister
3e5f2fd8b2 add new folder button to game replays tab (#5317) 2024-12-24 00:23:13 -05:00
RickyRister
6e470d788e Support multi-select for remote decks in deck storage tab (#5315)
* enable multiselection

* support multi open deck

* support multi download

* support multi delete
2024-12-24 00:05:49 -05:00
RickyRister
a40d8092ce support multi-select for local decks in deck storage tab (#5314)
* allow multi-select

* support multi upload

* support multi open deck

* support multi delete deck
2024-12-23 20:41:15 -05:00
RickyRister
0234a70bfd fix bug with uploading unnamed decks ignoring the prompt (#5313) 2024-12-23 20:39:57 -05:00
RickyRister
705b1e0c2b support multi-select for remote replays in game replays tab (#5310) 2024-12-23 20:38:47 -05:00
RickyRister
69379334f9 support multi-select for local replay tab (#5309) 2024-12-23 20:31:58 -05:00
transifex-integration[bot]
12e50a1f2f Translate cockatrice_en@source.ts in en_US (#5308)
100% translated source file: 'cockatrice_en@source.ts'
on 'en_US'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-23 20:30:17 -05:00
RickyRister
ec17a477be shortcut search now displays all rows in section (#5307) 2024-12-23 20:29:52 -05:00
github-actions[bot]
205e1c7a59 Update translation source strings (#5305)
Co-authored-by: github-actions <github-actions@github.com>
2024-12-22 18:35:34 -05:00
transifex-integration[bot]
ffb60c06cb Translate oracle_en@source.ts in en@pirate [Manual Sync] (#5295)
4% of minimum 3% translated source file: 'oracle_en@source.ts'
on 'en@pirate'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-22 18:01:02 -05:00
transifex-integration[bot]
2280f59ee6 Translate i18n-default.json in nl [Manual Sync] (#5297)
19% of minimum 3% translated source file: 'i18n-default.json'
on 'nl'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-22 18:00:44 -05:00
transifex-integration[bot]
0d4dd63edc Translate i18n-default.json in es [Manual Sync] (#5299)
99% of minimum 3% translated source file: 'i18n-default.json'
on 'es'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-22 18:00:39 -05:00
transifex-integration[bot]
69f1f4c1a5 Translate i18n-default.json in fi [Manual Sync] (#5301)
13% of minimum 3% translated source file: 'i18n-default.json'
on 'fi'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-22 18:00:35 -05:00
transifex-integration[bot]
d930d9c237 Updates for project Cockatrice and language tr (#5296)
* Translate oracle_en@source.ts in tr [Manual Sync]

36% of minimum 3% translated source file: 'oracle_en@source.ts'
on 'tr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate cockatrice_en@source.ts in tr [Manual Sync]

6% of minimum 3% translated source file: 'cockatrice_en@source.ts'
on 'tr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-22 18:00:31 -05:00
transifex-integration[bot]
9c782d130f Translate i18n-default.json in pt_BR [Manual Sync] (#5298)
100% translated source file: 'i18n-default.json'
on 'pt_BR'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-22 18:00:13 -05:00
transifex-integration[bot]
f12053f39d Translate i18n-default.json in de [Manual Sync] (#5300)
100% translated source file: 'i18n-default.json'
on 'de'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-22 18:00:05 -05:00
transifex-integration[bot]
bcf6ca4f87 Translate i18n-default.json in fr [Manual Sync] (#5302)
99% of minimum 3% translated source file: 'i18n-default.json'
on 'fr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-22 17:59:55 -05:00
transifex-integration[bot]
46619bb425 Translate i18n-default.json in ru [Manual Sync] (#5303)
14% of minimum 3% translated source file: 'i18n-default.json'
on 'ru'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-22 17:59:46 -05:00
transifex-integration[bot]
cdd870a129 Translate i18n-default.json in en_US [Manual Sync] (#5304)
100% translated source file: 'i18n-default.json'
on 'en_US'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-22 17:59:35 -05:00
transifex-integration[bot]
7a1b7b9438 Updates for project Cockatrice and language it (#5294)
* Translate cockatrice_en@source.ts in it [Manual Sync]

99% of minimum 3% translated source file: 'cockatrice_en@source.ts'
on 'it'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate i18n-default.json in it [Manual Sync]

100% translated source file: 'i18n-default.json'
on 'it'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-22 17:59:24 -05:00
transifex-integration[bot]
2183ada1f2 Translate oracle_en@source.ts in cs [Manual Sync] (#5293)
3% of minimum 3% translated source file: 'oracle_en@source.ts'
on 'cs'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-22 17:58:35 -05:00
Zach H
1d9e64ec73 Fix settings dialog tr (#5292) 2024-12-22 17:39:43 -05:00
Zach H
5339be318e Fix "ghosting" of cards sticking on invalid moves (#5289) 2024-12-22 17:35:44 -05:00
Zach H
e1ba39c437 Fix multiple "Selected Cards" in Menu on MacOS (#5288) 2024-12-22 04:33:09 +00:00
BruebachL
07ee271478 Refactor codebase to new Qt Slot/Signal syntax - Pt1 (#5202)
---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2024-12-22 02:01:17 +00:00
RickyRister
4823cce622 Show conflicting shortcut in error message (#5287) 2024-12-22 01:58:55 +00:00
Zach H
23099f7e8b Fix token name highlight on open (#5286) 2024-12-22 01:43:00 +00:00
RickyRister
5bdbd51fa8 implement search bar in shortcuts menu (#5285)
* implement search bar in shortcuts menu

* remove unneeded imports

* use expandAll
2024-12-22 00:21:53 +00:00
BruebachL
a0e5871c6e Fix the image shrinking due to repeated scaling and FP precision loss. (#5284)
* Fix the image shrinking due to repeated scaling and FP precision loss.

* Add a setting for auto-rotating sideways layout cards.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2024-12-21 22:47:43 +00:00
RickyRister
3cf0904651 add action to select all cards in table row (#5280) 2024-12-21 18:52:19 +00:00
Zach H
2bd06ff0fd Add CrashDump support for Windows OS (#5282) 2024-12-21 18:52:07 +00:00
RickyRister
6ea333d0f1 move SearchLineEdit into custom_line_edit file (#5281) 2024-12-21 05:12:14 +00:00
Zach H
91d2485940 Update PegLib, Fix Database Searching CFG (#5244)
* Support C++20 Standard

* Update peglib.h

* Fix lambdas

* Move from for loops to std::any/all_of

* Support fixed CFG

* Fix Rarity Search to be more accurate
2024-12-21 03:37:08 +00:00
RickyRister
0d99b2bcf4 make unattach shortcut always active (#5278) 2024-12-20 05:56:48 +00:00
RickyRister
a54a424f84 add action to select all cards in column (#5277)
* add action to select all cards in column

* change default shortcut to Ctrl+Shift+C
2024-12-20 03:39:17 +00:00
RickyRister
3514699f5b check that target card is in play before attaching (#5275) 2024-12-19 23:55:04 +00:00
RickyRister
d196988cab allow attached cards to be moved to other zones (#5276) 2024-12-19 23:53:48 +00:00
BruebachL
03aff83135 Add the ability to define starting life total during game creation. (#5174)
* Have the server respect gameType info when setting up zones.

* ServerPlayer::setupZones is now passed the room->getGameTypes();
* ServerPlayer::setupZones now checks if the GameType String includes "Commander" and then sets the life total to 40 instead.

* Formatting.

* Remove debug logging imports.

* Move game option value declarations to dlg_create_game.

* Lint.

* Fix mocks.

* Add a default for backwards compatibility.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2024-12-19 23:52:47 +00:00
RickyRister
17e6bfaca6 fix bug with multi-attach sometimes only attaching one card (#5272) 2024-12-19 13:38:57 +00:00
Zach H
90281262be Revert "Revert "Rotate split cards (#5264)" (#5269)" (#5273)
This reverts commit d41aa30e10.
2024-12-19 13:25:54 +00:00
RickyRister
5bbc118920 fix bug introduced in #5267 (#5270)
* fix bug introduced in #5267

* remove default args to prevent similar bugs in the future

* add newInstance overload with default properties
2024-12-19 13:17:09 +00:00
ZeldaZach
dde2f8b9ad Bump Win Qt6 6.5.3->6.6.*
- Fix #4968
2024-12-19 01:09:04 -05:00
Zach H
d41aa30e10 Revert "Rotate split cards (#5264)" (#5269)
This reverts commit a5c509981b.
2024-12-19 06:03:48 +00:00
RickyRister
231d0380a7 reword "open deck in new tab" setting (#5268) 2024-12-19 05:52:40 +00:00
BruebachL
a5c509981b Rotate split cards (#5264) 2024-12-19 04:13:45 +00:00
Zach H
71b01e6110 ADD landscapeOrientation field (#5267) 2024-12-19 03:52:34 +00:00
RickyRister
c716f85962 refactor: remove cipt param from Player::playCard (#5266) 2024-12-19 02:46:14 +00:00
BruebachL
245d51caea New printing selector (#5182)
* Squashed Commits

Lint things.

Set focus back to deckView after selecting a card to enable keyboard navigation.

Bump scrollbar to top when selecting a new card.

Update card info on hover.

Layout cleanups

Add +- to buttons.

Merge buttons into card picture.

Cleanup size, min 2 cards by default in rows

Support layout settings config and set min to 525 so two cols are visible by default for printings, when opened

Move Printing Selector to before Deck, and visible true

Null safety for setCard.

Turn down the dropshadow a little.

Make PrintingSelector dockable, don't duplicate sets when bumping them to the front of the list.

When swapping cards between mainboard and sideboard, use preferred printing if no uuid is available (i.e. null).

Reorder includes...

Unwonk an include.

Give the card widget a snazzy drop shadow, appease the linter gods.

Handle jumping between segments

Remember scale factor when initializing new widgets.

Cleanup

Select Card works (Not M->SB tho)

Resize word-wrapped label properly.

Fix the layouting, mostly.

remove tx

Build Fix

Squashed Commits

Load and store redirects properly.

Layouting is fun :)

* Group PrintingSelectorCardDisplayWidgets into distinct containers for alignment purposes.

Override resizeEvent() properly.

Word wrap properly.

Keep widget sizes uniform for aesthetic reasons (grid pattern).

Label stuff, center card picture widget, allow cardSizeSlider to scale down.

Replace cards which have no uuid in the decklist when first selecting a printing.

Add buttons for previous and next card in DeckList.

Add a card size slider.

Move sort options initialization to implementation file.

Explicitly nullptr the parent for the PrintingSelector.

Address PR comments (minor cleanups).

Hook up to the rows removed signal to update card counts properly.

Include QDebug.

Add labels to the mainboard/sideboard button boxes.

Implement a search bar.

Expand node recursively when we add a new card.

Only create image widgets for the printing selector if it is visible in order to not slow down image loading.

Minor Tweaks

Invert decklist export logic to write out setName, collectorNumber, providerId value if it is NOT empty.

Linting.

Update CardCounts properly, update PrintingSelector on Database selection.

Initialize sideboard card count label properly.

Split mainboard/sideboard display and increment/decrement buttons.

Add button to sort all sortOptions by ascending or descending order.

Add option to sort by release date in ascending or descending order.

Add PrintingSelector to database view.

Display placeholder image before loading.

Fix deckEditor crash on mainboard/sideboard swap by correcting column index to providerId instead of shortName.

Include currentZoneName, fix the column when updating from DeckView indexChanged to be UUID and not setShortName so cards are properly fetched again.

The most minor linter change you've ever seen.

Null checks are important.

Linter again.

Linter and refactor to providerId.

Sort properly, (We don't need a map, we need a list, a map won't be ordered right [i.e. 1, 10, 11, 2, 3, 4, ..., 9])

Sort alphabetically or by preference.

Hook printingSelector up to the CardInfoFrameWidget.

Allow info from CardFrame to be retrieved, properly initialize PrintingSelector again.

Refactors to reflect CardInfoPicture becoming CardInfoPictureWidget.

Make PrintingSelector re-usable by introducing setCard().

Make PrintingSelector use the CardFrame, not the database index.

Add a new selector widget for printings.

* Support multiple <set> tags per card within the database

This will allow us to show off all different printings for cards that might appear multiple times in a set (alt arts, Secret Lairs, etc.)

* Support Flip Cards with related art

* Minor Cleanup

* Minor Cleanup

* Release Date DESC default

* Load widgets in batches.

* Refactor local batch variables to be class variables/defines.

* Clear timer on updateDisplay.

* Fix Timer & Builds on Qt5

* Not Override

* Yes Override

* Yes Override

* Lint

* Can't override in function definition.

* Resize setName to picture width on initialization.

Also add a new signal to card_info_picture_widget to emit when the scale factor changes.

Hook this up to the setName resizing method to ensure card size updates trigger it appropriately after initialization.

Clean up unused enter and resize methods that just delegated to base-class.

* Add ability to force preferred set art to be loaded for every card.

* Show related cards from printing selector by right-clicking card image.

* fix build

* Fix UST cards

* Inc QDebug

* Fix Qt5 Builds

* Fix Qt5 Builds

* Fix Qt5 Builds

* Fix Qt5 Builds

* Fix Qt5 Builds

* Fix cards being able to jump between side and mainboard

* Don't hide PrintingSelector button widgets if the deck contains a card from the set.

* Update PrintingSelector properly on DeckListModel::dataChanged

* Add option to disable bumping sets to the front of the list if the deck contains cards from the set.

* Linter behave.

* Linter behave.

* Fix mocks.

* Fix cards without providerIds being counted for all cards.

* Flip preference sort so descending means "Most to least preferred".

* Set the index correctly when removing a non-providerId printing for a providerId printing to avoid jumping to the next card.

* Move the "Next/Previous" card buttons to their own widget.

* Move the card size slider to its own widget.

* Lint the makelist.

* Linter

* Crash fix

* Move the sorting options to their own widget.

* Move the search bar to its own widget.

* Minor cleanup

* Minor cleanup

* Minor cleanup

* Only overwrite card in deck if UUID _and_ Number missing

* Adjust font size when adjusting card size.

* Clean up some imports.

* Pivot to a view options toolbar.

* Persist sort options and change default to 'preference'.

* Lint.

* Remember how many cards were originally in deck when replacing with uuid version.

* Relabel buttons for clarity.

* Fix tests.

* Fix tests properly.

* Fix dbconverter mock.

* Try to wrangle font sizes.

* Update mainboard/sideboard labels correctly.

* Initialize button sizes correctly.

* Label texts are supposed to be white.

* Adjust another deckModel->findCard call to include number parameter.

* Style buttons again.

* Negative currentSize means we don't render the widget yet, return a default value.

* Clean up debug statements.

* Boop the mainboard/sideboard label and the cardCount after a little bit of delay to make sure they initialize at the right size.

* Persist card size slider selection in SettingsCache.

* Good Lint Inc.

* updateCardCount to get white color in initializer

* Make the view display options functional.

* Comment ALL the things.

* Lint the things.

* Brief accidentally nuked some constants.

* Proper Qt slot for checkboxes.

* Don't use timers, Qt provides ShowEvent for anything necessary before the widget is shown.

* Cleanup from Reading

* Cleanup Lints

* Minor

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: Zach Halpern <zahalpern+github@gmail.com>
2024-12-19 02:40:34 +00:00
RickyRister
e588917f6c don't snap already-expanded cardview windows (#5265) 2024-12-19 02:27:40 +00:00
RickyRister
27e5d21b6b fix bug with scrollbar resizing (#5263) 2024-12-18 05:16:47 +00:00
RickyRister
b894b75e6a add clone action to card menu in all zones that it functions in (#5259) 2024-12-18 04:48:06 +00:00
RickyRister
116397cdb3 add option to auto-play "put top card on stack until" hits (#5258)
* rename variables

* implement feature

* readd null check
2024-12-18 04:47:49 +00:00
RickyRister
a6b5abf271 clicking to play can now play all selected (#5254)
* play action now applies to all selected cards

* check card zone before applying action

* fix bug with wonky play from deck

* refactor

* don't play card if it's already on table

* add new setting

* make actPlay and friends public

* implement thing

* refactor card_item
2024-12-18 04:43:17 +00:00
RickyRister
fd5a649246 fix clone shortcut not working on opponent's cards (#5251)
* implement fix

* fix nullptr bug

* also add the selectAll action to the always active shortcuts
2024-12-18 04:41:12 +00:00
RickyRister
e8e57989ba Reload card database action now also reloads the download urls (#5262)
* add sync method to SettingsManager

* sync download urls on reload card database
2024-12-18 04:39:58 +00:00
RickyRister
03db4ccce6 ability to directly attach from other zones (#5250)
* add attach and draw arrow actions to more card menus

* implement attaching from other zones

* disallow attaching from deck

* do nothing if target is already attached

* add null check
2024-12-18 04:38:22 +00:00
RickyRister
c9d5d5609c Double click to untap works when multi-zone select (#5253) 2024-12-17 03:58:25 +00:00
RickyRister
ac16206ddb Add action to select all cards in zone (#5246)
* rip shortcut for aDrawArrow

* implement thing

* add separator below hide

* shorten text by 1 word

* move shortcut to under Playing_Area

* rebind draw arrow shortcut to Alt+A

* remove auto hotkey

* shorten to "Select All"

* add back auto-hotkey
2024-12-16 03:55:47 +00:00
RickyRister
5f8bcbd02d Add keyboard shortcut for "hide" action (#5248)
* implement hide shortcut

* remove parens
2024-12-15 20:34:33 +00:00
RickyRister
a0f74134bb make card view window max initial height configurable (#5236) 2024-12-14 03:02:00 +00:00
Zach H
0463a6fd70 Support Windows Debug Builds (#5242) 2024-12-13 21:58:46 +00:00
RickyRister
a5de633c64 warn if "play top card until" filter expression doesn't match any card in database (#5243)
* make FilterString::check const

* implement thing
2024-12-13 21:58:29 +00:00
RickyRister
b2ad2acff3 improve FilterString validation error message (#5240) 2024-12-13 06:26:58 +00:00
dependabot[bot]
4ee6ff73e0 Bump nanoid from 3.3.4 to 3.3.8 in /webclient (#5239)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.4 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.4...3.3.8)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-13 04:45:05 +00:00
RickyRister
628bdde939 hide action now applies to all selected cards (#5233)
* hide action now applies to all selected cards

* check card zone before applying action

so that we don't nuke cards from existence when we select across multiple zones

* small fixes

* remove redundant loop

* nullcheck view
2024-12-13 04:42:53 +00:00
RickyRister
e9b78c1c59 "Play top cards until" action now has option for number of hits (#5229)
* create new dlg window

* get thing to work

* move validation into dlg

* remove nodiscard

I'll revert this if someone else complains
2024-12-12 14:03:42 +01:00
RickyRister
315cbc0925 fix remaining wonkiness with rewind buffering in replays (#5235) 2024-12-11 10:54:36 +01:00
ebbit1q
69741d858c fix crash using uninitialised memory from #5228 (#5237) 2024-12-11 01:19:53 +00:00
tooomm
20d99a78b6 pretty print translation files (#5234) 2024-12-09 23:46:57 +00:00
RickyRister
2d68393e07 dynamically resize scrollbar when zone view window is resized (#5228) 2024-12-09 19:01:37 +00:00
RickyRister
8cb1470643 add option to show keyboard shortcuts in right click menu (#5225) 2024-12-09 18:58:37 +00:00
dependabot[bot]
8d9b27bf47 Bump path-to-regexp and express in /webclient (#5226)
Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `path-to-regexp` from 0.1.10 to 0.1.12
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v0.1.10...v0.1.12)

Updates `express` from 4.21.0 to 4.21.2
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.2/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.0...4.21.2)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-09 18:54:47 +00:00
transifex-integration[bot]
0c5d9f1a7d Translate webclient/src/i18n-default.json in de (#5222)
100% translated source file: 'webclient/src/i18n-default.json'
on 'de'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-09 18:54:32 +00:00
transifex-integration[bot]
a7d88c06c1 Translate webclient/src/i18n-default.json in it (#5223)
100% translated source file: 'webclient/src/i18n-default.json'
on 'it'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-09 18:54:24 +00:00
transifex-integration[bot]
2735000fcf Translate webclient/src/i18n-default.json in pt_BR (#5224)
100% translated source file: 'webclient/src/i18n-default.json'
on 'pt_BR'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-09 18:54:15 +00:00
RickyRister
a39de270cd make rewind buffering timeout configurable (#5227)
* update settingsCache

* implement thing

* add new setting to window

* rename setting

* make it compile on qt5

* fix typo

* somehow changing the order here fixes a bug?

The loaded value was getting clamped to 99
2024-12-09 02:25:10 +00:00
tooomm
10f11213d3 fix indentation again (#5230) 2024-12-09 01:23:45 +00:00
tooomm
3b49cbf73b Rename label (#5232) 2024-12-09 01:23:27 +00:00
Zach H
e4cfe08113 Address weird crash case (#5221)
* Address weird crash case

* Address weird crash case

* remove const
2024-12-05 12:18:41 +01:00
transifex-integration[bot]
fa02cb885c Updates for project Cockatrice and language nl (#5220)
* Translate cockatrice/cockatrice_en@source.ts in nl

100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'nl'.

* Translate oracle/oracle_en@source.ts in nl

100% translated source file: 'oracle/oracle_en@source.ts'
on 'nl'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-03 16:17:54 +01:00
transifex-integration[bot]
69b864fa02 Translate cockatrice_en@source.ts in en_US (#5217)
100% translated source file: 'cockatrice_en@source.ts'
on 'en_US'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-12-01 19:59:19 -05:00
J. Cameron McDonald
b9ed9a6c0b feat: set prioritization by set type (#5097)
* feat: prefer 'Core' and 'Expansion' sets for prioritization

* rework set prioritization

* clean up priority enum

* formatting

* revert changes to CockatriceXml3Parser

* re-add missing null check

* remove priority fallback ternary from CardSet model

* make defaultSort logic easier to follow

* revert changes to v3 card database xsd

* remove unused invisible priority col from sets dialog

* move draft innovation and duel deck sets to secondary prio

* minor fixes

* change PriorityFallback to 1

* make priority optional in xml

* remove PriorityUndefined and set PriorityFallback to 0

* set priority when not found to PriorityOther

in case a new set type is added it's unlikey we want it sorted first,
it'll probably be a new product so it's probably best to sort it with
the funny things

* simplify sort function

---------

Co-authored-by: tooomm <tooomm@users.noreply.github.com>
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2024-12-01 19:59:00 -05:00
RickyRister
5156495b47 add more sort options (#5214)
* distinguish between groupBy and sortBy options

* add more sort options
2024-11-30 22:32:39 -05:00
RickyRister
b92047bc3f rename and refactor some stuff in ZoneViewWidget (#5213)
* fix QComboBox creation order in retranslateUi

* move bottom row creation closer to where it's used

* rename QGraphicsLinearLayout variables

hFilterbox and hPilebox don't make much sense now

* add comment about #5204
2024-11-30 18:54:55 -05:00
RickyRister
70559d32df fix bug where card view window with single card is too short (#5211)
It was a divide by 0 bug lol
2024-11-30 08:53:30 -05:00
RickyRister
bb84b75db9 fix bug where card view window with pile view is too short (#5212) 2024-11-30 08:53:10 -05:00
transifex-integration[bot]
f634177973 Updates for project Cockatrice and language nl (#5170)
* Translate cockatrice/cockatrice_en@source.ts in nl

100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'nl'.

* Translate cockatrice/cockatrice_en@source.ts in nl

100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'nl'.

* Translate cockatrice/cockatrice_en@source.ts in nl

100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'nl'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-11-30 12:55:06 +01:00
Zach H
e33ff37c82 Pass QTime objects instead of references (#5209)
- References seem to go to 0 in newer Qt versions(?)

https://doc.qt.io/qt-6/qtime.html

> QTime objects should be passed by value rather than by reference to const; they simply package int.
2024-11-30 01:36:38 -05:00
RickyRister
d2bc7f6ac0 get retranslateUi to work with sort options (#5208) 2024-11-30 00:13:17 -05:00
RickyRister
5ef1ca06f5 store sort option in settings as QComboBox index instead of enum value (#5207)
* rename config property

* change default

* functional changes
2024-11-29 22:46:16 -05:00
Zach H
1d8651bc00 Fix Deck Popup Glitchy Rendering (#5204)
- QLabel sizes weren't taken into account until the widget is rendered
- Long QLabels can cause exacerbated issues
- Force refresh after 1ms to take QLabels into account
2024-11-29 12:53:19 -05:00
RickyRister
17eabf2004 add sort options to card view window (#5206)
* refactor to allow for sorting by property of choice

* implement thing

* prevent overlapping sort properties

* enable/disable pile view checkbox if groupBy is off

* fix compiler warnings

* check to disable pile view checkbox on init

* Fix builds on Qt5

* Fix builds on Qt5

---------

Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2024-11-29 12:53:06 -05:00
RickyRister
37bb1367db refactor method for positioning cards in ZoneViewZone (#5203)
* refactor out method for positioning cards in zone view

* rename some variables

* use max/min

* some small formatting stuff
2024-11-28 14:59:31 -05:00
RickyRister
24b5dab456 leave some documentation on Zone classes (#5199)
* leave some documentation on Zone classes

* small refactor

* undo functional change from refactor and clean up comments

* move variables into if block
2024-11-28 14:40:49 -05:00
Zach H
c6bfc8b8ea Fix Qt5 Slot/Signals for QCheckBoxes (#5201) 2024-11-27 22:11:55 +00:00
RickyRister
f2b0fa164e add padding to right side of card reveal window (#5198) 2024-11-27 00:17:37 -05:00
RickyRister
0ca8bdb3a8 refactor CardList (#5197) 2024-11-27 00:15:35 -05:00
RickyRister
a8471f62bc clean up DownloadSettings (#5194)
* refactor DownloadSettings

* only reset to default on first run

* use c++ foreach

* use addItems

* move default urls to static const
2024-11-26 02:12:56 +00:00
tooomm
5f1c03682f macOS version fix + wording (#5189) 2024-11-26 00:05:09 +01:00
RickyRister
3255ed3ffb add menu option to reload card db (#5196) 2024-11-25 07:43:08 +00:00
RickyRister
c51b54c0c5 rename variables for url list layout (#5195) 2024-11-25 06:27:21 +00:00
RickyRister
a3f0807d47 fix error message (#5192)
`QObject::connect: No such slot UserInterfaceSettingsPage::setNotificationEnabled(Qt::CheckState) in /Users/Ricky/GitHub/Cockatrice/cockatrice/src/dialogs/dlg_settings.cpp:448`
2024-11-24 14:52:56 +00:00
RickyRister
27055944df skip tap animation when rewinding (#5168) 2024-11-23 10:40:37 -05:00
Zach H
7b1653034b Bump macos14 XCode to 15.4 (#5188) 2024-11-22 22:52:42 -05:00
dependabot[bot]
39d8ca050f Bump cross-spawn from 7.0.3 to 7.0.6 in /webclient (#5181)
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-22 22:22:36 -05:00
Zach H
50274cb66d Change 'custom(VER)' to 'custom-VER' because Fedora mad (#5180) 2024-11-22 22:22:22 -05:00
RickyRister
bd60a9fd2e don't blink highlighted phase when backwards skipping in replays (#5185) 2024-11-22 22:21:54 -05:00
BruebachL
83409c32c4 Cache redirects properly by implementing our own QSettings cache for urls. (#5186)
* Cache redirects properly by implementing our own QSettings cache for urls.

* Load and store redirects properly.

* Set the maximum network cache size from settings value on PictureLoaderWorker instantiation.

* Address comments.

* Lint.

* Adjust debug statements to be in line with existing ones.

* Minor Tweaks

* Make redirect cache ttl a user-adjustable setting.

* Fix Build

* Minor Cleanup

* Minor Cleanup

* Build Fix

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2024-11-22 22:21:26 -05:00
RickyRister
1bc92623dc add "open in new tab" button to decklist confirmation dialogue (#5183)
* refactor to use confirmOpen

* implement extra button in confirmation

* use brackets in one-liner if statements

* refactor save confirmation window into function
2024-11-21 23:24:50 +01:00
BruebachL
f73196841a Multiple Printings per Deck (#5171)
* Refactor CardInfo Widgets to reside in their appropriate folder and to have a clearer naming structure.

* Added Zach's work on storing printing information in the DeckList (#1)

* Change CardInfo's PixmapCacheKey to be the UUID of the preferred set after database loading has finished. Otherwise, and if no UUID of a preferred set is available, default to the card name.

* Refactor CardDatabase *db global variable to singleton CardDatabaseManager.

This commit refactors the global variable CardDatabase *db into a singleton encapsulated by the DatabaseManager class, accessible via DatabaseManager::getInstance(). This change centralizes access to the database instance, improving code modularity and encapsulation, resolving dependencies on main.h for code that requires access to the database instance.

- Added DatabaseManager class with getInstance() method returning a pointer to the singleton CardDatabase.
- Removed global db variable and updated references across the codebase.
 - Thread-safe static initialization for the singleton.

Impact: This refactor should have no functional impact on the application, as it maintains the same interface for accessing the CardDatabase instance. However, the codebase now benefits from improved encapsulation, lifetime management, and thread-safety.

* fixed db issue an renamed sets to set in picture loader

* canibalized zach work and added it to the decklist builder

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>

* Reintroduce some changes lost in the merge.

* Introduce UUID attribute to abstract_card_item, card_item, deck_view_card, server_card and serverinfo_card.

* Have various game events respect the new UUID attribute on instantiation.

* Correct some calls to default to preferred printing.

* DeckList now tries to assign reasonable defaults for UUID and collectorNumber if none are found in loaded DeckLists.
Rename overloaded DeckListModel findChild() function to findCardChildByNameAndUUID() for clarity.

* canibalized zach work and added it to the decklist builder

* Change getPreferredPrintingForCard to getPreferredSetForCard to reflect refactor.

* Properly update and set the DeckEditor's CardFrame to fetch by name and UUID if a card was selected from the decklist.

* Mainboard/Sideboard swaps should respect the UUID from the old zone instead of just blindly adding preferredPrinting.

* If the card info is null, there's no point in trying to look for the sets.

* Don't define methods twice.

* Convenience method to fetch a specific CardInfoPerSet instance for a cardName and a UUID.

* Check if the uuid starts with card_ when comparing.

* Address pull request comments (nullptr checks and additional comments, mostly.)

* Reformat code so the linter will stop yelling at me.

* DeckList no longer pre-populates uuids.

* Update Event_MoveCard to include the card UUID.

* Update Player::MoveCard to include the card UUID.

* Set the uuid when we set the cardName, in terms of hidden zones.

* [TEST/RevertMe] Set the uuid everywhere to test.

* Don't inline setUUID and mimic setName for AbstractCardItem.

* Revert blindly setting uuid for testing.

* Address PR comments (AbstractCardItem).

* Combine if-statement.

* Re-order uuid to visually align with its field number.

* Remove unnecessary new uuid field from event_move_card.

* Remove unused imports.

* Include cardName in the PixmapCacheKey in order to not break double-faced cards.

* Refactor setCode to cardUUID and introduce new cardSetShortName field.

* Override

* Refactor UUID to be providerId and change QString comparisons with empty string to isEmpty().

* Update translations.

* Change parent to be the first argument.

* Pull Parent argument up for CardItem.

* Pull Parent argument up for CardItem.

* Linter.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
Co-authored-by: LunaticCat <39006478+LunyaticCat@users.noreply.github.com>
Co-authored-by: luna <yannbrun1507@outlook.fr>
Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2024-11-18 21:56:44 -05:00
RickyRister
86a4b130ff don't open deck in new tab if current tab is blank (#5169) 2024-11-18 11:59:34 +01:00
tooomm
f4e2f117c3 Readme: Remove last Gitter hint (#5178) 2024-11-18 00:27:33 +01:00
BruebachL
8ef92d26c5 Add Utility Layouts and corresponding Widgets (#5177)
* Add FlowWidget class with flexible layout and scroll handling

- Implemented FlowWidget class to organize widgets in a flow layout with scrollable options.
- Integrated QScrollArea to handle overflow with configurable horizontal and vertical scroll policies.
- Incorporated dynamic layout selection (FlowLayout, HorizontalFlowLayout, VerticalFlowLayout) based on scroll policy.

* Add OverlapWidget and OverlapLayout for managing overlapping child widgets

- Implemented the OverlapWidget class to manage child widgets in an overlapping manner, supporting configurable overlap percentage, maximum columns, maximum rows, and layout direction.
- Introduced the OverlapLayout class, which arranges widgets with overlapping positions, allowing flexible stacking based on specified parameters.

* Add OverlapControlWidget.

* Delete FlowLayout items later to allow them to finish their event loop.

* Allow OverlapWidgets to adjust their rows/columns on resize.

* Clamp vertical FlowLayout to any available parent scrollAreas.

* Implement margins and spacing for FlowLayouts.

* Adjust/revert some things.

* Address pull request comments (nullptr checks and additional comments, mostly.)

* Reformat code so the linter will stop yelling at me.

* Remove undefined methods from FlowLayouts.

* Fix the build.

* Revert FlowLayout::takeAt to index check.

* Commits will continue until linter morale improves.

* Fix various warnings in FlowLayout.

* Fix various warnings in FlowLayout.h.

* Fix various warnings in the FlowLayout classes.

* Fix [[nodiscard]] warning.

* Fix more warnings.

* Final round of yellow squiggle fixing.

* Linter formatting.

* Refactor column/row calculation to be more readable.

* Code style.

* Address PR comments.

* Combine if-statements.

* Replace std::math functions with Qt equivalents.

* Fix non-consts and QtMath.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2024-11-17 13:32:31 -05:00
BruebachL
c8336df49d Refactor Card Info Widgets (#5176)
* Refactor CardInfo Widgets to reside in their appropriate folder and to have a clearer naming structure.

* Add optional HoverToZoom functionality to CardInfoPictureWidget (default: disabled) and utility class to display text over a CardInfoPictureWidget.

* Patch CardInfoWidgets to use the new CardDatabaseManager.

* Add HoverToZoom to CardInfoPictureWithTextOverlayWidget

* Refactors and new signals for CardInfoPictureWidgets.

* Address pull request comments (nullptr checks and additional comments, mostly.)

* Reformat code so the linter will stop yelling at me.

* Linting.

* Fix the build.

* Fix warnings.

* Formatting, const qualifiers.

* Sensibly call the base class's (QWidget) paint event.

* Address PR comments (card picture).

* QT Version check because enterEvent signature changed.

* Linting.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2024-11-17 10:49:22 -05:00
RickyRister
c2fe3cda35 Add option to open deck in new tab by default (#5143)
* add comments

* add new setting for openDeckInNewTab

* implement open deck in new tab

* rename setting

* fix typo

* set default to false
2024-11-10 18:16:50 -05:00
BruebachL
c54f47efbf Change CardInfo's PixmapCacheKey to be the UUID of the card in the preferred set after database loading has finished. Otherwise, and if no UUID of a preferred set is available, default to the card name. (#5158)
* Change CardInfo's PixmapCacheKey to be the UUID of the preferred set after database loading has finished. Otherwise, and if no UUID of a preferred set is available, default to the card name.

* Clean up some variable names, clarify preferred Set insertion for PictureLoader, use the new CardDatabaseManager.

* Code formatting.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2024-11-10 17:49:11 -05:00
lumadd
3c40cc4b7d [4191] fix: Move unfocusTextBox and aFocusChat shortcuts to Player group (#5079)
* [4191] fix: Move unfocusTextBox and aFocusChat shortcuts to Player family

* [4191] fix: fix formatting

* Revert "[4191] fix: fix formatting"

This reverts commit 86a4a675f3bc8118d4ba8dd45f408c4e8c348f33.

* Revert "[4191] fix: Move unfocusTextBox and aFocusChat shortcuts to Player family"

This reverts commit 3ec183628df81c48123a8a248d0416c529ee0c8e.

* [4191] fix: Textbox and tab_game shortcut groups cannot conflict with Player group

* Revert "[4191] fix: Textbox and tab_game shortcut groups cannot conflict with Player group"

This reverts commit 36800393339d997df1a932bb798f95d2d387399a.

* [4191] fix: Move unfocusTextBox and aFocusChat shortcuts to Player family

* [4191] fix: Migrate shortcuts if new version is detected

* [4191] fix: formatting

* [4191] fix: Maybe fix build issue on Windows7, Debian11, UbuntuBionic and UbuntuFocal
2024-11-09 19:56:42 +01:00
RickyRister
f0fb77bade move replay-related constants into ReplayTimelineWidget (#5166)
* move constants

* make the existing static const into a constexpr
2024-11-09 11:18:51 +01:00
RickyRister
e894e78346 Do not open card reveal windows when skipping in replays (#5157)
* create EventProcessingOption QFlag

* pass EventProcessingOption all the way down

* implement reveal skipping logic
2024-11-09 02:06:23 +01:00
SlightlyCircuitous
dd04c610ec Remove Fedora 39 Build and Add Fedora 41 Build (#5151)
* Remove Fedora 39 docker file

EOL

* Add Fedora 41 Dockerfile

new release

* Remove Fedora 39, Add Fedora 41 to release template

* Remove Fedora 39, Add Fedora 41 to desktop build

---------

Co-authored-by: tooomm <tooomm@users.noreply.github.com>
2024-11-08 11:32:54 +01:00
tooomm
2e674efe50 Pretty print translation source (#5107) 2024-11-05 22:26:54 +01:00
ebbit1q
4d394c31f9 fix the timezones used for the user info box and add comments (#5162) 2024-11-05 14:54:38 -05:00
tooomm
11d58abbc3 CI: Update build matrix & clean naming (#5040)
---------

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2024-11-05 14:38:33 -05:00
BruebachL
5f4ad87a47 Refactor CardDatabase *db global variable to singleton CardDatabaseManager. (#5159)
* Refactor CardDatabase *db global variable to singleton CardDatabaseManager.

This commit refactors the global variable CardDatabase *db into a singleton encapsulated by the DatabaseManager class, accessible via DatabaseManager::getInstance(). This change centralizes access to the database instance, improving code modularity and encapsulation, resolving dependencies on main.h for code that requires access to the database instance.

- Added DatabaseManager class with getInstance() method returning a pointer to the singleton CardDatabase.
- Removed global db variable and updated references across the codebase.
 - Thread-safe static initialization for the singleton.

Impact: This refactor should have no functional impact on the application, as it maintains the same interface for accessing the CardDatabase instance. However, the codebase now benefits from improved encapsulation, lifetime management, and thread-safety.

* Refactor CardDatabase *db global variable to singleton CardDatabaseManager.

This commit refactors the global variable CardDatabase *db into a singleton encapsulated by the DatabaseManager class, accessible via DatabaseManager::getInstance(). This change centralizes access to the database instance, improving code modularity and encapsulation, resolving dependencies on main.h for code that requires access to the database instance.

- Added DatabaseManager class with getInstance() method returning a pointer to the singleton CardDatabase.
- Removed global db variable and updated references across the codebase.
 - Thread-safe static initialization for the singleton.

Impact: This refactor should have no functional impact on the application, as it maintains the same interface for accessing the CardDatabase instance. However, the codebase now benefits from improved encapsulation, lifetime management, and thread-safety.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2024-11-05 19:32:59 +01:00
RickyRister
e43a21866c Buffer rewinds from backward skips in replays (#5141)
* split event processing to own method

* implement rewind throttling

* don't throttle backward skips from clicks

* use the term 'buffering' instead

* remove initial backup logic; just always buffer shortcut backward skips

* prevent segfault

* turns out you can just reuse the same one-shot timer

* try scaling timeout based on event count

* rewrite timeout calculation code

* fix linker error
2024-11-05 18:45:42 +01:00
RickyRister
6652012f4c fix bug with phase highlighting in replays (#5161)
* fix bug with incorrectly highlighted phases

* fix new bug with phases continuously darkening

* use preincrement instead of postincrement

* simplify conditional
2024-11-05 18:23:01 +01:00
BruebachL
0c4e8ca290 CardDatabase gains a new signal void cardDatabaseLoadingFinished(), which (#5156)
it will emit in loadCardDatabases(), mirroring the else branch where cardDatabaseLoadingFailed() is emitted.

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2024-11-03 23:45:19 +01:00
ebbit1q
230a2c5c62 fix crashes in local games because of using uninitialised pointers (#5147) 2024-10-26 21:03:32 +00:00
ebbit1q
590fb7f533 fix row colors swapping when using back button in replays (#5148)
only happens when there is an uneven amount of rows in the chat
2024-10-26 21:02:51 +00:00
github-actions[bot]
e8b88248f2 Update translation files (#5146) 2024-10-26 19:11:24 +02:00
transifex-integration[bot]
c6ba1b6a4e Translate cockatrice/cockatrice_en@source.ts in de (#5145)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-10-26 14:11:18 +02:00
RickyRister
c4c52bd8c0 Add keyboard shortcuts for skipping forward/backward in replays (#5140)
* split skipToTime into own function

* implement shortcut

* fix shortcut warning bug

* check boundary conditions in skipToTime

* change default fast forward shortcut to .

* implement big skip shortcuts

* remove unnecessary arg in lambda

* change default fast forward shortcut to Ctrl+F

* rename constants

* change default fast forward shortcut to Ctrl+P

* use static const
2024-10-23 14:00:23 +02:00
tooomm
c633a792f5 bump version (#5099) 2024-10-21 18:57:47 -04:00
Zach H
8d5421d9da Add backwards support Qt6.7's checkStateChanged on QCheckBoxes (#5137) 2024-10-20 23:35:34 -04:00
github-actions[bot]
b041f4ace2 Update translation source strings (#5117)
Co-authored-by: github-actions <github-actions@github.com>
2024-10-20 16:18:32 -04:00
RickyRister
d26f96db9e Add keyboard shortcuts for replays (#5136)
* add keyboard shortcut for play/pause

* add keyboard shortcut for fast-forward

* make shortcuts rebindable

* run formatter
2024-10-20 16:41:59 +02:00
LunaticCat
fa999880ee Major Directory Refactoring (#5118)
* refactored cardzone.cpp, added doc and changed if to switch case

* started moving every files into different folders

* remove undercase to match with other files naming convention

* refactored dialog files

* ran format.sh

* refactored client/tabs folder

* refactored client/tabs folder

* refactored client/tabs folder

* refactored client folder

* refactored carddbparser

* refactored dialogs

* Create sonar-project.properties

temporary file for lint

* Create build.yml

temporary file for lint

* removed all files from root directory

* removed all files from root directory

* added current branch to workflow

* fixed most broken import

* fixed issues while renaming files

* fixed oracle importer

* fixed dbconverter

* updated translations

* made sub-folders for client

* removed linter

* removed linter folder

* fixed oracle import

* revert card_zone documentation

* renamed db parser files name and deck_view imports

* fixed dlg file issue

* ran format file and fixed test file

* fixed carddb test files

* moved player folder in game

* updated translations and format files

* fixed peglib import

* format cmake files

* removing vcpkg to try to add it back later

* tried fixing vcpkg file

* renamed filter to filters and moved database parser to cards folder

* reverted translation files

* reverted oracle translated

* Update cockatrice/src/dialogs/dlg_register.cpp

Co-authored-by: tooomm <tooomm@users.noreply.github.com>

* Update cockatrice/src/client/ui/window_main.cpp

Co-authored-by: tooomm <tooomm@users.noreply.github.com>

* removed empty line at file start

* removed useless include from tab_supervisor.cpp

* refactored cardzone.cpp, added doc and changed if to switch case

* started moving every files into different folders

* remove undercase to match with other files naming convention

* refactored dialog files

* ran format.sh

* refactored client/tabs folder

* refactored client folder

* refactored carddbparser

* refactored dialogs

* removed all files from root directory

* Create sonar-project.properties

temporary file for lint

* Create build.yml

temporary file for lint

* added current branch to workflow

* fixed most broken import

* fixed issues while renaming files

* fixed oracle importer

* fixed dbconverter

* updated translations

* made sub-folders for client

* removed linter

* removed linter folder

* fixed oracle import

* revert card_zone documentation

* renamed db parser files name and deck_view imports

* fixed dlg file issue

* ran format file and fixed test file

* fixed carddb test files

* moved player folder in game

* updated translations and format files

* fixed peglib import

* reverted translation files

* format cmake files

* removing vcpkg to try to add it back later

* tried fixing vcpkg file

* pre-updating of cockatrice changes

* removed empty line at file start

* reverted oracle translated

* Update cockatrice/src/dialogs/dlg_register.cpp

Co-authored-by: tooomm <tooomm@users.noreply.github.com>

* Update cockatrice/src/client/ui/window_main.cpp

Co-authored-by: tooomm <tooomm@users.noreply.github.com>

* removed useless include from tab_supervisor.cpp

---------

Co-authored-by: tooomm <tooomm@users.noreply.github.com>
2024-10-20 10:11:35 -04:00
RickyRister
d1e0f9dfc5 fix bug (#5133) 2024-10-19 20:18:35 -04:00
RickyRister
2d86938375 Consolidate play/pause buttons in replays (#5131)
* Consolidate play/pause buttons in replays

* always enable fast forward button

* run formatter
2024-10-19 20:18:01 -04:00
ebbit1q
4865269a73 don't delete "" (#5135) 2024-10-19 13:06:18 +02:00
dependabot[bot]
038ce3dcec Bump send and express in /webclient (#5123)
Bumps [send](https://github.com/pillarjs/send) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `send` from 0.18.0 to 0.19.0
- [Release notes](https://github.com/pillarjs/send/releases)
- [Changelog](https://github.com/pillarjs/send/blob/master/HISTORY.md)
- [Commits](https://github.com/pillarjs/send/compare/0.18.0...0.19.0)

Updates `express` from 4.18.2 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.21.0)

---
updated-dependencies:
- dependency-name: send
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-11 04:28:41 +00:00
RickyRister
43b997fe40 follow symlinks when iterating through the custom image folder (#5126) 2024-10-11 04:27:24 +00:00
Polty
44e92f61ca #3945 deck list: Navigation keys (PageUp/Down, Home/End) (#5103)
* #3945 deck list: Navigation keys (PageUp/Down, Home/End) interact with the deck list.

* make Home/End work normally when there is text in the search textbox

* fix debug build, explicit cast from int to Qt::Key enum
2024-10-09 23:11:12 +02:00
Alexander Choi
b4bfa17cee In-game message macros available immediately in active games (#5113)
* In-game message macros available immediately in active games

* fix formatting

* init sayMenu actions with sayMenu as parent
2024-10-09 23:08:57 +02:00
tooomm
500b694cc6 CI: Fix logic in translation action after dependency update (#5124)
* Update translations-pull.yml

* Update translations-push.yml
2024-10-07 18:48:43 +00:00
dependabot[bot]
b998282304 Bump peter-evans/create-pull-request from 6 to 7 (#5110)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 6 to 7.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v6...v7)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-07 20:05:44 +02:00
Alexander Choi
b704216553 fix macro shortcuts so that Ctrl+1 is not double-assigned (#5112) 2024-09-15 16:55:30 -04:00
transifex-integration[bot]
03ec02a749 Translate oracle/oracle_en@source.ts in fi (#5100) 2024-08-30 13:16:22 +02:00
Zach H
248ea82573 Support Game Events (#5087) 2024-08-25 00:31:20 +00:00
ebbit1q
bbe125beee replace cipt check with regex (#5094) 2024-08-25 00:31:01 +00:00
tooomm
95cd1c6f87 CI: Update install-qt-action (#5096) 2024-08-22 01:22:57 +02:00
J. Cameron McDonald
1c2107ae8f docs: fix readme "get involved" links (#5098) 2024-08-17 23:46:16 +02:00
ebbit1q
e826e17c6c add qtimageformats module (#5092)
* add qtimageformats module

* add qt6-image-formats-plugins to apt depends in cmakelists

* too many quotes

* add qt6-qtimageformats to rpm deps
2024-08-16 22:32:22 -04:00
Joseph Insalaco
b111f0921c Admin persistence changes (#5086) 2024-08-16 22:31:57 -04:00
transifex-integration[bot]
090a48515c Updates for project Cockatrice and language en_US (#5088)
* Translate cockatrice_en@source.ts in en_US

100% translated source file: 'cockatrice_en@source.ts'
on 'en_US'.

* Translate oracle/oracle_en@source.ts in en_US

100% translated source file: 'oracle/oracle_en@source.ts'
on 'en_US'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-08-03 14:29:28 +02:00
transifex-integration[bot]
b8555d8c42 Translate cockatrice/cockatrice_en@source.ts in nl (#5089)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'nl'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-08-03 14:16:42 +02:00
Joseph Insalaco
cf1f4f12a9 Updating Session Persistence with all valid persistence calls (#5085)
* Updating Session Persistence with all valid persistence calls

* Spacing fixes

---------

Co-authored-by: Zach H <zahalpern+github@gmail.com>
2024-07-29 17:25:33 +00:00
ebbit1q
ef4413633a fix regression in #4762 to _fill_with_ template (#5083)
fixes #5062
2024-07-29 01:20:50 +00:00
Zach H
c5bb38e907 Add types for Moderator commands (#5084)
* Add types for Moderator commands

* Support User Priv Level & userLevel
2024-07-29 01:16:29 +00:00
github-actions[bot]
9f515fc804 Update translation files (#5080) 2024-07-23 11:53:07 +02:00
Zach H
245edcefdd Add openssl to windows reqs (#5074) 2024-07-13 12:38:43 -04:00
transifex-integration[bot]
153f73c308 Translate cockatrice/cockatrice_en@source.ts in de (#5073)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-07-13 13:11:03 +00:00
github-actions[bot]
315837b267 Update translation source strings (#5069)
Co-authored-by: github-actions <github-actions@github.com>
2024-07-01 19:04:16 +02:00
Joseph Insalaco
ea8da24215 Webatrice: Adding joined game to persistence layer (#5068)
* Adding joined game to persistence layer

* Linting fixes
2024-06-27 02:06:47 +00:00
Joseph Insalaco
1ab723ca64 Webatrice: Adding game created to persistence layer (#5067) 2024-06-27 01:03:21 +00:00
Joseph Insalaco
f8bc6cf998 Adding remove messages to persistence layer (#5066) 2024-06-27 00:44:40 +00:00
Zach H
8687163cca Add few more interfaces (#5063) 2024-06-25 05:00:45 +00:00
Zach H
e261e16d99 Re-Add ability to share editable deck views (#5060)
- Rolls back 6811819161
- Follow up to adbb607700
2024-06-24 21:52:11 +00:00
Jeremy Letto
bdcd083eea refactor imports (#5058) 2024-06-17 01:00:23 -04:00
Zach H
c4bf9eb61c Cleanup (#5057)
* Add Types

* Add Types
2024-06-17 00:32:36 -04:00
Zach H
0994d10410 More stuff (#5056)
* Skeleton + RemoveMessages

* GameJoinedData
2024-06-16 23:26:03 -04:00
Zach H
291c535edb More web stuff (#5055)
* Add Response.gamesOfuser

* Cleanup and confirm all
2024-06-16 22:48:07 -04:00
ZeldaZach
f04702fdd1 Backwards Compatibility for rolling dice 2024-06-16 21:10:07 -04:00
Zach H
b7fbc12ac0 Allow Judges to see all information, regardless of room settings (#5053) 2024-06-16 19:12:37 -04:00
Zach H
e2ab8db958 Add some sessions (#5052)
* Add AccountEdit

* Add PasswordChange

* Cleanup

* Add SessionService.accountImage

* Add SessionService.message

* Add SessionService.getUserInfo

* Lint
2024-06-14 23:06:50 -04:00
Zach H
34d70980e8 Webatrice admin commands (#5051)
* Add AdminCommand.updateServerMessage

* Add AdminCommand.shutdownServer

* Add AdminCommand.reloadConfig

* Cleanup

* Add AdminCommand.adjustMod

* Lint

* Lint
2024-06-13 02:52:40 +00:00
Zach H
e45c4042fe Webatrice: Add all ModeratorCommands (#5049)
* Move viewLogHistory to Moderator commands

* Add Moderator.banFromServer

* Add Moderator.getBanHistory

* Add Moderator.getWarnHistory

* Add Moderator.warnUser

* Add Moderator.getWarnList
2024-06-13 02:15:14 +00:00
Zach H
ce8092318e Allow up to 100 dice to be rolled at a time (#5047)
* Allow up to 100 dice to be rolled at a time
- Fix #4276
2024-06-12 08:37:04 -04:00
transifex-integration[bot]
c95cc1dd9d Translate webclient/src/i18n-default.json in it (#5045)
100% translated source file: 'webclient/src/i18n-default.json'
on 'it'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2024-06-06 23:53:15 +00:00
Zach H
1f72877728 Drop MacOS 10.15/11 Support :( (#5033) 2024-05-31 09:10:54 -04:00
tooomm
93b40343d9 EnableCIServerMode (#5034) 2024-05-25 12:40:40 -04:00
transifex-integration[bot]
ba10108207 Translate cockatrice/cockatrice_en@source.ts in de (#5038) 2024-05-24 19:05:11 +02:00
github-actions[bot]
c28f66d673 Update translation source strings (#4973)
Co-authored-by: github-actions <github-actions@github.com>
2024-05-18 22:11:07 +02:00
Zach H
59f327f97a Pin XCode versions for Mac Builds (#5032) 2024-05-13 18:57:33 -04:00
tooomm
872c92a244 CI: Use windows-2022 image with Visual Studio 17 2022 (#4999)
Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2024-05-13 17:41:50 -04:00
dependabot[bot]
2303880b87 Bump ejs from 3.1.8 to 3.1.10 in /webclient (#5027)
Bumps [ejs](https://github.com/mde/ejs) from 3.1.8 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](https://github.com/mde/ejs/compare/v3.1.8...v3.1.10)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-02 11:48:57 +00:00
github-actions[bot]
0e97cc1712 Update translation files (#5021)
Co-authored-by: github-actions <github-actions@github.com>
2024-04-24 19:37:31 -04:00
SlightlyCircuitous
d550e42441 Remove Fedora 38 Build and Add Fedora 40 Build (#5024)
* Remove Fedora 38 docker image

* Add Fedora 40 Dockerfile

* Remove Fedora 38, Add Fedora 40 to release template

* Remove Fedora 38, add Fedora 40 to desktop-build
2024-04-24 19:37:23 -04:00
SlightlyCircuitous
4279753030 Add Ubuntu 24.04 "Noble Numbat" Build (#5023)
* Create Ubuntu Noble Numbat dockerfile

* Add Noble Numbat to desktop_build

* Add Noble Numbat to release_template
2024-04-24 15:13:20 +02:00
Jeremy Letto
2f6c018b7a untangle updateStatus (#5018)
* untangle updateStatus

* fix test
2024-04-05 04:56:12 +00:00
Jeremy Letto
be5d42baba WebClient: refactor protobuf method structure (#5014) 2024-04-01 17:32:08 +00:00
ebbit1q
f174614496 assign new arrow id when arrow is moved to transformed card (#5012)
* add timeout to settingscache

* assign new arrow id when arrow is moved to transformed card

fixes bug introduced in #4907
fixes #5008
2024-03-27 14:47:00 +01:00
dependabot[bot]
e8c7fba8b0 Bump peter-evans/create-pull-request from 5 to 6 (#4997) 2024-03-19 19:42:08 +01:00
SlightlyCircuitous
5c49283023 Remove Ubuntu 23.04 Lunar Lobster Build (#5002)
* Delete .ci/UbuntuLunar directory

EOL

* Update release_template.md

Lunar is EOL

* Update desktop-build.yml

Lunar is EOL
2024-02-27 21:07:18 +01:00
ebbit1q
ad56b431a3 increase version number so we can create a beta (#5001) 2024-02-27 20:55:28 +01:00
SlightlyCircuitous
b0d8a33d5f Remove Fedora 37 Build, Add Fedora 39 Build (#5003) 2024-02-26 08:37:28 +01:00
dependabot[bot]
1715bcb216 Bump microsoft/setup-msbuild from 1 to 2 (#4996)
Bumps [microsoft/setup-msbuild](https://github.com/microsoft/setup-msbuild) from 1 to 2.
- [Release notes](https://github.com/microsoft/setup-msbuild/releases)
- [Changelog](https://github.com/microsoft/setup-msbuild/blob/main/building-release.md)
- [Commits](https://github.com/microsoft/setup-msbuild/compare/v1...v2)

---
updated-dependencies:
- dependency-name: microsoft/setup-msbuild
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-10 15:31:13 -05:00
tooomm
96caeaca72 Enable MTT over parallel flag (#4998) 2024-02-10 15:30:43 -05:00
tooomm
c8723ae935 Remove Gitter chat (#4995) 2024-02-01 18:25:04 +01:00
tooomm
94e39c044c update mv mapping (#4896) 2024-01-30 00:27:45 -05:00
ebbit1q
9776ea53c9 make translation update script more specific in line selection (#4993) 2024-01-25 23:28:23 +01:00
github-actions[bot]
675d07dac0 Update translation files (#4991)
Co-authored-by: github-actions <github-actions@github.com>
2024-01-23 22:29:40 +01:00
tooomm
1217820288 CI: GitHub Job Summary for Translation PRs (#4992) 2024-01-23 22:21:35 +01:00
tooomm
90e1a3cb76 Utilize new CPUs with more cores (#4988) 2024-01-22 23:15:20 +01:00
tooomm
7c1095ea50 CI: Fix ignore pattern & highlight status of translation automations (#4977)
* Add result of run to GHA summary

* Fix `paths-ignore`
2024-01-22 22:07:21 +01:00
dependabot[bot]
203e916a07 Bump actions/cache from 3 to 4 (#4990) 2024-01-22 19:32:27 +01:00
github-actions[bot]
7201e34b38 Update translation files (#4984)
Co-authored-by: github-actions <github-actions@github.com>
2024-01-18 20:50:28 +01:00
Basile Clement
6d032c378f Improve drag & drop behavior (#4963)
* Improve drag & drop behavior

This patch tweaks the drag & drop behavior (in particular, the grid
placement) to be more intuitive. More precisely, with this patch the
drag & drop will:

 - Only use the "hot spot" (i.e. position of the cursor on the card)
   for zones where the card is actually displayed around the cursor (in
   particular, not on the table where the card snaps to the grid).

 - Use better boundaries computed with respect to the center of the
   card (rather than its top left corner) for determining which grid
   cell a card should go to

 - Align behavior of the preview and the actual effect when overflow of
   the 3-card stacks occurs

 - Avoid visual glitches where the cursor ends up outside of the card or
   at incorrect offsets when moving the mouse too fast (which translates
   to overflows of the hot spot computation)

* Address review comments

 - Use simpler computation for restricting hotSpot range
 - Prevent dropping cards onto full 3-card slots
2024-01-01 16:51:36 -05:00
dependabot[bot]
badd8952f5 Bump @babel/traverse from 7.20.0 to 7.23.2 in /webclient (#4917)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.20.0 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-20 21:31:12 -05:00
dependabot[bot]
7209eddb2d Bump crypto-js from 4.1.1 to 4.2.0 in /webclient (#4926)
Bumps [crypto-js](https://github.com/brix/crypto-js) from 4.1.1 to 4.2.0.
- [Commits](https://github.com/brix/crypto-js/compare/4.1.1...4.2.0)

---
updated-dependencies:
- dependency-name: crypto-js
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-20 21:31:04 -05:00
dependabot[bot]
a7ffd43b29 Bump actions/upload-artifact from 3 to 4 (#4969)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-18 23:58:37 +01:00
tooomm
724ba69483 macOS 12 --> 13 (#4966) 2023-12-17 13:39:06 -05:00
ebbit1q
1716801437 make package on macos 13 (#4961) 2023-12-15 21:15:57 -05:00
ebbit1q
fa727524dc make cards on the stack slightly overlap to stress order (#4930)
* make cards on the stack slightly overlap to stress order

dragging cards to the stack now places the card at the location it is
dropped

* make default play action append to stack

* add vertical overlap to settings and vertical hand

* Update cockatrice/src/dlg_settings.cpp

Co-authored-by: tooomm <tooomm@users.noreply.github.com>

* Fix format

---------

Co-authored-by: tooomm <tooomm@users.noreply.github.com>
Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2023-12-15 14:00:58 -05:00
ebbit1q
28f80e18a0 add ctrl enter as shortcut for ok when setting annotation (#4929) 2023-12-15 13:55:11 -05:00
ebbit1q
4acc8bfe80 put cards on top in a random order (#4960) 2023-12-15 13:51:21 -05:00
Zach H
9f86ed7887 Fix Fedora Builds (#4964) 2023-12-15 13:49:32 -05:00
Basile Clement
cb18a55338 Support fractional scaling when scaling card images (#4962)
Fixes #4880
2023-12-14 14:24:35 +01:00
dependabot[bot]
78a928464c Bump @adobe/css-tools from 4.0.1 to 4.3.2 in /webclient (#4953)
Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.0.1 to 4.3.2.
- [Changelog](https://github.com/adobe/css-tools/blob/main/History.md)
- [Commits](https://github.com/adobe/css-tools/commits)

---
updated-dependencies:
- dependency-name: "@adobe/css-tools"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-09 00:53:10 -05:00
Zach H
07a8cd0a5f Fix #4903: Parse Email Addresses whenever used (#4932) 2023-12-09 00:52:47 -05:00
Zach H
b73ef58567 Support WebP format for Card Images (#4950)
- Fix #4939
2023-12-09 00:52:14 -05:00
Zach H
519531f3a0 Support escaping single and double quotes in Deck Editor Search Regex Strings (#4948)
- Fix #4946
2023-12-09 00:51:54 -05:00
tooomm
4b8e47d079 Update default theme name (#4944) 2023-11-20 01:01:42 +01:00
transifex-integration[bot]
ed170f7e07 Updates for project Cockatrice and language de (#4942)
* Translate cockatrice/cockatrice_en@source.ts in de

100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

* Translate oracle/oracle_en@source.ts in de

100% translated source file: 'oracle/oracle_en@source.ts'
on 'de'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-11-18 12:10:11 +01:00
transifex-integration[bot]
6bb559874c Translate cockatrice/cockatrice_en@source.ts in it (#4941)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'it'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-11-18 08:44:10 +01:00
transifex-integration[bot]
9cd68e25b3 Translate cockatrice/cockatrice_en@source.ts in de (#4937)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-11-12 19:22:58 +01:00
transifex-integration[bot]
72ac441598 Updates for project Cockatrice and language de (#4934)
* Translate cockatrice/cockatrice_en@source.ts in de

100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

* Translate cockatrice/cockatrice_en@source.ts in de

100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-11-05 19:15:48 +01:00
dependabot[bot]
f5fe56c85d Bump actions/setup-node from 3 to 4 (#4928)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-31 00:48:39 +01:00
tooomm
d4fc1be2cc CI: Cleanup & updates (#4921)
* simplify ci after 64bit only

* hint on macos 10.15 with qt6.2

* Update desktop-build.yml

* Update desktop-build.yml

* update xcode

* 14.3 finds 14.3.1, but 14.0 doesn't find 14.0.1

* Update desktop-build.yml
2023-10-28 14:36:50 -04:00
ebbit1q
7b3617a273 clean up #4904 for consistency (#4927)
note, this is not a racetime issue, see #4907
2023-10-28 14:35:15 -04:00
tooomm
3e8adae3de Rename "stack until found" feature (#4871)
* Rename "stack until found" feature

* lint
2023-10-25 18:43:57 +02:00
tooomm
9943133d6d TOTD: Exchange Gitter for Discord, Fix date format (#4920)
* Update tips_of_the_day.xml

* Delete cockatrice/resources/tips/images/gitter.png

* Add Discord icon

* Update cockatrice.qrc

* date format
2023-10-24 14:26:38 +02:00
tooomm
a5706a47af Include missing strings for translation (#4919) 2023-10-19 21:58:38 +02:00
github-actions[bot]
b3b911c64d Update translation files (#4913)
Co-authored-by: github-actions <github-actions@github.com>
2023-10-18 20:41:14 +02:00
github-actions[bot]
05beb4fcaf Update translation source strings (#4918) 2023-10-18 00:29:56 +02:00
tooomm
324b50e381 Improve Transifex pull action (#4916) 2023-10-16 22:51:08 +02:00
Zach H
186f4289e9 Address /W4 compiler warnings for Windows (#4910) 2023-10-15 20:31:13 -04:00
Zach H
cb90a8356b Use proto21 on macos11 (#4914) 2023-10-15 20:30:50 -04:00
tooomm
e9c502ab32 CI: Add action for pulling new translations (#4911)
* Update and rename translations.yml to translations-push.yml

* Rename update_translations.sh to update_translation_source_strings.sh

* Update and rename update_translations_template.md to update_translation_source_strings_template.md

* Add translations-pull.yml

* Update config

* Update desktop-lint.yml

* Update desktop-build.yml

* correct env var naming

* names
2023-10-15 18:47:15 -04:00
tooomm
f728520e97 Update release_template.md (#4909) 2023-10-13 22:52:08 -04:00
Zach H
c1b0d50237 Handle Qt6.6 Deprecations (#4908) 2023-10-13 20:53:47 -04:00
tooomm
b9cfc29059 CI: Use concurrency group (#4902) 2023-10-13 19:01:37 -04:00
ebbit1q
6bf7c79891 copy arrows on transform (#4907) 2023-10-13 19:01:08 -04:00
Zach H
2bd0e58354 HotFix: Prevent crashing if a Zone is null with an arrow while a player concedes race time (#4904) 2023-10-13 19:00:53 -04:00
Zach H
ee674cb0cf Support MacOS 12 & 13. Support Protobuf 23. Deprecate MacOS 11. (#4884) 2023-10-13 14:45:22 -04:00
transifex-integration[bot]
dd1b354d48 Translate webclient/src/i18n-default.json in de (#4906)
100% translated source file: 'webclient/src/i18n-default.json'
on 'de'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-10-13 14:26:05 -04:00
tooomm
d3e96f4a99 Switch to rolling release (#4905) 2023-10-13 14:25:40 -04:00
tooomm
90e2eb3db9 Webclient: Fix translation file names (#4897) 2023-10-09 18:05:43 +02:00
transifex-integration[bot]
102be6a350 Translate cockatrice_en@source.ts in en_US [Manual Sync] (#4893)
98% of minimum 80% translated source file: 'cockatrice_en@source.ts'
on 'en_US'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-10-06 22:56:03 +02:00
transifex-integration[bot]
be6152948c Updates for project Cockatrice and lanuage es on branch master (#4886)
* Translate i18n-default.json in es [Manual Sync]

99% of minimum 80% translated source file: 'i18n-default.json'
on 'es'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate cockatrice_en@source.ts in es [Manual Sync]

98% of minimum 80% translated source file: 'cockatrice_en@source.ts'
on 'es'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate i18n-default.json in es [Manual Sync]

99% of minimum 95% translated source file: 'i18n-default.json'
on 'es'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate cockatrice_en@source.ts in es [Manual Sync]

98% of minimum 95% translated source file: 'cockatrice_en@source.ts'
on 'es'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-10-06 22:52:37 +02:00
transifex-integration[bot]
f14bf4b205 Updates for project Cockatrice and lanuage it on branch master (#4887)
* Translate i18n-default.json in it [Manual Sync]

99% of minimum 80% translated source file: 'i18n-default.json'
on 'it'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate cockatrice_en@source.ts in it [Manual Sync]

98% of minimum 80% translated source file: 'cockatrice_en@source.ts'
on 'it'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate i18n-default.json in it [Manual Sync]

99% of minimum 95% translated source file: 'i18n-default.json'
on 'it'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-10-06 21:37:59 +02:00
transifex-integration[bot]
123ac2ca25 Updates for project Cockatrice and lanuage fr on branch master (#4888)
* Translate cockatrice_en@source.ts in fr [Manual Sync]

98% of minimum 80% translated source file: 'cockatrice_en@source.ts'
on 'fr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate i18n-default.json in fr [Manual Sync]

99% of minimum 80% translated source file: 'i18n-default.json'
on 'fr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate i18n-default.json in fr [Manual Sync]

99% of minimum 95% translated source file: 'i18n-default.json'
on 'fr'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-10-06 21:36:56 +02:00
transifex-integration[bot]
7216b976ec Updates for project Cockatrice and lanuage pt_BR on branch master (#4890)
* Translate cockatrice_en@source.ts in pt_BR [Manual Sync]

98% of minimum 80% translated source file: 'cockatrice_en@source.ts'
on 'pt_BR'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* Translate webclient/src/i18n-default.json in pt_BR

100% translated source file: 'webclient/src/i18n-default.json'
on 'pt_BR'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-10-06 21:36:16 +02:00
ebbit1q
7fb698cfbf update release template with #4883 deprecating 32 bit (#4885) 2023-10-02 14:09:19 -04:00
Zach H
b0470ab678 Move to OpenSSLv3 (& Drop 32-bit) (#4883) 2023-10-01 17:19:31 -04:00
Zach H
0deb037035 Address connect errors in logs (#4882) 2023-10-01 15:30:54 -04:00
ZeldaZach
064b362d60 Bump to 2.9.0 :) 2023-09-14 22:14:22 -04:00
tooomm
6bbe228a84 README: Cleanup translations widget and links (#4870)
* Fix translations widget and links

* Name webatrice
2023-09-11 22:13:52 -04:00
transifex-integration[bot]
a8ba8b6ab5 Updates for project Cockatrice and lanuage de on branch master (#4867)
* Translate cockatrice/cockatrice_en@source.ts in de

100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

* Translate cockatrice/cockatrice_en@source.ts in de

100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

* Translate cockatrice/cockatrice_en@source.ts in de

100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-09-11 21:24:57 +02:00
dependabot[bot]
e850f6c2a5 Bump actions/checkout from 3 to 4 (#4866) 2023-09-07 23:11:19 +02:00
github-actions[bot]
e9eb7d6db1 Update translation source strings (#4865)
Co-authored-by: github-actions <github-actions@github.com>
2023-09-01 20:20:19 -04:00
tooomm
56d21321d0 remove translation string (#4860) 2023-08-18 12:34:54 -04:00
transifex-integration[bot]
3888a74212 Translate oracle/oracle_en@source.ts in de (#4862)
100% translated source file: 'oracle/oracle_en@source.ts'
on 'de'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-08-18 12:34:39 -04:00
transifex-integration[bot]
0035e29f9e Translate webclient/src/i18n-default.json in pt_BR (#4863)
100% translated source file: 'webclient/src/i18n-default.json'
on 'pt_BR'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-08-18 12:34:30 -04:00
ebbit1q
90679d5669 fix issues with #4648 (#4864) 2023-08-18 12:34:17 -04:00
transifex-integration[bot]
ac5dc2578a Translate cockatrice/cockatrice_en@source.ts in de (#4861)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-08-13 20:51:02 +02:00
tooomm
671e6823be cleanup vcpkg.json (#4859) 2023-08-11 13:35:59 +02:00
github-actions[bot]
0d76662311 Update translation source strings (#4843)
Co-authored-by: github-actions <github-actions@github.com>
2023-08-10 22:37:17 +02:00
tooomm
8dd59cf3cf CI: Bump GitHub actions + submodule (#4852)
* Bump used actions

* Update vcpkg submodule (#4857)

* Pause npm updates for webclient (#4853)

* Bump peter-evans/create-pull-request from 4 to 5 (#4846)

Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4 to 5.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v4...v5)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update vcpkg

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump vcpkg action to v11

* Update vcpkg cache setting

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-09 12:28:16 +02:00
dependabot[bot]
332d25dc00 Bump peter-evans/create-pull-request from 4 to 5 (#4846)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4 to 5.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v4...v5)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-08 23:21:26 +02:00
tooomm
0fa81a77dc Pause npm updates for webclient (#4853) 2023-08-08 13:17:28 +02:00
tooomm
9a74d8f72d update link (#4845) 2023-08-06 22:46:02 -04:00
Zach H
8c539351e3 Fix Mac Builds (#4844) 2023-08-06 22:45:45 -04:00
ebbit1q
e3552fc0ae add more default shortcuts (#4349)
* add more default shortcuts

replace the ctrl a look at top of library shortcut with ctrl shift n
use ctl a for draw arrow
replace ctrl shift b for toggle sideboard lock
use ctrl b for move card to bottom of library
use ctrl shift l for start local game
add keyboard shortcuts for all 3 counter colors using , . / keys
use ctrl [ ] \ for the "other" counter
add ctrl = as an easy alternative to ctrl + for people without keypads
( on linux ctrl alt keypad + is a special key that is reserved in x
  it produces the XF86_Next_VMode keyboard event which isn't bindable )
use alt u for toggling untapping
use alt l for peeking at cards
use ctrl alt u for unattaching cards
use alt n for set annotation
use alt y for milling one card

* use alt f for flipping cards
2023-08-06 17:56:24 -04:00
tooomm
ca308636c3 CI: Add automatic PR creation for source string updates (#4544)
* wording

* add pr creation

* Update translations.yml

* Update translations.yml

* update translation workflow

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* skip ci update

* skip ci update

* update conditions

* remove empty line

* typo

* tee test

* cleanup

* pass data between steps

* opt for step output over env variable

* remove space

* create script

* wording

* fix fork protection, re-add pr run

* updates

* Update translations.yml

* adjust for new source paths

* update comment

* wording

Co-authored-by: ebbit1q <ebbit1q@gmail.com>

* wording

* reorder

* reorder

* fix deprecation of set-output

* fix version

---------

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2023-08-06 17:55:50 -04:00
ebbit1q
244cb847fb replace trayicon activation with menu actions (#4632) 2023-08-06 17:55:02 -04:00
tooomm
176c52daf2 Enable Dependabot (#4795)
* add dependabot file

* disable submodules for now
2023-08-06 17:54:17 -04:00
tooomm
ee3525ec64 Webclient: Brazilian translations are doubled (#4809)
* cleanup old brazilian translations

* pt-br --> pt_br

* pt-br --> pt_br

* pt-br --> pt_br
2023-08-06 17:53:55 -04:00
dependabot[bot]
adce921be7 Bump protobufjs from 7.1.2 to 7.2.4 in /webclient (#4827)
Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 7.1.2 to 7.2.4.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/protobufjs/protobuf.js/compare/protobufjs-v7.1.2...protobufjs-v7.2.4)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-06 17:53:41 -04:00
dependabot[bot]
20ceb1c284 Bump semver from 6.3.0 to 6.3.1 in /webclient (#4829)
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-06 17:53:32 -04:00
dependabot[bot]
db4364b8f8 Bump tough-cookie from 4.1.2 to 4.1.3 in /webclient (#4828)
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-06 17:53:25 -04:00
dependabot[bot]
48d6435e09 Bump word-wrap from 1.2.3 to 1.2.4 in /webclient (#4831)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-06 17:53:18 -04:00
ebbit1q
7c20e9ab34 add move cards from top of library until dialog (#4648)
a bit of a hack, the client will use the play top card action and then
compare it with the propmpted expression, as if you were cascading
normally but really fast

the new keybind for this is ctrl shift y

I have ratelimited the action to 10 cards a second
2023-08-06 17:53:07 -04:00
ebbit1q
cb52605928 use a regex to remove all reserved characters from file names (#4804) 2023-08-06 17:46:22 -04:00
Guangcong Luo
bd3100dcda Update macOS Monterey app icon (#4805) 2023-08-06 17:46:03 -04:00
ebbit1q
afb7c35cfd add a way to replace the user facing list of disallowed words (#4807) 2023-08-06 17:45:37 -04:00
tooomm
5b694a55d2 CI: Remove fedora 36 (#4799)
* remove fedora 36

* remove fedora 36

* remove fedora 36
2023-08-04 02:02:44 +02:00
SlightlyCircuitous
f750a4cd72 Remove Ubuntu 22.10 Kinetic Kudu Build (#4826) 2023-07-25 21:34:18 -04:00
SlightlyCircuitous
eddeaaf52a Add Debian 12 "Bookworm" Build (#4812) 2023-06-14 20:28:12 -04:00
tooomm
2b42bee424 Webclient: lint (#4810)
* lint

* lint
2023-05-14 00:09:40 +02:00
SlightlyCircuitous
b9706c0cc1 Add indentation (#4806)
Improves readability
2023-05-09 17:08:06 -04:00
transifex-integration[bot]
800b21b000 Apply translations in pt_BR (#4801)
100% translated for the source file 'cockatrice/cockatrice_en@source.ts'
on the 'pt_BR' language.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-05-09 17:07:23 -04:00
transifex-integration[bot]
d1736a25bb Translate webclient/src/i18n-default.json in pt_BR (#4800)
100% translated for the source file 'webclient/src/i18n-default.json'
on the 'pt_BR' language.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-05-09 17:06:40 -04:00
ebbit1q
f269e5fe58 add fedora 38, scheduled to release next week (#4785) 2023-04-30 14:21:13 +02:00
tooomm
45a5296013 CI: Fix versions before deprecation (#4798)
* fix deprecation warning

* fix deprecation warning
2023-04-30 13:51:09 +02:00
SlightlyCircuitous
5f0ab2a177 CPack DMG Installer with Background Image (#4787)
* Set some CPack variables

WIP for DMG background image

* Use a .tif for background

* Add Background image and DS_Store script

Script is from https://www.kitware.com//creating-mac-os-x-packages-with-cmake/ with cmake.app changed to cockatrice.app

* Add position for all icons

* Adjust background size and icon position

This draws dbconverter off the screen as a hack to hide it, so hopefully it doesn't break.

* Add files via upload

* Change Icon Position

Icon position is probably relative to the window edge, not the edge of the screen so the numbers should be lower.

* Adjust Icon Position and Window Boundaries

Applescript seems to use the center of the icon rather than the left corner so the coordinates need to be adjusted by 64 px. 

The finder window counts the 22 px of the title bar in the window size so 22 must be added to the fourth coord of position to fit the entire image.

* Fix spelling of Servatrice

* Satifsfy Code Style

* Use vector format (eps)

* Delete background.tif

* Use vector format (eps)

* Use the right file extention in the script

* Point to svg

* Use svg

* Add svg for background image

* Delete background.eps

* Use plain SVG, adjust text

* Move applescript to /cmake

* Move background to /cmake

* Point CPack to /cmake

background and applescript now reside there

* Revert to .tif

* Use compressed .tif

* Use more specific file name

* Script expects .background:background.tif
2023-04-29 23:13:01 -04:00
ebbit1q
70ab02987a save sets dialog size (#4791)
* save sets dialog size

* reset sorting when restoring

* add to gitignore
2023-04-29 23:10:59 -04:00
ebbit1q
421da882d8 qt 6.5 compatibility (#4796)
* remove metatypes definitions

* deprecation of QApplication::setActiveWindow
2023-04-29 23:09:26 -04:00
SlightlyCircuitous
1a40102f71 Remove Debian 10 "Buster" Build (#4789)
* Drop Debian 10 Support

EOL September 10 2022

* Drop Debian 10 Support

EOL September 10, 2022

* Drop Debian 10 Support

EOL September 10, 2022
2023-04-19 23:04:35 +02:00
SlightlyCircuitous
1fbc10cd77 Add Ubuntu 23.04 Lunar Lobster Build (#4784)
* Create Lunar Dockerfile

Note that qt6-svg-dev and qt6-websockets-dev are renamed replacements for libqt6svg6-dev and libqt6websockets6-dev, respectively.

* Add Ubuntu Lunar

* Add Ubuntu Lunar to Template
2023-04-12 22:31:39 +02:00
skwerlman
87462398d8 show deck hash even when its invalid (#4595)
* show deck hash even when its invalid

* remove invalid deck hashes entirely

---------

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2023-04-10 22:29:29 +02:00
dependabot[bot]
b33246b29f Bump loader-utils from 2.0.3 to 2.0.4 in /webclient (#4707)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.3...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-01 22:31:44 -04:00
transifex-integration[bot]
dbffe30f63 Translate /webclient/src/i18n-default.json in es (#4657)
translation completed for the source file '/webclient/src/i18n-default.json'
on the 'es' language.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-04-01 22:30:59 -04:00
ebbit1q
9ce450d0b0 add _substr_[pos]_[len] to picture download templates (#4762) 2023-04-01 22:29:57 -04:00
ebbit1q
f5f8acf1fd save downloaded xmls (#4736) 2023-04-01 22:19:57 -04:00
tooomm
304ed3cd60 UI: User info dialog updates (#4533) 2023-04-01 21:50:49 -04:00
dependabot[bot]
07248692ce Bump webpack from 5.74.0 to 5.76.1 in /webclient (#4774)
Bumps [webpack](https://github.com/webpack/webpack) from 5.74.0 to 5.76.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.74.0...v5.76.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 23:46:50 -04:00
Brent Clark
cef99cba71 Add left nav (#4705)
* Automated translation update ( bf08a04cda )

* Add Layout component wip

* finish layout implementation

* convert header to left nav

* better nav item spacing

* return source files to original glory

* lint fix

* Remove height limit on login screen

* fix top spacing on 3-panel layout

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Brent Clark <brent@backboneiq.com>
2023-03-15 23:45:55 -04:00
SlightlyCircuitous
cab5f29b57 Add 'persistent' as valid attribute of related (#4771) 2023-03-10 02:36:17 +01:00
Basile Clement
55a2f75d16 Make cards rounded (#4765)
* Make cards rounded

Magic cards have rounded corners, and playing cards tend to have rounded
corners as well, but Cockatrice currently displays rectangular cards.

This can cause visual glitches when using image scans where the border
does not extend in the corner, and for this reason Cockatrice always
draws a (rectangular) border around the card to try and make it look a
bit better.

In this patch I take a different approach: rather than try to make
rounded pegs, er, cards, go into a square hole, the hole is now rounded.
More precisely, the AbstractCardItem now has a rounded rectangular shape
(with a corner of 5% of the width of the card, identical to that of
modern M:TG physical cards).

As a side effect, the card drawing gets a bit simplified by getting rid
of transformPainter() when drawing the card outline and using the
QPainter::drawPixmap overloads that takes a target QRectF instead.  This
means we no longer have to bother about card rotation when painting
since that's taken care of by the Graphics View framework (which
transformPainter() undoes).

* format

* Also give PileZone rounded corners

* Forgot untap status + bits of CardDragItem

* fix deckviewcard calculations

* Rounded CardInfoPicture
2023-03-07 01:41:08 +01:00
ebbit1q
a416ee8f2b set target to sha in release creation (#4763) 2023-03-03 11:40:16 -05:00
Basile Clement
c14936c63c PictureLoader: Replace downloadedPics cache with QNetworkCache (#4756)
* PictureLoader: Replace downloadedPics cache with QNetworkCache

Currently when the "Download card pictures on the fly" option is
enabled, Cockatrice stores downloaded pictures into a downloadedPics
sub-folder, keyed on set and card name. If a picture is found in that
folder, we never try to download a picture for that card ever again
(until it is reprinted in a more recent set, I guess).

This has the unfortunate consequence that if you change the URLs for
downloading card images, the changes are not applied to cards that
already have their picture downloaded. In particular, if you use
localized card pictures (through !sflang!), you get a mix of cards in
different languages depending on the currently configured language at
the time each card was downloaded.

This patch removes that mechanism in favor of setting a
QNetworkDiskCache on the QNetworkAccessManager used by the PictureLoader
to download pictures. The QNetworkDiskCache caches the picture keyed on
their URL: if the URL changes, a new request will be made. In
particular, if you use picture URLs with !sflang! and change the
language, pictures for the current language will be downloaded even for
cards that already have a picture. The QNetworkDiskCache is configured
with a maximum size of 4GB, which should be enough to hold one
high-quality JPEG for each M:TG card in existence.

Note that this does not affect the existing mechanism for defining
custom card art, either through the CUSTOM directory or the set-based
one.  Cockatrice will still read existing cards in the downloadedPics
directory as before, it will just no longer write into that directory
(since pictures are cached by the QNetworkDiskCache instead). To fully
switch to the new cache, users should use the "Delete Downloaded Images"
button in the settings: it will clear the QNetworkDiskCache but also
remove the downloadedPics directory.

* Do not use system cache dir for portable installs

* Add settings for network cache size

* Delete corrupted cache entries

* Use old-style connect() syntax (Qt5 build failure)

* Add setNetworkCacheSizeInMB to test mocks

* setTransferTimeout was added in Qt 5.15

* Improve logging messages

We now have the following messages

 - "Trying to download picture from url: URL" before loading a picture
   when picture download is enabled
 - "Trying to load picture from cache: URL" before loading a picture
   when picture download is disabled (i.e. cache-only offline mode)
 - "Removing corrupted cache file for url URL and retrying (ERR)" when
   when we fail to load a picture from the cache. Usually, this should
   be due to the timeout, in which case ERR will be "Operation
   Canceled".
 - "Download failed for url URL (ERR)" when there was an error
   downloading a picture from the network (ERR is the error message)
 - "Following redirect to URL" and "Following cached redirect to URL"
   when following a redirect (from network/from cache)
 - "Image successfully downloaded from URL" and "Image successfully
   loaded from cached url at URL" on success
 - "Possible cached/downloaded picture at URL could not be loaded" on
   ImageReader error

* Clarify that network cache is on disk

Also migrate "Delete Downloaded Image" to a "Clear" button right next to
the network cache size.

* Remove qPrintable

* Move pixmap cache settings to card sources

* qDebug().nospace()

* some formatting on debug messages

* format

* inverted condition

---------

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2023-03-03 16:55:17 +01:00
Basile Clement
42e7a8b423 Better support Double-Faced Cards (#4753)
* Better support Double-Faced Cards

This patch allows cards to be (virtually) transformed into other cards
while preserving their state, essentially implemeting the MTG mechanic
of the same name.

On the server side, this is implemented by allowing cards to be "stashed
away". A card that is stashed away is not in any zone, but is instead
owned by another card. When a token is destroyed due to a zone change,
if it had a card stashed away, that card is placed in the target zone
instead of the token.

On the database side, `attach="transform"` is used on `<reverse>` and
`<reverse-related>` to indicate that the created token should be
transformed this way.

Old servers ignore the new field in `Command_CreateToken` and will
perform a regular attachment, as currently.

* Address review comments

* Prevent tokens from being stashed

* format.sh
2023-03-03 16:54:51 +01:00
ebbit1q
4558b1c7ef set the target in the created release (#4758)
the target needs to be the current short commit hash because it is being
compared to by the updater, the default is "master" which breaks the
updater.
2023-02-23 01:11:41 +01:00
SlightlyCircuitous
f444ba9665 Corrected edition search syntax (#4752)
* Replaced "e:lea,leb" with "e:lea or e:leb"
* Removed "e:lea,leb -(e:lea e:leb) (Cards that appear in Alpha or Beta but not in both editions)" as this does not produce results in Cockatrice (even when using "or" instead of "," as above)
2023-02-16 12:08:00 +01:00
ebbit1q
787c8d740b replace github release actions with the gh tool in bash (#4746)
* replace github release actions with the gh tool in bash

* set macos 10.15 qt version to 6.2 LTS
2023-02-10 03:33:48 -05:00
Basile Clement
ef38a8bb2b Re-add missing '/' separator in <pt> after b282df2e27 (#4747)
In b282df2e27 (#4728) the logic for
creating <pt> values was updated to avoid adding a final slash after an
existing power value and missing toughness value. This works by setting
the ptSeparator to an empty string when either the power or the
toughness is undefined. However, due to the ptSeparator variable being
scoped out of the `for` loop, this causes all remaining cards to have an
empty string as a separator, ending up with <pt> values of e.g. 21
instead of 2/1.

Moreover, the implementation from #4728 is ambiguous in the case of a
card having a toughness value but no power value: in that situation, it
creates a <pt> entry with the toughness value and no separator, which is
not a good idea since it is not possible to know if <pt>2</pt> means
power 2 and no toughness, or no power and toughness 2 (Cockatrice takes
the first interpretation).

To avoid ambiguities, the <pt> value is now one of:

 1. A regular P/T value when the card has power and toughness
 2. A simplified P value when the card has power but no toughness
 3. A simplified /T value when the card has toughness but no power
 4. Absent when the card has neither power nor toughness

Note that, as far as I can tell, Cockatrice seems to (incorrectly, IMO)
ignore the initial slash if present in Player::parsePT, and treat /T as
a power value. However that is a separate issue: this patch is concerned
with Oracle and ensuring proper values in cards.xml, not with how
Cockatrice interprets those values.
2023-02-08 19:59:14 +01:00
Jeremy Letto
b5d35d346a Add architecture image to webclient README (#4745) 2023-02-08 18:04:23 +01:00
Basile Clement
9a7b15d19b Allow revealing specific cards from hand and library (#4743)
Currently Cockatrice allows revealing the whole hand, or one card at
random from the hand. Sometimes, a player needs to reveal a specific
card from their hand instead, which is not supported. To achieve a
similar effect, players usually move the corresponding card (or cards)
to a public zone, then back to their hand. While this works, it is
unsatisfactory (compared to a regular reveal, you can't keep the
"revealed" window around, for one) and somewhat unintuitive.

This patch adds a "Reveal to..." menu to cards and card selections in
the player's hand or in custom zones (this includes looking at the
player's library). This menu allows revealing a card or set of cards to
any given player, or to all players.

To implement this functionality at the protocol level, the existing
RevealCards command is extended to support revealing multiple specific
cards. This is done by making `card_id` a non-packed repeated field in
the `Command_RevealCards` and `Event_RevealCards` protobufs.  Using a
non-packed repeated fields allows maintaining backwards compatibility:
an empty optional field is encoded the same way as an empty non-packed
list, an optional field with a value is encoded the same way as a
one-element non-packed list, and when decoding a multi-elements
non-packed list as an optional, only the last item in the list is read.

Since the RevealCards command already exists, and due to the compatible
encodings, a new client connecting to an old server can reveal a single
specific card from their hand. When trying to reveal multiple cards at
once, the old server will only see the request for one of the cards to
be revealed, and the player will have to reveal each card separately.

On the other hand, `Event_RevealedCards` already has an explicit list of
cards revealed by the server, and the `card_id` field is only used when
exactly one card has been revealed: thus, old and new clients will
behave identically when receiving a new `Event_RevealedCards`. In
particular, if a player using a new client reveals multiple cards from
their hand on a new server, another player using an old client will
correctly see all the revealed cards.

The approach used to build the "Reveal to..." menu is slightly different
from the approach used to build other player selection menus. Because
the "Reveal to..." menu is specific to each card, but must also be
updated whenever a player is added to or removed from the game, I chose
to re-create it on the fly whenever a card is clicked, as that seemed
the safest way to avoid both memory leaks and inconsistent state given
my understanding of the code.
2023-02-07 17:12:04 -05:00
Zach H
ba35a11e82 Find OpenSSL on Windows (#4730) 2023-02-07 16:47:50 -05:00
Basile Clement
00c9efe541 Enable buttons for current game when receiving server response (#4737)
* Enable buttons for current game when receiving server response

Previously, upon joining a game, we were unconditionally re-enabling the
"Join" button in the lobby, even if it was not enabled in the first
place, causing #4698. This could also lead to issues where if the user
selects a different game after joining (which they can do in case of
e.g. network connectivity issues), the "Join as spectator" button could
get incorrectly disabled.

This fixes #4698 by re-enabling the buttons based on the state of the
currently selected game at the time the response is received. This also
avoids inconsistencies if a different game has been selected in between
joining and receiving a response from the server.

* Typo: enable gameButton in enableButtons

The "create game" button was incorrectly being disabled in enableButtons
whereas (as the name indicates) it should have been enabled

* Remove misleading comment about race conditions
2023-02-06 13:49:45 +01:00
cajun
44d1ab348b Add Oracle support for persistent & Fix persistent on reverse-related (#4742)
* fix persistent reverse-related

* create relations from spellbook property

* run format.sh
2023-02-06 07:00:54 -05:00
Zach H
f25e4785ae FIX #4665: Address missing sound on Qt5 Builds (#4733)
* FIX #4665: Address missing sound on Qt5 Builds

* FIX #4665: Address missing sound on Qt5 Builds

* Include both engines
2023-02-05 22:05:47 -05:00
Zach H
4c290aec57 Fix #4706: don't replace ampersands when loading from plain text (#4734)
* Fix #4706: Exit linting early if a card with the exact name is found first

* Remove ampersand conversion

* put back

* Update tests

* Format

* don't use qsizetype

---------

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2023-01-30 00:37:28 +01:00
tooomm
42d1d66d9b CI: macOS-10.15 environment is deprecated (#4664)
* macOS-10.15 environment is deprecated

Build for 10.14 has to be dropped.
Build for 10.15 can be preserved via 11.

* update xcode versions

* Xcode 13.0 doesn't work for us on Big Sur

* [skip ci] update list of binaries
2023-01-29 12:47:42 -05:00
ebbit1q
06c25301a5 update build dockerfiles (#4732) 2023-01-23 18:14:35 -05:00
transifex-integration[bot]
43dbb45cc6 Translate /webclient/src/i18n-default.json in it (#4718)
translation completed updated for the source file '/webclient/src/i18n-default.json'
on the 'it' language.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-01-23 02:26:24 -05:00
dependabot[bot]
9fb62de5cb Bump json5 from 1.0.1 to 1.0.2 in /webclient (#4729)
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-23 02:26:12 -05:00
PakhomCh
b282df2e27 Fixed ptSeparation oracle issue (#4728)
* Fixed psTeparation oracle issue

* Update oracle/src/oracleimporter.cpp

Co-authored-by: PakhomCh <pakhomch@gmail.com>
2023-01-16 13:30:19 -05:00
ebbit1q
da8f57f397 remove link to google doc roadmap from readme (#4727) 2023-01-02 22:07:18 -05:00
SlightlyCircuitous
e9f1992c7f Add URL to explain message macros (#4712)
* Add URL Link to Explain Message Macros

* Add URL Link to Explain Message Macros

* Revert custom shortcuts wiki link

* Conform to formatting guidelines
2022-12-11 23:54:06 +01:00
transifex-integration[bot]
2c94a6a64e Apply translations in it (#4714)
translation completed for the source file '/cockatrice/cockatrice_en@source.ts'
on the 'it' language.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2022-12-11 23:42:51 +01:00
SlightlyCircuitous
6a5e0a8501 Display Welcome Message as Most Recent Message (#4720)
* Move Join Message Block

- Moves Join Message code block to after the for loop that gets old chat message, which makes the Join Message the most recent message in the chat box instead of the oldest
-Only the rc.enqueuePostResponseItem() line really needs to move for functionality, but I have moved the whole block for readability

* Comply with formatting guide

-Remove offending white space
2022-12-11 23:40:47 +01:00
Jeremy Letto
26d7fe2ff0 Webatrice: update deps (#4700)
* save work

* fix reset styling

* fix toast reducer

* update non-react deps

* update react libraries

* remove jquery, use sanitize-html instead

* add missing change

* fix deps and dev deps

* update workflow to target Node 16

* run @mui/codemod to remove @mui/styles

* add default body font size

* update react 17 to 18

* declare enum before use

* add rel attr to links

* fix font sizing issue

* trailing commas

* refactor deep destructuring

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-11-01 12:41:42 -05:00
ebbit1q
5854a635ca fix deprecated usage of set-output (#4699) 2022-10-31 23:26:26 +01:00
ebbit1q
3d4858b840 use qt6 in arch builds (#4691)
* use qt6 in arch builds

* fix 6.4.0 deprecations
2022-10-31 23:26:13 +01:00
ebbit1q
dec2a252fa remove dependency on deprecated qt5 libraries for qt6 (#4692)
* remove dependency on deprecated qt5 libraries for qt6

removes the use of qt6-5compat for builds
replaces use of QRegExp with QRegularExpression
fixes incorrect usage of QRegExp
removes use of QTextCodec
fixes incorrect usage of QTextCodec
sets qtlinguist as a required component for qt6

* fix anchoredPattern not existing in qt 5.11
2022-10-31 23:24:11 +01:00
Jeremy Letto
f619ef23fd Upgrade to MUI 5 (#4606)
* save work

* fix perf issue on i18n rollup

* fix reset styling

* move body line-height from reset

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-10-29 20:17:03 -05:00
Antoine Dahan
72743e834e Selecting game already open in a tab brings user to that tab. (#4653)
* When trying to join a game from GameSelector that's already been joined by you, navigate to its game tab.

* return immediately, do not change button states

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-10-29 15:46:50 +02:00
Tobyclark
8e4ddf366c Added hint when drawing 0 cards (#4697)
* Logging a player drawing 0 cards will now result in the message "player had no cards left to draw."

* Added hint when drawing when deck is empty

* Added hint when drawing when deck is empty

* Added hint when drawing when deck is empty

* Update cockatrice/src/messagelogwidget.cpp

update log message to present tense

Co-authored-by: ebbit1q <ebbit1q@gmail.com>

* added deckIsEmpty parameter to messagelogwidget::logDrawCards

* run format

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-10-29 15:46:29 +02:00
ebbit1q
b99bd0176a update deprecated workflow actions (#4690) 2022-10-17 23:55:07 -04:00
ebbit1q
a68b98b245 update vcpkg submodule (#4689) 2022-10-17 18:23:39 -04:00
transifex-integration[bot]
a69d6ff1b4 Translate /oracle/oracle_en@source.ts in it (#4688)
translation completed for the source file '/oracle/oracle_en@source.ts'
on the 'it' language.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2022-10-17 16:43:31 -04:00
transifex-integration[bot]
ec679e95fd Translate /webclient/src/i18n-default.json in fr (#4678)
translation completed updated for the source file '/webclient/src/i18n-default.json'
on the 'fr' language.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2022-10-17 16:43:14 -04:00
ebbit1q
3f78235a74 fix updater with changes in release name (#4666)
* fix updater with changes in release name

* clangify
2022-10-17 16:42:08 -04:00
ebbit1q
c8a2fd78b0 fix crash when right clicking a user's name in a replay (#4681)
this happened when viewing a replay with the "view replay" option in the
top menu, instead of using the replays tab while connected to a server.
this uses the local game player instead of the online one which does not
initialize the player info of the local spectating player, this causes a
crash when opening the context menu on another player in the replay from
one of their chat messages as it tries to check if you're a registered
user and could add them as a friend etc.
it now regards the uninitialized player info as an unregistered user and
will not show these options.
2022-10-17 16:40:27 -04:00
ebbit1q
45cf08111a fix crash when a cardmenu becomes an orphan (#4682)
* fix crash when a cardmenu becomes an orphan

when a cardmenu is closed the cursor on that card reverts to the open
hand, this crashed the client when that card would be destroyed or moved
the act of reverting to the open hand now happens as an emitted signal,
this way it just doesn't exist anymore when the card is deleted.

* simplify fix
2022-10-17 16:38:44 -04:00
ebbit1q
527ac36129 update card menu immediately on card counter event (#4686)
fixes #4658
2022-10-17 16:37:32 -04:00
ebbit1q
a7232513a7 remove cards being looked at from the count on drawing (#4671) 2022-10-17 16:35:54 -04:00
ebbit1q
90f187e885 fix 4679 (#4680) 2022-10-02 13:23:35 -04:00
ebbit1q
235adbbdf1 fix sound slider on qt6 (#4642) 2022-09-01 19:01:20 +02:00
cajun
40c88fe385 Conjured tokens xml attribute (#4646)
* Conjured xml attr

Add conjured attribute to related xml tags that makes those cards not be destroyed when they leave the battlefield.

* fix build errors, add sarkhan to test

* update oracle importer to support spellbooks from json

* debugging

* fix weird spacing

* fix oracle spacing too

* simplify if/else

Co-authored-by: Zach H <zahalpern+github@gmail.com>

* rename, remove oracle update

* remove extra linebreak

* run format.sh again
2022-09-01 08:45:04 +02:00
tooomm
54b7943d17 CI: Update Qt setup on Windows (#4654)
* use new internal caching

* Update desktop-build.yml

* Update desktop-build.yml

* Update desktop-build.yml

* use newest patch version

jurplel/install-qt-action#version

* python not needed

* Update desktop-build.yml

* Update desktop-build.yml

* Update desktop-build.yml

* Update desktop-build.yml

* Update desktop-build.yml

* install openssl via tools

* add $RUNNER_WORKSPACE location

Source: https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/environment-variables-full-list-github-actions

* Update FindWin32SslRuntime.cmake

* Update FindWin32SslRuntime.cmake

* Update FindWin32SslRuntime.cmake

* Update FindWin32SslRuntime.cmake

* Delete download_openssl.sh

* cleanup

* [skip ci] improve short-circuit evaluation comment

* restructure
2022-09-01 02:38:25 +02:00
ebbit1q
2f100f2ba3 fix keepalive being multiplied in server timeout (#4663)
* fix keepalive being multiplied in server timeout

a timeout happened after the client not receiving anything for
keepalive * keepalive * maxtimeout (5 * 5 * 10) seconds instead of what
you'd expect, it now only uses keepalive once instead of twice this
means it should now take 50 seconds to time out when disconnected

* change timeout to 15 seconds instead

change time between pings to 3 from 5 seconds
change timout to 5 from 10 repeats
2022-09-01 02:38:10 +02:00
cajun
b5305aa5e4 Attach and Unattach apply to entire selection (#4651)
* (un)attach applies to entire selection

* additional code formatting, just because it's nicer

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-08-25 21:26:29 -04:00
Gian Furrer
a2624e36f3 fix broken link in readme (#4659) 2022-08-11 23:21:30 +02:00
transifex-integration[bot]
540511befd Apply translations in es (#4656)
translation completed for the source file '/cockatrice/cockatrice_en@source.ts'
on the 'es' language.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2022-08-10 16:35:09 +02:00
tooomm
014e73d569 CI: Remove EOL builds (Fedora 34 and Ubuntu 21.10) (#4628)
* Fedora 34 EOL

* Delete .ci/Fedora34 directory

* update fedora

* Ubuntu 21.10 EOL

* Ubuntu 21.10 EOL

* Delete .ci/UbuntuImpish directory
2022-08-09 20:56:27 +02:00
ebbit1q
e2c256db5b fix typo in format.sh (#4647) 2022-07-05 15:49:19 -04:00
ebbit1q
28aa473362 rework formatting with cmake-format (#4627)
* merge clangify and cmakify into format.sh

update desktop lint workflow to 22.04

print cmake-format version as well

um, rename things?

add extra examples to format.sh --help
add option to not run clang-format
fix version display in .ci/lint_cpp.sh
fix relative paths in format.sh

fix formatting dirs

* run ./format.sh --cmake --branch ""

* revert formatting of cmake comments
2022-06-08 21:14:26 -04:00
ebbit1q
b79506fbcf add a windows 7 specific build to ci (#4639) 2022-06-08 21:09:35 -04:00
ebbit1q
afbd7252ac remove stopping sounds from interrupting each other (#4640) 2022-06-08 21:06:44 -04:00
ebbit1q
3e5b7cd392 remove unused variables (#4636) 2022-06-08 00:32:11 +02:00
Dawid Skórzewski
77622095d5 Fixed typos in Qt6_FOUND function reference (#4638) 2022-06-04 22:33:02 -04:00
dependabot[bot]
8ee71300a2 Bump protobufjs from 6.11.2 to 6.11.3 in /webclient (#4637)
Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 6.11.2 to 6.11.3.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/v6.11.3/CHANGELOG.md)
- [Commits](https://github.com/protobufjs/protobuf.js/compare/v6.11.2...v6.11.3)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-03 01:21:37 -04:00
dependabot[bot]
d79971edbc Bump dexie from 3.2.1 to 3.2.2 in /webclient (#4629)
Bumps [dexie](https://github.com/dfahlander/Dexie.js) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/dfahlander/Dexie.js/releases)
- [Commits](https://github.com/dfahlander/Dexie.js/compare/v3.2.1...v3.2.2)

---
updated-dependencies:
- dependency-name: dexie
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-23 17:32:23 -04:00
Impyrical
273ebb22e4 Tackling #4041 (#4625)
Copy contents of selected cell from card database when ctrl-c is
pressed, mimicking the behavior of ctrl-c in the deck editor.
2022-05-21 01:22:08 +02:00
Zach H
6b86e4d463 Update configuration path to be backwards compatible (#4620)
* Update configuration path to be backwards compatible
Windows users have used AppData/Local/Cockatrice, whereas the new system was using AppData/Roaming/Cockatrice. This reverts the behavior in a Qt5/6 way.
2022-05-12 18:13:49 -04:00
ZeldaZach
a8e1dc3b18 Re-Run cmakeify 2022-05-09 18:01:30 -04:00
Zach H
a95b338c80 Add cmake format (#4618)
* Support CMakeify operation

* Run Cmakeify

* Update cmakeify.sh

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-05-08 21:22:43 +02:00
Zach H
3e90f109a2 Prevent bad access potential for removals by checking bounds (#4617)
* Prevent bad access potential for removals by checking bounds
Fix #4616

Switch to removeOne instead of bound checking removeAt

* Revert server cardzone check
2022-05-08 20:26:50 +02:00
ZeldaZach
b02adccf87 Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice
Add lock around deleting arrows for commanding cards

Add support for Qt6 w/ Backwards Qt5

Handle Qt5/6 cross compilation better

Last cleanups

caps matter

Fix serv

Prevent crash on 6.3.0 Linux & bump to 5.8 min

Prevent out of bounds indexing

Delete shutdown timer if it exists

Fixup ticket comments, remove unneeded guards

Try to add support for missing OSes

Update .ci/release_template.md

Update PR based on comments

Update XML name after done and remove Hirsute

Address local game crash

Address comments from PR (again)
Tests don't work on mac, will see if a problem on other OSes

make soundengine more consistent across qt versions

disable tests on distros that are covered by others

Fix Oracle Crash due to bad memory access

Update Oracle to use new Qt6 way of adding translations

Add support for Qt5/Qt6 compiling of Cockatrice

Remove unneeded calls to QtMath/cmath/math.h

Update how we handle bitwise comparisons for enums with Tray Icon

Change header guards to not duplicate function

Leave comment & Fix Path for GHA Qt

Update common/server.h

Update cockatrice/src/window_main.cpp

Rollback change on cmake module path for NSIS

check docker image requirements

add size limit to ccache

put variables in quotes

properly set build type on mac

avoid names used in cmake

fix up cmake module path

cmake 3.10 does not recognize prepend

Support Tests in FindQtRuntime

set ccache size on non debug builds as well

immediately return when removing non existing client

handle incTxBytes with a signal instead

don't set common link libraries in cockatrice/CMakeLists.txt

add comments

set macos qt version to 6

Try upgrading XCode versions to latest they can be supported on

Ensure Qt gets linked

add tmate so i can see what's going on

Qt6 points two directories further down than Qt5 with regard to the top lib path, so we need to account for this

Establish Plugins directory for Qt6

Establish TLS plugins for Qt6 services

Minor change for release channel network manager

Let windows build in parallel cores

Wrong symbols

Qt6 patch up for signal

add missing qt6 package on deb builds

boolean expressions are hard

negative indexes should go to the end

Intentionally fail cache

move size checks to individual zone types

Hardcode libs needed for building on Windows, as the regex was annoying

Update wording

use the --parallel option in all builds

clean up the .ci scripts some more

tweak fedora build

add os parameter to compile.sh

I don't really like this but it seems the easiest way
I'd prefer if these types of quirks would live in the main configuration
file, the yml

fixup yml

readd appended cache key to vcpkg step

fix windows 32 quirk

the json hash is already added to the key as well

remove os parameter and clean up ci files

set name_build.sh to output relative paths

set backwards compatible version of xcode and qt on mac

set QTDIR for mac builds on qt5

has no effect for qt6

export BUILD_DIR to name_build.sh

merge mac build steps

merge homebrew steps, set package suffix

link qt5

remove brew link

set qtdir to qt5 only

compile.sh vars need to be empty not 0

fix sets manager search bar on qt 5.12/15

fix oracle subprocess errors being ignored on qt 5

clean up translation loading

move en@source translation file so it will not get included in packages
NOTE: this needs to be done at transifex as well!

Use generator platform over osname

Short circuit if not Win defined
2022-05-06 17:31:08 -04:00
dependabot[bot]
accd5e4df7 Bump async from 2.6.3 to 2.6.4 in /webclient (#4614)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 17:31:08 -04:00
dependabot[bot]
d007196059 Bump ejs from 3.1.6 to 3.1.7 in /webclient (#4613)
Bumps [ejs](https://github.com/mde/ejs) from 3.1.6 to 3.1.7.
- [Release notes](https://github.com/mde/ejs/releases)
- [Changelog](https://github.com/mde/ejs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mde/ejs/compare/v3.1.6...v3.1.7)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 17:31:08 -04:00
ebbit1q
79501a4af7 fix the uid and gid of the user in the docker container (#4610)
* fix the uid and gid of the user in the container

this fixes this error:
unsafe repository ('/src' is owned by someone else)
this caused the hash to go missing in the version number

* add --interactive option to .ci/docker.sh

* add --dir to .ci/compile.sh

* fix up the comments on the ci scripts

* add extra comment to docker.sh
2022-04-18 19:04:49 -04:00
ebbit1q
64c6611ea5 env vars don't go into docker containers like that (#4609)
reverts a bit of #4580 92ed53e13a
2022-04-17 22:11:55 -04:00
Zach H
a532a63403 Change actions to use Windows 2019
Windows 2022 isn't stable yet with the Qt installer, and we need to cut releases so this unblocks us
2022-04-02 00:55:05 -04:00
tooomm
c10c69d0a9 fix if condition on ci translations (#4603) 2022-04-01 11:24:51 +02:00
dependabot[bot]
191d5a83a9 Bump minimist from 1.2.5 to 1.2.6 in /webclient (#4601)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-26 21:50:52 -04:00
dependabot[bot]
de69e2c41f Bump node-forge from 1.2.1 to 1.3.0 in /webclient (#4600)
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/digitalbazaar/forge/releases)
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-26 21:49:27 -04:00
Jeremy Letto
6d200d17b7 close previous testConnect attempts (#4598)
* close previous testConnect attempts

* remove onerror handler when canceling previous attempt

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-03-22 17:42:58 -05:00
Jeremy Letto
4899b6cfef add kosovo flag (#4597)
* add kosovo flag

* add xk and eu flags to cockatrice

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-03-19 20:07:40 -05:00
Jeremy Letto
0ff59e6d1e test connection UI (#4596)
* test connection UI

* cleanup

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-03-19 19:22:00 -05:00
Jeremy Letto
00a2a8ab71 update pr-bt translation file (#4593)
Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-03-13 15:59:36 -04:00
Jeremy Letto
2c702d3579 Webatrice: husky (#4591) 2022-03-13 13:44:51 -04:00
ebbit1q
b464fa8d99 actualise country names (#4592)
see wikipedia here:
https://en.m.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
2022-03-07 21:46:09 -06:00
ZeldaZach
2b330940e1 ncu update 2022-03-07 13:46:43 -05:00
Jeremy Letto
0d0337f091 Webatrice: update package.json (#4590)
* update package.json

* cleanup

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-03-07 13:43:01 -05:00
Jeremy Letto
533045445a Webatrice: improve language dropdown (#4589)
* useLocaleSort hook, translate language dropdown

* add pt-BR translation

* fix pt-BR flag

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-03-06 20:12:27 -06:00
Jeremy Letto
21f7dd5eba add fr and nl translations (#4587)
* add fr and nl translations

* update fr

* fix password label translation

* translate country strings

* fix double accents

* fix Ivory Coast

* sort countries

* use more performant Collator over localeCompare

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-03-06 17:19:51 -06:00
Jeremy Letto
f5b973e15c Webatrice: i18n login screen (#4584)
* i18n: login container and form

* i18n: activate, host, and register forms

* i18n: reset password forms

* i18n: login dialogs, ICU formatting

* i18n: login containers and components

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-03-02 22:34:57 -06:00
ebbit1q
baaf261116 use utf8 instead of the system encoding (#4582)
* use utf8 instead of the system preference

* found another toLocal8Bit
2022-02-27 22:33:36 +01:00
ebbit1q
92ed53e13a update workflow to use windows 2022 image (#4580)
* update workflow to use windows 2022 image

* return the version of the run vcpkg action

the action has been changed to now use a vcpkg.json file instead of the
txt file we use now, we should try to find a way to update it to the new
workflow in case the current one becomes obsolete

* clean up a bit for consistency

* run ctest directly instead of relying on the makefile

* set -C flag for ctest

* set config option for cmake --build

this option is ignored for other platforms
2022-02-27 22:32:54 +01:00
Jeremy Letto
2a54e9d7d1 Webatrice: fix saved password (#4563)
* fix saved label, and fix using hashedPassword when Save is unchecked

* update host only after successful login

* cleanup

* fix ability to deselect saved password on successful login

* cleanup

* clear options after connection

* fix registration saved username

* cleanup

* change label

* fix tests

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-02-27 10:12:38 -06:00
Jeremy Letto
9577ada171 Webatrice: i18n (#4562)
* implement i18n capability

* reset package.lock file

* remove custom fallback

* fix relative path for i18n files

* check for language support before fetch request

* add LanguageDropdown component, es translation file to prove functionality

* remove boilerplate

* bundle default english translation with app

* add missing file

* rollup component-level i18n files

* cleanup

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-02-26 21:36:53 -06:00
ebbit1q
217dc09c0f fix image downscaling (#4567) 2022-02-23 23:46:53 +01:00
ebbit1q
7108eb42c8 implement custom protobuf debug string creation (#4532)
* implement custom protobuf debug log string creation

* add version guards

* add missing header

* debian10 repository misses headers

* clean up logging messages a bit

* fix some more formatting on debug messages
2022-02-23 23:46:23 +01:00
ebbit1q
eb3ce1fd7e hide revealed cards when they are shuffled (#4570) 2022-02-23 23:46:07 +01:00
dependabot[bot]
c88d44e16c Bump url-parse from 1.5.3 to 1.5.7 in /webclient (#4578)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.3 to 1.5.7.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.3...1.5.7)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-22 23:44:27 -05:00
dependabot[bot]
ec2ad4c713 Bump follow-redirects from 1.14.7 to 1.14.8 in /webclient (#4574)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-22 23:44:16 -05:00
Brent Clark
4c04b4ef5a Webatrice: Registration toasts (#4566)
* wip

* Registration Success Toast

* remove debugging code

* remove unused field

* Show toast on successful password reset

* Toast on account activation success

* lint and PR feedback

* Rework interface names to avoid collision

* Move CssBaseline to sibling of ToastProvider

Co-authored-by: Brent Clark <brent@backboneiq.com>
2022-02-16 02:40:30 +01:00
Jeremy Letto
88b861d632 Webatrice: improve prebuild steps and add .env configs (#4564)
* create .env file for server configuration

* render client version

* automate env file

* add prestart command

* create server-props.json instead of using .env

* automate master proto file

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-02-13 00:58:47 +01:00
ebbit1q
408a13c937 remove unused include in pb file (#4572)
shows as warning on compile:
session_commands.proto:2:1: warning: Import serverinfo_user.proto is unused.
2022-02-12 23:40:47 +01:00
ebbit1q
7d0a255a49 add database migration from blob to mediumblob (#4568) 2022-02-09 20:11:13 +01:00
ebbit1q
252883f67e set rx and txBytes to zero on initialization (#4569) 2022-02-09 17:57:35 +01:00
Jeremy Letto
bf08a04cda Webatrice: tech debt (#4560)
* turn autocomplete off by default on inputs

* trim input fields onSubmit

* move trim to form submit

* cleanup

* remove dead code

* protect trim against null values

* make password optional on Login for servers that allow unregisted logins

* cleanup

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-02-06 17:41:02 +01:00
Jeremy Letto
6928a2bd98 Webatrice: show loading screen until protobuf initializes (#4559)
* show loading screen until protobuf initializes

* cleanup

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-02-04 17:03:39 -05:00
Jeremy Letto
bb16ae09ef Webatrice: fix login bugs (#4557)
* fix login after failed connection attempts, limit connection attempt time

* fix register hashed password and salt

* add feature detection and Unsupported Browser screen

* nit

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-02-04 14:07:15 -05:00
Brent Clark
81d031ca0f Webclient: Add Toasts component and show on known host CUD operations (#4556)
* Add Toasts component and show on known host CUD operations

* add slide transition

* NIT

Co-authored-by: Brent Clark <brent@backboneiq.com>
2022-02-01 12:08:05 -06:00
Jeremy Letto
8203a2fdeb fix failed saltRequest (#4554)
* fix failed saltRequest

* improve requestSalt error handling

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-02-01 04:03:31 +01:00
tooomm
75f0d60dff Webclient: Update script (#4553)
* Update package.json

* introduce linting error

* Revert "introduce linting error"

This reverts commit 0a622bcb2e.
2022-01-31 15:14:22 +01:00
Jeremy Letto
992e28797f Webatrice: support hashed passwords in register and resetPassword (#4549)
* support hashed passwords in register and resetPassword

* lint

* support hashedPasswords for accountActivation

* use salt in post-register login step

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-01-30 22:09:16 -06:00
Jeremy Letto
92f941a54c renable login after fail attempt (#4552)
Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-01-30 22:06:30 -06:00
Jeremy Letto
4c31527832 implement password length requirements (#4551)
Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-01-31 03:51:01 +01:00
Jeremy Letto
febe029ed4 use CompanyDropdown component in registration form (#4548)
Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-01-30 19:47:10 -06:00
Jeremy Letto
1d780058c8 Webatrice: Add account validation dialog/form (#4547)
* Add account validation dialog/form

* clean up

* close registration dialog on token request

* remove dupe code

* add subtitle styling

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-01-30 19:42:34 -06:00
Brent Clark
513fcb0908 Webclient: Handle firing an event once (#4499)
* draft: handle firing an event once

* lint

* Prevent rapid double-click on sending messages

* no rest spread on single primative when sibling components exist

* clear message instead of using a fireOnce handler.

* fix tests

* remove unnecessary validate mock
2022-01-30 12:14:28 -05:00
dependabot[bot]
4bb13677c8 Bump nanoid from 3.1.30 to 3.2.0 in /webclient (#4542)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.30 to 3.2.0.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.30...3.2.0)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-24 00:15:46 -05:00
ebbit1q
a5baf4303c create workflow for automatically updating the translation sources (#4543)
* create workflow for automatically updating the translation sources

* change to once per month
2022-01-23 23:14:48 +01:00
ZeldaZach
7aba404f2e Add i18n for Oracle and fix Transifex 2022-01-22 00:17:29 -05:00
Zach H
1b7e8f3a16 Re-add handling of i18n for Oracle (since it was manual before) (#4541)
Removes en@source from options menu intentionally
2022-01-21 23:35:04 -05:00
ZeldaZach
5cf93ad61c Remove empty languages 2022-01-21 22:59:47 -05:00
ZeldaZach
5a52e085a7 Translation Dump! 2022-01-21 22:28:07 -05:00
ebbit1q
5d31b70406 [WIP] add english translation (#4120)
* move en.ts to en@source.ts

* run lupdate

Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2022-01-21 21:35:26 -05:00
tooomm
2885f93fdf run ci not only on pr's to master (#4537) 2022-01-20 18:27:26 +01:00
tooomm
d225f55e5a CI: Uniform job ordering and naming (#4534)
* remove xcode string in file name

* alphabetical ordering + newest to the top

* remove not needed entries

* append -bit to name

* chronological

* spaces
2022-01-20 02:51:42 +01:00
tooomm
69edc73585 cleanup (#4530) 2022-01-18 16:40:05 +01:00
tooomm
ead1143f2e Prettier settings dialog (#4357)
* prevent stretched layout in settings

* restore layout of settings pages with already expanding elements

* Support full screen resolution and set a minimum that works well no matter the screen size

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2022-01-16 21:06:52 -05:00
ebbit1q
2fc85e0c08 use hashed passwords in all commands (#4493)
* protocol changes

* server changes

* client changes for password reset and registration

* add hashed password to change password in client

* always use hashed password to log in

* add warning to client when using plain text password

* require real password for changing email on server

this is backwards compatible as users logged in with a real password on
older clients will not need this, only users logged in with a hashed
password

* implement password dialog when changing email

* require min password length

* use qstringlist to build query instead

* use clear instead of = ""

* add max to password dialog

* use proper const ness in abstractclient

* reject too long passwords instead of trimming
2022-01-16 20:32:30 -05:00
ebbit1q
fcafcb340a remove all instances of the type long (#4519)
the long type has different sizes across operating systems and should
not be used

in the timeline an overflow could occur if the width in pixels
multiplied by the total amount of milliseconds in the replay is larger
than 2^31 which is easy enough considering with only 500 pixels width
you'll reach this number with only 1.2 hours of replay (about 4 million
millis), note that this would be windows exclusive as *nix uses 64 bits

~~qt-json's own repo suggests using qt5's implementation instead, testing
revealed this is quite a bit faster, contrary to #3480~~ testing proved
this to not be compatible with older qt versions

servatrice uses the qthread usleep function which used to be protected
but is now public

cockatrice is not compatible with qt4 and hasn't been for a while
2022-01-16 18:05:24 -05:00
ebbit1q
ae9b8b8f34 miscellaneous refactors (#4521) 2022-01-16 17:58:53 -05:00
ebbit1q
994704d353 implement max lengths for input dialogs that are sent to the server (#4522)
* implement max lengths for input dialogs that are sent to the server

* missed a double setMaxLength

* implement max string lengths server side

* add custom getText dialog with max length

* fix deck storage tab and miscellaneous server side

* add max size for deck uploads

* final pass on client side limits
2022-01-16 17:57:01 -05:00
Zach H
d61c604bf4 Address macOS issue where right-clicking a username in the main chat (#4523)
* Address macOS issue where right-clicking a username in the main chat (or game chat) areas would pop up a seemingly empty user profile. This is because the resize event is overridden and doesn't actually attempt to resize based on the size hint of the dialog. Now that we're explicit with the call, this resize should be forced and have comparable results to popping up user profile from the user list.

* use datetime for calculating account age (#4526)

* use datetime for calculating account age

make translating easier by using tr multiples
automatically account for leap days

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-01-16 16:51:13 -05:00
tooomm
baaf22d0c4 UI: Improve alignment in user info (#4524)
* fix alignment

* tweaking

* lint

* limit flag to one column

* lint

* cleanup

* Update userinfobox.cpp

* re-add manual window resizing

* Update cockatrice/src/userinfobox.cpp

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2022-01-16 22:49:41 +01:00
tooomm
368ff1793f CI: Add Debian 11 (#4525)
* add debian 11

* rename debian10

* fix space

* Update Dockerfile
2022-01-16 16:46:04 -05:00
dependabot[bot]
3253ad64fd Bump follow-redirects from 1.14.5 to 1.14.7 in /webclient (#4527)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.5 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.5...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-16 16:32:22 -05:00
ebbit1q
1e70989f38 add password hash test (#4528)
* clangify tests

* add password hash test

* properly use googletest semantics
2022-01-16 16:32:11 -05:00
ebbit1q
f6634de18d replace fixed size of criteria in log tab (#4515)
it's now a max size with expanding policy, looks fine I guess
fixes #4510
2022-01-11 21:35:18 -05:00
ebbit1q
7903cd520a perform restartLayout conditionally (#4513)
* Revert "Fixed layout on Deck Editor not using last layout. It was reseting layout on ctor. (#4420)"

This reverts commit 3bc90003b3.

* restart layout on fresh installs
2022-01-08 16:03:53 -05:00
ebbit1q
26d1fcc944 simplify search string (#4516) 2022-01-08 16:02:54 -05:00
ebbit1q
59d4e64a8d use multiline input dialog for annotations (#4517) 2022-01-08 16:02:25 -05:00
ebbit1q
1347d88ddb also forgot this in #4496 (#4514) 2022-01-08 16:01:54 -05:00
ebbit1q
6981cca2ae use qt round for better cross platform consistency (#4518)
* use qt round for better cross platform consistency

* remove unnecessary casts
2022-01-08 16:01:15 -05:00
ebbit1q
4d6c9ede8c missed this in #4496 (#4512) 2022-01-07 00:34:56 -05:00
ebbit1q
e845c95816 remove ccache from mac builds (#4505) 2021-12-27 22:23:11 -05:00
ebbit1q
a9f2fc427b allow servatrice to exit early based on commandline options (#4504) 2021-12-26 16:47:37 +01:00
ebbit1q
07e6aadbbe deprecate the gender property from the protocol entirely (#4496)
* deprecate the gender property from the protocol entirely

* use obsolete instead of deprecated

* add the database migration

* update internal database version as well
2021-12-14 01:51:57 -05:00
tooomm
86881bbbc3 CI: Little tweaks to web (#4488) 2021-12-07 23:01:46 -05:00
Jeremy Letto
1f15445c69 connect reset password to login view (#4489) 2021-12-07 22:57:12 -05:00
ebbit1q
811ee54c76 Fix move (#4491)
* wip fix card moving on server

* fix flipped cards being moved as -1

* fix cards from hand being moved as -1
2021-12-07 22:56:58 -05:00
ebbit1q
d1a40fd36e fix regression in local games (#4490) 2021-12-07 22:54:36 -05:00
ebbit1q
a3d3aaaca8 fix server crash on receiving email without @ (#4492) 2021-11-30 19:44:20 -08:00
tooomm
c5aaa0bc2e CI: Add webclient (#4478) 2021-11-26 16:55:53 -05:00
Jeremy Letto
6dc9f004ce fix tests, add golden command (#4486)
Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-11-26 16:55:12 -05:00
Jeremy Letto
6ce346af4a Webatrice: KnownHosts component (#4456)
* refactor dexie services for future schema updates

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-11-25 22:12:23 -05:00
ZeldaZach
37879c4255 Re-lint on linux 2021-11-23 02:49:11 -05:00
Zach H
0683d1aced Support Server requests for MFA, Render failed UI statuses to user, C… (#4483)
* Support Server requests for MFA, Render failed UI statuses to user, Connect to KnownHosts component
2021-11-23 02:45:08 -05:00
Joseph Chamish
73c5956ece Dev/jchamish/forgotpassword (#4481)
* Implementation of Forgotten Password Reset

* Update webclient/src/hooks/useReduxEffect.tsx

Co-authored-by: Zach H <zahalpern+github@gmail.com>
2021-11-19 21:00:05 -05:00
Zach H
7c27e955d5 Support all OS development for linters and prevent linting while in dev mode (#4480) 2021-11-19 20:59:55 -05:00
Jeremy Letto
6ef394000b fix file line returns (#4482)
Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-11-18 19:46:49 -05:00
Aren Kasner
755a09bd83 country dropdown (#4479) 2021-11-16 16:55:30 -05:00
ZeldaZach
8b1daa21ef Revert "fix card moving on server (#4413)"
This reverts commit c25bf491e4.
2021-11-15 00:54:21 -05:00
ebbit1q
691bcb9338 comment out new feature from feature list (#4477)
we don't have an official release for a version that has this feature
yet
2021-11-15 00:44:16 -05:00
Joseph Chamish
911a303326 Fix the additional line endings (#4476) 2021-11-14 22:16:13 -05:00
Johannes
5652b56b45 Respect device pixel ratio when scaling card imgs (#4467) 2021-11-13 17:01:27 -05:00
Zach H
26acfd5102 Update packages & cleanup (#4475) 2021-11-13 15:30:49 -05:00
Zach H
f789e02096 Add ESLint & Run it against the system (#4470) 2021-11-13 14:56:15 -05:00
Zach H
43eee6b32e Support HashedPassword workflow for logins (#4469)
* Support HashedPassword workflow for logins

* Address comments in PR
2021-11-13 10:37:13 -06:00
ebbit1q
45d86e7ab7 allow login using hashed passwords (#4464)
* Support getting a user's password salt via initial websocket connection (added to Event_ServerIdentification)

* Nonsense stuff to figure out later

* move passwordhasher to correct location

* protobuf changes

* add ext to protobuf

* implement request password salt server side

* add supportspasswordhash to server identification

* check backwards compatibility

* reset some changes to master

* implement get password salt client side

* implement checking hashed passwords on server login

* check for registration requirement on getting password salt

* properly check password salt response and show errors

* remove unused property

* add password salt to list of response types

Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2021-11-09 20:00:41 -05:00
ebbit1q
b0845837c2 add extra null check to set active card (#4460) 2021-11-04 22:20:20 -04:00
ebbit1q
a10226d096 finalise fedora support (#4461) 2021-11-04 22:20:00 -04:00
ParkTandem
5e3a524401 add eslint config (#4457) 2021-11-02 19:01:06 -05:00
gus
b095d9b82f Fixed issue #4332 - changed error message for replay folder download (#4455) 2021-11-02 02:08:41 +01:00
Jeremy Letto
4cb7240f9a small improvements (#4452)
Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-10-31 22:21:24 -04:00
Zach H
a87c66885c Webatrice: Account Registration form (pt2) (#4454)
Co-authored-by: ParkTandem <93353951+ParkTandem@users.noreply.github.com>
2021-10-31 22:15:51 -04:00
Zach H
ac300b0b6d Support password reset workflow on Webatrice (#4445)
* Support password reset workflow. Also fix issue where a user would be disconnected "randomly" if they had a failed login, then successful one. Refactored a bit on Status Labels since they weren't really necessary and added complexity.

* Disconnect in default cases where we don't know what to do, but shouldn't stay connected to the server
2021-10-31 22:03:38 -04:00
ebbit1q
013bb8269f set fedora 35 to be allowed failure (#4448)
it currently doesn't build at all yet
2021-10-31 17:55:10 -04:00
ebbit1q
7712862036 add ubuntu 21.10 to ci (#4446)
* add ubuntu 21.10 to ci

remove ubuntu 20.10

* forgot to update dockerfile

* add googletest from repos

* update downloaded gtest

ideally this should just grab the master version

* fix hash

* fix cmake issue
2021-10-30 22:15:50 -04:00
tooomm
656e3230de CI: Xcode update, fix Big Sur build (#4449)
* xcode update

* 12.5.1 --> 13.0

* Revert "12.5.1 --> 13.0"

This reverts commit 671ee2afe4.
2021-10-30 16:00:52 +02:00
ebbit1q
915c14f6cf add fedora 35 to ci (#4447)
remove fedora 33
2021-10-29 22:15:08 -04:00
Aren Kasner
ed32e72dc1 login page created (#4444)
login page html and css created with Seavor
2021-10-25 23:36:20 -04:00
Jeremy Letto
d684a9c5fc new login design (#4442)
* new login design

* remove effects file (wrong direction)

* add Known Hosts dropdown component

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-10-25 14:28:43 -04:00
ebbit1q
6f360374cc change the order in which the password challenge is performed (#4439)
this will force the user to always perform the challenge, meaning no
information on the account is leaked in case of failures
2021-10-23 20:18:08 -04:00
ebbit1q
bbbf3e2a65 don't reset pt if there is nothing to reset (#4438)
* don't reset pt if there is nothing to reset

when the client resets the pt of a card it intentionally does not
include cards that already have the correct pt, this can lead to the
client sending an empty command to the server, which will be rejected

* clangify
2021-10-23 20:04:52 -04:00
Zach H
b1ef8220ee Support Registration on Webatrice with a baseline of handling. (#4436)
* Support Registration on Webatrice with a baseline of handling. Still needs to support activation tokens & unit testing.

* Add support for account activation with token

* Activate Account refactor

* Fix typo

* Add Unit Testing for Commands/Events

* Changes based on review feedback
2021-10-20 21:07:35 -05:00
Jeremy Letto
ebebb9c4bb add Material UI theme support (#4437)
* add Material UI theme support

* add primary color palette

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-10-20 20:03:05 -04:00
Jeremy Letto
586f23cfa9 Webatrice websocket refactor (#4435)
* add unit tests for websocket events

* add unit tests for KeepAliveService, clean up keepAlive termination flow

* put keepAlive command in protobuf service and expose thru webClient

* secure wss

* rename files tsx to ts

* add localhost support for ws/wss connection

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-10-17 20:52:59 -04:00
Jeremy Letto
f75ff2a7c8 cleanup and unit tests (#4434)
* put socket.updateHistory behind SessionCommand

* rename /websocket files from .tsx to .ts

* add unit tests to websocket commands

* complete unit tests for webClient commands

* secure wss

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-10-17 16:15:09 -04:00
Jeremy Letto
e9ba195d7d Refactor websocket into separate services, clean up socket status communication (#4433)
* Refactor websocket into separate services, clean up socket status communication

* cleanup

* add EOF lines

* fix keepalive logged in check

* undo change

* fix keepalive connection check

* cleanup

* add typings

* secure connection

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-10-17 01:07:30 -04:00
Jeremy Letto
19333c53f6 secure webclient socket (#4432)
Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-10-14 21:58:34 -04:00
Jeremy Letto
36e5a399d5 Webatrice: card import wizard (#4397) 2021-10-14 21:42:35 -04:00
Bruno Mendes
dde0f568d9 Show country flag in user list of webclient (#4431) 2021-10-14 20:59:06 -04:00
Rafael Ritzel Tischler
3bc90003b3 Fixed layout on Deck Editor not using last layout. It was reseting layout on ctor. (#4420) 2021-09-14 16:41:04 -04:00
Danny Piper
689f65b38a Fix for poor performance with large decks (#4347)
* Fix for #4284

-> The menus have the update menu thing emitted when they get triggered.
| -> works surprising well https://youtu.be/KOOmhxvHA2c is a demo on a 10000ish card deck

* changed my comment to make sense

* fix to the issues that @ebbit1q found

what caued them idk

* Revert "fix to the issues that @ebbit1q found"

This reverts commit 20b1ad9f7a.

* actual fix for the issues @ebbit1q found

* its dirty but works

* fix cards in zoneviews not having a menu

* deleted isempty check as it is updated after the check

* key binds should work now

-> menus updated on zone change/attach/retranslate UI if selected

* clangify

* remove updateCardMenu from carditem entirely

updateCardMenu is done by the player and having it in carditem led to it
often being run multiple times, I've opted to instead run it in the
player and remove the signal entirely

the new logic updates the cardMenu every time a card is set as the
activeCard in the game tab

additionally a cardmenu can change while selected if the selected card:
moves zone, is flipped, or is attached (it receives the unattach action)

this is done in the player instead now, checking if the card is the
activeCard

this however exposes a flaw in the selection management where if you
unselect a card the activeCard is set to nullptr, this was an existing
bug and causes the action on selected cards to suddenly disappear, even
if there are other cards selected!

* revert null test of aCardMenu

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2021-09-14 16:35:47 -04:00
tooomm
154e1084ba CI: Separate C++ linting (#4400)
* separate cpp lint

* made executable
2021-09-14 16:11:56 -04:00
tooomm
6df5cece04 CI: Update Qt version (Windows) (#4407)
* qt patch update

* qt 5.15

* fix qtdir export

* cleanup
2021-09-14 16:11:29 -04:00
ebbit1q
c8bb8b0aae add reset paths button to settings (#4384) 2021-09-14 16:10:40 -04:00
ebbit1q
1e995cd97c add option to delete a user's messages (#4362)
* add option to delete a user's messages

add optional parameter remove_messages to the ban and warn commands
add event for clients to redact messages
implement server side command and message handling
implement server history removal
todo: client side implementation

add option to remove messages to moderator action dialogs

add storage of message beginnings to chatview

add redactMessage command
handle Event_RemoveMessages on rooms

this approach is favored over parsing the chatroom after the fact but
will use additional memory to store the block indexes

this also leaves a problem in that user messages from the chat backlog
are not removed in the same way because they don't have a user
associated with them

add workaround for old qt versions

add action for users to remove messages from users in chats

add chat history to userMessagePositions with regex

proper const usage for userName

allow removing the messages of unregistered users

add menus to usernames in chat history

this allows you to remove user messages on chat history as well
this also allows moderators to take actions on users in chat history

Apply suggestions from code review

* readd missing call to handler
2021-09-14 16:05:20 -04:00
ebbit1q
c25bf491e4 fix card moving on server (#4413)
* wip fix card moving on server

* fix flipped cards being moved as -1
2021-09-14 15:48:46 -04:00
ZeldaZach
affc288144 Use gmail over googlemail in all cases, as they're the same alias 2021-08-27 23:17:26 -04:00
Zach H
051be37419 Server Config Whitelist Email Providers (#4416)
* Support registration domain whitelist (registration/emailproviderwhitelist) that, if set, will require a user to have an email with one of the specified domain providers. Will require client updates to see the Whitelist message, otherwise they'll be greeted with a default alert.

This also works to remove the pain of Google Email addresses and their infinite combination of usernames for the same account (i.e. remove periods and everything after the first plus sign).

* Make blacklist response show custom dialog
2021-08-18 21:18:53 -04:00
Aren Kasner
c0bd49cf13 Fixed VCPKG folder for windows (#4406)
update vcpkg submodule
2021-08-04 03:23:42 +02:00
tooomm
2fe572c398 CI: Update Xcode versions (#4403) 2021-07-27 18:42:54 +02:00
Michael Stanaszak
904e740460 #4316: Wording change: CMC --> MV (#4388)
Co-authored-by: tooomm <tooomm@users.noreply.github.com>
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2021-07-27 17:30:55 +02:00
ebbit1q
00add2a527 add gtest from arch repos so it doesn't have to download it (#4378) 2021-07-27 16:42:28 +02:00
Zach H
bbe43d4246 Prevent users from being able to upload super large files via Sockets, which could inadvertently deny access to the server (#4398) 2021-07-25 20:28:14 -04:00
ebbit1q
0280fea3e6 apply chat flood prevention in games next to rooms (#4387)
* apply chat flood prevention in games next to rooms

* add limit to private messages as well
2021-06-28 01:57:46 -04:00
Joseph Chamish
a65ce8694c selection of known hosts to form (#4379) 2021-06-15 03:12:17 -04:00
Jeremy Letto
c9ddd042fc Webatrice: Update nav (#4380)
* wip: subnav debug

* nav redesign

* remove unnecessary code

* remove subnav

* add leaveRoom button

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-06-15 03:12:04 -04:00
ebbit1q
da9222929b add werror flags when making a debug build using llvm (#4344)
* add werror flags when making a debug build using llvm

this would get bugs like
https://github.com/Cockatrice/Cockatrice/pull/4337
get signalled earlier to us

* fix error: 'Servatrice_DatabaseInterface::registerUser' hides overloaded virtual function

* remove unused field

* mac machines have 3 cores

see
https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources

* typo
2021-06-01 21:57:37 -04:00
marsnicholas
b858e36183 Closes all library views when shuffled (#4261) (#4324) 2021-06-01 21:53:43 -04:00
ebbit1q
ebe2c494aa remove the stop dump zone command from the protocol (#4326)
the stop dump zone command was implemented as a courtesy to other
players in order to take into account when they would stop looking at
unknown information

however, this can be abused, a malicious client can send this command
whenever they would like

cockatrice is not a physical tabletop nor does it aim to be, if you can
take a screenshot of your deck and then close the view, you are not
cheating as you have been given this information

in order to prevent anyone from abusing this we should remove the
command from the protocol, this means servers will ignore this message
and clients will get a little invalid command reply in their debug log

the extension id will remain reserved

shuffling your deck will always invalidate any card view looking at
those cards

if players wish to signal that they stopped looking at their deck for
whatever reason they should just use the chat instead, optionally using
one of the chat macros
2021-06-01 21:52:20 -04:00
Jeremy Letto
fac7bfaa92 Webatrice: Nav Update (#4367) 2021-06-01 20:47:19 -04:00
Jeremy Letto
0d05f9097d Webatrice updates (#4366) 2021-05-21 21:23:30 -04:00
Jeremy Letto
8db9475804 Cleanup and refactor (#4361)
* fix three panel layout height issue

* rename websocket/services to websocket/persistence, implement LeaveRoom

* cleanup

* add new line eof

* move route components from /components to /containers

* remove duplicate style

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-05-18 23:06:41 -04:00
ebbit1q
294229622d tell the filter widget that games can have 0 players now (#4359) 2021-05-18 23:03:58 -04:00
Jeremy Letto
5cf9023a21 move and rename src/websocket/instanceServices to src/api (#4360)
Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-05-17 21:59:32 -04:00
ebbit1q
66d24f086e properly enable notification checkboxes (#4356) 2021-05-17 02:37:12 +02:00
tooomm
19a7c4092c Update ci-builds.yml (#4358) 2021-05-16 23:12:49 +02:00
ebbit1q
b27cb58727 it is not possible to add a link to the wiki to this description (#4354) 2021-05-14 22:44:02 -04:00
tooomm
472f401590 Templates: Add Transifex link (#4351) 2021-05-14 19:29:11 +02:00
tooomm
744099277a Readme: Improve CI badge (#4352)
* Improve CI badge

* fix toc
2021-05-14 18:00:30 +02:00
ebbit1q
dff25a175b fix status badge (#4350) 2021-05-13 12:51:50 -04:00
ebbit1q
61f1141fe8 fix #3840 (#4348) 2021-05-13 12:51:34 -04:00
tooomm
0a73162bcf Beta releases: collapsable list of changes (#4339)
* add collapsable list

* make it show commit count

* why not have it also know the release type and name

* update the template as well

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2021-05-12 17:27:20 +02:00
ebbit1q
5f32892e75 check if player is null when updating card menu (#4346) 2021-05-12 09:51:56 -04:00
ebbit1q
ae7437750b do not edit the zone currently iterated on (#4345)
this can cause the iterator to become invalidated which will crash but
because of the data not always being moved it will often still work as
intended, giving the idea that it is random
2021-05-10 13:21:12 -04:00
Zach H
046a3649ed Revert "add werror flags when making a debug build using llvm (#4338)" (#4343)
This reverts commit 890810f5b9.

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2021-05-10 11:32:23 -04:00
ebbit1q
890810f5b9 add werror flags when making a debug build using llvm (#4338)
this would get bugs like
https://github.com/Cockatrice/Cockatrice/pull/4337
get signalled earlier to us
2021-05-10 02:11:40 -04:00
Zach H
8fb561b4c4 Fix regression from #4281 which caused crash with QList and GCC race time (#4341) 2021-05-09 14:50:48 -04:00
Zach H
b9c4b496e4 Fix regression from #4281 which caused crash if card was null (#4340) 2021-05-09 13:10:13 -04:00
ebbit1q
ff6f28390a fix macos update logic (#4337) 2021-05-08 23:16:52 -04:00
ebbit1q
e034de9083 don't log in users while giving them an error for missing the clientid (#4335) 2021-05-08 18:12:05 -04:00
ebbit1q
ecf57b4226 add fedora 34 and ubuntu 21.04 (#4331)
* add fedora 34 and ubuntu 21.04

* remove qt5-default from ubuntu 21.04

apparently it's not required?

* disable tests on fedora 34
2021-05-08 00:24:38 -04:00
ebbit1q
63fe34437a fix deprecation of QMutex::Recursive in favor of QRecursiveMutex (#4328) 2021-05-01 18:51:17 -04:00
ebbit1q
1062894397 change number dialog defaults (#4318) 2021-04-18 14:50:24 -04:00
ebbit1q
5969656429 check multiple file extension inclusions for custom cards (#4308) 2021-04-16 11:23:46 -04:00
ebbit1q
ad0f313c9d add menus for top and bottom actions (#4314)
* add menus for top and bottom actions

* style points

* github online editor is literally the worst

* add moving cards from bottom of deck to hand

fix getting multiple cards from the bottom
note that moving cards from the bottom of the deck does not get
remembered by or disrupt undoing draws

* Apply suggestions from code review

Co-authored-by: tooomm <tooomm@users.noreply.github.com>

Co-authored-by: tooomm <tooomm@users.noreply.github.com>
2021-04-16 11:23:28 -04:00
ebbit1q
6c004155ff fix local games no longer working (#4315) 2021-04-15 01:00:41 -04:00
tooomm
88a8ee09bd pass reset Small fixes (#4310) 2021-04-12 13:28:47 -04:00
ebbit1q
7d1f082b27 add _fill_with_ template notation to picture loader (#4287) 2021-04-01 23:37:11 -04:00
ebbit1q
1c48656623 fix #4249 (#4285)
ignore "deck" at start of a list
add tests
add tests to clangify.sh
2021-04-01 23:35:36 -04:00
ebbit1q
b940e17fe7 catch nullptr on websocket connections (#4300)
* catch nullptr on websocket connections

* clangify
2021-04-01 23:34:49 -04:00
ebbit1q
8e954b10e6 add more info to dialogs (#4293)
* add more info to dialogs

adds descriptive strings to the register, password reset request,
password reset challenge request, password reset token dialogs
adds tip to set manager to use ctrl a to select all sets
change sizes in set manager
moves default server info to settings instead of having it hardcoded in
each dialog

* make sets manager smaller

* clangify

* cleanup
2021-04-01 23:34:25 -04:00
ebbit1q
1b4543aa11 Fix 4294 (#4302)
* save forgot password settings when opening dialog

* add restore password menu item
2021-04-01 01:46:53 -04:00
ebbit1q
406c0b17ae remove arch workaround (#4295) 2021-03-25 22:36:01 -04:00
ebbit1q
09de56ac87 send hidden info to judge instead of player (#4297) 2021-03-25 22:35:46 -04:00
ebbit1q
07ea2d4334 add button to open themes location to settings (#4289)
* add button to open themes location to settings

botton creates directory if it doesn't exist yet
themes path is no longer hardcoded but included in settings
themes now default to None  the default theme is no longer required
themes set to None  will not look for empty directories anymore
this is backwards compatible
users with a nonexistant theme (Default) set will get the new None  theme

* remove default theme from install instructions
2021-03-21 13:11:34 -04:00
Zach Reizner
c5fac2ee35 fix off-by-one maxUsers check on session init (#4292)
The returned number of users from `getUsersWithAddress` will include the already connected user. The predicate `>= maxUsers` is incorrectly assuming that the new user is not already counted by `getUsersWithAddress`. This change corrects this off-by-one error by only closing connections after their are strictly too many users.
2021-03-21 13:08:36 -04:00
mix irving
a5b8245227 [webclient] remove duplicate services files (#4269) 2021-03-13 14:54:36 -05:00
omegaula
073349fd05 Always look at top card (#4238)
* Add option to always look at top card of deck

Similar to "always reveal", but reveals card only to the owner,
not all players.

* Add option to always look at top card of deck

Similar to "always reveal", but reveals card only to the owner,
not all players.

* Update bug_report.md (#4246)

* Update bug_report.md

* reproduction steps

* Update to address review comments

* Clangify

* set playerId on dumpEvent

Co-authored-by: tooomm <tooomm@users.noreply.github.com>
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
Co-authored-by: Zach H <zahalpern+github@gmail.com>
2021-03-13 14:54:13 -05:00
ebbit1q
00ed5c370c implement a maximum amount of cardmenus generated for views (#4262) 2021-03-13 14:44:57 -05:00
ebbit1q
8e1d7d12e0 allow multiple zoneviews (#4263) 2021-03-13 14:43:50 -05:00
ebbit1q
1811f7305e only invalidate undoDrawList up to moved card (#4280) 2021-03-13 14:41:09 -05:00
ebbit1q
06bfc0291a Create game as spectator (#4281)
* refactoring

* allow for creation of games as spectator

allow setting the amount of games per user to none
remove limit on amount of games when creating a game as judge as
spectator

* refactor common/server_player.cpp

* do not close games with spectating host automatically

* remove check that filters out 0 player games

this check didn't really do anything, deleted games are removed before
it would be reached

* don't transfer host to spectators

this seems to cause a bug, also present on master
2021-03-13 14:39:25 -05:00
tooomm
b722864caf fix qt (#4279) 2021-03-09 11:17:07 -05:00
ebbit1q
18e27ef932 temporary workaround for arch libc version requiring upgraded host (#4258)
see https://bugs.archlinux.org/task/69563#comment196582
2021-03-08 12:18:58 -05:00
ebbit1q
7e3a669af0 use correct settings group for command interval settings (#4257)
the settings command_counting_interval and
max_command_count_per_interval are now in the [security] group as hinted
by their location in servatrice.ini.example

check values of comand interval settings before use
2021-03-08 12:18:22 -05:00
ebbit1q
aa6a0313e9 don't sort split card halves alphabetically (#4244)
* don't sort split card halves alphabetically

fixes #4241
introduces new issue: aftermath cards are now switched upside down

* use list instead of multimap to enforce preservation of a given order
2021-03-08 12:14:43 -05:00
ebbit1q
9bbe2f36bc disallow rich text in deck comments (#4273) 2021-02-26 11:17:25 -05:00
tooomm
0c7830b53c exclude webclient (#4270) 2021-02-25 13:15:48 -05:00
mix irving
2b0a9975be [webclient] add postinstall script for copy_shared_files (#4268) 2021-02-24 19:14:02 -05:00
ebbit1q
df0b867d9e fix my mistake in meld regex (#4266) 2021-02-24 18:45:09 -05:00
ebbit1q
d27f108cbd typo (#4260) 2021-02-20 01:32:31 -05:00
tooomm
fd0076e920 Improve release template (#4250)
* Update release_template.md

* reworks and adding highlights

* prep

* adjust according to script

* comment over placeholder

* remove tags, uniform style

* tweak

* Update .ci/release_template.md

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2021-02-17 02:33:14 +01:00
tooomm
db5f6e01c9 template: screenshot hint (#4256)
* screenshot hint

* better wording
2021-02-15 20:55:30 +01:00
tooomm
f3255180ec skip .md only changes (#4251) 2021-02-10 14:29:12 -05:00
tooomm
039d058770 Update bug_report.md (#4246)
* Update bug_report.md

* reproduction steps
2021-02-07 12:26:22 -05:00
ebbit1q
401fdcaf7a move changing x coord to after check for token deletion (#4236)
fixes #4235
reverts #4216
2021-01-30 16:44:12 -05:00
ctrlaltca
1bfcca91be add window icons in wayland (#4232)
Co-authored-by: Fabio Bas <fabio.bas@officineinformatiche.net>
2021-01-28 15:21:11 -05:00
ebbit1q
3edb862561 update version number to 2.8.1 (#4229) 2021-01-27 20:49:13 -05:00
ZeldaZach
00c0162da3 Change release name/number for 2.8.0 and make it a forced update 2021-01-26 14:56:29 -05:00
ZeldaZach
6fa5f4f9a5 Translations from Transifex 2021-01-26 14:50:05 -05:00
ebbit1q
db528c6762 Release templates (#4226)
* add creation of release templates to ci and update guide

* touchups to markdown

* correct create release property

* correctly set fetch-depth and release body

* fix replacements, remove arrows

* check if there are no betas

* add extra output

* typo
2021-01-25 19:53:34 -05:00
ebbit1q
0c54cdf6bc set release upload_url correctly during configure (#4225)
correctly set prerelease flag
set prerelease names to their tag instead of full release name
detect version for use in release name during configuration
2021-01-24 16:52:19 -05:00
ebbit1q
b63145c0a1 merge build workflows (#4197)
* merge build workflows

* fix mac version comparisons
2021-01-24 15:20:06 -05:00
Joseph Chamish
1ddc9cc929 Structure change (#4220)
* Structure change

* Remove duplicate folders from previous structure

* Cleanup websocket protocol

* Updating from based off PR

* Fixup - remove wrong files during conflict and get the websocket working

* renaming tsx to ts

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-01-20 18:50:18 -05:00
knitknit
a0deb73df6 Fix #2771: Do not change x coordinates of moved card if it will be destroyed when it leaves the table (#4216) 2021-01-02 22:45:11 -05:00
Jeremy Letto
0457e65751 Webatrice P.O.C. (#3854)
* port webclient POC into react shell

* Abstract websocket messaging behind redux store

* refactor architecture

* add rooms store

* introduce application service layer and login form

* display room messages

* implement roomSay

* improve Room view styling

* display room games

* improve gameList update logic

* hide protected games

* improve game update logic

* move mapping to earlier lifecycle hook

* add autoscroll to bottom

* tabs to spaces, refresh guard

* implement server joins/leaves

* show users in room

* add material-ui to build

* refactor, add room joins/leaves to store and render

* begin using Material UI components

* fix spectatorsCount

* remove unused package

* improve Server and Room styling

* fix scroll context

* route on room join

* refactor room path

* add auth guard

* refactor authGuard export

* add missing files

* clear store on disconnect, add logout button to Account view

* fix disconnect handling

* Safari fixes

* organize current todos

* improve login page and server status tracking

* improve login page

* introduce sorting arch, refine reducers, begin viewLogHistory

* audit fix for handlebars

* implement moderator log view

* comply with code style rules

* remove original POC from codebase

* add missing semi

* minor improvements, begin registration functionality

* retry as ws when wss fails

additionally, dont mutate the default options when connecting

* retain user/pass in WebClient.options for login

* take protocol off of options, make it a connect param that defaults to wss

* cleanup server page styling

* match wss logic with desktop client

* add virtual scroll component, add context menu to UserDisplay

* revert VirtualTable on messages

* improve styling for Room view

* add routing to Player view

* increase tooltip delay

* begin implementing Account view

* disable app level contextMenu

* implement buddy/ignore list management

* fix gitignore

Co-authored-by: Jay Letto <jeremy.letto@merrillcorp.com>
Co-authored-by: skwerlman <skwerlman@users.noreply.github.com>
Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2020-12-31 17:08:15 -05:00
saadbruno
d5b36e8b8a Disabled strict mode for MySQL on the docker-compose file (#4214) 2020-12-28 16:43:45 -05:00
ebbit1q
f595a61d50 fix #4198 (#4209) 2020-12-09 02:08:00 -05:00
Joel Bethke
dbf6cd745e cmake: Minor updates (#4204) 2020-12-07 11:50:32 -05:00
ebbit1q
0ce813b826 restore saved previous server (#4206)
fix #3617
2020-12-05 21:36:27 -05:00
tooomm
77be6a120c fix broken image (#4202) 2020-12-01 16:57:27 -05:00
tooomm
37053cc909 Remove AppVeyor config (#4200)
* readability

* update ci badge for windows

* Delete .appveyor.yml
2020-12-01 22:38:50 +01:00
Zach H
34e951298f Address a handful of warnings from #6095 (#4199) 2020-12-01 11:30:22 -05:00
Joel Bethke
8845a23d5d CI: Fix up Windows builds and add GitHub Actions for Windows (#4193)
* ci: Add vcpkg submodule

* cmake: Fix NSIS not detecting platform arch

* cmake: Add QTDIR(64|32)

This change adds a new var for QTDIR(32|64) which makes it easier
to specify a specific directory for Qt, rather than having to edit
the prefix path directly, which can get pretty messy. Functionally,
this shouldn't affect any builds that are already finding Qt as
part of path, and should not affect Linux/macOS.

* cmake: Bump min cmake version

* ci: Add GitHub Actions for Windows
2020-11-30 23:54:50 -05:00
Derek Chiang
38606bdb87 Display a system tray notification when a player joins your game (#4194)
* Display a system tray notification when a player joins your game

* Display game ID in join message
2020-11-29 21:11:35 -05:00
Joel Bethke
56a51c7834 ui: Fix Qt depreaction warnings (#4195) 2020-11-29 02:33:13 -05:00
tooomm
402c09e028 Update CONTRIBUTING and more travis removing (#4179) 2020-11-28 03:14:15 -05:00
ebbit1q
9e702ec358 update link to master builds on appveyor (#4180) 2020-11-28 03:13:42 -05:00
Joel Bethke
c047a8ae3c ui: Add shortcut for "Save deck as..." (#4188)
Fixes: #4174
2020-11-26 22:22:44 +01:00
tooomm
b4740ad395 Update README.md (#4189)
* Update README.md

* don't run on .md-only changes
2020-11-26 13:14:00 -05:00
tooomm
99b0abe7fe GitHub Actions: don't run on .md only changes (#4183) 2020-11-25 21:14:05 -05:00
leiftw
b0239c11ab Fix typo in #L135 to conform with #L138 (#4182) 2020-11-24 14:58:28 -05:00
ebbit1q
46cf50d468 add ubuntu 20.10 Groovy Gorilla (#4178) 2020-11-23 18:09:02 -05:00
Zach H
9f9581c2be Support MTGJSONv5 format in Oracle downloader (#4162)
* Fix #4043, Support MTGJSONv5 format in Oracle downloader

* Auto redirect V4 downloads to V5, as we won't support V4 after this change

* clangify >_>

* Remove null values and account for IDs missing

* fix split cards and double faced cards somewhat

* do not consider double faced cards duplicates

* fix promo double sided cards

* typo

* fix alternative versions of cards with (letter)

* zach says this is more readable

* pre qt 5.10 compatibility

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2020-11-23 16:12:41 -05:00
tooomm
f3cf1f0dde pin badge to master (#4177) 2020-11-23 13:23:47 -05:00
tooomm
2f62671d8a More changes to GitHub Actions (#4175) 2020-11-23 12:27:35 -05:00
tooomm
589fbcdcd5 clearify wording (#4173) 2020-11-23 12:24:49 -05:00
ebbit1q
51b24bb92c refactor getting game age (#4095) 2020-11-22 20:28:56 -05:00
Zach H
6e00db4ef6 Fix racetime condition with token cloning (#4156)
* Fix #2820 by removing (this->setCursor) as this was null by the time we hit this component due to a racetime condition.

* check if card player pointer is valid before setting cursor

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2020-11-22 20:25:23 -05:00
ebbit1q
0d842b5a35 Resurrect 2655 (#4136)
* fix #2640

* clangify

Co-authored-by: Fabio Bas <ctrlaltca@gmail.com>
2020-11-22 20:23:18 -05:00
ebbit1q
8441cb7ba9 refactor pingClockTimeout (#4169)
* refactor pingClockTimeout

try to see if it changes #3954

* use lcoks and unlocks again
2020-11-22 20:21:43 -05:00
ebbit1q
4aaedf64d2 add github actions (#4164) 2020-11-22 20:20:48 -05:00
Zach H
45d838a0b3 Search full subdirectory for custom databases (#4137)
* Fix #2324 by allowing for iteration & symlinks

* Ensure alphabetical sorting
2020-11-22 20:06:25 -05:00
ebbit1q
ca5f1dd434 do some guesswork if cards can't be found (#4131)
modify up the simplifyCardName function to ignore right halves
add guessCard function that prioritises full card names the simple ones
fix imports for misformatted split cards or double faced cards
introduces a small concession: not completely formatted names with a
shared name on the left side will get mixed up, eg "bind" but not "Bind"
this should be fine considering how this would fix a lot more cards
2020-11-22 19:57:51 -05:00
tooomm
d07bf1211a Improve dialogs (#4153) 2020-11-13 16:01:44 -05:00
Zach H
0966a8e90f Fix #566 by allowing for DeckName/Comments to be resized to the max, and even hidden! (#4157) 2020-11-13 15:36:20 -05:00
ebbit1q
68074b0f74 check if node is a dir before deletion (#4165) 2020-11-13 14:55:01 -05:00
ebbit1q
f11f072e0a add missing mysql connector dependencies to docker images (#4160) 2020-11-08 19:35:54 -05:00
tooomm
3064621a7e Add exclude term to search hints (#4038) 2020-11-02 18:44:19 -05:00
tooomm
0405c82cb2 File name cleanup (#4154) 2020-11-01 19:03:08 -05:00
knitknit
8e9d4e3a67 Retain lastDrawList if a card is being moved within hand, e.g. hand reordering only. (#4152) 2020-11-01 15:02:17 -05:00
tooomm
ef78fdf342 Fix resizing for game filter dialog (#4149) 2020-10-29 20:21:01 -04:00
Kaitlin
a49c4865bb Add game filtering for spectator attributes (#4127) 2020-10-27 15:49:02 -04:00
fdipilla
1a94261490 Multiple background images on all zones (#4144) 2020-10-23 15:36:02 -04:00
Zach H
e10446f5b8 Remove annoying spectator log messages (#4138) 2020-10-22 16:46:50 +02:00
rivten
2081639970 fix infinite loop when card file save fails, instead stop the execution just like the other errors in the call (#4143) 2020-10-21 10:31:57 -04:00
ebbit1q
8cbc4c91f6 free qprocess on oracle update fail (#4134)
* free qprocess on oracle update fail

reload the database whenever oracle exits
search for oracle in ../oracle so you can use it from the build dir

* only ask for the db updater once
2020-10-21 10:31:18 -04:00
tooomm
b8cd3af21f CONTRIBUTING: little changes (#4141) 2020-10-14 11:19:37 -04:00
tooomm
1e8464c1d4 README: add discord badge and adjust downloads (#4142) 2020-10-14 11:18:59 -04:00
tooomm
5df069ab19 userlists --> account (#4139) 2020-10-12 17:18:11 -04:00
ebbit1q
752ba7d905 add face down to the string if the card is face down (#4130) 2020-10-06 16:51:20 -04:00
ebbit1q
9cf7621102 rename selected card menu (#4132) 2020-10-06 16:49:29 -04:00
Zach H
9330774632 Add Gitter/Discord info to Contributing (#4126) 2020-10-02 14:53:21 -04:00
ebbit1q
e33f802ae8 update CONTRIBUTING.md (#4125) 2020-10-02 13:54:12 -04:00
ebbit1q
48c6458766 remove nonfunctional mana artifact detection code (#4121)
mana artifacts will use the stack and be placed in the normal tablerow
if you want to put it with your lands you're free to do so, as long as
you promise to not say oh this should not be here three turns after
shatterstorm resolved
2020-10-02 12:14:44 -04:00
ebbit1q
35fe6f624c apply clang format to proto files (#4123)
* add proto files to clangify

* apply clangify to proto files

* remove blocksonsingleline, it didn't actually do anything

also add missing space to the travis warning, emoji are monospace too
2020-10-02 12:14:05 -04:00
ebbit1q
e2251fe06b update sfmt to version 1.5.1 from 1.4.1 (#4124) 2020-10-02 12:13:12 -04:00
ebbit1q
a5511190a3 add missing cardlink for the flip messages in the message log (#4122) 2020-10-02 12:12:13 -04:00
Kaitlin
eba9c097f6 Add dropdown for game age filtering (#4092)
* Part 1 for #3067: Basic combo box (dropdown) filtering mechanism for game age.

* Apply suggestions from draft review

# Conflicts:
#	cockatrice/src/gamesmodel.cpp
#	cockatrice/src/gamesmodel.h

* switch to using QTime

* check for games older than a day

* formatting for casts and more unnecessary cosmetic changes

* ebbit1q fixes

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2020-09-30 23:46:10 -04:00
tooomm
58d024d067 fix update message (#4116) 2020-09-29 22:00:09 -04:00
ebbit1q
be7b172e55 skip misprints marked with † (#4107) 2020-09-26 21:56:45 -04:00
Kaitlin
a8b79fd020 Fix show-buddies-only filter loading, and add handling for creator name filter storage/loading. (#4105) 2020-09-26 21:55:13 -04:00
ebbit1q
14fcb2e5d7 skip duplicate nonpromos (#4097)
* consider cards with frameEffects promos

* skip duplicates entirely

all cards that are not "promo" or something like it will only retain the first copy instead of parsing all of them and keeping the last
2020-09-22 16:09:59 -04:00
ebbit1q
02935be14f fix QByteArray::append(QString) deprecation in qt 5.15.1 (#4102) 2020-09-22 16:09:48 -04:00
Zach H
bec02b4952 Judges can talk in games (#4091) 2020-09-09 13:20:59 -04:00
Kaitlin
79f590c99a Fix #3957: Properly set filters to defaults on initial load and disable "Clear filters" button if filters are set to defaults. (#4088)
* Fix #3957: Properly set filters to defaults on initial load and disable "Clear filters" button if filters are set to defaults

* Reuse resetFilterParameters() in GamesProxyModel constructor, and remove "off" designation for player min/max (as a default of 1/99 is enforced by the UI).
2020-09-09 11:24:54 -04:00
Kaitlin
ade3e81682 Move "Games shown" text to top, to match user count list. (#4089)
Fixes last part of #3068 that isn't already handled by #4088.
2020-09-08 14:34:36 -04:00
ebbit1q
45cbdad5fb bump version to 2.7.6 (#4076)
fixes #4075
2020-08-24 14:04:56 -04:00
Zach H
3536fa8a75 Fix #4072 by changing outdated HTTP to HTTPS calls within the codebase (#4073) 2020-08-23 17:24:26 -04:00
fdipilla
b0c7b9078d Multiple bg images zone (#4005) 2020-08-23 15:55:53 -04:00
ebbit1q
964207d04f make custom sets directory configurable (#4047) 2020-08-23 13:24:30 -04:00
ebbit1q
feee9cc328 fix #4070 (#4071) 2020-08-22 20:30:56 -04:00
olegshtch
4a563a131b Update test card database to v4 (#4064) 2020-08-21 18:18:53 -04:00
ZeldaZach
69f035f017 translation updates 2020-08-16 15:18:21 -04:00
olegshtch
daa89a9fb4 Run tests on WIndows CI (#4056)
* Run tests on Windows CI.

* Add message logger

* Skip tests that cannot be linked.

* Fix test call

* Fix mock link issue on MSVC

* Fix PATH variable to find libraries for tests

* Fail test step on test errors
2020-08-14 12:45:15 -04:00
olegshtch
44297dcd1c Fix release tests (#4063) 2020-08-13 10:18:01 -04:00
tooomm
80f613a77a travis: update macos 10.15 images (#4059) 2020-08-06 10:43:54 -04:00
olegshtch
776aa5c0ff Enable parallel compilation. (#4057) 2020-08-03 01:30:03 -04:00
olegshtch
446f9be24d Fix unresolved symbols when link tests to system libgtest-dev (#4055) 2020-07-30 14:52:44 -04:00
awlangham
5d9d91262b Added horizontal layout and stretch for player icon (#4052) 2020-07-28 01:22:02 -04:00
awlangham
fe63dfa762 Made user information window resizable (#4009) 2020-07-23 18:04:15 -04:00
ebbit1q
a76a3e5db6 Change method of opening directories to be the same for all oses, including linux (#4046)
* add opening directory in file browser to linux

this uses QDesktopServices to open the url "file://[location]"
by default this is
"file://$HOME/.local/share/Cockatrice/Cockatrice/pics/CUSTOM"

any distro that has a file browser should have an accompanying mime type
specifying the file handler for the file:// protocol using the
inode/directory mime type

see https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html

if a user were to have removed their mime database this will not work and
it will fail with nothing but a log message, this would be rare and not
worth checking in my opinion

* make opening directories the same for all oses

* sort headers
2020-07-16 11:22:24 +02:00
Lee Tran
faecfd65fe fix message when moving cards to bottom of library (#4006) 2020-07-09 17:25:25 -04:00
tooomm
0063493066 Remove gitlab config (#4037)
* revert #2345

* remove gitlab yml
2020-07-01 17:36:04 +02:00
tooomm
2a7268c088 move db udpate (#4015) 2020-06-29 10:25:17 +02:00
ebbit1q
7fa1936d0f qt 5.15 compatibility (#4027) 2020-06-19 10:50:09 -04:00
ebbit1q
0f0e0193c1 update fedora 31 to 32 (#4024) 2020-06-09 03:07:34 -04:00
ebbit1q
0337f58088 add extra exceptions to plaintext imports (#4018)
this specifically to support imports from mtg arena that have a set code
and then a collectors number like (ABC) 123 at the end, this pr strips
that from the card name (we don't use it anyway)

fixes #4011
2020-06-02 10:56:01 -04:00
ebbit1q
53c6440cac make sure no //es are added to maintypes (#4017) 2020-06-02 10:55:05 -04:00
tooomm
28f3229a0e remove storm phrasing (#4001) 2020-05-18 15:27:53 -04:00
ZeldaZach
3dff63069e translation updates 2020-05-17 18:25:55 -04:00
kopcion
1eea8e9a37 Refactor messagelogwidget (#3875) 2020-05-17 18:15:30 -04:00
Rocangus
2de863f645 Spell Out Entire Counter Names With First Letter Capitalized (#3997) 2020-05-17 17:24:17 -04:00
tooomm
dc8603596d fix outdated version number (#3999) 2020-05-17 13:39:30 +02:00
fdipilla
fd0620445c Different backgrounds per player (#3990) 2020-05-14 20:31:12 -04:00
ebbit1q
04274d2497 add ubuntu 20.04 to travis (#3989) 2020-05-13 13:42:08 -04:00
Mikael Palmujoki
c69e77f330 Docker-Compose support for Windows (#3974)
* Add docker-compose document that works out of the box for Windows, and a storage location for the mysql-database.

* Documented Windows support in Readme file
2020-05-08 15:22:39 -04:00
Kaitlin
1988e4558f Change filter hint text to "Games shown: X / Y" and fix user-game segfault (#3973) 2020-05-08 15:15:54 -04:00
Zach H
9246c190fa Enhance Shortcut Menu (#3987) 2020-05-08 15:10:36 -04:00
ctrlaltca
d30691559a Some improvements to Servatice network code (#3969)
* Some improvements to Servatice network code

1. fix crash on fuzzy connection (tcp server only)
2. ensure websockets are parent()ed to avoid leaking them
3. quick catch disconnect()ed sockets instead of waiting for a socket error to happen
4. supporto mulltiple connection pools on the websocket server; they are still bound to the same thread due to a qt5 limitation.
2020-04-24 16:26:59 -04:00
Olxinos
46fe0cd725 prevent checkboxes' labels from being clipped in settings (#3968)
Merged, thank you
2020-04-24 18:33:26 +02:00
ebbit1q
45d62b6880 skip all duplicate promos instead of just stars (#3965) 2020-04-23 11:24:39 -04:00
Olxinos
db85ec48c7 Minor fixes to some std::sort calls (#3967) 2020-04-23 11:23:59 -04:00
ctrlaltca
1976c4caed macOS: test a simple way to bypass apptranslocation (#3944) 2020-04-08 17:34:57 -04:00
Kaitlin
2c3eab9b0c Fix #3068: Add hint text about game list filters (#3946)
Kaitlin Huben <kaitlin.huben+gitlab@gmail.com>
2020-04-07 17:55:36 -04:00
ctrlaltca
27b7ebe208 Oracle / card xml improvements (#3934)
* fix #1610

* fix #2679; partially fix #3647

* Fix tests

* Remove debug code
2020-03-30 21:56:03 +02:00
Zach H
a135ad064a Handle Release Channels better as we host more packages now (#3922) 2020-03-26 13:41:38 -04:00
ebbit1q
e8d5715f7a More OS support (#3915) 2020-03-20 15:32:12 -04:00
Zach H
9cec0852bb Remove force update appveyor (#3920)
According to https://help.appveyor.com/discussions/questions/16192-build-tag-annotation-overwritten, we don't need force_update to push the files up. This will preserve name/description of the release
2020-03-20 14:04:17 -04:00
ctrlaltca
ca618c6cc1 Travis: skip cleanup before deploy (#3919) 2020-03-20 12:23:49 -04:00
ctrlaltca
c5e0b08800 Cmake: get release name from github page instead of using APIs (#3916)
APIs are limited
2020-03-19 15:59:48 -04:00
ZeldaZach
568a4973fa make sh executable 2020-03-19 11:52:09 -04:00
ctrlaltca
5508699e92 Fix openssl name for windows x64 (#3914) 2020-03-19 10:09:29 -04:00
ZeldaZach
71dd6b8a30 Fix missing QDate
Signed-off-by: ZeldaZach <zahalpern+github@gmail.com>
2020-03-18 17:57:40 -04:00
ebbit1q
18a07274d4 clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
ctrlaltca
1eb766b9d8 Fix dynamic loading of openssl libraries on windows (#3912) 2020-03-18 17:22:49 -04:00
ZeldaZach
e84409c0cf Translation Updates 2020-03-16 22:01:57 -04:00
Phillip Wheatley
91dc8b3b08 Add configuration option to send desktop notification on buddy presence (#3886) 2020-03-16 21:49:11 -04:00
Xenos6666
63b4f9b2f0 Add keyboard shorcuts to focus and unfocus chat (#3898)
* Added keyboard shorcuts to focus and unfocus chat

* Fixed format

* Changed the Esc behavior to work on any QLineEdit in the main Window and ignore shortcut conflicts

* Fixed a conflict with shortcuts

* Configurable unfocus shortcut and format fixes

* minor style fix
2020-03-16 21:48:05 -04:00
Phillip Wheatley
7285f24a29 Docker-compose setup for Servatrice (#3887)
* Docker compose for servatrice

* Update README.md

* Clean up docker-compose specific configuration
2020-03-16 21:40:58 -04:00
ebbit1q
17efe8c003 add pauper to the list of checked formats in search (#3901)
* add pauper to the list of checked formats without a short form

l:p remains reserved for pioneer

* throw out weird hardcoded formats

this will at least still work whenever a format gets added
the shorthands are still kept
2020-03-16 20:56:30 -04:00
ebbit1q
1815094249 Keep stars but only sometimes, add scheme cards back (#3904)
* ignore stars and promos but only sometimes

this will correct #3706 and #3715 being a bit overzealous in removing
cards and thus fix scheme cards being removed in entirety
fix #3845
note that this causes a lot more cards to be added that are in promo
sets, if these promo sets should prove to be problematic they should be
disabled somehow as having them as an option is still nice.

* remove debug lines
2020-03-16 20:42:27 -04:00
ebbit1q
a80c756dcb update deprecated methods in qt5.14 and protobuf 3.4 (#3906) 2020-03-16 20:41:41 -04:00
tooomm
361833e023 clarify language setting (#3897) 2020-02-19 10:54:55 -05:00
ctrlaltca
632e44b0b7 Fix missing languages in oracle dropdown (#3896) 2020-02-18 22:33:41 +01:00
skwerlman
8dd1e39ea9 support mtgo .dek files (#3889)
* support mtgo .dek files

they use plain text internally so we just need to reveal them in the load dialog

* formatting
2020-02-04 08:11:24 -05:00
Phillip Wheatley
0f18fa9546 Hide games created/hosted by people on your Ignore List (#3883)
* Implement filter for games created by ignored users.
2020-01-13 10:13:36 -05:00
ebbit1q
7bfefee073 add deck hash copying functions (#3882) 2020-01-13 10:11:19 -05:00
skwerlman
0ff7472ce5 fix password length checks (#3884)
unit testing when
2020-01-13 09:54:55 -05:00
Zach H
8fb0baa449 Trim tokens as this is our most common issue (#3870)
Signed-off-by: ZeldaZach <zahalpern+github@gmail.com>
2019-11-23 14:18:28 -05:00
skwerlman
57c02dcd5a GitHub: Switch to new issue template system (#3862) 2019-11-22 23:54:28 -05:00
tooomm
b072b540a2 Travis: more appealing thank you message (#3858) 2019-11-22 23:53:47 -05:00
kopcion
cd431594e2 Issue 3015 - store timestamp when password is reset (#3863)
* Added few unsigned to ints in order to get rid of warnings.
Added column to users table, for when password is changed(issue#3015).
Moved password length check to separate method, to make it cleaner.
* Added migration file and changed schema version to 27 due to servatrice.sql schema modification.
* Make password length configurable.
2019-11-22 23:52:45 -05:00
tooomm
e4c98e2ab8 Travis: update config for dpl v2 (#3853) 2019-11-05 17:39:00 -05:00
tooomm
32b557b862 readme: fix toc link (#3859)
* fix toc link

* adjust order
2019-11-03 23:15:08 -05:00
Zach H
e690b45f27 Create FUNDING.yml 2019-11-02 23:52:14 -04:00
tooomm
eadcdc6f7c link to new AllPrintings file (#3851) 2019-11-02 23:51:10 -04:00
ebbit1q
b187fb52e0 add pioneer (#3856) 2019-11-02 23:48:17 -04:00
tooomm
7e89933552 bump version number (#3857) 2019-11-02 23:47:55 -04:00
ZeldaZach
096a472ed0 translations 2019-10-21 19:09:28 -04:00
tooomm
365b0a31ed Travis: add Mojave deploy target and release a zipped .dmg (#3819)
* add osx mojave build+deploy

* add job names, change variables

* add zipping to packaging step

* see #3814

* update to high sierra

* update homebrew

* xcode 11.1

* [skip ci] add link to config explorer
2019-10-21 19:06:40 -04:00
skwerlman
e8fd2ce2aa add support for adventures to oracle (#3836)
* add support for adventures to oracle

this causes cockatrice to correctly fetch the front of the card for the adventure portion rather than sending lots of bad requests to scryfall

* treat adventures more like split cards

* dont hardcode `maintype: creature`
2019-10-09 01:05:30 -04:00
ebbit1q
a3fc9b6ee5 add move top card to stack keybind (#3827) 2019-10-09 00:10:23 -04:00
ebbit1q
9eebc590c1 [WIP] add shortcuts for readying and sideboarding in the lobby (#3832)
* add shortcuts for readying and sideboarding in the lobby

* clangify
2019-10-08 23:59:48 -04:00
ebbit1q
f840dcbd66 Increase macos version, drop sierra support (#3837)
800b0f4b2f homebrew no longer provides a bottle for protobuf, which is so big we can't do without a precompiled version. This means we can no longer support sierra 10.12 and have to use high sierra 10.13, this does not seems like a very painful grade however as there are no differences in hardware requirements between the two and any user on sierra can upgrade to high sierra if they wanted to.
2019-10-08 23:55:47 -04:00
ebbit1q
8879fc2e39 fix compiling on gcc 9 (#3830) 2019-10-02 15:48:49 -04:00
ebbit1q
cd29e2f252 add disable tearoffmenu option (#3826) 2019-10-02 14:58:22 -04:00
ctrlaltca
bcf505c98b Oracle: fix crash on no card type; fix #3815 (#3816) 2019-10-02 14:54:51 -04:00
tooomm
933f3e1392 update os name (#3814) 2019-10-02 14:54:10 -04:00
Ashley Davis
ba0462b24f Update Dockerfile to include missing lib, not build dbconv, and use ENTRYPOINT (#3808) 2019-09-09 17:06:28 +02:00
ctrlaltca
7e8a63cd62 Settings: default to current chosen directory while opening file dialogs (#3810) 2019-09-09 09:23:38 +02:00
tooomm
03e109ef12 wait > sleep (#3806) 2019-09-05 15:44:14 +02:00
ebbit1q
257f2eb34c warning message is way too scary (#3805)
People keep complaining they can't compile on ubuntu 16.04 because of this warning message, while it just disables 2 "prettyness" warnings and only in the automatically generated code by protobuf which should never be a problem anyway!
original pr: #3432
2019-09-05 15:43:51 +02:00
Zach H
53728598fe translation updates (#3804) 2019-08-31 21:36:13 -04:00
ctrlaltca
3b98eb77f5 Close all player-associated zoneviews when he quits; fix #3799 (#3800) 2019-08-27 20:07:33 -04:00
ctrlaltca
b6df5a4ac3 Deal with recent Qt methods deprecation (#3801)
* Deal with recent Qt methods deprecation

 * Use std::sort, std::less instead of qSort/qLess
 * Use QFontMetrics::horizontalAdvance instead of ::width
 * Use qApp->primaryScreen() instead of QDesktopWidget
 * use lambas instead of QSignalMapper
 * Use QTreeWidgetItem::setForeground instead of ::setTextColor
 * Use QDir::setPath instead of operator=(QString)
 * Use QList::swapItemsAt instead of ::swap

* fix error
2019-08-27 20:06:54 -04:00
ctrlaltca
f54165025e Add a new command to reverse turn order (#3802) 2019-08-27 20:04:27 -04:00
ctrlaltca
013137c418 Fix #3783 (#3785) 2019-07-17 10:05:00 -04:00
ebbit1q
faf02100a5 add 4BB to nonenglish sets (#3786) 2019-07-17 10:04:19 -04:00
tooomm
a8b34d51a5 travis: separate lint build (#3778)
* Create travis-lint.sh

* separate lint

* Update travis-lint.sh

* Update travis-lint.sh

* use default image

* call lint externally

* add xenial again for tests

* Update .travis.yml

* fix path

* move test to docker build

* remove --format argument test / passed

* add test label

* use bash command

* source > execute
2019-07-13 15:39:51 -04:00
Rob Blanckaert
2ef3e6fc93 Enable tear-off on menus. (#3772) 2019-07-11 22:53:43 -04:00
ebbit1q
a3a1e20074 replace old mulligan with new behavior (#3773) 2019-07-11 22:53:09 -04:00
tooomm
ce54aa6813 remove fedora package support (#3752) 2019-07-11 16:05:42 -04:00
ebbit1q
5139039402 add homebrew cache to cache (#3776)
* add homebrew cache to cache

* use same image

* ruuun travis, ruunn

* remove extra space

* do these dashes do this?

* trigger ci

* these dashes confuse me, consistency is like woosh
2019-07-11 09:21:35 -04:00
ctrlaltca
f4adf79ad9 Message log: remove all workarounds; fix #3553 (#3760)
* Remove workarounds in messagelog
2019-07-07 22:27:50 -04:00
ebbit1q
f10f9ada3a properly capitalize set types like Duel Deck and From the Vault (#3770)
* properly capitalize set types like Duel Deck and From the Vault

* add more tiny words

* update macos for travis (slower build times)
2019-06-30 12:08:07 -04:00
ctrlaltca
965a6cdde7 fix #3755 (#3756) 2019-06-12 14:50:26 +02:00
tooomm
62c0825874 fix grammar (#3754) 2019-06-09 19:01:32 +02:00
tooomm
4e918f0f5d move brackets out of link tags (#3753) 2019-06-09 19:00:53 +02:00
tooomm
3e3154a58c version bump to 2.7.2 (#3751) 2019-06-09 19:00:04 +02:00
Zach H
22e2e442f5 updated translations for 2.7.1 (#3750) 2019-06-08 12:38:59 -04:00
ctrlaltca
c0c4a6df50 Fix card database load after update (#3748) 2019-06-08 14:48:34 +02:00
ctrlaltca
36ba9c2d94 fix #2786 (#3747) 2019-06-08 10:15:33 +02:00
ctrlaltca
1288795de9 fix #3735 (#3746) 2019-06-08 10:14:58 +02:00
Zach H
0380de9571 add trans strings for upstream (#3745) 2019-06-04 17:41:58 -04:00
ebbit1q
6ac3852995 grammar fixes (#3727) 2019-06-04 17:33:36 -04:00
ctrlaltca
1d8fb79e11 Misc startup improvement (#3740)
* Misc startup improvement

* fix paths

* clangiftw

* reworked save sets dialog

* Unified load and save steps for tokens and spoilers; added "finished" page

* linting1

* linting2

* wording

* undo layout change

* wording

* fix spoiler path again

* simplify phrase

* lint

* lint fix

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-06-02 21:47:37 -04:00
tooomm
e084bd18a9 fix aftermath (#3742) 2019-06-02 12:05:54 +02:00
ctrlaltca
7c3cc527f6 fix windows style (#3739) 2019-06-01 16:08:44 +02:00
ctrlaltca
218aec07f8 Split buttons in the deck editor (#3709) 2019-05-31 11:54:32 -04:00
ctrlaltca
ada13f6578 Card Database converter (#3694)
* Database converter

* Fix win compilation and NSIS installer

* Maybe fix windows again

* Re-fix windows
2019-05-31 11:48:30 -04:00
Rob Blanckaert
8682367b52 View hand window (#3731)
* Roar

* Add View Hand menu to player

* Add shortcut

* reorder right click menu
2019-05-31 16:53:24 +02:00
tooomm
a80f3b77da use Qt 5.12 LTS (#3732) 2019-05-30 12:02:10 +02:00
tooomm
fd8bf66acd style (#3728) 2019-05-27 21:17:57 +02:00
ctrlaltca
115ed78059 Update Translations (#3717)
* Extract new strings from translations

* fetch new translations
2019-05-10 23:13:34 +02:00
ctrlaltca
00ca69fced Add v4 xsd (#3710) 2019-05-09 09:38:52 +02:00
ctrlaltca
6c21855f98 Token dialog fixes (#3711)
* Token dialog fixes

* clangify

* edit custom tokens

* Fix in-game token dialog
2019-05-09 09:37:27 +02:00
ebbit1q
3830c85ce6 skip more cards (#3715)
closes #3713
2019-05-09 09:37:04 +02:00
ctrlaltca
0dc4cc7e03 propose to save deck before loading a new one; fix #3699 (#3707) 2019-05-05 22:38:53 +02:00
ctrlaltca
8f5bfd1f87 Oracle: skip cards with a star in the collectors' number (#3706)
* Oracle: skip cards with a star in the collectors' number

* clangify
2019-05-05 22:38:31 +02:00
ctrlaltca
95d6efcdbf Dont create dummy card infos for unkown cards (#3708) 2019-05-05 22:37:48 +02:00
skwerlman
63cf0ae764 Fail cmake if protoc doesn't exist (#3705)
fix #3704
2019-05-04 23:33:38 -04:00
tooomm
f1e79707e8 work around confusing new default badge label (#3701) 2019-05-01 17:29:15 -04:00
ebbit1q
9073cb53a8 add !sflang! property for card image urls (#3670)
update translations
add translation for the sflang property to supported languages
2019-04-18 13:01:50 -04:00
skwerlman
d018070891 Fix cipt check for shock lands (#3678)
* Fix #3410

The oracle text for shock lands has changed such that they no longer get `cipt`. This fixes that.

* fix whitespace

* use shorter check
2019-04-09 13:12:15 -04:00
tooomm
837924b819 reword (#3682) 2019-04-06 23:12:21 -04:00
tooomm
00cfb1347a Update ISSUE_TEMPLATE.md (#3679) 2019-04-04 14:52:48 -04:00
ctrlaltca
0ce2e61db9 Fix filters (#3676) 2019-04-02 23:02:34 -04:00
ebbit1q
1854e3440b add ci: filter for color identity to help page (#3673) 2019-03-27 22:57:12 -04:00
ebbit1q
a0260eb0b2 add italian renaissance to nonenglish sets (#3672) 2019-03-27 22:56:52 -04:00
ebbit1q
c874f201c3 add a bunch of parents to dialogs (#3658)
* add a bunch of parents to dialogs

works on #3651

* use game as parent instead

* add more parents

* fix create token dialog modality

* add parent to game information window

* replace a bunch of nullptrs with the magic of sed

* add parent to tip of the day and counters

* reorder game ptr

* set parent for life counter

* clangify
2019-03-26 14:54:47 -04:00
tooomm
7072f24103 update link (#3665)
repo got moved
2019-03-22 16:11:36 -04:00
ebbit1q
eb4914d36f include a list of priorities for maincardtypes in oracle (#3663)
fix #3662
2019-03-16 15:00:34 -04:00
James Le Cuirot
6d27631764 Add USE_CCACHE option to CMake so that ccache can be forcibly disabled (#3661) 2019-03-14 16:19:55 -04:00
Rob Blanckaert
a522255baf - Chnage some hard-coded colors to take into account their background. (#3654)
- Change some SVGs from black to white if their background is too dark.
2019-03-13 16:11:30 -07:00
ebbit1q
7eb2e36740 workaround for foreign card arts getting priority by default (#3652)
fixes #3623
2019-03-12 10:12:31 +01:00
ctrlaltca
2d8f01b2e9 Show current counter value on "set counter" dialog (#3650)
* fix point 10 of issue #655

* clanfigyism
2019-03-11 00:33:19 +01:00
ctrlaltca
6f95556632 Fix related cards menu in deck editor (#3649) 2019-03-10 23:15:24 +01:00
ctrlaltca
0326f0d4c9 Permit use of up/down keys to increment/decrement counter value; Fix #3618 (#3646)
* Fix #3618

* clanfigy me softly

* fix unused var and params

* Frce the dialog being modal; ensure self deletion

* More qt-like behavior

* Restore dialogSemaphore logic
2019-03-10 22:22:19 +01:00
ctrlaltca
389f7fdc25 Shortcuts preference pane (#3641)
* Shortcuts preference pane

* Honor and glory to the hypnoclangifier

* clanfigy: exclude deleted files from being checked

* keep the olf translation context to be able to reuse old translations

* Fix gcc; extract translations

* Moved generic buttons after the groupbox

* Update current item on "clear/reset all"

* Sequenceedit: make buttons larger and translatable, add text

* Event filter

* Don't filter arrow keys; added placeholder text

* group counters
2019-03-10 21:49:33 +01:00
ebbit1q
11b2942d09 try to use fabs instead of abs to see if flatpack cares (#3638) 2019-03-10 18:49:18 +01:00
ctrlaltca
52cc725de4 Fix crash on card relation to inexistent card; fix #3637 (#3640)
* Fix crash on card relation to inexistent card; fix #3637

But that whole loop is a logic mess

* Check if related cards exists before creating the menu entry

* honor and glory to the hypnoclanfigier
2019-03-10 18:47:24 +01:00
Rob Blanckaert
a304d4235d Fix #3614 (#3633) 2019-03-07 22:48:03 -05:00
tooomm
4d7024e066 version bump to 2.7.1 (#3635) 2019-03-07 22:47:41 -05:00
Rob Blanckaert
4ce928eb41 Allow more characters in bare searches (#3632) 2019-03-07 12:21:30 +01:00
Rob Blanckaert
b172172be1 Fix #3587 (#3634) 2019-03-07 12:21:08 +01:00
ctrlaltca
5fd86954d6 fix #3621 (#3628) 2019-03-06 19:18:19 -05:00
Rob Blanckaert
55c4207182 Fix related cards popup (#3613) 2019-03-04 02:19:37 -05:00
ebbit1q
440311c939 set word wrapping (#3612)
fix #3605
2019-03-04 02:17:33 -05:00
Zach Halpern
81059fa3d8 translations 2019-03-04 01:49:43 -05:00
Zach Halpern
9f856acba0 revert
Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-03-04 01:34:13 -05:00
Zach Halpern
69474bad22 revision version 2019-03-04 01:33:49 -05:00
ebbit1q
fafdb65453 prioritize creature on maincardtype (#3611) 2019-03-04 01:32:19 -05:00
Rob Blanckaert
477faafb84 Adjust fontsize up on highdpi displays (#3610) 2019-03-04 01:32:09 -05:00
ebbit1q
abe4f5ca60 don't remove pt! 🔥🔥🔥🔥 (#3606)
* don't remove pt! 🔥🔥🔥🔥

* apply water to burns

* clangify

* fix clientside

* clangify

* missed qdebug

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-03-04 00:55:54 -05:00
Rob Blanckaert
a86aeb00c5 Fix 3598 (#3607)
* Fix 3598

* spelling
2019-03-03 22:03:35 -05:00
Zach H
754b9bdc5a Won't change if autoconnect enabled (#3602)
* Only will auto-select RR if autoconnect is not checked off.

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Only will auto-select RR if autoconnect is not checked off.

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* On disconnect, un-check autoconnect. Better naming.

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-03-03 21:57:48 -05:00
Rob Blanckaert
5a3f2fcff7 Allow /\ in simple searches. (#3604) 2019-03-03 21:48:20 -05:00
ebbit1q
9411396b97 rework pt setting (#3584)
* rework pt setting

save pt as a string serverside
set the pt of cards that enter the battlefield to empty (was -1/0)
implement old behaviour as changePT clientside
display old pt to messagelog
add new keybind for new set behaviour (default ctrl+shift+p)
add flow pt actions and keybinds that increase while decreasing
put more braces everywhere
various refactors like adding consts and for loops
remove a single superfluous semicolon
does not change the way pt is displayed client side
does not fix 3455 fully

* fix drawing of pt

remove search for / in carditem's paint() (crash)
ptstring is now always orange unless it's a faceup card with a pt that
matches the cardinfo pt
set changept to remove the pt if the field is empty
set changept to keep the old value if one side is empty
return in changept for +0/+0
clean up some if statements

* return on change to +0/+0

* change log message for empty original pts

* typo

* remove changept

add parsept to unify reading pt strings
change setpt behavior to be an "upgraded" version of the old setpt
add arbitrary strings as anything that starts with /

* clangify

* remove debug lines

* add tip of the day

* add missing images

* clangify
2019-03-03 16:24:57 -05:00
Zach Halpern
18ad3cf4a5 Disable auto connect when updating 2019-03-03 16:14:08 -05:00
Rob Blanckaert
a7f19f7848 Fix some dark mode colors. (#3596)
* Pick a link color that looks good in both light and dark mode

* Fix up chat log colors
2019-03-03 05:24:10 -05:00
Rob Blanckaert
63839eb464 Fixes #3590 (#3595) 2019-03-01 18:11:09 -05:00
Rob Blanckaert
eb60fec8e2 Filter Strings for Deck Editor search (#3582)
* Add MagicCards.info like fitler parser.

* Use FilterString whenever one of [:=<>] is in the edit box.

* Opts

* Opt

* - Capture errors
- Allow querying any property by full name

* clang format

* Update cockatrice/src/filter_string.cpp

Co-Authored-By: basicer <basicer@basicer.com>

* - Some refactoring for clarity
- More filters
- Add filter help

* Clangify

* Add icon

* Fix test name

* Remove stay debug

* - Add Rarity filter
- Make " trigger filter string mode

* You have to pass both filter types

* clangify

* - Allow filtering by legality
- Import legality into card.xml

* Add format filter to filtertree

* More color search options

* RIP extended

* More fixes

* Fix c:m

* set syntax help parent

* Fix warning

* add additional explanations to syntax help

* Allow multiple ands/ors to be chained

* Cleanup and refactor

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Move utility into guards

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* I heard you like refactors so I put a refactor inside your refactor (#3594)

* I heard you like refactors so I put a refactor inside your refactor

so you can refactor while you refactor

* clangify

* Update tab_deck_editor.h
2019-03-01 14:30:32 -05:00
Zach Halpern
4427ad1451 Don't use hardcoded index
Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-02-28 00:34:12 -05:00
Zach H
e77e439c4b Minor cleanup & set RR default for new clients (#3591)
* Minor cleanup & set RR default for new clients

* Handle case of no entries

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Use RR as default on rebuilds

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-02-28 00:10:10 -05:00
Rob Blanckaert
45b16ba78d macOS: Fix qt5.12 scale issues and dark mode (#3588)
* Maybe fix QT 5.12 scale.

* Use Palette colors
2019-02-24 10:05:09 -08:00
Rob Blanckaert
e68305d7bf - CardItems have dummy CardInfos if they arent in the database (#3589)
- If a CardInfo has no sets, add a dummy one to try to download it by non-set specific templates.
2019-02-23 19:52:38 -05:00
Zach Halpern
c2150fd9bd Update translations
Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-02-22 16:49:06 -05:00
Rob Blanckaert
ea8201af5c Judge mode (#3531)
* Judge mode

* Use seperate judge icon

* Fix clang init ordering complaint

* Create gavel.svg

* Add judge level

* Adjust judge permissions.

* - Tag events caused by judges
- Allow judges access to card right click menus.

* Allow judges to  change phase / turn.

* Remove gavel from pawn

* Make judge action text black.

* Create scales

* Rename scales to scales.svg

* Use scales

* remove gavel

* - Address PR feedback
- Fix sort order

* Zach

* add option to servatrice.ini
2019-02-21 14:00:00 -05:00
Rob Blanckaert
9d27b36704 Make v4 Cockatrice XML importer convert picURL to picurl to match v3 behavior and allow picURL images to load. (#3585) 2019-02-21 03:48:03 -08:00
Rob Blanckaert
d519f992d2 Updater for websockets (#3581)
* Dont clobber password when pulling down server list.
* Force download server list on client update.
2019-02-19 00:24:35 -08:00
Rob Blanckaert
1b3da22dd7 Merge pull request #3579 from basicer/messagelog-tweaks
Tweaks to message log.
2019-02-11 16:42:51 -08:00
tooomm
317f29b321 update appveyor badge (#3576) 2019-02-11 22:32:11 +01:00
Rob Blanckaert
c32f2190bd - Mill cards in correct order
- Roll up shuffles into bottom message
- Remove unused variable
2019-02-11 02:12:56 -08:00
Rob Blanckaert
d49ec0088f Fix shuffle (#3578) 2019-02-10 21:06:30 -05:00
tooomm
5b197c072e Git clone depth 15 (#3577) 2019-02-10 20:54:47 -05:00
Zach H
294b4332cc zach deployment key (#3575) 2019-02-10 15:57:53 -05:00
Zach H
6d6b7b4537 Merge pull request #3574 from Cockatrice/tooomm-patch-2 2019-02-10 14:46:30 -05:00
tooomm
b3fd5857f8 bump app version to 2.7.0 2019-02-10 13:29:12 +01:00
Zach H
78c18b7db6 new translations (#3573) 2019-02-08 21:03:03 -05:00
ctrlaltca
099d524a42 Smoother trice (#3566) 2019-02-08 20:57:17 -05:00
Rob Blanckaert
612edae5f6 Click replay timeline to seek. (#3570)
* Click replay timeline to seek.

* Fix seek for long games

* Erase log when rewinding

* zach cleanup

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-02-08 20:32:56 -05:00
Rob Blanckaert
b065ada633 Fix unbalanced save() restore() in cards (#3571) 2019-02-08 14:24:55 +01:00
ctrlaltca
e4bac025dd remove debug (#3572) 2019-02-08 11:57:24 +01:00
ctrlaltca
923b4acdbc Make the xml parser less strict about xml problems (#3567)
* Make the xml parser less strict about xml problems

* clanfigy me harder
2019-02-08 01:50:54 -05:00
ctrlaltca
2703db75d0 Update card menu when its counters change (#3565) 2019-02-08 01:50:34 -05:00
Rob Blanckaert
d932581f4a Move to bottom of library in random order. (#3549)
* - Allow shuffling a subset of a zone
- When moving cards to the bottom of library, shuffle them after
- Process events in the correct order serverside

* Zach fixes

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Comments + additional guard
2019-02-07 14:08:44 -05:00
ctrlaltca
6e3fd30fcb Add install mode to logger; fix #3558 (#3563)
## Related Ticket(s)
- Fixes #3558

![schermata 2019-02-06 alle 08 45 25](https://user-images.githubusercontent.com/1631111/52327211-98419900-29eb-11e9-9d15-69f59fc9d379.png)
2019-02-06 12:27:32 +01:00
ctrlaltca
46b34d6515 Add websocket feature (#3562)
* add websocket feature

* Added 2.7.0_min_version
2019-02-06 03:08:59 -05:00
Rob Blanckaert
073c531855 Connect from commandline (#3556)
* - Use Qt argument parser
- Add --connect command line option.

* Better version info
2019-02-06 03:08:24 -05:00
ctrlaltca
9118871afb Fix mistyped signal name; (#3561) 2019-02-06 02:39:31 -05:00
tooomm
a7d485d6f5 keep wrong project domain for proper settings storage (#3560)
* update project domain

* revert + comment/hint

* better wording
2019-02-05 23:57:35 -05:00
Rob Blanckaert
a719e3b306 Log number of cards revealed to other players. (#3555) 2019-02-05 02:33:11 -05:00
Rob Blanckaert
2bf444e4b7 Add shortcut for next phase with action (#3548)
* Add shortcut for next phase with action

* zach cleanup

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* cleanup and niceties

* clangify

* rename cleanup

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-02-03 22:57:41 +01:00
Rob Blanckaert
c1d25bf58b Add /servatrice to websocket URL to help out reverse proxies. (#3551)
Remove unused define
Use websocket port from default servers if given.
2019-02-03 22:50:19 +01:00
Rob Blanckaert
544c66edde Make server 12-factor compatible. (#3546)
* Docker

* Herokuize

* Use mysql method with database_url

* cleanup
2019-02-03 21:58:54 +01:00
Zach H
5a4f020196 Merge pull request #3550 from ctrlaltca/fix_hghlight 2019-02-03 13:35:30 -05:00
Fabio Bas
ec081b8b03 Fix active player game area highlightning 2019-02-03 19:15:30 +01:00
Rob Blanckaert
9a8c81cf5e Client Websockets (#3545)
* Websockets

* Add setting to get websocket IP from header

* Add QT version guard

* Minor cleanup

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* - Make QWebSocket required
- Remove QWEBSOCEKT_LIB guards
- Only TCP on port 4747
- Fix peerName lookup

* fix check

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Update CMakeLists.txt

* Update CMakeLists.txt
2019-02-03 11:43:22 +01:00
Rob Blanckaert
5e38214675 Playing a tableRow 3 card from the stack puts it to grave. (#3547)
* Playing a tableRow 3 card from the stack puts it to grave.

* move to top by resetting pos

* Zach touch

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-02-03 11:33:38 +01:00
ebbit1q
ba985f97e5 removes the pt of face down cards (#3542)
* removes the pt of face down cards

Instead of setting the pt of a hidden card to the value only known to
you, it's reset to nothing.
Resetting a card while it's already reset does nothing.
Removing the pt of a card is logged as "player removes the pt of card."
instead of "player sets the pt of card to ." (note the missing value).

* reset unknown cards to nothing instead

* replace cardname with card id for unknown cards

fixes #3543

* prefix #
2019-02-02 20:33:29 -05:00
Rob Blanckaert
c9c0fb28ee Counter expressions (#3534)
* Add peglib

* - Add expression engine
- Take an expression when setting a counter

* Shift + Click = Middleclick for counters

* minor cleanup for clangify

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Added tip entry
2019-02-02 13:56:49 -05:00
Filip Sufitchi
6e1b0a7590 Fix up Dockerfile to use ubuntu:bionic and actually build (#3540)
* Fix up Dockerfile to use ubuntu:bionic and actually build

* Remove commented PPA

* Fix up Dockerfile to use ubuntu:bionic and actually build

* cleanup

* fixup merge
2019-01-31 19:01:17 -05:00
ebbit1q
3562a48984 Merge pull request #3536 from ebbit1q/fix_3500
fix #3500
2019-01-30 18:01:11 +01:00
ebbit1q
bb4ca4db4a set default minumum player count for multi column layout to 4 (#3535)
fixes #3533
does not change existing settings
2019-01-30 15:29:24 +01:00
ebbit1q
c51377ca2a fix #3500 2019-01-30 15:13:27 +01:00
ctrlaltca
c3d94a51ec fix #3498 (#3527) 2019-01-27 12:51:03 -05:00
Rob Blanckaert
7cd9b9c0c8 Unconcede (#3515) 2019-01-27 12:50:41 -05:00
ctrlaltca
0dcf97d29d Bump version to 2.6.3 (#3525)
## Short roundup of the initial problem
A beta release for 2.6.3 has been relesed, but the codebase is still at 2.6.2

## What will change with this Pull Request?
Bumped version to 2.6.3
2019-01-27 12:11:22 +01:00
ctrlaltca
ebc881fa1c fix #3523 (#3524) 2019-01-27 11:42:22 +01:00
ebbit1q
37f9f62f03 correctly report exit code in clangify (#3520) 2019-01-25 21:41:39 +01:00
Zach H
1ace060e34 zach's turn to run the show (#3521) 2019-01-25 13:36:43 -05:00
ebbit1q
495e232c22 add the amount of cards logged to the reveal cards event (#3516)
* add the amount of cards logged to the reveal cards event

sets cardname to the amount for the call if not 1 for the fromstr only
add braces for single line statements

* zach cleanup
2019-01-24 08:53:05 +01:00
ctrlaltca
ed70099e36 Rework of the card database, xml format and oracle parser (#3511)
* CardDB: merge all card properties in a new structure

* Pre Json parser changes

 * Cockatrice: use qt's builtin json support
 * Move qt-json src dir from cockatrice to oracle
 * Add dummy cockatricexml4 parser (yet to be implemented)

* Implement a new parser and xml format

 * cockatricexml4: new xml parser following the "generic properties hash" pattern;
 * oracleimporter: refactor the parsing code to better adapt to cockatricexml4; rewrote split cards parsing
 * carddb: change "colors" from a stringlist to a string
 * carddb: move the getMainCardType() method to the cockatricexml3 parser
 *

* CardInfo: show all properties (stil missing: nice name + translation)

* Rework the "add related card" feature so that it doesn't change the card name in the carddb

Also, fix token count display

* Picture loader: Added support for transform cards

* Fix side information for flip cards

Mtgjson uses side a/b for flip cards, while scryfall doesn't

* Pictureloader: dynamic tag resolution from card properties

Examples old => new
* !cardid! => !set:muid!
* !uuid!   => !set:uuid!
* !collectornumber! => !set:num!
New examples:
 * !prop:type!
 * !prop:manacost!

* Start moving mtg-related property names to a specific file

* Clangify

* Fix tests

* Make gcc an happy puppy

* Revert "Make gcc an happy puppy"

This reverts commit 446ec5f27516c4d3b32dbfc79557f4827c5c5bdf.

* Some gcc fixes

* Share set list between different db parsers, so they won't overwrite one each other

* All glory to the hypnoclangifier!

* Fix test compilation

* Cleanup edited files in the prior PR. (#3519)

* Cleanup edited files in the prior PR.

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Fix includes

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Update carddatabase.h
2019-01-23 18:17:10 -05:00
ctrlaltca
19180243aa Workaround fedora compilation problem on Travis; fix #3508 (#3512)
* attempt fix fedora by downgrading qt

* fix
2019-01-22 10:28:20 +01:00
Rob Blanckaert
a08cf9379b Disable darkmode on MacOS (#3513) 2019-01-22 10:28:06 +01:00
ebbit1q
1c6b43c545 fix typo in shortcut name (#3509)
In #3439 the shortcuts got some overhaul but this shortcut wasn't
correctly renamed.
This fix will clear users' original shortcut for increasing toughness.
An improvement over the current state of it not working at all and being
unable to set to the default shortcut.
Fixes #3506
2019-01-19 05:15:22 -05:00
Zach H
41bfbf2e83 Force Oracle run on new install/update (#3497)
* Force Oracle run on new install/update

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Add settings option to disable such a check

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-01-14 01:11:05 -05:00
ctrlaltca
273d5d89b7 Fix shortcuts on mac; fix #3482 (#3491)
* hopefully fix #3482

* Travis:uUse the most recent osx_image; use homebrew support in travis
2019-01-08 15:20:29 -05:00
Zach H
b0e643ecc0 Several download URLs have arrived! (#3494)
* Cockatrice Picture loader uses better defined URLs now
URLs are defined on the Card Management tab
Instead of Primary/Backup, you can now define a list of URLs
List of URLs can be drag/dropped for priority ordering
Oracle now uses scryfallId > mtgjsonUUID for !uuid!

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Simplify to QStringList and remove metacall

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* fix issues brought up by Dae. Also fix how the defaults load to account for first time users.

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* clangify

* Fix save settings on row moved (#3495)

* merge model fix, and reclangify

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Sources > Resources

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-01-08 15:18:06 -05:00
ctrlaltca
4eda7cda9e Make deck editor filter translatable ; extracted new translations; Fix #3488 (#3490)
* Fix #3488 ; extracted new translations

* Make operators translatable, too
2019-01-07 21:50:36 -05:00
ctrlaltca
463ef13fe0 Update version to 2.6.2 (#3492)
## Short roundup of the initial problem
We released 2.6.2, but CMake still thinks it's 2.6.1

## What will change with this Pull Request?
Update CMake version to 2.6.2
2019-01-07 09:12:27 -05:00
Caledor
ce140041e3 Switch from (s) to plural form whenever possible in message log (#3487)
* Use plural form whenever possible

Change for "%1 draws %2 card(s)" is self explanatory

Change for "look top X" switches var %2 and %3 so i can skip %3 for singular and translate as "top card", as explained in tr comment

For "counter(s)" i just moved it into %3 (each color) since plural form is already used there.

* clangify

* manual clangify attempt

* Add missing tr

* More missing tr
2019-01-06 20:48:20 +01:00
ebbit1q
84f6da103f remove all dos line endings (#3489) 2019-01-06 13:46:18 -05:00
ctrlaltca
2621cc09ac Optimize json parsing (#3480) 2018-12-30 19:05:40 -05:00
ebbit1q
40f787be14 add an ignore button to sort warning (#3463)
* add an ignore button to sort warning

* change warning message

* formatting
2018-12-30 18:51:03 -05:00
Caledor
59300e61fc Minor translation issue fix (#3481) 2018-12-28 15:59:11 -05:00
Zach H
ab1c4cb1d7 Use scryfall urls (#3474) 2018-12-20 18:49:53 -05:00
Zach Halpern
4616dd47bc preferences sym not dir 2018-12-20 18:26:46 -05:00
Zach H
94fe64c6c1 Update translations (#3475)
Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2018-12-20 18:26:00 -05:00
ctrlaltca
65f41e520e [WIP] Basic mtgjsonv4 support (#3458)
* Basic mtgjsonv4 support

* Fix set type

* [WIP] Oracle: use zx instead of zip

* clanfigy fixes

* Fix reading last block of xz

* Added back zip support

* [WIP] adding xz on ci + fixes

* typo

* resolve conflict

* Make gcc an happy puppy

* test appveyor build

* appveyor maybe

* Appveyor: add  xz bindir

* Update ssl version (the old one is not available anymore)

* Windows is a really shitty platform to code on.

* test vcpkg

* again

* gosh

* nowarn

* warning 2

* static

* Maybe

* cmake fix

* fsck this pain

* FindWin32SslRuntime: add vcpkg path

* Appveyor: cache support, force usable of openssl from vcpkg

* updated as suggested

* ouch

* Import card uuids and expose this property as !uuid! for card image download

* Minor style fixes

* address changed URL
2018-12-20 18:05:03 -05:00
ebbit1q
cee69705d8 fix rpm builds in travis (#3472)
* add rpm build option to travis compile

* better argument parsing
2018-12-12 13:26:13 +01:00
tooomm
3a05bcfb29 fix deployment on travis (#3468)
## Short roundup of the initial problem
Deployment conditions weren't met, because the $BUILDTYPE variable doesn't exist anymore.
@ebbit1q changed that, and there is a flag now that you pass to the compile script instead.

## What will change with this Pull Request?
- Remove that condition
It's not needed because we make sure via the build config itself that on tags no debug builds are run. This was a double check basically to prevent debug builds beeing deployed.
2018-12-07 11:48:06 -05:00
ebbit1q
e921cf88f9 place the os nametag after the version (#3465)
When i added the appended os nametags I didn't account for the dots inside the version, this will place the nametag before the last dot instead of after the first dot.
2018-12-05 19:34:56 -05:00
ebbit1q
952f13dec4 update macos (#3461)
Set travis image to xcode9.2: this image uses sierra instead of
el_capitan, el_capitan no longer builds.
Disable homebrew autoupdates, this gives a major speedup.
2018-11-28 15:51:36 -05:00
ebbit1q
ed2a3f92e0 fix travis format checking again (#3451)
Set the exit code properly, "$?" does not work after "if !".
Move "set -e" to after format checks.
2018-11-25 19:29:24 -05:00
ebbit1q
f1563c5604 add fedora docker image to travis compilation (#3447)
* add fedora docker image to travis compilation

fixes #1746

* add dockerfile

* would you like to please install for me? [y/n]

* remove bc dependency

* save cache separately for different docker builds

* add development packages to fedora dockerfile

* add package names

* use env values to make these all look the same

* set docker image name correctly

* add missing dependency

* minor oversight, add %% to remove all braces in check schema
2018-11-25 11:25:47 +01:00
ebbit1q
06081bd940 add keybinds to mill cards (#3439)
* add keybinds to mill cards

Add functions to move single card from top of deck to the graveyard and
exile.
Add keybinds to move single or multiple cards from top of deck to exile
or graveyard.
Add new keybinds to settings menu.
Move settings menu items around for a better fit.
Rename a few of the items in the settings menu.
Add default keybinds: ctrl alt d/e for single/multiple cards from top of
deck to the graveyard. No defaults are set for moving to exile.

* fix shortcut menu

* fix missing tag

* rename mismatched functions

* fixed your typos

* refactor shortcutsettings

correct a lot of typos
optimize a lot of functions
this could merit a pr on its own

* set mill keybinds

* refactor add related card actions

I found a function that was completely unintelligible so I made it
remotely legible and removed the duplication.

* shorten line by 17 characters

replace a lot of function calls with just a single reference

* add brackets

add brackets to all single line if statements etc.
readability improvements
2018-11-23 22:21:20 -05:00
ebbit1q
843b9df939 fix a bug from #3412 (#3454)
check if the card returned any info at all
2018-11-23 22:19:06 -05:00
ebbit1q
c7b8f3e923 Corrections to 3438 (#3452)
* correct previous misstake in #3438

wrong, this fixes that.

* add checking for second argument to --package

nice to have

* split find result into path and file
2018-11-22 17:32:18 -05:00
ebbit1q
964bb0974c add more clang-format focus to CONTRIBUTING.md (#3442)
* add more clang-format focus to CONTRIBUTING.md

Add more clang-format instructions and instructions on clangify.sh.
Move clang-format instructions to the section Formatting and make other format topics a subheader of it to articulate focus on it.
Add section about our ci formatting for people that look at this file after their test failed.
fixes #3065
also fixes #3340

* grammar

* grammar
2018-11-21 23:00:35 +01:00
ebbit1q
3f40a51cdb move package files to unique name (#3438) 2018-11-21 22:59:46 +01:00
tooomm
d9b11858fb exclude mac debug on tagged release (#3443)
leftover from #3433
2018-11-21 22:57:16 +01:00
ebbit1q
ec61d1f012 travis ci format check hotfix (#3449)
* set error message to be conditional

#3443 fails on the git merge base for "some reason" but at least this error message should be clearer.

* fix issues created earlier in #3433

split version from actual diff
remove --color-diff argument as apparently it isn't supported
2018-11-21 21:18:01 +01:00
Zach H
af2bce7141 add token creations from graveyard/exile (#3445) 2018-11-21 03:53:35 -05:00
ebbit1q
6b6c6c71ca add ccache to docker compilation (#3446)
* add ccache to docker image

* test commit please ignore
2018-11-20 14:55:20 +01:00
ebbit1q
57f15a9e98 fix building packages on travis-docker (#3441)
* add docker compilation to travis

add new matrix entry in .travis.yml for compiling on 18.04
add Dockerfile in .ci to build ubuntu 18.04 inside docker
remove release entry for uvuntu 16.04 to not conflict
refactor .travis.yml
refactor travis-comile.sh
merge travis-dependencies.sh into the travis.yml
remove travis-dependencies.sh

* enable debugging on travis-compile.sh

* set ubuntu16 buildtype to "Debug"

set buildtype Debug for as requirement for "test"
add --debug and --release flags to travis-compile.sh

* make output prettier

edit the format warning message and clangify.sh output

* fix clangify.sh

fix --cf-version flag
fix directory argument parsing
add directory parsing details to --help
add examples to --help

* test making packages

move dockerfile for bionic to make room for possibly other files
add missing file dependency
set macos brew to use protobuf --without-python@2

* remove test

* rm old Dockerfile
2018-11-16 18:32:00 +01:00
ebbit1q
72ed98e404 add docker compilation to travis (#3433)
* add docker compilation to travis

add new matrix entry in .travis.yml for compiling on 18.04
add Dockerfile in .ci to build ubuntu 18.04 inside docker
remove release entry for uvuntu 16.04 to not conflict
refactor .travis.yml
refactor travis-comile.sh
merge travis-dependencies.sh into the travis.yml
remove travis-dependencies.sh

* enable debugging on travis-compile.sh

* set ubuntu16 buildtype to "Debug"

set buildtype Debug for as requirement for "test"
add --debug and --release flags to travis-compile.sh

* make output prettier

edit the format warning message and clangify.sh output

* fix clangify.sh

fix --cf-version flag
fix directory argument parsing
add directory parsing details to --help
add examples to --help
2018-11-16 15:44:22 +01:00
ebbit1q
f70699d3de Improve clangify.sh (#3435)
* Improve clangify.sh

Separated from #3433 merge this branch first!

* fix error codes on -n and -t

fix output on -n
format -h message

* separate color diff from diff
2018-11-13 09:21:08 +01:00
ctrlaltca
638ee1af4a This should fix appveyor compilation (#3434) 2018-11-12 18:50:38 +01:00
ebbit1q
8028bad7b1 set common protobuf files to compile with other tags in debug (#3432)
* set common protobuf files to compile with other tags in debug

force the same flags as release on debug builds
fixes #3431

* check for version first

* use Protobuf_VERSION instead of calling protoc --version

* lower verion requirement

* set tags to disable certain warnings instead of removing all
2018-11-09 11:05:11 +01:00
ebbit1q
e1e9caf0ef Load plain improvements (#3422)
* improve loading from plain text

Fixes the loadFromStream_Plain function that is used to load plain text
decklists.
The rewritten function uses more regexes and is a bit cleaner.
This fixes multiple bugs with loading the various sources of decklists.
Note that the new function still has a few issues that are shared with
the original version like creating duplicate cards.

* clang format comments

apparently clang-format even complains about the spacing in your
comments

* refactor loading_from_clipboard tests

Remove all heap allocation and use references.
Use std::pair and std::string so gtest will show the cardnames in error messages.
(note that using QPair or QString does not work with gtest)
Improve the last two testcases to include weird names; and name and
comments testing.
Remove empty header file.

* fix compatibility with more formats

skip "sideboard" line
include everything in mainboard when there are multiple empty lines
add removal of the mwdeck cardversion selector in round braces
add replacal of lowercase ae combination that should never occur
Set cardname to lowercase as apparently our checks are hardcoded to only
accept lowercase.

* remove bugged test

The current load from plain is simply broken, removed checking the
comments for correct contents.

* rework load_from_clipboard tests again

rework the test to have less code duplication
add more tests and more special cases
note that text is still all lowercase

* improve loading from plain text

Fixes the loadFromStream_Plain function that is used to load plain text
decklists.
The rewritten function uses more regexes and is a bit cleaner.
This fixes multiple bugs with loading the various sources of decklists.
Note that the new function still has a few issues that are shared with
the original version like creating duplicate cards.

* clang format comments

apparently clang-format even complains about the spacing in your
comments

* refactor loading_from_clipboard tests

Remove all heap allocation and use references.
Use std::pair and std::string so gtest will show the cardnames in error messages.
(note that using QPair or QString does not work with gtest)
Improve the last two testcases to include weird names; and name and
comments testing.
Remove empty header file.

* fix compatibility with more formats

skip "sideboard" line
include everything in mainboard when there are multiple empty lines
add removal of the mwdeck cardversion selector in round braces
add replacal of lowercase ae combination that should never occur
Set cardname to lowercase as apparently our checks are hardcoded to only
accept lowercase.

* remove bugged test

The current load from plain is simply broken, removed checking the
comments for correct contents.

* rework load_from_clipboard tests again

rework the test to have less code duplication
add more tests and more special cases
note that text is still all lowercase

* remove forcing of lowercase cardnames

Cardnames in DeckList::loadFromStream_Plain will no longer be forced
lowercase if they aren't found in the database.
Empty lines in the comments of plaintext decklists will not be skipped.
The loading_from_clipboard_test gets its functions declared in a
separate header "clipboard_testing.h".
Add more edgecase tests.
Refactor code.

* add old QHash version support

QT 5.5 does not support using initializer lists for QHash.
Implement a preprocessor version check for conditionally using inserts
instead of a const with initializer list.

* add old QHash version support

QT 5.5 does not support using initializer lists for QHash.
Implement a preprocessor version check for conditionally using [] access
instead of a const with initializer list.

* add qHash on QRegularExpression below QT 5.6

Apparently QRegularExpression can't be hashed in lower QT versions,
so we add our own hash function, and everyone lived happily ever after,
and none the wiser.

* add header guards to clipboard_testing.h
2018-11-07 06:05:25 -05:00
tooomm
8b7a287b44 clarify min req (#3426) 2018-11-07 08:32:20 +01:00
tooomm
0cd671c022 Improve hints for manage sets dialog (#3419) 2018-10-31 21:14:47 -04:00
ebbit1q
051fcff284 add more precise rules to CONTRIBUTING.md (#3423)
Add extra rules that clang-format enforces, like the order of includes and the way single line comments should be formatted.
Correct some grammar ( what is up with the translation section ordering steps out of order?? ).
This is a web edit.
2018-10-31 21:14:05 -04:00
ebbit1q
4e3d499162 improve translating section of CONTRIBUTING.md (#3424)
Remove the weird out of order numbering and replace it with just chapters for specific users.
Add a bit of explanation to adding translations as a developer.

This is just a recommendation for an improvement, jumplist could be added and/or #3423 merged with this. (it fixes the typos)
2018-10-30 17:45:04 -04:00
tooomm
7e6c4d8a6c fix appveyor dependencies (#3420)
ty @ctrlaltca
2018-10-28 13:11:51 -04:00
ebbit1q
986e405ca7 add new brace guidelines and clang-format info (#3414)
Add new brace guidelines, correct code sample.
Add detail to indentation guidelines.
Add basic clang-format information and a link to the documentation on llvm.

closes #3413 
A quick edit to the contributing guide from the web ui, hope it comes out right.
2018-10-25 09:54:17 -04:00
ebbit1q
75203cf385 add reset power and toughness option #3402 (#3412)
* add reset power and toughness function on cards

Add actResetPT to set the power and toughness in the same way as
actSetPT but instead of prompting the user it will fetch the original
pt from the card info for each card.
Add the new command to the card rmb list, keybinds and settings.

* changed style to .clang-format

Please change the contributing guidelines to use this style instead.
2018-10-20 23:33:35 -04:00
Dane Johnson
bc2cb59c50 Fix blank line between comments issue (#3407)
* Added failing test to demonstrate issue with dec loading

* Prevents empty lines between comments from being interpreted as the start of the sideboard
2018-10-08 11:26:08 -04:00
Henry Lancelle
cf9fdcd09e Translate curly apostrophe to ASCII apostrophe (#3395) (#3401)
* Translate curly apostrophe to ASCII apostrophe (#3395)

Treats the curly apostrophe as a straight apostrophe when searching in
the deck editor search bar.

* Moved logic for handeling translation to CardDatabaseDisplayModel.

This implementation was done with strings instead of characters because
the curly apostrophes and quotes are considered multi-characters.
Thus, the method of iterating through the string and replacing
the characters with the proper translations was difficult to cleanly
implement.

* clang-tidy modifications

* Implemented faster algorithm for string translation.

Optimized the algorithm for string translation, before it would compute
in O(N*M) time where N is the size of the string and M is the size of
the translation table.  Now it will compute in O(N) time where N is the
length of the string.

* Renaming variables and methods.

* Fixed character literal type, was unicode, is now wide.
2018-10-03 09:15:02 +02:00
Lee Tran
eb4b1e74f1 Disable saving of decks when the deck is empty (#3384)
* Disable saving of decks when the deck is empty

* Replace tabs with spaces to conform with coding conventions

* Remove whitespace at end of line to satisfy the CI robot overlords

* Improve logic to check if deck is empty, fix functionality when a deck is loaded

* Fix code style issues

* Disable more menus when the deck is empty

* Streamline code for disabling save menus when the deck is empty

* Fix save-disabling when loading a deck from the clipboard

* Enable saving deck directly after loading deck
2018-09-21 10:46:31 -04:00
Lee Tran
70005a6f1d Enable the creation and using of shortcuts to move cards from the top of the library to play face down. (#3388) 2018-09-07 09:14:34 +02:00
ctrlaltca
1415a4dafa Fix servatrice linking under FreeBSD - fix #3376 (#3377)
Fix servatrice linking under FreeBSD - fix #3376
2018-09-06 12:20:20 +02:00
tooomm
8b567427c2 update proto links (#3380)
repo moved, see https://github.com/protocolbuffers/protobuf/issues/4796
2018-09-01 13:27:41 -04:00
tooomm
3605a2ca0e bump min qt requirement (#3375) 2018-08-30 02:08:48 -04:00
Alessandro Marzialetti
c58abadff1 fix: cockatrice quits properly when the window is closed (#3329) 2018-08-27 15:01:53 +02:00
tooomm
135c02ea41 travis: more cleanup (#3336)
* add links to build image update history

* remove cmake from apt

* remove bc from apt

* remove clang-format from apt

* test clang-format

* Revert "test clang-format"

This reverts commit b2f12da427.

* remove protobuf from apt

* Revert "remove protobuf from apt"

This reverts commit 9162c8800c.

* remove qt from apt

* test with versions which differ from what xenial provides

* Revert "test with versions which differ from what xenial provides"

This reverts commit 6192e58169.

* Revert "remove qt from apt"

This reverts commit 0d9aff1c4c.

* conditions v1 are the default now

https://blog.travis-ci.com/2018-07-18-build-stages-officially-released

* add new job names

https://docs.travis-ci.com/user/customizing-the-build/?utm_source=blog&utm_medium=web&utm_campaign=build_stages_ga#Naming-Jobs-within-Matrices

* disable mail

* clang-format version

* remove clang source

* cmake version

* macOS: remove clang-format

formatting only checked on linux build

* add compiler info

* cmake version2

* remove fast_finish

only useful if allowed failures are configured in the matrix:
https://docs.travis-ci.com/user/customizing-the-build/#fast-finishing
2018-08-27 10:50:55 +02:00
Andrew Zwicky
ed01752cb4 [WIP] Card image loading: Fallback on 404 (#3367)
* 2479: Running clang-format

Reformatting files to be in line with style guidelines.

* 2479: Updates to remove set/url indices

This change removes set and Url indices in favor
of check for empty lists and removing items from them
instead.

* 2479: TransformUrl will now error on missing fields

If transformUrl is called with a template, and the card/set
is missing something required by that template, it will now
return an empty string, instead of the template with an empty
string substituted in.

* 2479: clang-format updates

* 2479: Fixing omission of ! from two properties

* 2479: Adding prefix on debug messages

Adding PictureLoader: to the front of each debug message
from this file, so that it can be more easily filtered out
by grep in the log of a running application.

* 2479: Remove outdated comment

* 2479: Remove unused method from intermediate work

* 2479: Updating QDebug messages to be more consistent

* 2479: clang-format updates

* 2479: Remove repeated code, replace with call to nextUrl

This removes some redundant code that is better replaced with a call
to nextUrl, in case the code needed to populate the nextUrl changes
significantly.

* 2479: Adding more detailed comments

* 2479: Refactor transformUrl

Refactor transformUrl to do everything in a single loop instead
of two almost identical loops.  set information is populated if
present, but is added with empty strings if absent.
2018-08-22 09:52:38 +02:00
Zach H
e341337ce0 Revert "[WIP] Fallback on 404" (#3364) 2018-08-11 09:06:18 -04:00
Zach H
e09ea1e683 Merge pull request #3363 from andrewzwicky/fallback_on_404 2018-08-11 09:05:21 -04:00
Andrew Zwicky
cbd430555f 2479: Working Url traversal
Url checking is now working as expected.  In set order,
starting with custom sets, then going in priority
order by url template order, Urls will checked, and the
first successful one will be used.
2018-08-09 23:50:01 -05:00
Andrew Zwicky
8239539946 2479:
Initial work on downloading cards through fallback URLs.

This change will add in the ability to proceed to the next URL
should the first one fail.  First trial shows that it's working,
but needs more refinement.
2018-08-08 22:42:22 -05:00
Andrew Zwicky
e467698d72 2497: Forgot to check in .h file 2018-08-05 17:43:28 -05:00
Andrew Zwicky
846b426a7c 2497: Start to implement fallback on card image urls
Return a list instead of a single url.  This is the start
of getting many possible urls instead of one.  Functionally
identical except that the primary url will be attempted for
cards without a muid.
2018-08-05 16:21:53 -05:00
tooomm
f1eab4e26a remove unused beta file endings (#3338) 2018-08-02 21:31:32 +02:00
David Szabo
283ce23111 Manage sets window: "Enable all/selected" button toggling never disabled (#3337)
## Related Ticket(s)
- Fixes #3314 

## Short roundup of the initial problem
When the view was sorted in the manage sets window, the "Enable/Disable All" buttons never toggled to "Enable/Disable selected" buttons, even when more sets were selected.

## What will change with this Pull Request?
- Selected sets can be enabled/disabled in sorted view as well
2018-07-25 14:39:42 +02:00
tooomm
451e1874a7 UI dialog tweaks: filter + create game(s) (#3351)
* vbox --> grid layout
2018-07-25 08:21:29 +02:00
tooomm
69c103ede3 missing features dlg: better update hint (#3352)
## Short roundup of the initial problem
People missed the hint on how to resolve missing features on their own, because update hint was hidden behind the `Show details` label.

## What will change with this Pull Request?
- Update hint is more prominently placed and not hidden behind a label
- It's translatable now
- Wording update to reflect UI change

## Screenshots
<!-- simply drag & drop image files directly into this description! -->
- before
![missing_features](https://user-images.githubusercontent.com/9874850/43153756-74cfd9f0-8f72-11e8-9e0f-fbf47b13f324.png)
- after
![missing_features_new](https://user-images.githubusercontent.com/9874850/43153761-78bec4e0-8f72-11e8-9853-ccc1ecb7f558.png)
2018-07-24 21:05:42 +02:00
tooomm
ac0f92bac6 bump to 2.6.1 (#3342) 2018-07-21 10:56:39 -04:00
Zach H
aa308717de translation pulls (#3335) 2018-07-17 20:19:40 -04:00
tooomm
2d0d29fb5c appveyor: version updates + tweaks (#3334)
* version updates

- qt to 5.11.x
- openssl to 1.0.2o
- protobuf to 3.6

* undo protobuf change

* reapply with proper semver

* only qt latest

* combined env, protobuf 3.6

* slim build matrix config down

* fix env

* test

* fix env -eq

* test if script changes work

* /2

* enable cache again

* fix

* final
2018-07-17 20:12:39 -04:00
tooomm
cba1ca8d5b remove Qt guards (#3328)
* remove version guards

* clangify

* [skip ci] README wording

* add cmake requirement to readme

* remove return

* remove min req from README
2018-07-17 20:08:42 -04:00
tooomm
c12c3c071f NSIS: Show hint when user installs 32bit Cockatrice on 64bit Windows (#3331)
* hint for 32bit

* final wording
2018-07-17 07:40:45 +02:00
tooomm
d37d73017f nsis: add sleep timer to ensure unlocking of vc_redist (#3325)
* add 3s sleep + log hint
2018-07-14 15:49:41 +02:00
tooomm
a766aa7d8a appveyor: reduce version string to basic info (#3324)
## Short roundup of the initial problem
It was mostly out of date because we have to manually update it with our current version number.
The use of that is suspect anyway, since it only displays in the appveyor build overview.
It also had a redundant info about the branch.

## What will change with this Pull Request?
- remove hard coded version number
- remove branch
- cleanup build trigger from [#3300](https://github.com/Cockatrice/Cockatrice/pull/3300/files#diff-11c909939117928998b102a1fff7d363)
- more readable style

## Screenshots
I did some tests, so don't be confused about the different styles displayed in the history:
<!-- simply drag & drop image files directly into this description! -->
![version](https://user-images.githubusercontent.com/9874850/42664150-876175ac-8639-11e8-9df5-3fdd775440ed.png)
2018-07-13 17:29:16 +02:00
ctrlaltca
b61c07a205 Check for both 32 and 64bit cockatrice when uninstalling (#3323) 2018-07-12 23:58:56 +02:00
ctrlaltca
c01aad6767 Travis: minor changes (#3321)
Use the xenial version of llvm's toolchain for clang-format
Add qt5.5's websocket library for servatrice
2018-07-11 17:43:33 +02:00
tooomm
d0d662f73a switch to xenial (#3320) 2018-07-11 14:52:19 +02:00
Zach H
3ae363cf4b force 2.6.1 (#3316) 2018-07-02 21:49:24 -04:00
tooomm
4796110afb updates (#3311) 2018-06-29 16:06:55 -04:00
ctrlaltca
dc727cb620 NSIS: misc fixes [wip] (#3300)
NSIS: misc fixes
2018-06-25 18:34:58 +02:00
David Szabo
87eb132af1 Tips close with the main window (#3305)
* tips close with main window

* null verification added
2018-06-24 19:37:30 -04:00
ctrlaltca
2354a6f89d Fix cards loading bug (#3307) 2018-06-24 17:49:26 -04:00
tooomm
1618e89c41 travis: remove unneeded debug builds on tags for faster release deployment (#3266)
* add hint

* enable condition for debug

* enable new conditions
2018-06-21 19:40:12 -04:00
ctrlaltca
e223f07462 fix #3235 (#3302) 2018-06-21 18:56:53 -04:00
ctrlaltca
f70e87c5a0 Fix #3285 (#3299) 2018-06-19 22:55:01 +02:00
ctrlaltca
0b3e86e307 Fix "reinstall" button in updater, fix #3293 (#3297) 2018-06-19 19:57:44 +02:00
ctrlaltca
a5ea4f7da2 Add ability to edit chat macros, Fix #3296 (#3298) 2018-06-19 19:15:13 +02:00
tooomm
4e75a74bfd readme: fix linebreaks (#3292)
## Short roundup of the initial problem
Everything was mixed in one single line.

## What will change with this Pull Request?
- introduce line brakes to keep the wanted look

## Screenshots
<!-- simply drag & drop image files directly into this description! -->
before: https://github.com/Cockatrice/Cockatrice/tree/2018-06-17-Release-2.6.0#run
after: https://github.com/Cockatrice/Cockatrice/tree/tooomm-patch-2#run

---

Should the `webatrice` webclient be listed there as well?
2018-06-18 07:58:04 -04:00
Zach H
c7072cd543 translations push (#3291) 2018-06-17 18:23:05 -04:00
Zach H
5e0bfc3193 translations (#3290) 2018-06-17 18:13:02 -04:00
tooomm
b316a5d541 new icons (#3289) 2018-06-17 18:09:58 -04:00
Zach H
e147bd6cea add feature list requirement (#3287)
* add feature list requirement

* version update

* version bump
2018-06-17 18:06:12 -04:00
David Szabo
d36f86c523 Duplicate cards & empty setlist (#3283)
* Card duplicates handled

* clangify

* kinda works, some cards are still duplicated

* separate card entries grouped together

* clangify
2018-06-16 22:42:22 -04:00
David Szabo
81803e2612 Search in "Manage sets" window (#3229)
* search field added; sortfilterproxy displayed in treeview

* searching works properly

* moving with filter on works; view isnt't updated yet

* clangify & view updating figured out

* moving disabled when sorting is active

* drag&drop disabled when view sorted

* clangified

* foreach replaced

* button rename & SORT_RESET defined

* changed variable names

* 'x' button added & searchlabel text modified

* 'enabled' column won't grow anymore

* column resize improvement

* button hint & restore original order added

* moving with filter on works; view isnt't updated yet

* sort disable build in column headers (3 clicks)

* codacy fix

* typo + wording

* background color for warning

* buttons moved down a bit

* clicking "default order" button will hide the warning text
2018-06-10 11:00:42 -04:00
Bers
91b3c7343d fixed 2 warning-errors on archlinux(gcc 8.1): implicit fallthrough, ignored qualifiers (#3270) 2018-06-09 10:28:17 +02:00
ctrlaltca
1276c8dd46 Add -DWARNING_AS_ERROR=1 option to cmake script (#3275) 2018-06-06 08:43:04 +02:00
ctrlaltca
89ab7f1f67 Fix #3252 (#3269) 2018-06-02 02:41:10 -04:00
tooomm
664d717e17 skip branches with open pull requests (#3265)
See https://www.appveyor.com/docs/appveyor-yml/
2018-05-28 19:29:19 -04:00
tooomm
494dfc2f4b actCancel remove (#3261) 2018-05-25 21:59:52 -04:00
tooomm
3a05d063af connect dialog: button reworks (#3243) 2018-05-25 21:59:42 -04:00
ctrlaltca
f97959febc fix #3257 (#3258) 2018-05-24 15:46:02 +02:00
David Szabo
b3df71ae41 0 values in power/toughness filters won't match non-zero values anymore (#3250)
## Related Ticket(s)
- Fixes #3212 

## What will change with this Pull Request?
- `0` input on power/toughness filters will only return `0` values
- `relationCheck` method will only get called after simple string comparison failed
- due to their similar structure `acceptPower` and `acceptToughness` methods has been merged
2018-05-24 00:18:53 +02:00
tooomm
ec4a99e47b remove empty languages (#3253)
## What will change with this Pull Request?
- cleanup of empty and unused languages files (catalan, lithuanian, hebrew, ukrainian)
- reflect language removing on transifex
2018-05-23 10:32:41 +02:00
skwerlman
ad66a48b8e ensure column ordering is consistent (#3249) 2018-05-18 18:07:39 -04:00
David Szabo
7a2558d834 vs version number increased for appveyor build (#3251) 2018-05-18 18:06:33 -04:00
Bers
3b3f5a639c Hide non-existent card values in infowidget and cardframe (#3239) 2018-05-15 01:53:53 -04:00
tooomm
9acf606e93 settings dialog: fewer space (#3245) 2018-05-15 01:53:01 -04:00
ctrlaltca
4cdd17945d Servatrice: make listening host configurable; fix #3241 (#3242)
* fix #3241

* clangify
2018-05-12 23:54:03 +02:00
ctrlaltca
c06fc562a1 Cmake scripts refactoring; fix #3225 (#3230)
* fix #3225

* Servatrice: use websockets as an optional component (for qt < 5.3)

* Attempt++
2018-05-12 23:28:22 +02:00
tooomm
73fb9ee03e update file rules (#3232) 2018-05-10 22:07:22 +02:00
tooomm
4e10ce7473 smaller clear pic button (#3220) 2018-05-04 03:48:53 -04:00
ctrlaltca
a7f4aace9c Extract the xml parser from carddatabase (#3223) 2018-05-04 03:46:08 -04:00
David Szabo
9727699e26 braces are only left for split cards (#3217)
* braces are only left for split cards

* condition for braces modified
2018-05-02 21:20:58 -04:00
Zach H
2520d07ef2 log moderation stats in the uptime table (#3215) 2018-05-02 17:31:54 -04:00
tooomm
661e00f563 log cleanup (#3207) 2018-05-02 16:07:43 -04:00
ctrlaltca
2780270911 macOS: fix qt plugin installation (#3216)
* Osx: fix qt plugin installation

* Add make install step to travis debug build

* only install under osx

* Add "styles" plugins (for native look'n'feel)

* Osx: upgrade qt from 5.5 to current (5.10.1)

* Fix osx on travis

The qt homebrew formula now installs three qt* symlinks (qt, qt5, qt5@5.x) so we can't use/don't need bash globbing anymore
2018-05-02 15:57:35 -04:00
tooomm
8a5baa4637 connect dialog tweaks (#3211) 2018-04-23 14:30:46 -04:00
tooomm
f5eb05b682 bump version number (#3205)
* bump version number

* bump
2018-04-18 19:50:26 -04:00
tooomm
f309ddf28a README updates (#3203) 2018-04-16 20:08:26 -04:00
David Szabo
67a2a8cf08 datetime display fixed for OSs with non-English localization (#3204) 2018-04-16 20:07:30 -04:00
Zach H
1fbdea0f35 translation updates (#3200) 2018-04-16 02:42:58 -04:00
David Szabo
cc2a0fa0d0 server site added to connect window (#3190) 2018-04-10 19:05:13 -04:00
tooomm
034e79dd36 typo (#3187) 2018-04-10 12:51:57 -04:00
tooomm
5c03f18c72 add hint about how to contact server admins (#3186) 2018-04-10 12:40:24 -04:00
Zach H
61e509585f Server List from JSON (#3165) 2018-04-09 22:38:21 -04:00
tooomm
0c10b66a2d prettify spoiler settings (#3180) 2018-04-09 17:15:37 -04:00
tooomm
7758145e71 comment explanation out (#3181) 2018-04-09 16:47:44 -04:00
ctrlaltca
37ab7b8fb1 Add a note about bug #3135 (#3184) 2018-04-09 16:47:08 -04:00
tooomm
42d15c39a0 change vcredist install option from "/quiet" to "/passive" (#3175) 2018-04-07 12:32:20 -04:00
tooomm
a0d84114de fix space (#3172) 2018-04-06 15:01:04 -04:00
tooomm
706054ea96 readme: link update (#3173) 2018-04-06 15:00:46 -04:00
tooomm
7d5a33b12c bump version number (#3174) 2018-04-06 15:00:32 -04:00
tooomm
a056a882c3 flip rename (client side) (#3149) 2018-04-05 22:42:54 -04:00
tooomm
f89f6438c9 Update ISSUE_TEMPLATE.md (#3171) 2018-04-05 22:42:36 -04:00
tooomm
e25b7e9eb8 button label wording (#3168) 2018-04-04 04:45:28 -04:00
Zach H
ca2e05952e add rooster ranges, remove woogerworks (#3163) 2018-04-03 18:41:10 -04:00
David Szabo
2fcb02cadd untranslated string comparison fixed (#3164) 2018-04-02 23:04:52 -04:00
David Szabo
e1394bd851 Feature/3139 new features for tips (#3152)
* "Tip of the Day" option added to Help menu

* Tip of the Day setting moved

* If no new tips are availabe, don't show tip of the day again

* list storing try #1

* first unseen tip shown first

* lastShownTip removed

* fixed next/previous buttons

* spaces > tab

* "Show this window on startup" is not checked by default
2018-04-01 04:52:26 -04:00
ctrlaltca
6374d157fc Fix Appveyor builds (#3151)
* fix appveyor builds
2018-03-24 16:05:08 +01:00
tooomm
5df547ee53 update template (#3150) 2018-03-23 23:37:11 -04:00
David Szabo
2a9d76f090 Colors on split cards sorted in WUBRG order (#3128) 2018-03-07 20:26:47 -05:00
Zach H
5859fa2f20 translation updates (#3124) 2018-03-02 16:50:10 -05:00
David Szabo
312caae062 Tip of the Day (#3118)
* Basic tip of the day with sample widget added

* "Show tips on startup" option added to settings

* tip cycling implemented

* Structure of the tipOfTheDay class and resource created

* tip getter function modified

* Resources added, feature works properly

* clangified

* accidental modification rolled back

* zach cleanup

* tips to spaces; cmake list combined

* cleanup img

* fix copy

* remove TOTD as QObject so we can copy construct it

* prevent mem leaks in dlg

* changed order of 'next' and 'previous' buttons

* Date and tip numbers added; content wraps around

* useless sizepolicy removed

* link support added & clangified

* Initial tips & memory management updates
2018-03-02 03:11:18 -05:00
David Szabo
281e52eaa9 power and toughness values displayed after card flip (#3120) 2018-03-01 12:28:30 -05:00
Zach H
66958b5975 clangify only the different files (#3122) 2018-02-28 13:20:53 -05:00
David Szabo
941a06e107 Custom image file path corrected (#3119) 2018-02-25 23:22:41 -05:00
David Szabo
7cfbf114b7 "Show related card" option added to ingame context menu (#3115) 2018-02-19 01:12:25 -05:00
David Szabo
2409eae940 left, right, and S shortcuts modified to use shift (#3116) 2018-02-19 00:38:51 -05:00
Vafthrudnir
3d2c7b6670 Right-click menu added for card database view (#3113) 2018-02-15 03:25:44 -05:00
Vafthrudnir
65ef66cfa7 Braces left in for split mana costs in xml (#3108) 2018-02-13 22:37:24 -05:00
Zach H
019295931a Merge pull request #3109 from Vafthrudnir/hotfix/oracle_button_text_correction 2018-02-13 20:50:30 -05:00
Vafthrudnir
c8a10a9997 Mnemonic created 2018-02-14 02:40:46 +01:00
Vafthrudnir
4e8a09517c Button text changed to "Save" from "Next" 2018-02-14 02:36:54 +01:00
Vafthrudnir
f302154df7 Hotfix/2950 delete filters with keyboard (#3097)
* Shortcut setting checks for invalid keys

* Different message shown for invalid keys and used keys; warning message is displayed on start if conflic is detected

* Only shortcuts related to deck-builder are checked
2018-02-13 02:51:14 -05:00
Vafthrudnir
11ad677fe8 Sending card name to chat on shift+click (#3106) 2018-02-13 02:50:37 -05:00
Vafthrudnir
8084ab605f Tablerow fixed for non-mana generating artifacts (#3104) 2018-02-12 18:04:11 -05:00
Vafthrudnir
af5a04abf1 "Comment" field made resizable in deck builder window (#3105)
* solution with splitter

* Made prettier

* Useless parameter removed

* clangified

* c++11 cleanup
2018-02-11 13:49:58 -05:00
Vafthrudnir
3426a6b201 'Rarity' property added to split cards in xml (#3102) 2018-02-09 23:45:59 +01:00
Vafthrudnir
51eeac0541 Mana cost filtering for split cards (#3098) 2018-02-08 14:15:42 -05:00
Nick Beeuwsaert
2206328406 Add custom QStyle class to tab bar to fix render issue on macOS. (#3095)
* Add custom QStyle class to tab bar to fix render issue on macOS. fixes #3070

* clangify
2018-02-08 15:39:29 +01:00
Vafthrudnir
501e82f712 Split card handling added to cmc filter (#3090) 2018-02-07 11:37:10 -05:00
tooomm
ab3989aeba Consistent use of 'beta' tag across the project (#3089) 2018-02-07 11:33:14 -05:00
Vafthrudnir
a0d6a342d3 Loyalty filter added (#3087) 2018-02-07 11:33:01 -05:00
Zach H
35159ef61a Clang script (#3085) 2018-02-06 08:45:13 -05:00
Zach H
fcfb2b12b7 remove extra copies (#3081) 2018-02-06 05:06:51 -05:00
Vafthrudnir
4cbec71882 Relation checks added to relevant fields in card filter (#3080)
* comments and <=, >=, == support added
2018-02-06 05:05:30 -05:00
Zach H
b58aa459a4 change file names to end with win32/64 instead of x86/x86_64 (#3079) 2018-02-05 23:39:55 +01:00
Zach H
8a8b580501 translations (#3078) 2018-02-05 12:22:49 -05:00
Zach H
c9525af624 this is backwards (#3077) 2018-02-05 11:39:10 -05:00
tooomm
aba47719b2 properly display logical connectors (#3072)
they should not get transalted as well
2018-02-04 13:47:12 -05:00
Vafthrudnir
b6b4d7e4a0 Automatic focus change after filter selection (#3074) 2018-02-04 13:46:35 -05:00
Vafthrudnir
63d0f5af43 Start in maximized window on first start (#3075) 2018-02-04 13:07:37 -05:00
ctrlaltca
517420cccb Replace CardInfo* and Carset* with smart pointers (#3053)
* Replace CardInfo* and Carset* with smart pointers

* fixes to help memory & c++11 stuff
2018-02-02 12:52:47 -05:00
tooomm
3e418ba3c6 travis: temporary downgrade mac builds to qt5.5 (#3066)
`qt@5.7` is no longer available: https://github.com/Homebrew/homebrew-core/pull/23165#issuecomment-362270835
2018-02-01 19:09:46 +01:00
dino572
c1bd50f186 Fix mwDeck edition tag parsing on deck load (#3057)
* Update decklist.cpp

Changed parsing code, line 565 and 567
2018-01-31 23:29:18 +01:00
tooomm
d13cf65a10 contributing: add toc + little tweaks (#3030) 2018-01-27 13:45:27 -05:00
ctrlaltca
994a643d9c Travis: enable ccache usage under macOS; halves compilation time (#3052) 2018-01-27 13:43:48 -05:00
ctrlaltca
e127cb74b6 Fixed most issues from codacy (#3050) 2018-01-27 13:31:44 -05:00
Dave
3c3e6ae68a Domain change (#3051)
.es es no mas

Server and database from .es is now active on cockatrice.dr4ft.com
2018-01-27 17:30:40 +01:00
ctrlaltca
b29bd9e070 Clang-format (#3028)
* 1/3 Add .clang-format file and travis compilation check

* 2/3 Run clang-format

* 3/3 Fix compilation problems due to include reordering

* 3bis/3 AfterControlStatement: false
2018-01-27 10:41:32 +01:00
tooomm
8dbdd24c8e fix cmake 3.10 (#3048) 2018-01-25 20:39:10 +01:00
tooomm
04ab3d7f13 fix release run on tags (#3046) 2018-01-23 12:58:56 -05:00
tooomm
03d0a84ef5 "edit sets" --> "manage sets" rename (#3044) 2018-01-22 12:42:10 -05:00
tooomm
14a0c53fc1 travis update (osx + linux) (#3041) 2018-01-21 17:07:25 -05:00
woogerboy21
da7c7c1f83 Update Servatrice MySQL Search Path (#3039)
Removed the older versions of the mysql library install paths and updated to reflect the 5.7 product paths.
2018-01-21 11:05:13 -05:00
Zach H
261d3ac591 better null check (#3036) 2018-01-20 14:54:34 -05:00
ctrlaltca
55029b6b68 Travis: remove sudo (#3037) 2018-01-20 16:50:06 +01:00
Zach H
bc52882ac4 Fix Bad Gameplay (#3034) 2018-01-19 20:34:14 -05:00
Zach H
d1b95aad16 move to slot (#3032) 2018-01-19 19:04:48 -05:00
Zach H
691bf36fbe Disable sideboard button w/o deck (#3025) 2018-01-19 10:50:18 -05:00
Zach H
5a823becf1 Contributing Doc Updates (#3009) 2018-01-19 08:38:37 -05:00
Zach H
feeaba1d62 2.4.1 beta -> 2.5.0 beta (#3024)
Big changes so we will go to 2.5.0 for next release
2018-01-18 19:28:51 -05:00
Zach H
ebec30dd1c Add No annotations export option w/ shortcut (#3013) 2018-01-18 19:25:30 -05:00
Zach H
5757d60b1d Smarter Mana Cost sorting & small cleanup (#3008) 2018-01-18 19:25:10 -05:00
skwerlman
81fcc3c11a remove builds for 1610 and 1704 (#3023)
ubuntu turned off the repo servers :(
2018-01-18 19:24:43 -05:00
Zach H
34bec90193 Fix deck loader with spaces (#3007) 2018-01-18 19:23:13 -05:00
Zach H
dcc632e0d4 Fix a crash (#3011) 2018-01-18 11:53:57 -05:00
Zach H
7a150c558d Trim all inputs (except password) (#3018)
* Trim all inputs (except password)

* missed )
2018-01-17 18:57:13 +01:00
ctrlaltca
3a11aebb21 windows/appveyor compilation updates (#3020) 2018-01-17 18:20:05 +01:00
Zach H
8825e2932a fix linux crash (#3014) 2018-01-13 04:20:12 -05:00
ctrlaltca
cd558a9722 Even out db collation to utfmb4_unicode_ci; fix #2835 ; fix #2218 (#2915) 2018-01-13 04:02:22 -05:00
tooomm
cc822dd8df card filter: add clear button and placeholder text (#3003) 2018-01-11 16:43:08 -05:00
Kyle Grammer
6fc1aaef90 Add comp architecture (#2968) 2018-01-10 22:19:07 -05:00
tooomm
c8122c94ef adjust custom naming, clickable commit hash in brackets (#2981) 2018-01-10 13:38:51 -05:00
tooomm
e6e6932dbb card filter: alphabetical ordering for keywords (#2987) 2018-01-10 13:37:39 -05:00
tooomm
d124e6ac22 deck editor: add placeholder text to search (#3000) 2018-01-10 13:33:37 -05:00
tooomm
7efab80d9b token creation context menu improvements (#2999) 2018-01-10 13:32:29 -05:00
Zach H
d19744236e Automatic Spoiler Season (#2991)
* oracle now can be run in spoiler or normal mode

* tests for travis

* only run on relaunch

* spoilers in client (not oracle now) and tray icon shows when done

* spoiler status will be checked before downloading spoiler file

* only download if they care about spoilers

* reload db on spoiler download

* manual update button, code cleanup, and fix enabling sets when new

* cleanup, nullchecks, and fixes to spoiler

* reload DB even if not in spoiler season; necessary as we have a check elsewhere to prevent the reload if spoiler check happens

* Implement changes from 2991#issuecomment-356169374

* Change implicit nullptrs, alert on file deletion, minor changes

* make reload thread safe and minor changes from 2991#issuecomment-356450302

* Fix locking

* Disable update now button while process running
2018-01-10 13:27:43 -05:00
tooomm
51ec593759 fix space (#2990) 2018-01-02 22:57:23 -05:00
Zach H
87c978937d replace beta semvar correctly (#2980) 2017-12-28 21:30:17 -05:00
tooomm
dfaa85847c add tag (#2979) 2017-12-28 20:02:30 -05:00
tooomm
74dbf75c5b fix var call (#2978) 2017-12-28 19:21:42 -05:00
tooomm
f0f73c8f77 ci: deployment config for beta+stable (#2976) 2017-12-28 18:33:16 -05:00
ctrlaltca
3af2be4539 removed win xp support; update qt to 5.9 for win 32bit (#2975) 2017-12-19 09:09:20 +01:00
tooomm
5b8e0dc8ec add group key (#2967)
as announced here: https://blog.travis-ci.com/2017-12-01-new-update-schedule-for-linux-build-images
2017-12-18 18:17:31 -05:00
Zach H
b75882b6b9 Allow non-db cards to be moved around (#2960) 2017-12-18 14:17:54 -05:00
Zach H
2abfd3b4a9 Update Rarity Filters & Refactoring (#2962) 2017-12-17 19:42:54 -05:00
Zach H
014b9947fe clear search bar if all filters cleared (#2961) 2017-12-17 17:48:57 -05:00
Zach H
ec4e6d53df allow backspace button to remove a filter (#2959) 2017-12-17 17:39:41 -05:00
Zach H
0eae4dbe54 add checkbox option to clear log (#2963) 2017-12-17 17:32:31 -05:00
Zach H
297f1f2555 remove untap option, combine w/ tap (#2964) 2017-12-17 17:31:31 -05:00
tooomm
7e80f4b4ae oracle: fix wording for token download (#2946) 2017-12-15 15:42:30 -05:00
Kyle Grammer
6e24f59826 Fixing split card from UNH with wrong name in database (fix #2947) (#2949) 2017-12-15 15:37:32 -05:00
Kyle Grammer
5e00faed5d Fix for Aftermath and Split Cards when sending to Tappedout; fix #2942 (#2944) 2017-12-10 17:56:49 -05:00
John Robe
6c038a91e4 Deck export (#2938)
* Added “export deck” option to export deck to decklist.org for viewing/printing. Implemented using a new menu item, added shortcut ability, and functionality to parse the deck correctly and add main/sideboard cards to decklist. Per issue #2931
2017-12-05 22:34:19 -05:00
tooomm
4d641eb0e7 version number bump to next patch (#2920) 2017-11-19 20:22:12 -05:00
tooomm
59824cf4dd update finish (#2923) 2017-11-19 20:22:02 -05:00
tooomm
b615b5b33e Translation Updates (#2918) 2017-11-19 15:11:37 -05:00
tooomm
3dc2526f0a update download wording (#2912) 2017-11-04 20:17:18 -04:00
tooomm
6bc39a4f6f yml config documentation (#2899)
* little fix

* add config hints

* doc link
2017-11-04 20:16:41 -04:00
John Hill
422c899cdb Sorting by P/T numerically (#2901) 2017-11-04 13:11:46 -04:00
Gavin Bisesi
e96a250bf1 Fix easy changes link in readme (#2897)
Using these two labels because github tells contributors to look for them.
2017-11-02 15:17:29 +01:00
TaylorShiells
563e96e051 Update Readme.md (Style Guide) / FMRM feedback (#2905)
This change establishes the Google Developer Documentation Style Guide as the official style guide for the ReadMe. This will provide a starting point for editors or writers looking to work on documentation. This edit also does an initial patch on the readme based on that style guide
2017-11-01 13:08:17 -04:00
ctrlaltca
4baaf978f5 Deck editor: force default file extension on file save; fix #2829 (#2910) 2017-10-31 15:34:56 -04:00
ctrlaltca
6b6ba9a8f1 Update translations (#2890)
* Translations

* update and test codacy change
2017-10-09 19:16:23 +02:00
tooomm
fcb0daf80f more ignore for appveyor (#2892)
* add dockerfile and license to ignorelist

* fixed space
2017-10-09 19:15:36 +02:00
tooomm
a3ca459526 exclude translation files from codacy (#2891)
* exclude translation files from codacy

* update appveyor ignore config

add codacy.yml
2017-10-09 16:40:05 +02:00
tooomm
17202e8dba AppVeyor: prevent unnecessary builds (#2888)
* prevent unnecessarybuilds

* readd qt5 string

sadly this is needed as of now:
ff6b0f86ec/cockatrice/src/releasechannel.cpp (L59-L68)

* wrap asterisks

* fixed with validator

https://ci.appveyor.com/tools/validate-yaml

* complete link

* add helpful links

this should not trigger a appveyor build

* add space in readme

this should not trigger a appveyor build

* highlight c++ types

this should not trigger a appveyor build

* remove empty line

this should not trigger a appveyor build

* declutter dockerignore

this should not trigger a appveyor build
2017-10-09 11:19:56 +02:00
ctrlaltca
ff6b0f86ec Appveyor updates (#2885)
* Appveyor updates

Remove unused stuff (mysql, choco)
Use MSVC 2015
Upgrade Qt to 5.9, protobuf to 3.4.1

* stick qith qt 5.6 for winxp 32bit compatibility; zlib test

* Appveyor is using a randmon clone path for pulls, get it from an env variable
2017-10-05 08:38:09 +02:00
Zach H
96b30da492 fix deckstats.net regex (#2886) 2017-10-04 23:36:42 -04:00
tooomm
9cbdc4195e change to https (#2863) 2017-10-04 12:46:43 -04:00
tooomm
ada262b826 betaXYZ to betaX (#2882) 2017-10-04 12:45:28 -04:00
Alessandro Marzialetti
78e299fdfd Fixed life points not showing (#2868) (#2881) 2017-10-04 12:44:36 -04:00
skwerlman
cf5cd21c50 Update .gitlab-ci.yml (#2876)
Remove support for Fedora 22 (been EOL for a while)
Add support for Ubuntu 17.04 and 17.10

Note that debug builds for 17.04 and 17.10 are still affected by issue #2343, and so always fail.
2017-10-03 15:28:47 +02:00
woogerboy21
b684c12964 Correct VS2017 Compile Issue (#2878)
A line in the servatrice CMAKE file was removed in a prior commit causing a compile error in newer versions of visual studio.  This returns the line.
2017-10-03 09:23:33 -04:00
tooomm
df8c38b649 add link to project roadmap (#2872) 2017-10-01 00:23:06 -04:00
tooomm
1424de2c54 remove old TODO file (#2870) 2017-09-29 20:51:41 -04:00
ctrlaltca
7875407795 servatrice: case-insensitve check for email and token challenge; fix #2857 (#2860) 2017-09-28 15:34:35 -04:00
tooomm
ef89104503 add colourless keyword to deck filter (#2858)
extends #2737 for missing term (add colourless)
2017-09-27 14:03:58 +02:00
ctrlaltca
ccee0aa3fd Cmake: remove old unneeded POLICIES (fix Appveyor) (#2859) 2017-09-22 17:47:05 +02:00
John Hill
a6d3229e74 If playing online, don't change your life/mana counters if you click on your opponent's (#2839) 2017-08-19 00:43:18 -06:00
tooomm
93d8ac10ff Fix broken README links after #2826
copying --> license
2017-08-14 08:25:20 -04:00
tooomm
04d84f9d9a repo cleanup (#2826) 2017-08-11 21:42:45 -04:00
tooomm
2557a2183d .travis folder (#2805) 2017-08-06 23:56:31 -04:00
John Hill
e694cbe854 add ability to clone from stack (#2824) 2017-08-06 23:56:17 -04:00
John Hill
3963570838 Mana counter shortcut (#2821) 2017-08-06 21:09:25 -04:00
John Hill
dd05b86bc9 initial way of getting rid of warning (#2817) 2017-08-06 21:04:03 -04:00
tooomm
af3423e67d split up string and argument (#2822) 2017-08-06 20:51:54 -04:00
John Hill
7c8daf68ea Add version label to Oracle Importer (#2818) 2017-08-06 14:03:19 -04:00
John Hill
6b1ea9186a Double click token (#2815) 2017-07-31 22:50:32 -04:00
tooomm
e90c389212 remove mention-bot config file (#2814) 2017-07-31 18:08:25 -04:00
John Hill
556d19ff70 Clone in exile and graveyard (#2813) 2017-07-31 00:34:24 -04:00
Lee Matos
838ab888db clarify docker build happens inside of the repo folder (#2807)
I intuited that this was the case, but being more explicit might help other docker newbies to understand what's happening.
2017-07-15 13:51:02 -04:00
tooomm
1cb3d88e35 flag updates (#2804) 2017-07-14 21:30:27 -04:00
ctrlaltca
1366e5970e Portable mode for windows (#2794)
* Portable mode for windows

* fix start menu in portable mode

* Make gcc an happy puppy

* Clean old installation if we are installing over an old portable mode installation

* Default to Desktop\CockatricePortable

* Settings dialog fixes

* wording
2017-07-08 11:22:29 +02:00
tooomm
1565309146 enable caching for ci (#2799)
* enable cache

* caching on mac

* fix ci caching on mac

* fix

* add mac cache

* added homebrew cache and pretty print yaml (+ structural ordering)

* cleanup

* fix ccache on mac

* testing workaround

https://github.com/travis-ci/travis-ci/issues/7456#issuecomment-296505058

* try xcode7.3 instead of workaround

* cache timout value

more time for cache to upload
2017-07-07 16:17:18 +02:00
Psithief
b05ed0376a Fixes #2712 (#2797)
When checking unknown sets, consider sets with an empty long name, 
set type and release date as 'incomplete'/'partial' sets.
Do not mark partial sets as known, or ask the user to enable them.
Instead, silently enable partial sets.
When a partial set becomes complete, the user is prompted to enable the
set as before. If they choose not to enable, those partial sets are 
disabled, as we can no longer assume they are disabled by default.
2017-07-07 00:45:46 -04:00
Psithief
61893faf3b Slightly more accurate XSD. (#2787)
XML 1.0 does not provide a method that allows elements with minimum
occurances and variable occurances in any order, so we are stuck
with xs:sequence.
2017-06-29 20:52:44 -04:00
Zach H
e8dbdc3c6d Add token creation for opponent board items (#2744) 2017-06-28 23:09:10 -04:00
tritoch
5abfda49be Import spoiler.xml as spoiler.xml and overwrite existing (#2784) 2017-06-28 22:54:09 -04:00
tritoch
bcda502b46 Loyalty now string, xsd fix (#2785)
Card with `X` loyalty was printed, loyalty now string
2017-06-28 21:42:08 -04:00
Psithief
03bb02f75b Improved XSD (#2781) 2017-06-26 14:42:13 -04:00
Psithief
bfcc48f5bf Check for .xlhq (CCGHQ naming scheme) files (#2778) 2017-06-22 22:59:33 -04:00
Psithief
ae15f5df06 Handling of tokens/related cards improved. (#2773) 2017-06-20 18:35:06 -04:00
tooomm
029a4a39ad readme: https link + layout tweak (#2768) 2017-06-13 15:34:50 +02:00
Zach H
9ddb18a35e Make deck list appear if deck loaded (#2745) 2017-06-12 12:25:52 +02:00
woogerboy21
2094910b7a More descriptive reason for "to many requests" when registering (#2760)
* More descriptive reason for "to many requests" when registering

Currently the only way for a user to get a response of "to many registration attempts"  is by the servers configuration to restrict the number of registration attempts but the error message presented to the user is very vague as to why they have been denied.  This PR updates the reasoning.  I'm open for suggestions on any clarity recommendations.

* Added more clarity

Updated error message to include email address information for even greater clarity.
2017-06-12 12:12:36 +02:00
tooomm
b36c349f9b remove unused define (#2757) 2017-06-11 00:42:09 -04:00
Zach H
99e7458f9b make not set to untap normally more distinct (#2746) 2017-06-04 14:02:35 -04:00
Zach H
0a57229886 keep client version persistant (#2750) 2017-06-04 13:59:37 -04:00
Zach H
f3f83882e0 Model col widths off deck editor & disable button if no tokens in deck (#2751) 2017-06-04 13:58:34 -04:00
Zach H
d970b9e50f fix card not showing correctly in games (#2752) 2017-06-04 13:57:47 -04:00
Zach H
b0d8a31a2e remove invalid connect (#2753) 2017-06-04 13:57:21 -04:00
ctrlaltca
03a7a9fafb Webclient: fix some bugs (#2742)
* Handle room join and leave events + case sensitive userlist sort; fix #2307

* Webclient: add autoscroll, but only if already at the bottom; fix #2306
2017-05-31 23:04:59 -04:00
tooomm
4c953acebc exchange dl stat page (#2743) 2017-05-30 08:32:58 +02:00
tritoch
c5ac61c797 Colorless for color filter (#2737)
* Colorless for color filter

Add 'colorless' as an option for color filter in deck editor / card list.

* Remove empty quote check

Empty quote does not work here. Add 'none' as optional string instead.

* Add C to colorless filters
2017-05-30 08:19:11 +02:00
ctrlaltca
f75caa7245 Webclient overhaul (#2735)
Migrate from protobuf.js 5.x to 6.x (remove long.js and bytebuffer.js)
Upgrade jQuery from 1.x to 3.x
Upgrade jQueryUI to 1.12.x
Use minimized version of js libraries
Disable debug messages
Fix default value for Event_RoomSay’s RoomMessageType field
2017-05-29 14:12:36 +02:00
tooomm
87060dc5c7 created_at to published_at (#2723) 2017-05-22 16:00:38 +02:00
backendr
62681f7f8d contect menu fix (#2719) 2017-05-18 17:03:21 -04:00
Zach H
b53cd33eed Smarter Clipboard Pasting/Parsing (#2706) 2017-05-14 14:35:40 -04:00
backendr
405a719412 Better scrolling in reveal zones (#2716) 2017-05-14 19:01:50 +02:00
Zach H
aca6917d42 Merge pull request #2672 from Cockatrice/tooomm-update_msg_rework
update msg rework
2017-05-13 16:06:53 -04:00
tooomm
73e2c3d32f Publish --> Release 2017-05-13 14:49:35 +02:00
tooomm
7f273b547b add missing tr() 2017-05-13 13:24:04 +02:00
backendr
77e0cddbae counter context sensative (#2714) 2017-05-13 11:48:26 +02:00
backendr
d9230d6c6b Message Log Widget changes (#2709)
* Message Log Widget changes

* Gravard now logs as before

* removed redundant QString()
2017-05-13 11:47:43 +02:00
Zach H
f00bcc9179 Merge pull request #2691 from Cockatrice/tooomm-dl_badges
github dl badges in README
2017-05-10 14:23:33 -04:00
skwerlman
b47e262e7f limit gitlab builds to master (#2711) 2017-05-10 08:53:11 +02:00
woogerboy21
1811bad835 Fix room chat history (#2698)
Looks like an addition to the table shifted things.  We probably  should look into some how use the actual column names (if it can be done).  But for now this should fix the server room chat history.
2017-05-09 23:22:48 -04:00
tooomm
41ebf7a9ad space 2017-05-09 12:47:19 +02:00
tooomm
7f01f921f7 added dl count for latest release 2017-05-09 12:46:41 +02:00
Zach H
d347e54526 Merge pull request #2688 from backendr/ignore_first_server_message
Prevent emitting initial server message event
2017-05-08 19:46:17 -04:00
tooomm
256e40a9ee Merge branch 'master' into tooomm-dl_badges 2017-05-08 10:05:24 +02:00
Zach H
5f4490ec4e Merge pull request #2695 from Cockatrice/tooomm-hq_badges
updated badges (gitter+licence)
2017-05-07 18:54:45 -04:00
tooomm
2fb2481211 updated badges 2017-05-07 12:45:53 +02:00
tooomm
d585b9f1d6 http --> https 2017-05-06 21:47:22 +02:00
Zach H
c745f41cb9 Merge pull request #2692 from Cockatrice/tooomm-cmake_2.3.18
cmake - bump version number
2017-05-06 12:54:50 -04:00
tooomm
5b07f6d6d8 bump version number 2017-05-06 18:21:31 +02:00
tooomm
39779be7bb add alltime dl count 2017-05-06 16:03:27 +02:00
tooomm
70f1c97a27 github dl badges 2017-05-06 15:46:11 +02:00
Zach H
a49373eded Merge pull request #2686 from backendr/log_changes
Log Colors
2017-05-05 21:48:02 -04:00
backendr
55dcf4a845 Log refresh 2017-05-06 00:40:41 +02:00
backendr
b140721d50 Add flag for checking inital server message 2017-05-06 00:18:49 +02:00
Zach H
c96f234b6d Merge pull request #2683 from ctrlaltca/fix_2682
Remove unneeded debug
2017-05-05 13:42:02 -04:00
Fabio Bas
a4e78bbfa2 remove debug 2017-05-05 15:23:59 +02:00
Zach H
fd3d62284d Merge pull request #2670 from ctrlaltca/load_tokens
Improved token loading, removed card price code
2017-05-05 00:24:48 -04:00
Zach H
16bc8b764b remove all of pricing 2017-05-04 23:29:43 -04:00
Fabio Bas
36f6907fa3 Improved token loading 2017-05-04 23:28:51 -04:00
tooomm
339945e089 fix custom build + displaying name (#2668)
* fix custom build name

* remove html and argument from tr()
2017-04-30 16:20:29 +02:00
tooomm
faeb3f8daf fix 2017-04-30 15:17:03 +02:00
tooomm
e04010f00b further tweaks and uniform style 2017-04-30 15:06:32 +02:00
tooomm
cbd9d2c4fc better wording (#2674) 2017-04-29 22:15:43 -04:00
tooomm
fdc82708c6 extend updater description in menu (#2673) 2017-04-29 20:13:33 -04:00
tooomm
8f7691b47a next round 2017-04-29 22:55:49 +02:00
tooomm
ca2e3e5eab trial_error 2017-04-29 22:45:25 +02:00
tooomm
da42d9e049 fix 2017-04-29 22:32:07 +02:00
tooomm
f18679bfff fix attempt 2017-04-29 22:06:53 +02:00
tooomm
970b67cdb6 update message rework 2017-04-29 20:57:52 +02:00
ctrlaltca
3c5e38bd14 Hide some icons for spectators; fix #2589 (#2656)
* fix #2589

* Additional fix
2017-04-29 15:06:30 +02:00
ctrlaltca
b20c60e603 fix #2332 (#2650) 2017-04-29 12:21:37 +02:00
Zach H
12c9e4b81a allow placement below top X cards (#2666)
Close #2666
2017-04-27 20:32:24 -04:00
Zach H
7c1a18da5e Add "Random card from graveyard" (#2652) 2017-04-26 18:12:56 -04:00
ctrlaltca
df211748ca Add clear button to deck editor (#2654) 2017-04-26 15:20:35 -04:00
ctrlaltca
ce77d51a8f Fix crash on logger; make log window modalless (#2659) 2017-04-26 15:05:24 -04:00
tooomm
9dd3a04a08 improve provided info in "edit sets" (#2641) 2017-04-25 15:46:37 -04:00
Zach H
62d8f5a039 change cards from sb<->mb with double-click (#2606) 2017-04-25 14:05:25 -04:00
Fabio Bas
2c551bdd35 Revert "fix #2332"
This reverts commit 0fd77346df.
2017-04-25 19:35:07 +02:00
Fabio Bas
0fd77346df fix #2332 2017-04-25 18:58:01 +02:00
ctrlaltca
a46c7156dd fix_crash (#2649) 2017-04-25 18:13:45 +02:00
ctrlaltca
3c54499a40 sort edit sets better (#2648) 2017-04-25 11:40:47 -04:00
ctrlaltca
160d66d890 show tokens all sets (#2646) 2017-04-25 11:32:51 -04:00
ctrlaltca
3f3839d70a fix deck card backs (#2645) 2017-04-25 11:32:00 -04:00
ctrlaltca
ab94d2c91d Token Dialog Revamp (#2639) 2017-04-25 00:29:57 -04:00
ctrlaltca
8ad448a23c fix #2600 (#2638) 2017-04-25 00:29:32 -04:00
ctrlaltca
acb40bc738 Fix #2608; fix #2609; fix #2611 (#2636) 2017-04-24 22:20:44 +02:00
ctrlaltca
f2a887a6a4 fix #2623 (#2634) 2017-04-24 22:20:19 +02:00
ctrlaltca
29904c49da Specify reason when on game leave; fix #2624 (#2633)
* fix #2624

* feedback++
2017-04-24 22:20:08 +02:00
Fabio Bas
38ad71b06a fix ox compilation 2017-04-24 21:59:09 +02:00
Fabio Bas
7f057612bf possibily fix osx shortcut problem 2017-04-24 20:39:11 +02:00
ctrlaltca
9d2494e6e2 Update README.md adding link to guidelines; fix #2627 (#2635) 2017-04-24 15:52:30 +02:00
tritoch
23d27cff77 Handle 'aftermath' cards like 'split' cards (#2626) 2017-04-22 14:36:22 -04:00
Zach H
176ea444ba revert clear focus (#2619) 2017-04-21 17:52:14 +02:00
ctrlaltca
3e12a5f67f Update CONTRIBUTING.md (#2613)
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

"wait for CI upload" should be "wait for CI to upload"
"update again the version number" should be "update the version number again"
2017-04-21 14:26:55 +02:00
ctrlaltca
3356b2ede7 Change version in about window and installer name (#2570)
* Change version in about window and installer name

* Change version in about window and installer name

* Cmake get version updates

* dev snapshot format changed

* alignment changes
2017-04-20 13:41:18 +02:00
Zach H
5f3a3f535a clear focus only if needed (#2604) 2017-04-20 05:21:30 -04:00
Zach H
e2e9c5ab96 disable join if spec disabled (#2605) 2017-04-20 03:01:28 -04:00
skwerlman
dd36187864 fix header markdown in TODO.md (#2592) 2017-04-16 21:38:55 -04:00
Zach H
dc6c375220 clear focus when changing phases (#2583) 2017-04-15 14:37:01 -04:00
tritoch
2e9a0bdd4d Fix Pre-release / Dev build link (#2584) 2017-04-11 18:06:13 -04:00
Zach H
1413337b24 Add CONTRIBUTING note on making prereleases (#2576) 2017-04-07 20:59:06 -04:00
Zach H
3b7990b569 fix travis build (#2575)
* fix travis build

* rename dir
2017-04-07 14:41:33 +02:00
Zach H
657e1ac9e6 fix c style casting (#2561) 2017-04-05 15:45:58 -04:00
tooomm
ee154da598 clean transifex translations up (#2566) 2017-04-03 16:35:10 -04:00
Zach H
b3c1a87f60 better bool checking (#2564) 2017-04-01 21:29:23 -04:00
Mark McDonald
9cbae8c707 Decklist testing (#2537) 2017-04-01 01:24:16 -04:00
1823 changed files with 398832 additions and 150079 deletions

19
.ci/Arch/Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
from archlinux:latest
RUN pacman --sync --refresh --sysupgrade --needed --noconfirm \
base-devel \
ccache \
cmake \
git \
gtest \
mariadb-libs \
ninja \
protobuf \
qt6-base \
qt6-imageformats \
qt6-multimedia \
qt6-svg \
qt6-tools \
qt6-translations \
qt6-websockets \
&& pacman --sync --clean --clean --noconfirm

26
.ci/Debian11/Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
FROM debian:11
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
ccache \
clang-format \
cmake \
file \
g++ \
git \
liblzma-dev \
libmariadb-dev-compat \
libprotobuf-dev \
libqt5multimedia5-plugins \
libqt5sql5-mysql \
libqt5svg5-dev \
libqt5websockets5-dev \
ninja-build \
protobuf-compiler \
qt5-image-formats-plugins \
qtmultimedia5-dev \
qttools5-dev \
qttools5-dev-tools \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

28
.ci/Debian12/Dockerfile Normal file
View File

@@ -0,0 +1,28 @@
FROM debian:12
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
ccache \
clang-format \
cmake \
file \
g++ \
git \
libgl-dev \
liblzma-dev \
libmariadb-dev-compat \
libprotobuf-dev \
libqt6multimedia6 \
libqt6sql6-mysql \
ninja-build \
protobuf-compiler \
qt6-image-formats-plugins \
qt6-l10n-tools \
qt6-multimedia-dev \
qt6-svg-dev \
qt6-tools-dev \
qt6-tools-dev-tools \
qt6-websockets-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

29
.ci/Debian13/Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
FROM debian:13
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
ccache \
clang-format \
cmake \
file \
g++ \
git \
libgl-dev \
liblzma-dev \
libmariadb-dev-compat \
libprotobuf-dev \
libqt6multimedia6 \
libqt6sql6-mysql \
ninja-build \
protobuf-compiler \
qt6-image-formats-plugins \
qt6-l10n-tools \
qt6-multimedia-dev \
qt6-svg-dev \
qt6-tools-dev \
qt6-tools-dev-tools \
qt6-websockets-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

16
.ci/Fedora42/Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
FROM fedora:42
RUN dnf install -y \
ccache \
cmake \
gcc-c++ \
git \
mariadb-devel \
ninja-build \
protobuf-devel \
qt6-{qttools,qtsvg,qtmultimedia,qtwebsockets}-devel \
qt6-qtimageformats \
rpm-build \
xz-devel \
zlib-devel \
&& dnf clean all

16
.ci/Fedora43/Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
FROM fedora:43
RUN dnf install -y \
ccache \
cmake \
gcc-c++ \
git \
mariadb-devel \
ninja-build \
protobuf-devel \
qt6-{qttools,qtsvg,qtmultimedia,qtwebsockets}-devel \
qt6-qtimageformats \
rpm-build \
xz-devel \
zlib-devel \
&& dnf clean all

View File

@@ -0,0 +1,21 @@
FROM debian:11
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
ccache \
clang-format \
cmake \
file \
g++ \
git \
libmariadb-dev-compat \
libprotobuf-dev \
libqt5sql5-mysql \
libqt5websockets5-dev \
ninja-build \
protobuf-compiler \
qttools5-dev \
qttools5-dev-tools \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

View File

@@ -0,0 +1,28 @@
FROM ubuntu:22.04
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
ccache \
clang-format \
cmake \
file \
g++ \
git \
libgl-dev \
liblzma-dev \
libmariadb-dev-compat \
libprotobuf-dev \
libqt6multimedia6 \
libqt6sql6-mysql \
libqt6svg6-dev \
libqt6websockets6-dev \
ninja-build \
protobuf-compiler \
qt6-image-formats-plugins \
qt6-l10n-tools \
qt6-multimedia-dev \
qt6-tools-dev \
qt6-tools-dev-tools \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

View File

@@ -0,0 +1,28 @@
FROM ubuntu:24.04
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
ccache \
clang-format \
cmake \
file \
g++ \
git \
libgl-dev \
liblzma-dev \
libmariadb-dev-compat \
libprotobuf-dev \
libqt6multimedia6 \
libqt6sql6-mysql \
ninja-build \
protobuf-compiler \
qt6-image-formats-plugins \
qt6-l10n-tools \
qt6-multimedia-dev \
qt6-svg-dev \
qt6-tools-dev \
qt6-tools-dev-tools \
qt6-websockets-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

283
.ci/compile.sh Executable file
View File

@@ -0,0 +1,283 @@
#!/bin/bash
# This script is to be used by the ci environment from the project root directory, do not use it from somewhere else.
# Compiles cockatrice inside of a ci environment
# --install runs make install
# --package [<package type>] runs make package, optionally force the type
# --suffix <suffix> renames package with this suffix, requires arg
# --server compiles servatrice
# --test runs tests
# --debug or --release sets the build type ie CMAKE_BUILD_TYPE
# --ccache [<size>] uses ccache and shows stats, optionally provide size
# --dir <dir> sets the name of the build dir, default is "build"
# --target-macos-version <version> sets the min os version - only used for macOS builds
# uses env: BUILDTYPE MAKE_INSTALL MAKE_PACKAGE PACKAGE_TYPE PACKAGE_SUFFIX MAKE_SERVER MAKE_NO_CLIENT MAKE_TEST USE_CCACHE CCACHE_SIZE BUILD_DIR CMAKE_GENERATOR TARGET_MACOS_VERSION
# (correspond to args: --debug/--release --install --package <package type> --suffix <suffix> --server --test --ccache <ccache_size> --dir <dir>)
# exitcode: 1 for failure, 3 for invalid arguments
# Read arguments
while [[ $# != 0 ]]; do
case "$1" in
'--')
shift
;;
'--install')
MAKE_INSTALL=1
shift
;;
'--package')
MAKE_PACKAGE=1
shift
if [[ $# != 0 && ${1:0:1} != - ]]; then
PACKAGE_TYPE="$1"
shift
fi
;;
'--suffix')
shift
if [[ $# == 0 ]]; then
echo "::error file=$0::--suffix expects an argument"
exit 3
fi
PACKAGE_SUFFIX="$1"
shift
;;
'--server')
MAKE_SERVER=1
shift
;;
'--no-client')
MAKE_NO_CLIENT=1
shift
;;
'--test')
MAKE_TEST=1
shift
;;
'--debug')
BUILDTYPE="Debug"
shift
;;
'--release')
BUILDTYPE="Release"
shift
;;
'--ccache')
USE_CCACHE=1
shift
if [[ $# != 0 && ${1:0:1} != - ]]; then
CCACHE_SIZE="$1"
shift
fi
;;
'--vcpkg')
USE_VCPKG=1
shift
;;
'--dir')
shift
if [[ $# == 0 ]]; then
echo "::error file=$0::--dir expects an argument"
exit 3
fi
BUILD_DIR="$1"
shift
;;
'--target-macos-version')
shift
if [[ $# == 0 ]]; then
echo "::error file=$0::--target-macos-version expects an argument"
exit 3
fi
TARGET_MACOS_VERSION="$1"
shift
;;
*)
echo "::error file=$0::unrecognized option: $1"
exit 3
;;
esac
done
set -e
# Setup
./servatrice/check_schema_version.sh
if [[ ! $BUILDTYPE ]]; then
BUILDTYPE=Release
fi
if [[ ! $BUILD_DIR ]]; then
BUILD_DIR="build"
fi
mkdir -p "$BUILD_DIR"
cd "$BUILD_DIR"
# Set minimum CMake Version
export CMAKE_POLICY_VERSION_MINIMUM=3.10
# Add cmake flags
flags=("-DCMAKE_BUILD_TYPE=$BUILDTYPE")
if [[ $MAKE_SERVER ]]; then
flags+=("-DWITH_SERVER=1")
fi
if [[ $MAKE_NO_CLIENT ]]; then
flags+=("-DWITH_CLIENT=0" "-DWITH_ORACLE=0" "-DWITH_DBCONVERTER=0")
fi
if [[ $MAKE_TEST ]]; then
flags+=("-DTEST=1")
fi
if [[ $USE_CCACHE ]]; then
flags+=("-DUSE_CCACHE=1")
if [[ $CCACHE_SIZE ]]; then
# note, this setting persists after running the script
ccache --max-size "$CCACHE_SIZE"
fi
fi
if [[ $PACKAGE_TYPE ]]; then
flags+=("-DCPACK_GENERATOR=$PACKAGE_TYPE")
fi
if [[ $USE_VCPKG ]]; then
flags+=("-DUSE_VCPKG=1")
fi
# Add cmake --build flags
buildflags=(--config "$BUILDTYPE")
function ccachestatsverbose() {
# note, verbose only works on newer ccache, discard the error
local got
if got="$(ccache --show-stats --verbose 2>/dev/null)"; then
echo "$got"
else
ccache --show-stats
fi
}
# Compile
if [[ $RUNNER_OS == macOS ]]; then
if [[ $TARGET_MACOS_VERSION ]]; then
# CMAKE_OSX_DEPLOYMENT_TARGET is a vanilla cmake flag needed to compile to target macOS version
flags+=("-DCMAKE_OSX_DEPLOYMENT_TARGET=$TARGET_MACOS_VERSION")
# vcpkg dependencies need a vcpkg triplet file to compile to the target macOS version
# an easy way is to copy the x64-osx.cmake file and modify it
triplets_dir="/tmp/cmake/triplets"
triplet_version="custom-triplet"
triplet_file="$triplets_dir/$triplet_version.cmake"
arch=$(uname -m)
if [[ $arch == x86_64 ]]; then
arch="x64"
fi
mkdir -p "$triplets_dir"
cp "../vcpkg/triplets/$arch-osx.cmake" "$triplet_file"
echo "set(VCPKG_CMAKE_SYSTEM_VERSION $TARGET_MACOS_VERSION)" >>"$triplet_file"
echo "set(VCPKG_OSX_DEPLOYMENT_TARGET $TARGET_MACOS_VERSION)" >>"$triplet_file"
flags+=("-DVCPKG_OVERLAY_TRIPLETS=$triplets_dir")
flags+=("-DVCPKG_HOST_TRIPLET=$triplet_version")
flags+=("-DVCPKG_TARGET_TRIPLET=$triplet_version")
echo "::group::Generated triplet $triplet_file"
cat "$triplet_file"
echo "::endgroup::"
fi
echo "::group::Signing Certificate"
if [[ -n "$MACOS_CERTIFICATE_NAME" ]]; then
echo "$MACOS_CERTIFICATE" | base64 --decode >"certificate.p12"
security create-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
security default-keychain -s build.keychain
security set-keychain-settings -t 3600 -l build.keychain
security unlock-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
security import certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CI_KEYCHAIN_PWD" build.keychain
echo "macOS signing certificate successfully imported and keychain configured."
else
echo "No signing certificate configured. Skipping set up of keychain in macOS environment."
fi
echo "::endgroup::"
if [[ $MAKE_PACKAGE ]]; then
# Workaround https://github.com/actions/runner-images/issues/7522
# have hdiutil repeat the command 10 times in hope of success
hdiutil_script="/tmp/hdiutil.sh"
# shellcheck disable=SC2016
echo '#!/bin/bash
i=0
while ! hdiutil "$@"; do
if (( ++i >= 10 )); then
echo "Error: hdiutil failed $i times!" >&2
break
fi
sleep 1
done' >"$hdiutil_script"
chmod +x "$hdiutil_script"
flags+=(-DCPACK_COMMAND_HDIUTIL="$hdiutil_script")
fi
elif [[ $RUNNER_OS == Windows ]]; then
# Enable MTT, see https://devblogs.microsoft.com/cppblog/improved-parallelism-in-msbuild/
# and https://devblogs.microsoft.com/cppblog/cpp-build-throughput-investigation-and-tune-up/#multitooltask-mtt
buildflags+=(-- -p:UseMultiToolTask=true -p:EnableClServerMode=true)
fi
if [[ $USE_CCACHE ]]; then
echo "::group::Show ccache stats"
ccachestatsverbose
echo "::endgroup::"
fi
echo "::group::Configure cmake"
cmake --version
echo "Running cmake with flags: ${flags[*]}"
cmake .. "${flags[@]}"
echo "::endgroup::"
echo "::group::Build project"
echo "Running cmake --build with flags: ${buildflags[*]}"
cmake --build . "${buildflags[@]}"
echo "::endgroup::"
if [[ $USE_CCACHE ]]; then
echo "::group::Show ccache stats again"
ccachestatsverbose
echo "::endgroup::"
fi
if [[ $RUNNER_OS == macOS ]]; then
echo "::group::Inspect Mach-O binaries"
for app in cockatrice oracle servatrice dbconverter; do
binary="$GITHUB_WORKSPACE/build/$app/$app.app/Contents/MacOS/$app"
echo "Inspecting $app..."
vtool -show-build "$binary"
file "$binary"
lipo -info "$binary"
echo ""
done
echo "::endgroup::"
fi
if [[ $MAKE_TEST ]]; then
echo "::group::Run tests"
ctest -C "$BUILDTYPE" --output-on-failure
echo "::endgroup::"
fi
if [[ $MAKE_INSTALL ]]; then
echo "::group::Install"
cmake --build . --target install --config "$BUILDTYPE"
echo "::endgroup::"
fi
if [[ $MAKE_PACKAGE ]]; then
echo "::group::Create package"
cmake --build . --target package --config "$BUILDTYPE"
echo "::endgroup::"
if [[ $PACKAGE_SUFFIX ]]; then
echo "::group::Update package name"
cd ..
BUILD_DIR="$BUILD_DIR" .ci/name_build.sh "$PACKAGE_SUFFIX"
echo "::endgroup::"
fi
fi

171
.ci/docker.sh Normal file
View File

@@ -0,0 +1,171 @@
#!/bin/bash
# This script is to be used by the ci environment from the project root directory, do not use it from somewhere else.
# Creates or loads docker images to use in compilation, creates RUN function to start compilation on the docker image.
# <arg> sets the name of the docker image, these correspond to directories in .ci
# --get loads the image from a previously saved image cache, will build if no image is found
# --build builds the image from the Dockerfile in .ci/$NAME
# --save stores the image, if an image was loaded it will not be stored
# --interactive immediately starts the image interactively for debugging
# --set-cache <location> sets the location to cache the image or for ccache
# requires: docker
# uses env: NAME CACHE BUILD GET SAVE INTERACTIVE
# (correspond to args: <name> --set-cache <cache> --build --get --save --interactive)
# sets env: RUN CCACHE_DIR IMAGE_NAME RUN_ARGS RUN_OPTS BUILD_SCRIPT
# exitcode: 1 for failure, 2 for missing dockerfile, 3 for invalid arguments
export BUILD_SCRIPT=".ci/compile.sh"
project_name="cockatrice"
save_extension=".tar.gz"
image_cache="image"
ccache_cache=".ccache"
# Read arguments
while [[ $# != 0 ]]; do
case "$1" in
'--build')
BUILD=1
shift
;;
'--get')
GET=1
shift
;;
'--interactive')
INTERACTIVE=1
shift
;;
'--save')
SAVE=1
shift
;;
'--set-cache')
CACHE=$2
if ! [[ -d $CACHE ]]; then
echo "could not find cache path: $CACHE" >&2
return 3
fi
shift 2
;;
*)
if [[ ${1:0:1} == - ]]; then
echo "unrecognized option: $1"
return 3
fi
NAME="$1"
shift
;;
esac
done
# Setup
if ! [[ $NAME ]]; then
echo "no build name given" >&2
return 3
fi
export IMAGE_NAME="${project_name,,}_${NAME,,}" # lower case
docker_dir=".ci/$NAME"
if ! [[ -r $docker_dir/Dockerfile ]]; then
echo "could not find Dockerfile in $docker_dir" >&2
return 2 # even if the image is cached, we do not want to run if there is no way to build this image
fi
if ! [[ $CACHE ]]; then
echo "cache dir is not set!" >&2
CACHE="$(mktemp -d)"
echo "set cache dir to $CACHE" >&2
fi
if ! [[ -d $CACHE ]]; then
echo "could not find cache dir: $CACHE" >&2
mkdir -p "$CACHE"
unset GET # the dir is empty
fi
if [[ $GET || $SAVE ]]; then
img_dir="$CACHE/$image_cache"
img_save="$img_dir/$IMAGE_NAME$save_extension"
if ! [[ -d $img_dir ]]; then
echo "could not find image dir: $img_dir" >&2
mkdir -p "$img_dir"
fi
fi
export CCACHE_DIR="$CACHE/$ccache_cache"
if ! [[ -d $CCACHE_DIR ]]; then
echo "could not find ccache dir: $CCACHE_DIR" >&2
mkdir -p "$CCACHE_DIR"
fi
# Get the docker image from previously stored save
if [[ $GET ]]; then
if [[ $img_save ]] && docker load --input "$img_save"; then
echo "loaded image"
docker images
unset BUILD # do not overwrite the loaded image with build
unset SAVE # do not overwrite the stored image with the same image
if [[ $(find "$CCACHE_DIR" -type f -print -quit) ]]; then # check contents of ccache
echo "setting ccache to readonly"
export RUN_ARGS="$RUN_ARGS -e CCACHE_READONLY=1 -e CCACHE_NOSTATS=1" # do not overwrite ccache
else
echo "ccache is empty: $(find "$CCACHE_DIR")" >&2
fi
else
echo "could not load cached image, building instead" >&2
BUILD=1
fi
fi
# Build the docker image from dockerfile
if [[ $BUILD ]]; then
if docker build --tag "$IMAGE_NAME" "$docker_dir"; then
echo "built image"
docker images
else
echo "could not build image $IMAGE_NAME" >&2
return 1
fi
fi
# Save docker image to cache (compressed)
if [[ $SAVE ]]; then
if [[ $img_save ]] && docker save --output "$img_save" "$IMAGE_NAME"; then
echo "saved image to: $img_save"
else
echo "could not save image $IMAGE_NAME" >&2
fi
fi
# Set compile function, runs the compile script on the image, passes arguments to the script
# shellcheck disable=2120
function RUN ()
{
echo "running image:"
if [[ $(docker images) =~ $IMAGE_NAME ]]; then
local args=(--mount "type=bind,source=$PWD,target=/src")
args+=(--workdir "/src")
args+=(--user "$(id -u):$(id -g)")
if [[ $CCACHE_DIR ]]; then
args+=(--mount "type=bind,source=$CCACHE_DIR,target=/.ccache")
args+=(--env "CCACHE_DIR=/.ccache")
fi
if [[ -n "$CMAKE_GENERATOR" ]]; then
args+=(--env "CMAKE_GENERATOR=$CMAKE_GENERATOR")
fi
# shellcheck disable=2086
docker run "${args[@]}" $RUN_ARGS "$IMAGE_NAME" bash "$BUILD_SCRIPT" $RUN_OPTS "$@"
return $?
else
echo "could not find docker image: $IMAGE_NAME" >&2
return 3
fi
}
# for debugging, start the docker image interactively instead of building
# starts immediately, does not require sourcing or RUN
if [[ $INTERACTIVE ]]; then
export BUILD_SCRIPT="-i"
export RUN_ARGS="$RUN_ARGS -it"
# shellcheck disable=2119
RUN
fi

79
.ci/lint_cpp.sh Executable file
View File

@@ -0,0 +1,79 @@
#!/bin/bash
# fetch master branch
git fetch origin master
# unshallow if needed
echo "Finding merge base"
if ! git merge-base origin/master HEAD; then
echo "Could not find merge base, unshallowing repo"
git fetch --unshallow
fi
# Check formatting using format.sh
echo "Checking your code using format.sh..."
diff="$(./format.sh --diff --cmake --shell --print-version --branch origin/master)"
err=$?
sep="
----------
"
used_version="${diff%%"$sep"*}"
diff="${diff#*"$sep"}"
changes_to_make="${diff%%"$sep"*}"
files_to_edit="${diff#*"$sep"}"
case $err in
1)
cat <<EOM
***********************************************************
*** ***
*** Your code does not comply with our style guide. ***
*** ***
*** Please correct it or run the "format.sh" script. ***
*** Then commit and push those changes to this branch. ***
*** Check our CONTRIBUTING.md file for more details. ***
*** ***
*** Thank you ❤️ ***
*** ***
***********************************************************
Used version:
$used_version
Affected files:
$files_to_edit
The following changes should be made:
$changes_to_make
Exiting...
EOM
exit 2
;;
0)
cat <<EOM
***********************************************************
*** ***
*** Your code complies with our style guide! ***
*** ***
*** Awesome 👍 ***
*** ***
***********************************************************
Used version:
$used_version
Exiting...
EOM
exit 0
;;
*)
echo "Something went wrong in our formatting checks: format.sh returned $err" >&2
;;
esac

17
.ci/macos.entitlements Normal file
View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<false/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.disable-executable-page-protection</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
</dict>
</plist>

55
.ci/name_build.sh Executable file
View File

@@ -0,0 +1,55 @@
#!/bin/bash
# used by the ci to rename build artifacts
# renames the file to [original name][SUFFIX].[original extension]
# where SUFFIX is either available in the environment or as the first arg
# if MAKE_ZIP is set instead a zip is made
# expected to be run in the build directory unless BUILD_DIR is set
# adds output to GITHUB_OUTPUT
builddir="${BUILD_DIR:=.}"
findrx="Cockatrice-*.*"
if [[ $1 ]]; then
SUFFIX="$1"
fi
# check env
if [[ ! $SUFFIX ]]; then
echo "::error file=$0::SUFFIX is missing"
exit 2
fi
set -e
# find file
found="$(find "$builddir" -maxdepth 1 -type f -name "$findrx" -print -quit)"
path="${found%/*}" # remove all after last /
file="${found##*/}" # remove all before last /
if [[ ! $file ]]; then
echo "::error file=$0::could not find package"
exit 1
fi
oldpwd="$PWD"
if ! cd "$path"; then
echo "::error file=$0::could not get file path"
exit 1
fi
# set filename
name="${file%.*}" # remove all after last .
new_name="$name$SUFFIX."
if [[ $MAKE_ZIP ]]; then
filename="${new_name}zip"
echo "creating zip '$filename' from '$file'"
zip "$filename" "$file"
else
extension="${file##*.}" # remove all before last .
filename="$new_name$extension"
echo "renaming '$file' to '$filename'"
mv "$file" "$filename"
fi
cd "$oldpwd"
relative_path="$path/$filename"
ls -l "$relative_path"
echo "path=$relative_path" >>"$GITHUB_OUTPUT"
echo "name=$filename" >>"$GITHUB_OUTPUT"

113
.ci/prep_release.sh Executable file
View File

@@ -0,0 +1,113 @@
#!/bin/bash
# sets the properties of ci releases
# this doesn't have to be 100% foolproof
# the releases are first made as drafts and will be vetted by a human
# it just has to provide a template
# this requires the repo to be unshallowed
# adds output to GITHUB_OUTPUT
template_path=".ci/release_template.md"
body_path="/tmp/release.md"
beta_regex='beta'
name_regex='set\(GIT_TAG_RELEASENAME "([[:print:]]+)")'
whitespace='^\s*$'
if [[ $1 ]]; then
TAG="$1"
fi
# check env
if [[ ! $TAG ]]; then
echo "::error file=$0::TAG is missing"
exit 2
fi
# create title
if [[ $TAG =~ $beta_regex ]]; then
echo "is_beta=yes" >>"$GITHUB_OUTPUT"
title="$TAG"
echo "creating beta release '$title'"
elif [[ ! $(cat CMakeLists.txt) =~ $name_regex ]]; then
echo "::error file=$0::could not find releasename in CMakeLists.txt"
exit 1
else
echo "is_beta=no" >>"$GITHUB_OUTPUT"
name="${BASH_REMATCH[1]}"
version="${TAG##*-}"
title="Cockatrice $version: $name"
no_beta=1
echo "friendly_name=$name" >>"$GITHUB_OUTPUT"
echo "creating full release '$title'"
fi
echo "title=$title" >>"$GITHUB_OUTPUT"
# add release notes template
if [[ $no_beta ]]; then
body="$(cat "$template_path")"
if [[ ! $body ]]; then
echo "::warning file=$0::could not find release template"
fi
body="${body//--REPLACE-WITH-RELEASE-TITLE--/$title}"
else
body="--REPLACE-WITH-COMMIT-COUNT-- commits have been included over the previous --REPLACE-WITH-PREVIOUS-RELEASE-TYPE--
<details>
<summary><b>show changes</b></summary>
--REPLACE-WITH-GENERATED-LIST--
</details>"
fi
# add git log to release notes
all_tags="
$(git tag)" # tags are ordered alphabetically
before="${all_tags%%
"$TAG"*}" # strip line with current tag an all lines after it
# note the extra newlines are needed to always have a last line
if [[ $all_tags == "$before" ]]; then
echo "::warning file=$0::could not find current tag"
else
while
previous="${before##*
}" # get the last line
# skip this tag if this is a full release and it's a beta or if empty
[[ $no_beta && $previous =~ $beta_regex || ! $previous ]]
do
beta_list+=" $previous" # add to list of skipped betas
next_before="${before%
*}" # strip the last line
if [[ $next_before == "$before" ]]; then
unset previous
break
fi
before="$next_before"
done
if [[ $previous ]]; then
if generated_list="$(git log "$previous..$TAG" --pretty="- %s")"; then
count="$(git rev-list --count "$previous..$TAG")"
[[ $previous =~ $beta_regex ]] && previousreleasetype="beta release" || previousreleasetype="full release"
echo "adding list of commits to release notes:"
echo "'$previous' to '$TAG' ($count commits)"
# --> is the markdown comment escape sequence, emojis are way better
generated_list="${generated_list//-->/→}"
body="${body//--REPLACE-WITH-GENERATED-LIST--/$generated_list}"
body="${body//--REPLACE-WITH-COMMIT-COUNT--/$count}"
body="${body//--REPLACE-WITH-PREVIOUS-RELEASE-TAG--/$previous}"
body="${body//--REPLACE-WITH-PREVIOUS-RELEASE-TYPE--/$previousreleasetype}"
if [[ $beta_list =~ $whitespace ]]; then
beta_list="-n there are no betas to delete!"
else
echo "the following betas should be deleted after publishing:"
echo "$beta_list"
fi
body="${body//--REPLACE-WITH-BETA-LIST--/$beta_list}"
else
echo "::warning file=$0::failed to produce git log"
fi
else
echo "::warning file=$0::could not find previous tag"
fi
fi
# write to file
echo "body_path=$body_path" >>"$GITHUB_OUTPUT"
echo "$body" >"$body_path"

102
.ci/release_template.md Normal file
View File

@@ -0,0 +1,102 @@
<!-- this template comes from .ci/release_template.md -->
<!-- Don't forget to delete the previous betas after publishing this!
git push -d origin --REPLACE-WITH-BETA-LIST--
-->
<!-- This list of binaries should be updated every time the CI is changed to include all targets -->
<pre>
Available pre-compiled binaries for installation:
<b>Windows</b>
• <kbd>Windows 10+</kbd>
• <kbd>Windows 7+</kbd>
<b>macOS</b>
• <kbd>macOS 15+</kbd> <sub><i>Sequoia</i></sub> <sub>Apple M</sub>
• <kbd>macOS 14+</kbd> <sub><i>Sonoma</i></sub> <sub>Apple M</sub>
• <kbd>macOS 13+</kbd> <sub><i>Ventura</i></sub> <sub>Intel</sub>
<b>Linux</b>
• <kbd>Ubuntu 24.04 LTS</kbd> <sub><i>Noble Numbat</i></sub>
• <kbd>Ubuntu 22.04 LTS</kbd> <sub><i>Jammy Jellyfish</i></sub>
• <kbd>Debian 13</kbd> <sub><i>Trixie</i></sub>
• <kbd>Debian 12</kbd> <sub><i>Bookworm</i></sub>
• <kbd>Debian 11</kbd> <sub><i>Bullseye</i></sub>
• <kbd>Fedora 43</kbd>
• <kbd>Fedora 42</kbd>
<sub>We are also packaged in <kbd>Arch Linux</kbd>'s <a href="https://archlinux.org/packages/extra/x86_64/cockatrice">official extra repository</a>, courtesy of @FFY00.</sub>
<sub>General Linux support is available via a <kbd>flatpak</kbd> package at <a href="https://flathub.org/apps/io.github.Cockatrice.cockatrice">Flathub</a>!</sub>
</pre>
## General Notes
We're pleased to announce the newest official release: <kbd>--REPLACE-WITH-RELEASE-TITLE--</kbd>
We hope you enjoy the changes made! All improvements with their corresponding tickets since the last version of Cockatrice are listed in the changelog below.
If you ever encounter a bug, have a suggestion or idea, or feel a need for a developer to look into something, please feel free to [open a ticket](https://github.com/Cockatrice/Cockatrice/issues). ([How to create a Ticket for Cockatrice](https://github.com/Cockatrice/Cockatrice/wiki/How-to-Create-a-GitHub-Ticket-Regarding-Cockatrice))
For basic information related to the app and getting started, please take a look at our official site: **https://cockatrice.github.io**
If you'd like to help and contribute to Cockatrice in any way, check out our [README](https://github.com/Cockatrice/Cockatrice#contribute).
We're always available to answer questions you may have on how the program works and how you can provide a meaningful contribution.
## Upgrading Cockatrice
<!-- this optional section puts a warning banner for problems with updating
> [!IMPORTANT]
> **With this release, we no longer provide a ready-to-install binary for:**
> --DEPRECATED-OS-HERE--
-->
Run the internal software updater: <kbd>Help → Check for Client Updates</kbd>
Don't forget to update your card database right after! (<kbd>Help → Check for Card Updates...</kbd>)
## Changelog
<!--
This list is generated and should be moved to their respective header and
possibly edited a little.
Append PR numbers of fixups to their main PR to keep the list coherent.
Put the quantity of remaining PR's below the highlights section.
Remove empty headers when done.
--REPLACE-WITH-GENERATED-LIST--
-->
<!-- Highlights of the release -->
### 🔖 Highlights:
### ✨ New Features:
### 🐛 Fixed Bugs / Resolved Issues:
<!-- Complete list of changes (foldable) -->
<details>
<summary>
<b>Show all changes</b> (--REPLACE-WITH-COMMIT-COUNT-- commits)
</summary>
### User Interface
### Under the Hood
### Oracle
### Servatrice
### Webatrice
</details>
## Translations
- **Thanks for over 300 people contributing to 20+ different languages up to now!**
- Without the help of the community we couldn't offer that great language support... keep up the good work!
- It's actually very easy to join and help for yourself - find out more here:
- [Help us Translate Cockatrice into your native language!](https://github.com/Cockatrice/Cockatrice/wiki/Translation-FAQ)
## Special Thanks
<!-- Personalise this a bit! -->
It's amazing that so many people contribute their time, knowledge, code, testing and more to the project.
We'd like to thank the entire Cockatrice community for their efforts! 🙏
<!-- We'd like to especially recognize @ZeldaZach, --ADD-CONTRIBUTORS-HERE-- for their help in preparing so many amazing new features for the user base. -->

View File

@@ -0,0 +1,58 @@
#!/bin/bash
# ci script to update translation files
# usage:
# $0 cockatrice/cockatrice_en@source.ts cockatrice/src common
# or
# FILE="cockatrice/cockatrice_en@source.ts"
# DIRS="cockatrice/src common"
# $0
# note: directories can't contain spaces
# check parameters
if [[ ! $FILE ]]; then
FILE="$1"
shift
fi
if [[ ! $FILE ]]; then
echo "no output file selected" >&2
exit 2;
fi
if [[ ! $DIRS ]]; then
DIRS="$*"
fi
if [[ ! $DIRS ]]; then
echo "no source directories selected to translate" >&2
exit 2;
fi
if [[ ! -e $FILE ]]; then
echo "output file does not exist at: $FILE" >&2
exit 3;
fi
# print version
if ! lupdate -version; then
echo "failed to run lupdate" >&2
exit 4;
fi
# run lupdate, duplicating the output in stderr and saving it
# for convenience we ignore that $DIRS will be split on spaces
# shellcheck disable=SC2086
if ! got="$(lupdate $DIRS -ts "$FILE" | tee /dev/stderr)"; then
echo "failed to update $FILE with $DIRS" >&2
exit 4;
fi
# trim output
# the line we are interested in is:
# Found xxx source text(s) (x new and xxx already existing)
output="${got##* source text(s) (}" # get stuff in between brackets
output="${output%%)*}" # trim everything after first )
if [[ $output == "$got" ]]; then
echo "could not parse generated output" >&2
exit 4;
fi
# write output to ci environment file
echo "output=$output" >> "$GITHUB_OUTPUT"

View File

@@ -0,0 +1,14 @@
Updated source strings for translations:
- {{ .cockatrice_output }} (Cockatrice)
- {{ .oracle_output }} (Oracle)
<br>
Last changes are based on commit {{ .commit }}.
---
*This PR is automatically generated and updated by the workflow at `.github/workflows/translations-push.yml`. Review [action runs][2].*<br>
*After merging, all changes to the source language are available for translation at [Transifex][1] shortly.*
[1]: https://explore.transifex.com/cockatrice/cockatrice/
[2]: https://github.com/Cockatrice/Cockatrice/actions/workflows/translations-push.yml?query=branch%3Amaster

34
.clang-format Normal file
View File

@@ -0,0 +1,34 @@
IndentWidth: 4
AccessModifierOffset: -4
ColumnLimit: 120
---
Language: Cpp
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: false
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
AllowShortFunctionsOnASingleLine: None
BinPackParameters: false
AllowAllParametersOfDeclarationOnNextLine: false
IndentCaseLabels: true
PointerAlignment: Right
SortIncludes: true
IncludeBlocks: Regroup
StatementAttributeLikeMacros: [emit]
# requires clang-format 16
# RemoveSemicolon: true
---
Language: Proto
AllowShortFunctionsOnASingleLine: None
SpacesInContainerLiterals: false

109
.cmake-format.json Normal file
View File

@@ -0,0 +1,109 @@
{
"format": {
"_help_line_width": [
"How wide to allow formatted cmake files"
],
"line_width": 120,
"_help_tab_size": [
"How many spaces to tab for indent"
],
"tab_size": 2,
"_help_max_subgroups_hwrap": [
"If an argument group contains more than this many sub-groups",
"(parg or kwarg groups) then force it to a vertical layout."
],
"max_subgroups_hwrap": 2,
"_help_max_pargs_hwrap": [
"If a positional argument group contains more than this many",
"arguments, then force it to a vertical layout."
],
"max_pargs_hwrap": 6,
"_help_max_rows_cmdline": [
"If a cmdline positional group consumes more than this many",
"lines without nesting, then invalidate the layout (and nest)"
],
"max_rows_cmdline": 5,
"_help_separate_ctrl_name_with_space": [
"If true, separate flow control names from their parentheses",
"with a space"
],
"separate_ctrl_name_with_space": false,
"_help_separate_fn_name_with_space": [
"If true, separate function names from parentheses with a",
"space"
],
"separate_fn_name_with_space": false,
"_help_dangle_parens": [
"If a statement is wrapped to more than one line, than dangle",
"the closing parenthesis on its own line."
],
"dangle_parens": true,
"_help_dangle_align": [
"If the trailing parenthesis must be 'dangled' on its on",
"line, then align it to this reference: `prefix`: the start",
"of the statement, `prefix-indent`: the start of the",
"statement, plus one indentation level, `child`: align to",
"the column of the arguments"
],
"dangle_align": "prefix",
"_help_min_prefix_chars": [
"If the statement spelling length (including space and",
"parenthesis) is smaller than this amount, then force reject",
"nested layouts."
],
"min_prefix_chars": 4,
"_help_max_prefix_chars": [
"If the statement spelling length (including space and",
"parenthesis) is larger than the tab width by more than this",
"amount, then force reject un-nested layouts."
],
"max_prefix_chars": 10,
"_help_max_lines_hwrap": [
"If a candidate layout is wrapped horizontally but it exceeds",
"this many lines, then reject the layout."
],
"max_lines_hwrap": 2,
"_help_line_ending": [
"What style line endings to use in the output."
],
"line_ending": "auto",
"_help_command_case": [
"Format command names consistently as 'lower' or 'upper' case"
],
"command_case": "lower",
"_help_keyword_case": [
"Format keywords consistently as 'lower' or 'upper' case"
],
"keyword_case": "upper",
"_help_always_wrap": [
"A list of command names which should always be wrapped"
],
"always_wrap": [],
"_help_enable_sort": [
"If true, the argument lists which are known to be sortable",
"will be sorted lexicographically"
],
"enable_sort": true,
"_help_autosort": [
"If true, the parsers may infer whether or not an argument",
"list is sortable (without annotation)."
],
"autosort": true,
"_help_require_valid_layout": [
"By default, if cmake-format cannot successfully fit",
"everything into the desired line-width it will apply the",
"last, most aggressive attempt that it made. If this flag is",
"True, however, cmake-format will print error, exit with non-",
"zero status code, and write-out nothing"
],
"require_valid_layout": false,
"_help_layout_passes": [
"A dictionary mapping layout nodes to a list of wrap",
"decisions. See the documentation for more information."
],
"layout_passes": {}
},
"markup": {
"enable_markup": false
}
}

5
.codacy.yml Normal file
View File

@@ -0,0 +1,5 @@
---
exclude_paths:
- '**/translations/*.ts'
# codacy config documentation: https://support.codacy.com/hc/en-us/articles/115002130625-Codacy-Configuration-File

View File

@@ -1,11 +1,8 @@
.git/
CONTRIBUTING.md
Dockerfile
TODO.md
build/
.github/
.tx/
cockatrice/
doc/
oracle/
sounds/
travis-compile.sh
travis-dependencies.sh
Dockerfile

View File

@@ -1,14 +1,103 @@
# Style Guide #
<!--! @page contributing Contributing -->
&nbsp; [Introduction](#contributing-to-cockatrice) | [Code Style Guide](
#code-style-guide) | [Translations](#translations) | [Release Management](
#release-management)
----
<br>
# Contributing to Cockatrice #
First off, thanks for taking the time and considering to lend a helping hand to our project! 🎉 ❤ ️✨
> [!NOTE]
> The following is a set of guidelines for contributing to Cockatrice.
> These are mostly guidelines, not rules. Use your best judgment, and feel free to
> propose changes to this document in a pull request.
>
> [![Discord](
> https://img.shields.io/discord/314987288398659595?label=Discord&logo=discord&logoColor=white)](
> https://discord.gg/3Z9yzmA)
> If you'd like to ask questions, get advice, or just want to say "Hi",
> the Cockatrice Development Team uses [Discord](https://discord.gg/ZASRzKu)
> for communications and you can reach out in the `#dev` channel.
# Recommended Setups #
For those developers on **Linux** or **macOS** environment, many of our
developers like working with a nifty program called [CLion](
https://www.jetbrains.com/clion/). The program is a great asset and one of the
best tools you'll find on these systems.
Developers on **Windows** systems tend to find [Visual Studio](
https://www.visualstudio.com/) the best tool for the job.
But you're welcomed to use any IDE you enjoy most of course!
# Code Style Guide #
### Formatting and continuous integration (CI) ###
We use a separate job on the CI to check your code for formatting issues. If
your pull request failed the test, you can check the output on the checks tab.
It's the first job called "linter", you can click the "Check code formatting"
step to see the output of the test.
The message will look like this:
```
***********************************************************
*** ***
*** Your code does not comply with our style guide. ***
*** ***
*** Please correct it or run the "format.sh" script. ***
*** Then commit and push those changes to this branch. ***
*** Check our CONTRIBUTING.md file for more details. ***
*** ***
*** Thank you ❤️ ***
*** ***
***********************************************************
```
The CONTRIBUTING.md file mentioned in that message is the file you are
currently reading. Please see [this section](#formatting) below for full
information on our formatting guidelines.
### Compatibility ###
Cockatrice is compiled on all platform using C++11, even if the majority of the
code is written in C++03.
Cockatrice is currently compiled on all platforms using <kbd>C++20</kbd>.
You'll notice <kbd>C++03</kbd> code throughout the codebase. Please feel free
to help convert it over!
For consistency, use Qt data structures where possible, such as `QString` over
`std::string` or `QList` over `std::vector`.
For consistency, we use Qt data structures where possible. For example,
`QString` over `std::string` and `QList` over `std::vector`.
### Header files ###
Do not use old C style casts in new code, instead use a [`static_cast<>`](
https://en.cppreference.com/w/cpp/language/static_cast)
or other appropriate conversion.
### Formatting ###
The handy tool `clang-format` can format your code for you, it is available for
almost any environment. A special [`.clang-format`](
https://github.com/Cockatrice/Cockatrice/blob/master/.clang-format) configuration file is
included in the project and is used to format your code.
We've also included a bash script, `format.sh`, that will use clang-format to
format all files in your PR in one go. Use `./format.sh --help` to show a full
help page.
To run clang-format on a single source file simply use the command
`clang-format -i <filename>` to format it in place. (Some systems install
clang-format with a specific version number appended,
`find /usr/bin -name clang-format*` should find it for you)
See the [clang-format documentation](
https://clang.llvm.org/docs/ClangFormat.html) for more information about the tool.
#### Header Files ####
Use header files with the extension `.h` and source files with the extension
`.cpp`.
@@ -18,83 +107,107 @@ Use header guards in the form of `FILE_NAME_H`.
Simple functions, such as getters, may be written inline in the header file,
but other functions should be written in the source file.
Keep library includes and project includes grouped together. So this is okay:
Group project includes first, followed by library includes. All in alphabetic order.
Like this:
```c++
// Good:
#include <QList>
#include <QString>
#include "card.h"
#include "deck.h"
// Good:
// Good
#include "card.h"
#include "deck.h"
#include <QList>
#include <QString>
// Bad:
// Bad
#include <QList>
#include "card.h"
#include <QString>
#include "deck.h"
// Bad
#include "card.h"
#include "deck.h"
#include <QString>
#include <QList>
```
### Naming ###
#### Naming ####
Use `UpperCamelCase` for classes, structs, enums, etc. and `lowerCamelCase` for
function and variable names.
Member variables aren't decorated in any way. Don't prefix or suffix with
Don't use [Hungarian Notation](
https://en.wikipedia.org/wiki/Hungarian_notation).
Member variables aren't decorated in any way. Don't prefix or suffix them with
underscores, etc.
Use a separate line for each declaration, don't use a single line like this
`int one = 1, two = 2` and instead split them into two lines.
For arguments to constructors which have the same names as member variables,
prefix those arguments with underscores:
```c++
MyClass::MyClass(int _myData)
: myData(_myData)
{}
MyClass::MyClass(int _myData) : myData(_myData)
{
}
```
Pointers and references should be denoted with the `*` or `&` going with the
variable name:
```c++
// Good:
// Good
Foo *foo1 = new Foo;
Foo &foo2 = *foo1;
// Bad:
// Bad
Bar* bar1 = new Bar;
Bar& bar2 = *bar1;
```
Use `nullptr` instead of `NULL` (or `0`) for null pointers.
If you find any usage of the old keywords, we encourage you to fix it.
### Braces ###
#### Braces ####
Use K&R-style braces. Braces for function implementations go on their own
lines, but they go on the same line everywhere else:
Braces should go on their own line except for control statements, the use of
braces around single line statements is preferred.
See the following example:
```c++
int main()
{
if (someCondition) {
doSomething();
{ // function or class: own line
if (someCondition) { // control statement: same line
doSomething(); // single line statement, braces preferred
} else if (someOtherCondition1) { // else goes on the same line as a closing brace
for (int i = 0; i < 100; i++) {
doSomethingElse();
}
} else {
while (someOtherCondition) {
while (someOtherCondition2) {
doSomethingElse();
}
}
}
```
Braces can be omitted for single-statement if's and the like, as long as it is
still legible.
### Tabs ###
#### Indentation and Spacing ####
Use only spaces. Four spaces per tab.
Always indent using 4 spaces, do not use tabs. Opening and closing braces
should be on the same indentation layer, member access specifiers in classes or
structs should not be indented.
### Lines ###
All operators and braces should be separated by spaces, do not add a space next
to the inside of a brace.
Do not have trailing whitespace in your lines.
If multiple lines of code that follow eachother have single line comments
behind them, place all of them on the same indentation level. This indentation
level should be equal to the longest line of code for each of these comments,
without added spacing.
Lines should be 80 characters or less, as a soft limit.
#### Lines ####
Do not leave trailing whitespace on any line. Most IDEs check for this
nowadays and clean it up for you.
Lines should be 120 characters or less. Please break up lines that are too long
into smaller parts, for example at spaces or after opening a brace.
### Memory Management ###
@@ -125,53 +238,136 @@ mutating objects.)
When pointers can't be avoided, try to use a smart pointer of some sort, such
as `QScopedPointer`, or, less preferably, `QSharedPointer`.
### Database migrations ###
### Database Migrations ###
The servatrice database's schema can be found at `servatrice/servatrice.sql`.
Everytime the schema gets modified, some other steps are due:
1. Increment the value of `cockatrice_schema_version` in `servatrice.sql`;
2. Increment the value of `DATABASE_SCHEMA_VERSION` in `servatrice_database_interface.h` accordingly;
3. Create a new migration file inside the `servatrice/migrations` directory named after the new schema version.
4. Run the `servatrice/check_schema_version.sh` script to ensure everything is fine.
The migration file should include the sql statements needed to migrate the database schema and data from the previous to the new version, and an additional statement that updates `cockatrice_schema_version` to the correct value.
2. Increment the value of `DATABASE_SCHEMA_VERSION` in
`servatrice_database_interface.h` accordingly;
3. Create a new migration file inside the `servatrice/migrations` directory
named after the new schema version.
4. Run the `servatrice/check_schema_version.sh` script to ensure everything is
fine.
### Protocol buffer ###
The migration file should include the sql statements needed to migrate the
database schema and data from the previous to the new version, and an
additional statement that updates `cockatrice_schema_version` to the correct
value.
Cockatrice and Servatrice exchange data using binary messages. The syntax of these messages is defined in the `proto` files in the `common/pb` folder. These files defines the way data contained in each message is serialized using Google's [protocol buffer](https://developers.google.com/protocol-buffers/).
Any change to the `proto` file should be taken with caution and tested intensively before being merged, becaus a change to the protocol could make new clients incompatible to the old server and vice versa.
Ensure that the migration produces the expected effects; e.g. if you add a
new column, make sure the migration places it in the same order as
servatrice.sql.
### Translations: introduction ###
### Protocol Buffer ###
Cockatrice and Servatrice exchange data using binary messages. The syntax of
these messages is defined in the `proto` files in the `common/pb` folder. These
files define the way data contained in each message is serialized using
Google's [protocol buffers](https://developers.google.com/protocol-buffers/).
Any change to the `proto` files should be taken with caution and tested
intensively before being merged, because a change to the protocol could make
new clients incompatible to the old server and vice versa.
You can find more information on how we use Protobuf on [our wiki!](
https://github.com/Cockatrice/Cockatrice/wiki/Client-server-protocol)
# Reviewing Pull Requests #
After you have finished your changes to the project you should put them on a
separate branch of your fork on GitHub and open a [pull request](
https://docs.github.com/en/free-pro-team@latest/desktop/contributing-and-collaborating-using-github-desktop/creating-an-issue-or-pull-request
).
Your code will then be automatically compiled by GitHub actions for Linux and
macOS, and by Appveyor for Windows. Additionally GitHub will perform a [Linting
check](#formatting-and-continuous-integration-ci). If any issues come up you
can check their status at the bottom of the pull request page, click on details
to go to the CI website and see the different build logs.
If your pull request passes our tests and has no merge conflicts, it will be
reviewed by our team members. You can then address any requested changes. When
all changes have been approved your pull request will be squashed into a single
commit and merged into the master branch by a team member. Your change will then
be included in the next release 👍
# Translations #
Basic workflow for translations:
1. developer adds a `tr("foo")` string in the code;
2. every few days, a maintainer updates the `*_en.ts files` adding the new strings;
3. Transifex picks up the new files from github every 24 hours;
4. translators translate the new untraslated strings on Transifex;
5. before a release, a maintainer fetches the updated translations from Transifex.
1. Developer adds a `tr("foo")` string in the code;
2. CI updates the `*_en@source.ts files` regularly and creates a PR automatically;
3. Maintainer verifies and merges the change;
4. Transifex picks up the new files from GitHub automatically;
5. Translators translate the new untranslated strings on Transifex;
6. Before a release, a maintainer fetches the newest translations from Transifex.
### Translations (for developers) ###
### Using Translations (for developers) ###
All the user-interface strings inside Cockatrice's source code must be written in
english language. Translations to other languages are managed using [Transifex](https://www.transifex.com/projects/p/cockatrice/).
All user interface strings inside Cockatrice's source code must be written
in English (US).
Translations to other languages are managed using [Transifex](
https://transifex.com/cockatrice/cockatrice/).
If you're about to propose a change that adds or modifies any translatable string
in the code, you don't need to take care of adding the new strings to the
translation files. Every few days, or when a lot of new strings have been added,
someone from the development team will take care of extracing all the new strings,
adding them to the english translation files and making them available to
translators on Transifex.
Adding a new string for translation is as easy as adding the string in the
`tr("")` function, the string will be picked up as translatable automatically
and translated as needed.
For example, setting the text of a label in the way that the string
`"My name is:"` can be translated:
```c++
nameLabel.setText(tr("My name is:"));
```
### Translations (for maintainers) ###
To translate a string that would have plural forms you can add the amount to
the tr() call, also you can add an extra string as a hint for translators:
```c++
QString message = tr("Everyone draws %n cards", "english hint for translators", amount);
```
See [Qt's wiki on translations](
https://doc.qt.io/qt-5/i18n-source-translation.html#handling-plurals)
#### Step 2: updating *_en.ts files ####
If you're about to propose a change that adds or modifies any translatable
string in the code, you don't need to take care of adding the new strings to
the translation files.<br>
We have an automated process to update our language source files on a schedule
and provide the translators on Transifex with the new contents.<br>
Maintainers can also manually trigger this workflow on demand via GitHub Actions.
When new translatable strings have been added to the code, it would be nice to
make them available to translators on Transifex. Every few days, or when a lot
of new strings have been added, a maintainer should take care of extracing all
the new strings and add them to the english translation files.
### Maintaining Translations (for maintainers) ###
To update the english translation files, re-run cmake enabling the appropriate
When new translatable strings have been added to the code, a maintainer has to
make them available to translators on Transifex.
To help with that, we have an automated CI workflow, that regularly looks at the
code in the master branch, extracts all strings and updates dedicated source string
files with any changes. These updates are not commited right away, the CI creates a
PR for reviewing instead.<br>
After approval, our translation tool automatically picks the changes up and deploys
them to our translators. Be mindful when merging only a few changes!
Once a release is planned, or when a lot of strings have been added or changed, a
maintainer can manually trigger a CI run to extract all strings on demand.
<details>
<summary><b>Manually trigger CI run (Workflow Dispatch)</b></summary>
Maintainers can always request the CI to run on demand if it's required.
Go to the `Actions` tab and select our dedicated translation workflow:
https://github.com/Cockatrice/Cockatrice/actions/workflows/translations.yml
You see a "This workflow has a workflow_dispatch event trigger." hint at the top of
the list.<br>
Select `Run workflow` on the right and trigger a run from master branch.
The CI will now check for changed strings and create a PR if there are any updates.
</details>
<details>
<summary><b>Manually update source strings locally</b></summary>
To update the english source files for translation, re-run cmake enabling the appropriate
parameter and then run make:
```sh
cd cockatrice/build
@@ -181,38 +377,119 @@ make
If the parameter has been enabled correctly, when running "make" you should see
a line similar to this one (the numbers may vary):
```sh
[ 76%] Generating ../../cockatrice/translations/cockatrice_en.ts
Updating '../../cockatrice/translations/cockatrice_en.ts'...
[ 76%] Generating ../../cockatrice/translations/cockatrice_en@source.ts
Updating '../../cockatrice/translations/cockatrice_en@source.ts'...
Found 857 source text(s) (8 new and 849 already existing)
```
You should then notice that the following files have uncommitted changes:
cockatrice/translations/cockatrice_en.ts
oracle/translations/oracle_en.ts
cockatrice/translations/cockatrice_en@source.ts
oracle/translations/oracle_en@source.ts
It's now suggested to disable the parameter using:
It is recommended to disable the parameter afterwards using:
```sh
cmake .. -DUPDATE_TRANSLATIONS=OFF
```
Now you are ready to propose your change. Once your change gets merged,
Transifex will pick up the modified files automatically (checks every 24 hours)
and update the interface where translators will be able to translate the new
strings.
Now you are ready to commit your changes and open a PR.
#### Step 5: fetch new translations from Transifex ####
</details>
Before rushing out a new release, it would be nice to fetch the most up to date
Once the changes get merged, Transifex will pick up the modified files
automatically (checked every few hours) and update the web editor where
translators will be able to translate the new strings right in the browser.
### Releasing Translations (for maintainers) ###
Before publishing a new release, a maintainer should fetch the most up to date
translations from Transifex and commit them into the Cockatrice source code.
This can be done manually from the Transifex web interface, but it's quite time
consuming.
As an alternative, you can install the Transifex CLI:
http://docs.transifex.com/developer/client/
We utilize the official GitHub integration to push all languages that are 100%
translated from Transifex to our GitHub repo automatically.
On top, it runs on a quarterly schedule to update changes for incomplete languages.
A synchronisation/update can also be triggered manually from the Transifex web interface
and a translation treshold can be set.
As an alternative, you can install the [Transifex CLI](https://developers.transifex.com/docs/cli).
You'll then be able to use a git-like cli command to push and pull translations
from Transifex to the source code and vice versa.
### Translations (for translators) ###
### Adding Translations (for translators) ###
Please have a look at the specific [FAQ for translators](https://github.com/Cockatrice/Cockatrice/wiki/Translation-FAQ).
As a translator, you can help to translate new strings on [Transifex](
https://www.transifex.com/projects/p/cockatrice/) to your native language.
Please have a look at the specific [FAQ for translators](
https://github.com/Cockatrice/Cockatrice/wiki/Translation-FAQ).
# Release Management #
### Publishing A New Release ###
We use [GitHub Releases](https://github.com/Cockatrice/Cockatrice/releases) to
publish new stable versions and beta releases.
Whenever a git tag is pushed to the repository, GitHub will create a draft
release and upload binaries from our CI automatically.
To create a tag, simply do the following:
```bash
git checkout master
git remote update -p
git pull
git tag $TAG_NAME
git push $UPSTREAM $TAG_NAME
```
You should define the variables as such:
- `$UPSTREAM`: the remote for `git@github.com:Cockatrice/Cockatrice.git`
- `$TAG_NAME` should be formatted as:
- `YYYY-MM-DD-Release-MAJ.MIN.PATCH` for **stable releases**
- `YYYY-MM-DD-Development-MAJ.MIN.PATCH-beta.X` for **beta releases**<br>
With <kbd>MAJ</kbd>.<kbd>MIN</kbd>.<kbd>PATCH</kbd> being the NEXT release version!
This will cause a tagged release to be established on the GitHub repository,
with the binaries being added to the release whenever they are done building in CI.
The release is initially a draft, where the release notes can be edited and after
all is checked and ready, it can be published as GitHub release.
If you use a SemVer tag including "beta", the release that will be created at
GitHub will be marked as a "Pre-release" automatically.
The target of the `.../latest` URL will not be changed in that case, it always
points to the latest stable release and not pre-releases/betas.
If you accidentally push a tag incorrectly (the tag is outdated, you didn't
pull in the latest branch accidentally, you named the tag wrong, etc.) you can
revoke the tag by doing the following:
```bash
git push --delete upstream $TAG_NAME
git tag -d $TAG_NAME
```
You can also do this on GitHub, you'll also want to delete the false release.
In the first lines of [CMakeLists.txt](
https://github.com/Cockatrice/Cockatrice/blob/master/CMakeLists.txt)
there's an hardcoded version number and pretty name used when compiling from
master or custom (not tagged) versions.
While on tagged versions these numbers are overridden by the version numbers
coming from the tag title, it's good practice to increment the ones at CMake
after every full release to stress that master is ahead of the last stable
release.
The preferred flow of operation is:
- Just before a release, make sure the version number in CMakeLists.txt is set
to the same release version you are about to tag.
- This is also the time to change the pretty name in CMakeLists.txt called
`GIT_TAG_RELEASENAME` and commit and push these changes.
- Tag the release following the previously described syntax in order to get it
correctly built and deployed by CI.
- Wait for the configuration step to create the release and update the patch
notes.
- Check on the GitHub Actions page for build progress which should be the top
listed [here](
https://github.com/Cockatrice/Cockatrice/actions?query=event%3Apush+-branch%3Amaster
).
- When the build has been completed, you can verify if all uploaded files on the
draft release are included and hit the publish button.
- After the release is complete, update the CMake version number again to the
next targeted beta version, typically increasing `PROJECT_VERSION_PATCH` by
one.
When releasing a new stable version, all previous beta releases (and tags)
should be deleted as well.
This can be done the same way as revoking tags, mentioned above.

12
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [ZeldaZach]
patreon: mtgjson
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ["paypal.me/zachhalpern"]

View File

@@ -1,11 +0,0 @@
<b>OS:</b>
*Put your operating system here! For example: "Win 7 SP2", "macOS 10.12.3", "Ubuntu 16.10" etc.*
<b>Cockatrice version:</b>
*Put your Cockatrice version number & build date here! For example: "2d53ce9 (2016-02-18)"
You find them inside the app under `Help → About Cockatrice` (Windows & Linux), or `Cockatrice → About Cockatrice` (macOS).*
__________
*Explain your issue/request/suggestion in detail here!*

44
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,44 @@
---
name: "🐛 Bug Report"
about: Report an issue encountered while using Cockatrice
title: ''
type: 'Bug'
labels: ''
assignees: ''
---
<!-- READ THIS BEFORE POSTING
In Cockatrice, go to "Help" → "View Debug Log" and copy all information displayed at the
top (above the separation line "----"), to below "System Information" section in this ticket!
If you can't start Cockatrice to access these details, make
sure to post your OS and the file name of the setup binary instead.
-->
**System Information:**
<!-- Read the hint above on where to find the important information to provide here! -->
<details><summary>Debug Log:</summary>
<!--
In Cockatrice, go to "Help" → "View Debug Log", click the "Copy to clickboard" button and paste the output here.
-->
</details>
_______________________________________________________________________________________
<!-- Explain your issue in detail here! Please attach screenshots if possible. -->
_______________________________________________________________________________________
<!-- Describe the sequence of actions needed to experience the bug. -->
**Steps to reproduce:**
- Do A
- Do B
- Do C ...

9
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,9 @@
blank_issues_enabled: false
contact_links:
- name: 💬 Discord Community (Get help with server issues, e.g. Login)
url: https://discord.gg/3Z9yzmA
about: Need help with using the client? Want to find some games? Try the Discord server!
- name: 🌐 Translations (Help improve the localization of the app)
url: https://explore.transifex.com/cockatrice/cockatrice/
# it is not possible to add a link to the wiki to this description
about: For more information and guidance check our Translation FAQ on our wiki!

View File

@@ -0,0 +1,24 @@
---
name: "💡 Feature Request"
about: Request a new feature for Cockatrice
title: ''
type: 'Feature'
labels: ''
assignees: ''
---
<!--
Please search the issue tracker for similar issues before posting!
If your request is related to another request (but not the same!) list it here
-->
**Similar Requests**
<!-- Describe your feature idea here in detail -->
**Description of New Feature**
<!-- If your feature requires some context, provide it here -->
**Additional Context**

View File

@@ -9,4 +9,4 @@
- and this
## Screenshots
*(simply drag & drop image files directly into this description!)*
<!-- simply drag & drop image files directly into this description! -->

49
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,49 @@
# Configuration options: https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
# # Enable version updates for git submodules
# Not yet possible to bump only on tags or releases, see:
# https://github.com/dependabot/dependabot-core/issues/1639
# https://github.com/dependabot/dependabot-core/issues/2192
# Alternative: Action that updates submodule and can be manually run on demand (workflow_dispatch)
# - package-ecosystem: "gitsubmodule"
# # Look for `.gitmodules` in the `root` directory
# directory: "/"
# # Check for updates once a month
# schedule:
# interval: "monthly"
# # Limit the amout of open PR's (default = 5, disabled = 0, security updates are not impacted)
# open-pull-requests-limit: 1
# # Enable version updates for Docker
# Not yet possible to bump from one LTS version to the next and skip others, see:
# https://github.com/dependabot/dependabot-core/issues/2247
# - package-ecosystem: "docker"
# # Look for a `Dockerfile` in the `root` directory
# directory: "/"
# # Check for updates once a week
# schedule:
# interval: "weekly"
# # Limit the amout of open PR's (default = 5, disabled = 0, security updates are not impacted)
# open-pull-requests-limit: 1
# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
# Directory must be set to "/" to check for workflow files in .github/workflows
directory: "/"
# Check for updates to GitHub Actions once a week
schedule:
interval: "weekly"
# Limit the amout of open PR's (default = 5, disabled = 0, security updates are not impacted)
open-pull-requests-limit: 2
# # Enable version updates for npm
# - package-ecosystem: "npm"
# # Look for `package.json` and `lock` files in the `webclient` subdirectory
# directory: "/webclient"
# # Check the npm registry for updates once a week
# schedule:
# interval: "weekly"
# # Limit the amout of open PR's (default = 5, disabled = 0, security updates are not impacted)
# open-pull-requests-limit: 5

493
.github/workflows/desktop-build.yml vendored Normal file
View File

@@ -0,0 +1,493 @@
name: Build Desktop
permissions:
contents: write
id-token: write
attestations: write
actions: write # needed for ccache action to be able to delete gha caches
on:
push:
branches:
- master
paths:
- '*/**' # matches all files not in root
- '!**.md'
- '!.github/**'
- '!.husky/**'
- '!.tx/**'
- '!doc/**'
- '!webclient/**'
- '.github/workflows/desktop-build.yml'
- 'CMakeLists.txt'
- 'vcpkg.json'
- 'vcpkg'
tags:
- '*'
pull_request:
paths:
- '*/**' # matches all files not in root
- '!**.md'
- '!.github/**'
- '!.husky/**'
- '!.tx/**'
- '!doc/**'
- '!webclient/**'
- '.github/workflows/desktop-build.yml'
- 'CMakeLists.txt'
- 'vcpkg.json'
- 'vcpkg'
# Cancel earlier, unfinished runs of this workflow on the same branch (unless on master)
concurrency:
group: "${{ github.workflow }} @ ${{ github.ref_name }}"
cancel-in-progress: ${{ github.ref_name != 'master' }}
jobs:
configure:
name: Configure
runs-on: ubuntu-latest
outputs:
tag: ${{steps.configure.outputs.tag}}
sha: ${{steps.configure.outputs.sha}}
steps:
- name: Configure
id: configure
shell: bash
run: |
tag_regex='^refs/tags/'
if [[ $GITHUB_EVENT_NAME == pull-request ]]; then # pull request
sha="${{github.event.pull_request.head.sha}}"
elif [[ $GITHUB_REF =~ $tag_regex ]]; then # release
sha="$GITHUB_SHA"
tag="${GITHUB_REF/refs\/tags\//}"
echo "tag=$tag" >>"$GITHUB_OUTPUT"
else # push to branch
sha="$GITHUB_SHA"
fi
echo "sha=$sha" >>"$GITHUB_OUTPUT"
- name: Checkout
if: steps.configure.outputs.tag != null
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Prepare release parameters
id: prepare
if: steps.configure.outputs.tag != null
shell: bash
env:
TAG: ${{steps.configure.outputs.tag}}
run: .ci/prep_release.sh
- name: Create release
if: steps.configure.outputs.tag != null
id: create_release
shell: bash
env:
GH_TOKEN: ${{github.token}}
tag_name: ${{steps.configure.outputs.tag}}
target: ${{steps.configure.outputs.sha}}
release_name: ${{steps.prepare.outputs.title}}
body_path: ${{steps.prepare.outputs.body_path}}
prerelease: ${{steps.prepare.outputs.is_beta}}
run: |
if [[ $prerelease == yes ]]; then
args="--prerelease"
fi
gh release create "$tag_name" --draft --verify-tag $args \
--target "$target" --title "$release_name" \
--notes-file "$body_path"
build-linux:
strategy:
fail-fast: false
matrix:
# These names correspond to the files in ".ci/$distro$version"
include:
- distro: Arch
package: skip # We are packaged in Arch already
allow-failure: yes
- distro: Debian
version: 11
package: DEB
- distro: Servatrice_Debian
version: 11
package: DEB
test: skip
server_only: yes
- distro: Debian
version: 12
package: DEB
test: skip # Running tests on all distros is superfluous
- distro: Debian
version: 13
package: DEB
- distro: Fedora
version: 42
package: RPM
test: skip # Running tests on all distros is superfluous
- distro: Fedora
version: 43
package: RPM
- distro: Ubuntu
version: 22.04
package: DEB
test: skip # Running tests on all distros is superfluous
- distro: Ubuntu
version: 24.04
package: DEB
name: ${{matrix.distro}} ${{matrix.version}}
needs: configure
runs-on: ubuntu-latest
continue-on-error: ${{matrix.allow-failure == 'yes'}}
env:
NAME: ${{matrix.distro}}${{matrix.version}}
CACHE: ${{github.workspace}}/.cache/${{matrix.distro}}${{matrix.version}} # directory for caching docker image and ccache
# Cache size over the entire repo is 10Gi:
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
CCACHE_SIZE: 500M
CMAKE_GENERATOR: 'Ninja'
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Restore compiler cache (ccache)
id: ccache_restore
uses: actions/cache/restore@v4
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
with:
path: ${{env.CACHE}}
key: ccache-${{matrix.distro}}${{matrix.version}}-${{env.BRANCH_NAME}}
restore-keys: ccache-${{matrix.distro}}${{matrix.version}}-
- name: Build ${{matrix.distro}} ${{matrix.version}} Docker image
shell: bash
run: source .ci/docker.sh --build
- name: Build debug and test
if: matrix.test != 'skip'
shell: bash
env:
CMAKE_GENERATOR: '${{env.CMAKE_GENERATOR}}'
run: |
source .ci/docker.sh
RUN --server --debug --test --ccache "$CCACHE_SIZE"
- name: Build release package
id: build
if: matrix.package != 'skip'
shell: bash
env:
BUILD_DIR: build
SUFFIX: '-${{matrix.distro}}${{matrix.version}}'
package: '${{matrix.package}}'
CMAKE_GENERATOR: '${{env.CMAKE_GENERATOR}}'
NO_CLIENT: ${{matrix.server_only == 'yes' && '--no-client' || '' }}
run: |
source .ci/docker.sh
RUN --server --release --package "$package" --dir "$BUILD_DIR" \
--ccache "$CCACHE_SIZE" $NO_CLIENT
.ci/name_build.sh
- name: Save compiler cache (ccache)
if: github.ref == 'refs/heads/master'
uses: actions/cache/save@v4
with:
path: ${{env.CACHE}}
key: ${{ steps.ccache_restore.outputs.cache-primary-key }}
- name: Upload artifact
id: upload_artifact
if: matrix.package != 'skip'
uses: actions/upload-artifact@v5
with:
name: ${{matrix.distro}}${{matrix.version}}-package
path: ${{steps.build.outputs.path}}
if-no-files-found: error
- name: Upload to release
id: upload_release
if: matrix.package != 'skip' && needs.configure.outputs.tag != null
shell: bash
env:
GH_TOKEN: ${{github.token}}
tag_name: ${{needs.configure.outputs.tag}}
asset_path: ${{steps.build.outputs.path}}
asset_name: ${{steps.build.outputs.name}}
run: gh release upload "$tag_name" "$asset_path#$asset_name"
- name: Attest binary provenance
id: attestation
if: steps.upload_release.outcome == 'success'
uses: actions/attest-build-provenance@v3
with:
subject-name: ${{steps.build.outputs.name}}
subject-digest: sha256:${{ steps.upload_artifact.outputs.artifact-digest }}
- name: Verify binary attestation
if: steps.attestation.outcome == 'success'
shell: bash
env:
GH_TOKEN: ${{github.token}}
run: gh attestation verify ${{steps.build.outputs.path}} -R Cockatrice/Cockatrice
build-vcpkg:
strategy:
fail-fast: false
matrix:
include:
- os: macOS
target: 13
runner: macos-15-intel
soc: Intel
xcode: "16.4"
type: Release
override_target: 13
make_package: 1
package_suffix: "-macOS13_Intel"
artifact_name: macOS13_Intel-package
qt_version: 6.6.*
qt_arch: clang_64
qt_modules: qtimageformats qtmultimedia qtwebsockets
cache_qt: false # qt caches take too much space for macOS (1.1Gi)
cmake_generator: Ninja
use_ccache: 1
- os: macOS
target: 14
runner: macos-14
soc: Apple
xcode: "15.4"
type: Release
make_package: 1
package_suffix: "-macOS14"
artifact_name: macOS14-package
qt_version: 6.6.*
qt_arch: clang_64
qt_modules: qtimageformats qtmultimedia qtwebsockets
cache_qt: false
cmake_generator: Ninja
use_ccache: 1
- os: macOS
target: 15
runner: macos-15
soc: Apple
xcode: "16.4"
type: Release
make_package: 1
package_suffix: "-macOS15"
artifact_name: macOS15-package
qt_version: 6.6.*
qt_arch: clang_64
qt_modules: qtimageformats qtmultimedia qtwebsockets
cache_qt: false
cmake_generator: Ninja
use_ccache: 1
- os: macOS
target: 15
runner: macos-15
soc: Apple
xcode: "16.4"
type: Debug
qt_version: 6.6.*
qt_arch: clang_64
qt_modules: qtimageformats qtmultimedia qtwebsockets
cache_qt: false
cmake_generator: Ninja
use_ccache: 1
- os: Windows
target: 7
runner: windows-2022
type: Release
make_package: 1
package_suffix: "-Win7"
artifact_name: Windows7-installer
qt_version: 5.15.*
qt_arch: win64_msvc2019_64
cache_qt: true
cmake_generator: "Visual Studio 17 2022"
cmake_generator_platform: x64
- os: Windows
target: 10
runner: windows-2022
type: Release
make_package: 1
package_suffix: "-Win10"
artifact_name: Windows10-installer
qt_version: 6.6.*
qt_arch: win64_msvc2019_64
qt_modules: qtimageformats qtmultimedia qtwebsockets
cache_qt: true
cmake_generator: "Visual Studio 17 2022"
cmake_generator_platform: x64
name: ${{matrix.os}} ${{matrix.target}}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }}
needs: configure
runs-on: ${{matrix.runner}}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
- name: Add msbuild to PATH
if: matrix.os == 'Windows'
id: add-msbuild
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x64
# Using jianmingyong/ccache-action to setup ccache without using brew
# It tries to download a binary of ccache from GitHub Release and falls back to building from source if it fails
- name: Setup ccache
if: matrix.use_ccache == 1
uses: jianmingyong/ccache-action@v1
with:
install-type: "binary"
ccache-key-prefix: ccache-${{matrix.runner}}-${{matrix.soc}}-${{matrix.type}}
max-size: 500M
gh-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Qt ${{matrix.qt_version}}
uses: jurplel/install-qt-action@v4
with:
version: ${{matrix.qt_version}}
arch: ${{matrix.qt_arch}}
modules: ${{matrix.qt_modules}}
cache: ${{matrix.cache_qt}}
- name: Setup vcpkg cache
id: vcpkg-cache
uses: TAServers/vcpkg-cache@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
# uses environment variables, see compile.sh for more details
- name: Build Cockatrice
id: build
shell: bash
env:
BUILDTYPE: '${{matrix.type}}'
MAKE_PACKAGE: '${{matrix.make_package}}'
PACKAGE_SUFFIX: '${{matrix.package_suffix}}'
CMAKE_GENERATOR: ${{matrix.cmake_generator}}
CMAKE_GENERATOR_PLATFORM: ${{matrix.cmake_generator_platform}}
USE_CCACHE: ${{matrix.use_ccache}}
VCPKG_DISABLE_METRICS: 1
VCPKG_BINARY_SOURCES: 'clear;files,${{ steps.vcpkg-cache.outputs.path }},readwrite'
# macOS-specific environment variables, will be ignored on Windows
MACOS_CERTIFICATE: ${{ secrets.PROD_MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.PROD_MACOS_CERTIFICATE_PWD }}
MACOS_CERTIFICATE_NAME: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }}
MACOS_CI_KEYCHAIN_PWD: ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}
DEVELOPER_DIR: '/Applications/Xcode_${{matrix.xcode}}.app/Contents/Developer'
TARGET_MACOS_VERSION: ${{ matrix.override_target }}
run: .ci/compile.sh --server --test --vcpkg
- name: Sign app bundle
if: matrix.os == 'macOS' && matrix.make_package && (github.ref == 'refs/heads/master' || needs.configure.outputs.tag != null)
env:
MACOS_CERTIFICATE_NAME: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }}
MACOS_CI_KEYCHAIN_PWD: ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}
run: |
if [[ -n "$MACOS_CERTIFICATE_NAME" ]]
then
security unlock-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
/usr/bin/codesign --sign="$MACOS_CERTIFICATE_NAME" --entitlements=".ci/macos.entitlements" --options=runtime --force --deep --timestamp --verbose ${{steps.build.outputs.path}}
fi
- name: Notarize app bundle
if: matrix.os == 'macOS' && matrix.make_package && (github.ref == 'refs/heads/master' || needs.configure.outputs.tag != null)
env:
MACOS_NOTARIZATION_APPLE_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
MACOS_NOTARIZATION_TEAM_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
MACOS_NOTARIZATION_PWD: ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
run: |
if [[ -n "$MACOS_NOTARIZATION_APPLE_ID" ]]
then
# Store the notarization credentials so that we can prevent a UI password dialog from blocking the CI
echo "Create keychain profile"
xcrun notarytool store-credentials "notarytool-profile" --apple-id "$MACOS_NOTARIZATION_APPLE_ID" --team-id "$MACOS_NOTARIZATION_TEAM_ID" --password "$MACOS_NOTARIZATION_PWD"
# We can't notarize an app bundle directly, but we need to compress it as an archive.
# Therefore, we create a zip file containing our app bundle, so that we can send it to the
# notarization service
echo "Creating temp notarization archive"
ditto -c -k --keepParent ${{steps.build.outputs.path}} "notarization.zip"
# Here we send the notarization request to the Apple's Notarization service, waiting for the result.
# This typically takes a few seconds inside a CI environment, but it might take more depending on the App
# characteristics. Visit the Notarization docs for more information and strategies on how to optimize it if
# you're curious
echo "Notarize app"
xcrun notarytool submit "notarization.zip" --keychain-profile "notarytool-profile" --wait
# Finally, we need to "attach the staple" to our executable, which will allow our app to be
# validated by macOS even when an internet connection is not available.
echo "Attach staple"
xcrun stapler staple ${{steps.build.outputs.path}}
fi
- name: Upload artifact
id: upload_artifact
if: matrix.make_package
uses: actions/upload-artifact@v5
with:
name: ${{matrix.artifact_name}}
path: ${{steps.build.outputs.path}}
if-no-files-found: error
- name: Upload pdb database
if: matrix.os == 'Windows'
uses: actions/upload-artifact@v5
with:
name: Windows${{matrix.target}}-debug-pdbs
path: |
build/cockatrice/Release/*.pdb
build/servatrice/Release/*.pdb
if-no-files-found: error
- name: Upload to release
id: upload_release
if: needs.configure.outputs.tag != null
shell: bash
env:
GH_TOKEN: ${{github.token}}
tag_name: ${{needs.configure.outputs.tag}}
asset_path: ${{steps.build.outputs.path}}
asset_name: ${{steps.build.outputs.name}}
run: gh release upload "$tag_name" "$asset_path#$asset_name"
- name: Attest binary provenance
id: attestation
if: steps.upload_release.outcome == 'success'
uses: actions/attest-build-provenance@v3
with:
subject-name: ${{steps.build.outputs.name}}
subject-digest: sha256:${{ steps.upload_artifact.outputs.artifact-digest }}
- name: Verify binary attestation
if: steps.attestation.outcome == 'success'
shell: bash
env:
GH_TOKEN: ${{github.token}}
run: gh attestation verify ${{steps.build.outputs.path}} -R Cockatrice/Cockatrice

39
.github/workflows/desktop-lint.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Code Style (C++)
on:
# push trigger not needed for linting, we do not allow direct pushes to master
pull_request:
paths:
- '*/**' # matches all files not in root
- '!**.md'
- '!.ci/**'
- '!.github/**'
- '!.husky/**'
- '!.tx/**'
- '!doc/**'
- '!webclient/**'
- '.ci/lint_cpp.sh'
- '.github/workflows/desktop-lint.yml'
- '.clang-format'
- '.cmake-format.json'
- 'format.sh'
jobs:
format:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 20 # should be enough to find merge base
- name: Install dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends clang-format cmake-format shellcheck
- name: Check code formatting
shell: bash
run: ./.ci/lint_cpp.sh

66
.github/workflows/docker-release.yml vendored Normal file
View File

@@ -0,0 +1,66 @@
name: Build Docker Image
on:
push:
tags:
- '*Release*'
branches:
- master
pull_request:
branches:
- master
paths:
- '.github/workflows/docker-release.yml'
- 'Dockerfile'
jobs:
docker:
name: amd64 & arm64
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Docker metadata
id: metadata
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/cockatrice/servatrice
labels: |
org.opencontainers.image.title=Servatrice
org.opencontainers.image.url=https://cockatrice.github.io/
org.opencontainers.image.description=Server for Cockatrice, a cross-platform virtual tabletop for multiplayer card games
annotations: |
org.opencontainers.image.title=Servatrice
org.opencontainers.image.url=https://cockatrice.github.io/
org.opencontainers.image.description=Server for Cockatrice, a cross-platform virtual tabletop for multiplayer card games
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: github.ref_type == 'tag'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.ref_type == 'tag' }}
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

View File

@@ -0,0 +1,61 @@
name: Generate Docs
on:
push:
tags:
- '*' # Only re-generate docs when a new tagged version is pushed
pull_request:
paths:
- 'doc/doxygen/**'
- '.github/workflows/documentation-build.yml'
- 'Doxyfile'
workflow_dispatch:
env:
COCKATRICE_REF: ${{ github.ref_name }} # Tag name if the commit is tagged, otherwise branch name
jobs:
docs:
name: Doxygen
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Graphviz
run: |
sudo apt-get install -y graphviz
dot -V
- name: Install Doxygen
uses: ssciwr/doxygen-install@v1
with:
version: "1.14.0"
- name: Update Doxygen Configuration
run: |
git diff Doxyfile
doxygen -u Doxyfile
if git diff --quiet Doxyfile; then
echo "::notice::No config changes in Doxyfile detected."
else
echo "::error::Config changes in Doxyfile detected! Please update the file by running 'doxygen -u Doxyfile'."
echo ""
git diff --color=always Doxyfile
exit 1
fi
- name: Generate Documentation
if: always()
run: doxygen Doxyfile
- name: Deploy to cockatrice.github.io
if: github.event_name != 'pull_request'
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.DOCS_DEPLOY_KEY }}
external_repository: Cockatrice/cockatrice.github.io
publish_branch: master
publish_dir: ./docs/html
destination_dir: docs # Docs will live under https://cockatrice.github.io/docs/

73
.github/workflows/translations-pull.yml vendored Normal file
View File

@@ -0,0 +1,73 @@
name: Update Translations
on:
workflow_dispatch:
schedule:
# runs in the middle of each month starting a quarter (UTC) = two weeks after new strings are built
- cron: '0 0 15 1,4,7,10 *'
pull_request:
paths:
- '.tx/**'
- '.github/workflows/translations-pull.yml'
jobs:
translations:
# Do not run the scheduled workflow on forks
if: github.event_name != 'schedule' || github.repository_owner == 'Cockatrice'
name: Pull languages
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Pull translated strings from Transifex
uses: transifex/cli-action@v2
with:
# used config file: https://github.com/Cockatrice/Cockatrice/blob/master/.tx/config
# https://github.com/transifex/cli#pulling-files-from-transifex
token: ${{ secrets.TX_TOKEN }}
args: pull --force --all
- name: Create pull request
if: github.event_name != 'pull_request'
id: create_pr
uses: peter-evans/create-pull-request@v7
with:
add-paths: |
cockatrice/translations/*.ts
oracle/translations/*.ts
webclient/public/locales/*/translation.json
commit-message: Update translation files
# author is the owner of the commit
author: github-actions <github-actions@github.com>
branch: ci-update_translations
delete-branch: true
title: 'Update translations'
body: |
Pulled all translated strings from [Transifex][1].
---
*This PR is automatically generated and updated by the workflow at `.github/workflows/translations-pull.yml`. Review [action runs][2].*<br>
*After merging, all new languages and translations are available in the next build.*
[1]: https://explore.transifex.com/cockatrice/cockatrice/
[2]: https://github.com/Cockatrice/Cockatrice/actions/workflows/translations-pull.yml?query=branch%3Amaster
labels: |
CI
Translation
draft: false
- name: PR Status
if: github.event_name != 'pull_request'
shell: bash
env:
STATUS: ${{ steps.create_pr.outputs.pull-request-operation }}
run: |
if [[ "$STATUS" == "none" ]]; then
echo "PR #${{ steps.create_pr.outputs.pull-request-number }} unchanged!" >> $GITHUB_STEP_SUMMARY
else
echo "PR #${{ steps.create_pr.outputs.pull-request-number }} $STATUS!" >> $GITHUB_STEP_SUMMARY
fi
echo "URL: ${{ steps.create_pr.outputs.pull-request-url }}" >> $GITHUB_STEP_SUMMARY

88
.github/workflows/translations-push.yml vendored Normal file
View File

@@ -0,0 +1,88 @@
name: Update Translation Source
on:
workflow_dispatch:
schedule:
# runs at the start of each quarter (UTC)
- cron: '0 0 1 1,4,7,10 *'
pull_request:
paths:
- '.ci/update_translation_source_strings.sh'
- '.github/workflows/translations-push.yml'
jobs:
translations:
# Do not run the scheduled workflow on forks
if: github.event_name != 'schedule' || github.repository_owner == 'Cockatrice'
name: Push strings
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Install lupdate
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends qttools5-dev-tools
- name: Update Cockatrice translation source
id: cockatrice
shell: bash
run: |
FILE="cockatrice/cockatrice_en@source.ts"
export DIRS="cockatrice/src $(find . -maxdepth 1 -type d -name 'libcockatrice_*')"
FILE="$FILE" DIRS="$DIRS" .ci/update_translation_source_strings.sh
- name: Update Oracle translation source
id: oracle
shell: bash
env:
FILE: 'oracle/oracle_en@source.ts'
DIRS: 'oracle/src'
run: .ci/update_translation_source_strings.sh
- name: Render template
id: template
uses: chuhlomin/render-template@v1
with:
template: .ci/update_translation_source_strings_template.md
vars: |
cockatrice_output: ${{ steps.cockatrice.outputs.output }}
oracle_output: ${{ steps.oracle.outputs.output }}
commit: ${{ github.sha }}
- name: Create pull request
if: github.event_name != 'pull_request'
id: create_pr
uses: peter-evans/create-pull-request@v7
with:
add-paths: |
cockatrice/cockatrice_en@source.ts
oracle/oracle_en@source.ts
commit-message: Update translation source strings
# author is the owner of the commit
author: github-actions <github-actions@github.com>
branch: ci-update_translation_source
delete-branch: true
title: 'Update source strings'
body: ${{ steps.template.outputs.result }}
labels: |
CI
Translation
draft: false
- name: PR Status
if: github.event_name != 'pull_request'
shell: bash
env:
STATUS: ${{ steps.create_pr.outputs.pull-request-operation }}
run: |
if [[ "$STATUS" == "none" ]]; then
echo "PR #${{ steps.create_pr.outputs.pull-request-number }} unchanged!" >> $GITHUB_STEP_SUMMARY
else
echo "PR #${{ steps.create_pr.outputs.pull-request-number }} $STATUS!" >> $GITHUB_STEP_SUMMARY
fi
echo "URL: ${{ steps.create_pr.outputs.pull-request-url }}" >> $GITHUB_STEP_SUMMARY

54
.github/workflows/web-build.yml vendored Normal file
View File

@@ -0,0 +1,54 @@
name: Build Web
on:
push:
branches:
- master
paths:
- '.husky/**'
- 'webclient/**'
- '!**.md'
- '.github/workflows/web-build.yml'
pull_request:
paths:
- '.husky/**'
- 'webclient/**'
- '!**.md'
- '.github/workflows/web-build.yml'
jobs:
build-web:
name: React (Node ${{matrix.node_version}})
runs-on: ubuntu-latest
defaults:
run:
working-directory: webclient
strategy:
fail-fast: false
matrix:
node_version:
- 16
- lts/*
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{matrix.node_version}}
cache: 'npm'
cache-dependency-path: 'webclient/package-lock.json'
- name: Install dependencies
run: npm clean-install
- name: Build app
run: npm run build
- name: Test app
run: npm run test

33
.github/workflows/web-lint.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Code Style (TypeScript)
on:
# push trigger not needed for linting, we do not allow direct pushes to master
pull_request:
paths:
- 'webclient/**'
- '!**.md'
- '.github/workflows/web-lint.yml'
jobs:
ESLint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: webclient
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
cache: 'npm'
cache-dependency-path: 'webclient/package-lock.json'
- name: Install ESLint
run: npm clean-install --ignore-scripts
- name: Run ESLint
run: npm run lint

10
.gitignore vendored
View File

@@ -6,4 +6,12 @@ mysql.cnf
.DS_Store
.idea/
*.aps
cmake-build-debug/
cmake-build*
preferences
compile_commands.json
.vs/
.vscode/
.cache
.gdb_history
cockatrice/resources/config/qtlogging.ini
docs/

View File

@@ -1,186 +0,0 @@
stages:
- build
- deploy
.artifacts: &artifacts
artifacts:
paths:
- build/
.cache: &cache
cache:
key: "$CI_BUILD_NAME"
paths:
- cache/
#================================ DEBIAN-BASED ================================
.build_rc_package_deb: &build_rc_package_deb
stage: build
script:
- mkdir -p build
- cd build
- cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=DEB
- make package -j2
.build_debug_package_deb: &build_debug_package_deb
stage: build
script:
- mkdir -p build
- cd build
- cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=Debug -DCPACK_GENERATOR=DEB
- make package -j2
.deb-artifacts: &artifacts_deb
artifacts:
paths:
- build/*.deb
- build/CMakeFiles/*.log
when: always
#----------------------------------- UBUNTU -----------------------------------
.requirements_16xx: &install_requirements_16xx
before_script:
- apt-get -o dir::cache::archives="cache" update -qq
- apt-get -o dir::cache::archives="cache" install -y build-essential g++ cmake git
- apt-get -o dir::cache::archives="cache" install -y libprotobuf-dev protobuf-compiler
- apt-get -o dir::cache::archives="cache" install -y qt5-default qttools5-dev qttools5-dev-tools
- apt-get -o dir::cache::archives="cache" install -y qtmultimedia5-dev libqt5multimedia5-plugins
- apt-get -o dir::cache::archives="cache" install -y libqt5svg5-dev libqt5sql5-mysql
- apt-get -o dir::cache::archives="cache" install -y libqt5websockets5-dev
.build_1604: &1604
image: ubuntu:16.04
tags:
- linux
- docker
<<: *install_requirements_16xx
<<: *artifacts_deb
<<: *cache
.build_1610: &1610
image: ubuntu:16.10
tags:
- linux
- docker
<<: *install_requirements_16xx
<<: *artifacts_deb
<<: *cache
build_rc_1604:
<<: *1604
<<: *build_rc_package_deb
when: always
build_debug_1604:
<<: *1604
<<: *build_debug_package_deb
when: always
build_rc_1610:
<<: *1610
<<: *build_rc_package_deb
when: always
build_debug_1610:
<<: *1610
<<: *build_debug_package_deb
when: always
allow_failure: true
#----------------------------------- DEBIAN -----------------------------------
.requirements_stretch: &install_requirements_stretch
before_script:
- apt-get -o dir::cache::archives="cache" update -qq
- apt-get -o dir::cache::archives="cache" install -y build-essential g++ cmake git
- apt-get -o dir::cache::archives="cache" install -y qt5-default qtbase5-dev-tools
- apt-get -o dir::cache::archives="cache" install -y qttools5-dev-tools qtmultimedia5-dev
- apt-get -o dir::cache::archives="cache" install -y libqt5svg5-dev libqt5websockets5-dev
- apt-get -o dir::cache::archives="cache" install -y libprotobuf-dev protobuf-compiler
.build_stretch: &stretch
image: debian:stretch
tags:
- linux
- docker
<<: *install_requirements_stretch
<<: *artifacts_deb
<<: *cache
build_rc_stretch:
<<: *stretch
<<: *build_rc_package_deb
when: always
build_debug_stretch:
<<: *stretch
<<: *build_debug_package_deb
when: always
allow_failure: true
#============================== REDHAT-BASED ==================================
.build_rc_package_rpm: &build_rc_package_rpm
stage: build
script:
- mkdir -p build
- cd build
- cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=RPM
- make package -j2
.build_debug_package_rpm: &build_debug_package_rpm
stage: build
script:
- mkdir -p build
- cd build
- cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=Debug -DCPACK_GENERATOR=RPM
- make package -j2
.rpm-artifacts: &artifacts_rpm
artifacts:
paths:
- build/*.rpm
- build/CMakeFiles/*.log
when: always
#--------------------------------- FEDORA -------------------------------------
.requirements_fedora22: &install_requirements_fedora22
before_script:
- /usr/bin/dnf -y groupinstall "development tools"
- /usr/bin/dnf -y install wget qt5* cmake libgcrypt-devel dh-autoreconf gcc-c++
- /usr/bin/dnf -y install protobuf protobuf-devel rpm-build
.build_fedora22: &fedora22
image: fedora:22
tags:
- linux
- docker
<<: *install_requirements_fedora22
<<: *artifacts_rpm
<<: *cache
build_rc_fedora22:
<<: *fedora22
<<: *build_rc_package_rpm
when: always
build_debug_fedora22:
<<: *fedora22
<<: *build_debug_package_rpm
when: always
#=================================== DEPLOY ===================================
# deploy_to_s3: # currently unused; requires some config
# stage: deploy
# script:
# # if CI_BUILD_TAG is undefined, use git hash instead of version number
# # otherwise, treat git tag as version number
# # TODO: add deploy commands
# when: on_success

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "vcpkg"]
path = vcpkg
url = https://github.com/microsoft/vcpkg.git

7
.husky/pre-commit Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
cd webclient
npm run translate
git add src/i18n-default.json

View File

@@ -1,5 +0,0 @@
{
"message": "@pullRequester, thanks for contributing! @reviewers are the best people to review the changes.",
"fileBlacklist": ["*.md"],
"userBlacklist": ["@mbruker", "@Psithief"],
}

View File

@@ -1,40 +0,0 @@
language: cpp
sudo: required
matrix:
fast_finish: true
include:
- os: linux
dist: trusty
env: BUILDTYPE=Debug DIST=trusty
- os: linux
dist: trusty
env: BUILDTYPE=Release DIST=trusty
- os: osx
osx_image: xcode6.4
env: BUILDTYPE=Debug
- os: osx
osx_image: xcode6.4
env: BUILDTYPE=Release
script: "./travis-compile.sh"
install: "./travis-dependencies.sh"
cache: apt
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/d94969c3b01b22cbdcb7
on_success: change
on_failure: change
on_start: never
deploy:
provider: releases
api_key:
secure: "mLMF41q7xgOR1sjczsilEy7HQis2PkZCzhfOGbn/8FoOQnmmPOZjrsdhn06ZSl3SFsbfCLuClDYXAbFscQmdgjcGN5AmHV+JYfW650QEuQa/f4/lQFsVRtEqUA1O3FQ0OuRxdpCfJubZBdFVH8SbZ93GLC5zXJbkWQNq+xCX1fU="
file_glob: true
file: "build/Cockatrice-*"
prerelease: true
skip_cleanup: true
overwrite: true
on:
tags: true
repo: Cockatrice/Cockatrice
condition: $BUILDTYPE = Release

View File

@@ -1,13 +1,26 @@
[main]
host = https://www.transifex.com
host = https://app.transifex.com
[cockatrice.cockatrice]
[o:cockatrice:p:cockatrice:r:cockatrice-cockatrice-en-source-ts--master]
resource_name = Cockatrice
source_lang = en
source_file = cockatrice/cockatrice_en@source.ts
file_filter = cockatrice/translations/cockatrice_<lang>.ts
source_file = cockatrice/translations/cockatrice_en.ts
source_lang = en
type = QT
minimum_perc = 10
[cockatrice.oracle]
[o:cockatrice:p:cockatrice:r:oracle-oracle-en-source-ts--master]
resource_name = Oracle
source_lang = en
source_file = oracle/oracle_en@source.ts
file_filter = oracle/translations/oracle_<lang>.ts
source_file = oracle/translations/oracle_en.ts
source_lang = en
type = QT
minimum_perc = 10
[o:cockatrice:p:cockatrice:r:webclient-src-i18n-default-json--master]
resource_name = Webclient
source_lang = en
source_file = webclient/src/i18n-default.json
file_filter = webclient/public/locales/<lang>/translation.json
type = KEYVALUEJSON
minimum_perc = 10

View File

@@ -5,49 +5,98 @@
# This file sets all the variables shared between the projects
# like the installation path, compilation flags etc..
# Cmake 3.1 is required to enable C++11 support correctly
cmake_minimum_required(VERSION 3.1)
# cmake 3.16 is required if using qt6
cmake_minimum_required(VERSION 3.10)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 OLD)
endif()
if(POLICY CMP0043)
cmake_policy(SET CMP0043 OLD)
endif()
if(POLICY CMP0048)
cmake_policy(SET CMP0048 OLD)
endif()
if(POLICY CMP0064)
cmake_policy(SET CMP0064 OLD)
endif()
set(PROJECT_NAME "Cockatrice")
# Early detect ccache
option(USE_CCACHE "Cache the build results with ccache" ON)
# Treat warnings as errors (Debug builds only)
option(WARNING_AS_ERROR "Treat warnings as errors in debug builds" ON)
# Check for translation updates
option(UPDATE_TRANSLATIONS "Update translations on compile" OFF)
# Compile servatrice
option(WITH_SERVER "build servatrice" OFF)
# Compile cockatrice
option(WITH_CLIENT "build cockatrice" ON)
# Compile oracle
option(WITH_ORACLE "build oracle" ON)
# Compile dbconverter
option(WITH_DBCONVERTER "build dbconverter" ON)
# Compile tests
option(TEST "build tests" OFF)
# Use vcpkg regardless of OS
option(USE_VCPKG "Use vcpkg regardless of OS" OFF)
# Default to "Release" build type
# User-provided value for CMAKE_BUILD_TYPE must be checked before the PROJECT() call
IF(DEFINED CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Type of build")
ELSE()
SET(CMAKE_BUILD_TYPE Release CACHE STRING "Type of build")
ENDIF()
if(DEFINED CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE
${CMAKE_BUILD_TYPE}
CACHE STRING "Type of build"
)
else()
set(CMAKE_BUILD_TYPE
Release
CACHE STRING "Type of build"
)
endif()
if(USE_CCACHE)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
# Support Unix Makefiles and Ninja
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
message(STATUS "Found CCache ${CCACHE_PROGRAM}")
endif()
endif()
if(WIN32 OR USE_VCPKG)
# Use vcpkg toolchain on Windows (and on macOS in CI)
set(CMAKE_TOOLCHAIN_FILE
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake
CACHE STRING "Vcpkg toolchain file"
)
# Qt path set by user or env var
if(QTDIR
OR DEFINED ENV{QTDIR}
OR DEFINED ENV{QTDIR32}
OR DEFINED ENV{QTDIR64}
)
else()
set(QTDIR
""
CACHE PATH "Path to Qt (e.g. C:/Qt/5.7/msvc2015_64)"
)
message(
WARNING "QTDIR variable is missing. Please set this variable to specify path to Qt (e.g. C:/Qt/5.7/msvc2015_64)"
)
endif()
endif()
# A project name is needed for CPack
PROJECT("${PROJECT_NAME}")
# Version can be overriden by git tags, see cmake/getversion.cmake
project("Cockatrice" VERSION 2.11.0)
# Use c++11 for all targets
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ ISO Standard")
# Set release name if not provided via env/cmake var
if(NOT DEFINED GIT_TAG_RELEASENAME)
set(GIT_TAG_RELEASENAME "Omenpath")
endif()
# Use c++20 for all targets
set(CMAKE_CXX_STANDARD
20
CACHE STRING "C++ ISO Standard"
)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Set conventional loops
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
# Search path for cmake modules
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(COCKATRICE_CMAKE_PATH "${PROJECT_SOURCE_DIR}/cmake")
list(INSERT CMAKE_MODULE_PATH 0 "${COCKATRICE_CMAKE_PATH}")
# Retrieve git version hash
include(getversion)
# Create a header and a cpp file containing the version hash
@@ -55,177 +104,269 @@ include(createversionfile)
# Define a proper install path
if(UNIX)
if(APPLE)
# MacOS X
# Due to the special bundle structure ignore
# the prefix eventually set by the user.
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/release)
else()
# Linux / BSD
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
#fix package build
if(PREFIX)
set(CMAKE_INSTALL_PREFIX ${PREFIX})
else()
set(CMAKE_INSTALL_PREFIX /usr/local)
endif()
endif()
endif()
elseif(WIN32)
if(APPLE)
# macOS
# Due to the special bundle structure ignore
# the prefix eventually set by the user.
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/release)
# Force ccache usage if available
get_property(RULE_LAUNCH_COMPILE GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
if(RULE_LAUNCH_COMPILE)
message(STATUS "Force enabling CCache usage under macOS")
# Set up wrapper scripts
configure_file("${COCKATRICE_CMAKE_PATH}/launch-c.in" launch-c)
configure_file("${COCKATRICE_CMAKE_PATH}/launch-cxx.in" launch-cxx)
execute_process(COMMAND chmod a+rx "${CMAKE_BINARY_DIR}/launch-c" "${CMAKE_BINARY_DIR}/launch-cxx")
# Set Xcode project attributes to route compilation through our scripts
set(CMAKE_XCODE_ATTRIBUTE_CC "${CMAKE_BINARY_DIR}/launch-c")
set(CMAKE_XCODE_ATTRIBUTE_CXX "${CMAKE_BINARY_DIR}/launch-cxx")
set(CMAKE_XCODE_ATTRIBUTE_LD "${CMAKE_BINARY_DIR}/launch-c")
set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS "${CMAKE_BINARY_DIR}/launch-cxx")
endif()
else()
# Linux / BSD
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
#fix package build
if(PREFIX)
set(CMAKE_INSTALL_PREFIX ${PREFIX})
else()
set(CMAKE_INSTALL_PREFIX /usr/local)
endif()
endif()
endif()
elseif(WIN32)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/rundir/${CMAKE_BUILD_TYPE})
endif()
# Define proper compilation flags
IF(MSVC)
# Visual Studio:
# Support from Windows XP
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS,5.01")
# Maximum optimization
set(CMAKE_CXX_FLAGS_RELEASE "/Ox /MD")
# Generate complete debugging information
#set(CMAKE_CXX_FLAGS_DEBUG "/Zi")
ELSEIF (CMAKE_COMPILER_IS_GNUCXX)
# linux/gcc, bsd/gcc, windows/mingw
include(CheckCXXCompilerFlag)
if(MSVC)
# Disable Warning C4251, C++20 compatibility, Multi-threaded Builds, Warn Detection, Unwind Semantics, Debug Symbols
set(CMAKE_CXX_FLAGS "/wd4251 /Zc:__cplusplus /std:c++20 /permissive- /W4 /MP /EHsc /Zi")
# Visual Studio: Maximum Optimization, Multi-threaded DLL
set(CMAKE_CXX_FLAGS_RELEASE "/Ox /MD")
# Visual Studio: No Optimization, Multi-threaded Debug DLL
set(CMAKE_CXX_FLAGS_DEBUG "/Od /MDd")
set(CMAKE_CXX_FLAGS_RELEASE "-s -O2")
# Generate PDB, even when in release (So developers can better analyze crash logs)
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
add_compile_definitions(_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING)
elseif(CMAKE_COMPILER_IS_GNUCXX)
# linux/gcc, bsd/gcc, windows/mingw
include(CheckCXXCompilerFlag)
set(CMAKE_CXX_FLAGS_RELEASE "-s -O2")
if(WARNING_AS_ERROR)
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -O0 -Wall -Wextra -Werror")
else()
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -O0 -Wall -Wextra")
endif()
set(ADDITIONAL_DEBUG_FLAGS -Wcast-align -Wmissing-declarations -Wno-long-long -Wno-error=extra -Wno-error=delete-non-virtual-dtor -Wno-error=sign-compare -Wno-error=missing-declarations)
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++20")
endif()
FOREACH(FLAG ${ADDITIONAL_DEBUG_FLAGS})
CHECK_CXX_COMPILER_FLAG("${FLAG}" CXX_HAS_WARNING_${FLAG})
IF(CXX_HAS_WARNING_${FLAG})
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FLAG}")
ENDIF()
ENDFOREACH()
ELSE()
# other: osx/llvm, bsd/llvm
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
ENDIF()
set(ADDITIONAL_DEBUG_FLAGS
-Wcast-align
-Wmissing-declarations
-Wno-long-long
-Wno-error=extra
-Wno-error=delete-non-virtual-dtor
-Wno-error=sign-compare
-Wno-error=missing-declarations
)
foreach(FLAG ${ADDITIONAL_DEBUG_FLAGS})
check_cxx_compiler_flag("${FLAG}" CXX_HAS_WARNING_${FLAG})
if(CXX_HAS_WARNING_${FLAG})
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FLAG}")
endif()
endforeach()
else()
# other: osx/llvm, bsd/llvm
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
if(WARNING_AS_ERROR)
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wextra -Werror -Wno-unused-parameter")
else()
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wextra")
endif()
endif()
# GNU systems need to define the Mersenne exponent for the RNG to compile w/o warning
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
ADD_DEFINITIONS("-DSFMT_MEXP=19937")
ENDIF()
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
add_definitions("-DSFMT_MEXP=19937")
endif()
# Find Qt5
OPTION(UPDATE_TRANSLATIONS "Update translations on compile" OFF)
MESSAGE(STATUS "UPDATE TRANSLATIONS: ${UPDATE_TRANSLATIONS}")
find_package(Threads REQUIRED)
IF(WIN32)
FIND_PACKAGE(Qt5Widgets 5.4.0 REQUIRED) # For QSysInfo::buildAbi()
ELSE()
FIND_PACKAGE(Qt5Widgets 5.0.3 REQUIRED)
ENDIF()
# Determine 32 or 64 bit build
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_lib_suffix 64)
else()
set(_lib_suffix 32)
endif()
IF(Qt5Widgets_FOUND)
MESSAGE(STATUS "Found Qt ${Qt5Widgets_VERSION_STRING}")
if(DEFINED QTDIR${_lib_suffix})
list(APPEND CMAKE_PREFIX_PATH "${QTDIR${_lib_suffix}}")
elseif(DEFINED QTDIR)
list(APPEND CMAKE_PREFIX_PATH "${QTDIR}")
elseif(DEFINED ENV{QTDIR${_lib_suffix}})
list(APPEND CMAKE_PREFIX_PATH "$ENV{QTDIR${_lib_suffix}}")
elseif(DEFINED ENV{QTDIR})
list(APPEND CMAKE_PREFIX_PATH "$ENV{QTDIR}")
endif()
# FIX: Qt was built with -reduce-relocations
if (Qt5_POSITION_INDEPENDENT_CODE)
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
message(STATUS "Update Translations: ${UPDATE_TRANSLATIONS}")
FIND_PACKAGE(Qt5LinguistTools)
IF(UPDATE_TRANSLATIONS)
IF(NOT Qt5_LUPDATE_EXECUTABLE)
MESSAGE(WARNING "Qt's lupdate not found.")
ENDIF()
ENDIF()
IF(NOT Qt5_LRELEASE_EXECUTABLE)
MESSAGE(WARNING "Qt's lrelease not found.")
ENDIF()
ELSE()
MESSAGE(FATAL_ERROR "No Qt5 found!")
ENDIF()
include(FindQtRuntime)
set(CMAKE_AUTOMOC TRUE)
# Find other needed libraries
FIND_PACKAGE(Protobuf REQUIRED)
find_package(Protobuf CONFIG)
if(NOT Protobuf_FOUND)
find_package(Protobuf REQUIRED)
endif()
if(${Protobuf_VERSION} VERSION_LESS "3.21.0.0" AND NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
message(FATAL_ERROR "No protoc command found!")
endif()
#Find OpenSSL
IF(WIN32)
FIND_PACKAGE(Win32SslRuntime)
ENDIF()
if(WIN32)
find_package(OpenSSL REQUIRED)
if(OPENSSL_FOUND)
include_directories(${OPENSSL_INCLUDE_DIRS})
else()
message(
WARNING
"Could not find OpenSSL runtime libraries. They are not required for compiling, but needs to be available at runtime."
)
endif()
endif()
#Find VCredist
if(MSVC)
find_package(VCredistRuntime)
endif()
# Package builder
set(CPACK_PACKAGE_CONTACT "Gavin Bisesi <Daenyth+github@gmail.com>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${PROJECT_NAME})
set(CPACK_PACKAGE_CONTACT "Zach Halpern <zach@cockatrice.us>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME}")
set(CPACK_PACKAGE_VENDOR "Cockatrice Development Team")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README.md")
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/COPYING")
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_VERSION_FILENAME}")
if(UNIX)
if(APPLE)
set(CPACK_GENERATOR DragNDrop ${CPACK_GENERATOR})
set(CPACK_GENERATOR "DragNDrop")
set(CPACK_DMG_FORMAT "UDBZ")
set(CPACK_DMG_VOLUME_NAME "${PROJECT_NAME}")
set(CPACK_SYSTEM_NAME "OSX")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/cockatrice/resources/appicon.icns")
if(APPLE)
set(CPACK_GENERATOR DragNDrop ${CPACK_GENERATOR})
set(CPACK_GENERATOR "DragNDrop")
set(CPACK_DMG_FORMAT "UDBZ")
set(CPACK_DMG_VOLUME_NAME "${PROJECT_NAME}")
set(CPACK_SYSTEM_NAME "OSX")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/cockatrice/resources/appicon.icns")
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/cmake/CMakeDMGSetup.script")
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/dmgBackground.tif")
set(CPACK_PRE_BUILD_SCRIPTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/SignMacApplications.cmake")
else()
# linux
if(CPACK_GENERATOR STREQUAL "RPM")
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
set(CPACK_RPM_MAIN_COMPONENT "cockatrice")
if(Qt6_FOUND)
set(CPACK_RPM_PACKAGE_REQUIRES "protobuf, qt6-qttools, qt6-qtsvg, qt6-qtmultimedia, qt6-qtimageformats")
elseif(Qt5_FOUND)
set(CPACK_RPM_PACKAGE_REQUIRES "protobuf, qt5-qttools, qt5-qtsvg, qt5-qtmultimedia")
endif()
set(CPACK_RPM_PACKAGE_GROUP "Amusements/Games")
set(CPACK_RPM_PACKAGE_URL "http://github.com/Cockatrice/Cockatrice")
# stop directories from making package conflicts
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
/usr/share/applications
/usr/share/icons
/usr/share/icons/hicolor
/usr/share/icons/hicolor/48x48
/usr/share/icons/hicolor/48x48/apps
/usr/share/icons/hicolor/scalable
/usr/share/icons/hicolor/scalable/apps
)
else()
# linux
IF(CPACK_GENERATOR STREQUAL "RPM")
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
set(CPACK_RPM_PACKAGE_REQUIRES "protobuf, qt5-qttools, qt5-qtsvg, qt5-qtmultimedia")
set(CPACK_RPM_PACKAGE_GROUP "Amusements/Games")
set(CPACK_RPM_PACKAGE_URL "http://github.com/Cockatrice/Cockatrice")
ELSE()
set(CPACK_GENERATOR DEB)
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_PACKAGE_SECTION "games")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://github.com/Cockatrice/Cockatrice")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt5multimedia5-plugins, libqt5svg5")
ENDIF()
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}")
set(CPACK_GENERATOR DEB)
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_PACKAGE_SECTION "games")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://github.com/Cockatrice/Cockatrice")
if(Qt6_FOUND)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt6multimedia6, libqt6svg6, qt6-qpa-plugins, qt6-image-formats-plugins")
set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "libqt6sql6-mysql") # for connecting servatrice to a mysql db
elseif(Qt5_FOUND)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt5multimedia5-plugins, libqt5svg5")
endif()
endif()
endif()
elseif(WIN32)
set(CPACK_GENERATOR NSIS ${CPACK_GENERATOR})
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}")
set(CPACK_GENERATOR NSIS ${CPACK_GENERATOR})
if("${CMAKE_GENERATOR_PLATFORM}" MATCHES "(x64)")
set(TRICE_IS_64_BIT 1)
else()
set(TRICE_IS_64_BIT 0)
endif()
# Configure file with custom definitions for NSIS.
configure_file(
${CMAKE_MODULE_PATH}/NSIS.definitions.nsh.in
${PROJECT_BINARY_DIR}/NSIS.definitions.nsh
)
# Configure file with custom definitions for NSIS.
configure_file("${COCKATRICE_CMAKE_PATH}/NSIS.definitions.nsh.in" "${PROJECT_BINARY_DIR}/NSIS.definitions.nsh")
# include vcredist into the package; NSIS will take care of running it
if(VCREDISTRUNTIME_FOUND)
install(FILES "${VCREDISTRUNTIME_FILE}" DESTINATION ./)
endif()
endif()
include(CPack)
# Compile servatrice (default off)
option(WITH_SERVER "build servatrice" OFF)
add_subdirectory(common)
add_subdirectory(${CMAKE_SOURCE_DIR}/libcockatrice_interfaces ${CMAKE_BINARY_DIR}/libcockatrice_interfaces)
add_subdirectory(${CMAKE_SOURCE_DIR}/libcockatrice_protocol ${CMAKE_BINARY_DIR}/libcockatrice_protocol)
add_subdirectory(${CMAKE_SOURCE_DIR}/libcockatrice_network ${CMAKE_BINARY_DIR}/libcockatrice_network)
add_subdirectory(${CMAKE_SOURCE_DIR}/libcockatrice_deck_list ${CMAKE_BINARY_DIR}/libcockatrice_deck_list)
add_subdirectory(${CMAKE_SOURCE_DIR}/libcockatrice_rng ${CMAKE_BINARY_DIR}/libcockatrice_rng)
add_subdirectory(${CMAKE_SOURCE_DIR}/libcockatrice_card ${CMAKE_BINARY_DIR}/libcockatrice_card)
add_subdirectory(${CMAKE_SOURCE_DIR}/libcockatrice_utility ${CMAKE_BINARY_DIR}/libcockatrice_utility)
if(WITH_ORACLE OR WITH_CLIENT)
add_subdirectory(${CMAKE_SOURCE_DIR}/libcockatrice_settings ${CMAKE_BINARY_DIR}/libcockatrice_settings)
add_subdirectory(${CMAKE_SOURCE_DIR}/libcockatrice_models ${CMAKE_BINARY_DIR}/libcockatrice_models)
add_subdirectory(${CMAKE_SOURCE_DIR}/libcockatrice_filters ${CMAKE_BINARY_DIR}/libcockatrice_filters)
endif()
if(WITH_SERVER)
add_subdirectory(servatrice)
SET(CPACK_INSTALL_CMAKE_PROJECTS "Servatrice;Servatrice;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
add_subdirectory(servatrice)
set(CPACK_INSTALL_CMAKE_PROJECTS "Servatrice;Servatrice;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
endif()
# Compile cockatrice (default on)
option(WITH_CLIENT "build cockatrice" ON)
if(WITH_CLIENT)
add_subdirectory(cockatrice)
SET(CPACK_INSTALL_CMAKE_PROJECTS "Cockatrice;Cockatrice;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
add_subdirectory(cockatrice)
set(CPACK_INSTALL_CMAKE_PROJECTS "Cockatrice;Cockatrice;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
endif()
# Compile oracle (default on)
option(WITH_ORACLE "build oracle" ON)
if(WITH_ORACLE)
add_subdirectory(oracle)
SET(CPACK_INSTALL_CMAKE_PROJECTS "Oracle;Oracle;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
add_subdirectory(oracle)
set(CPACK_INSTALL_CMAKE_PROJECTS "Oracle;Oracle;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
endif()
# Compile tests (default off)
option(TEST "build tests" OFF)
if(TEST)
include(CTest)
add_subdirectory(tests)
if(WITH_DBCONVERTER)
add_subdirectory(dbconverter)
set(CPACK_INSTALL_CMAKE_PROJECTS "Dbconverter;Dbconverter;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
endif()
if(TEST)
include(CTest)
add_subdirectory(tests)
endif()
if(Qt6_FOUND AND Qt6_VERSION_MINOR GREATER_EQUAL 3)
# Qt6.3+ requires project finalization to support translations
qt6_finalize_project()
endif()

View File

@@ -1,38 +1,44 @@
FROM ubuntu:trusty
MAINTAINER Gavin Bisesi <Daenyth@gmail.com>
# -------- Build Stage --------
FROM ubuntu:24.04 AS build
RUN apt-get update && apt-get install -y software-properties-common
RUN apt-add-repository ppa:ubuntu-sdk-team/ppa
RUN add-apt-repository -y ppa:smspillaz/cmake-master
RUN apt-get update && apt-get install -y\
build-essential g++\
cmake\
git\
libprotobuf-dev\
protobuf-compiler\
qt5-default\
qtbase5-dev\
qttools5-dev-tools\
qttools5-dev\
libqt5sql5-mysql
ARG DEBIAN_FRONTEND=noninteractive
ENV dir /home/servatrice/code
WORKDIR $dir
RUN mkdir oracle
COPY COPYING COPYING
COPY CMakeLists.txt CMakeLists.txt
COPY cmake/ cmake/
COPY common/ common/
COPY servatrice/ servatrice/
COPY README.md README.md
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
file \
g++ \
git \
libmariadb-dev-compat \
libprotobuf-dev \
libqt6sql6-mysql \
qt6-websockets-dev \
protobuf-compiler \
qt6-tools-dev \
qt6-tools-dev-tools
WORKDIR build
RUN cmake .. -DWITH_SERVER=1 -DWITH_CLIENT=0 -DWITH_ORACLE=0 &&\
make &&\
make install
WORKDIR /src
COPY . .
RUN mkdir build && cd build && \
cmake .. -DWITH_SERVER=1 -DWITH_CLIENT=0 -DWITH_ORACLE=0 -DWITH_DBCONVERTER=0 && \
make -j$(nproc) && \
make install
# -------- Runtime Stage (clean) --------
FROM ubuntu:24.04
RUN apt-get update && apt-get install -y --no-install-recommends \
libprotobuf32t64 \
libqt6sql6-mysql \
libqt6websockets6 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Only copy installed binaries, not source
COPY --from=build /usr/local /usr/local
WORKDIR /home/servatrice
EXPOSE 4747
ENTRYPOINT [ "servatrice" ]
EXPOSE 4748
ENTRYPOINT [ "servatrice", "--log-to-console" ]

2963
Doxyfile Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -304,8 +304,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
with this program; if not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
@@ -329,8 +328,8 @@ necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
<signature of Moe Ghoul>, 1 April 1989
Moe Ghoul, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may

201
README.md
View File

@@ -2,121 +2,160 @@
---
**Table of Contents** &nbsp;&nbsp; [Cockatrice](#cockatrice) | [Downloads](#downloads) | [Get Involved](#get-involved-) | [Community](#community-resources) | [Translation](#translation-status-) | [Building](#building--) | [Running](#running) | [License](#license-)
<p align='center'>
<a href="#cockatrice"><b>Cockatrice</b></a> <b>|</b>
<a href="#download-">Download</a> <b>|</b>
<a href="#related-repositories">Related</a> <b>|</b>
<a href="#community-resources-">Community</a> <b>|</b>
<a href="#contribute">Contribute</a> <b>|</b>
<a href="#build---">Build</a> <b>|</b>
<a href="#run">Run</a>
</p>
---
<br><pre>
<b>If you're getting started &#8674; [view our webpage](https://cockatrice.github.io/)</b><br>
<b>If you're trying to get support or suggest changes &#8674; [file an issue](https://github.com/Cockatrice/Cockatrice/issues) ([How?](https://github.com/Cockatrice/Cockatrice/wiki/How-to-Create-a-GitHub-Ticket))</b>
</pre><br>
<br><pre><p align='center'>
<b>To get started with Cockatrice &#8674; [view our webpage](https://cockatrice.github.io/)</b><br>
<b>To get support, or suggest changes to the app &#8674; [file an issue](https://github.com/Cockatrice/Cockatrice/issues) ([How?](https://github.com/Cockatrice/Cockatrice/wiki/How-to-Create-a-GitHub-Ticket-Regarding-Cockatrice))</b>
<b>To help with development &#8674; learn [how to contribute](#contribute-)</b>
</pre><p><br>
# Cockatrice
Cockatrice is an open-source multiplatform supported program for playing tabletop card games over a network. The program's server design prevents any kind of client modifications to gain an unfair advantage in a game. The client also has a built in single-player mode where you can brew without being connected to a server. This project is written in C++ and is using the Qt5 libraries.<br>
Cockatrice is an open-source, multiplatform application for playing tabletop card games over a network. The program's server design prevents users from manipulating the game for unfair advantage. The client also provides a single-player mode, which allows users to brew while offline.<br><br>
This project uses <kbd>C++</kbd> and the <kbd>Qt</kbd> libraries.<br>
First work on a webclient with <kbd>Typescript</kbd> was started as well.<br>
# Downloads
# Download [![Cockatrice Eternal Download Count](https://img.shields.io/github/downloads/cockatrice/cockatrice/total.svg)](https://tooomm.github.io/github-release-stats/?username=Cockatrice&repository=Cockatrice&search=0)
We offer downloads for all full releases (recommended) and the latest development versions. Full releases are checkpoints with major feature or UI enhancements between them, but currently we don't have a set schedule for releasing new updates. The development version contains the most recently added features and bugfixes, but can be more unstable. Downloads for development versions are updated automatically with every change.
Downloads are available for **stable releases** and the current **beta version** in development.
There is no strict release schedule for either of them.
<br><pre>
Latest <kbd>stable</kbd> release:
[![Download Stable Release](https://img.shields.io/github/release/cockatrice/cockatrice.svg?label=version&colorB=0d7ebf "Download Latest Stable Release")](https://github.com/cockatrice/cockatrice/releases/latest) ![](https://img.shields.io/github/release-date/Cockatrice/Cockatrice.svg?label=released&colorB=0d7ebf "Release Date") [![](https://img.shields.io/github/downloads/cockatrice/cockatrice/latest/total.svg?label=downloads&colorB=0d7ebf "Number of Downloads")](https://tooomm.github.io/github-release-stats/?username=Cockatrice&repository=Cockatrice&search=0)
</pre><pre>
Latest <kbd>beta</kbd> version:
[![Download Beta Release](https://img.shields.io/github/release/cockatrice/cockatrice/all.svg?label=version&colorB=f37f40 "Download Latest Beta Release")](https://github.com/cockatrice/cockatrice/releases) ![](https://img.shields.io/github/release-date-pre/Cockatrice/Cockatrice.svg?label=released&colorB=f37f40 "Release Date") [![](https://img.shields.io/github/downloads-pre/cockatrice/cockatrice/latest/total.svg?label=downloads&colorB=f37f40 "Number of Downloads")](https://tooomm.github.io/github-release-stats/?username=Cockatrice&repository=Cockatrice&search=0) [![](https://img.shields.io/github/commits-since/Cockatrice/Cockatrice/latest.svg?label=changes&colorB=f37f40 "Changes over Stable Release")](https://github.com/Cockatrice/Cockatrice/pulls?q=is%3Apr+is%3Aclosed)
<sub><i>While incorporating the latest fixes and features, beta builds may not be stable or contain new bugs!</i></sub>
<sub><b><i>Please report any findings and open new issues when testing them!</i></b></sub>
</pre>
- Latest full release (**recommended**): [Download from GitHub](https://github.com/cockatrice/cockatrice/releases/latest)<br>
# Related Repositories
- Latest development version: [Download from GitHub](https://github.com/cockatrice/cockatrice/releases/TBD)
- Development builds may not be stable and/or contain several bugs.
- If you'd like to be a Cockatrice Beta Tester, use this version.
- More information can be [found here](https://github.com/Cockatrice/Cockatrice/wiki/Release-Channels)
- [Magic-Token](https://github.com/Cockatrice/Magic-Token): MtG token data to use in Cockatrice
- [Magic-Spoiler](https://github.com/Cockatrice/Magic-Spoiler): Script to generate MtG spoiler data from [MTGJSON](https://github.com/mtgjson/mtgjson) to use in Cockatrice
- [cockatrice.github.io](https://github.com/Cockatrice/cockatrice.github.io): Code of the official webpage of the Cockatrice project
# Community Resources [![Discord](https://img.shields.io/discord/314987288398659595?label=Discord&logo=discord&logoColor=white)](https://discord.gg/3Z9yzmA)
# Get Involved [![Gitter chat](https://badges.gitter.im/Cockatrice/Cockatrice.png)](https://gitter.im/Cockatrice/Cockatrice)
[Chat](https://gitter.im/Cockatrice/Cockatrice) with the Cockatrice developers on Gitter. Come here to talk about the application, features, or just to hang out. For support regarding specific servers, please contact that server's admin or forum for support rather than asking here.<br>
If you'd like to contribute code to the project, we maintain a tag for "easy" changes on our issue tracker. Issues tagged in this way provide a simple way to get started. [Issues tagged as Easy Changes](https://github.com/Cockatrice/Cockatrice/issues?q=is%3Aopen+is%3Aissue+label%3A%22Easy+Change%22)
We try to be very responsive to new issues. We'll try to give you advice on how a feature should be implemented / advice on places the codebase is doing something similar before you get too far along with a PR.
# Community Resources
- [Cockatrice Official Site](https://cockatrice.github.io)
- [Cockatrice Official Wiki](https://github.com/Cockatrice/Cockatrice/wiki)
Join our [Discord community](https://discord.gg/3Z9yzmA) to connect with other projet contributors (`#dev` channel) or fellow users of the app. Come here to talk about the application, features, or just to hang out.
- [Official Website](https://cockatrice.github.io)
- [Official Wiki](https://github.com/Cockatrice/Cockatrice/wiki)
- [Official Discord](https://discord.gg/3Z9yzmA)
- [reddit r/Cockatrice](https://reddit.com/r/cockatrice)
# Translation Status [![Cockatrice on Transiflex](https://tx-assets.scdn5.secure.raxcdn.com/static/charts/images/tx-logo-micro.c5603f91c780.png)](https://www.transifex.com/projects/p/cockatrice/)
Cockatrice uses Transifex for translations. You can help us bring Cockatrice and Oracle to your language or just edit single wordings right from within your browser by simply visiting our [Transifex project page](https://www.transifex.com/projects/p/cockatrice/).<br>
| Cockatrice | Oracle |
|:-:|:-:|
| [![Cockatrice Translation Status](https://www.transifex.com/projects/p/cockatrice/resource/cockatrice/chart/image_png/)](https://www.transifex.com/projects/p/cockatrice/) | [![Oracle Translation Status](https://www.transifex.com/projects/p/cockatrice/resource/oracle/chart/image_png/)](https://www.transifex.com/projects/p/cockatrice/) |
Check out our [Translator FAQ](https://github.com/Cockatrice/Cockatrice/wiki/Translation-FAQ) for more information about contributing!<br>
>[!IMPORTANT]
>For support regarding specific servers, please contact that server's admin/mods and use their dedicated communication channels rather than contacting the team building the software.
# Building [![Travis Build Status - master](https://travis-ci.org/Cockatrice/Cockatrice.svg?branch=master)](https://travis-ci.org/Cockatrice/Cockatrice) [![Appveyor Build Status - master](https://ci.appveyor.com/api/projects/status/lp5h0dhk4mhmeps7/branch/master?svg=true)](https://ci.appveyor.com/project/Daenyth/cockatrice/branch/master)
# Contribute
**Detailed compiling instructions are on the Cockatrice wiki under [Compiling Cockatrice](https://github.com/Cockatrice/Cockatrice/wiki/Compiling-Cockatrice)**
### Code
Dependencies:
- [Qt](https://www.qt.io/developers/)
- [protobuf](https://github.com/google/protobuf)
To contribute code to the project, please review our [guidelines](https://github.com/Cockatrice/Cockatrice/blob/master/.github/CONTRIBUTING.md) first.<br>
We maintain two tags for contributors to easier find issues to potentially work on:
- [![Good first issue](https://img.shields.io/github/issues/cockatrice/cockatrice/Good%20First%20Issue)](https://github.com/Cockatrice/Cockatrice/issues?utf8=%E2%9C%93&q=is%3Aopen%20is%3Aissue%20label%3A%22Good%20first%20issue%22%20)<br>
Issues tagged in this way provide a simple way to get started. They don't require much experience to be worked on.
- [![Help wanted](https://img.shields.io/github/issues/cockatrice/cockatrice/Help%20Wanted)](https://github.com/Cockatrice/Cockatrice/issues?utf8=%E2%9C%93&q=is%3Aopen%20is%3Aissue%20label%3A%22Help%20Wanted%22%20)<br>
This tag is used for issues that we are looking for somebody to pick up. Often this is for feature suggestions we support, but don't have the time to work on ourselves.
For both tags, we're willing to provide help to contributors in showing them where and how they can make changes, as well as code reviews for submitted changes.<br>
We'll happily advice on how best to implement a feature, or we can show you where the codebase is doing something similar before you get too far along - put a note on an issue you want to discuss more on!
Cockatrice tries to use the [Google Developer Documentation Style Guide](https://developers.google.com/style/) to ensure consistent documentation. We encourage you to improve the documentation by suggesting edits based on this guide.
<details>
<summary><b>Kudos to our amazing contributors ❤️</b></summary>
<br>
<a href="https://github.com/Cockatrice/Cockatrice/graphs/contributors">
<img src="https://contrib.rocks/image?repo=Cockatrice/Cockatrice" />
</a><br>
<sub><i>Made with <a href="https://contrib.rocks">contrib.rocks</a></i></sub>
</details>
### Translations [![Transifex Project](https://img.shields.io/badge/translate-on%20transifex-brightgreen)](https://explore.transifex.com/cockatrice/cockatrice/)
Cockatrice uses Transifex to manage translations. You can help us bring <kbd>Cockatrice</kbd>, <kbd>Oracle</kbd> and <kbd>Webatrice</kbd> to your language and just adjust single wordings right from within your browser by visiting our [Transifex project page](https://explore.transifex.com/cockatrice/cockatrice/).<br>
Check out our [Translator FAQ](https://github.com/Cockatrice/Cockatrice/wiki/Translation-FAQ) for more information about getting invovled, and join a group of hundreds of others!<br>
# Build [![CI Desktop](https://github.com/Cockatrice/Cockatrice/actions/workflows/desktop-build.yml/badge.svg?branch=master&event=push)](https://github.com/Cockatrice/Cockatrice/actions/workflows/desktop-build.yml?query=branch%3Amaster+event%3Apush) [![CI Docker](https://github.com/Cockatrice/Cockatrice/actions/workflows/docker-release.yml/badge.svg?branch=master&event=push)](https://github.com/Cockatrice/Cockatrice/actions/workflows/docker-release.yml?query=branch%3Amaster+event%3Apush) [![CI Web](https://github.com/Cockatrice/Cockatrice/actions/workflows/web-build.yml/badge.svg?branch=master&event=push)](https://github.com/Cockatrice/Cockatrice/actions/workflows/web-build.yml?query=branch%3Amaster+event%3Apush)
Dependencies: *(for minimum versions search our [CMake file](https://github.com/Cockatrice/Cockatrice/blob/master/CMakeLists.txt))*
- [Qt](https://www.qt.io/developers/)
- [protobuf](https://github.com/protocolbuffers/protobuf)
- [CMake](https://www.cmake.org/)
Oracle can optionally use zlib to load zipped files:
- [zlib](http://www.zlib.net/) (no https!)
Oracle can *optionally* use some packages to load compressed card files:
- [xz](https://tukaani.org/xz/)
- [zlib](https://www.zlib.net/)
To compile:
<br>
mkdir build
cd build
cmake ..
make
You can then run
**Basic compilation steps:**
```bash
mkdir build
cd build
cmake ..
make
```
You can then
- Create a Cockatrice installation inside the `release` folder:
```bash
make install
to get a cockatrice installation inside the `release` folder, or:
```
- Or make an installation package specific to your system:
```bash
make package
```
to create a system-specific installation package.
>[!NOTE]
>Detailed compiling instructions can be found in the Cockatrice wiki at [Compiling Cockatrice](https://github.com/Cockatrice/Cockatrice/wiki/Compiling-Cockatrice)
The following flags can be passed to `cmake`:
<br>
- `-DWITH_SERVER=1` Whether to build the server (default 0 = no).
- `-DWITH_CLIENT=0` Whether to build the client (default 1 = yes).
- `-DWITH_ORACLE=0` Whether to build oracle (default 1 = yes).
- `-DPORTABLE=1` Build portable versions of client & oracle (default 0 = no).
- `-DCMAKE_BUILD_TYPE=Debug` Compile in debug mode. Enables extra logging output, debug symbols, and much more verbose compiler warnings (default `Release`).
- `-DUPDATE_TRANSLATIONS=1` Configure `make` to update the translation .ts files for new strings in the source code. Note: Running `make clean` will remove the .ts files (default 0 = no).
- `-DTEST=1` Enable regression tests (default 0 = no). Note: needs googletest, will be downloaded on the fly if unavailable. To run tests: ```make test```.
The following flags (with their non-default values) can be passed to `cmake`:
| Flag | Description |
| --- | --- |
| `-DWITH_SERVER=1` | Build <kbd>Servatrice</kbd> server |
| `-DWITH_CLIENT=0` | Don't build <kbd>Cockatrice</kbd> client |
| `-DWITH_ORACLE=0` | Don't build <kbd>Oracle</kbd> card database tool |
| `-DCMAKE_BUILD_TYPE=Debug` | Compile in debug mode<br> Enables extra logging output, debug symbols, and much more verbose compiler warnings |
| `-DWARNING_AS_ERROR=0` | Don't treat compilation warnings as errors in debug mode |
| `-DUPDATE_TRANSLATIONS=1` | Configure `make` to update the translation .ts files for new strings in the source code<br> **Note:** `make clean` will remove the .ts files |
| `-DTEST=1` | Enable regression tests<br> **Note:** `make test` to run tests, *googletest* will be downloaded if not available |
| `-DFORCE_USE_QT5=1` | Skip looking for Qt6 before trying to find Qt5 |
# Running
# Run
`cockatrice` is the game client
`oracle` fetches card data
`servatrice` is the server<br>
<kbd>Cockatrice</kbd> is the game client<br>
<kbd>Oracle</kbd> fetches card data<br>
<kbd>Servatrice</kbd> is the server<br>
#### Docker
You can build an image & deploy a <kbd>Servatrice</kbd> (Cockatrice server) container using [Docker](https://www.docker.com/resources/what-container/) and our Dockerfile yourself.<br>
For more details, look into our wiki section on [Setting up Servatrice](https://github.com/Cockatrice/Cockatrice/wiki/Setting-up-Servatrice#using-docker).<br>
You'll also find more hints on our **pre-build image** there, or the **docker-compose** file which will configure and run both a MySQL server and Servatrice.
#### Servatrice Docker container
A Dockerfile is provided to run Servatrice (the Cockatrice server) using [Docker](https://www.docker.com/what-docker).<br>
You just need to create an image from the Dockerfile<br>
`docker build -t servatrice .`<br>
And then run it<br>
`docker run -i -p 4747:4747/tcp -t servatrice:latest`<br>
Please note that running this command will expose the TCP port 4747 of the docker container to permit connections to the server.<br>
More infos on how to use Servatrice with Docker can be found in our [wiki](https://github.com/Cockatrice/Cockatrice/wiki/Setting-up-Servatrice#using-docker).
# License [![GPLv2 License](https://img.shields.io/badge/License-GPLv2-blue.svg)](https://github.com/Cockatrice/Cockatrice/blob/master/COPYING)
Cockatrice is free software, licensed under the [GPLv2](https://github.com/Cockatrice/Cockatrice/blob/master/COPYING).
# License [![GPLv2 License](https://img.shields.io/github/license/Cockatrice/Cockatrice.svg)](https://github.com/Cockatrice/Cockatrice/blob/master/LICENSE)
Cockatrice is free software, licensed under the [GPLv2](https://github.com/Cockatrice/Cockatrice/blob/master/LICENSE).

27
TODO.md
View File

@@ -1,27 +0,0 @@
#TODOs
This is an unordered list of possible todo items for Cockatrice.
Note that "improve" and "write" always also means: "document and comment"
##Improve packaging:
* Improve nsis file git hash extraction, it only works if the build directory is cleared as version_string.cpp does not seem to get updated by git pull/cmake
* Create script/... for creating Linux packages (deb, rpm, ebuild, ...) or at least an official tarball/git tags; package maintainers dislike using git snapshots so much that they rather ignore software without stable tarballs.
##Scripts
* Write example init script for servatrice.
##Create developer documentation:
* Create developer manual
* Add comments to code
* Describe which components exist and how they work and interact
* Describe the *.proto files
* Comment and document servatrice.sql
* Document everything!1!!
##Else
* Update SFMT library (http://www.math.sci.hiroshima-u.ac.jp/~m-mat@math.sci.hiroshima-u.ac.jp/MT/SFMT/) in common/sfmt and adapt common/rng_sfmt.cpp
* Move hardcoded URLs (especially from oracle and cockatrice) into a config file.
* Search git log for useful information/problems/bugs/...

View File

@@ -1,99 +0,0 @@
version: 0.0.1-branch-{branch}-build-{build}
cache:
- c:\protobuf
- c:\protoc
- c:\zlib
environment:
matrix:
- vc_arch: amd64
choco_arch:
nuget_arch: x64
target_arch: x86_64
qt_ver: 5.6\msvc2013_64
bintray_path: Win64
MYSQL_DRIVER_URL: https://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-6.1.6-winx64.zip
MYSQL_DRIVER_ARCHIVE: mysql-connector-c-6.1.6-winx64.zip
MYSQL_DRIVER_NAME: mysql-connector-c-6.1.6-winx64
- vc_arch: amd64_x86 # cross-compile from amd64 to x86
choco_arch: --x86
nuget_arch: Win32
target_arch: x86
qt_ver: 5.6\msvc2013
bintray_path: Win32
MYSQL_DRIVER_URL: https://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-6.1.6-win32.zip
MYSQL_DRIVER_ARCHIVE: mysql-connector-c-6.1.6-win32.zip
MYSQL_DRIVER_NAME: mysql-connector-c-6.1.6-win32
install:
- systeminfo
- ps: |
if (Test-Path c:\protoc) {
echo "using protoc from cache"
} else {
Invoke-WebRequest "https://github.com/google/protobuf/releases/download/v2.6.1/protoc-2.6.1-win32.zip" -OutFile c:\protoc-2.6.1-win32.zip
c:\cygwin\bin\bash -lc "cd /cygdrive/c; 7z x -y protoc-2.6.1-win32.zip -oc:\protoc"
}
- ps: |
if (Test-Path c:\protobuf) {
echo "using protobuf from cache"
} else {
nuget install protobuf-v120 -OutputDirectory c:\protobuf
}
- ps: |
if (Test-Path c:\zlib) {
echo "using zlib from cache"
} else {
nuget install zlib -OutputDirectory c:\zlib
}
services:
- mysql
build_script:
- mkdir build
- cd build
- '"c:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/vcvarsall" %vc_arch%'
- path
- ps: |
$zlibinc = c:\cygwin\bin\find /cygdrive/c/zlib/ -path '*v120*/zlib.h'
$zlibinc = c:\cygwin\bin\dirname $zlibinc
$zlibinc = c:\cygwin\bin\cygpath -m $zlibinc
$zliblib = c:\cygwin\bin\find /cygdrive/c/zlib/ -path "*v120*/$env:nuget_arch/Release/zlib.lib"
$zliblib = c:\cygwin\bin\cygpath -m $zliblib
$protoinc = c:\cygwin\bin\find /cygdrive/c/protobuf/ -name 'google'
$protoinc = c:\cygwin\bin\dirname $protoinc
$protoinc = c:\cygwin\bin\cygpath -m $protoinc
$protolib = c:\cygwin\bin\find /cygdrive/c/protobuf/ -path "*/lib/$env:nuget_arch/v120/Release/libprotobuf.lib"
$protolib = c:\cygwin\bin\cygpath -m $protolib
$protoc = c:\cygwin\bin\find /cygdrive/c/protoc/ -name "protoc.exe"
$protoc = c:\cygwin\bin\cygpath -m $protoc
$mysqldll = "c:\Program Files\MySQL\MySQL Server 5.7\lib\libmysql.dll"
$mysqldll = "c:\Program Files\MySQL\MySQL Server 5.7\lib\libmysql.dll"
Write-Output "ZLIBINC = $zlibinc"
Write-Output "ZLIBLIB = $zliblib"
Write-Output "PROTOINC = $protoinc"
Write-Output "PROTOLIB = $protolib"
Write-Output "PROTOC = $protoc"
Write-Output "MYSQLDLL = $mysqldll"
cmake .. "-GNMake Makefiles" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_PREFIX_PATH=c:/Qt/$env:qt_ver" "-DWITH_SERVER=1" "-DZLIB_INCLUDE_DIR=$zlibinc" "-DZLIB_LIBRARY=$zliblib" "-DPROTOBUF_INCLUDE_DIR=$protoinc" "-DPROTOBUF_LIBRARIES=$protolib" "-DPROTOBUF_LIBRARIES=$protolib" "-DPROTOBUF_LIBRARY=$protolib" "-DPROTOBUF_PROTOC_EXECUTABLE=$protoc" "-DMYSQLCLIENT_LIBRARIES=$mysqldll"
- nmake package
- c:\cygwin\bin\ls -l
- ps: |
$exe = dir -name *.exe
$new_name = $exe.Replace(".exe", "-${env:target_arch}_qt5.exe")
Push-AppveyorArtifact $exe -FileName $new_name
$cmake_name = $exe.Replace(".exe", "-${env:target_arch}_qt5.cmake.txt")
Push-AppveyorArtifact CMakeCache.txt -FileName $cmake_name
$json = New-Object PSObject
(New-Object PSObject | Add-Member -PassThru NoteProperty bin $new_name | Add-Member -PassThru NoteProperty cmake $cmake_name | Add-Member -PassThru NoteProperty commit $env:APPVEYOR_REPO_COMMIT) | ConvertTo-JSON | Out-File -FilePath "latest-$env:target_arch" -Encoding ASCII
Push-AppveyorArtifact "latest-$env:target_arch"
$version = $matches['content']
test: off
deploy:
description: "Dev build of Cockatrice"
provider: GitHub
auth_token:
secure: p+7wPVry2XEa6TBm9XH8IaQZbBmXQ/J2ldbGmcIxUZD3NkkPrSRRlmE7Of1CBBIO
artifact: /.*\.exe/
draft: false
prerelease: true
force_update: true
on:
appveyor_repo_tag: true

View File

@@ -0,0 +1,55 @@
on run argv
set image_name to item 1 of argv
tell application "Finder"
tell disk image_name
-- wait for the image to finish mounting
set open_attempts to 0
repeat while open_attempts < 4
try
open
delay 1
set open_attempts to 5
close
on error errStr number errorNumber
set open_attempts to open_attempts + 1
delay 10
end try
end repeat
delay 5
-- open the image the first time and save a DS_Store with just
-- background and icon setup
open
set current view of container window to icon view
set theViewOptions to the icon view options of container window
set background picture of theViewOptions to file ".background:background.tif"
set arrangement of theViewOptions to not arranged
set icon size of theViewOptions to 128
delay 5
close
-- next setup the position of the app and Applications symlink
-- plus hide all the window decoration
open
update without registering applications
tell container window
set sidebar width to 0
set statusbar visible to false
set toolbar visible to false
set the bounds to { 400, 100, 1400, 922 }
set position of item "Cockatrice.app" to { 139, 214 }
set position of item "Oracle.app" to { 139, 414 }
set position of item "Servatrice.app" to { 139, 614 }
set position of item "dbconverter.app" to { 1400, 1400 }
set position of item "Applications" to { 861, 414 }
end tell
update without registering applications
delay 5
close
end tell
delay 1
end tell
end run

View File

@@ -0,0 +1,18 @@
# Find the LibExecinfo library - FreeBSD only
find_path(LIBEXECINFO_INCLUDE_DIR execinfo.h)
find_library(LIBEXECINFO_LIBRARY NAMES execinfo)
if(LIBEXECINFO_INCLUDE_DIR AND LIBEXECINFO_LIBRARY)
set(LIBEXECINFO_FOUND TRUE)
endif()
if(LIBEXECINFO_FOUND)
if(NOT LIBEXECINFO_FIND_QUIETLY)
message(STATUS "Found LibExecinfo: ${EXECINFO_LIBRARY}")
endif()
else()
if(LIBEXECINFO_FIND_REQUIRED)
message(FATAL_ERROR "Could not find LibExecinfo")
endif()
endif()

121
cmake/FindQtRuntime.cmake Normal file
View File

@@ -0,0 +1,121 @@
# Find a compatible Qt version
# Inputs: WITH_SERVER, WITH_CLIENT, WITH_ORACLE, WITH_DBCONVERTER, FORCE_USE_QT5
# Optional Input: QT6_DIR -- Hint as to where Qt6 lives on the system
# Optional Input: QT5_DIR -- Hint as to where Qt5 lives on the system
# Output: COCKATRICE_QT_VERSION_NAME -- Example values: Qt5, Qt6
# Output: SERVATRICE_QT_MODULES
# Output: COCKATRICE_QT_MODULES
# Output: ORACLE_QT_MODULES
# Output: DBCONVERTER_QT_MODULES
# Output: TEST_QT_MODULES
set(REQUIRED_QT_COMPONENTS Core)
if(WITH_SERVER)
set(_SERVATRICE_NEEDED Network Sql WebSockets)
endif()
if(WITH_CLIENT)
set(_COCKATRICE_NEEDED
Concurrent
Gui
Multimedia
Network
PrintSupport
Svg
WebSockets
Widgets
Xml
)
endif()
if(WITH_ORACLE)
set(_ORACLE_NEEDED Concurrent Network Svg Widgets)
endif()
if(WITH_DBCONVERTER)
set(_DBCONVERTER_NEEDED Network Widgets)
endif()
if(TEST)
set(_TEST_NEEDED Widgets)
endif()
set(REQUIRED_QT_COMPONENTS ${REQUIRED_QT_COMPONENTS} ${_SERVATRICE_NEEDED} ${_COCKATRICE_NEEDED} ${_ORACLE_NEEDED}
${_DBCONVERTER_NEEDED} ${_TEST_NEEDED}
)
list(REMOVE_DUPLICATES REQUIRED_QT_COMPONENTS)
if(NOT FORCE_USE_QT5)
# Linguist is now a component in Qt6 instead of an external package
find_package(
Qt6 6.2.3
COMPONENTS ${REQUIRED_QT_COMPONENTS} Linguist
QUIET HINTS ${Qt6_DIR}
)
endif()
if(Qt6_FOUND)
set(COCKATRICE_QT_VERSION_NAME Qt6)
list(FIND Qt6LinguistTools_TARGETS Qt6::lrelease QT6_LRELEASE_INDEX)
if(QT6_LRELEASE_INDEX EQUAL -1)
message(WARNING "Qt6 lrelease not found.")
endif()
list(FIND Qt6LinguistTools_TARGETS Qt6::lupdate QT6_LUPDATE_INDEX)
if(QT6_LUPDATE_INDEX EQUAL -1)
message(WARNING "Qt6 lupdate not found.")
endif()
else()
find_package(
Qt5 5.8.0
COMPONENTS ${REQUIRED_QT_COMPONENTS}
QUIET HINTS ${Qt5_DIR}
)
if(Qt5_FOUND)
set(COCKATRICE_QT_VERSION_NAME Qt5)
else()
message(FATAL_ERROR "No suitable version of Qt was found")
endif()
# Qt5 Linguist is in a separate package
find_package(Qt5LinguistTools QUIET)
if(Qt5LinguistTools_FOUND)
if(NOT Qt5_LRELEASE_EXECUTABLE)
message(WARNING "Qt5 lrelease not found.")
endif()
if(NOT Qt5_LUPDATE_EXECUTABLE)
message(WARNING "Qt5 lupdate not found.")
endif()
else()
message(WARNING "Linguist Tools not found, cannot handle translations")
endif()
endif()
if(Qt5_POSITION_INDEPENDENT_CODE OR Qt6_FOUND)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
# Establish Qt Plugins directory & Library directories
get_target_property(QT_LIBRARY_DIR ${COCKATRICE_QT_VERSION_NAME}::Core LOCATION)
get_filename_component(QT_LIBRARY_DIR ${QT_LIBRARY_DIR} DIRECTORY)
if(Qt6_FOUND)
get_filename_component(QT_PLUGINS_DIR "${Qt6Core_DIR}/../../../${QT6_INSTALL_PLUGINS}" ABSOLUTE)
get_filename_component(QT_LIBRARY_DIR "${QT_LIBRARY_DIR}/../../.." ABSOLUTE)
if(UNIX AND APPLE)
# Mac needs a bit more help finding all necessary components
list(APPEND QT_LIBRARY_DIR "/usr/local/lib")
endif()
elseif(Qt5_FOUND)
get_filename_component(QT_PLUGINS_DIR "${Qt5Core_DIR}/../../../plugins" ABSOLUTE)
get_filename_component(QT_LIBRARY_DIR "${QT_LIBRARY_DIR}/.." ABSOLUTE)
endif()
message(DEBUG "QT_PLUGINS_DIR = ${QT_PLUGINS_DIR}")
message(DEBUG "QT_LIBRARY_DIR = ${QT_LIBRARY_DIR}")
# Establish exports
string(REGEX REPLACE "([^;]+)" "${COCKATRICE_QT_VERSION_NAME}::\\1" SERVATRICE_QT_MODULES "${_SERVATRICE_NEEDED}")
string(REGEX REPLACE "([^;]+)" "${COCKATRICE_QT_VERSION_NAME}::\\1" COCKATRICE_QT_MODULES "${_COCKATRICE_NEEDED}")
string(REGEX REPLACE "([^;]+)" "${COCKATRICE_QT_VERSION_NAME}::\\1" ORACLE_QT_MODULES "${_ORACLE_NEEDED}")
string(REGEX REPLACE "([^;]+)" "${COCKATRICE_QT_VERSION_NAME}::\\1" DB_CONVERTER_QT_MODULES "${_DBCONVERTER_NEEDED}")
string(REGEX REPLACE "([^;]+)" "${COCKATRICE_QT_VERSION_NAME}::\\1" TEST_QT_MODULES "${_TEST_NEEDED}")
# Core-only export (useful for headless libs)
set(QT_CORE_MODULE "${COCKATRICE_QT_VERSION_NAME}::Core")
message(STATUS "Found Qt ${${COCKATRICE_QT_VERSION_NAME}_VERSION} at: ${${COCKATRICE_QT_VERSION_NAME}_DIR}")

View File

@@ -0,0 +1,42 @@
# Find the MS Visual Studio VC redistributable package
if(WIN32)
set(VCREDISTRUNTIME_FOUND "NO")
if(CMAKE_SIZEOF_VOID_P EQUAL 8) # 64-bit
set(REDIST_ARCH x64)
else()
set(REDIST_ARCH x86)
endif()
# VS 2017 uses vcredist_ARCH.exe, VS 2022 uses vc_redist.ARCH.exe
set(REDIST_FILE_NAMES vcredist_${REDIST_ARCH}.exe vcredist.${REDIST_ARCH}.exe vc_redist.${REDIST_ARCH}.exe)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
include(InstallRequiredSystemLibraries)
# Check if the list contains minimum one element, to get the path from
list(LENGTH CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS libsCount)
if(libsCount GREATER 0)
list(GET CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS 0 _path)
get_filename_component(_path ${_path} DIRECTORY)
get_filename_component(_path ${_path}/../../ ABSOLUTE)
foreach(redist_file ${REDIST_FILE_NAMES})
if(EXISTS "${_path}/${redist_file}")
set(VCREDISTRUNTIME_FOUND "YES")
set(VCREDISTRUNTIME_FILE ${_path}/${redist_file})
break()
endif()
endforeach()
endif()
if(VCREDISTRUNTIME_FOUND)
message(STATUS "Found VCredist ${VCREDISTRUNTIME_FILE}")
else()
message(
WARNING "Could not find VCredist package. It's not required for compiling, but needs to be available at runtime."
)
endif()
endif()

View File

@@ -1,69 +0,0 @@
# Find the OpenSSL runtime libraries (.dll) for Windows that
# will be needed by Qt in order to access https urls.
if (WIN32)
# Get standard installation paths for OpenSSL under Windows
# http://www.slproweb.com/products/Win32OpenSSL.html
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
# target win64
set(_OPENSSL_ROOT_HINTS
${OPENSSL_ROOT_DIR}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]"
ENV OPENSSL_ROOT_DIR
)
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
set(_OPENSSL_ROOT_PATHS
"${_programfiles}/OpenSSL-Win64"
"C:/OpenSSL-Win64/"
)
unset(_programfiles)
else( CMAKE_SIZEOF_VOID_P EQUAL 8 )
# target win32
set(_OPENSSL_ROOT_HINTS
${OPENSSL_ROOT_DIR}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]"
ENV OPENSSL_ROOT_DIR
)
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
set(_OPENSSL_ROOT_PATHS
"${_programfiles}/OpenSSL"
"${_programfiles}/OpenSSL-Win32"
"C:/OpenSSL/"
"C:/OpenSSL-Win32/"
)
unset(_programfiles)
endif( CMAKE_SIZEOF_VOID_P EQUAL 8 )
else ()
set(_OPENSSL_ROOT_HINTS
${OPENSSL_ROOT_DIR}
ENV OPENSSL_ROOT_DIR
)
endif ()
set(_OPENSSL_ROOT_HINTS_AND_PATHS
HINTS ${_OPENSSL_ROOT_HINTS}
PATHS ${_OPENSSL_ROOT_PATHS}
)
# For OpenSSL < 1.1, they are named libeay32 and ssleay32 and even if the dll is 64bit, it's still suffixed as *32.dll
# For OpenSSL >= 1.1, they are named libcrypto and libssl with no suffix
FIND_FILE(WIN32SSLRUNTIME_LIBEAY NAMES libeay32.dll libcrypto.dll ${_OPENSSL_ROOT_HINTS_AND_PATHS})
FIND_FILE(WIN32SSLRUNTIME_SSLEAY NAMES ssleay32.dll libssl.dll ${_OPENSSL_ROOT_HINTS_AND_PATHS})
IF(WIN32SSLRUNTIME_LIBEAY AND WIN32SSLRUNTIME_SSLEAY)
SET(WIN32SSLRUNTIME_LIBRARIES "${WIN32SSLRUNTIME_LIBEAY}" "${WIN32SSLRUNTIME_SSLEAY}")
SET(WIN32SSLRUNTIME_FOUND "YES")
message(STATUS "Found OpenSSL ${WIN32SSLRUNTIME_LIBRARIES}")
ELSE()
SET(WIN32SSLRUNTIME_FOUND "NO")
message(WARNING "Could not find OpenSSL runtime libraries. They are not required for compiling, but needs to be available at runtime.")
ENDIF()
MARK_AS_ADVANCED(
WIN32SSLRUNTIME_LIBEAY
WIN32SSLRUNTIME_SSLEAY
)

View File

@@ -35,4 +35,4 @@
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
</plist>

View File

@@ -1 +1,2 @@
!define NSIS_SOURCE_PATH "@PROJECT_SOURCE_DIR@"
!define NSIS_SOURCE_PATH "@PROJECT_SOURCE_DIR@"
!define NSIS_IS_64_BIT @TRICE_IS_64_BIT@

View File

@@ -1,14 +1,22 @@
!include ..\..\..\NSIS.definitions.nsh
!include "MUI2.nsh"
!include "FileFunc.nsh"
Name "@CPACK_PACKAGE_NAME@"
BrandingText "@CPACK_PACKAGE_NAME@-@CPACK_PACKAGE_VERSION_MAJOR@"
BrandingText "@CPACK_PACKAGE_FILE_NAME@"
OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
SetCompressor /SOLID lzma
InstallDir "$PROGRAMFILES\Cockatrice"
!define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@"
RequestExecutionlevel admin
SetCompressor LZMA
Var NormalDestDir
Var PortableDestDir
Var PortableMode
!include LogicLib.nsh
!include FileFunc.nsh
!include MUI2.nsh
!include x64.nsh
!define MUI_ABORTWARNING
!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSIS_SOURCE_PATH}\cmake\leftimage.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSIS_SOURCE_PATH}\cmake\leftimage.bmp"
@@ -20,7 +28,9 @@ InstallDir "$PROGRAMFILES\Cockatrice"
!define MUI_FINISHPAGE_RUN_TEXT "Run 'Cockatrice' now"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "${NSIS_SOURCE_PATH}\COPYING"
!insertmacro MUI_PAGE_LICENSE "${NSIS_SOURCE_PATH}\LICENSE"
Page Custom PortableModePageCreate PortableModePageLeave
!define MUI_PAGE_CUSTOMFUNCTION_PRE componentsPagePre
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
@@ -31,46 +41,171 @@ InstallDir "$PROGRAMFILES\Cockatrice"
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE English
Function .onInit
${If} ${NSIS_IS_64_BIT} == 1 #NSIS 64bit
${IfNot} ${RunningX64}
MessageBox MB_OK|MB_ICONSTOP "This version of Cockatrice requires a 64-bit Windows system."
Abort
${EndIf}
StrCpy $NormalDestDir "$ProgramFiles64\Cockatrice"
SetRegView 64
${Else} #NSIS 32bit
${If} ${RunningX64}
MessageBox MB_OK|MB_ICONEXCLAMATION \
"You are about to install a 32-bit version of Cockatrice on a 64-bit Windows system.$\n\
We advise you to use the correct 64-bit installer instead to get around potential issues.$\n$\n\
Download from our webpage: https://cockatrice.github.io"
${EndIf}
StrCpy $NormalDestDir "$ProgramFiles\Cockatrice"
${EndIf}
StrCpy $PortableDestDir "$Desktop\CockatricePortable"
${GetParameters} $9
ClearErrors
${GetOptions} $9 "/?" $8
${IfNot} ${Errors}
MessageBox MB_ICONINFORMATION|MB_SETFOREGROUND "\
/PORTABLE : Install in portable mode$\n\
/S : Silent install$\n\
/D=%directory% : Specify destination directory$\n"
Quit
${EndIf}
ClearErrors
${GetOptions} $9 "/PORTABLE" $8
${IfNot} ${Errors}
StrCpy $PortableMode 1
StrCpy $0 $PortableDestDir
${Else}
StrCpy $PortableMode 0
StrCpy $0 $NormalDestDir
${If} ${Silent}
Call RequireAdmin
${EndIf}
${EndIf}
${If} $InstDir == ""
; User did not use /D to specify a directory,
; we need to set a default based on the install mode
StrCpy $InstDir $0
${EndIf}
Call SetModeDestinationFromInstdir
FunctionEnd
Function un.onInit
${If} ${NSIS_IS_64_BIT} == 1
SetRegView 64
${EndIf}
FunctionEnd
Function RequireAdmin
UserInfo::GetAccountType
Pop $8
${If} $8 != "admin"
MessageBox MB_ICONSTOP "You need administrator rights to install Cockatrice"
SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
Abort
${EndIf}
FunctionEnd
Function SetModeDestinationFromInstdir
${If} $PortableMode = 0
StrCpy $NormalDestDir $InstDir
${Else}
StrCpy $PortableDestDir $InstDir
${EndIf}
FunctionEnd
Function PortableModePageCreate
Call SetModeDestinationFromInstdir ; If the user clicks BACK on the directory page we will remember their mode specific directory
!insertmacro MUI_HEADER_TEXT "Install Mode" "Choose how you want to install Cockatrice."
nsDialogs::Create 1018
Pop $0
${NSD_CreateLabel} 0 10u 100% 24u "Select install mode:"
Pop $0
${NSD_CreateRadioButton} 30u 50u -30u 8u "Normal installation"
Pop $1
${NSD_CreateRadioButton} 30u 70u -30u 8u "Portable mode (all files in a single folder)"
Pop $2
${If} $PortableMode = 0
SendMessage $1 ${BM_SETCHECK} ${BST_CHECKED} 0
${Else}
SendMessage $2 ${BM_SETCHECK} ${BST_CHECKED} 0
${EndIf}
nsDialogs::Show
FunctionEnd
Function PortableModePageLeave
${NSD_GetState} $1 $0
${If} $0 <> ${BST_UNCHECKED}
StrCpy $PortableMode 0
StrCpy $InstDir $NormalDestDir
Call RequireAdmin
${Else}
StrCpy $PortableMode 1
StrCpy $InstDir $PortableDestDir
${EndIf}
FunctionEnd
Function componentsPagePre
${If} $PortableMode = 0
SetShellVarContext all
# uninstall 32bit version
SetRegView 32
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
StrCmp $R0 "" done32
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "A previous version of Cockatrice must be uninstalled before installing the new one." IDOK uninst32
Abort
uninst32:
ClearErrors
ExecWait "$R0"
done32:
# uninstall 64bit version
${If} ${NSIS_IS_64_BIT} == 1
SetRegView 64
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
StrCmp $R0 "" done64
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "A previous version of Cockatrice must be uninstalled before installing the new one." IDOK uninst64
Abort
uninst64:
ClearErrors
ExecWait "$R0"
done64:
${EndIf}
${Else}
Abort
${EndIf}
FunctionEnd
Section "Application" SecApplication
SetShellVarContext all
SetOutPath "$INSTDIR"
@CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS@
@CPACK_NSIS_FULL_INSTALL@
SetShellVarContext all
SetOutPath "$INSTDIR"
WriteUninstaller "$INSTDIR\uninstall.exe"
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayName" "Cockatrice"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "InstallLocation" "$INSTDIR"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayIcon" "$INSTDIR\cockatrice.exe"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "EstimatedSize" "$0"
SectionEnd
Section "Update configuration" SecUpdateConfig
SetShellVarContext current
WriteRegStr HKCU "Software\Cockatrice\Cockatrice\paths" "carddatabase" "$LOCALAPPDATA\Cockatrice\cards.xml"
WriteRegStr HKCU "Software\Cockatrice\Cockatrice\paths" "tokendatabase" "$LOCALAPPDATA\Cockatrice\tokens.xml"
WriteRegStr HKCU "Software\Cockatrice\Cockatrice\paths" "decks" "$LOCALAPPDATA\Cockatrice\decks"
WriteRegStr HKCU "Software\Cockatrice\Cockatrice\paths" "pics" "$LOCALAPPDATA\Cockatrice\pics"
WriteRegStr HKCU "Software\Cockatrice\Cockatrice\replays" "pics" "$LOCALAPPDATA\Cockatrice\replays"
WriteRegStr HKCU "Software\Cockatrice\Cockatrice\sound" "path" "$INSTDIR\sounds"
SectionEnd
Section "Start menu item" SecStartMenu
SetShellVarContext all
createDirectory "$SMPROGRAMS\Cockatrice"
createShortCut "$SMPROGRAMS\Cockatrice\Cockatrice.lnk" "$INSTDIR\cockatrice.exe"
createShortCut "$SMPROGRAMS\Cockatrice\Oracle.lnk" "$INSTDIR\oracle.exe"
createShortCut "$SMPROGRAMS\Cockatrice\Servatrice.lnk" "$INSTDIR\servatrice.exe"
SectionEnd
Section "un.Application" UnSecApplication
SetShellVarContext all
${If} $PortableMode = 1
${AndIf} ${FileExists} "$INSTDIR\portable.dat"
; upgrade portable mode
RMDir /r "$INSTDIR\plugins"
RMDir /r "$INSTDIR\sounds"
RMDir /r "$INSTDIR\themes"
@@ -78,6 +213,7 @@ Section "un.Application" UnSecApplication
Delete "$INSTDIR\uninstall.exe"
Delete "$INSTDIR\cockatrice.exe"
Delete "$INSTDIR\oracle.exe"
Delete "$INSTDIR\dbconverter.exe"
Delete "$INSTDIR\servatrice.exe"
Delete "$INSTDIR\Qt*.dll"
Delete "$INSTDIR\libmysql.dll"
@@ -90,6 +226,82 @@ Section "un.Application" UnSecApplication
Delete "$INSTDIR\servatrice.ini.example"
Delete "$INSTDIR\zlib*.dll"
RMDir "$INSTDIR"
${EndIf}
@CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS@
@CPACK_NSIS_FULL_INSTALL@
${If} $PortableMode = 0
WriteUninstaller "$INSTDIR\uninstall.exe"
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0
; Enable Windows User-Mode Dumps
; https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps
WriteRegExpandStr HKLM "Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\cockatrice.exe" "DumpFolder" "%LOCALAPPDATA%\CrashDumps\Cockatrice"
WriteRegDWORD HKLM "Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\cockatrice.exe" "DumpCount" "5"
WriteRegDWORD HKLM "Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\cockatrice.exe" "DumpType" "2"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayIcon" "$INSTDIR\cockatrice.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayName" "Cockatrice"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "DisplayVersion" "@CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@.@CPACK_PACKAGE_VERSION_PATCH@"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "EstimatedSize" "$0"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "InstallLocation" "$INSTDIR"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "NoModify" "1"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "NoRepair" "1"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "Publisher" "Cockatrice team"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "VersionMajor" "@CPACK_PACKAGE_VERSION_MAJOR@"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "VersionMinor" "@CPACK_PACKAGE_VERSION_MINOR@"
IfFileExists "$INSTDIR\vc_redist.x86.exe" VcRedist86Exists PastVcRedist86Check
VcRedist86Exists:
ExecWait '"$INSTDIR\vc_redist.x86.exe" /passive /norestart'
DetailPrint "Wait to ensure unlock of vc_redist file after installation..."
Sleep 3000
Delete "$INSTDIR\vc_redist.x86.exe"
PastVcRedist86Check:
IfFileExists "$INSTDIR\vc_redist.x64.exe" VcRedist64Exists PastVcRedist64Check
VcRedist64Exists:
ExecWait '"$INSTDIR\vc_redist.x64.exe" /passive /norestart'
DetailPrint "Sleep to ensure unlock of vc_redist file after installation..."
Sleep 3000
Delete "$INSTDIR\vc_redist.x64.exe"
PastVcRedist64Check:
${Else}
; Create the file the application uses to detect portable mode
FileOpen $0 "$INSTDIR\portable.dat" w
FileWrite $0 "PORTABLE"
FileClose $0
${EndIf}
SectionEnd
Section "Start menu item" SecStartMenu
${If} $PortableMode = 0
SetShellVarContext all
createDirectory "$SMPROGRAMS\Cockatrice"
createShortCut "$SMPROGRAMS\Cockatrice\Cockatrice.lnk" "$INSTDIR\cockatrice.exe"
createShortCut "$SMPROGRAMS\Cockatrice\Oracle.lnk" "$INSTDIR\oracle.exe"
createShortCut "$SMPROGRAMS\Cockatrice\Servatrice.lnk" "$INSTDIR\servatrice.exe"
${EndIf}
SectionEnd
Section "un.Application" UnSecApplication
SetShellVarContext all
RMDir /r "$INSTDIR\plugins"
RMDir /r "$INSTDIR\sounds"
RMDir /r "$INSTDIR\themes"
RMDir /r "$INSTDIR\translations"
Delete "$INSTDIR\*.exe"
Delete "$INSTDIR\*.dll"
Delete "$INSTDIR\qt.conf"
Delete "$INSTDIR\qdebug.txt"
Delete "$INSTDIR\servatrice.sql"
Delete "$INSTDIR\servatrice.ini.example"
RMDir "$INSTDIR"
RMDir "$SMPROGRAMS\Cockatrice"
@@ -105,11 +317,9 @@ Section /o "un.Configurations, decks, cards, pics" UnSecConfiguration
SectionEnd
LangString DESC_SecApplication ${LANG_ENGLISH} "Cockatrice program files"
LangString DESC_SecUpdateConfig ${LANG_ENGLISH} "Update the paths in the application settings according to the installation paths."
LangString DESC_SecStartMenu ${LANG_ENGLISH} "Create start menu items for Cockatrice and Oracle."
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecApplication} $(DESC_SecApplication)
!insertmacro MUI_DESCRIPTION_TEXT ${SecUpdateConfig} $(DESC_SecUpdateConfig)
!insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenu} $(DESC_SecStartMenu)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
@@ -119,20 +329,3 @@ LangString DESC_UnSecConfiguration ${LANG_ENGLISH} "Configurations, decks, card
!insertmacro MUI_DESCRIPTION_TEXT ${UnSecApplication} $(DESC_UnSecApplication)
!insertmacro MUI_DESCRIPTION_TEXT ${UnSecConfiguration} $(DESC_UnSecConfiguration)
!insertmacro MUI_UNFUNCTION_DESCRIPTION_END
Function .onInit
SetShellVarContext all
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
StrCmp $R0 "" done
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "A previous version of Cockatrice must be uninstalled before installing the new one." IDOK uninst
Abort
uninst:
ClearErrors
ExecWait "$R0"
done:
FunctionEnd

View File

@@ -0,0 +1,27 @@
# This script re-signs all apps after CPack packages them. This is necessary because CPack modifies
# the library references used by Cockatrice to App relative paths, invalidating the code signature.
string(LENGTH "$ENV{MACOS_CERTIFICATE_NAME}" MACOS_CERTIFICATE_NAME_LEN)
if(APPLE AND MACOS_CERTIFICATE_NAME_LEN GREATER 0)
set(APPLICATIONS "cockatrice" "servatrice" "oracle" "dbconverter")
foreach(app_name IN LISTS APPLICATIONS)
set(FULL_APP_PATH "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/${app_name}.app")
message(STATUS "Signing Interior Dynamically Loaded Libraries for ${app_name}.app")
execute_process(COMMAND "find" "${FULL_APP_PATH}" "-name" "*.dylib" OUTPUT_VARIABLE INTERIOR_DLLS)
string(REPLACE "\n" ";" INTERIOR_DLLS_LIST ${INTERIOR_DLLS})
foreach(INTERIOR_DLL IN LISTS INTERIOR_DLLS_LIST)
execute_process(
COMMAND "codesign" "--sign" "$ENV{MACOS_CERTIFICATE_NAME}" "--entitlements" "../.ci/macos.entitlements"
"--options" "runtime" "--force" "--deep" "--timestamp" "--verbose" "${INTERIOR_DLL}"
)
endforeach()
message(STATUS "Signing Exterior Applications ${app_name}.app")
execute_process(
COMMAND "codesign" "--sign" "$ENV{MACOS_CERTIFICATE_NAME}" "--entitlements" "../.ci/macos.entitlements"
"--options" "runtime" "--force" "--deep" "--timestamp" "--verbose" "${FULL_APP_PATH}"
)
endforeach()
endif()

View File

@@ -1,21 +1,24 @@
set(VERSION_STRING_CPP "${PROJECT_BINARY_DIR}/version_string.cpp")
set(VERSION_STRING_H "${PROJECT_BINARY_DIR}/version_string.h")
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})
include_directories(${PROJECT_BINARY_DIR})
set( hstring "extern const char *VERSION_STRING\;
set(hstring
"extern const char *VERSION_STRING\;
extern const char *VERSION_COMMIT\;
extern const char *VERSION_DATE\;\n" )
set( cppstring "const char *VERSION_STRING = \"${PROJECT_VERSION_FRIENDLY}\"\;
extern const char *VERSION_DATE\;\n"
)
set(cppstring
"const char *VERSION_STRING = \"${PROJECT_VERSION_FRIENDLY}\"\;
const char *VERSION_COMMIT = \"${GIT_COMMIT_ID}\"\;
const char *VERSION_DATE = \"${GIT_COMMIT_DATE_FRIENDLY}\"\;\n")
file(WRITE ${PROJECT_BINARY_DIR}/version_string.cpp.txt ${cppstring} )
file(WRITE ${PROJECT_BINARY_DIR}/version_string.h.txt ${hstring} )
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PROJECT_BINARY_DIR}/version_string.h.txt ${VERSION_STRING_H}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PROJECT_BINARY_DIR}/version_string.cpp.txt ${VERSION_STRING_CPP}
const char *VERSION_DATE = \"${GIT_COMMIT_DATE_FRIENDLY}\"\;\n"
)
file(WRITE ${PROJECT_BINARY_DIR}/version_string.cpp.txt ${cppstring})
file(WRITE ${PROJECT_BINARY_DIR}/version_string.h.txt ${hstring})
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PROJECT_BINARY_DIR}/version_string.h.txt ${VERSION_STRING_H}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PROJECT_BINARY_DIR}/version_string.cpp.txt ${VERSION_STRING_CPP}
)

BIN
cmake/dmgBackground.tif Normal file

Binary file not shown.

View File

@@ -1,40 +1,222 @@
# HELPER FUNCTIONS
function(get_commit_id)
# get last commit hash
execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 --abbrev=7 --date=short "--pretty=%h"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE res_var
OUTPUT_VARIABLE GIT_COM_ID
)
if(NOT ${res_var} EQUAL 0)
message(WARNING "Git failed (not a repo, or no tags). Build will not contain git revision info.")
return()
endif()
string(REPLACE "\n" "" GIT_COM_ID "${GIT_COM_ID}")
set(GIT_COMMIT_ID
"${GIT_COM_ID}"
PARENT_SCOPE
)
set(PROJECT_VERSION_LABEL
"custom-${GIT_COM_ID}"
PARENT_SCOPE
)
endfunction()
function(get_commit_date)
# get last commit date
execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 --date=short "--pretty=%cd"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE res_var
OUTPUT_VARIABLE GIT_COM_DATE
)
if(NOT ${res_var} EQUAL 0)
message(WARNING "Git failed (not a repo, or no tags). Build will not contain git revision info.")
return()
endif()
string(REPLACE "\n" "" GIT_COM_DATE "${GIT_COM_DATE}")
set(GIT_COMMIT_DATE_FRIENDLY
"${GIT_COM_DATE}"
PARENT_SCOPE
)
string(REPLACE "-" "" GIT_COM_DATE "${GIT_COM_DATE}")
set(GIT_COMMIT_DATE
"${GIT_COM_DATE}"
PARENT_SCOPE
)
endfunction()
function(get_tag_name commit)
if(${commit} STREQUAL "unknown")
return()
endif()
execute_process(
COMMAND ${GIT_EXECUTABLE} describe --exact-match --tags ${commit}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE res_var
OUTPUT_VARIABLE GIT_TAG
ERROR_VARIABLE GIT_TAG_ERR
)
if((NOT ${res_var} EQUAL 0) OR (${GIT_TAG_ERR} MATCHES "fatal: no tag exactly matches.*"))
message(STATUS "Commit is not a release or prerelease (no git tag found)")
return()
endif()
string(REPLACE "\n" "" GIT_TAG "${GIT_TAG}")
message(STATUS "Commit is a release or prerelease, git tag: ${GIT_TAG}")
# Extract information from tag:
# YYYY-MM-DD-Release-MAJ.MIN.PATCH
# YYYY-MM-DD-Development-MAJ.MIN.PATCH-beta.X
string(REPLACE "-" ";" GIT_TAG_EXPLODED "${GIT_TAG}")
string(REPLACE "." ";" GIT_TAG_EXPLODED "${GIT_TAG_EXPLODED}")
# Sanity checks: length
list(LENGTH GIT_TAG_EXPLODED GIT_TAG_LISTCOUNT)
if(${GIT_TAG_LISTCOUNT} LESS 7 OR ${GIT_TAG_LISTCOUNT} GREATER 9)
message(WARNING "Invalid tag format, got ${GIT_TAG_LISTCOUNT} tokens")
return()
endif()
# Year
list(GET GIT_TAG_EXPLODED 0 GIT_TAG_YEAR)
if(${GIT_TAG_YEAR} LESS 2017 OR ${GIT_TAG_LISTCOUNT} GREATER 2100)
message(WARNING "Invalid tag year ${GIT_TAG_YEAR}")
return()
endif()
# Month
list(GET GIT_TAG_EXPLODED 1 GIT_TAG_MONTH)
if(${GIT_TAG_MONTH} LESS 1 OR ${GIT_TAG_MONTH} GREATER 12)
message(WARNING "Invalid tag month ${GIT_TAG_MONTH}")
return()
endif()
# Day
list(GET GIT_TAG_EXPLODED 2 GIT_TAG_DAY)
if(${GIT_TAG_DAY} LESS 1 OR ${GIT_TAG_DAY} GREATER 31)
message(WARNING "Invalid tag day ${GIT_TAG_DAY}")
return()
endif()
# Type
list(GET GIT_TAG_EXPLODED 3 GIT_TAG_TYPE)
if(NOT (${GIT_TAG_TYPE} STREQUAL "Release" OR ${GIT_TAG_TYPE} STREQUAL "Development"))
message(WARNING "Invalid tag type ${GIT_TAG_TYPE}")
return()
endif()
# Major
list(GET GIT_TAG_EXPLODED 4 GIT_TAG_MAJOR)
if(${GIT_TAG_MAJOR} LESS 0 OR ${GIT_TAG_MAJOR} GREATER 99)
message(WARNING "Invalid tag major version ${GIT_TAG_MAJOR}")
return()
endif()
# Minor
list(GET GIT_TAG_EXPLODED 5 GIT_TAG_MINOR)
if(${GIT_TAG_MINOR} LESS 0 OR ${GIT_TAG_MINOR} GREATER 99)
message(WARNING "Invalid tag minor version ${GIT_TAG_MINOR}")
return()
endif()
# Patch
list(GET GIT_TAG_EXPLODED 6 GIT_TAG_PATCH)
if(${GIT_TAG_PATCH} LESS 0 OR ${GIT_TAG_PATCH} GREATER 99)
message(WARNING "Invalid tag patch version ${GIT_TAG_PATCH}")
return()
endif()
# Label
# 7 = Stable release
# 8 = Dev release, first beta so only "beta" attached
# 9 = Dev release, subsequent beta so "beta.N" attached (N>=2)
if(${GIT_TAG_LISTCOUNT} EQUAL 8)
list(GET GIT_TAG_EXPLODED 7 GIT_TAG_LABEL)
elseif(${GIT_TAG_LISTCOUNT} EQUAL 9)
list(GET GIT_TAG_EXPLODED 7 GIT_TAG_LABEL)
list(GET GIT_TAG_EXPLODED 8 GIT_TAG_LABEL_NUM)
set(GIT_TAG_LABEL ${GIT_TAG_LABEL} ${GIT_TAG_LABEL_NUM})
string(REPLACE ";" "." GIT_TAG_LABEL "${GIT_TAG_LABEL}")
else()
set(GIT_TAG_LABEL "")
endif()
# Override hardcoded version with the informations from the tag
set(PROJECT_VERSION_MAJOR
${GIT_TAG_MAJOR}
PARENT_SCOPE
)
set(PROJECT_VERSION_MINOR
${GIT_TAG_MINOR}
PARENT_SCOPE
)
set(PROJECT_VERSION_PATCH
${GIT_TAG_PATCH}
PARENT_SCOPE
)
set(PROJECT_VERSION_LABEL
${GIT_TAG_LABEL}
PARENT_SCOPE
)
if(${GIT_TAG_TYPE} STREQUAL "Development")
set(PROJECT_VERSION_LABEL
${GIT_TAG_LABEL}
PARENT_SCOPE
)
elseif(${GIT_TAG_TYPE} STREQUAL "Release")
set(PROJECT_VERSION_LABEL
""
PARENT_SCOPE
)
# set release name from env var
set(PROJECT_VERSION_RELEASENAME
"${GIT_TAG_RELEASENAME}"
PARENT_SCOPE
)
endif()
endfunction()
# START OF MAIN
# fallback defaults
set(GIT_COMMIT_ID "unknown")
set(GIT_COMMIT_DATE "")
set(GIT_COMMIT_DATE_FRIENDLY "")
set(PROJECT_VERSION_LABEL "")
set(PROJECT_VERSION_RELEASENAME "")
find_package(Git)
if(GIT_FOUND)
execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 --abbrev=7 --date=short "--pretty=%h"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE res_var
OUTPUT_VARIABLE GIT_COM_ID
)
if( NOT ${res_var} EQUAL 0 )
set( GIT_COMMIT_ID "unknown")
message( WARNING "Git failed (not a repo, or no tags). Build will not contain git revision info." )
endif()
string( REPLACE "\n" "" GIT_COMMIT_ID "${GIT_COM_ID}" )
execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 --date=short "--pretty=%cd"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE res_var
OUTPUT_VARIABLE GIT_COM_DATE
)
if( NOT ${res_var} EQUAL 0 )
set( GIT_COMMIT_DATE "unknown")
set( GIT_COMMIT_DATE_FRIENDLY "unknown")
message( WARNING "Git failed (not a repo, or no tags). Build will not contain git revision info." )
endif()
string( REPLACE "\n" "" GIT_COMMIT_DATE_FRIENDLY "${GIT_COM_DATE}" )
string( REPLACE "-" "" GIT_COMMIT_DATE "${GIT_COMMIT_DATE_FRIENDLY}" )
get_commit_id()
get_commit_date()
get_tag_name(${GIT_COMMIT_ID})
else()
set( GIT_COMMIT_ID "unknown")
set( GIT_COMMIT_DATE "unknown")
set( GIT_COMMIT_DATE_FRIENDLY "unknown")
message( WARNING "Git not found. Build will not contain git revision info." )
message(WARNING "Git not found. Build will not contain git revision info.")
endif()
set(PROJECT_VERSION_MAJOR "0")
set(PROJECT_VERSION_MINOR "0")
set(PROJECT_VERSION_PATCH "1~git${GIT_COMMIT_DATE}.${GIT_COMMIT_ID}")
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
set(PROJECT_VERSION_FRIENDLY "${GIT_COMMIT_ID} (${GIT_COMMIT_DATE_FRIENDLY})")
if(PROJECT_VERSION_LABEL)
set(PROJECT_VERSION "${PROJECT_VERSION}-${PROJECT_VERSION_LABEL}")
endif()
set(PROJECT_VERSION_FRIENDLY "${PROJECT_VERSION} (${GIT_COMMIT_DATE_FRIENDLY})")
# Format: <program name>[-ReleaseName]-MAJ.MIN.PATCH[-prerelease_label]
set(PROJECT_VERSION_FILENAME "${PROJECT_NAME}")
if(PROJECT_VERSION_RELEASENAME)
set(PROJECT_VERSION_FILENAME "${PROJECT_VERSION_FILENAME}-${PROJECT_VERSION_RELEASENAME}")
endif()
set(PROJECT_VERSION_FILENAME "${PROJECT_VERSION_FILENAME}-${PROJECT_VERSION}")
message(STATUS "Project version: ${PROJECT_VERSION}")
message(STATUS "Friendly project version: ${PROJECT_VERSION_FRIENDLY}")
message(STATUS "Project version filename: ${PROJECT_VERSION_FILENAME}")

View File

@@ -4,12 +4,12 @@ project(gtest-download LANGUAGES NONE)
include(ExternalProject)
ExternalProject_Add(googletest
URL https://github.com/google/googletest/archive/release-1.7.0.zip
URL_HASH SHA1=f89bc9f55477df2fde082481e2d709bfafdb057b
URL https://github.com/google/googletest/archive/release-1.11.0.zip
URL_HASH SHA1=9ffb7b5923f4a8fcdabf2f42c6540cce299f44c0
SOURCE_DIR "${CMAKE_BINARY_DIR}/gtest-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/gtest-build"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
)

3
cmake/launch-c.in Normal file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
export CCACHE_CPP2=true
exec "${RULE_LAUNCH_COMPILE}" "${CMAKE_C_COMPILER}" "$@"

3
cmake/launch-cxx.in Normal file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
export CCACHE_CPP2=true
exec "${RULE_LAUNCH_COMPILE}" "${CMAKE_CXX_COMPILER}" "$@"

View File

@@ -2,315 +2,583 @@
#
# provides the cockatrice binary
PROJECT(Cockatrice)
project(Cockatrice VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
SET(cockatrice_SOURCES
src/abstractcounter.cpp
src/counter_general.cpp
src/dlg_creategame.cpp
src/dlg_filter_games.cpp
src/dlg_connect.cpp
src/dlg_create_token.cpp
src/dlg_edit_avatar.cpp
src/dlg_edit_password.cpp
src/dlg_edit_tokens.cpp
src/dlg_edit_user.cpp
src/dlg_forgotpasswordrequest.cpp
src/dlg_forgotpasswordreset.cpp
src/dlg_forgotpasswordchallenge.cpp
src/dlg_register.cpp
src/dlg_update.cpp
src/dlg_viewlog.cpp
src/abstractclient.cpp
src/remoteclient.cpp
src/main.cpp
src/window_main.cpp
src/gamesmodel.cpp
src/player.cpp
src/playertarget.cpp
src/cardzone.cpp
src/selectzone.cpp
src/cardlist.cpp
src/abstractcarditem.cpp
src/carditem.cpp
src/tablezone.cpp
src/handzone.cpp
src/handcounter.cpp
src/carddatabase.cpp
src/keysignals.cpp
src/gameview.cpp
src/gameselector.cpp
src/decklistmodel.cpp
src/deck_loader.cpp
src/dlg_load_deck_from_clipboard.cpp
src/dlg_load_remote_deck.cpp
src/cardinfowidget.cpp
src/cardframe.cpp
src/cardinfopicture.cpp
src/cardinfotext.cpp
src/filterbuilder.cpp
src/cardfilter.cpp
src/filtertreemodel.cpp
src/filtertree.cpp
src/messagelogwidget.cpp
src/zoneviewzone.cpp
src/zoneviewwidget.cpp
src/pilezone.cpp
src/stackzone.cpp
src/carddragitem.cpp
src/carddatabasemodel.cpp
src/setsmodel.cpp
src/window_sets.cpp
src/abstractgraphicsitem.cpp
src/abstractcarddragitem.cpp
src/dlg_settings.cpp
src/phasestoolbar.cpp
src/gamescene.cpp
src/arrowitem.cpp
src/arrowtarget.cpp
src/tab.cpp
src/tab_server.cpp
src/tab_room.cpp
src/tab_message.cpp
src/tab_game.cpp
src/tab_deck_storage.cpp
src/tab_replays.cpp
src/tab_supervisor.cpp
src/tab_admin.cpp
src/tab_userlists.cpp
src/tab_deck_editor.cpp
src/tab_logs.cpp
src/replay_timeline_widget.cpp
src/deckstats_interface.cpp
src/tappedout_interface.cpp
src/chatview/chatview.cpp
src/chatview/userlistProxy.h
src/userlist.cpp
src/userinfobox.cpp
src/user_context_menu.cpp
src/remotedecklist_treewidget.cpp
src/remotereplaylist_treewidget.cpp
src/deckview.cpp
src/playerlistwidget.cpp
src/pixmapgenerator.cpp
src/settingscache.cpp
src/thememanager.cpp
src/localserver.cpp
src/localserverinterface.cpp
src/localclient.cpp
src/priceupdater.cpp
src/qt-json/json.cpp
src/soundengine.cpp
src/pending_command.cpp
src/pictureloader.cpp
src/shortcutssettings.cpp
src/sequenceEdit/sequenceedit.cpp
src/sequenceEdit/shortcutstab.cpp
src/lineeditcompleter.cpp
src/settings/settingsmanager.cpp
src/settings/carddatabasesettings.cpp
src/settings/serverssettings.cpp
src/settings/messagesettings.cpp
src/settings/gamefilterssettings.cpp
src/settings/layoutssettings.cpp
src/update_downloader.cpp
src/logger.cpp
src/releasechannel.cpp
src/userconnection_information.cpp
set(cockatrice_SOURCES
${VERSION_STRING_CPP}
# sort by alphabetical order, so that there is no debate about where to add new sources to the list
src/client/network/update/client/update_downloader.cpp
src/client/network/interfaces/deck_stats_interface.cpp
src/client/network/interfaces/tapped_out_interface.cpp
src/client/network/parsers/deck_link_to_api_transformer.cpp
src/client/network/update/client/client_update_checker.cpp
src/client/network/update/client/release_channel.cpp
src/client/network/update/card_spoiler/spoiler_background_updater.cpp
src/client/sound_engine.cpp
src/client/settings/cache_settings.cpp
src/client/settings/card_counter_settings.cpp
src/client/settings/shortcut_treeview.cpp
src/client/settings/shortcuts_settings.cpp
src/interface/deck_loader/deck_loader.cpp
src/interface/widgets/dialogs/dlg_connect.cpp
src/interface/widgets/dialogs/dlg_convert_deck_to_cod_format.cpp
src/interface/widgets/dialogs/dlg_create_game.cpp
src/interface/widgets/dialogs/dlg_default_tags_editor.cpp
src/interface/widgets/dialogs/dlg_edit_avatar.cpp
src/interface/widgets/dialogs/dlg_edit_password.cpp
src/interface/widgets/dialogs/dlg_edit_tokens.cpp
src/interface/widgets/dialogs/dlg_edit_user.cpp
src/interface/widgets/dialogs/dlg_filter_games.cpp
src/interface/widgets/dialogs/dlg_forgot_password_challenge.cpp
src/interface/widgets/dialogs/dlg_forgot_password_request.cpp
src/interface/widgets/dialogs/dlg_forgot_password_reset.cpp
src/interface/widgets/dialogs/dlg_load_deck.cpp
src/interface/widgets/dialogs/dlg_load_deck_from_clipboard.cpp
src/interface/widgets/dialogs/dlg_load_deck_from_website.cpp
src/interface/widgets/dialogs/dlg_load_remote_deck.cpp
src/interface/widgets/dialogs/dlg_manage_sets.cpp
src/interface/widgets/dialogs/dlg_register.cpp
src/interface/widgets/dialogs/dlg_select_set_for_cards.cpp
src/interface/widgets/dialogs/dlg_settings.cpp
src/interface/widgets/dialogs/dlg_startup_card_check.cpp
src/interface/widgets/dialogs/dlg_tip_of_the_day.cpp
src/interface/widgets/dialogs/dlg_update.cpp
src/interface/widgets/dialogs/dlg_view_log.cpp
src/interface/widgets/dialogs/tip_of_the_day.cpp
src/filters/deck_filter_string.cpp
src/filters/filter_builder.cpp
src/filters/filter_tree_model.cpp
src/filters/syntax_help.cpp
src/game/abstract_game.cpp
src/game/board/abstract_card_drag_item.cpp
src/game/board/abstract_card_item.cpp
src/game/board/abstract_counter.cpp
src/game/board/arrow_item.cpp
src/game/board/arrow_target.cpp
src/game/board/card_drag_item.cpp
src/game/board/card_item.cpp
src/game/board/card_list.cpp
src/game/board/counter_general.cpp
src/game/board/translate_counter_name.cpp
src/game/deckview/deck_view.cpp
src/game/deckview/deck_view_container.cpp
src/game/deckview/tabbed_deck_view_container.cpp
src/game/dialogs/dlg_create_token.cpp
src/game/dialogs/dlg_move_top_cards_until.cpp
src/game/dialogs/dlg_roll_dice.cpp
src/game/game.cpp
src/game/game_event_handler.cpp
src/game/game_meta_info.cpp
src/game/game_scene.cpp
src/game/game_state.cpp
src/game/game_view.cpp
src/game/hand_counter.cpp
src/game/log/message_log_widget.cpp
src/game/phase.cpp
src/game/phases_toolbar.cpp
src/game/player/menu/card_menu.cpp
src/game/player/menu/custom_zone_menu.cpp
src/game/player/menu/grave_menu.cpp
src/game/player/menu/hand_menu.cpp
src/game/player/menu/library_menu.cpp
src/game/player/menu/move_menu.cpp
src/game/player/menu/player_menu.cpp
src/game/player/menu/pt_menu.cpp
src/game/player/menu/rfg_menu.cpp
src/game/player/menu/say_menu.cpp
src/game/player/menu/sideboard_menu.cpp
src/game/player/menu/utility_menu.cpp
src/game/player/player.cpp
src/game/player/player_actions.cpp
src/game/player/player_area.cpp
src/game/player/player_event_handler.cpp
src/game/player/player_graphics_item.cpp
src/game/player/player_info.cpp
src/game/player/player_list_widget.cpp
src/game/player/player_manager.cpp
src/game/player/player_target.cpp
src/game/replay.cpp
src/game/zones/card_zone.cpp
src/game/zones/hand_zone.cpp
src/game/zones/logic/card_zone_logic.cpp
src/game/zones/logic/hand_zone_logic.cpp
src/game/zones/logic/pile_zone_logic.cpp
src/game/zones/logic/stack_zone_logic.cpp
src/game/zones/logic/table_zone_logic.cpp
src/game/zones/logic/view_zone_logic.cpp
src/game/zones/pile_zone.cpp
src/game/zones/select_zone.cpp
src/game/zones/stack_zone.cpp
src/game/zones/table_zone.cpp
src/game/zones/view_zone.cpp
src/game/zones/view_zone_widget.cpp
src/game_graphics/board/abstract_graphics_item.cpp
src/interface/card_picture_loader/card_picture_loader.cpp
src/interface/card_picture_loader/card_picture_loader_local.cpp
src/interface/card_picture_loader/card_picture_loader_request_status_display_widget.cpp
src/interface/card_picture_loader/card_picture_loader_status_bar.cpp
src/interface/card_picture_loader/card_picture_loader_worker.cpp
src/interface/card_picture_loader/card_picture_loader_worker_work.cpp
src/interface/card_picture_loader/card_picture_to_load.cpp
src/interface/layouts/flow_layout.cpp
src/interface/layouts/overlap_layout.cpp
src/interface/widgets/utility/line_edit_completer.cpp
src/interface/pixel_map_generator.cpp
src/interface/theme_manager.cpp
src/interface/widgets/cards/additional_info/color_identity_widget.cpp
src/interface/widgets/cards/additional_info/mana_cost_widget.cpp
src/interface/widgets/cards/additional_info/mana_symbol_widget.cpp
src/interface/widgets/cards/card_group_display_widgets/card_group_display_widget.cpp
src/interface/widgets/cards/card_group_display_widgets/flat_card_group_display_widget.cpp
src/interface/widgets/cards/card_group_display_widgets/overlapped_card_group_display_widget.cpp
src/interface/widgets/cards/card_info_display_widget.cpp
src/interface/widgets/cards/card_info_frame_widget.cpp
src/interface/widgets/cards/card_info_picture_art_crop_widget.cpp
src/interface/widgets/cards/card_info_picture_enlarged_widget.cpp
src/interface/widgets/cards/card_info_picture_widget.cpp
src/interface/widgets/cards/card_info_picture_with_text_overlay_widget.cpp
src/interface/widgets/cards/card_info_text_widget.cpp
src/interface/widgets/cards/card_size_widget.cpp
src/interface/widgets/cards/deck_card_zone_display_widget.cpp
src/interface/widgets/cards/deck_preview_card_picture_widget.cpp
src/interface/widgets/deck_analytics/deck_analytics_widget.cpp
src/interface/widgets/deck_analytics/deck_list_statistics_analyzer.cpp
src/interface/widgets/deck_analytics/mana_base_widget.cpp
src/interface/widgets/deck_analytics/mana_curve_widget.cpp
src/interface/widgets/deck_analytics/mana_devotion_widget.cpp
src/interface/widgets/deck_editor/deck_list_history_manager_widget.cpp
src/interface/widgets/deck_editor/deck_editor_card_info_dock_widget.cpp
src/interface/widgets/deck_editor/deck_editor_database_display_widget.cpp
src/interface/widgets/deck_editor/deck_editor_deck_dock_widget.cpp
src/interface/widgets/deck_editor/deck_editor_filter_dock_widget.cpp
src/interface/widgets/deck_editor/deck_editor_printing_selector_dock_widget.cpp
src/interface/widgets/deck_editor/deck_list_style_proxy.cpp
src/interface/widgets/general/background_sources.cpp
src/interface/widgets/general/display/background_plate_widget.cpp
src/interface/widgets/general/display/banner_widget.cpp
src/interface/widgets/general/display/bar_widget.cpp
src/interface/widgets/general/display/color_bar.cpp
src/interface/widgets/general/display/dynamic_font_size_label.cpp
src/interface/widgets/general/display/dynamic_font_size_push_button.cpp
src/interface/widgets/general/display/labeled_input.cpp
src/interface/widgets/general/display/percent_bar_widget.cpp
src/interface/widgets/general/display/shadow_background_label.cpp
src/interface/widgets/general/home_styled_button.cpp
src/interface/widgets/general/home_widget.cpp
src/interface/widgets/general/layout_containers/flow_widget.cpp
src/interface/widgets/general/layout_containers/overlap_control_widget.cpp
src/interface/widgets/general/layout_containers/overlap_widget.cpp
src/interface/widgets/menus/deck_editor_menu.cpp
src/interface/widgets/printing_selector/all_zones_card_amount_widget.cpp
src/interface/widgets/printing_selector/card_amount_widget.cpp
src/interface/widgets/printing_selector/printing_selector.cpp
src/interface/widgets/printing_selector/printing_selector_card_display_widget.cpp
src/interface/widgets/printing_selector/printing_selector_card_overlay_widget.cpp
src/interface/widgets/printing_selector/printing_selector_card_search_widget.cpp
src/interface/widgets/printing_selector/printing_selector_card_selection_widget.cpp
src/interface/widgets/printing_selector/printing_selector_card_sorting_widget.cpp
src/interface/widgets/printing_selector/set_name_and_collectors_number_display_widget.cpp
src/interface/widgets/quick_settings/settings_button_widget.cpp
src/interface/widgets/quick_settings/settings_popup_widget.cpp
src/interface/widgets/replay/replay_manager.cpp
src/interface/widgets/replay/replay_timeline_widget.cpp
src/interface/widgets/server/chat_view/chat_view.cpp
src/interface/widgets/server/game_selector.cpp
src/interface/widgets/server/game_selector_quick_filter_toolbar.cpp
src/interface/widgets/server/games_model.cpp
src/interface/widgets/server/handle_public_servers.cpp
src/interface/widgets/server/remote/remote_decklist_tree_widget.cpp
src/interface/widgets/server/remote/remote_replay_list_tree_widget.cpp
src/interface/widgets/server/user/user_context_menu.cpp
src/interface/widgets/server/user/user_info_box.cpp
src/interface/widgets/server/user/user_info_connection.cpp
src/interface/widgets/server/user/user_list_manager.cpp
src/interface/widgets/server/user/user_list_widget.cpp
src/interface/widgets/utility/custom_line_edit.cpp
src/interface/widgets/utility/get_text_with_max.cpp
src/interface/widgets/utility/sequence_edit.cpp
src/interface/widgets/visual_database_display/visual_database_display_color_filter_widget.cpp
src/interface/widgets/visual_database_display/visual_database_display_filter_save_load_widget.cpp
src/interface/widgets/visual_database_display/visual_database_display_main_type_filter_widget.cpp
src/interface/widgets/visual_database_display/visual_database_display_name_filter_widget.cpp
src/interface/widgets/visual_database_display/visual_database_display_set_filter_widget.cpp
src/interface/widgets/visual_database_display/visual_database_display_sub_type_filter_widget.cpp
src/interface/widgets/visual_database_display/visual_database_display_widget.cpp
src/interface/widgets/visual_database_display/visual_database_filter_display_widget.cpp
src/interface/widgets/visual_deck_editor/visual_deck_display_options_widget.cpp
src/interface/widgets/visual_deck_editor/visual_deck_editor_sample_hand_widget.cpp
src/interface/widgets/visual_deck_editor/visual_deck_editor_widget.cpp
src/interface/widgets/visual_deck_storage/deck_preview/deck_preview_color_identity_filter_widget.cpp
src/interface/widgets/visual_deck_storage/deck_preview/deck_preview_deck_tags_display_widget.cpp
src/interface/widgets/visual_deck_storage/deck_preview/deck_preview_tag_addition_widget.cpp
src/interface/widgets/visual_deck_storage/deck_preview/deck_preview_tag_dialog.cpp
src/interface/widgets/visual_deck_storage/deck_preview/deck_preview_tag_display_widget.cpp
src/interface/widgets/visual_deck_storage/deck_preview/deck_preview_tag_item_widget.cpp
src/interface/widgets/visual_deck_storage/deck_preview/deck_preview_widget.cpp
src/interface/widgets/visual_deck_storage/visual_deck_storage_folder_display_widget.cpp
src/interface/widgets/visual_deck_storage/visual_deck_storage_quick_settings_widget.cpp
src/interface/widgets/visual_deck_storage/visual_deck_storage_search_widget.cpp
src/interface/widgets/visual_deck_storage/visual_deck_storage_sort_widget.cpp
src/interface/widgets/visual_deck_storage/visual_deck_storage_tag_filter_widget.cpp
src/interface/widgets/visual_deck_storage/visual_deck_storage_widget.cpp
src/interface/window_main.cpp
src/main.cpp
src/interface/widgets/tabs/abstract_tab_deck_editor.cpp
src/interface/widgets/tabs/api/archidekt/tab_archidekt.cpp
src/interface/widgets/tabs/api/archidekt/api_response/archidekt_deck_listing_api_response.cpp
src/interface/widgets/tabs/api/archidekt/api_response/card/archidekt_api_response_card.cpp
src/interface/widgets/tabs/api/archidekt/api_response/card/archidekt_api_response_card_entry.cpp
src/interface/widgets/tabs/api/archidekt/api_response/card/archidekt_api_response_edition.cpp
src/interface/widgets/tabs/api/archidekt/api_response/deck/archidekt_api_response_deck.cpp
src/interface/widgets/tabs/api/archidekt/api_response/deck/archidekt_api_response_deck_category.cpp
src/interface/widgets/tabs/api/archidekt/api_response/deck_listings/archidekt_api_response_deck_listing_container.cpp
src/interface/widgets/tabs/api/archidekt/api_response/deck_listings/archidekt_api_response_deck_owner.cpp
src/interface/widgets/tabs/api/archidekt/display/archidekt_api_response_deck_display_widget.cpp
src/interface/widgets/tabs/api/archidekt/display/archidekt_api_response_deck_entry_display_widget.cpp
src/interface/widgets/tabs/api/archidekt/display/archidekt_api_response_deck_listings_display_widget.cpp
src/interface/widgets/tabs/api/archidekt/display/archidekt_deck_preview_image_display_widget.cpp
src/interface/widgets/tabs/api/edhrec/api_response/archidekt_links/edhrec_api_response_archidekt_links.cpp
src/interface/widgets/tabs/api/edhrec/api_response/average_deck/edhrec_average_deck_api_response.cpp
src/interface/widgets/tabs/api/edhrec/api_response/average_deck/edhrec_deck_api_response.cpp
src/interface/widgets/tabs/api/edhrec/api_response/card_prices/edhrec_api_response_card_prices.cpp
src/interface/widgets/tabs/api/edhrec/api_response/cards/edhrec_api_response_card_container.cpp
src/interface/widgets/tabs/api/edhrec/api_response/cards/edhrec_api_response_card_details.cpp
src/interface/widgets/tabs/api/edhrec/api_response/cards/edhrec_api_response_card_list.cpp
src/interface/widgets/tabs/api/edhrec/api_response/cards/edhrec_commander_api_response_commander_details.cpp
src/interface/widgets/tabs/api/edhrec/api_response/commander/edhrec_commander_api_response.cpp
src/interface/widgets/tabs/api/edhrec/api_response/commander/edhrec_commander_api_response_average_deck_statistics.cpp
src/interface/widgets/tabs/api/edhrec/api_response/top_cards/edhrec_top_cards_api_response.cpp
src/interface/widgets/tabs/api/edhrec/api_response/top_commanders/edhrec_top_commanders_api_response.cpp
src/interface/widgets/tabs/api/edhrec/api_response/top_tags/edhrec_top_tags_api_response.cpp
src/interface/widgets/tabs/api/edhrec/display/card_prices/edhrec_api_response_card_prices_display_widget.cpp
src/interface/widgets/tabs/api/edhrec/display/cards/edhrec_api_response_card_details_display_widget.cpp
src/interface/widgets/tabs/api/edhrec/display/cards/edhrec_api_response_card_inclusion_display_widget.cpp
src/interface/widgets/tabs/api/edhrec/display/cards/edhrec_api_response_card_list_display_widget.cpp
src/interface/widgets/tabs/api/edhrec/display/cards/edhrec_api_response_card_synergy_display_widget.cpp
src/interface/widgets/tabs/api/edhrec/display/commander/edhrec_api_response_commander_details_display_widget.cpp
src/interface/widgets/tabs/api/edhrec/display/commander/edhrec_commander_api_response_display_widget.cpp
src/interface/widgets/tabs/api/edhrec/display/commander/edhrec_commander_api_response_navigation_widget.cpp
src/interface/widgets/tabs/api/edhrec/display/top_cards/edhrec_top_cards_api_response_display_widget.cpp
src/interface/widgets/tabs/api/edhrec/display/top_commander/edhrec_top_commanders_api_response_display_widget.cpp
src/interface/widgets/tabs/api/edhrec/display/top_tags/edhrec_top_tags_api_response_display_widget.cpp
src/interface/widgets/tabs/api/edhrec/tab_edhrec.cpp
src/interface/widgets/tabs/api/edhrec/tab_edhrec_main.cpp
src/interface/widgets/tabs/tab.cpp
src/interface/widgets/tabs/tab_account.cpp
src/interface/widgets/tabs/tab_admin.cpp
src/interface/widgets/tabs/tab_deck_editor.cpp
src/interface/widgets/tabs/tab_deck_storage.cpp
src/interface/widgets/tabs/tab_game.cpp
src/interface/widgets/tabs/tab_home.cpp
src/interface/widgets/tabs/tab_logs.cpp
src/interface/widgets/tabs/tab_message.cpp
src/interface/widgets/tabs/tab_replays.cpp
src/interface/widgets/tabs/tab_room.cpp
src/interface/widgets/tabs/tab_server.cpp
src/interface/widgets/tabs/tab_supervisor.cpp
src/interface/widgets/tabs/tab_visual_database_display.cpp
src/interface/widgets/tabs/visual_deck_editor/tab_deck_editor_visual.cpp
src/interface/widgets/tabs/visual_deck_editor/tab_deck_editor_visual_tab_widget.cpp
src/interface/widgets/tabs/visual_deck_storage/tab_deck_storage_visual.cpp
src/interface/key_signals.cpp
src/interface/logger.cpp
)
add_subdirectory(sounds)
add_subdirectory(themes)
configure_file(
${CMAKE_SOURCE_DIR}/cockatrice/resources/config/qtlogging.ini ${CMAKE_BINARY_DIR}/cockatrice/qtlogging.ini COPYONLY
)
set(cockatrice_RESOURCES cockatrice.qrc)
IF(UPDATE_TRANSLATIONS)
FILE(GLOB_RECURSE translate_cockatrice_SRCS ${CMAKE_SOURCE_DIR}/cockatrice/src/*.cpp ${CMAKE_SOURCE_DIR}/cockatrice/src/*.h)
FILE(GLOB_RECURSE translate_common_SRCS ${CMAKE_SOURCE_DIR}/common/*.cpp ${CMAKE_SOURCE_DIR}/common/*.h)
SET(translate_SRCS ${translate_cockatrice_SRCS} ${translate_common_SRCS})
SET(cockatrice_TS "${CMAKE_CURRENT_SOURCE_DIR}/translations/cockatrice_en.ts")
ELSE()
FILE(GLOB cockatrice_TS "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts")
ENDIF(UPDATE_TRANSLATIONS)
if(UPDATE_TRANSLATIONS)
# Cockatrice main sources
file(GLOB_RECURSE translate_cockatrice_SRCS ${CMAKE_SOURCE_DIR}/cockatrice/src/*.cpp
${CMAKE_SOURCE_DIR}/cockatrice/src/*.h
)
# All libcockatrice_* libraries (recursively)
file(GLOB_RECURSE translate_lib_SRCS ${CMAKE_SOURCE_DIR}/libcockatrice_*/**/*.cpp
${CMAKE_SOURCE_DIR}/libcockatrice_*/**/*.h
)
# Combine all sources for translation
set(translate_SRCS ${translate_cockatrice_SRCS} ${translate_lib_SRCS})
set(cockatrice_TS "${CMAKE_CURRENT_SOURCE_DIR}/cockatrice_en@source.ts")
else()
file(GLOB cockatrice_TS "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts")
endif()
if(WIN32)
set(cockatrice_SOURCES ${cockatrice_SOURCES} cockatrice.rc)
set(cockatrice_SOURCES ${cockatrice_SOURCES} cockatrice.rc)
endif(WIN32)
if(APPLE)
set(MACOSX_BUNDLE_ICON_FILE appicon.icns)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/resources/appicon.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(cockatrice_SOURCES ${cockatrice_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/resources/appicon.icns)
ENDIF(APPLE)
set(MACOSX_BUNDLE_ICON_FILE appicon.icns)
set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/resources/appicon.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources
)
set(cockatrice_SOURCES ${cockatrice_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/resources/appicon.icns)
endif(APPLE)
set(COCKATRICE_LIBS)
# qt5 stuff
if(Qt5Widgets_FOUND)
include_directories(${Qt5Widgets_INCLUDE_DIRS})
list(APPEND COCKATRICE_LIBS Widgets)
# QtConcurrent
find_package(Qt5Concurrent)
if(Qt5Concurrent_FOUND)
include_directories(${Qt5Concurrent_INCLUDE_DIRS})
list(APPEND ORACLE_LIBS Concurrent)
endif()
# QtNetwork
find_package(Qt5Network)
if(Qt5Network_FOUND)
include_directories(${Qt5Network_INCLUDE_DIRS})
list(APPEND COCKATRICE_LIBS Network)
endif()
# QtMultimedia
find_package(Qt5Multimedia)
if(Qt5Multimedia_FOUND)
include_directories(${Qt5Multimedia_INCLUDE_DIRS})
list(APPEND COCKATRICE_LIBS Multimedia)
endif()
# QtPrinter
find_package(Qt5PrintSupport)
if(Qt5PrintSupport_FOUND)
include_directories(${Qt5PrintSupport_INCLUDE_DIRS})
list(APPEND COCKATRICE_LIBS PrintSupport)
endif()
# QtSvg
find_package(Qt5Svg)
if(Qt5Svg_FOUND)
include_directories(${Qt5Svg_INCLUDE_DIRS})
list(APPEND COCKATRICE_LIBS Svg)
endif()
# Qt5LinguistTools
find_package(Qt5LinguistTools)
if(Qt5LinguistTools_FOUND)
include_directories(${Qt5LinguistTools_INCLUDE_DIRS})
list(APPEND COCKATRICE_LIBS LinguistTools)
endif()
# Let cmake chew Qt5's translations and resource files
# Note: header files are MOC-ed automatically by cmake
IF(UPDATE_TRANSLATIONS)
QT5_CREATE_TRANSLATION(cockatrice_QM ${translate_SRCS} ${cockatrice_TS})
ELSE()
QT5_ADD_TRANSLATION(cockatrice_QM ${cockatrice_TS})
ENDIF()
QT5_ADD_RESOURCES(cockatrice_RESOURCES_RCC ${cockatrice_RESOURCES})
# guess plugins and libraries directory
set(QT_PLUGINS_DIR "${Qt5Widgets_DIR}/../../../plugins")
get_target_property(QT_LIBRARY_DIR Qt5::Core LOCATION)
get_filename_component(QT_LIBRARY_DIR ${QT_LIBRARY_DIR} PATH)
if(Qt6_FOUND)
qt6_add_resources(cockatrice_RESOURCES_RCC ${cockatrice_RESOURCES})
elseif(Qt5_FOUND)
qt5_add_resources(cockatrice_RESOURCES_RCC ${cockatrice_RESOURCES})
endif()
# Declare path variables
set(ICONDIR share/icons CACHE STRING "icon dir")
set(DESKTOPDIR share/applications CACHE STRING "desktop file destination")
set(ICONDIR
share/icons
CACHE STRING "icon dir"
)
set(DESKTOPDIR
share/applications
CACHE STRING "desktop file destination"
)
# Include directories
INCLUDE_DIRECTORIES(../common)
INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/common)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
set(COCKATRICE_MAC_QM_INSTALL_DIR "cockatrice.app/Contents/Resources/translations")
set(COCKATRICE_UNIX_QM_INSTALL_DIR "share/cockatrice/translations")
set(COCKATRICE_WIN32_QM_INSTALL_DIR "translations")
# Build cockatrice binary and link it
ADD_EXECUTABLE(cockatrice WIN32 MACOSX_BUNDLE ${cockatrice_SOURCES} ${cockatrice_QM} ${cockatrice_RESOURCES_RCC} ${cockatrice_MOC_SRCS})
if(MSVC)
TARGET_LINK_LIBRARIES(cockatrice cockatrice_common Qt5::WinMain)
else()
TARGET_LINK_LIBRARIES(cockatrice cockatrice_common)
if(Qt6_FOUND)
qt6_add_executable(
cockatrice
WIN32
MACOSX_BUNDLE
${cockatrice_SOURCES}
${cockatrice_RESOURCES_RCC}
${cockatrice_MOC_SRCS}
MANUAL_FINALIZATION
)
elseif(Qt5_FOUND)
# Qt5 Translations need to be linked at executable creation time
if(Qt5LinguistTools_FOUND)
if(UPDATE_TRANSLATIONS)
qt5_create_translation(cockatrice_QM ${translate_SRCS} ${cockatrice_TS})
else()
qt5_add_translation(cockatrice_QM ${cockatrice_TS})
endif()
endif()
add_executable(
cockatrice WIN32 MACOSX_BUNDLE ${cockatrice_MOC_SRCS} ${cockatrice_QM} ${cockatrice_RESOURCES_RCC}
${cockatrice_SOURCES}
)
if(UNIX)
if(APPLE)
install(FILES ${cockatrice_QM} DESTINATION ${COCKATRICE_MAC_QM_INSTALL_DIR})
else()
install(FILES ${cockatrice_QM} DESTINATION ${COCKATRICE_UNIX_QM_INSTALL_DIR})
endif()
elseif(WIN32)
install(FILES ${cockatrice_QM} DESTINATION ${COCKATRICE_WIN32_QM_INSTALL_DIR})
endif()
endif()
if(Qt5_FOUND)
target_link_libraries(
cockatrice
libcockatrice_card
libcockatrice_deck_list
libcockatrice_filters
libcockatrice_utility
libcockatrice_network
libcockatrice_models
libcockatrice_rng
libcockatrice_settings
${COCKATRICE_QT_MODULES}
)
else()
target_link_libraries(
cockatrice
PUBLIC libcockatrice_card
libcockatrice_deck_list
libcockatrice_filters
libcockatrice_utility
libcockatrice_network
libcockatrice_models
libcockatrice_rng
libcockatrice_settings
${COCKATRICE_QT_MODULES}
)
endif()
qt5_use_modules(cockatrice ${COCKATRICE_LIBS})
if(UNIX)
if(APPLE)
set(MACOSX_BUNDLE_INFO_STRING "${PROJECT_NAME}")
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.cockatrice.${PROJECT_NAME}")
set(MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_NAME}-${PROJECT_VERSION}")
set(MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_NAME}")
set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION})
set(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION})
set_target_properties(cockatrice PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/cmake/Info.plist)
if(APPLE)
set(MACOSX_BUNDLE_INFO_STRING "${PROJECT_NAME}")
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.cockatrice.${PROJECT_NAME}")
set(MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_NAME}-${PROJECT_VERSION}")
set(MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_NAME}")
set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION})
set(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION})
INSTALL(TARGETS cockatrice BUNDLE DESTINATION ./)
INSTALL(FILES ${cockatrice_QM} DESTINATION ./Cockatrice.app/Contents/Resources/translations)
else()
# Assume linux
INSTALL(TARGETS cockatrice RUNTIME DESTINATION bin/)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/cockatrice.png DESTINATION ${ICONDIR}/hicolor/48x48/apps)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/cockatrice.svg DESTINATION ${ICONDIR}/hicolor/scalable/apps)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cockatrice.desktop DESTINATION ${DESKTOPDIR})
INSTALL(FILES ${cockatrice_QM} DESTINATION share/cockatrice/translations)
endif()
set_target_properties(cockatrice PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/cmake/Info.plist)
install(TARGETS cockatrice BUNDLE DESTINATION ./)
else()
# Assume linux
install(TARGETS cockatrice RUNTIME DESTINATION bin/)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/cockatrice.png DESTINATION ${ICONDIR}/hicolor/48x48/apps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/cockatrice.svg DESTINATION ${ICONDIR}/hicolor/scalable/apps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cockatrice.desktop DESTINATION ${DESKTOPDIR})
endif()
elseif(WIN32)
INSTALL(TARGETS cockatrice RUNTIME DESTINATION ./)
INSTALL(FILES ${cockatrice_QM} DESTINATION ./translations)
install(TARGETS cockatrice RUNTIME DESTINATION ./)
endif()
if(APPLE)
# these needs to be relative to CMAKE_INSTALL_PREFIX
set(plugin_dest_dir Cockatrice.app/Contents/Plugins)
set(qtconf_dest_dir Cockatrice.app/Contents/Resources)
get_filename_component(QT_LIBRARY_DIR "${QT_LIBRARY_DIR}/.." ABSOLUTE)
# these needs to be relative to CMAKE_INSTALL_PREFIX
set(plugin_dest_dir cockatrice.app/Contents/Plugins)
set(qtconf_dest_dir cockatrice.app/Contents/Resources)
# qt5 plugins: audio, iconengines, imageformats, platforms, printsupport
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
FILES_MATCHING REGEX "(audio|iconengines|imageformats|platforms|printsupport)/.*\\.dylib"
REGEX ".*_debug\\.dylib" EXCLUDE)
# Qt plugins: audio (Qt5), iconengines, imageformats, multimedia (Qt6), platforms, printsupport (Qt5), styles, tls (Qt6)
install(
DIRECTORY "${QT_PLUGINS_DIR}/"
DESTINATION ${plugin_dest_dir}
COMPONENT Runtime
FILES_MATCHING
PATTERN "*.dSYM" EXCLUDE
PATTERN "*_debug.dylib" EXCLUDE
PATTERN "audio/*.dylib"
PATTERN "iconengines/*.dylib"
PATTERN "imageformats/*.dylib"
PATTERN "multimedia/*.dylib"
PATTERN "platforms/*.dylib"
PATTERN "printsupport/*.dylib"
PATTERN "styles/*.dylib"
PATTERN "tls/*.dylib"
)
install(CODE "
install(
DIRECTORY "${CMAKE_BINARY_DIR}/cockatrice/"
DESTINATION ${qtconf_dest_dir}/
FILES_MATCHING
PATTERN "*.ini"
)
install(
CODE "
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"[Paths]
Plugins = Plugins
Translations = Resources/translations
Data = Resources\")
" COMPONENT Runtime)
"
COMPONENT Runtime
)
install(CODE "
install(
CODE "
file(GLOB_RECURSE QTPLUGINS
\"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/*.dylib\")
set(BU_CHMOD_BUNDLE_ITEMS ON)
include(BundleUtilities)
fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/Cockatrice.app\" \"\${QTPLUGINS}\" \"${QT_LIBRARY_DIR}\")
" COMPONENT Runtime)
fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/cockatrice.app\" \"\${QTPLUGINS}\" \"${QT_LIBRARY_DIR}\")
"
COMPONENT Runtime
)
endif()
if(WIN32)
# these needs to be relative to CMAKE_INSTALL_PREFIX
set(plugin_dest_dir Plugins)
set(qtconf_dest_dir .)
# these needs to be relative to CMAKE_INSTALL_PREFIX
set(plugin_dest_dir Plugins)
set(qtconf_dest_dir .)
# qt5 plugins: audio, iconengines, imageformats, platforms, printsupport
install(DIRECTORY "${QT_PLUGINS_DIR}/" DESTINATION ${plugin_dest_dir} COMPONENT Runtime
FILES_MATCHING REGEX "(audio|iconengines|imageformats|platforms|printsupport)/.*[^d]\\.dll")
install(
DIRECTORY "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${CMAKE_BUILD_TYPE}/"
DESTINATION ./
FILES_MATCHING
PATTERN "*.dll"
)
install(CODE "
install(
DIRECTORY "${CMAKE_BINARY_DIR}/cockatrice/"
DESTINATION ./
FILES_MATCHING
PATTERN "*.ini"
)
# Qt plugins: audio (Qt5), iconengines, imageformats, multimedia (Qt6) platforms, printsupport (Qt5), styles, tls (Qt6)
install(
DIRECTORY "${QT_PLUGINS_DIR}/"
DESTINATION ${plugin_dest_dir}
COMPONENT Runtime
FILES_MATCHING
PATTERN "audio/qtaudio_wasapi.dll"
PATTERN "audio/qtaudio_windows.dll"
PATTERN "iconengines/qsvgicon.dll"
PATTERN "imageformats/*.dll"
PATTERN "mediaservice/dsengine.dll"
PATTERN "mediaservice/wmfengine.dll"
PATTERN "multimedia/*.dll"
PATTERN "platforms/qdirect2d.dll"
PATTERN "platforms/qminimal.dll"
PATTERN "platforms/qoffscreen.dll"
PATTERN "platforms/qwindows.dll"
PATTERN "printsupport/windowsprintersupport.dll"
PATTERN "styles/qcertonlybackend.dll"
PATTERN "styles/qopensslbackend.dll"
PATTERN "styles/qschannelbackend.dll"
PATTERN "styles/qwindowsvistastyle.dll"
PATTERN "tls/qcertonlybackend.dll"
PATTERN "tls/qopensslbackend.dll"
PATTERN "tls/qschannelbackend.dll"
)
install(
CODE "
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"[Paths]
Plugins = Plugins
Translations = Resources/translations
Data = Resources\")
" COMPONENT Runtime)
"
COMPONENT Runtime
)
install(CODE "
install(
CODE "
file(GLOB_RECURSE QTPLUGINS
\"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/*.dll\")
set(BU_CHMOD_BUNDLE_ITEMS ON)
include(BundleUtilities)
fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/Cockatrice.exe\" \"\${QTPLUGINS}\" \"${QT_LIBRARY_DIR}\")
" COMPONENT Runtime)
"
COMPONENT Runtime
)
if(WIN32SSLRUNTIME_FOUND)
install(FILES ${WIN32SSLRUNTIME_LIBRARIES} DESTINATION ./)
endif()
if(OPENSSL_FOUND)
install(FILES ${OPENSSL_INCLUDE_DIRS} DESTINATION ./)
endif()
endif()
if(Qt6_FOUND AND Qt6LinguistTools_FOUND)
#Qt6 Translations happen after the executable is built up
if(UPDATE_TRANSLATIONS)
qt6_add_translations(
cockatrice
TS_FILES
${cockatrice_TS}
SOURCES
${translate_SRCS}
QM_FILES_OUTPUT_VARIABLE
cockatrice_QM
)
else()
qt6_add_translations(cockatrice TS_FILES ${cockatrice_TS} QM_FILES_OUTPUT_VARIABLE cockatrice_QM)
endif()
if(UNIX)
if(APPLE)
install(FILES ${cockatrice_QM} DESTINATION ${COCKATRICE_MAC_QM_INSTALL_DIR})
else()
install(FILES ${cockatrice_QM} DESTINATION ${COCKATRICE_UNIX_QM_INSTALL_DIR})
endif()
elseif(WIN32)
install(FILES ${cockatrice_QM} DESTINATION ${COCKATRICE_WIN32_QM_INSTALL_DIR})
endif()
endif()
if(Qt6_FOUND)
qt6_finalize_target(cockatrice)
endif()
#Compile a portable version, default off
option(PORTABLE "portable build" OFF)
IF(PORTABLE)
add_definitions(-DPORTABLE_BUILD)
endif()

View File

@@ -1,5 +1,5 @@
<RCC>
<qresource prefix="/" >
<qresource prefix="/">
<file>resources/cardback.svg</file>
<file>resources/cockatrice.svg</file>
<file>resources/hand.svg</file>
@@ -7,29 +7,52 @@
<file>resources/icons/arrow_bottom_green.svg</file>
<file>resources/icons/arrow_down_green.svg</file>
<file>resources/icons/arrow_history.svg</file>
<file>resources/icons/arrow_left_green.svg</file>
<file>resources/icons/arrow_redo.svg</file>
<file>resources/icons/arrow_right_blue.svg</file>
<file>resources/icons/arrow_right_green.svg</file>
<file>resources/icons/arrow_top_green.svg</file>
<file>resources/icons/arrow_up_green.svg</file>
<file>resources/icons/arrow_undo.svg</file>
<file>resources/icons/clearsearch.svg</file>
<file>resources/icons/cogwheel.svg</file>
<file>resources/icons/conceded.svg</file>
<file>resources/icons/decrement.svg</file>
<file>resources/icons/delete.svg</file>
<file>resources/icons/dropdown_collapsed.svg</file>
<file>resources/icons/dropdown_expanded.svg</file>
<file>resources/icons/forgot_password.svg</file>
<file>resources/icons/increment.svg</file>
<file>resources/icons/info.svg</file>
<file>resources/icons/lock.svg</file>
<file>resources/icons/not_ready_start.svg</file>
<file>resources/icons/pencil.svg</file>
<file>resources/icons/pin.svg</file>
<file>resources/icons/player.svg</file>
<file>resources/icons/ready_start.svg</file>
<file>resources/icons/reload.svg</file>
<file>resources/icons/remove_row.svg</file>
<file>resources/icons/rename.svg</file>
<file>resources/icons/scales.svg</file>
<file>resources/icons/search.svg</file>
<file>resources/icons/settings.svg</file>
<file>resources/icons/share.svg</file>
<file>resources/icons/spectator.svg</file>
<file>resources/icons/swap.svg</file>
<file>resources/icons/sync.svg</file>
<file>resources/icons/tab_changed.svg</file>
<file>resources/icons/update.png</file>
<file>resources/icons/view.svg</file>
<file>resources/icons/mana/B.svg</file>
<file>resources/icons/mana/G.svg</file>
<file>resources/icons/mana/R.svg</file>
<file>resources/icons/mana/U.svg</file>
<file>resources/icons/mana/W.svg</file>
<file>resources/backgrounds/home.png</file>
<file>resources/config/general.svg</file>
<file>resources/config/appearance.svg</file>
<file>resources/config/interface.svg</file>
@@ -37,6 +60,8 @@
<file>resources/config/deckeditor.svg</file>
<file>resources/config/shorcuts.svg</file>
<file>resources/config/sound.svg</file>
<file>resources/config/debug.ini</file>
<file>resources/config/qtlogging.ini</file>
<file>resources/counters/w.svg</file>
<file>resources/counters/w_highlight.svg</file>
@@ -122,6 +147,7 @@
<file>resources/countries/er.svg</file>
<file>resources/countries/es.svg</file>
<file>resources/countries/et.svg</file>
<file>resources/countries/eu.svg</file>
<file>resources/countries/fi.svg</file>
<file>resources/countries/fj.svg</file>
<file>resources/countries/fk.svg</file>
@@ -297,16 +323,13 @@
<file>resources/countries/vu.svg</file>
<file>resources/countries/wf.svg</file>
<file>resources/countries/ws.svg</file>
<file>resources/countries/xk.svg</file>
<file>resources/countries/ye.svg</file>
<file>resources/countries/yt.svg</file>
<file>resources/countries/za.svg</file>
<file>resources/countries/zm.svg</file>
<file>resources/countries/zw.svg</file>
<file>resources/genders/male.svg</file>
<file>resources/genders/female.svg</file>
<file>resources/genders/unknown.svg</file>
<file>resources/phases/untap.svg</file>
<file>resources/phases/upkeep.svg</file>
<file>resources/phases/draw.svg</file>
@@ -324,23 +347,45 @@
<file>resources/replay/fastforward.svg</file>
<file>resources/replay/pause.svg</file>
<file>resources/userlevels/normal.svg</file>
<file>resources/userlevels/registered.svg</file>
<file>resources/userlevels/registered_buddy.svg</file>
<file>resources/userlevels/registered_vip.svg</file>
<file>resources/userlevels/registered_vip_buddy.svg</file>
<file>resources/userlevels/registered_donator.svg</file>
<file>resources/userlevels/registered_donator_buddy.svg</file>
<file>resources/usericons/pawn_single.svg</file>
<file>resources/usericons/pawn_double.svg</file>
<file>resources/usericons/pawn_donator_single.svg</file>
<file>resources/usericons/pawn_donator_double.svg</file>
<file>resources/usericons/pawn_judge_single.svg</file>
<file>resources/usericons/pawn_judge_double.svg</file>
<file>resources/usericons/pawn_vip_single.svg</file>
<file>resources/usericons/pawn_vip_double.svg</file>
<file>resources/usericons/star_single.svg</file>
<file>resources/usericons/star_double.svg</file>
<file>resources/userlevels/moderator.svg</file>
<file>resources/userlevels/moderator_buddy.svg</file>
<file>resources/userlevels/moderator_vip.svg</file>
<file>resources/userlevels/moderator_vip_buddy.svg</file>
<file>resources/userlevels/admin.svg</file>
<file>resources/userlevels/admin_buddy.svg</file>
<file>resources/userlevels/admin_vip.svg</file>
<file>resources/userlevels/admin_vip_buddy.svg</file>
<!-- ADD TIP OF THE DAY IMAGES HERE -->
<file>resources/tips/images/accounts_tab.png</file>
<file>resources/tips/images/add_card.png</file>
<file>resources/tips/images/arrows.png</file>
<file>resources/tips/images/card_select.png</file>
<file>resources/tips/images/cockatrice_register.png</file>
<file>resources/tips/images/cockatrice_wiki.png</file>
<file>resources/tips/images/coin_flip.png</file>
<file>resources/tips/images/counter_expression.png</file>
<file>resources/tips/images/discord.png</file>
<file>resources/tips/images/edhrec.png</file>
<file>resources/tips/images/expand_card_view.png</file>
<file>resources/tips/images/face_down.png</file>
<file>resources/tips/images/filter_games.png</file>
<file>resources/tips/images/github_logo.png</file>
<file>resources/tips/images/highlight_cards.png</file>
<file>resources/tips/images/pawns.png</file>
<file>resources/tips/images/setpt.png</file>
<file>resources/tips/images/shortcuts.png</file>
<file>resources/tips/images/syntax_help.png</file>
<file>resources/tips/images/themes.png</file>
<file>resources/tips/images/tip_of_the_day.png</file>
<file>resources/tips/images/token.png</file>
<file>resources/tips/images/updates.png</file>
<file>resources/tips/images/visual_deck_tags.png</file>
<file>resources/tips/tips_of_the_day.xml</file>
<file>resources/help/search.md</file>
<file>resources/help/deck_search.md</file>
</qresource>
</RCC>

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@@ -0,0 +1,11 @@
[debug]
showCardId=false
[localgame]
onStartup=false
playerCount=1
;deck\Player 1=path/to/deck
;deck\Player 2=path/to/deck
; Fun Fact: You can assign a deck to your username and it will auto load and ready when you join a server game
;deck\Your Username Here=path/to/deck

View File

@@ -0,0 +1,68 @@
[Rules]
# The default log level is info
*.debug = false
# Uncomment a rule to see debug level logs for that category,
# or set <category> = false to disable logging
#main = true
#qt_translator = true
#window_main.* = true
#release_channel = true
#spoiler_background_updater = true
#theme_manager = true
#sound_engine = true
#tapped_out_interface = true
#tab_game = true
#tab_message = true
#tab_supervisor = true
#dlg_edit_avatar = true
#dlg_load_deck_from_website = true
#dlg_settings = true
#dlg_tip_of_the_day = true
#dlg_update = true
#settings_cache = true
#servers_settings = true
#shortcuts_settings = true
#local_client = true
#remote_client = true
#player = true
#game_scene = true
#game_scene.player_addition_removal = true
#card_zone = true
#view_zone = true
#game_event_handler = true
#user_info_connection = true
#card_picture_loader = true
#card_picture_loader.worker = true
#card_picture_loader.card_back_cache_fail = true
#card_picture_loader.picture_to_load = true
#deck_loader = true
#card_database = true
#card_database.loading = true
#card_database.loading.success_or_failure = true
#cockatrice_xml.* = true
#cockatrice_xml.xml_3_parser = true
#cockatrice_xml.xml_4_parser = true
#card_info = true
#card_list = true
#flow_layout = true
#flow_widget = true
#flow_widget.size = true
#card_info_picture_widget = true
#pixel_map_generator = true
#deck_filter_string = true
#filter_string = true
#syntax_help = true

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 236 KiB

After

Width:  |  Height:  |  Size: 106 KiB

View File

@@ -0,0 +1,176 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="640"
height="480"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="eu.svg">
<metadata
id="metadata43">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview41"
showgrid="false"
inkscape:zoom="0.35308642"
inkscape:cx="405"
inkscape:cy="229.84832"
inkscape:window-x="695"
inkscape:window-y="86"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<desc
id="desc4">European flag</desc>
<defs
id="defs6">
<g
id="s">
<g
id="c">
<path
id="t"
d="M 0,0 0,1 0.5,1 Z"
transform="matrix(0.95105652,0.30901699,-0.30901699,0.95105652,0,-1)"
inkscape:connector-curvature="0" />
<use
xlink:href="#t"
transform="scale(-1,1)"
id="use11"
x="0"
y="0"
width="100%"
height="100%" />
</g>
<g
id="a">
<use
xlink:href="#c"
transform="matrix(0.30901699,0.95105652,-0.95105652,0.30901699,0,0)"
id="use14"
x="0"
y="0"
width="100%"
height="100%" />
<use
xlink:href="#c"
transform="matrix(-0.80901699,0.58778525,-0.58778525,-0.80901699,0,0)"
id="use16"
x="0"
y="0"
width="100%"
height="100%" />
</g>
<use
xlink:href="#a"
transform="scale(-1,1)"
id="use18"
x="0"
y="0"
width="100%"
height="100%" />
</g>
</defs>
<rect
width="642.9021"
height="483.35666"
id="rect20"
x="2.8321679"
y="2.3076911"
style="fill:#003399" />
<g
transform="matrix(23.811189,0,0,23.981809,322.28322,245.88665)"
id="g22"
style="fill:#ffcc00">
<use
xlink:href="#s"
y="-6"
id="use24"
x="0"
width="100%"
height="100%" />
<use
xlink:href="#s"
y="6"
id="use26"
x="0"
width="100%"
height="100%" />
<g
id="l">
<use
xlink:href="#s"
x="-6"
id="use29"
y="0"
width="100%"
height="100%" />
<use
xlink:href="#s"
transform="matrix(-0.80901699,-0.58778525,0.58778525,-0.80901699,-3,-5.1961524)"
id="use31"
x="0"
y="0"
width="100%"
height="100%" />
<use
xlink:href="#s"
transform="matrix(-0.80901699,0.58778525,-0.58778525,-0.80901699,-5.1961524,-3)"
id="use33"
x="0"
y="0"
width="100%"
height="100%" />
<use
xlink:href="#s"
transform="matrix(0.30901699,0.95105652,-0.95105652,0.30901699,-5.1961524,3)"
id="use35"
x="0"
y="0"
width="100%"
height="100%" />
<use
xlink:href="#s"
transform="matrix(0.30901699,0.95105652,-0.95105652,0.30901699,-3,5.1961524)"
id="use37"
x="0"
y="0"
width="100%"
height="100%" />
</g>
<use
xlink:href="#l"
transform="scale(-1,1)"
id="use39"
x="0"
y="0"
width="100%"
height="100%" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 28 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.0"
width="75"
height="75"
id="svg34864">
<defs
id="defs34866" />
<g
transform="translate(-348.7552,-478.0905)"
id="layer1">
<g
transform="matrix(1.071197,0,0,1.075147,-13.30677,-36.99488)"
id="g3773">
<path
d="M 176 33 A 11 11 0 1 1 154,33 A 11 11 0 1 1 176 33 z"
transform="matrix(1.540096,0,0,1.5384,118.8893,454.0543)"
style="color:black;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
id="path3939" />
<path
d="M 373.00525,521.74399 L 373.00525,543.28159"
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:4.61774349;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path3941" />
<path
d="M 363.76467,534.05119 L 382.24582,534.05119"
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:4.61774349;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4816" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.0" width="75" height="75" id="svg34864">
<defs id="defs34866"/>
<g transform="translate(-348.755, -478.091)" id="layer1">
<g transform="matrix(1.94812, 0, 0, 1.93731, -342.43, -460.01)" id="g1872">
<path d="M 387.95009,489.60348 L 378.66214,498.89143" style="opacity: 1; color: black; fill: none; fill-opacity: 0.75; fill-rule: evenodd; stroke: black; stroke-width: 3; stroke-linecap: butt; stroke-linejoin: miter; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: inline; overflow: visible;" id="path26867"/>
<path d="M 49.396475 36.70454 A 15.623922 16.319134 0 1 1 18.14863,36.70454 A 15.623922 16.319134 0 1 1 49.396475 36.70454 z" transform="matrix(0.48802, 0.48802, -0.467594, 0.467594, 371.609, 473.136)" style="opacity: 1; color: black; fill: none; fill-opacity: 1; fill-rule: evenodd; stroke: black; stroke-width: 4.44072; stroke-linecap: butt; stroke-linejoin: miter; marker: none; stroke-miterlimit: 4; stroke-dasharray: none; stroke-dashoffset: 0pt; stroke-opacity: 1; visibility: visible; display: inline; overflow: visible;" id="path26871"/>
<path d="M 379.92823,489.70212 C 387.842,489.70212 387.842,489.70212 387.842,489.70212 L 387.842,497.61589" style="fill: none; fill-rule: evenodd; stroke: black; stroke-width: 3; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-dasharray: none; stroke-opacity: 1;" id="path27759"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Intersexual/Transgendered symbol by Gregory Maxwell. Copyright 2005. GFDL-1.2 only -->
<svg
xmlns="http://www.w3.org/2000/svg"
version="1.1"
width="210"
height="280">
<path d="M 188,38 v 20 l 14,-8 v -42 h -42 l -8,14 h 20 l -37,37 a 79,79 0 1,0 -59,141 v 22 h -27 v 23 h 27 v 27 h 23 v -27 h 27 v -23 h -27 v -22 a 79,79 0 0,0 52,-125 zm -100,27 a 57,57 0 1,1 0,114 a 57,57 0 1,1 0,-114 z"/>
<!-- 88,65 // -63,-10 -->
</svg>

Before

Width:  |  Height:  |  Size: 500 B

View File

@@ -0,0 +1,42 @@
@page deck_search_syntax_help Deck Search Syntax Help
## Deck Search Syntax Help
-----
The search bar recognizes a set of special commands.<br>
In this list of examples below, each entry has an explanation and can be clicked to test the query. Note that all
searches are case insensitive.
<dl>
<dt>Display Name (The deck name, or the filename if the deck name isn't set):</dt>
<dd>[red deck wins](#red deck wins) <small>(Any deck with a display name containing the words red, deck, and wins)</small></dd>
<dd>["red deck wins"](#%22red deck wins%22) <small>(Any deck with a display name containing the exact phrase "red deck wins")</small></dd>
<dt>Deck <u>N</u>ame:</dt>
<dd>[n:aggro](#n:aggro) <small>(Any deck with a name containing the word aggro)</small></dd>
<dd>[n:red n:deck n:wins](#n:red n:deck n:wins) <small>(Any deck with a name containing the words red, deck, and wins)</small></dd>
<dd>[n:"red deck wins"](#n:%22red deck wins%22) <small>(Any deck with a name containing the exact phrase "red deck wins")</small></dd>
<dt><u>F</u>ile Name:</dt>
<dd>[f:aggro](#f:aggro) <small>(Any deck with a filename containing the word aggro)</small></dd>
<dd>[f:red f:deck f:wins](#f:red f:deck f:wins) <small>(Any deck with a filename containing the words red, deck, and wins)</small></dd>
<dd>[f:"red deck wins"](#f:%22red deck wins%22) <small>(Any deck with a filename containing the exact phrase "red deck wins")</small></dd>
<dt>Relative <u>P</u>ath (starting from the deck folder):</dt>
<dd>[p:aggro](#p:aggro) <small>(Any deck that has "aggro" somewhere in its relative path)</small></dd>
<dd>[p:edh/](#p:edh/) <small>(Any deck with "edh/" in its relative path, A.K.A. decks in the "edh" folder)</small></dd>
<dt>Deck Contents (Uses [card search expressions](#cardSearchSyntaxHelp)):</dt>
<dd><a href="#[[plains]]">[[plains]]</a> <small>(Any deck that contains at least one card with "plains" in its name)</small></dd>
<dd><a href="#[[t:legendary]]">[[t:legendary]]</a> <small>(Any deck that contains at least one legendary)</small></dd>
<dd><a href="#[[t:legendary]]>5">[[t:legendary]]>5</a> <small>(Any card that contains at least 5 legendaries)</small></dd>
<dd><a href="#[[]]:100">[[]]:100</a> <small>(Any deck that contains exactly 100 cards)</small></dd>
<dt>Negate:</dt>
<dd>[soldier -aggro](#soldier -aggro) <small>(Any deck filename that contains "soldier", but not "aggro")</small></dd>
<dt>Branching:</dt>
<dd>[t:aggro OR o:control](#t:aggro OR o:control) <small>(Any deck filename that contains either aggro or control)</small></dd>
<dt>Grouping:</dt>
<dd><a href="#red -([[]]:100 or aggro)">red -([[]]:100 or aggro)</a> <small>(Any deck that has red in its filename but is not 100 cards or has aggro in its filename)</small></dd>
</dl>

View File

@@ -0,0 +1,68 @@
@page search_syntax_help Search Syntax Help
## Search Syntax Help
-----
The search bar recognizes a set of special commands similar to some other card databases.<br>
In this list of examples below, each entry has an explanation and can be clicked to test the query. Note that all searches are case insensitive.
<dl>
<dt>Name:</dt>
<dd>[birds of paradise](#birds of paradise) <small>(Any card name containing the words birds, of, and paradise)</small></dd>
<dd>["birds of paradise"](#%22birds of paradise%22) <small>(Any card name containing the exact phrase "birds of paradise")</small></dd>
<dt>Rules Text (<u>O</u>racle):</dt>
<dd>[o:flying](#o:flying) <small>(Any card text that has the word flying)</small></dd>
<dd>[o:"first strike"](#o:%22first strike%22) <small>(Any card text that has the exact phrase "first strike")</small></dd>
<dd>[o:"{T}" o:"add one mana of any color"](#o:%22{T}%22 o:%22add one mana of any color%22) <small>(Any card text that has a tap symbol and the phrase "add one mana of any color")</small></dd>
<dt><u>T</u>ypes:</dt>
<dd>[t:angel](#t:angel) <small>(Any card with the type angel)</small></dd>
<dd>[t:angel t:legendary](#t:angel t:legendary) <small>(Any angel that's also legendary)</small></dd>
<dd>[t:basic](#t:basic) <small>(Any card with the type basic)</small></dd>
<dd>[t:arcane t:instant](#t:arcane t:instant) <small>(Any card with the types arcane and instant)</small></dd>
<dt><u>C</u>olors:</dt>
<dd>[c:w](#c:w) <small>(Any card that is white)</small></dd>
<dd>[c:wu](#c:wu) <small>(Any card that is white or blue)</small></dd>
<dd>[c:wum](#c:wum) <small>(Any card that is white or blue, and multicolored)</small></dd>
<!--
<dd>[c!w](#c!w) <small>(Cards that are only white)</small></dd>
<dd>[c!wu](#c!wu) <small>(Cards that are only white or blue, or both)</small></dd>
<dd>[c!wum](#c!wum) <small>(Cards that are only white and blue, and multicolored)</small></dd>
<dd>[c=wubrg](#c%3Dwubrg) <small>(Cards that are all five colors)</small></dd>
-->
<dd>[c:c](#c:c) <small>(Any colorless card)</small></dd>
<dd>[ci:w](#ci:w) <small>(Any card that has white in it's color identity)</small></dd>
<dt><u>Pow</u>er, <u>Tou</u>ghness, <u>M</u>ana <u>V</u>alue:</dt>
<dd>[tou:1](#tou:1) <small>(Any card with a toughness of 1)</small></dd>
<dd>[pow>=8](#pow>=8) <small>(Any card with a power greater than or equal to 8)</small></dd>
<dd>[mv=7](#mv=7) <small>(Any card with a mana value equal to 7)</small></dd>
<dt><u>R</u>arity:</dt>
<dd>[r:mythic](#r:mythic) <small>(Any card that has the mythic-rare rarity)</small></dd>
<dt><u>F</u>ormat:</dt>
<dd>[f:standard](#f:standard) <small>(Any card that can be played in standard)</small></dd>
<dd>[banned:modern](#banned:modern) <small>(Any card that is banned in modern)</small></dd>
<dd>[restricted:vintage](#restricted:vintage) <small>(Any card that is restricted in vintage)</small></dd>
<dd>[legal:pauper](#legal:pauper) <small>(Any card that is legal in pauper)</small></dd>
<dt><u>E</u>dition:</dt>
<dd>[set:lea](#set:lea) <small>(Cards that appear in Alpha, which has the set code LEA)</small></dd>
<dd>[e:lea or e:leb](#e:lea or e:leb) <small>(Cards that appear in Alpha or Beta)</small></dd>
<dt>Negate:</dt>
<dd>[c:wu -c:m](#c:wu -c:m) <small>(Any card that is white or blue, but not multicolored)</small></dd>
<dt>Branching:</dt>
<dd>[t:sliver or o:changeling](#t:sliver or o:changeling) <small>(Any card that is either a sliver or has changeling)</small></dd>
<dt>Grouping:</dt>
<dd><a href="#t:angel -(angel or c:w)">t:angel -(angel or c:w)</a> <small>(Any angel that doesn't have angel in its name and isn't white)</small></dd>
<dt>Regular Expression:</dt>
<dd>[/^fell/](#/^fell/) <small>(Any card name that begins with "fell")</small></dd>
<dd>[o:/counter target .* spell/](#o:/counter target .* spell/) <small>(Any card text with "counter target *something* spell")</small></dd>
<dd>[o:/for each .* and\/or .*/](#o:/for each .* and\/or .*/) <small>(/'s can be escaped with a \)</small></dd>
</dl>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<title>
history
</title>
<path d="M9 6v5h.06l2.48 2.47 1.41-1.41L11 10.11V6H9z"/>
<path d="M10 1a9 9 0 0 0-7.85 13.35L.5 16H6v-5.5l-2.38 2.38A7 7 0 1 1 10 17v2a9 9 0 0 0 0-18z"/>
</svg>

After

Width:  |  Height:  |  Size: 332 B

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="windows-1252"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" x="0px"
y="0px" width="485.212px" height="485.212px" viewBox="0 0 485.212 485.212"
style="enable-background:new 0 0 485.212 485.212;" xml:space="preserve">
<g>
<path d="M242.607,424.559c-75.252,0-136.468-61.209-136.468-136.465c0-75.252,61.216-136.466,136.468-136.466v90.978 l151.629-121.302L242.607,0v90.978c-108.687,0-197.117,88.432-197.117,197.117c0,108.691,88.43,197.118,197.117,197.118 c108.687,0,197.114-88.427,197.114-197.118h-60.645C379.077,363.35,317.859,424.559,242.607,424.559z"/>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1018 B

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="windows-1252"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" x="0px"
y="0px" width="512px" height="512px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;"
xml:space="preserve">
<g>
<path d="M256,448c79.406,0,144-64.594,144-144s-64.594-144-144-144v96L96,128L256,0v96c114.688,0,208,93.313,208,208 c0,114.688-93.312,208-208,208c-114.687,0-208-93.312-208-208h64C112,383.406,176.594,448,256,448z"/>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 874 B

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" width="102.5024mm" height="102.24421mm"
viewBox="0 0 102.5024 102.24421" version="1.1"
id="svg1"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)" sodipodi:docname="cog_wheel.svg"
xmlns="http://www.w3.org/2000/svg">
<sodipodi:namedview id="namedview1" pagecolor="#ffffff" bordercolor="#000000" borderopacity="0.25"
inkscape:showpageshadow="2" inkscape:pageopacity="0.0" inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1" inkscape:document-units="mm" inkscape:zoom="0.66101291"
inkscape:cx="146.74449" inkscape:cy="193.64221" inkscape:window-width="1829"
inkscape:window-height="951" inkscape:window-x="0" inkscape:window-y="0"
inkscape:window-maximized="1" inkscape:current-layer="layer1"/>
<defs id="defs1"/>
<g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" transform="translate(-66.148059,-97.377896)">
<g id="g1" transform="translate(-165.09777,-82.009607)">
<g id="g2" transform="matrix(0.26458333,0,0,0.26458333,64.983323,161.37858)">
<path style="fill:#333333;stroke-width:94.4882"
d="m 721.34301,94.413051 40.00966,29.763289 29.51933,-9.27053 14.63768,-46.840589 36.83817,0.48792 13.41787,46.108699 28.29952,9.5145 40.74155,-28.299519 29.0314,21.468599 -15.85748,47.08454 16.58937,23.66426 48.30432,-2.68358 12.93,34.88648 -41.71741,27.07971 -0.48792,29.27536 40.49763,26.10387 -10.2464,34.15459 -48.54834,-0.97584 -18.78502,23.42029 15.85749,45.37681 -28.29952,21.71256 -41.22947,-29.27536 -28.54348,9.75846 -13.66184,47.57246 -38.30194,-0.73188 -14.63768,-48.30435 -27.07971,-9.27054 -40.00966,29.27537 -30.25121,-20.49276 17.32125,-46.35266 -17.80918,-24.64009 -49.76812,3.17149 -11.22222,-34.64251 40.74155,-27.07971 0.48792,-30.00725 -41.71739,-27.32367 12.19807,-32.93479 48.30435,2.68358 20.24879,-24.6401 -17.32126,-47.08455 z"
id="path1"/>
<circle style="fill:#f9f9f9;stroke-width:72.1317" id="path2" cx="822.09906" cy="261.28262"
r="83.434792"/>
<circle style="fill:#4d4d4d;stroke-width:40.5147" id="circle2" cx="822.09906" cy="261.28262"
r="46.863361"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="460.5" height="531.74"
viewBox="0 0 460.5 531.74" overflow="visible" enable-background="new 0 0 460.5 531.74" xml:space="preserve">
<polygon fill="#918d8d" points="0.5,0.866 459.5,265.87 0.5,530.874 "/>
</svg>

After

Width:  |  Height:  |  Size: 657 B

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
]>
<svg version="1.1" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="531.74" height="460.5"
viewBox="0 0 531.74 460.5" overflow="visible" enable-background="new 0 0 531.74 460.5" xml:space="preserve">
<polygon fill="#918d8d" points="530.874,0.5 265.87,459.5 0.866,0.5 "/>
</svg>

After

Width:  |  Height:  |  Size: 657 B

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48pt" height="48pt" viewBox="0 0 48 48" version="1.1">
<g id="surface1">
<path style=" stroke:none;fill-rule:nonzero;fill:#000000;fill-opacity:1;" d="M 24 2 C 17.398438 2 12 7.398438 12 14 L 12 16 C 9.789063 16 8 17.789063 8 20 L 8 40 C 8 42.210938 9.789063 44 12 44 L 36 44 C 38.210938 44 40 42.210938 40 40 L 40 20 C 40 17.789063 38.210938 16 36 16 L 36 14 C 36 7.398438 30.601563 2 24 2 Z M 24 6 C 28.4375 6 32 9.5625 32 14 L 32 16 L 16 16 L 16 14 C 16 9.5625 19.554688 6 24 6 Z M 23.9375 19.9375 C 29.929688 19.9375 30 24.398438 30 25.25 C 30 29.71875 25.125 29.96875 25.375 33.875 L 21.875 33.875 C 21.578125 28.632813 26.0625 28.398438 26.0625 25.4375 C 26.0625 23.3125 24.632813 23.125 23.9375 23.125 C 21.859375 23.125 21.757813 25.09375 21.75 25.5 L 17.8125 25.5 C 17.820313 24.554688 18.015625 19.9375 23.9375 19.9375 Z M 23.6875 35.9375 C 25.671875 35.9375 25.875 37.765625 25.875 38.0625 C 25.875 38.351563 25.671875 40.125 23.6875 40.125 C 21.632813 40.125 21.5 38.351563 21.5 38.0625 C 21.5 37.765625 21.671875 35.9375 23.6875 35.9375 Z "/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="100"
height="100"
id="svg2858"
version="1.1"
inkscape:version="0.48.5 r10040"
sodipodi:docname="info.svg">
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Triangle"
style="display:inline">
<path
sodipodi:type="arc"
style="fill:#aaaaaa;fill-opacity:1;fill-rule:nonzero;stroke:none;display:inline"
id="path3758-1"
sodipodi:cx="53.900002"
sodipodi:cy="78.5"
sodipodi:rx="46.5"
sodipodi:ry="46.5"
d="M 100.4,78.5 A 46.5,46.5 0 1 1 7.4000015,78.5 46.5,46.5 0 1 1 100.4,78.5 z"
transform="matrix(1.05866,0,0,1.05866,-7.0617752,-32.704809)" />
<g
style="font-size:133.49534607px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.06498075;stroke-opacity:1;font-family:'Magic:the Gathering';-inkscape-font-specification:'Magic:the Gathering'"
id="text3759">
<path
d="m 46.854005,16.085692 c 0.977733,-2.411704 1.683885,-4.193378 2.118456,-5.345028 0.369355,-1.1514901 0.771318,-1.9988718 1.205891,-2.5421482 0.456264,-0.4344718 1.347101,-0.825571 2.672514,-1.1732989 1.23846,-0.2823765 2.705082,-0.4670623 4.399871,-0.5540578 0.369346,8.46e-5 0.727854,8.46e-5 1.075524,0 1.694737,8.46e-5 2.672485,0.5758696 2.933248,1.7273567 -3e-5,0.1956326 -3e-5,0.3803183 0,0.5540579 -3e-5,1.3254743 -0.662726,2.9224633 -1.98809,4.7909703 -1.520969,2.238035 -3.43301,4.24785 -5.736128,6.029453 -2.32489,1.760018 -4.551983,2.781222 -6.681286,3.063614 -1.260224,-0.543125 -1.977239,-1.075454 -2.151048,-1.59699 -1.3e-5,-0.08684 -1.3e-5,-0.184616 0,-0.293325 -1.3e-5,-0.434484 0.228128,-1.010269 0.684424,-1.727357 0.521453,-0.890765 1.010327,-1.868513 1.466624,-2.933247 z M 31.372977,37.856906 c 2.650785,-0.716962 6.159814,-1.651255 10.527099,-2.802881 4.280354,-1.173242 7.398284,-1.803346 9.3538,-1.890315 0.08689,5.8e-5 0.173803,5.8e-5 0.260733,0 1.06464,5.8e-5 1.82511,0.358566 2.281415,1.075524 0.260711,0.630161 0.391077,1.520998 0.391099,2.672514 -2.2e-5,0.260787 -2.2e-5,0.532384 0,0.814791 -0.173844,1.586178 -0.260755,2.781204 -0.260733,3.58508 l 0,39.533656 c 1.238459,1e-5 2.976678,-0.673549 5.214662,-2.020681 1.673009,-0.977736 2.868034,-1.46661 3.58508,-1.466624 0.173791,1.4e-5 0.304158,0.04347 0.3911,0.130367 0.543162,0.369385 0.814759,0.771348 0.814791,1.20589 -3.2e-5,1.151583 -1.868617,2.66166 -5.605762,4.530238 -1.238507,0.717023 -3.063637,1.922912 -5.475395,3.617671 -2.49871,1.781679 -4.769259,3.204846 -6.811652,4.269505 -0.347658,0.347644 -0.923443,0.662696 -1.727357,0.945157 -0.260745,0.08691 -0.532342,0.130366 -0.814791,0.130367 -0.521477,-10e-7 -1.010351,-0.271598 -1.466623,-0.814791 C 41.856611,91.111641 41.7697,81.594892 41.76971,62.8221 c -1e-5,-1.955468 -1e-5,-4.008739 0,-6.15982 -1e-5,-2.129283 -0.08692,-4.128235 -0.260734,-5.996861 -0.260742,-1.781634 -0.706161,-3.204801 -1.336257,-4.269504 -0.717023,-1.347075 -1.60786,-2.368279 -2.672514,-3.063614 -1.151576,-0.630057 -2.357465,-1.260161 -3.617672,-1.890315 -1.325394,-0.521416 -2.161911,-1.053746 -2.509556,-1.59699 -0.195549,-0.173771 -0.293324,-0.434504 -0.293324,-0.7822 -0.08691,-0.369319 0.01086,-0.771282 0.293324,-1.20589 z"
style=""
id="path2993" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="169.34801mm"
height="169.34801mm"
viewBox="0 0 600 600"
version="1.1"
id="svg1"
sodipodi:docname="B.svg"
inkscape:export-filename="B.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg">
<defs
id="defs1"/>
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:document-units="mm">
<inkscape:page
x="0"
y="0"
width="600"
height="600"
id="page2"
margin="0"
bleed="0"/>
</sodipodi:namedview>
<path
id="Selection"
fill="none"
stroke="#000000"
stroke-width="1"
d="m 275,0.21 c 0,0 42,0 42,0 0,0 19,1.51 19,1.51 29.13,3.58 56.99,10.83 84,22.43 33.64,14.45 59.89,32.91 86.91,57.41 17.38,15.76 34.67,37.56 47.14,57.44 22.78,36.31 37.1,74.56 43.22,117 1.28,8.88 2.72,19.08 2.73,28 0,0 0,34 0,34 0,0 -0.91,10 -0.91,10 -2.36,32.29 -11.93,67.59 -25.4,97 -27.01,58.98 -70.49,105.42 -126.69,137.57 -34.3,19.63 -79.56,33.64 -119,36.52 0,0 -12,0.91 -12,0.91 0,0 -34,0 -34,0 0,0 -10,-0.91 -10,-0.91 -26.57,-1.94 -53.09,-8.27 -78,-17.67 C 163.49,569.9 134.12,553.46 109,532.57 79.87,508.33 54.41,478.39 36.31,445 -5.08,368.65 -11.86,276.57 18.05,195 47.85,113.75 113.21,48.92 194,18.42 213.55,11.04 236.32,5.43 257,2.43 Z"
style="display:inline;fill:#ababab;fill-opacity:1"/>
<path
d="m 299.67889,84.945431 c -118.26949,0 -214.122988,83.892719 -214.122988,187.357619 0,58.63289 30.863828,110.90901 79.041488,145.28579 8.02961,5.77129 12.71356,15.13917 11.29165,25.0089 l -7.86234,55.37086 c -1.17098,8.02962 5.01851,15.22281 13.13176,15.22281 h 64.98968 v -46.83939 c 0,-3.68025 3.01111,-6.69135 6.69135,-6.69135 h 13.38268 c 3.68024,0 6.69135,3.0111 6.69135,6.69135 v 46.83939 h 53.53075 v -46.83939 c 0,-3.68025 3.01111,-6.69135 6.69134,-6.69135 h 13.38269 c 3.68023,0 6.69134,3.0111 6.69134,6.69135 v 46.83939 h 64.98967 c 8.11327,0 14.30275,-7.19319 13.13177,-15.22281 l -7.86234,-55.37086 c -1.4219,-9.78609 3.1784,-19.23761 11.29165,-25.0089 48.17767,-34.37678 79.0415,-86.6529 79.0415,-145.28579 0,-103.4649 -95.8535,-187.357619 -214.123,-187.357619 z M 219.38277,352.59917 c -29.52555,0 -53.53075,-24.0052 -53.53075,-53.53075 0,-29.52555 24.0052,-53.53075 53.53075,-53.53075 29.52555,0 53.53075,24.0052 53.53075,53.53075 0,29.52555 -24.0052,53.53075 -53.53075,53.53075 z m 160.59225,0 c -29.52555,0 -53.53075,-24.0052 -53.53075,-53.53075 0,-29.52555 24.0052,-53.53075 53.53075,-53.53075 29.52555,0 53.53075,24.0052 53.53075,53.53075 0,29.52555 -24.0052,53.53075 -53.53075,53.53075 z"
id="path1"
style="fill:#4d4d4d;fill-opacity:1;stroke:#000000;stroke-width:0.836419;stroke-opacity:1"/>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
width="169.34801mm"
height="169.34801mm"
viewBox="0 0 600 600"
version="1.1"
id="svg1"
sodipodi:docname="B.svg"
inkscape:export-filename="U.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns="http://www.w3.org/2000/svg">
<defs
id="defs1"/>
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:document-units="mm">
<inkscape:page
x="0"
y="0"
width="600"
height="600"
id="page2"
margin="0"
bleed="0"/>
</sodipodi:namedview>
<path
id="Selection"
fill="none"
stroke="#000000"
stroke-width="1"
d="m 275,0.21 c 0,0 42,0 42,0 0,0 19,1.51 19,1.51 29.13,3.58 56.99,10.83 84,22.43 33.64,14.45 59.89,32.91 86.91,57.41 17.38,15.76 34.67,37.56 47.14,57.44 22.78,36.31 37.1,74.56 43.22,117 1.28,8.88 2.72,19.08 2.73,28 0,0 0,34 0,34 0,0 -0.91,10 -0.91,10 -2.36,32.29 -11.93,67.59 -25.4,97 -27.01,58.98 -70.49,105.42 -126.69,137.57 -34.3,19.63 -79.56,33.64 -119,36.52 0,0 -12,0.91 -12,0.91 0,0 -34,0 -34,0 0,0 -10,-0.91 -10,-0.91 -26.57,-1.94 -53.09,-8.27 -78,-17.67 C 163.49,569.9 134.12,553.46 109,532.57 79.87,508.33 54.41,478.39 36.31,445 -5.08,368.65 -11.86,276.57 18.05,195 47.85,113.75 113.21,48.92 194,18.42 213.55,11.04 236.32,5.43 257,2.43 Z"
style="display:inline;fill:#5f9f56;fill-opacity:1"/>
<path
d="m 488.52401,428.04591 -80.36527,-83.50228 h 30.81218 c 9.06362,0 17.08104,-4.61393 20.90363,-12.05153 3.82262,-7.41912 2.56521,-15.92714 -3.29949,-22.19282 l -78.59482,-83.87142 h 29.06188 c 9.15413,0 17.40291,-4.93688 20.98411,-12.55902 3.54092,-7.50219 1.87106,-16.23169 -4.26525,-22.22053 L 312.83499,83.240199 c -6.06588,-5.951919 -17.38282,-5.951919 -23.45873,0 L 178.44019,191.64831 c -6.13629,5.98884 -7.79612,14.71834 -4.26523,22.22053 3.58119,7.62214 11.84001,12.55902 20.99414,12.55902 h 29.06189 l -78.60489,83.88987 c -5.84454,6.25645 -7.10199,14.75525 -3.28944,22.18361 3.82262,7.42836 11.82996,12.04229 20.90363,12.04229 h 30.81222 l -80.36527,83.50228 c -6.03569,6.26567 -7.40379,14.84754 -3.58117,22.38663 3.7723,7.42839 12.07138,12.22682 21.13497,12.22682 h 129.63669 c 0,0 -36.12127,66.38546 0,62.75824 h 80.45578 c 33.50708,5.78651 0,-62.75824 0,-62.75824 h 129.63668 c 9.06361,0 17.36266,-4.79843 21.13499,-12.22682 3.82262,-7.53909 2.45452,-16.12096 -3.58117,-22.38663 z"
id="ENVIR"
style="fill:#3f6e3a;fill-opacity:1;stroke:#000000;stroke-width:1.09833;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"/>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
width="169.34801mm"
height="169.34801mm"
viewBox="0 0 600 600"
version="1.1"
id="svg1"
sodipodi:docname="B.svg"
inkscape:export-filename="B.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns="http://www.w3.org/2000/svg">
<defs
id="defs1"/>
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:document-units="mm">
<inkscape:page
x="0"
y="0"
width="600"
height="600"
id="page2"
margin="0"
bleed="0"/>
</sodipodi:namedview>
<path
id="Selection"
fill="none"
stroke="#000000"
stroke-width="1"
d="m 275,0.21 c 0,0 42,0 42,0 0,0 19,1.51 19,1.51 29.13,3.58 56.99,10.83 84,22.43 33.64,14.45 59.89,32.91 86.91,57.41 17.38,15.76 34.67,37.56 47.14,57.44 22.78,36.31 37.1,74.56 43.22,117 1.28,8.88 2.72,19.08 2.73,28 0,0 0,34 0,34 0,0 -0.91,10 -0.91,10 -2.36,32.29 -11.93,67.59 -25.4,97 -27.01,58.98 -70.49,105.42 -126.69,137.57 -34.3,19.63 -79.56,33.64 -119,36.52 0,0 -12,0.91 -12,0.91 0,0 -34,0 -34,0 0,0 -10,-0.91 -10,-0.91 -26.57,-1.94 -53.09,-8.27 -78,-17.67 C 163.49,569.9 134.12,553.46 109,532.57 79.87,508.33 54.41,478.39 36.31,445 -5.08,368.65 -11.86,276.57 18.05,195 47.85,113.75 113.21,48.92 194,18.42 213.55,11.04 236.32,5.43 257,2.43 Z"
style="display:inline;fill:#c95e46;fill-opacity:1"/>
<path
style="display:inline;fill:#7e3525;fill-opacity:1;stroke:#000000;stroke-width:0.999129;stroke-dasharray:none;stroke-opacity:1"
d="m 278.25473,537.27772 c -22.36635,-1.29637 -48.78648,-8.31223 -69.74195,-18.51997 -47.30139,-23.04123 -75.19872,-59.72004 -85.45343,-112.35234 -2.77041,-14.21911 -2.51753,-48.32296 0.4755,-64.1246 4.84373,-25.57244 17.23939,-55.03329 30.65191,-72.85059 3.74877,-4.97991 16.33133,-18.11906 30.23479,-31.57223 13.09764,-12.67346 26.64745,-26.67202 30.11069,-31.10792 16.66894,-21.35045 26.46602,-44.71272 29.68313,-70.78286 1.93489,-15.67951 0.37962,-45.867231 -3.5802,-69.491071 -0.58906,-3.51428 0.36584,-3.52724 11.47726,-0.15583 36.51454,11.0792 67.37028,34.791071 89.32423,68.643431 9.96686,15.36862 20.07787,39.31263 24.78919,58.70364 2.23257,9.18886 2.53252,44.73878 0.46396,54.98571 -0.75708,3.75024 -1.10086,7.09425 -0.76396,7.43114 1.5021,1.5021 14.63666,-6.65479 21.98002,-13.65016 10.59844,-10.09621 14.32693,-17.61354 15.94714,-32.15254 l 1.16788,-10.47988 3.4626,3.95724 c 26.80954,30.6392 41.75268,56.11528 54.11775,92.26358 11.02075,32.21825 14.93902,62.79297 12.47422,97.33768 -1.88493,26.41774 -10.16486,50.6958 -24.95555,73.17369 -6.31625,9.59901 -30.86306,34.05172 -40.40914,40.25423 -23.44452,15.23295 -50.15355,25.25695 -77.26806,28.99903 -12.48732,1.72336 -38.04339,2.42637 -54.18798,1.49062 z m 48.34948,-30.34196 c 30.78066,-8.0491 53.53846,-30.12825 59.69792,-57.9177 2.48916,-11.23027 2.26087,-34.25269 -0.43747,-44.11787 -5.3998,-19.74181 -9.72931,-26.61651 -30.6237,-48.62658 -16.92925,-17.8332 -21.73398,-24.64464 -25.45673,-36.0889 -2.38622,-7.33554 -2.63126,-9.53814 -2.57644,-23.15876 0.0334,-8.27872 0.486,-17.4607 1.00593,-20.40441 0.75887,-4.29636 0.66928,-5.45812 -0.45409,-5.88919 -2.12997,-0.81736 -16.25071,4.45522 -21.90917,8.1807 -25.69349,16.91641 -42.62753,52.30879 -40.22917,84.07948 0.39046,5.17228 0.2831,8.79277 -0.26071,8.79277 -1.78935,0 -13.49435,-13.46378 -15.34792,-17.65406 -1.03171,-2.33236 -2.15967,-6.42651 -2.50657,-9.09812 -1.00143,-7.71233 -1.60778,-8.14619 -5.46339,-3.90915 -13.31687,14.63425 -24.58113,35.69359 -29.53283,55.21379 -11.75615,46.34414 2.14731,84.38956 37.55813,102.77397 16.56338,8.59931 29.2427,11.25369 51.26679,10.73261 12.58064,-0.29766 17.41119,-0.85366 25.26942,-2.90858 z"
id="path8"/>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
width="169.34801mm"
height="169.34801mm"
viewBox="0 0 600 600"
version="1.1"
id="svg1"
sodipodi:docname="U.svg"
inkscape:export-filename="U.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns="http://www.w3.org/2000/svg">
<defs
id="defs1"/>
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:document-units="mm">
<inkscape:page
x="0"
y="0"
width="600"
height="600"
id="page2"
margin="0"
bleed="0"/>
</sodipodi:namedview>
<path
id="Selection"
fill="none"
stroke="#000000"
stroke-width="1"
d="m 275,0.21 c 0,0 42,0 42,0 0,0 19,1.51 19,1.51 29.13,3.58 56.99,10.83 84,22.43 33.64,14.45 59.89,32.91 86.91,57.41 17.38,15.76 34.67,37.56 47.14,57.44 22.78,36.31 37.1,74.56 43.22,117 1.28,8.88 2.72,19.08 2.73,28 0,0 0,34 0,34 0,0 -0.91,10 -0.91,10 -2.36,32.29 -11.93,67.59 -25.4,97 -27.01,58.98 -70.49,105.42 -126.69,137.57 -34.3,19.63 -79.56,33.64 -119,36.52 0,0 -12,0.91 -12,0.91 0,0 -34,0 -34,0 0,0 -10,-0.91 -10,-0.91 -26.57,-1.94 -53.09,-8.27 -78,-17.67 C 163.49,569.9 134.12,553.46 109,532.57 79.87,508.33 54.41,478.39 36.31,445 -5.08,368.65 -11.86,276.57 18.05,195 47.85,113.75 113.21,48.92 194,18.42 213.55,11.04 236.32,5.43 257,2.43 Z"
style="display:inline;fill:#4a8fd8;fill-opacity:1"/>
<path
style="display:inline;fill:#3266af;fill-opacity:1;stroke:#000000;stroke-width:1.06525;stroke-opacity:1"
d="m 275.20608,536.5693 c -58.69596,-9.5447 -107.01545,-50.69962 -125.66779,-107.0344 -9.25532,-27.95342 -10.39669,-58.82111 -3.22092,-87.1088 5.31307,-20.94475 9.06296,-28.00552 81.87785,-154.17 38.54798,-66.79109 70.40461,-121.77997 70.79251,-122.19751 1.00535,-1.08215 140.3595,240.63696 145.26785,251.97682 8.6735,20.03855 12.6923,39.82747 12.6923,62.49805 0,44.25387 -16.70161,83.24077 -48.85852,114.0514 -21.46938,20.57055 -45.69209,33.39124 -76.46586,40.47213 -12.83139,2.95245 -42.64639,3.75165 -56.41742,1.51231 z"
id="path2"
sodipodi:nodetypes="ssssssssss"/>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="169.34801mm"
height="169.34801mm"
viewBox="0 0 600 600"
version="1.1"
id="svg1"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
sodipodi:docname="W.svg"
inkscape:export-filename="W.png"
xmlns="http://www.w3.org/2000/svg">
<defs
id="defs1"/>
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:document-units="mm">
<inkscape:page
x="0"
y="0"
width="600"
height="600"
id="page2"
margin="0"
bleed="0"/>
</sodipodi:namedview>
<path
id="Selection"
fill="none"
stroke="#000000"
stroke-width="1"
d="m 275,0.21 c 0,0 42,0 42,0 0,0 19,1.51 19,1.51 29.13,3.58 56.99,10.83 84,22.43 33.64,14.45 59.89,32.91 86.91,57.41 17.38,15.76 34.67,37.56 47.14,57.44 22.78,36.31 37.1,74.56 43.22,117 1.28,8.88 2.72,19.08 2.73,28 0,0 0,34 0,34 0,0 -0.91,10 -0.91,10 -2.36,32.29 -11.93,67.59 -25.4,97 -27.01,58.98 -70.49,105.42 -126.69,137.57 -34.3,19.63 -79.56,33.64 -119,36.52 0,0 -12,0.91 -12,0.91 0,0 -34,0 -34,0 0,0 -10,-0.91 -10,-0.91 -26.57,-1.94 -53.09,-8.27 -78,-17.67 C 163.49,569.9 134.12,553.46 109,532.57 79.87,508.33 54.41,478.39 36.31,445 -5.08,368.65 -11.86,276.57 18.05,195 47.85,113.75 113.21,48.92 194,18.42 213.55,11.04 236.32,5.43 257,2.43 Z"
style="display:inline;fill:#ffefb3;fill-opacity:1"/>
<path
id="circle8"
d="M 387.28106,302.711 A 85.962512,85.962512 0 0 1 301.31852,388.67353 85.962512,85.962512 0 0 1 215.35597,302.711 85.962512,85.962512 0 0 1 301.31852,216.74844 85.962512,85.962512 0 0 1 387.28106,302.711 Z M 191.75349,358.6114 143.05798,460.97151 245.4181,412.27601 A 121.73882,121.73882 0 0 1 191.75349,358.6114 Z M 178.33753,302.711 c 0,-13.16763 2.23687,-25.83857 5.96271,-38.01232 L 77.71657,302.711 184.30024,340.7233 a 119.25435,119.25435 0 0 1 -5.96271,-38.0123 z m 178.8814,109.56501 102.36011,48.6955 -48.6955,-102.36011 a 121.73882,121.73882 0 0 1 -53.66461,53.66461 z m -55.90041,13.41595 c -13.16762,0 -26.0869,-2.23687 -38.01232,-5.9627 l 38.01232,106.58368 38.01231,-106.58368 a 119.25435,119.25435 0 0 1 -38.01231,5.9627 z m 109.56502,-178.88139 48.6955,-102.36012 -102.36011,48.69551 a 122.98106,122.98106 0 0 1 53.66461,53.66461 z M 245.66643,193.14596 143.30658,144.45045 192.00209,246.81057 a 121.73882,121.73882 0 0 1 53.66434,-53.66461 z M 524.92046,302.711 418.33679,264.69868 a 119.25435,119.25435 0 0 1 0,76.02462 z M 301.31852,179.73 c 13.16761,0 26.0869,2.23688 38.01231,5.96271 L 301.31852,79.109036 263.3062,185.69271 A 119.25435,119.25435 0 0 1 301.31852,179.73 Z"
style="fill:#b4a35e;fill-opacity:1;stroke:#000000;stroke-width:1.09833;stroke-dasharray:none;stroke-opacity:1"/>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="64" height="64">
<g transform="matrix(0 1 -1 0 99.465813 0)" opacity="0.7">
<path fill="#000000" fill-rule="evenodd" clip-rule="evenodd"
stroke="#ffffff"
stroke-width="4"
stroke-linejoin="round"
stroke-linecap="round"
d="M65.5 62
L78 49
C73.5 44.5 69.5 42 63 44
L45 31 C47 25 46 22 41.5 18
L19 41.5
C23 45.5 25 46.5 31 45
L44 62.5
C42.3 69 45 73.5 49 78
L61.5 65.5
L84 87
L87 87
L87.5 86.5
L87.5 83.5 Z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 736 B

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
<g><path d="M586.9,373.6l95.6-84.4c-49.6-39.2-129.4-79.1-198.2-79.1c-134.9,0-248.2,90.5-280.2,212.8L10.6,374.5C64.4,168.3,255.2,15.8,482.5,15.8c126.7,0,258.8,63.7,345.4,141.4l90.8-80.1L990,479.6L586.9,373.6z M317.5,710.8c49.6,39.2,129.4,79.1,198.2,79.1c134.9,0,248.2-90.5,280.2-212.8l193.5,48.5c-53.7,206.2-244.6,358.7-471.9,358.7c-126.7,0-258.8-63.7-345.4-141.4l-90.8,80.1L10,520.4l403.1,106L317.5,710.8z"/></g>
</svg>

After

Width:  |  Height:  |  Size: 797 B

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">
<path transform="scale(50)" d="m17 16h4v-8h-4" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<path transform="scale(50)" d="m12 8h-9v8h9" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<path transform="scale(50)" d="m6 12h5" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<path transform="scale(50)" d="m20 4h-2c-1.1 0-2 0.9-2 2v12c0 1.1 0.9 2 2 2h2" fill="none" stroke="#000"
stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
<path transform="scale(50)" d="m12 20h2c1.1 0 2-0.9 2-2v-12c0-1.1-0.9-2-2-2h-2" fill="none" stroke="#000"
stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
</svg>

After

Width:  |  Height:  |  Size: 875 B

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