Skip to content

Conversation

@ahmouse15
Copy link
Contributor

I'll leave this as a draft PR until everything is fully working.
So far, I've only done the following:

  • Add .gitattributes so line endings are consistent
  • Add a symlink on the desktop and an icon for the launcher

The main issue I didn't fix is that TTREngine doesn't have execute permissions by default, so the game can't run, but since I'm not sure how you build the program, I didn't wanna push any commits that I couldn't test.

Fixes a possible issue with line endings between Linux and Windows. run.sh had CRLF (Windows) line endings, which ran fine through the desktop launcher shortcut (using bash), however running run.sh manually would use sh (Bourne shell) which cannot interpret CRLF characters. Now, line endings should be proper and consistent
@hyperdefined
Copy link
Owner

hyperdefined commented Dec 7, 2021

From my testing, TTREngine downloads with the execute permission (it did so with me at least). I could in the future maybe either set the permission with the launcher after it downloads it.

Thank you for the other 2, I got lazy with setting the icon. I also didn't know how Linux desktop shortcuts work, so thank you for adding that.

@ahmouse15
Copy link
Contributor Author

Of course, I'm mostly doing this so I can use the launcher myself haha.

Anyways, I figured out how to build the project, so I've gone ahead and had the program give execute perms on TTREngine in LaunchGame.java, which worked in testing. Also, since I updated .gitattributes, git automatically changed the line endings, which is why some files have a bunch of useless inserts and deletes. From what I've read this should only happen this once, and from now on line endings will automatically be handled by git, so I hope that is alright with you

On the Linux side of things, TTR seems to have a bug right now on Linux, where borderless video mode doesn't work, and instead puts a transparent window which eventually hangs and freezes the system (you can still see the TTR cursor though). Unfortunately, borderless mode is also the default video mode, meaning users have to manually go to settings.json and set display-mode to window in order to play. Would it be alright if I put a hotfix in the launcher to automatically set the video mode until the bug is fixed?

Lastly, when adding an account on both Windows and Linux, users can set an empty passphrase, but cannot login with an empty passphrase since an error pops up complaining that You must enter the passphrase.

P.S. I appreciate all the effort you put into making this launcher. With the new field offices tracker, it has just about much everything my friend and I need :)

@hyperdefined
Copy link
Owner

I didn't realize that fullscreen bug was with TTR, I figured it was something else. Feel free to set it to windowed mode if you are on Linux. Up to you if you wish to do it once or force it every time.

Allowing empty passphrase must of been something I changed recently. It used to not allow them in the past, but apparently I did something wrong and now it's broken. I will look into that soon. Or, do you think I should have the option to allow no passphrase and just store passwords via plaintext?

@ahmouse15
Copy link
Contributor Author

ahmouse15 commented Dec 7, 2021

Alright, I'll go ahead and add that within a few days then mark this ready for review.

For the secret phrase, I personally would prefer having no phrase, since TTR isn't the most sensitive thing. Maybe instead of storing it in plain text, just use a random key and store that somewhere and automatically use that? Might be slightly more secure in that it might protect against an automated sort of credential scraper, if it's easy to implement

EDIT: Also, how would you feel if I added a CCG schedule similar to the invasion and field offices?

@ahmouse15 ahmouse15 marked this pull request as ready for review December 8, 2021 01:39
@hyperdefined
Copy link
Owner

hyperdefined commented Dec 8, 2021

The secret passphrase was added because I figured users would like to have their passwords encrypted. It was requested for my old launcher, so I added in this new one. However, I can see why you don't want it (TTR isn't sensitive info).

I will work on an update to allow no passphrases and save in plaintext. You won't have to re-add your accounts, I will prompt for each account that is saved using the old default encryption so you can remove or keep it.

I am all for you adding the CCG schedule to the launcher. I don't participate myself in the group, but it would be nice for the users who need the schedule to have it. I might also add TTR's population to the launcher for the fun of it, they have an API for that.

Edit: I used a passphrase because that's all I really knew how to implement. I have no experience with using private/public keys or similar to encrypt info.

@hyperdefined hyperdefined merged commit dbe6970 into hyperdefined:master Dec 8, 2021
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