Page MenuHomeWildfire Games

Fix 1 general and 3 OSX-specific issues in Atlas
ClosedPublic

Authored by wraitii on Jun 5 2020, 2:41 PM.

Details

Summary

This fixes a few issues with Atlas that prevent it from working on Catalina:

  • Remove the 'osxguiapplication' override. This fixes the editor starting up in the background and not accepting input.
  • To prevent an issue with sdl/wxwidgets conflict when running from inside the game, actually boot a new instance (see #2427)
  • Fix an assertion error because we try to use SDL subsystems that aren't initialised.

General issue:

  • Fix key events not being correctly sent to the game since we upgraded to SDL2 and use SDL_TEXTINPUT for text (see #2846)

The last remaining thing is the retina-size issue, which is fixable (see wik's post) but needs work.


D2752 is not technically a prerequisite, but you can't test on catalina without it.


This is cleanup work form issues reported by user wik on the forum, see:
https://wildfiregames.com/forum/index.php?/topic/28242-trunk23678-atlas-and-actor-editor-ignores-input-from-the-keyboard-on-osx/
https://wildfiregames.com/forum/index.php?/topic/28183-trunk23664-cant-open-atlas-editor-on-osx-catalina-10154/

Test Plan

Compile under various platforms, open as a standalone and from in-game.

Event Timeline

wraitii created this revision.Jun 5 2020, 2:41 PM
Owners added a subscriber: Restricted Owners Package.Jun 5 2020, 2:41 PM
Stan added a subscriber: Stan.Jun 5 2020, 2:44 PM
Stan added inline comments.
source/lib/sysdep/os/osx/osx_atlas.mm
32

This would be a regression... How hard is it to fix it?

Vulcan added a comment.Jun 5 2020, 2:49 PM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/tools/atlas/AtlasUI/Misc/DLLInterface.cpp
|   1| /*·Copyright·(C)·2017·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2017"

source/tools/atlas/AtlasUI/Misc/KeyMap.cpp
|   1| /*·Copyright·(C)·2013·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2013"

source/main.cpp
|   0| }
|    | [NORMAL] CPPCheckBear (toomanyconfigs):
|    | Too many #ifdef configurations - cppcheck only checks 12 configurations. Use --force to check all configurations. For more details, use --enable=information.

source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp
| 211| ····ev.ev.type·=·SDL_TEXTINPUT;
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Unmatched '}'. Configuration: 'MESSAGESSETUP_NOTFIRST'.

source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2321/display/redirect

yevgenko added inline comments.Jun 6 2020, 8:54 AM
source/main.cpp
658

It looks like this line uses spaces for indentation, while the line above uses tabs.

source/ps/GameSetup/HWDetect.cpp
386

a bit of indentation issue you probably know about :)

source/tools/atlas/AtlasUI/Misc/KeyMap.cpp
81

a bit of indentation issue (spaces vs tabs) you probably know about :)

wraitii added inline comments.Jun 6 2020, 9:27 AM
source/lib/sysdep/os/osx/osx_atlas.mm
32

Hardly a regression when the current status is "doesn't start" :P

it's not too hard to fix I think, just haven't bothered for the first diff.

Stan added inline comments.Jun 6 2020, 10:16 AM
source/lib/sysdep/os/osx/osx_atlas.mm
32

Well it used to start on other Mac and I believe the release didn't have the issue? :P

wraitii added a subscriber: trompetin17.

@trompetin17 Feel free to review this one too :)

in my osx Catalino works pretty well, I think the only thing is to add arguments.

wraitii updated this revision to Diff 12816.Jul 20 2020, 3:17 PM
wraitii marked 5 inline comments as done.

Pass mods on the command line.

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2726/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1094/display/redirect

wraitii updated this revision to Diff 13011.Aug 3 2020, 9:02 AM

Kinda hoping this fixes the macos CI, I'm really not sure what's going on there.

Vulcan added a comment.Aug 3 2020, 9:08 AM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1207/display/redirect

Vulcan added a comment.Aug 3 2020, 9:15 AM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/tools/atlas/AtlasUI/Misc/KeyMap.cpp
|   1| /*·Copyright·(C)·2013·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2013"

source/main.cpp
|   0| }
|    | [NORMAL] CPPCheckBear (toomanyconfigs):
|    | Too many #ifdef configurations - cppcheck only checks 12 configurations. Use --force to check all configurations. For more details, use --enable=information.

source/tools/atlas/AtlasUI/Misc/DLLInterface.cpp
|   1| /*·Copyright·(C)·2017·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2017"

source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp
| 211| »   ev.ev.type·=·SDL_TEXTINPUT;
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Unmatched '}'. Configuration: 'MESSAGESSETUP_NOTFIRST'.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2844/display/redirect

Stan added a comment.Aug 3 2020, 9:24 AM
../../../source/lib/sysdep/os/osx/osx_atlas.mm:48:15: error: no type or protocol named 'NSWorkspaceLaunchConfigurationKey'
        NSDictionary<NSWorkspaceLaunchConfigurationKey, id> *params = @{ NSWorkspaceLaunchConfigurationArguments: args }
wraitii added a reviewer: Itms.Aug 3 2020, 9:35 AM
wraitii added a subscriber: Itms.

I really have no idea why we get this failure. This is supposed to be defined in Appkit.h, which I do include -_- .

@Itms would you have an idea maybe? We might need to link against appkit ?

Itms added a comment.Aug 3 2020, 9:41 AM

I really have no idea why we get this failure. This is supposed to be defined in Appkit.h, which I do include -_- .

@Itms would you have an idea maybe? We might need to link against appkit ?

I suppose it is not present in the 10.9 SDK. Maybe it's elsewhere, or more recent.

wraitii updated this revision to Diff 13013.Aug 3 2020, 9:58 AM

Right. That was it. Apple is lying :p

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/tools/atlas/AtlasUI/Misc/KeyMap.cpp
|   1| /*·Copyright·(C)·2013·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2013"

source/tools/atlas/AtlasUI/Misc/DLLInterface.cpp
|   1| /*·Copyright·(C)·2017·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2017"

source/main.cpp
|   0| }
|    | [NORMAL] CPPCheckBear (toomanyconfigs):
|    | Too many #ifdef configurations - cppcheck only checks 12 configurations. Use --force to check all configurations. For more details, use --enable=information.

source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

source/tools/atlas/GameInterface/Handlers/MiscHandlers.cpp
| 211| »   ev.ev.type·=·SDL_TEXTINPUT;
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Unmatched '}'. Configuration: 'MESSAGESSETUP_NOTFIRST'.

source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2846/display/redirect

Stan added a comment.Aug 3 2020, 11:36 AM

Seems to work fine on W10 I tried fuzzing the text but could not break it.
Maybe you could commit the cleanup separately. Don't forget headers.

Do you want to me to try something else?

source/ps/GameSetup/HWDetect.cpp
387

Does that send an incorrect report ?

source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp
643

I guess if could be merged

1056

same here

wraitii added inline comments.Aug 3 2020, 11:38 AM
source/ps/GameSetup/HWDetect.cpp
387

I'm not sure atlas uses the user-reporter ?
We're not using the SDL video mode anyways so this is supposed to be none here.

Stan added inline comments.Aug 3 2020, 11:40 AM
source/ps/GameSetup/HWDetect.cpp
387

I don't know could be checked. Maybe you could inline it directly instead of adding another ternary?

Itms removed a reviewer: Itms.Aug 3 2020, 11:50 AM
Itms removed a subscriber: Itms.
This revision was not accepted when it landed; it landed in state Needs Review.Aug 3 2020, 2:23 PM
This revision was automatically updated to reflect the committed changes.