Skip to content

Create test-menu.cpp#80

Merged
WhyPenguins merged 2 commits intothoth-tech:mainfrom
Wills2022:Test-Menu
Oct 1, 2024
Merged

Create test-menu.cpp#80
WhyPenguins merged 2 commits intothoth-tech:mainfrom
Wills2022:Test-Menu

Conversation

@Wills2022
Copy link
Contributor

@Wills2022 Wills2022 commented Sep 3, 2024

Test menu is a program intended to give arcade-machine users an easier method of compiling & testing their games on local hardware without having to rely on SSHing into the machine to setup & run games.

Test menu is intended to be added to the Arcade's games list as an executable, users then use the existing emulationstation interface to load test menu, which then is used to configure, compile & run games.

The program will setup file structure necessary for the game to be run from emulationstation once emulationstation is restarted. The program assumes the existence of a predefined arcade launch scripts folder. (I.E. /home/deakin/Games/LaunchScripts/)

The program does not support cloning from private repositories, and expects that the user's repo is public.

The program requires a config file called config.cfg to function, an example is provided below:

arcadeLaunchDir=/home/user/Games/LaunchScripts
compileCmd=skm clang++ *.cpp -o DEBUG_GAME_BUILD
gitRepoName=SplashkitArcadeTestMenu
gitUserName=Wills2022
tempDir=TestMode

Type of change

  • Enhancement

How Has This Been Tested?

Tested locally on my workstation as well as on my raspberrypi4, which is running a locally configured copy of the Thoth-Tech Arcade machine

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have requested a review from ... on the Pull Request

@WhyPenguins
Copy link
Contributor

Notes from the live review:

  • Would be good to auto generate default config
  • repoURL should be kept internal - not written out to config
  • Maybe pass strings as const ref
  • Fix minor mixing of tabs and spaces
  • Increase STRING_MAX_SIZE

Reviewed by Ethan Mark Holley and Mathew James Harding 😄
(Otherwise looks really good!)

@Wills2022
Copy link
Contributor Author

Wills2022 commented Sep 24, 2024

Hi Sean, many thanks for your feedback. I have made the changes requested:

Would be good to auto generate default config

This is done if there is no config.cfg file in the directory the program is run from. The program will now create a generic config file, rather than throwing an exception.

repoURL should be kept internal - not written out to config

the repoURL key in the config map has been removed. Now this gets generated on the fly when it is needed using set_repo_url() function.

Maybe pass strings as const ref

This has been done where relevant.

Fix minor mixing of tabs and spaces

Ditto

Increase STRING_MAX_SIZE

This constant has been increased to 256. As discussed, and for future reference, this constraint exists as users entering text can simply hold "right" on the joystick and otherwise create a string of infinite length. So, the max input size should be capped to "something" but this exact value is left at the discretion of the user, and can be arbitrarily changed before compilation.

Copy link
Contributor

@WhyPenguins WhyPenguins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Really nice work 😃

@WhyPenguins WhyPenguins merged commit 31e3449 into thoth-tech:main Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants