Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RenPy 8 / Python 3.9 migration #9493

Merged
merged 197 commits into from
Feb 20, 2024
Merged

RenPy 8 / Python 3.9 migration #9493

merged 197 commits into from
Feb 20, 2024

Conversation

Booplicate
Copy link
Member

@Booplicate Booplicate commented Sep 6, 2022

Migration of our codebase to RenPy 8 / Python 3.9

We want to test #9742 first, it can be merged into r7.4, or into content after we merge r7.4 there. But it should be ready when this PR is ready.

Update changelog as you push!

Changelog

Changelog:

Code:

  • Utilised some new config vars from r8
  • logging has been updated to py3 (e.g. no more extra spaghetti to deal with newlines)
  • Chess was updated for py3, improved MASPiece, optimised Monika's AI code
  • Updated MASFormatter for py3/r8, slightly optimised
  • Updated mas_find_target (part of our private API)
  • glitchtext from DDLC was backported and optimised as mas_glitchText
    • _mas_root.glitchtext was removed as obsolete
  • pushEvent > mas_pushEvent
  • queueEvent > mas_queueEvent
  • New store for overrides (?) mas_overrides
  • Cleaned up cursed pong code
  • Window reacts
    • Events now share rules (we copy the dict)
    • Events are marked with restartBlacklist
  • Backported ParticleBurst from DDLC
  • We don't check for DDLC rpa anymore
    • But maybe we should check for at least some?
  • We now report why we had to reset outfit/hair
  • Updated _MASMoniFollowTransformDissolve
  • Backported poems:
    • poem_m1 (Hole in Wall (Part 1))
    • poem_m21 (Hole in Wall (Part 2))
    • poem_m2 (Save Me)
    • poem_m3 (The Lady who Knows Everything)
    • poem_m4 (Happy End)
  • Updated our custom updater code
    • Is it working?
  • Updated our build
    • We're building our own executables now, we name them DDLC to obey the guidelines
    • Cleaned up builder massively
    • No longer use a custom package, instead build cross-platform "for market"
    • scripts are packed into scripts.rpa
  • Updated persistent validation, we're using the compat code to be able to load py classes from py2
  • Window utils were updated
    • Code cleanup, optimisation, and py3 migration
    • We're now caching hwnd on Windows OS
    • We're using winnie32api now
      • MAS now always has tray icon (single) regardless of notifications
        • Clicking on the icon can clear notifs, set focus on MAS window
      • MAS window can be flashed when sending a notif (a new parameter for the mas_display_notif)
    • Better x11/wayland check
  • Old unused code removed
    • MASMacLog
    • macLogOpen
    • getMASLog
    • logcreate
    • logrotate
    • mas_with_statement
    • MASImageData
    • Event.checkConditionals
    • Event.checkCalendar
    • Event._checkRepeatRule
    • Event.checkRepeatRules
    • Event.checkAffectionRules
    • Event._checkAffectionRule
    • MASInteractable
    • hideEventLabel
    • lockEvent
    • lockEventLabel
    • unlockEvent
    • popEvent
    • MASAffectionRule
    • grant_xp
    • get_level
    • mas_isMorning
    • mas_shouldChangeTime
    • _decide_filter
    • acs_lean_mode
    • clearUpdateStructs
    • getDayRoom
    • getNightRoom
    • unlock_selector
    • sp_window
    • isbg_window

RenPy script

  • Removed the mas_set_gender label
  • Removed/commented out battery related labels
  • Backported styles from DDLC
    • console_
    • poem_
  • Backported multiple DDLC transforms
  • Backported poem images
    • paper
    • paper_glitch2

Python-packages

  • Removed py2 logging, renpy now includes logging by default
  • Removed py2 balloontip, it didn't use winapi properly and required shipping extra libs
  • Removed py2 battery, never worked anyway
  • Removed py2 eliza, was unused
  • Removed py2 win32api
  • Added unittest, we can write proper unittest! Also useful for submods
  • Added winnie32api my miniature wrapper around win32 api using ctypes

Files

  • Unused old icons
    • Removed CustomIconMac.icns
    • Moved and renamed CustomIconWindows.ico
      • It's now game/mod_assets/mas_icon.ico and is used as the window icon as well as notif icon on Windows OS
  • Backported poem words from DDLC
    • game/mod_assets/games/hangman/poemwords.txt
  • Backported DDLC's gui.rpy

Misc

  • Updated GH actions
    • Update again to use the version we're going to stick for a while, instead of the latest nightly
  • Cleaned up gitignore, updated accordingly to the new repo structure
  • Updated README.html
    • Requires to be updated again, r8 isn't a beta test, it's our main version
    • Should also update README.md
  • Updated project.json
  • Removed update/current.json, it shouldn't be in the repo
  • Tools were updated to py3.9 and/or py3.10
    • Some tools were removed as obsolete

Testing:

  • TBA

@ThePotatoGuy
Copy link
Member

hmmm ok I'll check these conflicts out, then approve this to go in as long as it runs.

that'll make it easier to solve the remaining outstanding boxes on the py3 prep as the major stuff is in

ThePotatoGuy
ThePotatoGuy previously approved these changes Feb 16, 2024
Copy link
Member

@ThePotatoGuy ThePotatoGuy left a comment

Choose a reason for hiding this comment

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

aiight

@ThePotatoGuy ThePotatoGuy removed the request for review from jmwall24 February 16, 2024 04:48
@ThePotatoGuy
Copy link
Member

@multimokia @Legendkiller21 yall still around ?

ThePotatoGuy
ThePotatoGuy previously approved these changes Feb 17, 2024
Copy link
Member

@ThePotatoGuy ThePotatoGuy left a comment

Choose a reason for hiding this comment

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

lol forgot that commit

@ThePotatoGuy ThePotatoGuy mentioned this pull request Feb 18, 2024
@ThePotatoGuy ThePotatoGuy removed the request for review from Legendkiller21 February 18, 2024 01:58
ThePotatoGuy
ThePotatoGuy previously approved these changes Feb 18, 2024
Copy link
Member

@ThePotatoGuy ThePotatoGuy left a comment

Choose a reason for hiding this comment

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

(tested that it runs and persistent loads) twice

Copy link
Member

@ThePotatoGuy ThePotatoGuy left a comment

Choose a reason for hiding this comment

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

tested the following:

  • loading v12.12 persistent with game/saves deleted - v12 persistent was loaded + no game/saves created
  • loading v13 backup persistent - backup persistent loaded + no game/saves created
  • loading v13 normal persistent - normal persistent loaded + no game/saves created

Copy link
Member

@multimokia multimokia left a comment

Choose a reason for hiding this comment

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

Screm

@ThePotatoGuy ThePotatoGuy removed awaiting testing code needs to be tested DONT MERGE srs awaiting code review someone needs to check for syntax/logic/indentation errors labels Feb 20, 2024
@ThePotatoGuy ThePotatoGuy merged commit 075b3e9 into content Feb 20, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

py3 prep
4 participants