Mercurial > vim-unreal
diff plugin/unreal.vim @ 2:9235d8341a18
Refactor the build system invocation commands.
Now we have proper knowledge of the projects inside a codebase ("branch"). The
plugin should correctly parse configuration names, find the correct module to
build based on the configuration, and so on.
Also, added support for generating the clang compilation database.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Fri, 22 Jan 2021 16:38:18 -0800 |
parents | ba03cac1b1c6 |
children | b5040cfea052 |
line wrap: on
line diff
--- a/plugin/unreal.vim Fri Sep 25 09:44:49 2020 -0700 +++ b/plugin/unreal.vim Fri Jan 22 16:38:18 2021 -0800 @@ -8,15 +8,19 @@ finish endif -let g:unreal_trace = 0 +let g:unreal_trace = get(g:, 'unreal_trace', 0) -let g:unreal_project_dir_marker = get(g:, 'unreal_project_dir_marker', '*.uprojectdirs') -let g:unreal_project_dir_finder = get(g:, 'unreal_project_dir_finder', '') +let g:unreal_branch_dir_marker = get(g:, 'unreal_branch_dir_marker', '*.uprojectdirs') +let g:unreal_branch_dir_finder = get(g:, 'unreal_branch_dir_finder', '') let g:unreal_auto_find_project = get(g:, 'unreal_auto_find_project', 0) -let g:unreal_project_dir = get(g:, 'unreal_project_dir', '') -let g:unreal_project_platform = get(g:, 'unreal_project_platform', '') -let g:unreal_project_config = get(g:, 'unreal_project_config', '') +let g:unreal_branch_projects = {} + +let g:unreal_branch_dir = get(g:, 'unreal_branch_dir', '') +let g:unreal_project = get(g:, 'unreal_project', '') +let g:unreal_platform = get(g:, 'unreal_platform', 'Win64') +let g:unreal_config_state = get(g:, 'unreal_config_state', 'Development') +let g:unreal_config_target = get(g:, 'unreal_config_target', 'Editor') let g:unreal_modules = get(g:, 'unreal_modules', []) @@ -24,33 +28,48 @@ \"Win32", "Win64", "HoloLens", "Mac", "XboxOne", "PS4", "IOS", "Android", \"HTML5", "Linux", "AllDesktop", "TVOS", "Switch" \]) -let g:unreal_configurations = get(g:, 'unreal_configurations', [ +let g:unreal_config_states = get(g:, 'unreal_config_states', [ \"Debug", "DebugGame", "Development", "Shipping", "Test" \]) +let g:unreal_config_targets = get(g:, 'unreal_config_targets', [ + \"", "Editor", "Client", "Server" + \]) let g:unreal_build_options = get(g:, 'unreal_build_options', [ \"-DisableUnity", "-ForceUnity" \]) +let g:unreal_auto_build_modules = get(g:, 'unreal_auto_build_modules', { + \"ShaderCompileWorker": ["-Quiet"] + \}) let g:unreal_auto_build_options = get(g:, 'unreal_auto_build_options', [ \"-WaitMutex" \]) +let g:unreal_auto_generate_compilation_database = get(g:, 'unreal_auto_generate_compilation_database', 0) + " }}} " Commands {{{ -command! UnrealFindProject :call unreal#find_project_dir() -command! -nargs=1 -complete=dir UnrealSetProject :call unreal#set_project_dir(<f-args>) +command! UnrealFindProject :call unreal#find_project() +command! -nargs=1 -complete=dir UnrealSetBranchDir :call unreal#set_branch_dir(<f-args>) +command! -nargs=1 -complete=customlist,unreal#complete_projects + \UnrealSetProject :call unreal#set_project(<f-args>) command! -nargs=1 -complete=customlist,unreal#complete_platforms \UnrealSetPlatform :call unreal#set_platform(<f-args>) -command! -nargs=1 -complete=customlist,unreal#complete_config +command! -nargs=1 -complete=customlist,unreal#complete_configs \UnrealSetConfig :call unreal#set_config(<f-args>) command! UnrealGenerateProjectFiles :call unreal#generate_project_files() +command! UnrealGenerateCompilationDatabase :call unreal#generate_compilation_database() -command! -nargs=+ -complete=customlist,unreal#complete_build_targets - \UnrealBuild :call unreal#build(<f-args>) -command! -nargs=+ -complete=customlist,unreal#complete_build_targets - \UnrealBuildEditor :call unreal#build_editor(<f-args>) +command! -nargs=* -bang -complete=customlist,unreal#complete_build_args + \UnrealBuild :call unreal#build(<bang>0, <f-args>) +command! -nargs=* -bang -complete=customlist,unreal#complete_build_args + \UnrealRebuild :call unreal#rebuild(<bang>0, <f-args>) +command! -nargs=* -bang -complete=customlist,unreal#complete_build_args + \UnrealClean :call unreal#clean(<bang>0, <f-args>) + +command! UnrealReloadBranchProjects :call unreal#set_branch_dir(g:unreal_branch_dir) " }}}