Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

draft: Editor #38

Closed
wants to merge 158 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
b03fcfe
git why are you
ashifolfi Aug 14, 2022
53c24b8
hey look editor changes
ashifolfi Aug 14, 2022
a7764fa
Delete .DS_Store
ashifolfi Aug 14, 2022
8d05b9b
Delete .DS_Store
ashifolfi Aug 14, 2022
b7e1682
Delete .DS_Store
ashifolfi Aug 14, 2022
98b6678
Delete .DS_Store
ashifolfi Aug 14, 2022
6855275
Delete .DS_Store
ashifolfi Aug 14, 2022
ef76d53
Delete .DS_Store
ashifolfi Aug 14, 2022
81749ad
Delete .DS_Store
ashifolfi Aug 14, 2022
676af88
Delete .DS_Store
ashifolfi Aug 14, 2022
1db29f6
Delete .DS_Store
ashifolfi Aug 14, 2022
1029323
Delete .DS_Store
ashifolfi Aug 14, 2022
8ab5f66
Delete .DS_Store
ashifolfi Aug 14, 2022
cbaa2d6
Delete .DS_Store
ashifolfi Aug 14, 2022
4c1fd05
Delete .DS_Store
ashifolfi Aug 14, 2022
e503ff3
Delete .DS_Store
ashifolfi Aug 14, 2022
dd7e24f
change gitignore to include .ds_store
ashifolfi Aug 14, 2022
fb37bad
cleaning up the mess git left
ashifolfi Aug 14, 2022
e263a66
remove the last remaining ds_store
ashifolfi Aug 14, 2022
5732be5
Merge branch 'macos-support' of https://github.com/craftablescience/C…
ashifolfi Aug 14, 2022
c21b81f
Merge branch 'editor-extended' of https://github.com/craftablescience…
ashifolfi Aug 14, 2022
2c6c530
readd the gitignored files LMFAO
ashifolfi Aug 14, 2022
c7c475d
Merge branch 'macos-support' of https://github.com/craftablescience/C…
ashifolfi Aug 14, 2022
c25860d
work on engine view frame
ashifolfi Aug 14, 2022
94d47f1
fix: FramePanel properly renders contents
craftablescience Aug 14, 2022
1da344f
chore: update imgui submodule to have cmakelists.txt
craftablescience Aug 14, 2022
052c4a0
fix: missing includes
craftablescience Aug 14, 2022
8f8e806
fix a missing include
ashifolfi Aug 14, 2022
6133a34
fix: cannot add mesh to FramePanel in editor
craftablescience Aug 14, 2022
c5e0e1b
make tab bar always visible by default
ashifolfi Aug 14, 2022
0ecab3c
Add macOS action
ashifolfi Aug 14, 2022
0be0a27
swap .a for .dylib
ashifolfi Aug 14, 2022
fb0e64f
chore: bump steam binaries to v1.55
craftablescience Aug 14, 2022
3494646
feat: add steamworks capabilities on macOS
craftablescience Aug 14, 2022
12e0dca
progress on editor bundle
ashifolfi Aug 14, 2022
9025a97
fix some bugs. Bundle still crashes
ashifolfi Aug 14, 2022
32c2540
change some paths away from CWD
ashifolfi Aug 16, 2022
0f77c90
reenable chiratest (disabled to get past it's failing compile for a bit)
ashifolfi Aug 16, 2022
95267eb
Update .github/workflows/build_engine.yml
ashifolfi Aug 16, 2022
c00674f
Update engine_en.json
ashifolfi Aug 16, 2022
905543c
Update CMakeLists.txt
ashifolfi Aug 16, 2022
279a2fc
fix regression
ashifolfi Aug 16, 2022
9315e79
Merge branch 'macos-support' of https://github.com/craftablescience/C…
ashifolfi Aug 16, 2022
8d2d8ad
Merge pull request #34 from craftablescience/feat/mac-steamworks
ashifolfi Aug 16, 2022
dcc929e
WOOPS I BROKE CMAKELISTS LEMME FIX THAT
ashifolfi Aug 16, 2022
d0aae74
fix a few things
ashifolfi Aug 16, 2022
f00a039
redisable chiratest as it's currently very broken
ashifolfi Aug 16, 2022
49d65a9
ifdef an include to fix windows compiling
ashifolfi Aug 16, 2022
24f2a5f
account for app bundleification of ChiraEditor
ashifolfi Aug 16, 2022
38f19c3
hopefully fix windows compilation
ashifolfi Aug 16, 2022
d06df26
how the hell did I forget a ;
ashifolfi Aug 16, 2022
109f945
forgot one part of the readme
ashifolfi Aug 16, 2022
994f3d2
Merge branch 'macos-support' of https://github.com/craftablescience/C…
ashifolfi Aug 16, 2022
aedf821
disable appbundle for ease of testing
ashifolfi Aug 16, 2022
7459167
Begin work on resource browser
ashifolfi Aug 16, 2022
b4e8945
begin adding mesh support to resource browser
ashifolfi Aug 16, 2022
1758b0a
begin adding mesh support to resourcebrowser
ashifolfi Aug 16, 2022
ac4490b
actually add the changed resource browser files
ashifolfi Aug 16, 2022
ebb32a6
create engineview panel class
ashifolfi Aug 16, 2022
ad38f47
misc work on gui
ashifolfi Aug 16, 2022
3bc39a7
add new color scheme and hide main editor panel
ashifolfi Aug 16, 2022
541cd7b
Create header file for editor
ashifolfi Aug 16, 2022
0834f8a
Refactor bundle path grabbing
ashifolfi Aug 16, 2022
2dc3e41
remove user specific xcode project data
ashifolfi Aug 16, 2022
704f0cb
update gitignore to include xcode specific userdata
ashifolfi Aug 16, 2022
407b18c
Merge branch 'fuck-u-git' into editor-extended
ashifolfi Aug 16, 2022
4282d3a
whoops forgot to fix one of the merge conflicts
ashifolfi Aug 16, 2022
e12dbc4
begin reworking resource system
ashifolfi Aug 16, 2022
4c80894
it surfs directories but doesn't actually display the model it should…
ashifolfi Aug 16, 2022
0169d6e
oh my god look the resource browser can do mesh things now
ashifolfi Aug 18, 2022
fb667ad
Merge branch 'main' of https://github.com/craftablescience/ChiraEngin…
ashifolfi Aug 18, 2022
7ee3f19
clean up a few things
ashifolfi Aug 18, 2022
a8bafce
Better resource viewer + Script editor
ashifolfi Sep 27, 2022
05df03d
reenable discord rpc in macOS cmake config script
ashifolfi Sep 27, 2022
a5b79be
update discord submodule
ashifolfi Sep 28, 2022
9f8c90b
Merge branch 'main' of https://github.com/craftablescience/ChiraEngin…
ashifolfi Sep 28, 2022
97bab4e
fix unupdated render call
ashifolfi Sep 28, 2022
7727d4e
update submodules
ashifolfi Sep 28, 2022
fa33331
Properly merge main + FS/RB improvements
ashifolfi Sep 28, 2022
60de11c
remove whatever the hell that file was
ashifolfi Sep 28, 2022
3fbf161
more comments and some fixes
ashifolfi Sep 28, 2022
ebe2cce
one commit behind [lmao]
ashifolfi Oct 19, 2022
2245f36
fix resource browser + entity panel basics
Nov 3, 2022
cc3019b
ignore kdevelop files please
Nov 3, 2022
96deb08
entity renaming
ashifolfi Nov 4, 2022
eb85fa4
entity deletion
ashifolfi Nov 4, 2022
4796dbe
Merge branch 'main' of https://github.com/craftablescience/ChiraEngin…
Nov 4, 2022
c333da1
Merge branch 'editor-extended' of https://github.com/craftablescience…
Nov 4, 2022
713d017
WOOPS I ACCIDENTALLY COMITTED MERGE CONFLICTS
Nov 4, 2022
cc514bf
and I messed up a definition
Nov 4, 2022
176cd24
and this is why you don't blindly implement features with no testing
Nov 4, 2022
3f23469
decouple editorcamera from main engine + restrict engine view move tr…
Nov 4, 2022
cf13a49
fix camera not getting included properly in cmakelists
ashifolfi Nov 4, 2022
fd15f54
add 3d gizmo library to editor
ashifolfi Nov 4, 2022
d231a00
fix element renaming
ashifolfi Nov 12, 2022
5a0604a
Delete settings.json
ashifolfi Nov 12, 2022
61f1e7e
Delete launch.json
ashifolfi Nov 12, 2022
3146fcf
fix editor camera
ashifolfi Nov 28, 2022
7d19245
no idea what git is on but I assume it's line ending bs
ashifolfi Nov 28, 2022
fb3e4b1
oh my god there's more
ashifolfi Nov 28, 2022
5e9a9db
Add code to enable viewports LEAVE DISABLED
ashifolfi Nov 30, 2022
0619a7d
better colors + tools panel
ashifolfi Nov 30, 2022
a5f4bd4
improve entity panel appearance
ashifolfi Nov 30, 2022
9e16bca
add editor resource manager
ashifolfi Nov 30, 2022
1ffa603
add new view option to the resource browser
ashifolfi Nov 30, 2022
99fa88d
RESB - Replace menubar with toolbar
ashifolfi Dec 1, 2022
280b0db
Add font awesome 5 for imgui
ashifolfi Dec 1, 2022
52f6e20
Implement font awesome
ashifolfi Dec 1, 2022
2b0bb01
remove empty unused icon resource element
ashifolfi Dec 11, 2022
0141744
Begin implementing EditorPlugin
ashifolfi Dec 11, 2022
ea85cf0
add more base files for tools plugin system
ashifolfi Dec 11, 2022
294b8c2
remove another empty class
ashifolfi Dec 11, 2022
c31f3bd
remove editor panels
ashifolfi Dec 11, 2022
99eb43e
begin writing documentation on plugin system
ashifolfi Dec 11, 2022
fd9cec0
rearrange files into plugin folders
ashifolfi Dec 11, 2022
06faab1
more attempts to get fontawesome working
ashifolfi Dec 11, 2022
fe454c5
begin plugin conversion of scene editor
ashifolfi Dec 11, 2022
1e25816
model related code from Editor.cpp/h -> model editor
ashifolfi Dec 11, 2022
25bbcd0
Clean up Editor.cpp/h t only contain base editor ui code
ashifolfi Dec 11, 2022
8eeaf73
remove old panels from cmakelists + unused includes
ashifolfi Dec 11, 2022
1b9f03b
fix editorplugin
ashifolfi Dec 11, 2022
20fcc17
move editor target into it's own cmakelists for now
ashifolfi Dec 11, 2022
74b148c
move plugin docs to dedicated docs branch
ashifolfi Dec 11, 2022
5ed9839
add example plugin code
ashifolfi Dec 11, 2022
39eac59
implement basic AS based plugin system
ashifolfi Dec 19, 2022
04bd26b
working imgui panel in editor plugin
ashifolfi Dec 19, 2022
c399b5d
Implement about window + TP Credits + fix imEnd AS func
ashifolfi Dec 19, 2022
d541f32
Remove duplicate entry
ashifolfi Dec 19, 2022
a70840d
shift im wrapper funcs around
ashifolfi Dec 19, 2022
4de6a2d
remove unused cmakelists file
ashifolfi Dec 19, 2022
9781992
fix parameterless decl generation
ashifolfi Dec 20, 2022
1411632
hacky but functional visibility control
ashifolfi Dec 20, 2022
b0a0e71
feat: add formatting to log calls
craftablescience Dec 10, 2022
05ef811
fix: angelscript binding function for functions with no parameters or…
craftablescience Dec 20, 2022
605f44d
fix: forgot #pragma once somehow
craftablescience Dec 20, 2022
5bb6485
fix: don't make logging variables static
craftablescience Dec 20, 2022
6435a8a
feat: initial templatization of angelscript function calling for prim…
craftablescience Dec 21, 2022
cad804a
remove unused initial layout func
ashifolfi Dec 22, 2022
43c3905
use new callFunction in EditorPlugin
ashifolfi Dec 22, 2022
4ec1290
disable logs in ASH header for now
ashifolfi Dec 22, 2022
e2720b3
fix: improve how the resources folder is copied in cmake
craftablescience Dec 12, 2022
3a025c0
add protections to load + add unload
ashifolfi Dec 22, 2022
b51a141
Merge branch 'main' of https://github.com/craftablescience/ChiraEngin…
ashifolfi Dec 22, 2022
51bd97b
fix: double quote variables in shell scripts
ashifolfi Dec 22, 2022
de07cda
rename old tool code so codacy doesn't evaluate it
ashifolfi Dec 22, 2022
42a55c1
improve code quality
ashifolfi Dec 22, 2022
f84e16c
fix resource issues with editor cmakelists hopefully
ashifolfi Dec 22, 2022
d221df4
forgot #pragma once
ashifolfi Dec 22, 2022
3934a6c
forgot some files
ashifolfi Dec 22, 2022
7c32e83
forgor some lines
ashifolfi Dec 22, 2022
61aad49
update gitignore
ashifolfi Dec 22, 2022
240fa59
Convert plugin structure to class
ashifolfi Dec 22, 2022
efcbb37
bindings I guess
ashifolfi Dec 31, 2022
5205e08
cleanup from scripted plugins attempt
ashifolfi Jan 4, 2023
c2c9716
reimplement engineview panel
ashifolfi Jan 4, 2023
ae06318
changes to editor cmake
ashifolfi Jan 4, 2023
5516a06
reimplement model viewer/editor in c++
ashifolfi Jan 4, 2023
83798ef
remove xcodeproj files
ashifolfi Jan 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Empty file modified .github/FUNDING.yml
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/bug_report.yml
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/feature_request.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/build_engine.yml
100644 → 100755
Empty file.
26 changes: 24 additions & 2 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,37 @@
.vs/
.vscode/

# VSCode
.vscode/

CMakeSettings.json

# Build
cmake-build-*/
build/
out/
build*/
out*/

.ccls-cache

# macOS
# macos
*/.DS_Store
*/*/.DS_Store
.DS_Store

# Xcode
ChiraEngine.xcodeproj/*/xcuserdata
ChiraEngine.xcodeproj/xcuserdata

# KDevelop
*.kdev4
.kdev4/

# clangd
.cache/

# what
steam_appid.txt

# generator that is not ready at all
generator/
3 changes: 3 additions & 0 deletions .gitmodules
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@
[submodule "engine/thirdparty/imgui-filebrowser"]
path = engine/thirdparty/imgui-filebrowser
url = https://github.com/AirGuanZ/imgui-filebrowser
[submodule "editor/thirdparty/imguizmo"]
path = editor/thirdparty/imguizmo
url = https://github.com/ashifolfi/ImGuizmo-cmake
96 changes: 27 additions & 69 deletions CMakeLists.txt
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ if(CHIRA_COMPILER_ID MATCHES "clang")
endif()
endif()

# Detect macOS so we can make needed changes
if(${CMAKE_SYSTEM} MATCHES "Darwin")
add_definitions(-DMACOSX)
# Include CoreFoundation Library as we absolutely need this
find_library(CORE_LIB CoreFoundation)
list(APPEND CHIRA_ENGINE_LINK_LIBRARIES ${CORE_LIB})
endif()

# Macro to apply optimization flags to multiple targets
option(CHIRA_BUILD_WITH_WARNINGS "Build Chira Engine with warnings enabled" ON)
option(CHIRA_TREAT_WARNINGS_AS_ERRORS "Build Chira Engine with warnings treated as errors" OFF) # Currently catches warnings from libraries
Expand Down Expand Up @@ -206,7 +214,8 @@ target_include_directories(${PROJECT_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/engine/thirdparty/stb
${CMAKE_CURRENT_SOURCE_DIR}/engine/thirdparty/stduuid/include
${CMAKE_CURRENT_SOURCE_DIR}/engine/thirdparty/tinyfiledialogs
${CMAKE_CURRENT_SOURCE_DIR}/engine/thirdparty/imgui-filebrowser)
${CMAKE_CURRENT_SOURCE_DIR}/engine/thirdparty/imgui-filebrowser
)
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/engine/thirdparty/glad/include)
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/engine)

Expand All @@ -215,77 +224,26 @@ target_link_libraries(${PROJECT_NAME} PUBLIC ${OPENGL_LIBRARIES} ${CHIRA_ENGINE_
# CHIRAEDITOR
option(CHIRA_BUILD_EDITOR "Build the editor GUI application" ON)
if(CHIRA_BUILD_EDITOR)
include(${CMAKE_CURRENT_SOURCE_DIR}/editor/CMakeLists.txt)
if(WIN32)
list(APPEND CHIRA_EDITOR_SOURCES ${CMAKE_CURRENT_LIST_DIR}/resources/platform/windows/icon.rc)
endif()
if(APPLE)
list(APPEND CHIRA_APPLE_BUNDLE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/resources/platform/macOS/AppIcon.icns
${CMAKE_CURRENT_SOURCE_DIR}/resources/platform/macOS/Info.plist)
list(APPEND CHIRA_EDITOR_SOURCES ${CHIRA_APPLE_BUNDLE_FILES})
endif()
add_executable(ChiraEditor ${CHIRA_EDITOR_SOURCES})
apply_optimizations(ChiraEditor)
if(WIN32)
add_custom_target(
CopyEditorIcon
ALL
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/resources/platform/windows/icon.ico ${CMAKE_BINARY_DIR}/resources/platform/windows/icon.ico)
add_dependencies(ChiraEditor CopyEditorIcon)
endif()
if(APPLE)
set_target_properties(ChiraEditor PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_FRAMEWORK_IDENTIFIER info.craftablescience.ChiraEditor
BUNDLE "${CHIRA_APPLE_BUNDLE_FILES}")
endif()
target_link_libraries(ChiraEditor PRIVATE ${PROJECT_NAME})
target_include_directories(ChiraEditor PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/editor)

option(CHIRA_EDITOR_BUILD_INSTALLER "Build an installer for the editor binaries" OFF)
if(CHIRA_EDITOR_BUILD_INSTALLER)
set(CPACK_PACKAGE_VENDOR "Chira Engine Developers" CACHE STRING "" FORCE)
set(CPACK_GENERATOR "TGZ" CACHE STRING "" FORCE)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "An open source game engine for Windows, Linux, and macOS." CACHE STRING "" FORCE)
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding/steam/avatars/spider.png" CACHE STRING "" FORCE)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt" CACHE STRING "" FORCE)
set(CPACK_MONOLITHIC_INSTALL TRUE CACHE BOOL "" FORCE)
if(WIN32)
#todo: NSIS or WIX
#set(CPACK_GENERATOR "WIX" CACHE STRING "" FORCE)
message(FATAL_ERROR "Sorry, no Windows installer is supported yet.")
elseif(APPLE)
set(CPACK_GENERATOR "Bundle" CACHE STRING "" FORCE)
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_CURRENT_SOURCE_DIR}/branding/github/readme_banner.png" CACHE STRING "" FORCE)
set(CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE TRUE CACHE BOOL "" FORCE)
set(CPACK_BUNDLE_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/resources/platform/macOS/Info.plist CACHE STRING "" FORCE)
set(CPACK_BUNDLE_ICON ${CMAKE_CURRENT_SOURCE_DIR}/resources/platform/macOS/AppIcon.icns CACHE STRING "" FORCE)
elseif(UNIX)
#todo: DEB and/or RPM
message(FATAL_ERROR "Sorry, no Linux installer is supported yet.")
endif()
include(CPack)
endif()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/editor)
endif()


# CHIRATEST
if(CHIRA_BUILD_TESTS)
add_executable(ChiraTest ${CHIRA_TEST_SOURCES})
target_link_libraries(ChiraTest PUBLIC ${PROJECT_NAME} gtest_main)
target_include_directories(ChiraTest PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
include(GoogleTest)
gtest_discover_tests(ChiraTest)

# Copy gtest binaries next to the executable
add_custom_command(
TARGET ChiraTest
PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/bin ${CMAKE_BINARY_DIR})
endif()
# if(CHIRA_BUILD_TESTS)
# add_executable(ChiraTest ${CHIRA_TEST_SOURCES})
# target_link_libraries(ChiraTest PUBLIC ${PROJECT_NAME} gtest_main)
# target_include_directories(ChiraTest PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
# include(GoogleTest)
# gtest_discover_tests(ChiraTest)

# # Copy gtest binaries next to the executable
# add_custom_command(
# TARGET ChiraTest
# PRE_BUILD
# COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/bin ${CMAKE_BINARY_DIR})
# endif()

# Copy resources
add_custom_command(
TARGET ${PROJECT_NAME}
PRE_BUILD
add_custom_target(${PROJECT_NAME}CopyResources
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/resources ${CMAKE_BINARY_DIR}/resources)
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}CopyResources)
Empty file modified LICENSE.txt
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified branding/README.md
100644 → 100755
Empty file.
Empty file modified branding/github/readme_banner.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified branding/steam/avatars/spider.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified branding/steam/community/capsule.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified branding/steam/community/community_group_header.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified branding/steam/community/community_icon.ico
100644 → 100755
Empty file.
Empty file modified branding/steam/community/community_icon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified branding/steam/community/devhub_banner.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified branding/steam/community/workshop_banner.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified branding/steam/library/library_capsule.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified branding/steam/library/library_hero.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified branding/steam/library/library_logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified branding/steam/store/store_header_capsule.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified branding/steam/store/store_main_capsule.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified branding/steam/store/store_small_capsule.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified branding/steam/store/store_vertical_capsule.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bundle_resources/AppIcon.icns
Binary file not shown.
34 changes: 34 additions & 0 deletions bundle_resources/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>ChiraEditor</string>
<key>CFBundleGetInfoString</key>
<string></string>
<key>CFBundleIconFile</key>
<string>AppIcon.icns</string>
<key>CFBundleIdentifier</key>
<string></string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string></string>
<key>CFBundleName</key>
<string>Chira Editor</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string></string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string></string>
</dict>
</plist>
6 changes: 3 additions & 3 deletions cmake_configure_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ config_xcode()

check_param()
{
TYPE=$1
TYPE="$1"

if [ "$TYPE" ];
then
if [ "$TYPE" = "Xcode" ];
if [ "$TYPE" == "Xcode" ];
then
config_xcode
elif [ "$TYPE" = "Makefiles" ];
elif [ "$TYPE" == "Makefiles" ];
then
config_noxcode
else
Expand Down
77 changes: 76 additions & 1 deletion editor/CMakeLists.txt
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,77 @@
list(APPEND CHIRA_EDITOR_HEADERS
${CMAKE_CURRENT_LIST_DIR}/Editor.h
${CMAKE_CURRENT_LIST_DIR}/EditorPlugin.h
${CMAKE_CURRENT_LIST_DIR}/EngineView.h
)

list(APPEND CHIRA_EDITOR_SOURCES
${CMAKE_CURRENT_LIST_DIR}/Editor.cpp)
${CHIRA_EDITOR_HEADERS}
${CMAKE_CURRENT_LIST_DIR}/Editor.cpp
${CMAKE_CURRENT_LIST_DIR}/EditorPlugin.cpp
${CMAKE_CURRENT_LIST_DIR}/EngineView.cpp
)

include(${CMAKE_CURRENT_LIST_DIR}/modeleditor/CMakeLists.txt)

if(WIN32)
list(APPEND CHIRA_EDITOR_SOURCES ${CMAKE_CURRENT_LIST_DIR}/../resources/platform/windows/icon.rc)
endif()

if(APPLE)
list(APPEND CHIRA_APPLE_BUNDLE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/../resources/platform/macOS/AppIcon.icns
${CMAKE_CURRENT_SOURCE_DIR}/../resources/platform/macOS/Info.plist)
list(APPEND CHIRA_EDITOR_SOURCES ${CHIRA_APPLE_BUNDLE_FILES})
endif()

# macos bundle for editor
# if(${CMAKE_SYSTEM} MATCHES "Darwin")
# add_executable(ChiraEditor MACOSX_BUNDLE ${CHIRA_EDITOR_SOURCES})
# else()
add_executable(ChiraEditor ${CHIRA_EDITOR_SOURCES})
# endif()

apply_optimizations(ChiraEditor)

if(WIN32)
add_custom_target(
CopyEditorIcon
ALL
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/../resources/platform/windows/icon.ico ${CMAKE_BINARY_DIR}/resources/platform/windows/icon.ico)
add_dependencies(ChiraEditor CopyEditorIcon)
endif()

if(APPLE)
set_target_properties(ChiraEditor PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_FRAMEWORK_IDENTIFIER info.craftablescience.ChiraEditor
BUNDLE "${CHIRA_APPLE_BUNDLE_FILES}")
endif()

target_link_libraries(ChiraEditor PRIVATE ${PROJECT_NAME})
target_include_directories(ChiraEditor PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/editor)

option(CHIRA_EDITOR_BUILD_INSTALLER "Build an installer for the editor binaries" OFF)
if(CHIRA_EDITOR_BUILD_INSTALLER)
set(CPACK_PACKAGE_VENDOR "Chira Engine Developers" CACHE STRING "" FORCE)
set(CPACK_GENERATOR "TGZ" CACHE STRING "" FORCE)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "An open source game engine for Windows, Linux, and macOS." CACHE STRING "" FORCE)
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding/steam/avatars/spider.png" CACHE STRING "" FORCE)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt" CACHE STRING "" FORCE)
set(CPACK_MONOLITHIC_INSTALL TRUE CACHE BOOL "" FORCE)
if(WIN32)
#todo: NSIS or WIX
#set(CPACK_GENERATOR "WIX" CACHE STRING "" FORCE)
message(FATAL_ERROR "Sorry, no Windows installer is supported yet.")
elseif(APPLE)
set(CPACK_GENERATOR "Bundle" CACHE STRING "" FORCE)
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_CURRENT_SOURCE_DIR}/branding/github/readme_banner.png" CACHE STRING "" FORCE)
set(CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE TRUE CACHE BOOL "" FORCE)
set(CPACK_BUNDLE_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/../resources/platform/macOS/Info.plist CACHE STRING "" FORCE)
set(CPACK_BUNDLE_ICON ${CMAKE_CURRENT_SOURCE_DIR}/../resources/platform/macOS/AppIcon.icns CACHE STRING "" FORCE)
elseif(UNIX)
#todo: DEB and/or RPM
message(FATAL_ERROR "Sorry, no Linux installer is supported yet.")
endif()
include(CPack)
endif()
Loading