Merge branch 'develop' into myk_title_launch

develop
Myk 2023-05-18 16:38:19 -07:00 committed by GitHub
commit d48f4844d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 69 additions and 69 deletions

@ -72,12 +72,6 @@ jobs:
# - name: Download DF # - name: Download DF
# run: | # run: |
# sh ci/download-df.sh # sh ci/download-df.sh
- name: Restore steam SDK
uses: actions/cache@v3
with:
path: depends/steam
key: steam-sdk-156
enableCrossOsArchive: true
- name: Configure DFHack - name: Configure DFHack
env: env:
CC: gcc-${{ matrix.gcc }} CC: gcc-${{ matrix.gcc }}

@ -32,6 +32,13 @@ jobs:
submodules: true submodules: true
fetch-depth: 0 fetch-depth: 0
ref: ${{ github.event.inputs.commit_hash }} ref: ${{ github.event.inputs.commit_hash }}
- name: Get 3rd party SDKs
uses: actions/checkout@v3
with:
repository: DFHack/3rdparty
ref: main
ssh-key: ${{ secrets.DFHACK_3RDPARTY_TOKEN }}
path: depends/steam
- name: Fetch ccache - name: Fetch ccache
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
@ -40,12 +47,6 @@ jobs:
restore-keys: | restore-keys: |
ccache-win64-cross-msvc-${{ github.event.inputs.commit_hash }} ccache-win64-cross-msvc-${{ github.event.inputs.commit_hash }}
ccache-win64-cross-msvc ccache-win64-cross-msvc
- name: Restore steam SDK
uses: actions/cache@v3
with:
path: depends/steam
key: steam-sdk-156
enableCrossOsArchive: true
- name: Cross-compile win64 artifacts - name: Cross-compile win64 artifacts
env: env:
CMAKE_EXTRA_ARGS: '-DBUILD_STONESENSE:BOOL=1 -DBUILD_DFLAUNCH:BOOL=1' CMAKE_EXTRA_ARGS: '-DBUILD_STONESENSE:BOOL=1 -DBUILD_DFLAUNCH:BOOL=1'

@ -192,8 +192,8 @@ endif()
# set up versioning. # set up versioning.
set(DF_VERSION "50.08") set(DF_VERSION "50.08")
set(DFHACK_RELEASE "r1") set(DFHACK_RELEASE "r2rc1")
set(DFHACK_PRERELEASE FALSE) set(DFHACK_PRERELEASE TRUE)
set(DFHACK_VERSION "${DF_VERSION}-${DFHACK_RELEASE}") set(DFHACK_VERSION "${DF_VERSION}-${DFHACK_RELEASE}")

@ -43,8 +43,8 @@ keybinding add Ctrl-C spotclean
# destroy the selected item # destroy the selected item
keybinding add Ctrl-K@dwarfmode autodump-destroy-item keybinding add Ctrl-K@dwarfmode autodump-destroy-item
# destroy items designated for dump in the selected tile # bring up the autodump UI
keybinding add Ctrl-H@dwarfmode autodump-destroy-here keybinding add Ctrl-H@dwarfmode gui/autodump
# apply blueprints to the map # apply blueprints to the map
keybinding add Ctrl-Shift-Q@dwarfmode gui/quickfort keybinding add Ctrl-Shift-Q@dwarfmode gui/quickfort

@ -56,6 +56,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
- Dreamfort: improve traffic patterns throughout the fortress (stockpiles and zones are still not working, pending updates in `quickfort`) - Dreamfort: improve traffic patterns throughout the fortress (stockpiles and zones are still not working, pending updates in `quickfort`)
- Core: For debugging purposes, you can now pass ``--disable-dfhack`` on the Dwarf Fortress commandline or specify ``DFHACK_DISABLE=1`` in the environment to disable DFHack for the current session. - Core: For debugging purposes, you can now pass ``--disable-dfhack`` on the Dwarf Fortress commandline or specify ``DFHACK_DISABLE=1`` in the environment to disable DFHack for the current session.
- `overlay`: added links to the quickstart guide and the control panel on the DF title screen - `overlay`: added links to the quickstart guide and the control panel on the DF title screen
- `gui/autodump`: fort-mode keybinding: Ctrl-H
## Documentation ## Documentation
@ -63,6 +64,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
## Lua ## Lua
- ``overlay.reload()``: has been renamed to ``overlay.rescan()`` so as not to conflict with the global ``reload()`` function. If you are developing an overlay, please take note of the new function name for reloading your overlay during development. - ``overlay.reload()``: has been renamed to ``overlay.rescan()`` so as not to conflict with the global ``reload()`` function. If you are developing an overlay, please take note of the new function name for reloading your overlay during development.
- ``gui``: changed frame naming scheme to ``FRAME_X`` rather than ``X_FRAME``, and added aliases for backwards compatibility. (for example ``BOLD_FRAME`` is now called ``FRAME_BOLD``)
## Removed ## Removed
- `orders`: ``library/military_include_artifact_materials`` library file removed since recent research indicates that platinum blunt weapons and silver crossbows are not more effective than standard steel. the alternate military orders file was also causing unneeded confusion. - `orders`: ``library/military_include_artifact_materials`` library file removed since recent research indicates that platinum blunt weapons and silver crossbows are not more effective than standard steel. the alternate military orders file was also causing unneeded confusion.

@ -4347,32 +4347,32 @@ A framed screen has the following attributes:
There are the following predefined frame style tables: There are the following predefined frame style tables:
* ``WINDOW_FRAME`` * ``FRAME_WINDOW``
A frame suitable for a draggable, optionally resizable window. A frame suitable for a draggable, optionally resizable window.
* ``PANEL_FRAME`` * ``FRAME_PANEL``
A frame suitable for a static (non-draggable, non-resizable) panel. A frame suitable for a static (non-draggable, non-resizable) panel.
* ``MEDIUM_FRAME`` * ``FRAME_MEDIUM``
A frame suitable for overlay widget panels. A frame suitable for overlay widget panels.
* ``BOLD_FRAME`` * ``FRAME_BOLD``
A frame suitable for a non-draggable panel meant to capture the user's focus, A frame suitable for a non-draggable panel meant to capture the user's focus,
like an important notification, confirmation dialog or error message. like an important notification, confirmation dialog or error message.
* ``INTERIOR_FRAME`` * ``FRAME_INTERIOR``
A frame suitable for light interior accent elements. This frame does *not* A frame suitable for light interior accent elements. This frame does *not*
have a visible ``DFHack`` signature on it, so it must not be used as the most have a visible ``DFHack`` signature on it, so it must not be used as the most
external frame for a DFHack-owned UI. external frame for a DFHack-owned UI.
* ``INTERIOR_MEDIUM_FRAME`` * ``FRAME_INTERIOR_MEDIUM``
A copy of ``MEDIUM_FRAME`` that lacks the ``DFHack`` signature. Suitable for A copy of ``FRAME_MEDIUM`` that lacks the ``DFHack`` signature. Suitable for
panels that are part of a larger widget cluster. Must *not* be used as the panels that are part of a larger widget cluster. Must *not* be used as the
most external frame for a DFHack-owned UI. most external frame for a DFHack-owned UI.

@ -923,17 +923,26 @@ local function make_frame(name, double_line)
return frame return frame
end end
WINDOW_FRAME = make_frame('Window', true) FRAME_WINDOW = make_frame('Window', true)
PANEL_FRAME = make_frame('Panel', false) FRAME_PANEL = make_frame('Panel', false)
MEDIUM_FRAME = make_frame('Medium', false) FRAME_MEDIUM = make_frame('Medium', false)
BOLD_FRAME = make_frame('Bold', true) FRAME_BOLD = make_frame('Bold', true)
INTERIOR_FRAME = make_frame('Thin', false) FRAME_INTERIOR = make_frame('Thin', false)
INTERIOR_FRAME.signature_pen = false FRAME_INTERIOR.signature_pen = false
INTERIOR_MEDIUM_FRAME = copyall(MEDIUM_FRAME) FRAME_INTERIOR_MEDIUM = copyall(FRAME_MEDIUM)
INTERIOR_MEDIUM_FRAME.signature_pen = false FRAME_INTERIOR_MEDIUM.signature_pen = false
-- for compatibility with pre-steam code -- for compatibility with pre-steam code
GREY_LINE_FRAME = WINDOW_FRAME GREY_LINE_FRAME = FRAME_PANEL
-- for compatibility with deprecated frame naming scheme
WINDOW_FRAME = FRAME_WINDOW
PANEL_FRAME = FRAME_PANEL
MEDIUM_FRAME = FRAME_MEDIUM
BOLD_FRAME = FRAME_BOLD
INTERIOR_FRAME = FRAME_INTERIOR
INTERIOR_MEDIUM_FRAME = FRAME_INTERIOR_MEDIUM
function paint_frame(dc,rect,style,title,inactive,pause_forced,resizable) function paint_frame(dc,rect,style,title,inactive,pause_forced,resizable)
local pen = style.frame_pen local pen = style.frame_pen
@ -942,8 +951,8 @@ function paint_frame(dc,rect,style,title,inactive,pause_forced,resizable)
dscreen.paintTile(style.rt_frame_pen or pen, x2, y1) dscreen.paintTile(style.rt_frame_pen or pen, x2, y1)
dscreen.paintTile(style.lb_frame_pen or pen, x1, y2) dscreen.paintTile(style.lb_frame_pen or pen, x1, y2)
local rb_frame_pen = style.rb_frame_pen local rb_frame_pen = style.rb_frame_pen
if rb_frame_pen == WINDOW_FRAME.rb_frame_pen and not resizable then if rb_frame_pen == FRAME_WINDOW.rb_frame_pen and not resizable then
rb_frame_pen = PANEL_FRAME.rb_frame_pen rb_frame_pen = FRAME_PANEL.rb_frame_pen
end end
dscreen.paintTile(rb_frame_pen or pen, x2, y2) dscreen.paintTile(rb_frame_pen or pen, x2, y2)
dscreen.fillRect(style.t_frame_pen or style.h_frame_pen or pen,x1+1,y1,x2-1,y1) dscreen.fillRect(style.t_frame_pen or style.h_frame_pen or pen,x1+1,y1,x2-1,y1)

@ -1,38 +1,32 @@
project(package_windows) project(package_windows)
if(WIN32) option(BUILD_DFLAUNCH "Whether to build the Steam launcher exectuable (requires Steam SDK)." OFF)
if (BUILD_DFLAUNCH)
if ((DEFINED ENV{steam_username}) AND (DEFINED ENV{steam_password})) if(WIN32 AND BUILD_DFLAUNCH)
# download Steam SDK # builder must manually download Steam SDK
set (STEAMAPI_DIR ${dfhack_SOURCE_DIR}/depends/steam) set (STEAMAPI_DIR ${dfhack_SOURCE_DIR}/depends/steam)
file(DOWNLOAD "https://partner.steamgames.com/downloads/steamworks_sdk_156.zip" set (STEAMAPI_VER 156)
${STEAMAPI_DIR}/steamworks_sdk_156.zip set (STEAMAPI_ZIP_EXPECTED_HASH af5a579990dbe5ae4c1b0689260d001b)
EXPECTED_HASH MD5=af5a579990dbe5ae4c1b0689260d001b set (STEAMSDK_ZIP ${STEAMAPI_DIR}/steamworks_sdk_${STEAMAPI_VER}.zip)
USERPWD $ENV{steam_username}:$ENV{steam_password}
STATUS STEAM_SDK_DOWNLOAD_STATUS set (STEAM_SDK_HASH "NOT FOUND")
SHOW_PROGRESS file(MD5 ${STEAMSDK_ZIP} STEAM_SDK_HASH)
) if (NOT (${STEAM_SDK_HASH} STREQUAL ${STEAMAPI_ZIP_EXPECTED_HASH}))
list(GET STEAM_SDK_DOWNLOAD_STATUS 0 STEAM_SDK_DL_STATUS_CODE) message(FATAL_ERROR "You need the Steamworks SDK at ${STEAMSDK_ZIP} to build launchdf.exe. Please disable the BUILD_DFLAUNCH CMake option or download the Steam SDK from: https://partner.steamgames.com/downloads/steamworks_sdk_${STEAMAPI_VER}.zip")
list(GET STEAM_SDK_DOWNLOAD_STATUS 1 STEAM_SDK_DL_ERROR_MESSAGE) endif()
if (NOT (${STEAM_SDK_DL_STATUS_CODE} EQUAL 0)) if (${STEAMSDK_ZIP} IS_NEWER_THAN ${STEAMAPI_DIR}/sdk)
message(FATAL_ERROR "Steam SDK download: " ${STEAM_SDK_DL_ERROR_MESSAGE})
else ()
message(STATUS "Steam SDK download: " ${STEAM_SDK_DL_ERROR_MESSAGE})
file(ARCHIVE_EXTRACT file(ARCHIVE_EXTRACT
INPUT ${STEAMAPI_DIR}/steamworks_sdk_156.zip INPUT ${STEAMSDK_ZIP}
DESTINATION ${STEAMAPI_DIR}) DESTINATION ${STEAMAPI_DIR})
endif()
set(STEAMAPI_LIBRARY "${STEAMAPI_DIR}/sdk/redistributable_bin/win64/steam_api64.lib") set(STEAMAPI_LIBRARY "${STEAMAPI_DIR}/sdk/redistributable_bin/win64/steam_api64.lib")
set(STEAMAPI_SOURCE_DIR "${STEAMAPI_DIR}/sdk/public/steam") set(STEAMAPI_SOURCE_DIR "${STEAMAPI_DIR}/sdk/public/steam")
set(STEAMAPI_SHARED_LIBRARY "${STEAMAPI_DIR}/sdk/redistributable_bin/win64/steam_api64.dll") set(STEAMAPI_SHARED_LIBRARY "${STEAMAPI_DIR}/sdk/redistributable_bin/win64/steam_api64.dll")
endif()
else()
message(SEND_ERROR "Need to set steam_username and steam_password in environment to download Steamworks SDK")
endif()
include_directories(${STEAMAPI_SOURCE_DIR}) include_directories(${STEAMAPI_SOURCE_DIR})
link_libraries(${STEAMAPI_LIBRARY}) link_libraries(${STEAMAPI_LIBRARY})
add_executable(launchdf WIN32 launchdf.cpp) add_executable(launchdf WIN32 launchdf.cpp)
install(TARGETS launchdf DESTINATION ${DFHACK_DATA_DESTINATION}) install(TARGETS launchdf DESTINATION ${DFHACK_DATA_DESTINATION})
install(FILES ${STEAMAPI_SHARED_LIBRARY} DESTINATION ${DFHACK_DATA_DESTINATION}) install(FILES ${STEAMAPI_SHARED_LIBRARY} DESTINATION ${DFHACK_DATA_DESTINATION})
endif()
endif() endif()

@ -40,7 +40,7 @@ function AutolaborOverlay:init()
end end
function AutolaborOverlay:render(dc) function AutolaborOverlay:render(dc)
if df.global.game_extra.external_flag ~= 1 then return end if df.global.game.external_flag ~= 1 then return end
AutolaborOverlay.super.render(self, dc) AutolaborOverlay.super.render(self, dc)
end end

@ -1 +1 @@
Subproject commit 2a646f9c7204253cae70bbfb5ed194182e0ac373 Subproject commit 0f02ade81771a7c24a4bbd6cfd7969704288f94b