Jump to content
  • Sign Up
Tycho10101

LaunchiCube Announcement

Recommended Posts

I'm on mobile so I can't test it atm, but this looks like a really cool project!

A few things that I think you can improve (this is only from looking at the code, so I may not get the full picture):

  • Move initialization logic (creating directories, etc.) into separate function instead of in the file scope
  • Instead of downloading CC every time the program is opened, check for updates using builds.json; as update logic gets more complex, move updating to separate class
  • Detect OS using `os.name`/`sys.platform`/`platform.system()` (see here) + `is_64bit = sys.maxsize > 2**32` to download the correct binary
  • Line 21-22: Change `finally: "Do nothing"` to `except: pass`; `finally` does nothing to stop errors because there's nothing to catch them; `pass` is a better way to say `"do nothing"`
Edited by TomCube2
Fix formatting
  • Agree 2

Share this post


Link to post
On 2/9/2025 at 5:53 PM, TomCube2 said:

I'm on mobile so I can't test it atm, but this looks like a really cool project!

A few things that I think you can improve (this is only from looking at the code, so I may not get the full picture):

  • Move initialization logic (creating directories, etc.) into separate function instead of in the file scope
  • Instead of downloading CC every time the program is opened, check for updates using builds.json; as update logic gets more complex, move updating to separate class
  • Detect OS using `os.name`/`sys.platform`/`platform.system()` (see here) + `is_64bit = sys.maxsize > 2**32` to download the correct binary
  • Line 21-22: Change `finally: "Do nothing"` to `except: pass`; `finally` does nothing to stop errors because there's nothing to catch them; `pass` is a better way to say `"do nothing"`

Done 1, 4 and half of 2 (If you have an idea on how to check dev versions, tell me. But don't say to use the latest_ts in the builds.json, the file update time gets changed for some reason on the exe) These were great suggestions! thank you! I'll be working on 3 now!

Share this post


Link to post

Don't check the file update time; store the value of `latest_ts` in a file (I'd recommend an entry in `options.txt` Actually, don't put it in `options.txt`.  I saw that you have JSON files, so it'd probably be better to use those) so you can compare it when you update

Edited by TomCube2
  • Agree 1

Share this post


Link to post

I need testers for mac, linux and 32bit users. So if you can test, please do. If you have any bugs, make an issue. Thanks!

Share this post


Link to post
On 2/12/2025 at 12:06 AM, Tycho10101 said:

I need testers for mac, linux and 32bit users. So if you can test, please do. If you have any bugs, make an issue. Thanks!

Do you only need 32 bit Mac users or is 64 bit available?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...