Skip to content

Commit

Permalink
Merge branch 'etternagame:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
TheROPFather authored Mar 3, 2024
2 parents d753ee4 + c9d7049 commit aad9652
Show file tree
Hide file tree
Showing 9,756 changed files with 723,338 additions and 393,957 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
25 changes: 20 additions & 5 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ jobs:
- name: Install homebrew packages
run: brew install cmake nasm ninja openssl

- name: Setup Python 2.7
uses: MatteoH2O1999/[email protected]
with:
python-version: '2.7'

- name: Setup Python 3
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Generate CMake
run: mkdir main/build && cd main/build && cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja ..

Expand Down Expand Up @@ -218,6 +228,11 @@ jobs:
echo "${{github.workspace}}/tools/win/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "ETTERNA_ARCH=${{matrix.cfg.name}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Setup Python 3
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Setup Python 2.7
uses: MatteoH2O1999/[email protected]
with:
Expand Down Expand Up @@ -261,16 +276,16 @@ jobs:
name: "Etterna - Windows ${{matrix.cfg.name}}"
path: '${{github.workspace}}/main/build/*.exe'

- name: Setup Python 3
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Generate Symbols
run: |
echo "Dumping Symbols..."
dump_syms.exe main/Program/Etterna.pdb > ${{github.workspace}}/main/Etterna.sym
- name: Setup Python 3
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Prepare symbols for action artifacts
run: cd main && python ${{github.workspace}}/main/.ci/prepare_symbols.py

Expand Down
55 changes: 31 additions & 24 deletions CMake/Helpers/CPackSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@ set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/CMake/CPack/license_instal
set(CPACK_COMPONENT_ETTERNA_REQUIRED TRUE) # Require Etterna component to be installed

# Custom Variables
set(INSTALL_DIR "Etterna")
set(INSTALL_DIR "Etterna" CACHE STRING "Output directory for built game")
set(ASSET_DIR "${INSTALL_DIR}" CACHE STRING "Output directory for game assets")

if(UNIX)
set(CPACK_GENERATOR TGZ)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "")
set(CPACK_PACKAGE_CONTACT https://github.com/etternagame/etterna)

install(TARGETS Etterna COMPONENT Etterna DESTINATION ${INSTALL_DIR})
install(FILES ${PROJECT_BINARY_DIR}/gn_crashpad/crashpad_handler
COMPONENT Etterna
DESTINATION ${INSTALL_DIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE)
if(WITH_CRASHPAD AND TARGET crashpad)
install(FILES ${PROJECT_BINARY_DIR}/gn_crashpad/crashpad_handler
COMPONENT Etterna
DESTINATION ${INSTALL_DIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE)
endif()
endif()

# Windows Specific CPack
Expand Down Expand Up @@ -47,8 +50,10 @@ if(WIN32)

# List every DLL etterna needs.
list(APPEND WIN_DLLS "${PROJECT_SOURCE_DIR}/Program/avcodec-55.dll" "${PROJECT_SOURCE_DIR}/Program/avformat-55.dll"
"${PROJECT_SOURCE_DIR}/Program/avutil-52.dll" "${PROJECT_SOURCE_DIR}/Program/swscale-2.dll"
${PROJECT_BINARY_DIR}/gn_crashpad/crashpad_handler.exe)
"${PROJECT_SOURCE_DIR}/Program/avutil-52.dll" "${PROJECT_SOURCE_DIR}/Program/swscale-2.dll")
if(WITH_CRASHPAD AND TARGET crashpad)
list(APPEND WIN_DLLS ${PROJECT_BINARY_DIR}/gn_crashpad/crashpad_handler.exe)
endif()
install(FILES ${WIN_DLLS} COMPONENT Etterna DESTINATION Program)
install(TARGETS Etterna COMPONENT Etterna DESTINATION Program)
install(FILES CMake/CPack/license_install.txt COMPONENT Etterna DESTINATION Docs)
Expand All @@ -60,24 +65,26 @@ elseif(APPLE)
set(CPACK_DMG_VOLUME_NAME Etterna)

install(TARGETS Etterna COMPONENT Etterna DESTINATION Etterna)
install(FILES ${PROJECT_BINARY_DIR}/gn_crashpad/crashpad_handler
COMPONENT Etterna DESTINATION ${INSTALL_DIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE)
if(WITH_CRASHPAD AND TARGET crashpad)
install(FILES ${PROJECT_BINARY_DIR}/gn_crashpad/crashpad_handler
COMPONENT Etterna DESTINATION ${INSTALL_DIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE)
endif()
endif()

# Universal Install Directories
## Files Only
install(FILES Songs/instructions.txt COMPONENT Etterna DESTINATION "${INSTALL_DIR}/Songs")
install(FILES Announcers/instructions.txt COMPONENT Etterna DESTINATION "${INSTALL_DIR}/Announcers")
install(FILES Songs/instructions.txt COMPONENT Etterna DESTINATION "${ASSET_DIR}/Songs")
install(FILES Announcers/instructions.txt COMPONENT Etterna DESTINATION "${ASSET_DIR}/Announcers")

## Essential Game Files
install(DIRECTORY Assets COMPONENT Etterna DESTINATION "${INSTALL_DIR}")
install(DIRECTORY BackgroundEffects COMPONENT Etterna DESTINATION "${INSTALL_DIR}")
install(DIRECTORY BackgroundTransitions COMPONENT Etterna DESTINATION "${INSTALL_DIR}")
install(DIRECTORY BGAnimations COMPONENT Etterna DESTINATION "${INSTALL_DIR}")
install(DIRECTORY Data COMPONENT Etterna DESTINATION "${INSTALL_DIR}")
install(DIRECTORY NoteSkins COMPONENT Etterna DESTINATION "${INSTALL_DIR}")
install(DIRECTORY Scripts COMPONENT Etterna DESTINATION "${INSTALL_DIR}")
install(DIRECTORY Themes COMPONENT Etterna DESTINATION "${INSTALL_DIR}")
install(DIRECTORY Assets COMPONENT Etterna DESTINATION "${ASSET_DIR}")
install(DIRECTORY BackgroundEffects COMPONENT Etterna DESTINATION "${ASSET_DIR}")
install(DIRECTORY BackgroundTransitions COMPONENT Etterna DESTINATION "${ASSET_DIR}")
install(DIRECTORY BGAnimations COMPONENT Etterna DESTINATION "${ASSET_DIR}")
install(DIRECTORY Data COMPONENT Etterna DESTINATION "${ASSET_DIR}")
install(DIRECTORY NoteSkins COMPONENT Etterna DESTINATION "${ASSET_DIR}")
install(DIRECTORY Scripts COMPONENT Etterna DESTINATION "${ASSET_DIR}")
install(DIRECTORY Themes COMPONENT Etterna DESTINATION "${ASSET_DIR}")
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ add_subdirectory(extern EXCLUDE_FROM_ALL) # EXCLUDE_FROM_ALL to exclude from cpa
target_link_libraries(Etterna PRIVATE SQLiteCpp sqlite3)
target_link_libraries(Etterna PRIVATE zlib)
target_link_libraries(Etterna PRIVATE rapidjson)
target_link_libraries(Etterna PRIVATE jwt-cpp)
target_link_libraries(Etterna PRIVATE websocketpp)
target_link_libraries(Etterna PRIVATE libluajit)
target_link_libraries(Etterna PRIVATE discord-rpc)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,9 @@ local modnames = {
--"rpos",
--"rpj",
"totpm",

"gstrea",
"gchstr",
"gbrack",

-- CalcPatternMods above this line
-- CalcDebugMisc mods meant for only the top graph:
Expand Down Expand Up @@ -1020,7 +1022,9 @@ local modColors = {
--color("1,1,1"), -- rpos
--color("1,1,1"), -- rpj
color("0.7,1,0"), -- lime = totalpatternmod

color("1,1,1"), -- genericstream
color("1,1,1"), -- genericchordstream
color("1,1,1"), -- genericbracketing

-- place CalcPatternMod Colors above this line
-- MISC MODS START HERE (same order as miscToUpperMods)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ local translations = {
NewPlaylist = THEME:GetString("ScreenSelectMusic Playlists", "NewPlaylist"),
AddCurrentChart = THEME:GetString("ScreenSelectMusic Playlists", "AddCurrentChart"),
Back = THEME:GetString("ScreenSelectMusic Playlists", "Back"),
UploadPlaylist = THEME:GetString("ScreenSelectMusic Playlists", "UploadPlaylist"),
DownloadPlaylist = THEME:GetString("ScreenSelectMusic Playlists", "DownloadPlaylist"),
DownloadMissingPlaylists = THEME:GetString("ScreenSelectMusic Playlists", "DownloadMissingPlaylists"),
}

-- playlist list sizing
Expand Down Expand Up @@ -825,11 +828,64 @@ local function playlistList()
else
-- adding new playlist
newPlaylistDialogue()
-- this will trigger the DisplayAll Message after success (also a Profile Save)
-- this will trigger the DisplayAllPlaylists Message after success (also a Profile Save)
-- this triggers nothing on failure
end
end,
},
{ -- Download missing playlists from online or download online playlist to replace local one
Name = "downloadplaylists",
Type = "Tap",
Display = {translations["DownloadMissingPlaylists"], translations["DownloadPlaylist"]},
IndexGetter = function()
if inPlaylistDetails then
return 2
else
return 1
end
end,
Condition = function()
if not DLMAN:IsLoggedIn() then return false end

if inPlaylistDetails then
if SONGMAN:GetActivePlaylist():GetName() == "Favorites" then
return false
end
end
return true
end,
TapFunction = function()
if inPlaylistDetails then
local pl = SONGMAN:GetActivePlaylist()
ms.ok("Downloading playlist '" .. pl:GetName() .. "' from online")
pl:DownloadOnline()
else
ms.ok("Downloading missing playlists from online")
DLMAN:DownloadMissingPlaylists()
end
end,
},
{ -- Upload the current playlist to online, replaces online playlist
Name = "uploadplaylist",
Type = "Tap",
Display = {translations["UploadPlaylist"]},
IndexGetter = function() return 1 end,
Condition = function()
if not DLMAN:IsLoggedIn() then return false end

if inPlaylistDetails then
if SONGMAN:GetActivePlaylist():GetName() == "Favorites" then
return false
end
end
return inPlaylistDetails
end,
TapFunction = function()
local pl = SONGMAN:GetActivePlaylist()
ms.ok("Uploading playlist '" .. pl:GetName() .. "' to online")
pl:UploadOnline()
end,
},
{ -- Exit the page that lets you see inside a playlist
Name = "back",
Type = "Tap",
Expand Down Expand Up @@ -866,6 +922,15 @@ local function playlistList()
ColorConfigUpdatedMessageCommand = function(self)
self:playcommand("UpdateText")
end,
LogOutMessageCommand = function(self)
self:playcommand("UpdateText")
end,
LoginMessageCommand = function(self)
self:playcommand("UpdateText")
end,
LoginFailedMessageCommand = function(self)
self:playcommand("UpdateText")
end,
UpdateTextCommand = function(self)
local txt = self:GetChild("Text")
local bg = self:GetChild("BG")
Expand Down Expand Up @@ -983,7 +1048,7 @@ local function playlistList()
itemframe:diffusealpha(1)
self:GetChild("PageText"):diffusealpha(1)
end,
DisplayAllMessageCommand = function(self)
DisplayAllPlaylistsMessageCommand = function(self)
-- this should only trigger if a new playlist was successfully made
-- if not ... uhhh..... ???
updatePlaylists()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,9 @@ local t = Def.ActorFrame {
end
end
end,
DeletedCurrentSongMessageCommand = function(self)
self:playcommand("ReloadWheel")
end,
ReloadedCurrentPackMessageCommand = function(self)
self:playcommand("ReloadWheel")
end,
Expand Down
8 changes: 5 additions & 3 deletions Themes/Rebirth/BGAnimations/playerInfoFrame/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ local function beginLoginProcess(self)
off()

username = ""

-- this sets up 2 text entry windows to pull your username and pass
-- if you press escape or just enter nothing, you are forced out
-- input redirects are controlled here because we want to be careful not to break any prior redirects
Expand Down Expand Up @@ -666,8 +666,10 @@ t[#t+1] = Def.ActorFrame {
end

local ctrl = INPUTFILTER:IsControlPressed()
local char = event.charNoModifiers:upper()
local char2 = event.char:upper()
-- login logout shortcut
if ctrl and event.DeviceInput.button == "DeviceButton_l" then
if ctrl and (char == "L" or char2 == "L") then
if not DLMAN:IsLoggedIn() then
beginLoginProcess(self)
else
Expand Down Expand Up @@ -1217,4 +1219,4 @@ if selectable("AssetSettings") then
t[#t+1] = LoadActor("assetsettings.lua")
end

return t
return t
3 changes: 3 additions & 0 deletions Themes/Rebirth/Languages/en.ini
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,9 @@ AverageMSD=Average MSD
NewPlaylist=New Playlist
AddCurrentChart=Add Current Chart
Back=Back
UploadPlaylist=Upload to EO
DownloadPlaylist=Download from EO
DownloadMissingPlaylists=Get Missing Playlists
[ScreenSelectMusic Profile]
SongsLoaded=songs loaded
Expand Down
11 changes: 10 additions & 1 deletion Themes/Rebirth/Scripts/01 player_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,17 @@ playerConfig.load = function(self, slot)
local x = create_setting("playerConfig", "playerConfig.lua", {}, -1)
x = x:load(slot)

local function allowedToRecursiveLoad()
local prof_dir = PROFILEMAN:GetProfileDir(slot)
if not prof_dir or prof_dir == "" then
Warn("Nice one. You tried to load a playerconfig when no profile was loaded.")
return false
end
return true
end

-- if settings were not present in /Save/LocalProfiles/ but are present in /Save/ then copy them over
if next(x) == nil and next(globalSettings) ~= nil then
if next(x) == nil and next(globalSettings) ~= nil and allowedToRecursiveLoad() then
-- should be safe to do this
-- this doesnt create a copy, but globalSettings should never be accessed anywhere anyways
print("Loaded PlayerConfig settings from global PlayerConfig")
Expand Down
Loading

0 comments on commit aad9652

Please sign in to comment.