From 6f2bd47a4c3e036c812591c85139cc50814f4812 Mon Sep 17 00:00:00 2001 From: TrialTemp Date: Tue, 9 Jan 2024 12:19:42 -0600 Subject: [PATCH 01/44] Practice in Tournaments! --- .../ba_data/python/bascenev1/_coopsession.py | 12 +- .../ba_data/python/bascenev1/_session.py | 2 + .../python/bascenev1lib/activity/coopscore.py | 14 +- .../python/bauiv1lib/tournamententry.py | 131 +++++++++++++----- 4 files changed, 115 insertions(+), 44 deletions(-) diff --git a/src/assets/ba_data/python/bascenev1/_coopsession.py b/src/assets/ba_data/python/bascenev1/_coopsession.py index 72a67919..268b8ae8 100644 --- a/src/assets/ba_data/python/bascenev1/_coopsession.py +++ b/src/assets/ba_data/python/bascenev1/_coopsession.py @@ -60,7 +60,11 @@ class CoopSession(Session): max_players = classic.coop_session_args['max_players'] else: max_players = app.config.get('Coop Game Max Players', 4) - + if 'submit_score' in classic.coop_session_args: + submit_score = classic.coop_session_args['submit_score'] + else: + submit_score = True + # print('FIXME: COOP SESSION WOULD CALC DEPS.') depsets: Sequence[bascenev1.DependencySet] = [] @@ -70,6 +74,7 @@ class CoopSession(Session): team_colors=TEAM_COLORS, min_players=min_players, max_players=max_players, + submit_score=submit_score, ) # Tournament-ID if we correspond to a co-op tournament (otherwise None) @@ -341,7 +346,10 @@ class CoopSession(Session): self.setactivity(next_game) if not (env.demo or env.arcade): - if self.tournament_id is not None: + if ( + self.tournament_id is not None and + activity.session._submit_score + ): self._custom_menu_ui = [ { 'label': babase.Lstr(resource='restartText'), diff --git a/src/assets/ba_data/python/bascenev1/_session.py b/src/assets/ba_data/python/bascenev1/_session.py index 9ee55313..a76167b5 100644 --- a/src/assets/ba_data/python/bascenev1/_session.py +++ b/src/assets/ba_data/python/bascenev1/_session.py @@ -91,6 +91,7 @@ class Session: team_colors: Sequence[Sequence[float]] | None = None, min_players: int = 1, max_players: int = 8, + submit_score: bool = True, ): """Instantiate a session. @@ -162,6 +163,7 @@ class Session: self.sessionplayers = [] self.min_players = min_players self.max_players = max_players + self._submit_score = submit_score self.customdata = {} self._in_set_activity = False diff --git a/src/assets/ba_data/python/bascenev1lib/activity/coopscore.py b/src/assets/ba_data/python/bascenev1lib/activity/coopscore.py index 8b335a19..2bcf5514 100644 --- a/src/assets/ba_data/python/bascenev1lib/activity/coopscore.py +++ b/src/assets/ba_data/python/bascenev1lib/activity/coopscore.py @@ -124,6 +124,7 @@ class CoopScoreScreen(bs.Activity[bs.Player, bs.Team]): self._tournament_time_remaining: float | None = None self._tournament_time_remaining_text: Text | None = None self._tournament_time_remaining_text_timer: bs.BaseTimer | None = None + self._submit_score = self.session._submit_score # Stuff for activity skip by pressing button self._birth_time = bs.time() @@ -776,7 +777,7 @@ class CoopScoreScreen(bs.Activity[bs.Player, bs.Team]): transition_delay=2.0, ) - if self._score is not None: + if self._score is not None and self._submit_score: bs.timer(0.4, bs.WeakCall(self._play_drumroll)) # Add us to high scores, filter, and store. @@ -1371,7 +1372,7 @@ class CoopScoreScreen(bs.Activity[bs.Player, bs.Team]): assert self._show_info is not None available = self._show_info['results'] is not None - if available: + if available and self._submit_score: error = ( self._show_info['results']['error'] if 'error' in self._show_info['results'] @@ -1504,7 +1505,7 @@ class CoopScoreScreen(bs.Activity[bs.Player, bs.Team]): maxwidth=400, transition_delay=1.0, ).autoretain() - else: + elif self._submit_score: ZoomText( ( ('#' + str(player_rank)) @@ -1722,9 +1723,10 @@ class CoopScoreScreen(bs.Activity[bs.Player, bs.Team]): transition_delay=0, ).autoretain() - bs.timer(0.35, self._score_display_sound.play) - if not error: - bs.timer(0.35, self.cymbal_sound.play) + if self._submit_score: + bs.timer(0.35, self._score_display_sound.play) + if not error: + bs.timer(0.35, self.cymbal_sound.play) def _show_fail(self) -> None: ZoomText( diff --git a/src/assets/ba_data/python/bauiv1lib/tournamententry.py b/src/assets/ba_data/python/bauiv1lib/tournamententry.py index d00c37dd..bea86616 100644 --- a/src/assets/ba_data/python/bauiv1lib/tournamententry.py +++ b/src/assets/ba_data/python/bauiv1lib/tournamententry.py @@ -85,6 +85,17 @@ class TournamentEntryWindow(PopupWindow): bg_color = (0.5, 0.4, 0.6) + # Show the practice button as long as we're not + # restarting while on a paid tournament run. + from bascenev1lib.activity.coopscore import CoopScoreScreen + self._do_practice = ( + self._tournament_activity is None or + isinstance(self._tournament_activity, CoopScoreScreen) + ) + + off_p = 0 if not self._do_practice else 48 + self._height += (off_p*0.933) + # Creates our root_widget. super().__init__( position=position, @@ -107,7 +118,7 @@ class TournamentEntryWindow(PopupWindow): self._cancel_button = bui.buttonwidget( parent=self.root_widget, - position=(20, self._height - 34), + position=(40, self._height - 34), size=(60, 60), scale=0.5, label='', @@ -132,15 +143,15 @@ class TournamentEntryWindow(PopupWindow): btn = self._pay_with_tickets_button = bui.buttonwidget( parent=self.root_widget, - position=(30 + x_offs, 60), + position=(30 + x_offs, 60 + off_p), autoselect=True, button_type='square', size=(120, 120), label='', on_activate_call=self._on_pay_with_tickets_press, ) - self._ticket_img_pos = (50 + x_offs, 94) - self._ticket_img_pos_free = (50 + x_offs, 80) + self._ticket_img_pos = (50 + x_offs, 94 + off_p) + self._ticket_img_pos_free = (50 + x_offs, 80 + off_p) self._ticket_img = bui.imagewidget( parent=self.root_widget, draw_controller=btn, @@ -148,8 +159,8 @@ class TournamentEntryWindow(PopupWindow): position=self._ticket_img_pos, texture=bui.gettexture('tickets'), ) - self._ticket_cost_text_position = (87 + x_offs, 88) - self._ticket_cost_text_position_free = (87 + x_offs, 120) + self._ticket_cost_text_position = (87 + x_offs, 88 + off_p) + self._ticket_cost_text_position_free = (87 + x_offs, 120 + off_p) self._ticket_cost_text = bui.textwidget( parent=self.root_widget, draw_controller=btn, @@ -165,7 +176,7 @@ class TournamentEntryWindow(PopupWindow): self._free_plays_remaining_text = bui.textwidget( parent=self.root_widget, draw_controller=btn, - position=(87 + x_offs, 78), + position=(87 + x_offs, 78 + off_p), size=(0, 0), h_align='center', v_align='center', @@ -178,7 +189,7 @@ class TournamentEntryWindow(PopupWindow): if self._do_ad_btn: btn = self._pay_with_ad_btn = bui.buttonwidget( parent=self.root_widget, - position=(190, 60), + position=(190, 60 + off_p), autoselect=True, button_type='square', size=(120, 120), @@ -189,12 +200,12 @@ class TournamentEntryWindow(PopupWindow): parent=self.root_widget, draw_controller=btn, size=(80, 80), - position=(210, 94), + position=(210, 94 + off_p), texture=bui.gettexture('tv'), ) - self._ad_text_position = (251, 88) - self._ad_text_position_remaining = (251, 92) + self._ad_text_position = (251, 88 + off_p) + self._ad_text_position_remaining = (251, 92 + off_p) have_ad_tries_remaining = ( self._tournament_info['adTriesRemaining'] is not None ) @@ -222,7 +233,7 @@ class TournamentEntryWindow(PopupWindow): self._ad_plays_remaining_text = bui.textwidget( parent=self.root_widget, draw_controller=btn, - position=(251, 78), + position=(251, 78 + off_p), size=(0, 0), h_align='center', v_align='center', @@ -234,7 +245,7 @@ class TournamentEntryWindow(PopupWindow): bui.textwidget( parent=self.root_widget, - position=(self._width * 0.5, 120), + position=(self._width * 0.5, 120 + off_p), size=(0, 0), h_align='center', v_align='center', @@ -248,13 +259,28 @@ class TournamentEntryWindow(PopupWindow): else: self._pay_with_ad_btn = None + btn_size = (150, 45) + btn_pos = ( + self._width / 2 - btn_size[0]/2, + self._width / 2 - 110 + ) + if self._do_practice: + self._practice_button = bui.buttonwidget( + parent=self.root_widget, + position=btn_pos, + autoselect=True, + size=btn_size, + label=bui.Lstr(resource='practiceText'), + on_activate_call=self.on_practice_press, + ) + self._get_tickets_button: bui.Widget | None = None self._ticket_count_text: bui.Widget | None = None if not bui.app.ui_v1.use_toolbars: if bui.app.classic.allow_ticket_purchases: self._get_tickets_button = bui.buttonwidget( parent=self.root_widget, - position=(self._width - 190 + 125, self._height - 34), + position=(self._width - 190 + 105, self._height - 34), autoselect=True, scale=0.5, size=(120, 60), @@ -370,6 +396,8 @@ class TournamentEntryWindow(PopupWindow): sel = self.root_widget.get_selected_child() if sel == self._pay_with_ad_btn: sel_name = 'Ad' + elif sel == self._practice_button: + sel_name = 'Practice' else: sel_name = 'Tickets' cfg = bui.app.config @@ -380,6 +408,8 @@ class TournamentEntryWindow(PopupWindow): sel_name = bui.app.config.get('Tournament Pay Selection', 'Tickets') if sel_name == 'Ad' and self._pay_with_ad_btn is not None: sel = self._pay_with_ad_btn + elif sel_name == 'Practice' and self._practice_button is not None: + sel = self._practice_button else: sel = self._pay_with_tickets_button bui.containerwidget(edit=self.root_widget, selected_child=sel) @@ -523,29 +553,37 @@ class TournamentEntryWindow(PopupWindow): text=bui.charstr(bui.SpecialChar.TICKET) + t_str, ) - def _launch(self) -> None: + def _launch(self, practice = False) -> None: assert bui.app.classic is not None if self._launched: return self._launched = True launched = False - # If they gave us an existing activity, just restart it. - if self._tournament_activity is not None: + # If they gave us an existing, non-consistent + # practice activity, just restart it. + if ( + self._tournament_activity is not None and + not practice == self._tournament_activity.session._submit_score + ): try: - bui.apptimer(0.1, bui.getsound('cashRegister').play) + if not practice: + bui.apptimer(0.1, bui.getsound('cashRegister').play) + bui.screenmessage( + bui.Lstr( + translate=('serverResponses', 'Entering tournament...') + ), + color=(0, 1, 0), + ) + bui.apptimer( + 0 if practice else 0.3, + self._transition_out + ) + launched = True with self._tournament_activity.context: self._tournament_activity.end( {'outcome': 'restart'}, force=True ) - bui.apptimer(0.3, self._transition_out) - launched = True - bui.screenmessage( - bui.Lstr( - translate=('serverResponses', 'Entering tournament...') - ), - color=(0, 1, 0), - ) # We can hit exceptions here if _tournament_activity ends before # our restart attempt happens. @@ -558,27 +596,29 @@ class TournamentEntryWindow(PopupWindow): # If we had no existing activity (or were unable to restart it) # launch a new session. if not launched: - bui.apptimer(0.1, bui.getsound('cashRegister').play) + if not practice: + bui.apptimer(0.1, bui.getsound('cashRegister').play) + bui.screenmessage( + bui.Lstr( + translate=('serverResponses', 'Entering tournament...') + ), + color=(0, 1, 0), + ) bui.apptimer( - 1.0, + 0 if practice else 1.0, lambda: bui.app.classic.launch_coop_game( self._tournament_info['game'], args={ 'min_players': self._tournament_info['minPlayers'], 'max_players': self._tournament_info['maxPlayers'], 'tournament_id': self._tournament_id, + 'submit_score': not practice, }, ) if bui.app.classic is not None else None, ) - bui.apptimer(0.7, self._transition_out) - bui.screenmessage( - bui.Lstr( - translate=('serverResponses', 'Entering tournament...') - ), - color=(0, 1, 0), - ) + bui.apptimer(0 if practice else 0.7, self._transition_out) def _on_pay_with_tickets_press(self) -> None: from bauiv1lib import getcurrency @@ -674,6 +714,25 @@ class TournamentEntryWindow(PopupWindow): 'tournament_entry', on_completion_call=bui.WeakCall(self._on_ad_complete), ) + + def on_practice_press(self) -> None: + plus = bui.app.plus + assert plus is not None + + # If we're already entering, ignore. + if self._entering: + return + + # Deny if it looks like the tourney has ended. + if self._seconds_remaining == 0: + bui.screenmessage( + bui.Lstr(resource='tournamentEndedText'), color=(1, 0, 0) + ) + bui.getsound('error').play() + return + + self._entering = True + self._launch(practice=True) def _on_ad_complete(self, actually_showed: bool) -> None: plus = bui.app.plus @@ -751,4 +810,4 @@ class TournamentEntryWindow(PopupWindow): def on_popup_cancel(self) -> None: bui.getsound('swish').play() - self._on_cancel() + self._on_cancel() \ No newline at end of file From 7d176131ad93249f5255b7f128a7df0e0237b356 Mon Sep 17 00:00:00 2001 From: TrialTemp Date: Tue, 9 Jan 2024 12:23:56 -0600 Subject: [PATCH 02/44] md --- CHANGELOG.md | 2 ++ CONTRIBUTORS.md | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1480580..f103923a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ - Players now get points for killing bots with their own bombs by catching it and throwing it back at them. This is actually old logic but was disabled due to a logic flaw, but should be fixed now. (Thanks VinniTR!) +- Added a 'Practice' button in tournaments, letting you play them free of + charge while not submitting scores. (Thanks Temp!) ### 1.7.32 (build 21741, api 8, 2023-12-20) - Fixed a screen message that no one will ever see (Thanks vishal332008?...) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 8fccc544..626648a1 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -50,3 +50,6 @@ ### Rikko - Created the original "reject_recently_left_players" plugin + +### Temp (3alTemp) +- Modder & Bug Fixer \ No newline at end of file From ddc00c764d9a0286bd7c92d288a4c664dc6df203 Mon Sep 17 00:00:00 2001 From: TrialTemp Date: Tue, 9 Jan 2024 12:40:52 -0600 Subject: [PATCH 03/44] Window transition delay increased --- src/assets/ba_data/python/bauiv1lib/tournamententry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/ba_data/python/bauiv1lib/tournamententry.py b/src/assets/ba_data/python/bauiv1lib/tournamententry.py index bea86616..fee7c0b9 100644 --- a/src/assets/ba_data/python/bauiv1lib/tournamententry.py +++ b/src/assets/ba_data/python/bauiv1lib/tournamententry.py @@ -618,7 +618,7 @@ class TournamentEntryWindow(PopupWindow): if bui.app.classic is not None else None, ) - bui.apptimer(0 if practice else 0.7, self._transition_out) + bui.apptimer(0 if practice else 1.25, self._transition_out) def _on_pay_with_tickets_press(self) -> None: from bauiv1lib import getcurrency From 3ca2f2b5c3af1759cf8dbae29922699e5cbab109 Mon Sep 17 00:00:00 2001 From: TrialTemp Date: Tue, 9 Jan 2024 12:47:52 -0600 Subject: [PATCH 04/44] preflight doing preflight things again --- .../ba_data/python/bascenev1/_coopsession.py | 6 +-- .../python/bauiv1lib/tournamententry.py | 37 +++++++++---------- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/assets/ba_data/python/bascenev1/_coopsession.py b/src/assets/ba_data/python/bascenev1/_coopsession.py index 268b8ae8..abfa3771 100644 --- a/src/assets/ba_data/python/bascenev1/_coopsession.py +++ b/src/assets/ba_data/python/bascenev1/_coopsession.py @@ -64,7 +64,7 @@ class CoopSession(Session): submit_score = classic.coop_session_args['submit_score'] else: submit_score = True - + # print('FIXME: COOP SESSION WOULD CALC DEPS.') depsets: Sequence[bascenev1.DependencySet] = [] @@ -347,8 +347,8 @@ class CoopSession(Session): if not (env.demo or env.arcade): if ( - self.tournament_id is not None and - activity.session._submit_score + self.tournament_id is not None + and activity.session._submit_score ): self._custom_menu_ui = [ { diff --git a/src/assets/ba_data/python/bauiv1lib/tournamententry.py b/src/assets/ba_data/python/bauiv1lib/tournamententry.py index fee7c0b9..bfac56bc 100644 --- a/src/assets/ba_data/python/bauiv1lib/tournamententry.py +++ b/src/assets/ba_data/python/bauiv1lib/tournamententry.py @@ -88,13 +88,13 @@ class TournamentEntryWindow(PopupWindow): # Show the practice button as long as we're not # restarting while on a paid tournament run. from bascenev1lib.activity.coopscore import CoopScoreScreen - self._do_practice = ( - self._tournament_activity is None or - isinstance(self._tournament_activity, CoopScoreScreen) + + self._do_practice = self._tournament_activity is None or isinstance( + self._tournament_activity, CoopScoreScreen ) - + off_p = 0 if not self._do_practice else 48 - self._height += (off_p*0.933) + self._height += off_p * 0.933 # Creates our root_widget. super().__init__( @@ -260,10 +260,7 @@ class TournamentEntryWindow(PopupWindow): self._pay_with_ad_btn = None btn_size = (150, 45) - btn_pos = ( - self._width / 2 - btn_size[0]/2, - self._width / 2 - 110 - ) + btn_pos = (self._width / 2 - btn_size[0] / 2, self._width / 2 - 110) if self._do_practice: self._practice_button = bui.buttonwidget( parent=self.root_widget, @@ -553,7 +550,7 @@ class TournamentEntryWindow(PopupWindow): text=bui.charstr(bui.SpecialChar.TICKET) + t_str, ) - def _launch(self, practice = False) -> None: + def _launch(self, practice=False) -> None: assert bui.app.classic is not None if self._launched: return @@ -563,22 +560,22 @@ class TournamentEntryWindow(PopupWindow): # If they gave us an existing, non-consistent # practice activity, just restart it. if ( - self._tournament_activity is not None and - not practice == self._tournament_activity.session._submit_score + self._tournament_activity is not None + and not practice == self._tournament_activity.session._submit_score ): try: if not practice: bui.apptimer(0.1, bui.getsound('cashRegister').play) bui.screenmessage( bui.Lstr( - translate=('serverResponses', 'Entering tournament...') + translate=( + 'serverResponses', + 'Entering tournament...', + ) ), color=(0, 1, 0), ) - bui.apptimer( - 0 if practice else 0.3, - self._transition_out - ) + bui.apptimer(0 if practice else 0.3, self._transition_out) launched = True with self._tournament_activity.context: self._tournament_activity.end( @@ -714,7 +711,7 @@ class TournamentEntryWindow(PopupWindow): 'tournament_entry', on_completion_call=bui.WeakCall(self._on_ad_complete), ) - + def on_practice_press(self) -> None: plus = bui.app.plus assert plus is not None @@ -722,7 +719,7 @@ class TournamentEntryWindow(PopupWindow): # If we're already entering, ignore. if self._entering: return - + # Deny if it looks like the tourney has ended. if self._seconds_remaining == 0: bui.screenmessage( @@ -810,4 +807,4 @@ class TournamentEntryWindow(PopupWindow): def on_popup_cancel(self) -> None: bui.getsound('swish').play() - self._on_cancel() \ No newline at end of file + self._on_cancel() From d8a9a881f45bfbc48f2026f537a545109f49255f Mon Sep 17 00:00:00 2001 From: 3alTemp Date: Sun, 3 Mar 2024 20:41:55 -0600 Subject: [PATCH 05/44] HEX support --- CHANGELOG.md | 1 + .../ba_data/python/bauiv1lib/colorpicker.py | 166 +++++++++++++++++- 2 files changed, 158 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e9f4499..f5aaa9f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ EraOSBeta!) - Added a UI for customizing Series Length in Teams and Points-to-Win in FFA (Thanks EraOSBeta!) +- Implemented HEX code support to the advanced color picker (Thanks 3alTemp!) ### 1.7.32 (build 21741, api 8, 2023-12-20) - Fixed a screen message that no one will ever see (Thanks vishal332008?...) diff --git a/src/assets/ba_data/python/bauiv1lib/colorpicker.py b/src/assets/ba_data/python/bauiv1lib/colorpicker.py index 30887432..b6bbd2fb 100644 --- a/src/assets/ba_data/python/bauiv1lib/colorpicker.py +++ b/src/assets/ba_data/python/bauiv1lib/colorpicker.py @@ -43,9 +43,7 @@ class ColorPicker(PopupWindow): scale = ( 2.3 if uiscale is bui.UIScale.SMALL - else 1.65 - if uiscale is bui.UIScale.MEDIUM - else 1.23 + else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23 ) self._parent = parent self._position = position @@ -206,9 +204,7 @@ class ColorPickerExact(PopupWindow): scale = ( 2.3 if uiscale is bui.UIScale.SMALL - else 1.65 - if uiscale is bui.UIScale.MEDIUM - else 1.23 + else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23 ) self._delegate = delegate self._transitioning_out = False @@ -217,6 +213,8 @@ class ColorPickerExact(PopupWindow): self._last_press_time = bui.apptime() self._last_press_color_name: str | None = None self._last_press_increasing: bool | None = None + self._hex_timer: bui.AppTimer | None = None + self._hex_prev_text: str = '#FFFFFF' self._change_speed = 1.0 width = 180.0 height = 240.0 @@ -233,11 +231,25 @@ class ColorPickerExact(PopupWindow): ) self._swatch = bui.imagewidget( parent=self.root_widget, - position=(width * 0.5 - 50, height - 70), - size=(100, 70), - texture=bui.gettexture('buttonSquare'), + position=(width * 0.5 - 65 + 5, height - 95), + size=(130, 115), + texture=bui.gettexture('clayStroke'), color=(1, 0, 0), ) + self._hex_textbox = bui.textwidget( + parent=self.root_widget, + position=(width * 0.5 - 37.5 + 3, height - 51), + max_chars=9, + text='#FFFFFF', + # on_return_press_call=self._done, + autoselect=True, + size=(75, 30), + v_align='center', + editable=True, + maxwidth=70, + force_internal_editing=True, + ) + x = 50 y = height - 90 self._label_r: bui.Widget @@ -292,6 +304,33 @@ class ColorPickerExact(PopupWindow): # color to the delegate, so start doing that. self._update_for_color() + # Update our HEX stuff! + self._update_for_hex() + self._hex_timer = bui.AppTimer(0.025, self._update_for_hex, repeat=True) + + def _update_for_hex(self) -> None: + """Update for any HEX or color change.""" + from typing import cast + + hextext = cast(str, bui.textwidget(query=self._hex_textbox)) + hexcolor: tuple[float, float, float, float] + # Check if our current hex text doesn't match with our old one. + # Convert our current hex text into a color if possible. + if hextext != self._hex_prev_text: + try: + hexcolor = hex_to_color(hextext) + r, g, b, _ = hexcolor + # Replace the color! + for i, ch in enumerate((r, g, b)): + self._color[i] = max(0.0, min(1.0, ch)) + self._update_for_color() + # Usually, a ValueError will occur if the provided hex + # is incomplete, which occurs when in the midst of typing it. + except ValueError: + pass + # Store the current text for our next comparison. + self._hex_prev_text = hextext + # noinspection PyUnresolvedReferences def _update_for_color(self) -> None: if not self.root_widget: @@ -307,6 +346,16 @@ class ColorPickerExact(PopupWindow): if self._delegate is not None: self._delegate.color_picker_selected_color(self, self._color) + # Show the HEX code of this color. + r, g, b = self._color + hexcode = color_to_hex(r, g, b, None) + self._hex_prev_text = hexcode + bui.textwidget( + edit=self._hex_textbox, + text=hexcode, + color=color_overlay_func(r, g, b), + ) + def _color_change_press(self, color_name: str, increasing: bool) -> None: # If we get rapid-fire presses, eventually start moving faster. current_time = bui.apptime() @@ -335,6 +384,8 @@ class ColorPickerExact(PopupWindow): return self._tag def _transition_out(self) -> None: + # Kill our timer + self._hex_timer = None if not self._transitioning_out: self._transitioning_out = True if self._delegate is not None: @@ -346,3 +397,100 @@ class ColorPickerExact(PopupWindow): if not self._transitioning_out: bui.getsound('swish').play() self._transition_out() + + +def hex_to_color(hex_color: str) -> tuple: + """Transforms an RGB / RGBA hex code into an rgb1/rgba1 tuple. + + Args: + hex_color (str): The HEX color. + Raises: + ValueError: If the provided HEX color isn't 6 or 8 characters long. + Returns: + tuple: The color tuple divided by 255. + """ + # Remove the '#' from the string if provided. + if hex_color.startswith('#'): + hex_color = hex_color.lstrip('#') + # Check if this has a valid length. + hexlength = len(hex_color) + if not hexlength in [6, 8]: + raise ValueError(f'Invalid HEX color provided: "{hex_color}"') + + # Convert the hex bytes to their true byte form. + ar, ag, ab, aa = ( + (int.from_bytes(bytes.fromhex(hex_color[0:2]))), + (int.from_bytes(bytes.fromhex(hex_color[2:4]))), + (int.from_bytes(bytes.fromhex(hex_color[4:6]))), + ( + int.from_bytes(bytes.fromhex(hex_color[6:8])) + if hexlength == 8 + else 255 + ), + ) + # Divide all numbers by 255 and return. + nr, ng, nb, na = (x / 255 if x is not None else None for x in (ar, ag, ab, aa)) + return (nr, ng, nb, na) if aa is not None else (nr, ng, nb) + + +def color_to_hex(r: float, g: float, b: float, a: float | None = 1.0) -> str: + """Converts an rgb1 tuple to a HEX color code. + + Args: + r (float): Red. + g (float): Green. + b (float): Blue. + a (float, optional): Alpha. Defaults to 1.0. + + Returns: + str: The hexified rgba values. + """ + # Turn our rgb1 to rgb255 + nr, ng, nb, na = [ + int(min(255, x * 255)) if x is not None else x for x in [r, g, b, a] + ] + # Merge all values into their HEX representation. + hex_code = ( + f'#{nr:02x}{ng:02x}{nb:02x}{na:02x}' + if na is not None + else f'#{nr:02x}{ng:02x}{nb:02x}' + ) + return hex_code + + +def color_overlay_func( + r: float, g: float, b: float, a: float | None = None +) -> tuple: + """I could NOT come up with a better function name. + + Args: + r (float): Red. + g (float): Green. + b (float): Blue. + a (float | None, optional): Alpha. Defaults to None. + + Returns: + tuple: A brighter color if the provided one is dark, + and a darker one if it's darker. + """ + + # Calculate the relative luminance using the formula for sRGB + # https://www.w3.org/TR/WCAG20/#relativeluminancedef + def relative_luminance(color: float) -> Any: + if color <= 0.03928: + return color / 12.92 + return ((color + 0.055) / 1.055) ** 2.4 + + luminance = ( + 0.2126 * relative_luminance(r) + + 0.7152 * relative_luminance(g) + + 0.0722 * relative_luminance(b) + ) + # Set our color multiplier depending on the provided color's luminance. + luminant = 1.65 if luminance < 0.33 else 0.2 + # Multiply our given numbers, making sure + # they don't blend in the original bg. + avg = (0.7 - (r + g + b / 3)) + 0.15 + r, g, b = [max(avg, x * luminant) for x in (r, g, b)] + # Include our alpha and ship it! + return (r, g, b, a) if a is not None else (r, g, b) From 0d27a54835801ee0729a53150415f588bdb7eaff Mon Sep 17 00:00:00 2001 From: 3alTemp Date: Sun, 3 Mar 2024 20:52:18 -0600 Subject: [PATCH 06/44] MyPy is YourPy --- src/assets/ba_data/python/bauiv1lib/colorpicker.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/assets/ba_data/python/bauiv1lib/colorpicker.py b/src/assets/ba_data/python/bauiv1lib/colorpicker.py index b6bbd2fb..c7e57b2e 100644 --- a/src/assets/ba_data/python/bauiv1lib/colorpicker.py +++ b/src/assets/ba_data/python/bauiv1lib/colorpicker.py @@ -319,7 +319,11 @@ class ColorPickerExact(PopupWindow): if hextext != self._hex_prev_text: try: hexcolor = hex_to_color(hextext) - r, g, b, _ = hexcolor + if len(hexcolor) == 4: + r, g, b, a = hexcolor + del a # unused + else: + r, g, b = hexcolor # Replace the color! for i, ch in enumerate((r, g, b)): self._color[i] = max(0.0, min(1.0, ch)) @@ -422,11 +426,9 @@ def hex_to_color(hex_color: str) -> tuple: (int.from_bytes(bytes.fromhex(hex_color[0:2]))), (int.from_bytes(bytes.fromhex(hex_color[2:4]))), (int.from_bytes(bytes.fromhex(hex_color[4:6]))), - ( - int.from_bytes(bytes.fromhex(hex_color[6:8])) - if hexlength == 8 - else 255 - ), + (int.from_bytes(bytes.fromhex(hex_color[6:8]))) + if hexlength == 8 + else None, ) # Divide all numbers by 255 and return. nr, ng, nb, na = (x / 255 if x is not None else None for x in (ar, ag, ab, aa)) From 4309ee56e45a2cb8f470fac712a6cd23490c8704 Mon Sep 17 00:00:00 2001 From: 3alTemp Date: Sun, 3 Mar 2024 20:54:53 -0600 Subject: [PATCH 07/44] That should do it! --- src/assets/ba_data/python/bauiv1lib/colorpicker.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/assets/ba_data/python/bauiv1lib/colorpicker.py b/src/assets/ba_data/python/bauiv1lib/colorpicker.py index c7e57b2e..31ebcbae 100644 --- a/src/assets/ba_data/python/bauiv1lib/colorpicker.py +++ b/src/assets/ba_data/python/bauiv1lib/colorpicker.py @@ -313,7 +313,7 @@ class ColorPickerExact(PopupWindow): from typing import cast hextext = cast(str, bui.textwidget(query=self._hex_textbox)) - hexcolor: tuple[float, float, float, float] + hexcolor: tuple # Check if our current hex text doesn't match with our old one. # Convert our current hex text into a color if possible. if hextext != self._hex_prev_text: @@ -431,7 +431,10 @@ def hex_to_color(hex_color: str) -> tuple: else None, ) # Divide all numbers by 255 and return. - nr, ng, nb, na = (x / 255 if x is not None else None for x in (ar, ag, ab, aa)) + nr, ng, nb, na = ( + x / 255 if x is not None + else None for x in (ar, ag, ab, aa) + ) return (nr, ng, nb, na) if aa is not None else (nr, ng, nb) From 1a42c50052a4f63e119d13e5bdd05d3b71498bf3 Mon Sep 17 00:00:00 2001 From: 3alTemp Date: Sun, 3 Mar 2024 21:46:46 -0600 Subject: [PATCH 08/44] El code --- .../python/bascenev1lib/actor/playerspaz.py | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py b/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py index 2ea3ead7..0eabd825 100644 --- a/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py +++ b/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py @@ -225,9 +225,22 @@ class PlayerSpaz(Spaz): elif isinstance(msg, bs.DieMessage): # Report player deaths to the game. if not self._dead: + # Was this player killed while being held? + was_held = ( + self.held_count > 0 + and self.last_player_held_by + ) + # Was this player attacked before death? + was_attacked_recently = ( + self.last_player_attacked_by + and bs.time() - self.last_attacked_time < 4.0 + ) # Immediate-mode or left-game deaths don't count as 'kills'. killed = ( - not msg.immediate and msg.how is not bs.DeathType.LEFT_GAME + not msg.immediate + and msg.how is not bs.DeathType.LEFT_GAME + or was_held + or was_attacked_recently ) activity = self._activity() @@ -238,7 +251,7 @@ class PlayerSpaz(Spaz): else: # If this player was being held at the time of death, # the holder is the killer. - if self.held_count > 0 and self.last_player_held_by: + if was_held: killerplayer = self.last_player_held_by else: # Otherwise, if they were attacked by someone in the @@ -248,10 +261,7 @@ class PlayerSpaz(Spaz): # all bot kills would register as suicides; need to # change this from last_player_attacked_by to # something like last_actor_attacked_by to fix that. - if ( - self.last_player_attacked_by - and bs.time() - self.last_attacked_time < 4.0 - ): + if was_attacked_recently: killerplayer = self.last_player_attacked_by else: # ok, call it a suicide unless we're in co-op From c125cbe123fd4c5364147cb1e7252a5a94cefdf0 Mon Sep 17 00:00:00 2001 From: 3alTemp Date: Sun, 3 Mar 2024 22:09:44 -0600 Subject: [PATCH 09/44] El code --- .../python/bascenev1lib/actor/playerspaz.py | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py b/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py index 2ea3ead7..578a9ef7 100644 --- a/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py +++ b/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py @@ -225,9 +225,22 @@ class PlayerSpaz(Spaz): elif isinstance(msg, bs.DieMessage): # Report player deaths to the game. if not self._dead: + # Was this player killed while being held? + was_held = ( + self.held_count > 0 + and self.last_player_held_by + ) + # Was this player attacked before death? + was_attacked_recently = ( + self.last_player_attacked_by + and bs.time() - self.last_attacked_time < 4.0 + ) # Immediate-mode or left-game deaths don't count as 'kills'. - killed = ( - not msg.immediate and msg.how is not bs.DeathType.LEFT_GAME + killed = bool( + not msg.immediate + and msg.how is not bs.DeathType.LEFT_GAME + or was_held + or was_attacked_recently ) activity = self._activity() @@ -238,7 +251,7 @@ class PlayerSpaz(Spaz): else: # If this player was being held at the time of death, # the holder is the killer. - if self.held_count > 0 and self.last_player_held_by: + if was_held: killerplayer = self.last_player_held_by else: # Otherwise, if they were attacked by someone in the @@ -248,10 +261,7 @@ class PlayerSpaz(Spaz): # all bot kills would register as suicides; need to # change this from last_player_attacked_by to # something like last_actor_attacked_by to fix that. - if ( - self.last_player_attacked_by - and bs.time() - self.last_attacked_time < 4.0 - ): + if was_attacked_recently: killerplayer = self.last_player_attacked_by else: # ok, call it a suicide unless we're in co-op From f30e8be399af4322466b8db7bc2cbd186e288706 Mon Sep 17 00:00:00 2001 From: 3alTemp Date: Sun, 3 Mar 2024 22:11:20 -0600 Subject: [PATCH 10/44] yeah --- src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py b/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py index 6b065d82..578a9ef7 100644 --- a/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py +++ b/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py @@ -236,11 +236,7 @@ class PlayerSpaz(Spaz): and bs.time() - self.last_attacked_time < 4.0 ) # Immediate-mode or left-game deaths don't count as 'kills'. -<<<<<<< HEAD killed = bool( -======= - killed = ( ->>>>>>> 1a42c50052a4f63e119d13e5bdd05d3b71498bf3 not msg.immediate and msg.how is not bs.DeathType.LEFT_GAME or was_held From 5ad94067eb998352dc1dd24cf4ce54ed64b04a6e Mon Sep 17 00:00:00 2001 From: 3alTemp Date: Sun, 3 Mar 2024 22:26:16 -0600 Subject: [PATCH 11/44] changed logs, flown pres --- CHANGELOG.md | 2 ++ .../ba_data/python/bascenev1lib/actor/playerspaz.py | 11 +++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e9f4499..a47749b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,8 @@ EraOSBeta!) - Added a UI for customizing Series Length in Teams and Points-to-Win in FFA (Thanks EraOSBeta!) +- Players leaving the game after getting hurt will now grant kills. (Thanks + Temp!) ### 1.7.32 (build 21741, api 8, 2023-12-20) - Fixed a screen message that no one will ever see (Thanks vishal332008?...) diff --git a/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py b/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py index 578a9ef7..120773b2 100644 --- a/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py +++ b/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py @@ -79,14 +79,12 @@ class PlayerSpaz(Spaz): @overload def getplayer( self, playertype: type[PlayerT], doraise: Literal[False] = False - ) -> PlayerT | None: - ... + ) -> PlayerT | None: ... @overload def getplayer( self, playertype: type[PlayerT], doraise: Literal[True] - ) -> PlayerT: - ... + ) -> PlayerT: ... def getplayer( self, playertype: type[PlayerT], doraise: bool = False @@ -226,10 +224,7 @@ class PlayerSpaz(Spaz): # Report player deaths to the game. if not self._dead: # Was this player killed while being held? - was_held = ( - self.held_count > 0 - and self.last_player_held_by - ) + was_held = self.held_count > 0 and self.last_player_held_by # Was this player attacked before death? was_attacked_recently = ( self.last_player_attacked_by From 8bdd4b9cddfb7b8262100cf38da80c65ad894b49 Mon Sep 17 00:00:00 2001 From: 3alTemp Date: Tue, 5 Mar 2024 02:42:45 -0600 Subject: [PATCH 12/44] underscore jumpscare --- .../ba_data/python/bascenev1/_coopsession.py | 2 +- src/assets/ba_data/python/bascenev1/_session.py | 2 +- .../ba_data/python/bauiv1lib/tournamententry.py | 17 ++++++++--------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/assets/ba_data/python/bascenev1/_coopsession.py b/src/assets/ba_data/python/bascenev1/_coopsession.py index 719c5879..a68a72c4 100644 --- a/src/assets/ba_data/python/bascenev1/_coopsession.py +++ b/src/assets/ba_data/python/bascenev1/_coopsession.py @@ -353,7 +353,7 @@ class CoopSession(Session): if not (env.demo or env.arcade): if ( self.tournament_id is not None - and activity.session._submit_score + and classic.coop_session_args['submit_score'] ): self._custom_menu_ui = [ { diff --git a/src/assets/ba_data/python/bascenev1/_session.py b/src/assets/ba_data/python/bascenev1/_session.py index f9d58126..dd757346 100644 --- a/src/assets/ba_data/python/bascenev1/_session.py +++ b/src/assets/ba_data/python/bascenev1/_session.py @@ -176,7 +176,7 @@ class Session: if _max_players_override is None else _max_players_override ) - self._submit_score = submit_score + self.submit_score = submit_score self.customdata = {} self._in_set_activity = False diff --git a/src/assets/ba_data/python/bauiv1lib/tournamententry.py b/src/assets/ba_data/python/bauiv1lib/tournamententry.py index 3a5c0f55..36aa14a4 100644 --- a/src/assets/ba_data/python/bauiv1lib/tournamententry.py +++ b/src/assets/ba_data/python/bauiv1lib/tournamententry.py @@ -14,7 +14,7 @@ import bauiv1 as bui if TYPE_CHECKING: from typing import Any, Callable - + from bascenev1lib.activity.coopscore import CoopScoreScreen import bascenev1 as bs @@ -32,6 +32,7 @@ class TournamentEntryWindow(PopupWindow): on_close_call: Callable[[], Any] | None = None, ): # Needs some tidying. + # pylint: disable=too-many-locals # pylint: disable=too-many-branches # pylint: disable=too-many-statements @@ -82,15 +83,13 @@ class TournamentEntryWindow(PopupWindow): self._tournament_activity = tournament_activity - self._width = 340 - self._height = 225 + self._width: float = 340.0 + self._height: float = 225.0 bg_color = (0.5, 0.4, 0.6) # Show the practice button as long as we're not # restarting while on a paid tournament run. - from bascenev1lib.activity.coopscore import CoopScoreScreen - self._do_practice = self._tournament_activity is None or isinstance( self._tournament_activity, CoopScoreScreen ) @@ -270,7 +269,7 @@ class TournamentEntryWindow(PopupWindow): autoselect=True, size=btn_size, label=bui.Lstr(resource='practiceText'), - on_activate_call=self.on_practice_press, + on_activate_call=self._on_practice_press, ) self._get_tickets_button: bui.Widget | None = None @@ -552,7 +551,7 @@ class TournamentEntryWindow(PopupWindow): text=bui.charstr(bui.SpecialChar.TICKET) + t_str, ) - def _launch(self, practice=False) -> None: + def _launch(self, practice: bool = False) -> None: assert bui.app.classic is not None if self._launched: return @@ -563,7 +562,7 @@ class TournamentEntryWindow(PopupWindow): # practice activity, just restart it. if ( self._tournament_activity is not None - and not practice == self._tournament_activity.session._submit_score + and not practice == self._tournament_activity.session.submit_score ): try: if not practice: @@ -714,7 +713,7 @@ class TournamentEntryWindow(PopupWindow): on_completion_call=bui.WeakCall(self._on_ad_complete), ) - def on_practice_press(self) -> None: + def _on_practice_press(self) -> None: plus = bui.app.plus assert plus is not None From c312a0206a3d782a4ec0af14710e9f64925ac7b4 Mon Sep 17 00:00:00 2001 From: 3alTemp Date: Tue, 5 Mar 2024 02:51:32 -0600 Subject: [PATCH 13/44] _ --- src/assets/ba_data/python/bascenev1lib/activity/coopscore.py | 2 +- src/assets/ba_data/python/bauiv1lib/tournamententry.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/assets/ba_data/python/bascenev1lib/activity/coopscore.py b/src/assets/ba_data/python/bascenev1lib/activity/coopscore.py index 21ae486b..7b1bc9a7 100644 --- a/src/assets/ba_data/python/bascenev1lib/activity/coopscore.py +++ b/src/assets/ba_data/python/bascenev1lib/activity/coopscore.py @@ -125,7 +125,7 @@ class CoopScoreScreen(bs.Activity[bs.Player, bs.Team]): self._tournament_time_remaining: float | None = None self._tournament_time_remaining_text: Text | None = None self._tournament_time_remaining_text_timer: bs.BaseTimer | None = None - self._submit_score = self.session._submit_score + self._submit_score = self.session.submit_score # Stuff for activity skip by pressing button self._birth_time = bs.time() diff --git a/src/assets/ba_data/python/bauiv1lib/tournamententry.py b/src/assets/ba_data/python/bauiv1lib/tournamententry.py index 36aa14a4..010b2c8c 100644 --- a/src/assets/ba_data/python/bauiv1lib/tournamententry.py +++ b/src/assets/ba_data/python/bauiv1lib/tournamententry.py @@ -14,7 +14,6 @@ import bauiv1 as bui if TYPE_CHECKING: from typing import Any, Callable - from bascenev1lib.activity.coopscore import CoopScoreScreen import bascenev1 as bs @@ -90,9 +89,7 @@ class TournamentEntryWindow(PopupWindow): # Show the practice button as long as we're not # restarting while on a paid tournament run. - self._do_practice = self._tournament_activity is None or isinstance( - self._tournament_activity, CoopScoreScreen - ) + self._do_practice = self._tournament_activity is None off_p = 0 if not self._do_practice else 48 self._height += off_p * 0.933 From dab05db33134154e48f42577898a2653af6d2c0e Mon Sep 17 00:00:00 2001 From: 3alTemp Date: Wed, 13 Mar 2024 19:18:44 -0600 Subject: [PATCH 14/44] Reduced maxwidth arg. --- src/assets/ba_data/python/bauiv1lib/colorpicker.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/assets/ba_data/python/bauiv1lib/colorpicker.py b/src/assets/ba_data/python/bauiv1lib/colorpicker.py index 31ebcbae..0144260c 100644 --- a/src/assets/ba_data/python/bauiv1lib/colorpicker.py +++ b/src/assets/ba_data/python/bauiv1lib/colorpicker.py @@ -241,12 +241,11 @@ class ColorPickerExact(PopupWindow): position=(width * 0.5 - 37.5 + 3, height - 51), max_chars=9, text='#FFFFFF', - # on_return_press_call=self._done, autoselect=True, size=(75, 30), v_align='center', editable=True, - maxwidth=70, + maxwidth=40, force_internal_editing=True, ) From 3786e2bfb3385fc5bf6091f3c222fececb52e122 Mon Sep 17 00:00:00 2001 From: 3alTemp Date: Wed, 13 Mar 2024 19:39:26 -0600 Subject: [PATCH 15/44] Tweakeroo'd --- .../ba_data/python/bascenev1lib/actor/playerspaz.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py b/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py index 120773b2..fabfd2ef 100644 --- a/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py +++ b/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py @@ -230,14 +230,15 @@ class PlayerSpaz(Spaz): self.last_player_attacked_by and bs.time() - self.last_attacked_time < 4.0 ) - # Immediate-mode or left-game deaths don't count as 'kills'. - killed = bool( - not msg.immediate - and msg.how is not bs.DeathType.LEFT_GAME - or was_held - or was_attacked_recently + # Leaving the game doesn't count as a kill *unless* + # someone does it intentionally while being attacked. + left_game_cleanly = ( + msg.how is bs.DeathType.LEFT_GAME + and not (was_held or was_attacked_recently) ) + killed = not (msg.immediate or left_game_cleanly) + activity = self._activity() player = self.getplayer(bs.Player, False) From 7c45d16155fd03c138a30a07e3b1c6bde1344672 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 13 Mar 2024 18:47:43 -0700 Subject: [PATCH 16/44] added allow_clear_button arg to bauiv1.textwidget() --- .efrocachemap | 40 +++++++++---------- CHANGELOG.md | 4 +- src/assets/ba_data/python/baenv.py | 2 +- src/ballistica/shared/ballistica.cc | 2 +- .../python/methods/python_methods_ui_v1.cc | 13 ++++-- src/ballistica/ui_v1/widget/text_widget.cc | 8 ++-- src/ballistica/ui_v1/widget/text_widget.h | 4 +- 7 files changed, 43 insertions(+), 30 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 9f3ae8f4..569c0b12 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4061,26 +4061,26 @@ "build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1", "build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "db921cf43e8ebf733712fb5bbc673f66", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "4be0f3a7a88da423847863af41ac9c63", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "7c92d738e7cc724de2ca31cb876224e6", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "c2f69ed83f77b602e2a2b2b1c1c78cc6", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "b1c766d4ce567f965c53ff2a4c5c85f4", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "86ebbd9111f8a0fe7905cef7aba1f6db", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "8182f4e00ad579eb4c7be5ec1ddca8cb", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "3d9e0e7ad8706133e61fb7f7127c3ff5", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "5f98bf8b11376161a6f2f60900703f8a", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "99d7d247a422eaa46737e3232408e879", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "ffd6ad4dda003e9cd1434aa4a5bc9b09", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "216efc77915b75f39f0f15c2806bfbb9", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "ad9829c065248ee3cde01b6a31deafed", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "3e9e4e1761fd763eb584598fc0a3ad0a", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "7522a6fcac27b2579f9cc0b712ce413b", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "0c92e386ab7406da6a719131321bf592", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "608cb03aef4dc547aa7433f83f898911", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "db136c26a3a37611aef68046f2fab62c", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "3edbd652fbc7afe69f60335bab00875a", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "48e5cd932b8c322be18b593508d5c451", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "ae5d54179a3a0fae2de63332844033ad", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "6ee081b61d4f2fdbd93486ded4f9a64c", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "e7407d776c2109ff69a3cb5ba7ee96e3", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "31a2f27c9f96e6514546c2c287e2b02a", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "afe92df503843db897e9d352f0f9d15d", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "1c195ea2f0436b0857bcf1f53596c9ed", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "cebf710fd74b426078849cfb61ddfe05", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "70444645dab4201857c281df50c7fbab", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "4e65b35e7013a39b3c805e6b23f4c5be", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "a701d452a5a66b30b1a328c7e9da1d2f", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "90f94c72541a8b559fe5f937f59736cd", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "4f003ada50c0dea27919ffaf12ed9290", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "20b922e9f65985fec9c19bd31b834542", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "046391bb7ddf1a3e76c07a0299211572", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "2101b917622227aa21533653b21f9192", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "09bd3c5237d9cc020c805252470a05f5", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "1af6ad786269c5b2f2790d51bf651eb3", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "727fdbc097b2e24e12687ea9cf3c566a", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "a5e39a8fbb33b22b5c6791fe7a2c39f5", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "8ba33e36b368e3f2e31da15399fcad99", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "56d6440f62c271c4ce9ef520400395a3", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", diff --git a/CHANGELOG.md b/CHANGELOG.md index b8019ec3..cc9ca22b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.33 (build 21778, api 8, 2024-03-13) +### 1.7.33 (build 21779, api 8, 2024-03-13) - Stress test input-devices are now a bit smarter; they won't press any buttons while UIs are up (this could cause lots of chaos if it happened). - Added a 'Show Demos When Idle' option in advanced settings. If enabled, the @@ -69,6 +69,8 @@ cleanly however (an `on_app_active_changed()` call in the `AppMode` class). This means that it also applies to other platforms when the app reaches the 'inactive' state; for instance when minimizing the window on the SDL build. +- Added an `allow_clear_button` arg to bauiv1.textwidget() which can be used to + disable the 'X' button that clears editable text widgets. ### 1.7.31 (build 21727, api 8, 2023-12-17) - Added `bascenev1.get_connection_to_host_info_2()` which is an improved diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 697bffcd..5870b584 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -52,7 +52,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21778 +TARGET_BALLISTICA_BUILD = 21779 TARGET_BALLISTICA_VERSION = '1.7.33' diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 1e716406..0b9ab797 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21778; +const int kEngineBuildNumber = 21779; const char* kEngineVersion = "1.7.33"; const int kEngineApiVersion = 8; diff --git a/src/ballistica/ui_v1/python/methods/python_methods_ui_v1.cc b/src/ballistica/ui_v1/python/methods/python_methods_ui_v1.cc index 37992377..95d4132f 100644 --- a/src/ballistica/ui_v1/python/methods/python_methods_ui_v1.cc +++ b/src/ballistica/ui_v1/python/methods/python_methods_ui_v1.cc @@ -1932,6 +1932,7 @@ static auto PyTextWidget(PyObject* self, PyObject* args, PyObject* query_description_obj = Py_None; PyObject* adapter_finished_obj = Py_None; PyObject* glow_type_obj = Py_None; + PyObject* allow_clear_button_obj = Py_None; static const char* kwlist[] = {"edit", "parent", @@ -1972,9 +1973,10 @@ static auto PyTextWidget(PyObject* self, PyObject* args, "query_description", "adapter_finished", "glow_type", + "allow_clear_button", nullptr}; if (!PyArg_ParseTupleAndKeywords( - args, keywds, "|OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", + args, keywds, "|OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", const_cast(kwlist), &edit_obj, &parent_obj, &size_obj, &pos_obj, &text_obj, &v_align_obj, &h_align_obj, &editable_obj, &padding_obj, &on_return_press_call_obj, &on_activate_call_obj, @@ -1985,7 +1987,8 @@ static auto PyTextWidget(PyObject* self, PyObject* args, &shadow_obj, &autoselect_obj, &rotate_obj, &enabled_obj, &force_internal_editing_obj, &always_show_carat_obj, &big_obj, &extra_touch_border_scale_obj, &res_scale_obj, &query_max_chars_obj, - &query_description_obj, &adapter_finished_obj, &glow_type_obj)) + &query_description_obj, &adapter_finished_obj, &glow_type_obj, + &allow_clear_button_obj)) return nullptr; if (!g_base->CurrentContext().IsEmpty()) { @@ -2209,6 +2212,9 @@ static auto PyTextWidget(PyObject* self, PyObject* args, } widget->set_glow_type(glow_type); } + if (allow_clear_button_obj != Py_None) { + widget->set_allow_clear_button(Python::GetPyBool(allow_clear_button_obj)); + } // If making a new widget, add it at the end. if (edit_obj == Py_None) { @@ -2266,7 +2272,8 @@ static PyMethodDef PyTextWidgetDef = { " query_max_chars: bauiv1.Widget | None = None,\n" " query_description: bauiv1.Widget | None = None,\n" " adapter_finished: bool | None = None,\n" - " glow_type: str | None = None)\n" + " glow_type: str | None = None,\n" + " allow_clear_button: bool | None = None)\n" " -> bauiv1.Widget\n" "\n" "Create or edit a text widget.\n" diff --git a/src/ballistica/ui_v1/widget/text_widget.cc b/src/ballistica/ui_v1/widget/text_widget.cc index 6a6b0acb..a1caf3e4 100644 --- a/src/ballistica/ui_v1/widget/text_widget.cc +++ b/src/ballistica/ui_v1/widget/text_widget.cc @@ -30,7 +30,7 @@ TextWidget::TextWidget() { // FIXME - should generalize this to any controller-only situation. if (g_buildconfig.ostype_android()) { if (g_base->input->touch_input() == nullptr) { - do_clear_button_ = false; + implicit_clear_button_ = false; } } birth_time_millisecs_ = @@ -253,7 +253,8 @@ void TextWidget::Draw(base::RenderPass* pass, bool draw_transparent) { // Clear button. if (editable() && (IsHierarchySelected() || always_show_carat_) - && !text_raw_.empty() && do_clear_button_) { + && !text_raw_.empty() && implicit_clear_button_ + && allow_clear_button_) { base::SimpleComponent c(pass); c.SetTransparent(true); if (clear_pressed_ && clear_mouse_over_) { @@ -819,7 +820,8 @@ auto TextWidget::HandleMessage(const base::WidgetMessage& m) -> bool { if (editable() && (IsHierarchySelected() || always_show_carat_) && !text_raw_.empty() && (x >= width_ - 35) && (x < width_ + kClearMargin) && (y > -kClearMargin) - && (y < height_ + kClearMargin) && do_clear_button_) { + && (y < height_ + kClearMargin) && implicit_clear_button_ + && allow_clear_button_) { clear_pressed_ = clear_mouse_over_ = true; return true; } diff --git a/src/ballistica/ui_v1/widget/text_widget.h b/src/ballistica/ui_v1/widget/text_widget.h index 7c3cb3c6..2452186b 100644 --- a/src/ballistica/ui_v1/widget/text_widget.h +++ b/src/ballistica/ui_v1/widget/text_widget.h @@ -73,6 +73,7 @@ class TextWidget : public Widget { void set_flatness(float flatness) { flatness_ = flatness; } void set_shadow(float shadow) { shadow_ = shadow; } void set_res_scale(float res_scale); + void set_allow_clear_button(bool val) { allow_clear_button_ = val; } auto GetTextWidth() -> float; void OnLanguageChange() override; void AdapterFinished(); @@ -130,7 +131,8 @@ class TextWidget : public Widget { bool selectable_{}; bool clear_pressed_{}; bool clear_mouse_over_{}; - bool do_clear_button_{true}; + bool implicit_clear_button_{true}; + bool allow_clear_button_{true}; int carat_position_{9999}; int max_chars_{99999}; float res_scale_{1.0f}; From a0c0cc1425dea93567b2820446eff136b18692da Mon Sep 17 00:00:00 2001 From: 3alTemp Date: Wed, 13 Mar 2024 20:14:56 -0600 Subject: [PATCH 17/44] Hid clear button --- src/assets/ba_data/python/bauiv1lib/colorpicker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/assets/ba_data/python/bauiv1lib/colorpicker.py b/src/assets/ba_data/python/bauiv1lib/colorpicker.py index 0144260c..e138a954 100644 --- a/src/assets/ba_data/python/bauiv1lib/colorpicker.py +++ b/src/assets/ba_data/python/bauiv1lib/colorpicker.py @@ -245,7 +245,8 @@ class ColorPickerExact(PopupWindow): size=(75, 30), v_align='center', editable=True, - maxwidth=40, + maxwidth=70, + allow_clear_button=False, force_internal_editing=True, ) From cf284e475536455430fe313d2218e7933b8f3bf8 Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Wed, 13 Mar 2024 21:42:23 -0700 Subject: [PATCH 18/44] work towards getting dummy-module generation working under WSL --- tools/batools/apprun.py | 15 ++++++++------- tools/batools/pcommands.py | 20 +++++++++++++++----- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/tools/batools/apprun.py b/tools/batools/apprun.py index e3e3640a..14771bfe 100755 --- a/tools/batools/apprun.py +++ b/tools/batools/apprun.py @@ -1,6 +1,6 @@ # Released under the MIT License. See LICENSE for details. # -"""Utils for wrangling runs of the app. +"""Utils for wrangling running the app as part of a build. Manages constructing or downloading it as well as running it. """ @@ -141,14 +141,15 @@ def acquire_binary(assets: bool, purpose: str) -> str: binary_build_command = ['make', 'cmake-binary'] binary_path = 'build/cmake/debug/staged/ballisticakit' else: - # Ok; going with prefab headless stuff. + # Ok; going with a downloaded prefab headless build. - # Let the user know how to use their own binaries instead. + # Let the user know how to use their own built binaries instead + # if they prefer. note = '\n' + textwrap.fill( - 'NOTE: You can set env-var BA_APP_RUN_ENABLE_BUILDS=1' - f' to use locally-built binaries for {purpose}' - ' instead of prefab ones. This will properly reflect any changes' - ' you\'ve made to the C/C++ layer.', + f'NOTE: You can set env-var BA_APP_RUN_ENABLE_BUILDS=1' + f' to use locally-built binaries for {purpose} instead' + f' of prefab ones. This will properly reflect any changes' + f' you\'ve made to the C/C++ layer.', 80, ) if assets: diff --git a/tools/batools/pcommands.py b/tools/batools/pcommands.py index eb2be2cb..c6579cc2 100644 --- a/tools/batools/pcommands.py +++ b/tools/batools/pcommands.py @@ -652,12 +652,22 @@ def prefab_binary_path() -> None: raise RuntimeError('Expected 1 arg.') buildtype, buildmode = sys.argv[2].split('-') platform = batools.build.get_current_prefab_platform() - if buildtype == 'gui': - binpath = 'ballisticakit' - elif buildtype == 'server': - binpath = 'dist/ballisticakit_headless' + + if platform.startswith('windows_'): + if buildtype == 'gui': + binpath = 'BallisticaKit.exe' + elif buildtype == 'server': + binpath = 'dist/BallisticaKitHeadless.exe' + else: + raise ValueError(f"Invalid buildtype '{buildtype}'.") else: - raise ValueError(f"Invalid buildtype '{buildtype}'.") + if buildtype == 'gui': + binpath = 'ballisticakit' + elif buildtype == 'server': + binpath = 'dist/ballisticakit_headless' + else: + raise ValueError(f"Invalid buildtype '{buildtype}'.") + print( f'build/prefab/full/{platform}_{buildtype}/{buildmode}/{binpath}', end='', From 9362999c1cf99c9b02825f72f69bde7364e8d87d Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 13 Mar 2024 21:47:41 -0700 Subject: [PATCH 19/44] Latest public/internal sync. --- .efrocachemap | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 569c0b12..36b69672 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4069,18 +4069,18 @@ "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "1c195ea2f0436b0857bcf1f53596c9ed", "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "cebf710fd74b426078849cfb61ddfe05", "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "70444645dab4201857c281df50c7fbab", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "4e65b35e7013a39b3c805e6b23f4c5be", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "a701d452a5a66b30b1a328c7e9da1d2f", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "90f94c72541a8b559fe5f937f59736cd", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "4f003ada50c0dea27919ffaf12ed9290", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "20b922e9f65985fec9c19bd31b834542", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "da829cffaeba3688c086706201f3cd9c", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "3c3dc389b03a8f6b79c0e1cbb5d57c28", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "f4d13a59defe384f095d39c0b8fa0b93", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "281d39c45a22a27a5f936901ad24ad83", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "04a4ee3d2743618f2742e68d715864b3", "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "046391bb7ddf1a3e76c07a0299211572", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "2101b917622227aa21533653b21f9192", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "5fe069c4c2f38d8bf5ab7cc90b8719ee", "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "09bd3c5237d9cc020c805252470a05f5", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "1af6ad786269c5b2f2790d51bf651eb3", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "727fdbc097b2e24e12687ea9cf3c566a", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "a5e39a8fbb33b22b5c6791fe7a2c39f5", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "8ba33e36b368e3f2e31da15399fcad99", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "abeb51f519cdfc31a00630d5f90c2b87", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "45872369ead35cd0702f645cb0290687", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "d296df575fcbbc4c0d9d10390279b981", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "ab42d76f9ce4d01e84d7b4af20f83a9f", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "56d6440f62c271c4ce9ef520400395a3", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", @@ -4097,14 +4097,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "fbdc80e41c5883b4a893d2f0786e377f", "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "73e6dd8dfba14ad1528d154ec43188c1", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "dfdb92bb0d84c405374e7da63c0eea4d", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "c20a6bd8ea7212f52c291fb6134a9bad", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "0e994a801d91149256f2200f75cf58d6", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "de98295b7373dcf3c31d3cc5a135578b", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "65e5b683dfa92a02909e8182d6b25d6e", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "f1e4e29d76abdb38e92a93f45135d1d8", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "8089cf4b541d14dc38ae71f3d05bde8e", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "85e804e02022cf07b5cf6e9024b66b71", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "8477e27bd6da06fd0cc390aa9b2d49eb", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "75c2eea1899eb33777c323165e766022", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "6dc94f266087d91a399825a57f3fef23", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "43d912d3b4026d32b9c3fb08481684b1", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "d2a64a9724333ccbd32df8a9c8a1c2f8", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "c13bed7154fdc3e1a83ffcea5756a375", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "02e9a86205d9549484c2f5d9a3eaebe8", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "b611c090513a21e2fe90e56582724e9d", "src/ballistica/base/mgen/pyembed/binding_base.inc": "72bfed2cce8ff19741989dec28302f3f", From 4ac7fef7e77aa80b76a5b6211fa10d81db28dfae Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 10:27:16 -0700 Subject: [PATCH 20/44] revamping building from WSL --- .efrocachemap | 56 ++++++------- CHANGELOG.md | 2 +- Makefile | 29 +++++-- src/assets/ba_data/python/baenv.py | 2 +- src/ballistica/shared/ballistica.cc | 2 +- tools/batools/build.py | 124 ++++++++++++++++++---------- tools/batools/pcommands.py | 60 +++++++++----- tools/batools/pcommands2.py | 26 +++--- 8 files changed, 188 insertions(+), 113 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 36b69672..eebd7d12 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4061,26 +4061,26 @@ "build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1", "build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "ae5d54179a3a0fae2de63332844033ad", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "6ee081b61d4f2fdbd93486ded4f9a64c", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "e7407d776c2109ff69a3cb5ba7ee96e3", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "31a2f27c9f96e6514546c2c287e2b02a", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "afe92df503843db897e9d352f0f9d15d", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "1c195ea2f0436b0857bcf1f53596c9ed", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "cebf710fd74b426078849cfb61ddfe05", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "70444645dab4201857c281df50c7fbab", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "da829cffaeba3688c086706201f3cd9c", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "3c3dc389b03a8f6b79c0e1cbb5d57c28", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "f4d13a59defe384f095d39c0b8fa0b93", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "281d39c45a22a27a5f936901ad24ad83", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "04a4ee3d2743618f2742e68d715864b3", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "046391bb7ddf1a3e76c07a0299211572", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "5fe069c4c2f38d8bf5ab7cc90b8719ee", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "09bd3c5237d9cc020c805252470a05f5", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "abeb51f519cdfc31a00630d5f90c2b87", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "45872369ead35cd0702f645cb0290687", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "d296df575fcbbc4c0d9d10390279b981", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "ab42d76f9ce4d01e84d7b4af20f83a9f", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "e02d676254f37e6a6bfc2d992832edc7", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "b6aae173f0657f98481ad513d9d4cbd5", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "35fb45c3895174231254aa97ff2d43e5", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "f7bb6bcc1884a692e03f52c58d83bc89", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "42b848cb83e3fee4a56b0f24901c1423", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "0af09f79ae95b7d31229e62ef925c283", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "1babb2d89a351a48c1318515b23fb256", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "0ed1b2deda022680096fcc185437b2f5", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "e3b96fd440e737d7ee9588aa5517a270", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "345a3346b1b3b28932b9fc3b6802ba58", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "c4cfd2482416cf9a71a3dcb283dc06cc", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "af6c9def782a7be317a247b0294d2577", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "6537ce8b82230275d3baa495f0b087e2", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "18c6239b2284547be3f354a9ab74f65c", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "a53872e247c56e1d297c8fc227ad38e9", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "38607776459217d77b60417a5a9a5fbe", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "fb23a676c5e53441a101499801c5e0ee", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "3bf6afb5a18a95b7a7d7286c6dcc106c", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "8b0d174baa273f6d7921e067fae3316a", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "2f37b65edd1c4eca4c2dd32506977696", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "56d6440f62c271c4ce9ef520400395a3", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", @@ -4097,14 +4097,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "fbdc80e41c5883b4a893d2f0786e377f", "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "85e804e02022cf07b5cf6e9024b66b71", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "8477e27bd6da06fd0cc390aa9b2d49eb", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "75c2eea1899eb33777c323165e766022", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "6dc94f266087d91a399825a57f3fef23", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "43d912d3b4026d32b9c3fb08481684b1", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "d2a64a9724333ccbd32df8a9c8a1c2f8", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "c13bed7154fdc3e1a83ffcea5756a375", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "02e9a86205d9549484c2f5d9a3eaebe8", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "403d99152d4610ad11ea524772a84ca3", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "ce022601dc7ce016fe11ed5092534672", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "e45a094dba08254cf1ba50bf435f5e8d", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "ea38b10f23c2791d92696f17b53f8fa7", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "5ee3cbfcce6b6cd9bdaf8239c3b78d0d", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "aa3b5bd935d8593611f13108af5d9633", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "1104c4f10bbe25539c1b4e38ba041375", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "aa0c1c558389babcaa2166ef9ae4bad0", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "b611c090513a21e2fe90e56582724e9d", "src/ballistica/base/mgen/pyembed/binding_base.inc": "72bfed2cce8ff19741989dec28302f3f", diff --git a/CHANGELOG.md b/CHANGELOG.md index cc9ca22b..ef81158d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.33 (build 21779, api 8, 2024-03-13) +### 1.7.33 (build 21785, api 8, 2024-03-14) - Stress test input-devices are now a bit smarter; they won't press any buttons while UIs are up (this could cause lots of chaos if it happened). - Added a 'Show Demos When Idle' option in advanced settings. If enabled, the diff --git a/Makefile b/Makefile index e43ffd49..dd800a45 100644 --- a/Makefile +++ b/Makefile @@ -210,37 +210,50 @@ pcommandbatch_speed_test: prereqs # Prebuilt binaries for various platforms. +# WSL is Linux but running under Windows, so it can target either. By default +# we want it to yield Windows native builds for these prefab targets but this +# env var can be set to change that. +BA_WSL_TARGETS_WINDOWS ?= 1 + # Assemble & run a gui debug build for this platform. prefab-gui-debug: prefab-gui-debug-build - $($(shell $(PCOMMAND) prefab_run_var gui-debug)) + BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + $($(shell $(PCOMMAND) prefab_run_var gui-debug)) # Assemble & run a gui release build for this platform. prefab-gui-release: prefab-gui-release-build - $($(shell $(PCOMMAND) prefab_run_var gui-release)) + BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + $($(shell $(PCOMMAND) prefab_run_var gui-release)) # Assemble a debug build for this platform. prefab-gui-debug-build: - @$(PCOMMAND) make_prefab gui-debug + BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + @$(PCOMMAND) make_prefab gui-debug # Assemble a release build for this platform. prefab-gui-release-build: - @$(PCOMMAND) make_prefab gui-release + BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + @$(PCOMMAND) make_prefab gui-release # Assemble & run a server debug build for this platform. prefab-server-debug: prefab-server-debug-build - $($(shell $(PCOMMAND) prefab_run_var server-debug)) + BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + $($(shell $(PCOMMAND) prefab_run_var server-debug)) # Assemble & run a server release build for this platform. prefab-server-release: prefab-server-release-build - $($(shell $(PCOMMAND) prefab_run_var server-release)) + BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + $($(shell $(PCOMMAND) prefab_run_var server-release)) # Assemble a server debug build for this platform. prefab-server-debug-build: - @$(PCOMMAND) make_prefab server-debug + BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + @$(PCOMMAND) make_prefab server-debug # Assemble a server release build for this platform. prefab-server-release-build: - @$(PCOMMAND) make_prefab server-release + BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + @$(PCOMMAND) make_prefab server-release # Clean all prefab builds. prefab-clean: diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 5870b584..9662b7b8 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -52,7 +52,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21779 +TARGET_BALLISTICA_BUILD = 21785 TARGET_BALLISTICA_VERSION = '1.7.33' diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 0b9ab797..2a4c53ad 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21779; +const int kEngineBuildNumber = 21785; const char* kEngineVersion = "1.7.33"; const int kEngineApiVersion = 8; diff --git a/tools/batools/build.py b/tools/batools/build.py index 69a94a63..b7c54495 100644 --- a/tools/batools/build.py +++ b/tools/batools/build.py @@ -76,6 +76,87 @@ class PrefabTarget(Enum): GUI_RELEASE = 'gui-release' SERVER_RELEASE = 'server-release' + @property + def buildtype(self) -> str: + """Return the build type for this target.""" + return self.value.split('-')[0] + + @property + def buildmode(self) -> str: + """Return the build mode for this target.""" + return self.value.split('-')[1] + + +class PrefabPlatform(Enum): + """Distinct os/cpu-arch/etc. combos we support for prefab builds.""" + + MAC_X86_64 = 'mac_x86_64' + MAC_ARM64 = 'mac_arm64' + WINDOWS_X86 = 'windows_x86' + LINUX_X86_64 = 'linux_x86_64' + LINUX_ARM64 = 'linux_arm64' + + @classmethod + def get_current( + cls, wsl_targets_windows: bool | None = None + ) -> PrefabPlatform: + """Get an identifier for the platform running this build. + + Pass a bool `wsl_targets_windows` value to cause WSL to target + either native Windows (True) or Linux (False). If this value is + not passed, the env var BA_WSL_TARGETS_WINDOWS is used, and if that + is not set, the default is False (Linux builds). + + Throws a RuntimeError on unsupported platforms. + """ + import platform + + if wsl_targets_windows is None: + wsl_targets_windows = ( + os.environ.get('BA_WSL_TARGETS_WINDOWS', '0') == '1' + ) + + system = platform.system() + machine = platform.machine() + + if system == 'Darwin': + if machine == 'x86_64': + return cls.MAC_X86_64 + if machine == 'arm64': + return cls.MAC_ARM64 + raise RuntimeError( + f'PrefabPlatform.get_current:' + f' unsupported mac machine type:' + f' {machine}.' + ) + if system == 'Linux': + # If it looks like we're in Windows Subsystem for Linux, we may + # want to operate on Windows versions. + if wsl_targets_windows: + if 'microsoft' in platform.uname().release.lower(): + if machine == 'x86_64': + # Currently always targeting 32 bit for prefab stuff. + return cls.WINDOWS_X86 + # TODO: add support for arm windows + raise RuntimeError( + f'make_prefab: unsupported win machine type: {machine}.' + ) + + if machine == 'x86_64': + return cls.LINUX_X86_64 + if machine == 'aarch64': + return cls.LINUX_ARM64 + raise RuntimeError( + f'PrefabPlatform.get_current:' + f' unsupported linux machine type:' + f' {machine}.' + ) + raise RuntimeError( + f'PrefabPlatform.get_current:' + f' unrecognized platform:' + f' {platform.system()}.' + ) + class LazyBuildCategory(Enum): """Types of sources.""" @@ -296,49 +377,6 @@ def archive_old_builds( ) -def get_current_prefab_platform(wsl_gives_windows: bool = True) -> str: - """Get an identifier for the platform running this build. - - Throws a RuntimeError on unsupported platforms. - """ - import platform - - system = platform.system() - machine = platform.machine() - - if system == 'Darwin': - if machine == 'x86_64': - return 'mac_x86_64' - if machine == 'arm64': - return 'mac_arm64' - raise RuntimeError( - f'make_prefab: unsupported mac machine type:' f' {machine}.' - ) - if system == 'Linux': - # If it looks like we're in Windows Subsystem for Linux, - # we may want to operate on Windows versions. - if wsl_gives_windows: - if 'microsoft' in platform.uname().release.lower(): - if machine == 'x86_64': - # Currently always targeting 32 bit for prefab stuff. - return 'windows_x86' - # TODO: add support for arm windows - raise RuntimeError( - f'make_prefab: unsupported win machine type: {machine}.' - ) - - if machine == 'x86_64': - return 'linux_x86_64' - if machine == 'aarch64': - return 'linux_arm64' - raise RuntimeError( - f'make_prefab: unsupported linux machine type:' f' {machine}.' - ) - raise RuntimeError( - f'make_prefab: unrecognized platform:' f' {platform.system()}.' - ) - - def _vstr(nums: Sequence[int]) -> str: return '.'.join(str(i) for i in nums) diff --git a/tools/batools/pcommands.py b/tools/batools/pcommands.py index c6579cc2..678647ed 100644 --- a/tools/batools/pcommands.py +++ b/tools/batools/pcommands.py @@ -616,60 +616,80 @@ def ensure_prefab_platform() -> None: the prefab platform may be Windows; not Linux. Also, a 64-bit os may be targeting a 32-bit platform. """ - import batools.build from efro.error import CleanError + from batools.build import PrefabPlatform + args = pcommand.get_args() if len(args) != 1: raise CleanError('Expected 1 platform name arg.') - needed = args[0] - current = batools.build.get_current_prefab_platform() - if current != needed: + needed = PrefabPlatform(args[0]) + current = PrefabPlatform.get_current() + if current is not needed: raise CleanError( - f'Incorrect platform: we are {current}, this requires {needed}.' + f'Incorrect platform: we are {current.value},' + f' this requires {needed.value}.' ) def prefab_run_var() -> None: """Print the current platform prefab run target var.""" - import batools.build + from batools.build import PrefabPlatform args = pcommand.get_args() if len(args) != 1: raise RuntimeError('Expected 1 arg.') base = args[0].replace('-', '_').upper() - platform = batools.build.get_current_prefab_platform().upper() + platform = PrefabPlatform.get_current().value.upper() pcommand.clientprint(f'RUN_PREFAB_{platform}_{base}', end='') def prefab_binary_path() -> None: - """Print the current platform prefab binary path.""" - import batools.build + """Print the path to the current prefab binary.""" + from typing import assert_never + + from efro.error import CleanError + + from batools.build import PrefabPlatform, PrefabTarget pcommand.disallow_in_batch() if len(sys.argv) != 3: - raise RuntimeError('Expected 1 arg.') - buildtype, buildmode = sys.argv[2].split('-') - platform = batools.build.get_current_prefab_platform() + options = ', '.join(t.value for t in PrefabTarget) + raise CleanError(f'Expected 1 PrefabTarget arg. Options are {options}.') - if platform.startswith('windows_'): + target = PrefabTarget(sys.argv[2]) + + buildtype = target.buildtype + buildmode = target.buildmode + + platform = PrefabPlatform.get_current() + + if platform is PrefabPlatform.WINDOWS_X86: if buildtype == 'gui': binpath = 'BallisticaKit.exe' elif buildtype == 'server': binpath = 'dist/BallisticaKitHeadless.exe' else: raise ValueError(f"Invalid buildtype '{buildtype}'.") - else: + elif ( + platform is PrefabPlatform.MAC_ARM64 + or platform is PrefabPlatform.MAC_X86_64 + or platform is PrefabPlatform.LINUX_ARM64 + or platform is PrefabPlatform.LINUX_X86_64 + ): if buildtype == 'gui': binpath = 'ballisticakit' elif buildtype == 'server': binpath = 'dist/ballisticakit_headless' else: raise ValueError(f"Invalid buildtype '{buildtype}'.") + else: + # Make sure we're covering all options. + assert_never(platform) print( - f'build/prefab/full/{platform}_{buildtype}/{buildmode}/{binpath}', + f'build/prefab/full/{platform.value}_{buildtype}/{buildmode}/{binpath}', end='', ) @@ -677,20 +697,20 @@ def prefab_binary_path() -> None: def make_prefab() -> None: """Run prefab builds for the current platform.""" import subprocess - import batools.build + from batools.build import PrefabPlatform, PrefabTarget pcommand.disallow_in_batch() if len(sys.argv) != 3: raise RuntimeError('Expected one argument') - target = batools.build.PrefabTarget(sys.argv[2]) - platform = batools.build.get_current_prefab_platform() + targetstr = PrefabTarget(sys.argv[2]).value + platformstr = PrefabPlatform.get_current().value # We use dashes instead of underscores in target names. - platform = platform.replace('_', '-') + platformstr = platformstr.replace('_', '-') try: subprocess.run( - ['make', f'prefab-{platform}-{target.value}-build'], check=True + ['make', f'prefab-{platformstr}-{targetstr}-build'], check=True ) except (Exception, KeyboardInterrupt) as exc: if str(exc): diff --git a/tools/batools/pcommands2.py b/tools/batools/pcommands2.py index 203c9eaa..0b9d4808 100644 --- a/tools/batools/pcommands2.py +++ b/tools/batools/pcommands2.py @@ -204,7 +204,7 @@ def win_ci_install_prereqs() -> None: # We'll need to pull a handful of things out of efrocache for the # build to succeed. Normally this would happen through our Makefile - # targets but we can't use them under raw window so we need to just + # targets but we can't use them under raw Windows so we need to just # hard-code whatever we need here. lib_dbg_win32 = 'build/prefab/lib/windows/Debug_Win32' needed_targets: set[str] = { @@ -256,11 +256,11 @@ def win_ci_binary_build() -> None: def update_cmake_prefab_lib() -> None: - """Update prefab internal libs for builds.""" + """Update prefab internal libs; run as part of a build.""" import subprocess import os from efro.error import CleanError - import batools.build + from batools.build import PrefabPlatform pcommand.disallow_in_batch() @@ -275,14 +275,18 @@ def update_cmake_prefab_lib() -> None: raise CleanError(f'Invalid buildtype: {buildtype}') if mode not in {'debug', 'release'}: raise CleanError(f'Invalid mode: {mode}') - platform = batools.build.get_current_prefab_platform( - wsl_gives_windows=False - ) - suffix = '_server' if buildtype == 'server' else '_gui' - target = f'build/prefab/lib/{platform}{suffix}/{mode}/libballisticaplus.a' - # Build the target and then copy it to dst if it doesn't exist there yet - # or the existing one is older than our target. + # Our 'cmake' build targets use the Linux side of WSL; not native + # Windows. + platform = PrefabPlatform.get_current(wsl_targets_windows=False) + + suffix = '_server' if buildtype == 'server' else '_gui' + target = ( + f'build/prefab/lib/{platform.value}{suffix}/{mode}/libballisticaplus.a' + ) + + # Build the target and then copy it to dst if it doesn't exist there + # yet or the existing one is older than our target. subprocess.run(['make', target], check=True) libdir = os.path.join(builddir, 'prefablib') @@ -431,7 +435,7 @@ def wsl_build_check_win_drive() -> None: != 0 ): raise CleanError( - 'wslpath not found; you must run this from a WSL environment' + "'wslpath' not found. This does not seem to be a WSL environment." ) if os.environ.get('WSL_BUILD_CHECK_WIN_DRIVE_IGNORE') == '1': From fa1df9315097b936ed4ec5878de4b1503d07e3cd Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 10:46:33 -0700 Subject: [PATCH 21/44] more prefab/wsl cleanup --- .efrocachemap | 56 +++++++++++++-------------- CHANGELOG.md | 2 +- src/assets/ba_data/python/baenv.py | 2 +- src/ballistica/shared/ballistica.cc | 2 +- tools/batools/pcommands.py | 60 +++++++++++++++-------------- tools/batools/pcommands2.py | 28 ++++++++++++++ tools/pcommand | 3 +- 7 files changed, 92 insertions(+), 61 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index eebd7d12..8b203d9e 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4061,26 +4061,26 @@ "build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1", "build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "e02d676254f37e6a6bfc2d992832edc7", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "b6aae173f0657f98481ad513d9d4cbd5", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "35fb45c3895174231254aa97ff2d43e5", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "f7bb6bcc1884a692e03f52c58d83bc89", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "42b848cb83e3fee4a56b0f24901c1423", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "0af09f79ae95b7d31229e62ef925c283", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "1babb2d89a351a48c1318515b23fb256", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "0ed1b2deda022680096fcc185437b2f5", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "e3b96fd440e737d7ee9588aa5517a270", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "345a3346b1b3b28932b9fc3b6802ba58", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "c4cfd2482416cf9a71a3dcb283dc06cc", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "af6c9def782a7be317a247b0294d2577", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "6537ce8b82230275d3baa495f0b087e2", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "18c6239b2284547be3f354a9ab74f65c", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "a53872e247c56e1d297c8fc227ad38e9", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "38607776459217d77b60417a5a9a5fbe", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "fb23a676c5e53441a101499801c5e0ee", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "3bf6afb5a18a95b7a7d7286c6dcc106c", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "8b0d174baa273f6d7921e067fae3316a", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "2f37b65edd1c4eca4c2dd32506977696", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "f86cf722ec86ba34c8873232610ed6a4", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "f05d3419f7b53f69e7f86ed21ee0f6a0", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "bd10264cd21dde10c33b65216212897f", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "9285d2a9c610e53634da874b98c4f59e", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "aac94860b46ff290e7712899637cfcfc", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "e5db667cca97477bdc53745597ce96c0", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "a691fe1725d4e3e8659d4a8910767a6b", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "757d3686278016f0a8c14ca32351869f", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "7882e6a67274134121269297adba650c", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "e0aad2e5e0429f267c68e1adc01f4de2", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "2949c67081ab95fa6b3c200b6e8dac90", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "7f3147c3eb2d6b47d060cec361333609", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "8e651eb94e21d37c38831363d2bf06d3", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "60e4941df0d4d6f05f4f5d4497f5b31f", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "906d81ef963eb5817f9a09dacdb42496", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "c4908dc4c7bff0f87e2469b145e9fe64", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "af603ec4c7548c309c560aa78d80209c", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "e084002e7c8dcced5e671535d819423b", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "d20a89662c0d976cb5c3559b553913b7", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "1fe7fa727099fcf24eaf260d74cb3ae4", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "56d6440f62c271c4ce9ef520400395a3", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", @@ -4097,14 +4097,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "fbdc80e41c5883b4a893d2f0786e377f", "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "403d99152d4610ad11ea524772a84ca3", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "ce022601dc7ce016fe11ed5092534672", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "e45a094dba08254cf1ba50bf435f5e8d", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "ea38b10f23c2791d92696f17b53f8fa7", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "5ee3cbfcce6b6cd9bdaf8239c3b78d0d", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "aa3b5bd935d8593611f13108af5d9633", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "1104c4f10bbe25539c1b4e38ba041375", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "aa0c1c558389babcaa2166ef9ae4bad0", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "80963fe5c501c728c16bb9fccb2b59ab", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "ba75fa26bde66b7ee80cf8f840ff1806", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "847bf3a0acffb54856509c53e18c1656", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "480b7d544c3c0b642bcf5aae73641cfe", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "f1ecc6a4e2e034fb5c6b483b798cc68d", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "3cfcded3e0b07261ffb5b6828993c89b", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "9cc7af3fc84382412f03b4482e4c847e", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "e64ca3bc0adc45804fb6a558dc925a36", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "b611c090513a21e2fe90e56582724e9d", "src/ballistica/base/mgen/pyembed/binding_base.inc": "72bfed2cce8ff19741989dec28302f3f", diff --git a/CHANGELOG.md b/CHANGELOG.md index ef81158d..1a2bec12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.33 (build 21785, api 8, 2024-03-14) +### 1.7.33 (build 21787, api 8, 2024-03-14) - Stress test input-devices are now a bit smarter; they won't press any buttons while UIs are up (this could cause lots of chaos if it happened). - Added a 'Show Demos When Idle' option in advanced settings. If enabled, the diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 9662b7b8..688b37c3 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -52,7 +52,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21785 +TARGET_BALLISTICA_BUILD = 21787 TARGET_BALLISTICA_VERSION = '1.7.33' diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 2a4c53ad..62fb9a39 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21785; +const int kEngineBuildNumber = 21787; const char* kEngineVersion = "1.7.33"; const int kEngineApiVersion = 8; diff --git a/tools/batools/pcommands.py b/tools/batools/pcommands.py index 678647ed..79add57c 100644 --- a/tools/batools/pcommands.py +++ b/tools/batools/pcommands.py @@ -487,34 +487,6 @@ def efrocache_get() -> None: pcommand.clientprint(output) -def get_modern_make() -> None: - """Print name of a modern make command.""" - import platform - import subprocess - - pcommand.disallow_in_batch() - - # Mac gnu make is outdated (due to newer versions using GPL3 I believe). - # so let's return 'gmake' there which will point to homebrew make which - # should be up to date. - if platform.system() == 'Darwin': - if ( - subprocess.run( - ['which', 'gmake'], check=False, capture_output=True - ).returncode - != 0 - ): - print( - 'WARNING: this requires gmake (mac system make is too old).' - " Install it with 'brew install make'", - file=sys.stderr, - flush=True, - ) - print('gmake') - else: - print('make') - - def warm_start_asset_build() -> None: """Prep asset builds to run faster.""" import os @@ -608,6 +580,24 @@ def checkenv() -> None: batools.build.checkenv() +def prefab_platform() -> None: + """Print the current prefab-platform value.""" + from efro.error import CleanError + + from batools.build import PrefabPlatform + + # Platform determination uses env vars; won't work in batch. + pcommand.disallow_in_batch() + + args = pcommand.get_args() + if len(args) != 0: + raise CleanError('No arguments expected.') + + current = PrefabPlatform.get_current() + + print(current.value, end='') + + def ensure_prefab_platform() -> None: """Ensure we are running on a particular prefab platform. @@ -620,9 +610,15 @@ def ensure_prefab_platform() -> None: from batools.build import PrefabPlatform + # Platform determination uses env vars; won't work in batch. + pcommand.disallow_in_batch() + args = pcommand.get_args() if len(args) != 1: - raise CleanError('Expected 1 platform name arg.') + options = ', '.join(t.value for t in PrefabPlatform) + raise CleanError( + f'Expected 1 PrefabPlatform arg. Options are {options}.' + ) needed = PrefabPlatform(args[0]) current = PrefabPlatform.get_current() if current is not needed: @@ -636,6 +632,9 @@ def prefab_run_var() -> None: """Print the current platform prefab run target var.""" from batools.build import PrefabPlatform + # Platform determination uses env vars; won't work in batch. + pcommand.disallow_in_batch() + args = pcommand.get_args() if len(args) != 1: raise RuntimeError('Expected 1 arg.') @@ -652,6 +651,7 @@ def prefab_binary_path() -> None: from batools.build import PrefabPlatform, PrefabTarget + # Platform determination uses env vars; won't work in batch. pcommand.disallow_in_batch() if len(sys.argv) != 3: @@ -699,6 +699,7 @@ def make_prefab() -> None: import subprocess from batools.build import PrefabPlatform, PrefabTarget + # Platform determination uses env vars; won't work in batch. pcommand.disallow_in_batch() if len(sys.argv) != 3: @@ -727,6 +728,7 @@ def lazybuild() -> None: # This command is not a good candidate for batch since it can be # long running and prints various stuff throughout the process. pcommand.disallow_in_batch() + args = pcommand.get_args() if len(args) < 3: diff --git a/tools/batools/pcommands2.py b/tools/batools/pcommands2.py index 0b9d4808..a367718d 100644 --- a/tools/batools/pcommands2.py +++ b/tools/batools/pcommands2.py @@ -544,3 +544,31 @@ def wsl_path_to_win() -> None: if escape: out = out.replace('\\', '\\\\') print(out, end='') + + +def get_modern_make() -> None: + """Print name of a modern make command.""" + import platform + import subprocess + + pcommand.disallow_in_batch() + + # Mac gnu make is outdated (due to newer versions using GPL3 I believe). + # so let's return 'gmake' there which will point to homebrew make which + # should be up to date. + if platform.system() == 'Darwin': + if ( + subprocess.run( + ['which', 'gmake'], check=False, capture_output=True + ).returncode + != 0 + ): + print( + 'WARNING: this requires gmake (mac system make is too old).' + " Install it with 'brew install make'", + file=sys.stderr, + flush=True, + ) + print('gmake') + else: + print('make') diff --git a/tools/pcommand b/tools/pcommand index 0a6eef2a..8493c487 100755 --- a/tools/pcommand +++ b/tools/pcommand @@ -96,13 +96,13 @@ from batools.pcommands import ( upper, efrocache_update, efrocache_get, - get_modern_make, warm_start_asset_build, gen_docs_pdoc, gen_docs_sphinx, list_pip_reqs, install_pip_reqs, checkenv, + prefab_platform, ensure_prefab_platform, prefab_run_var, prefab_binary_path, @@ -135,6 +135,7 @@ from batools.pcommands2 import ( tests_warm_start, wsl_path_to_win, wsl_build_check_win_drive, + get_modern_make, ) # pylint: enable=unused-import From af88b734051b950465b803b9defd287d3f03c943 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 10:55:35 -0700 Subject: [PATCH 22/44] build fixes --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index dd800a45..514a607b 100644 --- a/Makefile +++ b/Makefile @@ -228,12 +228,12 @@ prefab-gui-release: prefab-gui-release-build # Assemble a debug build for this platform. prefab-gui-debug-build: BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ - @$(PCOMMAND) make_prefab gui-debug + $(PCOMMAND) make_prefab gui-debug # Assemble a release build for this platform. prefab-gui-release-build: BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ - @$(PCOMMAND) make_prefab gui-release + $(PCOMMAND) make_prefab gui-release # Assemble & run a server debug build for this platform. prefab-server-debug: prefab-server-debug-build @@ -248,12 +248,12 @@ prefab-server-release: prefab-server-release-build # Assemble a server debug build for this platform. prefab-server-debug-build: BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ - @$(PCOMMAND) make_prefab server-debug + $(PCOMMAND) make_prefab server-debug # Assemble a server release build for this platform. prefab-server-release-build: BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ - @$(PCOMMAND) make_prefab server-release + $(PCOMMAND) make_prefab server-release # Clean all prefab builds. prefab-clean: From f3943da0f29a93138cddfb56acef92f4ebef7a84 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 11:08:07 -0700 Subject: [PATCH 23/44] more wsl prefab work --- Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 514a607b..7e4e9e42 100644 --- a/Makefile +++ b/Makefile @@ -211,48 +211,48 @@ pcommandbatch_speed_test: prereqs # Prebuilt binaries for various platforms. # WSL is Linux but running under Windows, so it can target either. By default -# we want it to yield Windows native builds for these prefab targets but this -# env var can be set to change that. +# we want these top level targets (prefab-gui-debug, etc.) to yield native +# Windows builds from WSL, but this env var can be set to override that. BA_WSL_TARGETS_WINDOWS ?= 1 # Assemble & run a gui debug build for this platform. prefab-gui-debug: prefab-gui-debug-build - BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ $($(shell $(PCOMMAND) prefab_run_var gui-debug)) # Assemble & run a gui release build for this platform. prefab-gui-release: prefab-gui-release-build - BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ $($(shell $(PCOMMAND) prefab_run_var gui-release)) # Assemble a debug build for this platform. prefab-gui-debug-build: - BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ $(PCOMMAND) make_prefab gui-debug # Assemble a release build for this platform. prefab-gui-release-build: - BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ $(PCOMMAND) make_prefab gui-release # Assemble & run a server debug build for this platform. prefab-server-debug: prefab-server-debug-build - BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ $($(shell $(PCOMMAND) prefab_run_var server-debug)) # Assemble & run a server release build for this platform. prefab-server-release: prefab-server-release-build - BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ $($(shell $(PCOMMAND) prefab_run_var server-release)) # Assemble a server debug build for this platform. prefab-server-debug-build: - BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ $(PCOMMAND) make_prefab server-debug # Assemble a server release build for this platform. prefab-server-release-build: - BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ $(PCOMMAND) make_prefab server-release # Clean all prefab builds. From 4d7960e2d6bb9fa54576e1d34b6a7c7c6aa19d2c Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 11:23:01 -0700 Subject: [PATCH 24/44] I swear I'll get this right soon. --- Makefile | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 7e4e9e42..8edcf993 100644 --- a/Makefile +++ b/Makefile @@ -218,41 +218,45 @@ BA_WSL_TARGETS_WINDOWS ?= 1 # Assemble & run a gui debug build for this platform. prefab-gui-debug: prefab-gui-debug-build export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ - $($(shell $(PCOMMAND) prefab_run_var gui-debug)) + $($(shell BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + $(PCOMMAND) prefab_run_var gui-debug)) # Assemble & run a gui release build for this platform. prefab-gui-release: prefab-gui-release-build export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ - $($(shell $(PCOMMAND) prefab_run_var gui-release)) + $($(shell BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + $(PCOMMAND) prefab_run_var gui-release)) # Assemble a debug build for this platform. prefab-gui-debug-build: - export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ + BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ $(PCOMMAND) make_prefab gui-debug # Assemble a release build for this platform. prefab-gui-release-build: - export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ + BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ $(PCOMMAND) make_prefab gui-release # Assemble & run a server debug build for this platform. prefab-server-debug: prefab-server-debug-build export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ - $($(shell $(PCOMMAND) prefab_run_var server-debug)) + $($(shell BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + $(PCOMMAND) prefab_run_var server-debug)) # Assemble & run a server release build for this platform. prefab-server-release: prefab-server-release-build export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ - $($(shell $(PCOMMAND) prefab_run_var server-release)) + $($(shell BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ + $(PCOMMAND) prefab_run_var server-release)) # Assemble a server debug build for this platform. prefab-server-debug-build: - export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ + BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ $(PCOMMAND) make_prefab server-debug # Assemble a server release build for this platform. prefab-server-release-build: - export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ + BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ $(PCOMMAND) make_prefab server-release # Clean all prefab builds. From 089ff08a375ad7378885fd662aac32cb137ef8b7 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 11:38:47 -0700 Subject: [PATCH 25/44] work work --- .efrocachemap | 32 ++++++++++++++++---------------- tools/batools/apprun.py | 13 ++++++++++++- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 8b203d9e..e6aca954 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4069,18 +4069,18 @@ "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "e5db667cca97477bdc53745597ce96c0", "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "a691fe1725d4e3e8659d4a8910767a6b", "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "757d3686278016f0a8c14ca32351869f", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "7882e6a67274134121269297adba650c", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "1f4113367d9314392e9f735d169880b6", "build/prefab/full/mac_arm64_gui/release/ballisticakit": "e0aad2e5e0429f267c68e1adc01f4de2", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "2949c67081ab95fa6b3c200b6e8dac90", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "eb5e74ea7434d314c8e3775db5fbb46e", "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "7f3147c3eb2d6b47d060cec361333609", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "8e651eb94e21d37c38831363d2bf06d3", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "558d5de83a26abe0da6c56d20918d0e6", "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "60e4941df0d4d6f05f4f5d4497f5b31f", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "906d81ef963eb5817f9a09dacdb42496", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "ba913b1cbf2fab9da6f00bef768e99f5", "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "c4908dc4c7bff0f87e2469b145e9fe64", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "af603ec4c7548c309c560aa78d80209c", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "e084002e7c8dcced5e671535d819423b", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "d20a89662c0d976cb5c3559b553913b7", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "1fe7fa727099fcf24eaf260d74cb3ae4", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "65f8b9df27e56bb9d44289475e8752c6", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "ddc6bbf0e792502c05bbfc7d22f5f36c", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "4966a48d90426c00d566cb73c7a5bb4e", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "421eccd01f494e8b16108c115f9c454e", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "56d6440f62c271c4ce9ef520400395a3", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", @@ -4097,14 +4097,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "fbdc80e41c5883b4a893d2f0786e377f", "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "80963fe5c501c728c16bb9fccb2b59ab", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "ba75fa26bde66b7ee80cf8f840ff1806", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "847bf3a0acffb54856509c53e18c1656", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "480b7d544c3c0b642bcf5aae73641cfe", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "f1ecc6a4e2e034fb5c6b483b798cc68d", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "3cfcded3e0b07261ffb5b6828993c89b", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "9cc7af3fc84382412f03b4482e4c847e", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "e64ca3bc0adc45804fb6a558dc925a36", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "519286657455b41232a1faa946d41c2c", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "56629dc18b297fc90ddd4a2e64906943", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "71735c7abee709e3f0b3de828a342726", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "1dc5bb0bcab746e2ed3d4ee95e96b228", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "b149369e859494ff0bf4ee3e3148969a", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "2406289654622f7faf67c797ca16069c", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "46cac43de3e45317c5b8296eaad873ce", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "82405a82c0780693e65ead6b85263780", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "b611c090513a21e2fe90e56582724e9d", "src/ballistica/base/mgen/pyembed/binding_base.inc": "72bfed2cce8ff19741989dec28302f3f", diff --git a/tools/batools/apprun.py b/tools/batools/apprun.py index 14771bfe..0e8afd9c 100755 --- a/tools/batools/apprun.py +++ b/tools/batools/apprun.py @@ -105,6 +105,9 @@ def acquire_binary(assets: bool, purpose: str) -> str: if os.environ.get('BA_APP_RUN_ENABLE_BUILDS') == '1': # Going the build-it-ourselves route. + # Don't need any env mods for this path. + env = None + if os.environ.get('BA_APP_RUN_BUILD_HEADLESS') == '1': # User has opted for headless builds. if assets: @@ -143,6 +146,11 @@ def acquire_binary(assets: bool, purpose: str) -> str: else: # Ok; going with a downloaded prefab headless build. + # By default, prefab build targets on WSL (Linux running on + # Windows) will give us Windows builds which won't work right + # here. Ask it for Linux builds instead. + env = dict(os.environ, BA_WSL_TARGETS_WINDOWS='0') + # Let the user know how to use their own built binaries instead # if they prefer. note = '\n' + textwrap.fill( @@ -152,6 +160,7 @@ def acquire_binary(assets: bool, purpose: str) -> str: f' you\'ve made to the C/C++ layer.', 80, ) + if assets: print( f'{Clr.SMAG}Fetching prefab binary & assets for' @@ -161,6 +170,7 @@ def acquire_binary(assets: bool, purpose: str) -> str: binary_path = ( subprocess.run( ['tools/pcommand', 'prefab_binary_path', 'server-release'], + env=env, check=True, capture_output=True, ) @@ -177,6 +187,7 @@ def acquire_binary(assets: bool, purpose: str) -> str: binary_path = ( subprocess.run( ['tools/pcommand', 'prefab_binary_path', 'server-release'], + env=env, check=True, capture_output=True, ) @@ -185,7 +196,7 @@ def acquire_binary(assets: bool, purpose: str) -> str: ) binary_build_command = ['make', binary_path] - subprocess.run(binary_build_command, check=True) + subprocess.run(binary_build_command, env=env, check=True) if not os.path.exists(binary_path): raise RuntimeError( f"Binary not found at expected path '{binary_path}'." From 13f9766b5ae66043a4e931bc21a6e21b8c86a718 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 13:25:57 -0700 Subject: [PATCH 26/44] build fixes/tidying --- .efrocachemap | 32 ++++++------ Makefile | 109 +++++++++++++++++++-------------------- tools/batools/staging.py | 26 ++++++---- 3 files changed, 84 insertions(+), 83 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index e6aca954..e6bd7cb6 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4069,18 +4069,18 @@ "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "e5db667cca97477bdc53745597ce96c0", "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "a691fe1725d4e3e8659d4a8910767a6b", "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "757d3686278016f0a8c14ca32351869f", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "1f4113367d9314392e9f735d169880b6", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "c83bdc7dedf14fb6b75e791426bc1c42", "build/prefab/full/mac_arm64_gui/release/ballisticakit": "e0aad2e5e0429f267c68e1adc01f4de2", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "eb5e74ea7434d314c8e3775db5fbb46e", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "e2b04830b186f5c34712772dbb8c3c0c", "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "7f3147c3eb2d6b47d060cec361333609", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "558d5de83a26abe0da6c56d20918d0e6", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "6c0b13deccc79d9b1ce05bdfe8cd77cc", "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "60e4941df0d4d6f05f4f5d4497f5b31f", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "ba913b1cbf2fab9da6f00bef768e99f5", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "83029d84710058c0400a2030c95805f4", "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "c4908dc4c7bff0f87e2469b145e9fe64", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "65f8b9df27e56bb9d44289475e8752c6", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "ddc6bbf0e792502c05bbfc7d22f5f36c", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "4966a48d90426c00d566cb73c7a5bb4e", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "421eccd01f494e8b16108c115f9c454e", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "362b4a7954ad3a47ac22549dc16c6787", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "10ccfc4b9c884ca0ca60fd15609fa6cb", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "e18663da062012118b436aabcd75cf7c", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "1c75a8e2450cd3bf96efc32677784edc", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "56d6440f62c271c4ce9ef520400395a3", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", @@ -4097,14 +4097,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "fbdc80e41c5883b4a893d2f0786e377f", "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "519286657455b41232a1faa946d41c2c", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "56629dc18b297fc90ddd4a2e64906943", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "71735c7abee709e3f0b3de828a342726", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "1dc5bb0bcab746e2ed3d4ee95e96b228", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "b149369e859494ff0bf4ee3e3148969a", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "2406289654622f7faf67c797ca16069c", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "46cac43de3e45317c5b8296eaad873ce", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "82405a82c0780693e65ead6b85263780", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "e1af076467c1cc96971e775233439907", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "a4665e417f029f4c5324a7ce5f16ead3", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "d60e21fa70b7fe8f3859e7b67f2cec67", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "0b86527ec5d6e35b2533a3a2d49303e3", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "95a5100c5aaf7b29f96f8fb2b14b15c9", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "5a7404105c65723799acf224c117691b", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "35c723d0a7d7967d8bba43600dcf6daf", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "3674b562a6fec4a925c3f38ee1753599", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "b611c090513a21e2fe90e56582724e9d", "src/ballistica/base/mgen/pyembed/binding_base.inc": "72bfed2cce8ff19741989dec28302f3f", diff --git a/Makefile b/Makefile index 8edcf993..c725f7d1 100644 --- a/Makefile +++ b/Makefile @@ -217,47 +217,35 @@ BA_WSL_TARGETS_WINDOWS ?= 1 # Assemble & run a gui debug build for this platform. prefab-gui-debug: prefab-gui-debug-build - export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ - $($(shell BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ - $(PCOMMAND) prefab_run_var gui-debug)) + $($(shell $(WSLU) $(PCOMMAND) prefab_run_var gui-debug)) # Assemble & run a gui release build for this platform. prefab-gui-release: prefab-gui-release-build - export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ - $($(shell BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ - $(PCOMMAND) prefab_run_var gui-release)) + $($(shell $(WSLU) $(PCOMMAND) prefab_run_var gui-release)) # Assemble a debug build for this platform. prefab-gui-debug-build: - BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ - $(PCOMMAND) make_prefab gui-debug + $(WSLU) $(PCOMMAND) make_prefab gui-debug # Assemble a release build for this platform. prefab-gui-release-build: - BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ - $(PCOMMAND) make_prefab gui-release + $(WSLU) $(PCOMMAND) make_prefab gui-release # Assemble & run a server debug build for this platform. prefab-server-debug: prefab-server-debug-build - export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ - $($(shell BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ - $(PCOMMAND) prefab_run_var server-debug)) + $($(shell $(WSLU) $(PCOMMAND) prefab_run_var server-debug)) # Assemble & run a server release build for this platform. prefab-server-release: prefab-server-release-build - export BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) && \ - $($(shell BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ - $(PCOMMAND) prefab_run_var server-release)) + $($(shell $(WSLU) $(PCOMMAND) prefab_run_var server-release)) # Assemble a server debug build for this platform. prefab-server-debug-build: - BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ - $(PCOMMAND) make_prefab server-debug + $(WSLU) $(PCOMMAND) make_prefab server-debug # Assemble a server release build for this platform. prefab-server-release-build: - BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) \ - $(PCOMMAND) make_prefab server-release + $(WSLU) $(PCOMMAND) make_prefab server-release # Clean all prefab builds. prefab-clean: @@ -278,11 +266,11 @@ RUN_PREFAB_MAC_ARM64_GUI_DEBUG = cd build/prefab/full/mac_arm64_gui/debug \ prefab-mac-x86-64-gui-debug: prefab-mac-x86-64-gui-debug-build @$(PCOMMAND) ensure_prefab_platform mac_x86_64 - @$(RUN_PREFAB_MAC_X86_64_GUI_DEBUG) + $(RUN_PREFAB_MAC_X86_64_GUI_DEBUG) prefab-mac-arm64-gui-debug: prefab-mac-arm64-gui-debug-build @$(PCOMMAND) ensure_prefab_platform mac_arm64 - @$(RUN_PREFAB_MAC_ARM64_GUI_DEBUG) + $(RUN_PREFAB_MAC_ARM64_GUI_DEBUG) prefab-mac-x86-64-gui-debug-build: prereqs assets-cmake \ build/prefab/full/mac_x86_64_gui/debug/ballisticakit @@ -308,11 +296,11 @@ RUN_PREFAB_MAC_ARM64_GUI_RELEASE = cd build/prefab/full/mac_arm64_gui/release \ prefab-mac-x86-64-gui-release: prefab-mac-x86-64-gui-release-build @$(PCOMMAND) ensure_prefab_platform mac_x86_64 - @$(RUN_PREFAB_MAC_X86_64_GUI_RELEASE) + $(RUN_PREFAB_MAC_X86_64_GUI_RELEASE) prefab-mac-arm64-gui-release: prefab-mac-arm64-gui_release-build @$(PCOMMAND) ensure_prefab_platform mac_arm64 - @$(RUN_PREFAB_MAC_ARM64_GUI_RELEASE) + $(RUN_PREFAB_MAC_ARM64_GUI_RELEASE) prefab-mac-x86-64-gui-release-build: prereqs assets-cmake \ build/prefab/full/mac_x86_64_gui/release/ballisticakit @@ -342,7 +330,7 @@ prefab-mac-x86-64-server-debug: prefab-mac-x86-64-server-debug-build prefab-mac-arm64-server-debug: prefab-mac-arm64-server-debug-build @$(PCOMMAND) ensure_prefab_platform mac_arm64 - @$(RUN_PREFAB_MAC_ARM64_SERVER_DEBUG) + $(RUN_PREFAB_MAC_ARM64_SERVER_DEBUG) prefab-mac-x86-64-server-debug-build: prereqs assets-server \ build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless @@ -368,11 +356,11 @@ RUN_PREFAB_MAC_ARM64_SERVER_RELEASE = cd \ prefab-mac-x86-64-server-release: prefab-mac-x86-64-server-release-build @$(PCOMMAND) ensure_prefab_platform mac_x86_64 - @$(RUN_PREFAB_MAC_X86_64_SERVER_RELEASE) + $(RUN_PREFAB_MAC_X86_64_SERVER_RELEASE) prefab-mac-arm64-server-release: prefab-mac-arm64-server-release-build @$(PCOMMAND) ensure_prefab_platform mac_arm64 - @$(RUN_PREFAB_MAC_ARM64_SERVER_RELEASE) + $(RUN_PREFAB_MAC_ARM64_SERVER_RELEASE) prefab-mac-x86-64-server-release-build: prereqs assets-server \ build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless @@ -399,12 +387,12 @@ RUN_PREFAB_LINUX_ARM64_GUI_DEBUG = cd \ build/prefab/full/linux_arm64_gui/debug && ./ballisticakit prefab-linux-x86-64-gui-debug: prefab-linux-x86-64-gui-debug-build - @$(PCOMMAND) ensure_prefab_platform linux_x86_64 - @$(RUN_PREFAB_LINUX_X86_64_GUI_DEBUG) + @$(WSLL) $(PCOMMAND) ensure_prefab_platform linux_x86_64 + $(RUN_PREFAB_LINUX_X86_64_GUI_DEBUG) prefab-linux-arm64-gui-debug: prefab-linux-arm64-gui-debug-build - @$(PCOMMAND) ensure_prefab_platform linux_arm64 - @$(RUN_PREFAB_LINUX_ARM64_GUI_DEBUG) + @$(WSLL) $(PCOMMAND) ensure_prefab_platform linux_arm64 + $(RUN_PREFAB_LINUX_ARM64_GUI_DEBUG) prefab-linux-x86-64-gui-debug-build: prereqs assets-cmake \ build/prefab/full/linux_x86_64_gui/debug/ballisticakit @@ -429,12 +417,12 @@ RUN_PREFAB_LINUX_ARM64_GUI_RELEASE = cd \ build/prefab/full/linux_arm64_gui/release && ./ballisticakit prefab-linux-x86-64-gui-release: prefab-linux-x86-64-gui-release-build - @$(PCOMMAND) ensure_prefab_platform linux_x86_64 - @$(RUN_PREFAB_LINUX_X86_64_GUI_RELEASE) + @$(WSLL) $(PCOMMAND) ensure_prefab_platform linux_x86_64 + $(RUN_PREFAB_LINUX_X86_64_GUI_RELEASE) prefab-linux-arm64-gui-release: prefab-linux-arm64-gui-release-build - @$(PCOMMAND) ensure_prefab_platform linux_arm64 - @$(RUN_PREFAB_LINUX_ARM64_GUI_RELEASE) + @$(WSLL) $(PCOMMAND) ensure_prefab_platform linux_arm64 + $(RUN_PREFAB_LINUX_ARM64_GUI_RELEASE) prefab-linux-x86-64-gui-release-build: prereqs assets-cmake \ build/prefab/full/linux_x86_64_gui/release/ballisticakit @@ -459,12 +447,12 @@ RUN_PREFAB_LINUX_ARM64_SERVER_DEBUG = cd \ build/prefab/full/linux_arm64_server/debug && ./ballisticakit_server prefab-linux-x86-64-server-debug: prefab-linux-x86-64-server-debug-build - @$(PCOMMAND) ensure_prefab_platform linux_x86_64 - @$(RUN_PREFAB_LINUX_X86_64_SERVER_DEBUG) + @$(WSLL) $(PCOMMAND) ensure_prefab_platform linux_x86_64 + $(RUN_PREFAB_LINUX_X86_64_SERVER_DEBUG) prefab-linux-arm64-server-debug: prefab-linux-arm64-server-debug-build - @$(PCOMMAND) ensure_prefab_platform linux_arm64 - @$(RUN_PREFAB_LINUX_ARM64_SERVER_DEBUG) + @$(WSLL) $(PCOMMAND) ensure_prefab_platform linux_arm64 + $(RUN_PREFAB_LINUX_ARM64_SERVER_DEBUG) prefab-linux-x86-64-server-debug-build: prereqs assets-server \ build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless @@ -491,12 +479,12 @@ RUN_PREFAB_LINUX_ARM64_SERVER_RELEASE = cd \ build/prefab/full/linux_arm64_server/release && ./ballisticakit_server prefab-linux-x86-64-server-release: prefab-linux-x86-64-server-release-build - @$(PCOMMAND) ensure_prefab_platform linux_x86_64 - @$(RUN_PREFAB_LINUX_X86_64_SERVER_RELEASE) + @$(WSLL) $(PCOMMAND) ensure_prefab_platform linux_x86_64 + $(RUN_PREFAB_LINUX_X86_64_SERVER_RELEASE) prefab-linux-arm64-server-release: prefab-linux-arm64-server-release-build - @$(PCOMMAND) ensure_prefab_platform linux_arm64 - @$(RUN_PREFAB_LINUX_ARM64_SERVER_RELEASE) + @$(WSLL) $(PCOMMAND) ensure_prefab_platform linux_arm64 + $(RUN_PREFAB_LINUX_ARM64_SERVER_RELEASE) prefab-linux-x86-64-server-release-build: prereqs assets-server \ build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless @@ -520,8 +508,8 @@ RUN_PREFAB_WINDOWS_X86_GUI_DEBUG = cd build/prefab/full/windows_x86_gui/debug \ && ./BallisticaKit.exe prefab-windows-x86-gui-debug: prefab-windows-x86-gui-debug-build - @$(PCOMMAND) ensure_prefab_platform windows_x86 - @$(RUN_PREFAB_WINDOWS_X86_GUI_DEBUG) + @$(WSLW) $(PCOMMAND) ensure_prefab_platform windows_x86 + $(RUN_PREFAB_WINDOWS_X86_GUI_DEBUG) prefab-windows-x86-gui-debug-build: prereqs assets-windows-$(WINPLAT_X86) \ build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe @@ -543,8 +531,8 @@ RUN_PREFAB_WINDOWS_X86_GUI_RELEASE = cd \ build/prefab/full/windows_x86_gui/release && ./BallisticaKit.exe prefab-windows-x86-gui-release: prefab-windows-x86-gui-release-build - @$(PCOMMAND) ensure_prefab_platform windows_x86 - @$(RUN_PREFAB_WINDOWS_X86_GUI_RELEASE) + @$(WSLW) $(PCOMMAND) ensure_prefab_platform windows_x86 + $(RUN_PREFAB_WINDOWS_X86_GUI_RELEASE) prefab-windows-x86-gui-release-build: prereqs \ assets-windows-$(WINPLAT_X86) \ @@ -568,8 +556,8 @@ RUN_PREFAB_WINDOWS_X86_SERVER_DEBUG = cd \ && dist/python_d.exe ballisticakit_server.py prefab-windows-x86-server-debug: prefab-windows-x86-server-debug-build - @$(PCOMMAND) ensure_prefab_platform windows_x86 - @$(RUN_PREFAB_WINDOWS_X86_SERVER_DEBUG) + @$(WSLW) $(PCOMMAND) ensure_prefab_platform windows_x86 + $(RUN_PREFAB_WINDOWS_X86_SERVER_DEBUG) prefab-windows-x86-server-debug-build: prereqs \ assets-windows-$(WINPLAT_X86) \ @@ -593,8 +581,8 @@ RUN_PREFAB_WINDOWS_X86_SERVER_RELEASE = cd \ && dist/python.exe -O ballisticakit_server.py prefab-windows-x86-server-release: prefab-windows-x86-server-release-build - @$(PCOMMAND) ensure_prefab_platform windows_x86 - @$(RUN_PREFAB_WINDOWS_X86_SERVER_RELEASE) + @$(WSLW) $(PCOMMAND) ensure_prefab_platform windows_x86 + $(RUN_PREFAB_WINDOWS_X86_SERVER_RELEASE) prefab-windows-x86-server-release-build: prereqs \ assets-windows-$(WINPLAT_X86) \ @@ -985,19 +973,19 @@ windows-staging: assets-windows resources meta # Build and run a debug windows build (from WSL). windows-debug: windows-debug-build - @$(PCOMMAND) ensure_prefab_platform windows_x86 + @$(WSLW) $(PCOMMAND) ensure_prefab_platform windows_x86 build/windows/Debug_Win32/BallisticaKitGeneric.exe # Build and run a release windows build (from WSL). windows-release: windows-release-build - @$(PCOMMAND) ensure_prefab_platform windows_x86 + @$(WSLW) $(PCOMMAND) ensure_prefab_platform windows_x86 build/windows/Release_Win32/BallisticaKitGeneric.exe # Build a debug windows build (from WSL). windows-debug-build: \ build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib \ build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb - @$(PCOMMAND) ensure_prefab_platform windows_x86 + @$(WSLW) $(PCOMMAND) ensure_prefab_platform windows_x86 @$(PCOMMAND) wsl_build_check_win_drive WINDOWS_CONFIGURATION=Debug WINDOWS_PLATFORM=Win32 $(MAKE) windows-staging WINDOWS_PROJECT=Generic WINDOWS_CONFIGURATION=Debug WINDOWS_PLATFORM=Win32 \ @@ -1007,7 +995,7 @@ windows-debug-build: \ windows-debug-rebuild: \ build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib \ build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb - @$(PCOMMAND) ensure_prefab_platform windows_x86 + @$(WSLW) $(PCOMMAND) ensure_prefab_platform windows_x86 @$(PCOMMAND) wsl_build_check_win_drive WINDOWS_CONFIGURATION=Debug WINDOWS_PLATFORM=Win32 $(MAKE) windows-staging WINDOWS_PROJECT=Generic WINDOWS_CONFIGURATION=Debug WINDOWS_PLATFORM=Win32 \ @@ -1017,7 +1005,7 @@ windows-debug-rebuild: \ windows-release-build: \ build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib \ build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb - @$(PCOMMAND) ensure_prefab_platform windows_x86 + @$(WSLW) $(PCOMMAND) ensure_prefab_platform windows_x86 @$(PCOMMAND) wsl_build_check_win_drive WINDOWS_CONFIGURATION=Release WINDOWS_PLATFORM=Win32 $(MAKE) windows-staging WINDOWS_PROJECT=Generic WINDOWS_CONFIGURATION=Release WINDOWS_PLATFORM=Win32 \ @@ -1027,7 +1015,7 @@ windows-release-build: \ windows-release-rebuild: \ build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib \ build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb - @$(PCOMMAND) ensure_prefab_platform windows_x86 + @$(WSLW) $(PCOMMAND) ensure_prefab_platform windows_x86 @$(PCOMMAND) wsl_build_check_win_drive WINDOWS_CONFIGURATION=Release WINDOWS_PLATFORM=Win32 $(MAKE) windows-staging WINDOWS_PROJECT=Generic WINDOWS_CONFIGURATION=Release WINDOWS_PLATFORM=Win32 \ @@ -1262,6 +1250,13 @@ _WMSBE_2 = \\Community\\MSBuild\\Current\\Bin\\MSBuild.exe\" _WMSBE_1B = /mnt/c/Program Files/Microsoft Visual Studio/2022 _WMSBE_2B = /Community/MSBuild/Current/Bin/MSBuild.exe +# Sets WSL build type to the user's choice (defaults to Windows). +WSLU=BA_WSL_TARGETS_WINDOWS=$(BA_WSL_TARGETS_WINDOWS) +# Sets WSL build type to Linux. +WSLL=BA_WSL_TARGETS_WINDOWS=0 +# Sets WSL build type to Windows. +WSLW=BA_WSL_TARGETS_WINDOWS=1 + VISUAL_STUDIO_VERSION = -property:VisualStudioVersion=17 WIN_MSBUILD_EXE = $(_WMSBE_1)$(_WMSBE_2) WIN_MSBUILD_EXE_B = "$(_WMSBE_1B)$(_WMSBE_2B)" diff --git a/tools/batools/staging.py b/tools/batools/staging.py index 5a14ea75..983d81f3 100755 --- a/tools/batools/staging.py +++ b/tools/batools/staging.py @@ -11,6 +11,7 @@ import subprocess from functools import partial from typing import TYPE_CHECKING +from efro.terminal import Clr from efrotools import PYVER, extract_arg, extract_flag if TYPE_CHECKING: @@ -39,6 +40,7 @@ class AssetStager: def __init__(self, projroot: str) -> None: self.projroot = projroot + self.desc = 'unknown' # We always calc src relative to this script. self.src = f'{self.projroot}/build/assets' self.dst: str | None = None @@ -71,6 +73,12 @@ class AssetStager: """Do the thing.""" self._parse_args(args) + print( + f'{Clr.BLU}Staging {Clr.MAG}{Clr.BLD}{self.desc}{Clr.RST}' + f'{Clr.BLU} build in {Clr.MAG}{Clr.BLD}{self.dst}' + f'{Clr.RST}{Clr.BLU}...{Clr.RST}' + ) + # Ok, now for every top level dir in src, come up with a nice single # command to sync the needed subset of it to dst. @@ -140,22 +148,27 @@ class AssetStager: ) if platform_arg == '-android': + self.desc = 'android' self._parse_android_args(args) elif platform_arg.startswith('-win'): + self.desc = 'windows' self._parse_win_args(platform_arg, args) elif platform_arg == '-cmake': + self.desc = 'cmake' self.dst = args[-1] self.tex_suffix = '.dds' # Link/copy in a binary *if* builddir is provided. self.include_binary_executable = self.builddir is not None self.executable_name = 'ballisticakit' elif platform_arg == '-cmakemodular': + self.desc = 'cmake modular' self.dst = args[-1] self.tex_suffix = '.dds' self.include_python_dylib = True self.include_shell_executable = True self.executable_name = 'ballisticakit' elif platform_arg == '-cmakeserver': + self.desc = 'cmake server' self.dst = os.path.join(args[-1], 'dist') self.serverdst = args[-1] self.include_textures = False @@ -165,6 +178,7 @@ class AssetStager: self.include_binary_executable = self.builddir is not None self.executable_name = 'ballisticakit_headless' elif platform_arg == '-cmakemodularserver': + self.desc = 'cmake modular server' self.dst = os.path.join(args[-1], 'dist') self.serverdst = args[-1] self.include_textures = False @@ -175,6 +189,7 @@ class AssetStager: self.executable_name = 'ballisticakit_headless' elif platform_arg == '-xcode-mac': + self.desc = 'xcode mac' self.src = os.environ['SOURCE_ROOT'] + '/../build/assets' self.dst = ( os.environ['TARGET_BUILD_DIR'] @@ -184,17 +199,8 @@ class AssetStager: self.include_pylib = True self.pylib_src_name = 'pylib-apple' self.tex_suffix = '.dds' - elif platform_arg == '-xcode-mac-old': - self.src = os.environ['SOURCE_ROOT'] + '/build/assets' - self.dst = ( - os.environ['TARGET_BUILD_DIR'] - + '/' - + os.environ['UNLOCALIZED_RESOURCES_FOLDER_PATH'] - ) - self.include_pylib = True - self.pylib_src_name = 'pylib-apple' - self.tex_suffix = '.dds' elif platform_arg == '-xcode-ios': + self.desc = 'xcode ios' self.src = os.environ['SOURCE_ROOT'] + '/build/assets' self.dst = ( os.environ['TARGET_BUILD_DIR'] From 358a9a78e5ddb69227a46f1a3eb830319b48354b Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 13:54:08 -0700 Subject: [PATCH 27/44] wsl build polishing --- .efrocachemap | 32 ++++++++++++++++---------------- Makefile | 12 ++++++------ tools/batools/pcommands2.py | 9 ++++++--- 3 files changed, 28 insertions(+), 25 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index e6bd7cb6..0417b85c 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4069,18 +4069,18 @@ "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "e5db667cca97477bdc53745597ce96c0", "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "a691fe1725d4e3e8659d4a8910767a6b", "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "757d3686278016f0a8c14ca32351869f", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "c83bdc7dedf14fb6b75e791426bc1c42", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "2690110d6a4dcd67c9185106f5348804", "build/prefab/full/mac_arm64_gui/release/ballisticakit": "e0aad2e5e0429f267c68e1adc01f4de2", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "e2b04830b186f5c34712772dbb8c3c0c", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "fa31138ed07fd6e51405dae341bca138", "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "7f3147c3eb2d6b47d060cec361333609", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "6c0b13deccc79d9b1ce05bdfe8cd77cc", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "df56e81732b09e2d7870e53a69c487d8", "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "60e4941df0d4d6f05f4f5d4497f5b31f", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "83029d84710058c0400a2030c95805f4", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "eedc5c8f235853c327ea04ed9ba04f0f", "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "c4908dc4c7bff0f87e2469b145e9fe64", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "362b4a7954ad3a47ac22549dc16c6787", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "10ccfc4b9c884ca0ca60fd15609fa6cb", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "e18663da062012118b436aabcd75cf7c", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "1c75a8e2450cd3bf96efc32677784edc", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "deada7140743b15eea52f1b66c486542", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "3381e9d471deacfd0e97a86d9f0f6848", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "0649827117009561b8c9fa32129c86ce", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "40399aa75b1ba5f311a60fe603625403", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "56d6440f62c271c4ce9ef520400395a3", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", @@ -4097,14 +4097,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "fbdc80e41c5883b4a893d2f0786e377f", "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "e1af076467c1cc96971e775233439907", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "a4665e417f029f4c5324a7ce5f16ead3", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "d60e21fa70b7fe8f3859e7b67f2cec67", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "0b86527ec5d6e35b2533a3a2d49303e3", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "95a5100c5aaf7b29f96f8fb2b14b15c9", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "5a7404105c65723799acf224c117691b", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "35c723d0a7d7967d8bba43600dcf6daf", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "3674b562a6fec4a925c3f38ee1753599", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "0b6c8327a15412e4ab3a253fa9fadff3", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "973ffdae08f948453ab4806fb72b360e", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "9ec66f16714b9db09a1645b312aa0122", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "664874b21961688a84b97bbc0fc8f397", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "e07ac9a02f9e401f86254c98dcbaa41d", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "398d6a9469e27bd248197e9074fd1cee", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "f1b48c627999966bfdd738955f1a1060", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "cdc7d4cb6dede80631aa985053c07423", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "b611c090513a21e2fe90e56582724e9d", "src/ballistica/base/mgen/pyembed/binding_base.inc": "72bfed2cce8ff19741989dec28302f3f", diff --git a/Makefile b/Makefile index c725f7d1..2cc8472c 100644 --- a/Makefile +++ b/Makefile @@ -982,7 +982,7 @@ windows-release: windows-release-build build/windows/Release_Win32/BallisticaKitGeneric.exe # Build a debug windows build (from WSL). -windows-debug-build: \ +windows-debug-build: prereqs \ build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib \ build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb @$(WSLW) $(PCOMMAND) ensure_prefab_platform windows_x86 @@ -992,7 +992,7 @@ windows-debug-build: \ $(MAKE) _windows-wsl-build # Rebuild a debug windows build (from WSL). -windows-debug-rebuild: \ +windows-debug-rebuild: prereqs \ build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib \ build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb @$(WSLW) $(PCOMMAND) ensure_prefab_platform windows_x86 @@ -1002,7 +1002,7 @@ windows-debug-rebuild: \ $(MAKE) _windows-wsl-rebuild # Build a release windows build (from WSL). -windows-release-build: \ +windows-release-build: prereqs \ build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib \ build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb @$(WSLW) $(PCOMMAND) ensure_prefab_platform windows_x86 @@ -1012,7 +1012,7 @@ windows-release-build: \ $(MAKE) _windows-wsl-build # Rebuild a release windows build (from WSL). -windows-release-rebuild: \ +windows-release-rebuild: prereqs \ build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib \ build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb @$(WSLW) $(PCOMMAND) ensure_prefab_platform windows_x86 @@ -1022,13 +1022,13 @@ windows-release-rebuild: \ $(MAKE) _windows-wsl-rebuild # Remove all non-git-managed files in windows subdir. -windows-clean: +windows-clean: prereqs @$(CHECK_CLEAN_SAFETY) git clean -dfx ballisticakit-windows rm -rf build/windows $(LAZYBUILDDIR) # Show what would be cleaned. -windows-clean-list: +windows-clean-list: prereqs @$(CHECK_CLEAN_SAFETY) git clean -dnx ballisticakit-windows echo would also remove build/windows $(LAZYBUILDDIR) diff --git a/tools/batools/pcommands2.py b/tools/batools/pcommands2.py index a367718d..e96ac973 100644 --- a/tools/batools/pcommands2.py +++ b/tools/batools/pcommands2.py @@ -452,9 +452,12 @@ def wsl_build_check_win_drive() -> None: .strip() ) - # If we're sitting under the linux filesystem, our path - # will start with \\wsl$; fail in that case and explain why. - if not path.startswith('\\\\wsl$'): + # If we're sitting under the linux filesystem, our path will start + # with '\\wsl$' or '\\wsl.localhost' or '\\wsl\'; fail in that case + # and explain why. + if not any( + path.startswith(x) for x in ['\\\\wsl$', '\\\\wsl.', '\\\\wsl\\'] + ): return def _wrap(txt: str) -> str: From 68f0619c4e3f796f069e9c97e466230ee5150844 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 14:10:12 -0700 Subject: [PATCH 28/44] tidying --- .efrocachemap | 56 +++++++++---------- CHANGELOG.md | 2 +- src/assets/ba_data/python/baenv.py | 2 +- src/ballistica/shared/ballistica.cc | 2 +- .../shared/foundation/event_loop.cc | 1 - tools/batools/pcommands2.py | 2 +- 6 files changed, 32 insertions(+), 33 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 0417b85c..730c42ad 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4061,26 +4061,26 @@ "build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1", "build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "f86cf722ec86ba34c8873232610ed6a4", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "f05d3419f7b53f69e7f86ed21ee0f6a0", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "bd10264cd21dde10c33b65216212897f", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "9285d2a9c610e53634da874b98c4f59e", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "aac94860b46ff290e7712899637cfcfc", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "e5db667cca97477bdc53745597ce96c0", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "a691fe1725d4e3e8659d4a8910767a6b", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "757d3686278016f0a8c14ca32351869f", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "2690110d6a4dcd67c9185106f5348804", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "e0aad2e5e0429f267c68e1adc01f4de2", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "fa31138ed07fd6e51405dae341bca138", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "7f3147c3eb2d6b47d060cec361333609", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "df56e81732b09e2d7870e53a69c487d8", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "60e4941df0d4d6f05f4f5d4497f5b31f", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "eedc5c8f235853c327ea04ed9ba04f0f", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "c4908dc4c7bff0f87e2469b145e9fe64", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "deada7140743b15eea52f1b66c486542", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "3381e9d471deacfd0e97a86d9f0f6848", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "0649827117009561b8c9fa32129c86ce", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "40399aa75b1ba5f311a60fe603625403", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "93a99cb9461e8c506c5605f9c63dce2d", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "54ceb7e159839e7f8c7959a5d71335da", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "fe821168d2dbd6e10acd3bdf70ab61af", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "cce6d43ddec6691d8f43e3561ff299b6", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "38f68382d5f31c1295f796c3766c9426", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "d2d222177bb3a60c46921f556b52ad06", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "b1d01b76bcf92ebc144df17c9b5fcc07", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "8d9848fbfdd81c1b32ce1f431203e2b9", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "c13611d184f7e28a308fccd3c6d588ec", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "e6c72fb374b823a92786861f01adc733", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "d49b1502afb8b5b0cf637b9a747ceac1", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "6be79f8695e63d7dadc8ff37756cc440", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "fd8d6fbf26fc4a0c5281592ffb269b24", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "824bac953cbe94f1f5a5bc714cc139a0", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "742b39504ef5c131c522eb05e90fa74a", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "64dd34b2fedb26c9890c509d1bc81531", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "bf6d6ba41aed2754e5d117d26bcb6ade", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "5f3bb008b61b202ea0489af5f98ba3f4", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "4630254e61ba1d96bd21bad6bb43e8de", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "23cabd019c189e91169847ec955d0f4e", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "56d6440f62c271c4ce9ef520400395a3", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", @@ -4097,14 +4097,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "fbdc80e41c5883b4a893d2f0786e377f", "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "0b6c8327a15412e4ab3a253fa9fadff3", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "973ffdae08f948453ab4806fb72b360e", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "9ec66f16714b9db09a1645b312aa0122", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "664874b21961688a84b97bbc0fc8f397", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "e07ac9a02f9e401f86254c98dcbaa41d", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "398d6a9469e27bd248197e9074fd1cee", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "f1b48c627999966bfdd738955f1a1060", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "cdc7d4cb6dede80631aa985053c07423", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "07d115ab0d47755999f6098c3f6d206a", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "0636b89a49c2fc2f1bc5de4203b0fa90", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "74578fa80a57562691c5dee92664db53", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "9f58c205a10905661ef22a8c42920b38", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "52cfa9591860a8ff3686215b5cca83bb", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "676ff6599a561d0803e96d8a82bf44e2", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "cf1906db75ee05decb729f32926f5377", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "c62f2c7c7786c01bcb6f21faeb5ec2ca", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "b611c090513a21e2fe90e56582724e9d", "src/ballistica/base/mgen/pyembed/binding_base.inc": "72bfed2cce8ff19741989dec28302f3f", diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a2bec12..d272cfe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.33 (build 21787, api 8, 2024-03-14) +### 1.7.33 (build 21788, api 8, 2024-03-14) - Stress test input-devices are now a bit smarter; they won't press any buttons while UIs are up (this could cause lots of chaos if it happened). - Added a 'Show Demos When Idle' option in advanced settings. If enabled, the diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 688b37c3..e795bb6e 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -52,7 +52,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21787 +TARGET_BALLISTICA_BUILD = 21788 TARGET_BALLISTICA_VERSION = '1.7.33' diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 62fb9a39..2956724a 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21787; +const int kEngineBuildNumber = 21788; const char* kEngineVersion = "1.7.33"; const int kEngineApiVersion = 8; diff --git a/src/ballistica/shared/foundation/event_loop.cc b/src/ballistica/shared/foundation/event_loop.cc index a2a714c5..d390defa 100644 --- a/src/ballistica/shared/foundation/event_loop.cc +++ b/src/ballistica/shared/foundation/event_loop.cc @@ -328,7 +328,6 @@ void EventLoop::BootstrapThread_() { assert(!bootstrapped_); assert(g_core); thread_id_ = std::this_thread::get_id(); - const char* id_string; switch (identifier_) { case EventLoopID::kLogic: diff --git a/tools/batools/pcommands2.py b/tools/batools/pcommands2.py index e96ac973..bfa18a9e 100644 --- a/tools/batools/pcommands2.py +++ b/tools/batools/pcommands2.py @@ -482,7 +482,7 @@ def wsl_build_check_win_drive() -> None: 'Note that WSL2 filesystem performance' ' is poor when accessing' ' native Windows drives, so if Visual Studio builds are not' - ' needed it may be best to keep things' + ' needed it may be best to keep things here' ' on the Linux filesystem.' ' This behavior may differ under WSL1 (untested).' ), From ff6492e19e99ec963a2b1106cde5f1593d5c329a Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 14:37:02 -0700 Subject: [PATCH 29/44] tidying/hardening --- Makefile | 2 +- src/tools/pcommandbatch/pcommandbatch.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 2cc8472c..14e9a150 100644 --- a/Makefile +++ b/Makefile @@ -151,7 +151,7 @@ meta-clean: # few things such as localconfig.json). clean: $(CHECK_CLEAN_SAFETY) - rm -rf build # Handle this part ourself; can confuse git. + rm -rf build # Kill build ourself; may confuse git if contains other repos. git clean -dfx $(ROOT_CLEAN_IGNORES) # Show what clean would delete without actually deleting it. diff --git a/src/tools/pcommandbatch/pcommandbatch.c b/src/tools/pcommandbatch/pcommandbatch.c index 4e1c6991..6324f622 100644 --- a/src/tools/pcommandbatch/pcommandbatch.c +++ b/src/tools/pcommandbatch/pcommandbatch.c @@ -165,11 +165,14 @@ int get_running_server_port_(const struct Context_* ctx, cJSON* state_dict = cJSON_Parse(buf); if (!state_dict) { + // An un-parseable state file is not a recoverable error; go down hard. fprintf(stderr, - "Error: pcommandbatch client %s_%d (pid %d): failed to parse state " - "value.\n", - ctx->instance_prefix, ctx->instance_num, ctx->pid); - return -1; + "Fatal Error: pcommandbatch client %s_%d (pid %d):" + " failed to parse state file value of size %zu.\n", + ctx->instance_prefix, ctx->instance_num, ctx->pid, amt); + fflush(stderr); + abort(); + // return -1; } // If results included output, print it. From 78b850f835865d8b7e6b9f6a53fe102f0b7f7dc8 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 14:48:32 -0700 Subject: [PATCH 30/44] a bit more tidying --- CHANGELOG.md | 3 +++ Makefile | 6 +++--- src/tools/pcommandbatch/pcommandbatch.c | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d272cfe0..cf64b496 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,9 @@ - Sphinx based Python documentation generation is now wired up (Thanks Loup-Garou911XD!) - Renaming & overwriting existing profiles is no longer possible (Thanks Temp!) +- Cleaned up builds when running under WSL. Things like `make mypy` should now + work correctly there, and it should now be possible to build and run either + Linux or Windows builds there. ### 1.7.32 (build 21741, api 8, 2023-12-20) - Fixed a screen message that no one will ever see (Thanks vishal332008?...) diff --git a/Makefile b/Makefile index 14e9a150..70526b24 100644 --- a/Makefile +++ b/Makefile @@ -969,7 +969,7 @@ WINDOWS_CONFIGURATION ?= Debug # Stage assets and other files so a built binary will run. windows-staging: assets-windows resources meta - $(STAGE_BUILD) -win-$(WINPLT) -$(WINCFGLC) build/windows/$(WINCFG)_$(WINPLT) + @$(STAGE_BUILD) -win-$(WINPLT) -$(WINCFGLC) build/windows/$(WINCFG)_$(WINPLT) # Build and run a debug windows build (from WSL). windows-debug: windows-debug-build @@ -1150,8 +1150,8 @@ cmake-modular-server-clean: # Stage assets for building/running within CLion. clion-staging: assets-cmake resources meta - $(STAGE_BUILD) -cmake -debug build/clion_debug - $(STAGE_BUILD) -cmake -release build/clion_release + @$(STAGE_BUILD) -cmake -debug build/clion_debug + @$(STAGE_BUILD) -cmake -release build/clion_release # Tell make which of these targets don't represent files. .PHONY: cmake cmake-build cmake-clean cmake-server cmake-server-build \ diff --git a/src/tools/pcommandbatch/pcommandbatch.c b/src/tools/pcommandbatch/pcommandbatch.c index 6324f622..846a8d0d 100644 --- a/src/tools/pcommandbatch/pcommandbatch.c +++ b/src/tools/pcommandbatch/pcommandbatch.c @@ -166,6 +166,8 @@ int get_running_server_port_(const struct Context_* ctx, cJSON* state_dict = cJSON_Parse(buf); if (!state_dict) { // An un-parseable state file is not a recoverable error; go down hard. + // State files are written and then moved into place so we should never + // see something like a half-written file. fprintf(stderr, "Fatal Error: pcommandbatch client %s_%d (pid %d):" " failed to parse state file value of size %zu.\n", From 650572af74e7f69c902d6321d56a903669a4ecad Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 15:00:39 -0700 Subject: [PATCH 31/44] more tidying --- .efrocachemap | 32 ++++++++++++++++---------------- tools/batools/staging.py | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 730c42ad..6f51a69f 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4069,18 +4069,18 @@ "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "d2d222177bb3a60c46921f556b52ad06", "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "b1d01b76bcf92ebc144df17c9b5fcc07", "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "8d9848fbfdd81c1b32ce1f431203e2b9", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "c13611d184f7e28a308fccd3c6d588ec", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "5e2dd187f69557ef546b9361cecda199", "build/prefab/full/mac_arm64_gui/release/ballisticakit": "e6c72fb374b823a92786861f01adc733", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "d49b1502afb8b5b0cf637b9a747ceac1", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "aca0400a32de3484178c4c93a9b430e5", "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "6be79f8695e63d7dadc8ff37756cc440", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "fd8d6fbf26fc4a0c5281592ffb269b24", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "e578d0dc38ffec38e8cb7b9893caaf10", "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "824bac953cbe94f1f5a5bc714cc139a0", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "742b39504ef5c131c522eb05e90fa74a", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "7909565c7d5a006f2fdd2bced6cca2ba", "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "64dd34b2fedb26c9890c509d1bc81531", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "bf6d6ba41aed2754e5d117d26bcb6ade", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "5f3bb008b61b202ea0489af5f98ba3f4", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "4630254e61ba1d96bd21bad6bb43e8de", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "23cabd019c189e91169847ec955d0f4e", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "df7d4ca2e5e1112c467635ce90bbb198", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "3790fd6da37a7f3e2d263121ca52609f", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "dd8e29d218b374975e7981a4ef9510f1", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "bbe238d97fcc1ddb0d4a094ce3affc04", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "56d6440f62c271c4ce9ef520400395a3", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", @@ -4097,14 +4097,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "fbdc80e41c5883b4a893d2f0786e377f", "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "07d115ab0d47755999f6098c3f6d206a", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "0636b89a49c2fc2f1bc5de4203b0fa90", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "74578fa80a57562691c5dee92664db53", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "9f58c205a10905661ef22a8c42920b38", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "52cfa9591860a8ff3686215b5cca83bb", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "676ff6599a561d0803e96d8a82bf44e2", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "cf1906db75ee05decb729f32926f5377", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "c62f2c7c7786c01bcb6f21faeb5ec2ca", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "1dfca87081151b7e5a06442214253dd5", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "b940b29384c69fd72a36b850d169c026", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "bb66949717079167eec996e90ef69585", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "46fcd10d6fea36f51f61d6a11ea94e16", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "12ae5b092aef3ea1770586f8f5d34a00", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "374d9852e5489ece98043ee62fff9b4b", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "ef51d5e45ebb0d53da0bb1f901f03129", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "e796ef2416394cd133bb5f52f8e0f6a2", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "b611c090513a21e2fe90e56582724e9d", "src/ballistica/base/mgen/pyembed/binding_base.inc": "72bfed2cce8ff19741989dec28302f3f", diff --git a/tools/batools/staging.py b/tools/batools/staging.py index 983d81f3..20b92523 100755 --- a/tools/batools/staging.py +++ b/tools/batools/staging.py @@ -74,8 +74,8 @@ class AssetStager: self._parse_args(args) print( - f'{Clr.BLU}Staging {Clr.MAG}{Clr.BLD}{self.desc}{Clr.RST}' - f'{Clr.BLU} build in {Clr.MAG}{Clr.BLD}{self.dst}' + f'{Clr.BLU}Staging for {Clr.MAG}{Clr.BLD}{self.desc}{Clr.RST}' + f'{Clr.BLU} at {Clr.MAG}{Clr.BLD}{self.dst}' f'{Clr.RST}{Clr.BLU}...{Clr.RST}' ) From c7140928c5f2712eceb93376e5273fc0ce1ffcfb Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 15:52:19 -0700 Subject: [PATCH 32/44] Latest public/internal sync. --- .efrocachemap | 24 +++++++++---------- .../python/bascenev1lib/actor/playerspaz.py | 5 ++-- .../ba_data/python/bauiv1lib/colorpicker.py | 13 +++++----- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 6f51a69f..682549c6 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4077,10 +4077,10 @@ "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "824bac953cbe94f1f5a5bc714cc139a0", "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "7909565c7d5a006f2fdd2bced6cca2ba", "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "64dd34b2fedb26c9890c509d1bc81531", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "df7d4ca2e5e1112c467635ce90bbb198", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "3790fd6da37a7f3e2d263121ca52609f", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "dd8e29d218b374975e7981a4ef9510f1", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "bbe238d97fcc1ddb0d4a094ce3affc04", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "81715033a6c84ed74f466039ab9ab20c", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "b66e192c7612a44c9cdc3db0e4e14f20", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "376c6de8f7e59cfbecdb5c56a001f290", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "d883162ad60ccc023148fc98fef64e42", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "56d6440f62c271c4ce9ef520400395a3", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", @@ -4097,14 +4097,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "fbdc80e41c5883b4a893d2f0786e377f", "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "1dfca87081151b7e5a06442214253dd5", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "b940b29384c69fd72a36b850d169c026", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "bb66949717079167eec996e90ef69585", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "46fcd10d6fea36f51f61d6a11ea94e16", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "12ae5b092aef3ea1770586f8f5d34a00", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "374d9852e5489ece98043ee62fff9b4b", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "ef51d5e45ebb0d53da0bb1f901f03129", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "e796ef2416394cd133bb5f52f8e0f6a2", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "ceaca4c52ec11ea05a726d0f61c6c2ef", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "67c820bcbc296e3806504a0c26a3d251", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "ad2ee8752e52ba99f5c8bdf8e8fd368c", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "9cd95ef02c5fbe4d7c397899f88e0d46", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "202e5d5c0711310a91836f041177c8a4", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "1ad97b1a5fdff1de4f0fb4be70cf4584", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "767f1b629915507ef4b70f5afcc7a305", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "8021df36d1dccf0ee46eb7d7399ff1ca", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "b611c090513a21e2fe90e56582724e9d", "src/ballistica/base/mgen/pyembed/binding_base.inc": "72bfed2cce8ff19741989dec28302f3f", diff --git a/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py b/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py index fabfd2ef..683469f9 100644 --- a/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py +++ b/src/assets/ba_data/python/bascenev1lib/actor/playerspaz.py @@ -232,9 +232,8 @@ class PlayerSpaz(Spaz): ) # Leaving the game doesn't count as a kill *unless* # someone does it intentionally while being attacked. - left_game_cleanly = ( - msg.how is bs.DeathType.LEFT_GAME - and not (was_held or was_attacked_recently) + left_game_cleanly = msg.how is bs.DeathType.LEFT_GAME and not ( + was_held or was_attacked_recently ) killed = not (msg.immediate or left_game_cleanly) diff --git a/src/assets/ba_data/python/bauiv1lib/colorpicker.py b/src/assets/ba_data/python/bauiv1lib/colorpicker.py index e138a954..38dc64e6 100644 --- a/src/assets/ba_data/python/bauiv1lib/colorpicker.py +++ b/src/assets/ba_data/python/bauiv1lib/colorpicker.py @@ -321,7 +321,7 @@ class ColorPickerExact(PopupWindow): hexcolor = hex_to_color(hextext) if len(hexcolor) == 4: r, g, b, a = hexcolor - del a # unused + del a # unused else: r, g, b = hexcolor # Replace the color! @@ -426,14 +426,15 @@ def hex_to_color(hex_color: str) -> tuple: (int.from_bytes(bytes.fromhex(hex_color[0:2]))), (int.from_bytes(bytes.fromhex(hex_color[2:4]))), (int.from_bytes(bytes.fromhex(hex_color[4:6]))), - (int.from_bytes(bytes.fromhex(hex_color[6:8]))) - if hexlength == 8 - else None, + ( + (int.from_bytes(bytes.fromhex(hex_color[6:8]))) + if hexlength == 8 + else None + ), ) # Divide all numbers by 255 and return. nr, ng, nb, na = ( - x / 255 if x is not None - else None for x in (ar, ag, ab, aa) + x / 255 if x is not None else None for x in (ar, ag, ab, aa) ) return (nr, ng, nb, na) if aa is not None else (nr, ng, nb) From b329d8621c18d4cbe37b92f02e059224d3482751 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 16:27:17 -0700 Subject: [PATCH 33/44] clayStroke asset and polishing --- .efrocachemap | 4 ++++ Makefile | 2 +- src/assets/.asset_manifest_private.json | 4 ++++ src/assets/Makefile | 4 ++++ src/assets/ba_data/python/bauiv1lib/colorpicker.py | 1 + 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.efrocachemap b/.efrocachemap index 682549c6..bfc4d47e 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -1368,6 +1368,10 @@ "build/assets/ba_data/textures/circleZigZag.pvr": "4b300a401102daa24755c1d156e81ada", "build/assets/ba_data/textures/circleZigZag_preview.png": "409fa44a6f89bc745240ec3107042b49", "build/assets/ba_data/textures/circle_preview.png": "84b94c4bf16e27e9483fe683e4e2f5f7", + "build/assets/ba_data/textures/clayStroke.dds": "1ae7ab8d1e212aca724f7313f1b57e61", + "build/assets/ba_data/textures/clayStroke.ktx": "8c648180e290a4acfff1196fa358f042", + "build/assets/ba_data/textures/clayStroke.pvr": "84c31a1a8ab4ea051a5b6a804dd952df", + "build/assets/ba_data/textures/clayStroke_preview.png": "ec248139546f51c007148ef0250a5e0c", "build/assets/ba_data/textures/coin.dds": "e69e7ba8ff87d5ed9ca7c7ab96d13546", "build/assets/ba_data/textures/coin.ktx": "d1de4b2fd4fe028b889ed53a829f9a72", "build/assets/ba_data/textures/coin.pvr": "b8477ed7afdc5e460843e4d8413a2c08", diff --git a/Makefile b/Makefile index 70526b24..75f3f9a9 100644 --- a/Makefile +++ b/Makefile @@ -151,7 +151,7 @@ meta-clean: # few things such as localconfig.json). clean: $(CHECK_CLEAN_SAFETY) - rm -rf build # Kill build ourself; may confuse git if contains other repos. + rm -rf build # Kill this ourself; can confuse git if contains other repos. git clean -dfx $(ROOT_CLEAN_IGNORES) # Show what clean would delete without actually deleting it. diff --git a/src/assets/.asset_manifest_private.json b/src/assets/.asset_manifest_private.json index e7849bc5..e467eb04 100644 --- a/src/assets/.asset_manifest_private.json +++ b/src/assets/.asset_manifest_private.json @@ -1389,6 +1389,10 @@ "ba_data/textures/circleZigZag.pvr", "ba_data/textures/circleZigZag_preview.png", "ba_data/textures/circle_preview.png", + "ba_data/textures/clayStroke.dds", + "ba_data/textures/clayStroke.ktx", + "ba_data/textures/clayStroke.pvr", + "ba_data/textures/clayStroke_preview.png", "ba_data/textures/coin.dds", "ba_data/textures/coin.ktx", "ba_data/textures/coin.pvr", diff --git a/src/assets/Makefile b/src/assets/Makefile index 51abad50..54e13697 100644 --- a/src/assets/Makefile +++ b/src/assets/Makefile @@ -5697,6 +5697,7 @@ TEX2D_DDS_TARGETS = \ $(BUILD_DIR)/ba_data/textures/circleOutlineNoAlpha.dds \ $(BUILD_DIR)/ba_data/textures/circleShadow.dds \ $(BUILD_DIR)/ba_data/textures/circleZigZag.dds \ + $(BUILD_DIR)/ba_data/textures/clayStroke.dds \ $(BUILD_DIR)/ba_data/textures/coin.dds \ $(BUILD_DIR)/ba_data/textures/controllerIcon.dds \ $(BUILD_DIR)/ba_data/textures/courtyardLevelColor.dds \ @@ -6101,6 +6102,7 @@ TEX2D_PVR_TARGETS = \ $(BUILD_DIR)/ba_data/textures/circleOutlineNoAlpha.pvr \ $(BUILD_DIR)/ba_data/textures/circleShadow.pvr \ $(BUILD_DIR)/ba_data/textures/circleZigZag.pvr \ + $(BUILD_DIR)/ba_data/textures/clayStroke.pvr \ $(BUILD_DIR)/ba_data/textures/coin.pvr \ $(BUILD_DIR)/ba_data/textures/controllerIcon.pvr \ $(BUILD_DIR)/ba_data/textures/courtyardLevelColor.pvr \ @@ -6505,6 +6507,7 @@ TEX2D_KTX_TARGETS = \ $(BUILD_DIR)/ba_data/textures/circleOutlineNoAlpha.ktx \ $(BUILD_DIR)/ba_data/textures/circleShadow.ktx \ $(BUILD_DIR)/ba_data/textures/circleZigZag.ktx \ + $(BUILD_DIR)/ba_data/textures/clayStroke.ktx \ $(BUILD_DIR)/ba_data/textures/coin.ktx \ $(BUILD_DIR)/ba_data/textures/controllerIcon.ktx \ $(BUILD_DIR)/ba_data/textures/courtyardLevelColor.ktx \ @@ -6909,6 +6912,7 @@ TEX2D_PREVIEW_PNG_TARGETS = \ $(BUILD_DIR)/ba_data/textures/circleShadow_preview.png \ $(BUILD_DIR)/ba_data/textures/circleZigZag_preview.png \ $(BUILD_DIR)/ba_data/textures/circle_preview.png \ + $(BUILD_DIR)/ba_data/textures/clayStroke_preview.png \ $(BUILD_DIR)/ba_data/textures/coin_preview.png \ $(BUILD_DIR)/ba_data/textures/controllerIcon_preview.png \ $(BUILD_DIR)/ba_data/textures/courtyardLevelColor_preview.png \ diff --git a/src/assets/ba_data/python/bauiv1lib/colorpicker.py b/src/assets/ba_data/python/bauiv1lib/colorpicker.py index 38dc64e6..8d6fcd71 100644 --- a/src/assets/ba_data/python/bauiv1lib/colorpicker.py +++ b/src/assets/ba_data/python/bauiv1lib/colorpicker.py @@ -248,6 +248,7 @@ class ColorPickerExact(PopupWindow): maxwidth=70, allow_clear_button=False, force_internal_editing=True, + glow_type='uniform', ) x = 50 From 631f18df8f3bd22c6b69c3a2897831b895023e49 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 16:41:31 -0700 Subject: [PATCH 34/44] language updates --- .efrocachemap | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index bfc4d47e..681b3267 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -421,7 +421,7 @@ "build/assets/ba_data/audio/zoeOw.ogg": "74befe45a8417e95b6a2233c51992a26", "build/assets/ba_data/audio/zoePickup01.ogg": "48ab8cddfcde36a750856f3f81dd20c8", "build/assets/ba_data/audio/zoeScream01.ogg": "2b468aedfa8741090247f04eb9e6df55", - "build/assets/ba_data/data/langdata.json": "8409781047f46ca6627eacdfc0b4d3d3", + "build/assets/ba_data/data/langdata.json": "cf29f3a59b3e7a9bd487c6e1b424e981", "build/assets/ba_data/data/languages/arabic.json": "2c2915e10124bb8f69206da9c608d57c", "build/assets/ba_data/data/languages/belarussian.json": "09954e550d13d3d9cb5a635a1d32a151", "build/assets/ba_data/data/languages/chinese.json": "bb51b5aa614830c561e8fe2542a9ab8a", @@ -432,7 +432,7 @@ "build/assets/ba_data/data/languages/dutch.json": "b0900d572c9141897d53d6574c471343", "build/assets/ba_data/data/languages/english.json": "0a95fdbc1564161bc7c8b419b0c03651", "build/assets/ba_data/data/languages/esperanto.json": "0e397cfa5f3fb8cef5f4a64f21cda880", - "build/assets/ba_data/data/languages/filipino.json": "5226bf247fa1c8f4406360644f3fa15f", + "build/assets/ba_data/data/languages/filipino.json": "bf97444c655cb831735b2378edf2273b", "build/assets/ba_data/data/languages/french.json": "917e4174d6f0eb7f00c27fd79cfbb924", "build/assets/ba_data/data/languages/german.json": "450fa41ae264f29a5d1af22143d0d0ad", "build/assets/ba_data/data/languages/gibberish.json": "5533873020e51186beb2f209adbbfb08", @@ -440,21 +440,21 @@ "build/assets/ba_data/data/languages/hindi.json": "90f54663e15d85a163f1848a8e9d8d07", "build/assets/ba_data/data/languages/hungarian.json": "796a290a8c44a1e7635208c2ff5fdc6e", "build/assets/ba_data/data/languages/indonesian.json": "9103845242b572aa8ba48e24f81ddb68", - "build/assets/ba_data/data/languages/italian.json": "55c350f8f5039802138ffc1013f14ed3", + "build/assets/ba_data/data/languages/italian.json": "6653a2c84646914064f41442aca23d4d", "build/assets/ba_data/data/languages/korean.json": "4e3524327a0174250aff5e1ef4c0c597", "build/assets/ba_data/data/languages/malay.json": "f6ce0426d03a62612e3e436ed5d1be1f", - "build/assets/ba_data/data/languages/persian.json": "07eddcf92d3dcc7a745ea74e2b0007c8", + "build/assets/ba_data/data/languages/persian.json": "835ea1d84ec197972f7ca3adb945fb88", "build/assets/ba_data/data/languages/polish.json": "9d22c6643c097c4cb268d0d6b6319cd4", "build/assets/ba_data/data/languages/portuguese.json": "a48df1d11a088a1a2e6e3f66627444be", "build/assets/ba_data/data/languages/romanian.json": "b3e46efd6f869dbd78014570e037c290", - "build/assets/ba_data/data/languages/russian.json": "0590f49889616b5279be569dea926e17", + "build/assets/ba_data/data/languages/russian.json": "876b41939ee19f81327f4af3500de55a", "build/assets/ba_data/data/languages/serbian.json": "d7452dd72ac0e51680cb39b5ebaa1c69", "build/assets/ba_data/data/languages/slovak.json": "c00fb27cf982ffad5a4370ad3b16bd21", - "build/assets/ba_data/data/languages/spanish.json": "b2edb923fdca973a16f0efb1acc26a97", + "build/assets/ba_data/data/languages/spanish.json": "04ac00160550266f6a0e05e6fcd66d37", "build/assets/ba_data/data/languages/swedish.json": "5142a96597d17d8344be96a603da64ac", "build/assets/ba_data/data/languages/tamil.json": "b9fcc523639f55e05c7f4e7914f3321a", "build/assets/ba_data/data/languages/thai.json": "1d665629361f302693dead39de8fa945", - "build/assets/ba_data/data/languages/turkish.json": "db71f3776072b7a15ef37b1bb1245795", + "build/assets/ba_data/data/languages/turkish.json": "23f1204a85c94e9336fba04ef33f9d18", "build/assets/ba_data/data/languages/ukrainian.json": "3d75d21205c82db34fb1a1b014592747", "build/assets/ba_data/data/languages/venetian.json": "035034e0b4de696a41bf753ab4d0e194", "build/assets/ba_data/data/languages/vietnamese.json": "921cd1e50f60fe3e101f246e172750ba", From 163502869b349cf1ed779751a7c157fb7fd04bb5 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 17:15:41 -0700 Subject: [PATCH 35/44] filled in modding tools translations --- .efrocachemap | 46 +++++++++---------- CHANGELOG.md | 2 +- src/assets/ba_data/python/baenv.py | 2 +- .../python/bauiv1lib/settings/moddingtools.py | 17 ++++--- src/ballistica/shared/ballistica.cc | 2 +- 5 files changed, 36 insertions(+), 33 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 681b3267..8293cb2e 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -421,7 +421,7 @@ "build/assets/ba_data/audio/zoeOw.ogg": "74befe45a8417e95b6a2233c51992a26", "build/assets/ba_data/audio/zoePickup01.ogg": "48ab8cddfcde36a750856f3f81dd20c8", "build/assets/ba_data/audio/zoeScream01.ogg": "2b468aedfa8741090247f04eb9e6df55", - "build/assets/ba_data/data/langdata.json": "cf29f3a59b3e7a9bd487c6e1b424e981", + "build/assets/ba_data/data/langdata.json": "be5167b2e025e7542934a7fd2f9549ea", "build/assets/ba_data/data/languages/arabic.json": "2c2915e10124bb8f69206da9c608d57c", "build/assets/ba_data/data/languages/belarussian.json": "09954e550d13d3d9cb5a635a1d32a151", "build/assets/ba_data/data/languages/chinese.json": "bb51b5aa614830c561e8fe2542a9ab8a", @@ -430,12 +430,12 @@ "build/assets/ba_data/data/languages/czech.json": "15be4fd59895135bad0265f79b362d5b", "build/assets/ba_data/data/languages/danish.json": "8e57db30c5250df2abff14a822f83ea7", "build/assets/ba_data/data/languages/dutch.json": "b0900d572c9141897d53d6574c471343", - "build/assets/ba_data/data/languages/english.json": "0a95fdbc1564161bc7c8b419b0c03651", + "build/assets/ba_data/data/languages/english.json": "48fe4c6f97b07420238244309b54a61e", "build/assets/ba_data/data/languages/esperanto.json": "0e397cfa5f3fb8cef5f4a64f21cda880", "build/assets/ba_data/data/languages/filipino.json": "bf97444c655cb831735b2378edf2273b", "build/assets/ba_data/data/languages/french.json": "917e4174d6f0eb7f00c27fd79cfbb924", "build/assets/ba_data/data/languages/german.json": "450fa41ae264f29a5d1af22143d0d0ad", - "build/assets/ba_data/data/languages/gibberish.json": "5533873020e51186beb2f209adbbfb08", + "build/assets/ba_data/data/languages/gibberish.json": "a1afce99249645003017ebec50e716fe", "build/assets/ba_data/data/languages/greek.json": "287c0ec437b38772284ef9d3e4fb2fc3", "build/assets/ba_data/data/languages/hindi.json": "90f54663e15d85a163f1848a8e9d8d07", "build/assets/ba_data/data/languages/hungarian.json": "796a290a8c44a1e7635208c2ff5fdc6e", @@ -4065,26 +4065,26 @@ "build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1", "build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "93a99cb9461e8c506c5605f9c63dce2d", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "54ceb7e159839e7f8c7959a5d71335da", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "fe821168d2dbd6e10acd3bdf70ab61af", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "cce6d43ddec6691d8f43e3561ff299b6", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "38f68382d5f31c1295f796c3766c9426", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "d2d222177bb3a60c46921f556b52ad06", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "b1d01b76bcf92ebc144df17c9b5fcc07", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "8d9848fbfdd81c1b32ce1f431203e2b9", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "5e2dd187f69557ef546b9361cecda199", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "e6c72fb374b823a92786861f01adc733", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "aca0400a32de3484178c4c93a9b430e5", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "6be79f8695e63d7dadc8ff37756cc440", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "e578d0dc38ffec38e8cb7b9893caaf10", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "824bac953cbe94f1f5a5bc714cc139a0", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "7909565c7d5a006f2fdd2bced6cca2ba", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "64dd34b2fedb26c9890c509d1bc81531", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "81715033a6c84ed74f466039ab9ab20c", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "b66e192c7612a44c9cdc3db0e4e14f20", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "376c6de8f7e59cfbecdb5c56a001f290", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "d883162ad60ccc023148fc98fef64e42", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "bc6f8e147e6b4e454309c0bf12fc5a2c", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "8a9af839c16aab4858977db6f1f49959", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "680f20eb7196eb5af1e5e0c02d2dc3f1", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "4dce976ca972e5372cfdbf6900241b13", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "1ef0d2ce6c640d5392df29b30eb7abb9", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "05e772df81a412b7ddd6f4f42d873c29", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "7534d0ad2beed76f4b8695ad59dd90bd", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "b5533d585420379f8a4f2ec22279f6cb", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "f8eb314eabf9db196c4e7cff63c72b47", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "62c35652f620e34f0c320978eb591f72", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "69a80b3a49384b77cac2b9ef8258b0ee", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "d4b1ec67c1439828c312dcede83809aa", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "67dc0b11058a7b7cf6208ea795c1da03", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "288acd2edde294904897b3d2bcc94d88", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "5ad834d84fcb860149b096340613d929", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "7d9b9c9161bf742e3b832c2e100c767e", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "343e5068337826107d40eaef36e81fa5", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "fd2c882d037f5c7212d5d08e3dacafa3", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "bb9b884d82488f051a785406d8dbf5c9", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "02d92886285684a19c5cf59e66b8f3b3", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "56d6440f62c271c4ce9ef520400395a3", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", diff --git a/CHANGELOG.md b/CHANGELOG.md index c37acbcb..62bbd495 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.33 (build 21788, api 8, 2024-03-14) +### 1.7.33 (build 21790, api 8, 2024-03-14) - Stress test input-devices are now a bit smarter; they won't press any buttons while UIs are up (this could cause lots of chaos if it happened). - Added a 'Show Demos When Idle' option in advanced settings. If enabled, the diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index e795bb6e..091a6d5f 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -52,7 +52,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21788 +TARGET_BALLISTICA_BUILD = 21790 TARGET_BALLISTICA_VERSION = '1.7.33' diff --git a/src/assets/ba_data/python/bauiv1lib/settings/moddingtools.py b/src/assets/ba_data/python/bauiv1lib/settings/moddingtools.py index a4307360..fffb6e3b 100644 --- a/src/assets/ba_data/python/bauiv1lib/settings/moddingtools.py +++ b/src/assets/ba_data/python/bauiv1lib/settings/moddingtools.py @@ -92,7 +92,7 @@ class ModdingToolsWindow(bui.Window): parent=self._root_widget, position=(0, self._height - 52), size=(self._width, 25), - text=bui.Lstr(resource='moddingToolsTitleText'), + text=bui.Lstr(resource='settingsWindowAdvanced.moddingToolsText'), color=app.ui_v1.title_color, h_align='center', v_align='top', @@ -131,7 +131,7 @@ class ModdingToolsWindow(bui.Window): position=(self._sub_width / 2 - this_button_width / 2, v - 10), size=(this_button_width, 60), autoselect=True, - label=bui.Lstr(resource='createUserSystemScriptsText'), + label=bui.Lstr(resource='userSystemScriptsCreateText'), text_scale=1.0, on_activate_call=babase.modutils.create_user_system_scripts, ) @@ -142,7 +142,7 @@ class ModdingToolsWindow(bui.Window): position=(self._sub_width / 2 - this_button_width / 2, v - 10), size=(this_button_width, 60), autoselect=True, - label=bui.Lstr(resource='deleteUserSystemScriptsText'), + label=bui.Lstr(resource='userSystemScriptsDeleteText'), text_scale=1.0, on_activate_call=lambda: ConfirmWindow( action=babase.modutils.delete_user_system_scripts, @@ -154,7 +154,10 @@ class ModdingToolsWindow(bui.Window): parent=self._subcontainer, position=(170, v + 10), size=(0, 0), - text=bui.Lstr(value='UI SIZE :'), + text=bui.Lstr( + value='$(S) :', + subs=[('$(S)', bui.Lstr(resource='uiScaleText'))], + ), color=app.ui_v1.title_color, h_align='center', v_align='center', @@ -172,9 +175,9 @@ class ModdingToolsWindow(bui.Window): ], choices_display=[ bui.Lstr(resource='autoText'), - bui.Lstr(resource='smallText'), - bui.Lstr(resource='mediumText'), - bui.Lstr(resource='largeText'), + bui.Lstr(resource='sizeSmallText'), + bui.Lstr(resource='sizeMediumText'), + bui.Lstr(resource='sizeLargeText'), ], current_choice=app.config.get('UI Scale', 'auto'), on_value_change_call=self._set_uiscale, diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 2956724a..f10f058e 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21788; +const int kEngineBuildNumber = 21790; const char* kEngineVersion = "1.7.33"; const int kEngineApiVersion = 8; From 0d00b75d1846f31898070c3d897c721679236bcc Mon Sep 17 00:00:00 2001 From: 3alTemp Date: Thu, 14 Mar 2024 19:08:07 -0600 Subject: [PATCH 36/44] Configo --- .../python/bauiv1lib/tournamententry.py | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/src/assets/ba_data/python/bauiv1lib/tournamententry.py b/src/assets/ba_data/python/bauiv1lib/tournamententry.py index f3a5197e..7c7a1206 100644 --- a/src/assets/ba_data/python/bauiv1lib/tournamententry.py +++ b/src/assets/ba_data/python/bauiv1lib/tournamententry.py @@ -87,7 +87,10 @@ class TournamentEntryWindow(PopupWindow): # Show the practice button as long as we're not # restarting while on a paid tournament run. - self._do_practice = self._tournament_activity is None + self._do_practice = ( + self._tournament_activity is None and + bui.app.config.get('tournament_practice_enabled', False) + ) off_p = 0 if not self._do_practice else 48 self._height += off_p * 0.933 @@ -259,6 +262,7 @@ class TournamentEntryWindow(PopupWindow): btn_size = (150, 45) btn_pos = (self._width / 2 - btn_size[0] / 2, self._width / 2 - 110) + self._practice_button = None if self._do_practice: self._practice_button = bui.buttonwidget( parent=self.root_widget, @@ -621,22 +625,8 @@ class TournamentEntryWindow(PopupWindow): 'tournament_id': self._tournament_id, 'submit_score': not practice, }, - ) - if bui.app.classic is not None - else None, - 1.0, - lambda: ( - bui.app.classic.launch_coop_game( - self._tournament_info['game'], - args={ - 'min_players': self._tournament_info['minPlayers'], - 'max_players': self._tournament_info['maxPlayers'], - 'tournament_id': self._tournament_id, - }, - ) - if bui.app.classic is not None - else None - ), + ) if bui.app.classic is not None + else None ) bui.apptimer(0 if practice else 1.25, self._transition_out) From dd72021067d5ee785267f84c0fcc620659e103cc Mon Sep 17 00:00:00 2001 From: 3alTemp Date: Thu, 14 Mar 2024 19:49:22 -0600 Subject: [PATCH 37/44] Profile Icon tweak --- .../python/bauiv1lib/profile/browser.py | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/assets/ba_data/python/bauiv1lib/profile/browser.py b/src/assets/ba_data/python/bauiv1lib/profile/browser.py index ef9db117..35fa866d 100644 --- a/src/assets/ba_data/python/bauiv1lib/profile/browser.py +++ b/src/assets/ba_data/python/bauiv1lib/profile/browser.py @@ -417,24 +417,11 @@ class ProfileBrowserWindow(bui.Window): char_index = spazzes.index('Spaz') assert isinstance(tval, str) - character = bui.buttonwidget( - parent=self._subcontainer, - position=(0, y_val), - size=(28, 28), - label='', - color=(1, 1, 1), - mask_texture=bui.gettexture('characterIconMask'), - tint_color=color, - tint2_color=_highlight, - texture=icon_textures[char_index], - tint_texture=icon_tint_textures[char_index], - selectable=False, - ) txtw = bui.textwidget( parent=self._subcontainer, - position=(35, y_val), + position=(5, y_val), size=((self._width - 210) / scl, 28), - text=bui.Lstr(value=tval), + text=bui.Lstr(value=f' {tval}'), h_align='left', v_align='center', on_select_call=bui.WeakCall(self._select, p_name, index), @@ -445,6 +432,17 @@ class ProfileBrowserWindow(bui.Window): on_activate_call=bui.Call(self._edit_button.activate), selectable=True, ) + character = bui.imagewidget( + parent=self._subcontainer, + position=(0, y_val), + size=(30, 30), + color=(1, 1, 1), + mask_texture=bui.gettexture('characterIconMask'), + tint_color=color, + tint2_color=_highlight, + texture=icon_textures[char_index], + tint_texture=icon_tint_textures[char_index], + ) if index == 0: bui.widget(edit=txtw, up_widget=self._back_button) if self._selected_profile is None: From b30fdbb2255b597a970cc9d707bab833aca7b12c Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 21:02:16 -0700 Subject: [PATCH 38/44] Latest public/internal sync. --- .../python/bauiv1lib/tournamententry.py | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/assets/ba_data/python/bauiv1lib/tournamententry.py b/src/assets/ba_data/python/bauiv1lib/tournamententry.py index 7c7a1206..2c81ca7c 100644 --- a/src/assets/ba_data/python/bauiv1lib/tournamententry.py +++ b/src/assets/ba_data/python/bauiv1lib/tournamententry.py @@ -88,8 +88,8 @@ class TournamentEntryWindow(PopupWindow): # Show the practice button as long as we're not # restarting while on a paid tournament run. self._do_practice = ( - self._tournament_activity is None and - bui.app.config.get('tournament_practice_enabled', False) + self._tournament_activity is None + and bui.app.config.get('tournament_practice_enabled', False) ) off_p = 0 if not self._do_practice else 48 @@ -617,16 +617,19 @@ class TournamentEntryWindow(PopupWindow): ) bui.apptimer( 0 if practice else 1.0, - lambda: bui.app.classic.launch_coop_game( - self._tournament_info['game'], - args={ - 'min_players': self._tournament_info['minPlayers'], - 'max_players': self._tournament_info['maxPlayers'], - 'tournament_id': self._tournament_id, - 'submit_score': not practice, - }, - ) if bui.app.classic is not None - else None + lambda: ( + bui.app.classic.launch_coop_game( + self._tournament_info['game'], + args={ + 'min_players': self._tournament_info['minPlayers'], + 'max_players': self._tournament_info['maxPlayers'], + 'tournament_id': self._tournament_id, + 'submit_score': not practice, + }, + ) + if bui.app.classic is not None + else None + ), ) bui.apptimer(0 if practice else 1.25, self._transition_out) From 768384b6c38c542fc1ab0caf431bfa1f38fd170d Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 15 Mar 2024 08:40:53 -0700 Subject: [PATCH 39/44] lang updates --- .efrocachemap | 66 +++++++++---------- CHANGELOG.md | 27 +++++--- src/assets/ba_data/python/baenv.py | 2 +- src/assets/ba_data/python/bauiv1lib/popup.py | 15 +++-- .../python/bauiv1lib/settings/gamepad.py | 25 ++++--- .../python/bauiv1lib/settings/keyboard.py | 21 ++++-- src/ballistica/shared/ballistica.cc | 2 +- 7 files changed, 90 insertions(+), 68 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 8293cb2e..66fcb59f 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -421,7 +421,7 @@ "build/assets/ba_data/audio/zoeOw.ogg": "74befe45a8417e95b6a2233c51992a26", "build/assets/ba_data/audio/zoePickup01.ogg": "48ab8cddfcde36a750856f3f81dd20c8", "build/assets/ba_data/audio/zoeScream01.ogg": "2b468aedfa8741090247f04eb9e6df55", - "build/assets/ba_data/data/langdata.json": "be5167b2e025e7542934a7fd2f9549ea", + "build/assets/ba_data/data/langdata.json": "10df7f9f3de205aefdba9c1cfd11333b", "build/assets/ba_data/data/languages/arabic.json": "2c2915e10124bb8f69206da9c608d57c", "build/assets/ba_data/data/languages/belarussian.json": "09954e550d13d3d9cb5a635a1d32a151", "build/assets/ba_data/data/languages/chinese.json": "bb51b5aa614830c561e8fe2542a9ab8a", @@ -432,7 +432,7 @@ "build/assets/ba_data/data/languages/dutch.json": "b0900d572c9141897d53d6574c471343", "build/assets/ba_data/data/languages/english.json": "48fe4c6f97b07420238244309b54a61e", "build/assets/ba_data/data/languages/esperanto.json": "0e397cfa5f3fb8cef5f4a64f21cda880", - "build/assets/ba_data/data/languages/filipino.json": "bf97444c655cb831735b2378edf2273b", + "build/assets/ba_data/data/languages/filipino.json": "d2c943fda759269563d871ea99fe76f8", "build/assets/ba_data/data/languages/french.json": "917e4174d6f0eb7f00c27fd79cfbb924", "build/assets/ba_data/data/languages/german.json": "450fa41ae264f29a5d1af22143d0d0ad", "build/assets/ba_data/data/languages/gibberish.json": "a1afce99249645003017ebec50e716fe", @@ -447,14 +447,14 @@ "build/assets/ba_data/data/languages/polish.json": "9d22c6643c097c4cb268d0d6b6319cd4", "build/assets/ba_data/data/languages/portuguese.json": "a48df1d11a088a1a2e6e3f66627444be", "build/assets/ba_data/data/languages/romanian.json": "b3e46efd6f869dbd78014570e037c290", - "build/assets/ba_data/data/languages/russian.json": "876b41939ee19f81327f4af3500de55a", + "build/assets/ba_data/data/languages/russian.json": "3efaaf5eac320fceef029501dec4109b", "build/assets/ba_data/data/languages/serbian.json": "d7452dd72ac0e51680cb39b5ebaa1c69", "build/assets/ba_data/data/languages/slovak.json": "c00fb27cf982ffad5a4370ad3b16bd21", - "build/assets/ba_data/data/languages/spanish.json": "04ac00160550266f6a0e05e6fcd66d37", + "build/assets/ba_data/data/languages/spanish.json": "a15adbfeb16be4a956e34b2515b60f10", "build/assets/ba_data/data/languages/swedish.json": "5142a96597d17d8344be96a603da64ac", "build/assets/ba_data/data/languages/tamil.json": "b9fcc523639f55e05c7f4e7914f3321a", "build/assets/ba_data/data/languages/thai.json": "1d665629361f302693dead39de8fa945", - "build/assets/ba_data/data/languages/turkish.json": "23f1204a85c94e9336fba04ef33f9d18", + "build/assets/ba_data/data/languages/turkish.json": "fcd90d63b5d3eae3eda5e94174008327", "build/assets/ba_data/data/languages/ukrainian.json": "3d75d21205c82db34fb1a1b014592747", "build/assets/ba_data/data/languages/venetian.json": "035034e0b4de696a41bf753ab4d0e194", "build/assets/ba_data/data/languages/vietnamese.json": "921cd1e50f60fe3e101f246e172750ba", @@ -4065,26 +4065,26 @@ "build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1", "build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "bc6f8e147e6b4e454309c0bf12fc5a2c", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "8a9af839c16aab4858977db6f1f49959", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "680f20eb7196eb5af1e5e0c02d2dc3f1", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "4dce976ca972e5372cfdbf6900241b13", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "1ef0d2ce6c640d5392df29b30eb7abb9", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "05e772df81a412b7ddd6f4f42d873c29", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "7534d0ad2beed76f4b8695ad59dd90bd", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "b5533d585420379f8a4f2ec22279f6cb", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "f8eb314eabf9db196c4e7cff63c72b47", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "62c35652f620e34f0c320978eb591f72", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "69a80b3a49384b77cac2b9ef8258b0ee", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "d4b1ec67c1439828c312dcede83809aa", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "67dc0b11058a7b7cf6208ea795c1da03", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "288acd2edde294904897b3d2bcc94d88", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "5ad834d84fcb860149b096340613d929", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "7d9b9c9161bf742e3b832c2e100c767e", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "343e5068337826107d40eaef36e81fa5", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "fd2c882d037f5c7212d5d08e3dacafa3", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "bb9b884d82488f051a785406d8dbf5c9", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "02d92886285684a19c5cf59e66b8f3b3", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "149d743d83a18e084cfbf58a84adb228", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "3fb406b63a8a0482e7a0e57c049752de", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "caf02452afe4e65975c7f9535b27683a", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "4bf0689c2cbbe41addaf0520ae857191", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "c9deccfc0bab6d7e75b21ef207426baf", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "0ccb34d6b0e586e56c06bf8c90742cc4", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "88dedfaea0f64ab39602180c9429b70b", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "efe59f8c0cc76591f61543df51b8d7ed", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "ac0191461830e5e01e30e676a3956a43", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "c7a2d46627fd4975bfd5d761e740aacf", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "1ec024ac773380ef606eaa5d434253ce", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "903b31f9272e4aecb2f76c6cf124d1db", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "f1c73d1b269912872fb1f2628b4855c2", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "b0f2002c5f7ae9b8bf0f4fe35e605c3a", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "f7d53e20544ade5352449182995b8b41", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "d5f348b8e877c332c3220b5c54401132", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "f2ae19e4d4b79b5974a4d8d60b8fe63b", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "551f4be9d132d1d4c9bae000dbc919e6", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "58e8e7f12acfd1859029acc9c241d134", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "0784650e667aee169eabf93de2df93db", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "56d6440f62c271c4ce9ef520400395a3", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", @@ -4101,14 +4101,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "fbdc80e41c5883b4a893d2f0786e377f", "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "ceaca4c52ec11ea05a726d0f61c6c2ef", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "67c820bcbc296e3806504a0c26a3d251", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "ad2ee8752e52ba99f5c8bdf8e8fd368c", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "9cd95ef02c5fbe4d7c397899f88e0d46", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "202e5d5c0711310a91836f041177c8a4", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "1ad97b1a5fdff1de4f0fb4be70cf4584", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "767f1b629915507ef4b70f5afcc7a305", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "8021df36d1dccf0ee46eb7d7399ff1ca", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "199c8650599d295ca799b29e0bb4c7e7", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "bc136717d320ca791624141b3a246483", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "09113b8b33af70c34c3f980e3cc8581d", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "483ab966856762e946dfc04e635630d9", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "f1702ea6d5b6bae2b77e5a3184b1d417", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "47c9475678346309d9abe9cf78b4ab13", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "85e2286dbde53af296f02859f08cdc1a", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "80c5e2d583ce36bca136be488aa06a0c", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "b611c090513a21e2fe90e56582724e9d", "src/ballistica/base/mgen/pyembed/binding_base.inc": "72bfed2cce8ff19741989dec28302f3f", diff --git a/CHANGELOG.md b/CHANGELOG.md index 62bbd495..0894d2d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.33 (build 21790, api 8, 2024-03-14) +### 1.7.33 (build 21793, api 8, 2024-03-15) - Stress test input-devices are now a bit smarter; they won't press any buttons while UIs are up (this could cause lots of chaos if it happened). - Added a 'Show Demos When Idle' option in advanced settings. If enabled, the @@ -49,18 +49,27 @@ - Cleaned up builds when running under WSL. Things like `make mypy` should now work correctly there, and it should now be possible to build and run either Linux or Windows builds there. +- Added an `allow_clear_button` arg to bauiv1.textwidget() which can be used to + disable the 'X' button that clears editable text widgets. ### 1.7.32 (build 21741, api 8, 2023-12-20) - Fixed a screen message that no one will ever see (Thanks vishal332008?...) -- Plugins window now displays 'No Plugins Installed' when no plugins are present (Thanks vishal332008!) -- Old messages are now displayed as soon as you press 'Unmute Chat' (Thanks vishal332008!) +- Plugins window now displays 'No Plugins Installed' when no plugins are present + (Thanks vishal332008!) +- Old messages are now displayed as soon as you press 'Unmute Chat' (Thanks + vishal332008!) - Added an 'Add to Favorites' entry to the party menu (Thanks vishal332008!) -- Now displays 'No Parties Added' in favorites tab if no favorites are present (Thanks vishal332008!) +- Now displays 'No Parties Added' in favorites tab if no favorites are present + (Thanks vishal332008!) - Now shows character icons in the profiles list window (Thanks vishal332008!) -- Added a Random button for names in the Player Profiles window (Thanks vishal332008!) -- Fixed a bug where no server is selected by default in the favorites tab (Thanks vishal332008!) -- Fixed a bug where no replay is selected by default in the watch tab (Thanks vishal332008!) -- Fixed a bug where no profile is selected by default in the profile tab (Thanks vishal332008!) +- Added a Random button for names in the Player Profiles window (Thanks + vishal332008!) +- Fixed a bug where no server is selected by default in the favorites tab + (Thanks vishal332008!) +- Fixed a bug where no replay is selected by default in the watch tab (Thanks + vishal332008!) +- Fixed a bug where no profile is selected by default in the profile tab (Thanks + vishal332008!) - Fixed a number of UI screens so that ugly window edges are no longer visible in corners on modern ultra wide phone displays. - Added a `player_rejoin_cooldown` server config option. This defaults to 10 @@ -75,8 +84,6 @@ cleanly however (an `on_app_active_changed()` call in the `AppMode` class). This means that it also applies to other platforms when the app reaches the 'inactive' state; for instance when minimizing the window on the SDL build. -- Added an `allow_clear_button` arg to bauiv1.textwidget() which can be used to - disable the 'X' button that clears editable text widgets. ### 1.7.31 (build 21727, api 8, 2023-12-17) - Added `bascenev1.get_connection_to_host_info_2()` which is an improved diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 091a6d5f..1761c831 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -52,7 +52,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21790 +TARGET_BALLISTICA_BUILD = 21793 TARGET_BALLISTICA_VERSION = '1.7.33' diff --git a/src/assets/ba_data/python/bauiv1lib/popup.py b/src/assets/ba_data/python/bauiv1lib/popup.py index 89e7b4c2..7d53e789 100644 --- a/src/assets/ba_data/python/bauiv1lib/popup.py +++ b/src/assets/ba_data/python/bauiv1lib/popup.py @@ -129,8 +129,8 @@ class PopupMenuWindow(PopupWindow): if choices_display is None: choices_display = [] - # FIXME: For the moment we base our width on these strings so - # we need to flatten them. + # FIXME: For the moment we base our width on these strings so we + # need to flatten them. choices_display_fin: list[str] = [] for choice_display in choices_display: choices_display_fin.append(choice_display.evaluate()) @@ -154,9 +154,9 @@ class PopupMenuWindow(PopupWindow): else: self._height = 20 + len(choices) * 33 self._use_scroll = False - self._delegate = None # don't want this stuff called just yet.. + self._delegate = None # Don't want this stuff called just yet. - # extend width to fit our longest string (or our max-width) + # Extend width to fit our longest string (or our max-width). for index, choice in enumerate(choices): if len(choices_display_fin) == len(choices): choice_display_name = choices_display_fin[index] @@ -185,8 +185,8 @@ class PopupMenuWindow(PopupWindow): + 60, ) - # init parent class - this will rescale and reposition things as - # needed and create our root widget + # Init parent class - this will rescale and reposition things as + # needed and create our root widget. super().__init__( position, size=(self._width, self._height), scale=self._scale ) @@ -205,7 +205,7 @@ class PopupMenuWindow(PopupWindow): else: self._offset_widget = bui.containerwidget( parent=self.root_widget, - position=(30, 15), + position=(12, 12), size=(self._width - 40, self._height), background=False, ) @@ -238,6 +238,7 @@ class PopupMenuWindow(PopupWindow): on_activate_call=self._activate, v_align='center', selectable=(not inactive), + glow_type='uniform', ) if choice == self._current_choice: bui.containerwidget( diff --git a/src/assets/ba_data/python/bauiv1lib/settings/gamepad.py b/src/assets/ba_data/python/bauiv1lib/settings/gamepad.py index 11cee8d3..a525c80f 100644 --- a/src/assets/ba_data/python/bauiv1lib/settings/gamepad.py +++ b/src/assets/ba_data/python/bauiv1lib/settings/gamepad.py @@ -812,15 +812,22 @@ class GamepadSettingsWindow(bui.Window): from bauiv1lib.confirm import ConfirmWindow assert bui.app.classic is not None - ConfirmWindow( - # TODO: Implement a translation string for this! - 'Are you sure you want to reset your button mapping?\n' - 'This will also reset your advanced mappings\n' - 'and secondary controller button mappings.', - self._do_reset, - width=490, - height=150, - ) + + # efro note: I think it's ok to reset without a confirm here + # because the user can see pretty clearly what changes and can + # cancel out of the settings window without saving if they want. + if bool(False): + ConfirmWindow( + # TODO: Implement a translation string for this! + 'Are you sure you want to reset your button mapping?\n' + 'This will also reset your advanced mappings\n' + 'and secondary controller button mappings.', + self._do_reset, + width=490, + height=150, + ) + else: + self._do_reset() def _do_reset(self) -> None: """Resets the input's mapping settings.""" diff --git a/src/assets/ba_data/python/bauiv1lib/settings/keyboard.py b/src/assets/ba_data/python/bauiv1lib/settings/keyboard.py index 4a254ded..47f72ce3 100644 --- a/src/assets/ba_data/python/bauiv1lib/settings/keyboard.py +++ b/src/assets/ba_data/python/bauiv1lib/settings/keyboard.py @@ -305,13 +305,20 @@ class ConfigKeyboardWindow(bui.Window): from bauiv1lib.confirm import ConfirmWindow assert bui.app.classic is not None - ConfirmWindow( - # TODO: Implement a translation string for this! - 'Are you sure you want to reset your button mapping?', - self._do_reset, - width=480, - height=95, - ) + + # efro note: I think it's ok to reset without a confirm here + # because the user can see pretty clearly what changes and can + # cancel out of the keyboard settings edit if they want. + if bool(False): + ConfirmWindow( + # TODO: Implement a translation string for this! + 'Are you sure you want to reset your button mapping?', + self._do_reset, + width=480, + height=95, + ) + else: + self._do_reset() def _do_reset(self) -> None: """Resets the input's mapping settings.""" diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index f10f058e..5996737a 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21790; +const int kEngineBuildNumber = 21793; const char* kEngineVersion = "1.7.33"; const int kEngineApiVersion = 8; From 5395e4b47d27856ad67766258e26df40b7675957 Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Fri, 15 Mar 2024 08:55:44 -0700 Subject: [PATCH 40/44] checking discord webhook --- src/ballistica/base/base.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ballistica/base/base.cc b/src/ballistica/base/base.cc index 26d61032..b61cdb23 100644 --- a/src/ballistica/base/base.cc +++ b/src/ballistica/base/base.cc @@ -125,7 +125,7 @@ void BaseFeatureSet::OnModuleExec(PyObject* module) { // they happen. g_core->python->EnablePythonLoggingCalls(); - // Marker we pop down at the very end so other modules can run sanity + // A marker we pop down at the very end so other modules can run sanity // checks to make sure we aren't importing them reciprocally when they // import us. Python::MarkReachedEndOfModule(module); From cf200bb2b04501d064d7eb62dfd2f768c644485c Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Fri, 15 Mar 2024 09:00:42 -0700 Subject: [PATCH 41/44] another webhook test --- src/ballistica/base/base.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ballistica/base/base.cc b/src/ballistica/base/base.cc index b61cdb23..0041f50a 100644 --- a/src/ballistica/base/base.cc +++ b/src/ballistica/base/base.cc @@ -246,8 +246,8 @@ void BaseFeatureSet::StartApp() { app_started_ = true; // As the last step of this phase, tell the logic thread to apply the app - // config which will kick off screen creation and otherwise get the ball - // rolling. + // config which will kick off screen creation and otherwise to get the + // ball rolling. { Python::ScopedInterpreterLock gil; python->objs().Get(BasePython::ObjID::kAppPushApplyAppConfigCall).Call(); From 7c983e83a6c340ced354a144eac7538413b0ff36 Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Fri, 15 Mar 2024 09:02:33 -0700 Subject: [PATCH 42/44] one more try --- src/ballistica/base/base.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ballistica/base/base.cc b/src/ballistica/base/base.cc index 0041f50a..a063ba13 100644 --- a/src/ballistica/base/base.cc +++ b/src/ballistica/base/base.cc @@ -246,7 +246,7 @@ void BaseFeatureSet::StartApp() { app_started_ = true; // As the last step of this phase, tell the logic thread to apply the app - // config which will kick off screen creation and otherwise to get the + // config which will kick off screen creation or otherwise to get the // ball rolling. { Python::ScopedInterpreterLock gil; From d9a20f616136d69eebfe301699eb46a6b2bc7fc0 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 15 Mar 2024 09:07:22 -0700 Subject: [PATCH 43/44] Latest public/internal sync. --- .efrocachemap | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 66fcb59f..4806e848 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4073,18 +4073,18 @@ "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "0ccb34d6b0e586e56c06bf8c90742cc4", "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "88dedfaea0f64ab39602180c9429b70b", "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "efe59f8c0cc76591f61543df51b8d7ed", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "ac0191461830e5e01e30e676a3956a43", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "8e9006c2565d7d1cea28f1876ff6e91c", "build/prefab/full/mac_arm64_gui/release/ballisticakit": "c7a2d46627fd4975bfd5d761e740aacf", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "1ec024ac773380ef606eaa5d434253ce", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "db46c7d9039414218a14946243768a31", "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "903b31f9272e4aecb2f76c6cf124d1db", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "f1c73d1b269912872fb1f2628b4855c2", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "54eebc899be16cee3d4c9debe9aba1af", "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "b0f2002c5f7ae9b8bf0f4fe35e605c3a", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "f7d53e20544ade5352449182995b8b41", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "648bb4c704e0ccb2993bfd33f72f6114", "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "d5f348b8e877c332c3220b5c54401132", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "f2ae19e4d4b79b5974a4d8d60b8fe63b", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "551f4be9d132d1d4c9bae000dbc919e6", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "58e8e7f12acfd1859029acc9c241d134", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "0784650e667aee169eabf93de2df93db", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "faa3604445246c6502c2f4d830952dfe", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "31fc0a8608d86d34cef0ca4925ea2169", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "3cb5ca8654dc223d5eae0f85427b8984", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "a7213b62ea170e748745ded4526cb996", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "56d6440f62c271c4ce9ef520400395a3", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", From f6f95263a15d59b1881037f12bb2ef386317f6c7 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 15 Mar 2024 13:49:00 -0700 Subject: [PATCH 44/44] fix spurious CTF flag_return_touches log errors --- .efrocachemap | 42 +++++++++---------- CHANGELOG.md | 2 +- src/assets/ba_data/python/baenv.py | 2 +- .../bascenev1lib/game/capturetheflag.py | 35 +++++++++------- src/ballistica/shared/ballistica.cc | 2 +- 5 files changed, 45 insertions(+), 38 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 4806e848..7bf3ed9d 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -421,7 +421,7 @@ "build/assets/ba_data/audio/zoeOw.ogg": "74befe45a8417e95b6a2233c51992a26", "build/assets/ba_data/audio/zoePickup01.ogg": "48ab8cddfcde36a750856f3f81dd20c8", "build/assets/ba_data/audio/zoeScream01.ogg": "2b468aedfa8741090247f04eb9e6df55", - "build/assets/ba_data/data/langdata.json": "10df7f9f3de205aefdba9c1cfd11333b", + "build/assets/ba_data/data/langdata.json": "5e534cd5bb06b149a9ee4713e8d75577", "build/assets/ba_data/data/languages/arabic.json": "2c2915e10124bb8f69206da9c608d57c", "build/assets/ba_data/data/languages/belarussian.json": "09954e550d13d3d9cb5a635a1d32a151", "build/assets/ba_data/data/languages/chinese.json": "bb51b5aa614830c561e8fe2542a9ab8a", @@ -4065,26 +4065,26 @@ "build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1", "build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "149d743d83a18e084cfbf58a84adb228", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "3fb406b63a8a0482e7a0e57c049752de", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "caf02452afe4e65975c7f9535b27683a", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "4bf0689c2cbbe41addaf0520ae857191", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "c9deccfc0bab6d7e75b21ef207426baf", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "0ccb34d6b0e586e56c06bf8c90742cc4", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "88dedfaea0f64ab39602180c9429b70b", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "efe59f8c0cc76591f61543df51b8d7ed", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "8e9006c2565d7d1cea28f1876ff6e91c", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "c7a2d46627fd4975bfd5d761e740aacf", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "db46c7d9039414218a14946243768a31", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "903b31f9272e4aecb2f76c6cf124d1db", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "54eebc899be16cee3d4c9debe9aba1af", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "b0f2002c5f7ae9b8bf0f4fe35e605c3a", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "648bb4c704e0ccb2993bfd33f72f6114", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "d5f348b8e877c332c3220b5c54401132", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "faa3604445246c6502c2f4d830952dfe", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "31fc0a8608d86d34cef0ca4925ea2169", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "3cb5ca8654dc223d5eae0f85427b8984", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "a7213b62ea170e748745ded4526cb996", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "aff4f4ed3c7632315212878c9bfd41db", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "c5b8a89455932e54784830c3320b5547", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "ffb96514e1f56af56ec8423fa7dff9d2", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "8ddbc4c0bf72f21cae20b97112c998f8", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "2aef304e97b7a7a6efb0422150395b3b", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "365a17b83735ac688f273bf458962bf4", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "b8a56ad0bc13aa39e557304c4b15c06f", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "8a194395a2d25232e02397a09816e818", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "5a3993e59d989f58d3ed3100b97f63e0", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "63efabd180e84a3cd8d44f427671ad79", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "d2525592bc459b41ecc915e65058e828", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "d5d8c6df24d117ff48dcbd4a1b934fc3", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "06c837822168039b0cbdbb63a5bb4bd3", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "90b4a005c41d482c3e51c7da9ab306ee", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "05a62ba9e4d8dc91de80cbeb18d44622", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "49b0b163e779691643720b44f44563d2", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "cfed19e557d4dd7ab7a1c92039bef8ca", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "4670e91666540dbcc2909e9f8de3a2d5", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "58048dc1ad1f1329f35c3948040db414", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "db60223aab0a714d626651109e20c6f1", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "56d6440f62c271c4ce9ef520400395a3", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9", diff --git a/CHANGELOG.md b/CHANGELOG.md index 0894d2d7..d35db0a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.33 (build 21793, api 8, 2024-03-15) +### 1.7.33 (build 21794, api 8, 2024-03-15) - Stress test input-devices are now a bit smarter; they won't press any buttons while UIs are up (this could cause lots of chaos if it happened). - Added a 'Show Demos When Idle' option in advanced settings. If enabled, the diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 1761c831..4b229133 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -52,7 +52,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21793 +TARGET_BALLISTICA_BUILD = 21794 TARGET_BALLISTICA_VERSION = '1.7.33' diff --git a/src/assets/ba_data/python/bascenev1lib/game/capturetheflag.py b/src/assets/ba_data/python/bascenev1lib/game/capturetheflag.py index 316483f9..0d6d1e4f 100644 --- a/src/assets/ba_data/python/bascenev1lib/game/capturetheflag.py +++ b/src/assets/ba_data/python/bascenev1lib/game/capturetheflag.py @@ -527,7 +527,7 @@ class CaptureTheFlagGame(bs.TeamGameActivity[Player, Team]): team.touch_return_timer = None team.touch_return_timer_ticking = None if team.flag_return_touches < 0: - logging.exception('CTF flag_return_touches < 0') + logging.error('CTF flag_return_touches < 0', stack_info=True) def _handle_death_flag_capture(self, player: Player) -> None: """Handles flag values when a player dies or leaves the game.""" @@ -536,22 +536,29 @@ class CaptureTheFlagGame(bs.TeamGameActivity[Player, Team]): return team = player.team - # For each "point" our player has touched theflag (Could be multiple), - # deduct one from both our player and - # the flag's return touches variable. + + # For each "point" our player has touched theflag (Could be + # multiple), deduct one from both our player and the flag's + # return touches variable. for _ in range(player.touching_own_flag): # Deduct player.touching_own_flag -= 1 - team.flag_return_touches -= 1 - # Update our flag's timer accordingly - # (Prevents immediate resets in case - # there might be more people touching it). - if team.flag_return_touches == 0: - team.touch_return_timer = None - team.touch_return_timer_ticking = None - # Safety check, just to be sure! - if team.flag_return_touches < 0: - logging.exception('CTF flag_return_touches < 0') + + # (This was only incremented if we have non-zero + # return-times). + if float(self.flag_touch_return_time) > 0.0: + team.flag_return_touches -= 1 + # Update our flag's timer accordingly + # (Prevents immediate resets in case + # there might be more people touching it). + if team.flag_return_touches == 0: + team.touch_return_timer = None + team.touch_return_timer_ticking = None + # Safety check, just to be sure! + if team.flag_return_touches < 0: + logging.error( + 'CTF flag_return_touches < 0', stack_info=True + ) def _flash_base(self, team: Team, length: float = 2.0) -> None: light = bs.newnode( diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 5996737a..3a9ce14d 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21793; +const int kEngineBuildNumber = 21794; const char* kEngineVersion = "1.7.33"; const int kEngineApiVersion = 8;