summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2026-02-28 21:55:13 +0800
committerruki <[email protected]>2026-02-28 21:55:13 +0800
commit5280c9480cb0d7d3ab55d516e296152ec273e14a (patch)
treeaf041546121010fdad5639c231ad2b2a4900aa12
parent71e10b70334401d46c47f574c8f46fcd20ccf818 (diff)
rewrite templates
-rw-r--r--xmake/actions/create/main.lua86
-rw-r--r--xmake/actions/create/template.lua134
-rw-r--r--xmake/actions/create/xmake.lua137
-rw-r--r--xmake/core/project/template.lua168
-rw-r--r--xmake/core/sandbox/modules/import/core/project/template.lua39
-rw-r--r--xmake/templates/c++/console/src/main.cpp (renamed from xmake/templates/c++/console/project/src/main.cpp)0
-rw-r--r--xmake/templates/c++/console/template.lua2
-rw-r--r--xmake/templates/c++/console/xmake.lua (renamed from xmake/templates/c++/console/project/xmake.lua)0
-rw-r--r--xmake/templates/c++/module.binary/modules/binary/bar/.gitignore (renamed from xmake/templates/c++/module.binary/project/modules/binary/bar/.gitignore)0
-rw-r--r--xmake/templates/c++/module.binary/modules/binary/bar/src/add.cpp (renamed from xmake/templates/c++/module.binary/project/modules/binary/bar/src/add.cpp)0
-rw-r--r--xmake/templates/c++/module.binary/modules/binary/bar/src/sub.cpp (renamed from xmake/templates/c++/module.binary/project/modules/binary/bar/src/sub.cpp)0
-rw-r--r--xmake/templates/c++/module.binary/modules/binary/bar/xmake.lua (renamed from xmake/templates/c++/module.binary/project/modules/binary/bar/xmake.lua)0
-rw-r--r--xmake/templates/c++/module.binary/src/main.cpp (renamed from xmake/templates/c++/module.binary/project/src/main.cpp)0
-rw-r--r--xmake/templates/c++/module.binary/template.lua2
-rw-r--r--xmake/templates/c++/module.binary/xmake.lua (renamed from xmake/templates/c++/module.binary/project/xmake.lua)0
-rw-r--r--xmake/templates/c++/module.shared/modules/shared/foo/src/foo.cpp (renamed from xmake/templates/c++/module.shared/project/modules/shared/foo/src/foo.cpp)0
-rw-r--r--xmake/templates/c++/module.shared/modules/shared/foo/xmake.lua (renamed from xmake/templates/c++/module.shared/project/modules/shared/foo/xmake.lua)0
-rw-r--r--xmake/templates/c++/module.shared/src/main.cpp (renamed from xmake/templates/c++/module.shared/project/src/main.cpp)0
-rw-r--r--xmake/templates/c++/module.shared/template.lua2
-rw-r--r--xmake/templates/c++/module.shared/xmake.lua (renamed from xmake/templates/c++/module.shared/project/xmake.lua)0
-rw-r--r--xmake/templates/c++/qt.console/src/main.cpp (renamed from xmake/templates/c++/qt.console/project/src/main.cpp)0
-rw-r--r--xmake/templates/c++/qt.console/template.lua3
-rw-r--r--xmake/templates/c++/qt.console/xmake.lua (renamed from xmake/templates/c++/qt.console/project/xmake.lua)0
-rw-r--r--xmake/templates/c++/qt.quickapp/src/main.cpp (renamed from xmake/templates/c++/qt.quickapp/project/src/main.cpp)0
-rw-r--r--xmake/templates/c++/qt.quickapp/src/main.qml (renamed from xmake/templates/c++/qt.quickapp/project/src/main.qml)0
-rw-r--r--xmake/templates/c++/qt.quickapp/src/qml.qrc (renamed from xmake/templates/c++/qt.quickapp/project/src/qml.qrc)0
-rw-r--r--xmake/templates/c++/qt.quickapp/template.lua3
-rw-r--r--xmake/templates/c++/qt.quickapp/xmake.lua (renamed from xmake/templates/c++/qt.quickapp/project/xmake.lua)0
-rw-r--r--xmake/templates/c++/qt.quickapp_static/src/main.cpp (renamed from xmake/templates/c++/qt.quickapp_static/project/src/main.cpp)0
-rw-r--r--xmake/templates/c++/qt.quickapp_static/src/main.qml (renamed from xmake/templates/c++/qt.quickapp_static/project/src/main.qml)0
-rw-r--r--xmake/templates/c++/qt.quickapp_static/src/qml.qrc (renamed from xmake/templates/c++/qt.quickapp_static/project/src/qml.qrc)0
-rw-r--r--xmake/templates/c++/qt.quickapp_static/template.lua3
-rw-r--r--xmake/templates/c++/qt.quickapp_static/xmake.lua (renamed from xmake/templates/c++/qt.quickapp_static/project/xmake.lua)0
-rw-r--r--xmake/templates/c++/qt.shared/src/demo.cpp (renamed from xmake/templates/c++/qt.shared/project/src/demo.cpp)0
-rw-r--r--xmake/templates/c++/qt.shared/src/demo.h (renamed from xmake/templates/c++/qt.shared/project/src/demo.h)0
-rw-r--r--xmake/templates/c++/qt.shared/src/demo_global.h (renamed from xmake/templates/c++/qt.shared/project/src/demo_global.h)0
-rw-r--r--xmake/templates/c++/qt.shared/template.lua3
-rw-r--r--xmake/templates/c++/qt.shared/xmake.lua (renamed from xmake/templates/c++/qt.shared/project/xmake.lua)0
-rw-r--r--xmake/templates/c++/qt.static/src/demo.cpp (renamed from xmake/templates/c++/qt.static/project/src/demo.cpp)0
-rw-r--r--xmake/templates/c++/qt.static/src/demo.h (renamed from xmake/templates/c++/qt.static/project/src/demo.h)0
-rw-r--r--xmake/templates/c++/qt.static/template.lua3
-rw-r--r--xmake/templates/c++/qt.static/xmake.lua (renamed from xmake/templates/c++/qt.static/project/xmake.lua)0
-rw-r--r--xmake/templates/c++/qt.widgetapp/src/main.cpp (renamed from xmake/templates/c++/qt.widgetapp/project/src/main.cpp)0
-rw-r--r--xmake/templates/c++/qt.widgetapp/src/mainwindow.cpp (renamed from xmake/templates/c++/qt.widgetapp/project/src/mainwindow.cpp)0
-rw-r--r--xmake/templates/c++/qt.widgetapp/src/mainwindow.h (renamed from xmake/templates/c++/qt.widgetapp/project/src/mainwindow.h)0
-rw-r--r--xmake/templates/c++/qt.widgetapp/src/mainwindow.ui (renamed from xmake/templates/c++/qt.widgetapp/project/src/mainwindow.ui)0
-rw-r--r--xmake/templates/c++/qt.widgetapp/template.lua3
-rw-r--r--xmake/templates/c++/qt.widgetapp/xmake.lua (renamed from xmake/templates/c++/qt.widgetapp/project/xmake.lua)0
-rw-r--r--xmake/templates/c++/qt.widgetapp_static/src/main.cpp (renamed from xmake/templates/c++/qt.widgetapp_static/project/src/main.cpp)0
-rw-r--r--xmake/templates/c++/qt.widgetapp_static/src/mainwindow.cpp (renamed from xmake/templates/c++/qt.widgetapp_static/project/src/mainwindow.cpp)0
-rw-r--r--xmake/templates/c++/qt.widgetapp_static/src/mainwindow.h (renamed from xmake/templates/c++/qt.widgetapp_static/project/src/mainwindow.h)0
-rw-r--r--xmake/templates/c++/qt.widgetapp_static/src/mainwindow.ui (renamed from xmake/templates/c++/qt.widgetapp_static/project/src/mainwindow.ui)0
-rw-r--r--xmake/templates/c++/qt.widgetapp_static/template.lua3
-rw-r--r--xmake/templates/c++/qt.widgetapp_static/xmake.lua (renamed from xmake/templates/c++/qt.widgetapp_static/project/xmake.lua)0
-rw-r--r--xmake/templates/c++/shared/src/foo.cpp (renamed from xmake/templates/c++/shared/project/src/foo.cpp)0
-rw-r--r--xmake/templates/c++/shared/src/foo.h (renamed from xmake/templates/c++/shared/project/src/foo.h)0
-rw-r--r--xmake/templates/c++/shared/src/main.cpp (renamed from xmake/templates/c++/shared/project/src/main.cpp)0
-rw-r--r--xmake/templates/c++/shared/template.lua2
-rw-r--r--xmake/templates/c++/shared/xmake.lua (renamed from xmake/templates/c++/shared/project/xmake.lua)0
-rw-r--r--xmake/templates/c++/static/src/foo.cpp (renamed from xmake/templates/c++/static/project/src/foo.cpp)0
-rw-r--r--xmake/templates/c++/static/src/foo.h (renamed from xmake/templates/c++/static/project/src/foo.h)0
-rw-r--r--xmake/templates/c++/static/src/main.cpp (renamed from xmake/templates/c++/static/project/src/main.cpp)0
-rw-r--r--xmake/templates/c++/static/template.lua2
-rw-r--r--xmake/templates/c++/static/xmake.lua (renamed from xmake/templates/c++/static/project/xmake.lua)0
-rw-r--r--xmake/templates/c++/tbox.console/src/main.cpp (renamed from xmake/templates/c++/tbox.console/project/src/main.cpp)0
-rw-r--r--xmake/templates/c++/tbox.console/src/xmake.lua (renamed from xmake/templates/c++/tbox.console/project/src/xmake.lua)0
-rw-r--r--xmake/templates/c++/tbox.console/template.lua4
-rw-r--r--xmake/templates/c++/tbox.console/xmake.lua (renamed from xmake/templates/c++/tbox.console/project/xmake.lua)0
-rw-r--r--xmake/templates/c++/tbox.shared/src/${TARGETNAME}/interface.cpp (renamed from xmake/templates/c++/tbox.shared/project/src/_library/interface.cpp)0
-rw-r--r--xmake/templates/c++/tbox.shared/src/${TARGETNAME}/interface.h (renamed from xmake/templates/c++/tbox.shared/project/src/_library/interface.h)0
-rw-r--r--xmake/templates/c++/tbox.shared/src/${TARGETNAME}/xmake.lua (renamed from xmake/templates/c++/tbox.shared/project/src/_library/xmake.lua)0
-rw-r--r--xmake/templates/c++/tbox.shared/src/${TARGETNAME}_demo/main.cpp (renamed from xmake/templates/c++/tbox.shared/project/src/_demo/main.cpp)0
-rw-r--r--xmake/templates/c++/tbox.shared/src/${TARGETNAME}_demo/xmake.lua (renamed from xmake/templates/c++/tbox.shared/project/src/_demo/xmake.lua)0
-rw-r--r--xmake/templates/c++/tbox.shared/template.lua9
-rw-r--r--xmake/templates/c++/tbox.shared/xmake.lua (renamed from xmake/templates/c++/tbox.shared/project/xmake.lua)0
-rw-r--r--xmake/templates/c++/tbox.static/src/${TARGETNAME}/interface.cpp (renamed from xmake/templates/c++/tbox.static/project/src/_library/interface.cpp)0
-rw-r--r--xmake/templates/c++/tbox.static/src/${TARGETNAME}/interface.h (renamed from xmake/templates/c++/tbox.static/project/src/_library/interface.h)0
-rw-r--r--xmake/templates/c++/tbox.static/src/${TARGETNAME}/xmake.lua (renamed from xmake/templates/c++/tbox.static/project/src/_library/xmake.lua)0
-rw-r--r--xmake/templates/c++/tbox.static/src/${TARGETNAME}_demo/main.cpp (renamed from xmake/templates/c++/tbox.static/project/src/_demo/main.cpp)0
-rw-r--r--xmake/templates/c++/tbox.static/src/${TARGETNAME}_demo/xmake.lua (renamed from xmake/templates/c++/tbox.static/project/src/_demo/xmake.lua)0
-rw-r--r--xmake/templates/c++/tbox.static/template.lua9
-rw-r--r--xmake/templates/c++/tbox.static/xmake.lua (renamed from xmake/templates/c++/tbox.static/project/xmake.lua)0
-rw-r--r--xmake/templates/c++/wxwidgets/src/main.cpp (renamed from xmake/templates/c++/wxwidgets/project/src/main.cpp)0
-rw-r--r--xmake/templates/c++/wxwidgets/template.lua3
-rw-r--r--xmake/templates/c++/wxwidgets/xmake.lua (renamed from xmake/templates/c++/wxwidgets/project/xmake.lua)0
-rw-r--r--xmake/templates/c++/xmake.cli/src/lni/main.cpp (renamed from xmake/templates/c++/xmake.cli/project/src/lni/main.cpp)0
-rw-r--r--xmake/templates/c++/xmake.cli/src/lua/main.lua (renamed from xmake/templates/c++/xmake.cli/project/src/lua/main.lua)0
-rw-r--r--xmake/templates/c++/xmake.cli/template.lua3
-rw-r--r--xmake/templates/c++/xmake.cli/xmake.lua (renamed from xmake/templates/c++/xmake.cli/project/xmake.lua)0
-rw-r--r--xmake/templates/c/console/src/main.c (renamed from xmake/templates/c/console/project/src/main.c)0
-rw-r--r--xmake/templates/c/console/template.lua2
-rw-r--r--xmake/templates/c/console/xmake.lua (renamed from xmake/templates/c/console/project/xmake.lua)0
-rw-r--r--xmake/templates/c/module.binary/modules/binary/bar/.gitignore (renamed from xmake/templates/c/module.binary/project/modules/binary/bar/.gitignore)0
-rw-r--r--xmake/templates/c/module.binary/modules/binary/bar/src/add.c (renamed from xmake/templates/c/module.binary/project/modules/binary/bar/src/add.c)0
-rw-r--r--xmake/templates/c/module.binary/modules/binary/bar/src/sub.c (renamed from xmake/templates/c/module.binary/project/modules/binary/bar/src/sub.c)0
-rw-r--r--xmake/templates/c/module.binary/modules/binary/bar/xmake.lua (renamed from xmake/templates/c/module.binary/project/modules/binary/bar/xmake.lua)0
-rw-r--r--xmake/templates/c/module.binary/src/main.c (renamed from xmake/templates/c/module.binary/project/src/main.c)0
-rw-r--r--xmake/templates/c/module.binary/template.lua2
-rw-r--r--xmake/templates/c/module.binary/xmake.lua (renamed from xmake/templates/c/module.binary/project/xmake.lua)0
-rw-r--r--xmake/templates/c/module.shared/modules/shared/foo/src/foo.c (renamed from xmake/templates/c/module.shared/project/modules/shared/foo/src/foo.c)0
-rw-r--r--xmake/templates/c/module.shared/modules/shared/foo/xmake.lua (renamed from xmake/templates/c/module.shared/project/modules/shared/foo/xmake.lua)0
-rw-r--r--xmake/templates/c/module.shared/src/main.c (renamed from xmake/templates/c/module.shared/project/src/main.c)0
-rw-r--r--xmake/templates/c/module.shared/template.lua2
-rw-r--r--xmake/templates/c/module.shared/xmake.lua (renamed from xmake/templates/c/module.shared/project/xmake.lua)0
-rw-r--r--xmake/templates/c/shared/src/foo.c (renamed from xmake/templates/c/shared/project/src/foo.c)0
-rw-r--r--xmake/templates/c/shared/src/foo.h (renamed from xmake/templates/c/shared/project/src/foo.h)0
-rw-r--r--xmake/templates/c/shared/src/main.c (renamed from xmake/templates/c/shared/project/src/main.c)0
-rw-r--r--xmake/templates/c/shared/template.lua2
-rw-r--r--xmake/templates/c/shared/xmake.lua (renamed from xmake/templates/c/shared/project/xmake.lua)0
-rw-r--r--xmake/templates/c/static/src/foo.c (renamed from xmake/templates/c/static/project/src/foo.c)0
-rw-r--r--xmake/templates/c/static/src/foo.h (renamed from xmake/templates/c/static/project/src/foo.h)0
-rw-r--r--xmake/templates/c/static/src/main.c (renamed from xmake/templates/c/static/project/src/main.c)0
-rw-r--r--xmake/templates/c/static/template.lua2
-rw-r--r--xmake/templates/c/static/xmake.lua (renamed from xmake/templates/c/static/project/xmake.lua)0
-rw-r--r--xmake/templates/c/tbox.console/src/main.c (renamed from xmake/templates/c/tbox.console/project/src/main.c)0
-rw-r--r--xmake/templates/c/tbox.console/src/xmake.lua (renamed from xmake/templates/c/tbox.console/project/src/xmake.lua)0
-rw-r--r--xmake/templates/c/tbox.console/template.lua4
-rw-r--r--xmake/templates/c/tbox.console/xmake.lua (renamed from xmake/templates/c/tbox.console/project/xmake.lua)0
-rw-r--r--xmake/templates/c/tbox.shared/src/${TARGETNAME}/interface.c (renamed from xmake/templates/c/tbox.shared/project/src/_library/interface.c)0
-rw-r--r--xmake/templates/c/tbox.shared/src/${TARGETNAME}/interface.h (renamed from xmake/templates/c/tbox.shared/project/src/_library/interface.h)0
-rw-r--r--xmake/templates/c/tbox.shared/src/${TARGETNAME}/xmake.lua (renamed from xmake/templates/c/tbox.shared/project/src/_library/xmake.lua)0
-rw-r--r--xmake/templates/c/tbox.shared/src/${TARGETNAME}_demo/main.c (renamed from xmake/templates/c/tbox.shared/project/src/_demo/main.c)0
-rw-r--r--xmake/templates/c/tbox.shared/src/${TARGETNAME}_demo/xmake.lua (renamed from xmake/templates/c/tbox.shared/project/src/_demo/xmake.lua)0
-rw-r--r--xmake/templates/c/tbox.shared/template.lua9
-rw-r--r--xmake/templates/c/tbox.shared/xmake.lua (renamed from xmake/templates/c/tbox.shared/project/xmake.lua)0
-rw-r--r--xmake/templates/c/tbox.static/src/${TARGETNAME}/interface.c (renamed from xmake/templates/c/tbox.static/project/src/_library/interface.c)0
-rw-r--r--xmake/templates/c/tbox.static/src/${TARGETNAME}/interface.h (renamed from xmake/templates/c/tbox.static/project/src/_library/interface.h)0
-rw-r--r--xmake/templates/c/tbox.static/src/${TARGETNAME}/xmake.lua (renamed from xmake/templates/c/tbox.static/project/src/_library/xmake.lua)0
-rw-r--r--xmake/templates/c/tbox.static/src/${TARGETNAME}_demo/main.c (renamed from xmake/templates/c/tbox.static/project/src/_demo/main.c)0
-rw-r--r--xmake/templates/c/tbox.static/src/${TARGETNAME}_demo/xmake.lua (renamed from xmake/templates/c/tbox.static/project/src/_demo/xmake.lua)0
-rw-r--r--xmake/templates/c/tbox.static/template.lua9
-rw-r--r--xmake/templates/c/tbox.static/xmake.lua (renamed from xmake/templates/c/tbox.static/project/xmake.lua)0
-rw-r--r--xmake/templates/c/xmake.cli/src/lni/main.c (renamed from xmake/templates/c/xmake.cli/project/src/lni/main.c)0
-rw-r--r--xmake/templates/c/xmake.cli/src/lua/main.lua (renamed from xmake/templates/c/xmake.cli/project/src/lua/main.lua)0
-rw-r--r--xmake/templates/c/xmake.cli/template.lua3
-rw-r--r--xmake/templates/c/xmake.cli/xmake.lua (renamed from xmake/templates/c/xmake.cli/project/xmake.lua)0
-rw-r--r--xmake/templates/cuda/console/src/main.cu (renamed from xmake/templates/cuda/console/project/src/main.cu)0
-rw-r--r--xmake/templates/cuda/console/template.lua2
-rw-r--r--xmake/templates/cuda/console/xmake.lua (renamed from xmake/templates/cuda/console/project/xmake.lua)0
-rw-r--r--xmake/templates/cuda/shared/inc/lib.cuh (renamed from xmake/templates/cuda/shared/project/inc/lib.cuh)0
-rw-r--r--xmake/templates/cuda/shared/src/lib.cu (renamed from xmake/templates/cuda/shared/project/src/lib.cu)0
-rw-r--r--xmake/templates/cuda/shared/template.lua2
-rw-r--r--xmake/templates/cuda/shared/xmake.lua (renamed from xmake/templates/cuda/shared/project/xmake.lua)0
-rw-r--r--xmake/templates/cuda/static/inc/lib.cuh (renamed from xmake/templates/cuda/static/project/inc/lib.cuh)0
-rw-r--r--xmake/templates/cuda/static/src/lib.cu (renamed from xmake/templates/cuda/static/project/src/lib.cu)0
-rw-r--r--xmake/templates/cuda/static/template.lua2
-rw-r--r--xmake/templates/cuda/static/xmake.lua (renamed from xmake/templates/cuda/static/project/xmake.lua)0
-rw-r--r--xmake/templates/dlang/console/src/main.d (renamed from xmake/templates/dlang/console/project/src/main.d)0
-rw-r--r--xmake/templates/dlang/console/template.lua2
-rw-r--r--xmake/templates/dlang/console/xmake.lua (renamed from xmake/templates/dlang/console/project/xmake.lua)0
-rw-r--r--xmake/templates/dlang/shared/src/interfaces.d (renamed from xmake/templates/dlang/shared/project/src/interfaces.d)0
-rw-r--r--xmake/templates/dlang/shared/src/main.d (renamed from xmake/templates/dlang/shared/project/src/main.d)0
-rw-r--r--xmake/templates/dlang/shared/template.lua2
-rw-r--r--xmake/templates/dlang/shared/xmake.lua (renamed from xmake/templates/dlang/shared/project/xmake.lua)0
-rw-r--r--xmake/templates/dlang/static/src/interfaces.d (renamed from xmake/templates/dlang/static/project/src/interfaces.d)0
-rw-r--r--xmake/templates/dlang/static/src/main.d (renamed from xmake/templates/dlang/static/project/src/main.d)0
-rw-r--r--xmake/templates/dlang/static/template.lua2
-rw-r--r--xmake/templates/dlang/static/xmake.lua (renamed from xmake/templates/dlang/static/project/xmake.lua)0
-rw-r--r--xmake/templates/fortran/console/src/main.f90 (renamed from xmake/templates/fortran/console/project/src/main.f90)0
-rw-r--r--xmake/templates/fortran/console/template.lua2
-rw-r--r--xmake/templates/fortran/console/xmake.lua (renamed from xmake/templates/fortran/console/project/xmake.lua)0
-rw-r--r--xmake/templates/fortran/shared/src/main.f90 (renamed from xmake/templates/fortran/shared/project/src/main.f90)0
-rw-r--r--xmake/templates/fortran/shared/src/test.f90 (renamed from xmake/templates/fortran/shared/project/src/test.f90)0
-rw-r--r--xmake/templates/fortran/shared/template.lua2
-rw-r--r--xmake/templates/fortran/shared/xmake.lua (renamed from xmake/templates/fortran/shared/project/xmake.lua)0
-rw-r--r--xmake/templates/fortran/static/src/main.f90 (renamed from xmake/templates/fortran/static/project/src/main.f90)0
-rw-r--r--xmake/templates/fortran/static/src/test.f90 (renamed from xmake/templates/fortran/static/project/src/test.f90)0
-rw-r--r--xmake/templates/fortran/static/template.lua2
-rw-r--r--xmake/templates/fortran/static/xmake.lua (renamed from xmake/templates/fortran/static/project/xmake.lua)0
-rw-r--r--xmake/templates/go/console/src/main.go (renamed from xmake/templates/go/console/project/src/main.go)0
-rw-r--r--xmake/templates/go/console/template.lua2
-rw-r--r--xmake/templates/go/console/xmake.lua (renamed from xmake/templates/go/console/project/xmake.lua)0
-rw-r--r--xmake/templates/go/static/src/main.go (renamed from xmake/templates/go/static/project/src/main.go)0
-rw-r--r--xmake/templates/go/static/src/module/add.go (renamed from xmake/templates/go/static/project/src/module/add.go)0
-rw-r--r--xmake/templates/go/static/src/module/sub.go (renamed from xmake/templates/go/static/project/src/module/sub.go)0
-rw-r--r--xmake/templates/go/static/src/test.go (renamed from xmake/templates/go/static/project/src/test.go)0
-rw-r--r--xmake/templates/go/static/template.lua2
-rw-r--r--xmake/templates/go/static/xmake.lua (renamed from xmake/templates/go/static/project/xmake.lua)0
-rw-r--r--xmake/templates/kotlin/console/src/main.kt (renamed from xmake/templates/kotlin/console/project/src/main.kt)0
-rw-r--r--xmake/templates/kotlin/console/template.lua2
-rw-r--r--xmake/templates/kotlin/console/xmake.lua (renamed from xmake/templates/kotlin/console/project/xmake.lua)0
-rw-r--r--xmake/templates/kotlin/shared/src/foo.kt (renamed from xmake/templates/kotlin/shared_library/project/src/foo.kt)0
-rw-r--r--xmake/templates/kotlin/shared/src/main.c (renamed from xmake/templates/kotlin/shared_library/project/src/main.c)0
-rw-r--r--xmake/templates/kotlin/shared/xmake.lua (renamed from xmake/templates/kotlin/shared_library/project/xmake.lua)0
-rw-r--r--xmake/templates/kotlin/shared_library/template.lua2
-rw-r--r--xmake/templates/kotlin/static/src/foo.kt (renamed from xmake/templates/kotlin/static_library/project/src/foo.kt)0
-rw-r--r--xmake/templates/kotlin/static/src/main.c (renamed from xmake/templates/kotlin/static_library/project/src/main.c)0
-rw-r--r--xmake/templates/kotlin/static/xmake.lua (renamed from xmake/templates/kotlin/static_library/project/xmake.lua)0
-rw-r--r--xmake/templates/kotlin/static_library/template.lua2
-rw-r--r--xmake/templates/nim/console/src/main.nim (renamed from xmake/templates/nim/console/project/src/main.nim)0
-rw-r--r--xmake/templates/nim/console/template.lua2
-rw-r--r--xmake/templates/nim/console/xmake.lua (renamed from xmake/templates/nim/console/project/xmake.lua)0
-rw-r--r--xmake/templates/nim/shared/src/foo.nim (renamed from xmake/templates/nim/shared/project/src/foo.nim)0
-rw-r--r--xmake/templates/nim/shared/src/main.nim (renamed from xmake/templates/nim/shared/project/src/main.nim)0
-rw-r--r--xmake/templates/nim/shared/template.lua2
-rw-r--r--xmake/templates/nim/shared/xmake.lua (renamed from xmake/templates/nim/shared/project/xmake.lua)0
-rw-r--r--xmake/templates/nim/static/src/foo.nim (renamed from xmake/templates/nim/static/project/src/foo.nim)0
-rw-r--r--xmake/templates/nim/static/src/main.nim (renamed from xmake/templates/nim/static/project/src/main.nim)0
-rw-r--r--xmake/templates/nim/static/template.lua2
-rw-r--r--xmake/templates/nim/static/xmake.lua (renamed from xmake/templates/nim/static/project/xmake.lua)0
-rw-r--r--xmake/templates/objc++/bundle/template.lua2
-rw-r--r--xmake/templates/objc++/console/src/main.mm (renamed from xmake/templates/objc++/console/project/src/main.mm)0
-rw-r--r--xmake/templates/objc++/console/template.lua2
-rw-r--r--xmake/templates/objc++/console/xmake.lua (renamed from xmake/templates/objc++/console/project/xmake.lua)0
-rw-r--r--xmake/templates/objc++/framework/template.lua2
-rw-r--r--xmake/templates/objc++/xcode.bundle/src/Info.plist (renamed from xmake/templates/objc++/bundle/project/src/Info.plist)0
-rw-r--r--xmake/templates/objc++/xcode.bundle/src/test.h (renamed from xmake/templates/objc++/bundle/project/src/test.h)0
-rw-r--r--xmake/templates/objc++/xcode.bundle/src/test.mm (renamed from xmake/templates/objc++/bundle/project/src/test.mm)0
-rw-r--r--xmake/templates/objc++/xcode.bundle/xmake.lua (renamed from xmake/templates/objc++/bundle/project/xmake.lua)0
-rw-r--r--xmake/templates/objc++/xcode.framework/src/Info.plist (renamed from xmake/templates/objc++/framework/project/src/Info.plist)0
-rw-r--r--xmake/templates/objc++/xcode.framework/src/test.h (renamed from xmake/templates/objc++/framework/project/src/test.h)0
-rw-r--r--xmake/templates/objc++/xcode.framework/src/test.mm (renamed from xmake/templates/objc++/framework/project/src/test.mm)0
-rw-r--r--xmake/templates/objc++/xcode.framework/xmake.lua (renamed from xmake/templates/objc++/framework/project/xmake.lua)0
-rw-r--r--xmake/templates/objc/bundle/template.lua2
-rw-r--r--xmake/templates/objc/console/src/main.m (renamed from xmake/templates/objc/console/project/src/main.m)0
-rw-r--r--xmake/templates/objc/console/template.lua2
-rw-r--r--xmake/templates/objc/console/xmake.lua (renamed from xmake/templates/objc/console/project/xmake.lua)0
-rw-r--r--xmake/templates/objc/framework/template.lua2
-rw-r--r--xmake/templates/objc/iosapp/template.lua2
-rw-r--r--xmake/templates/objc/iosapp_with_framework/template.lua2
-rw-r--r--xmake/templates/objc/macapp/template.lua2
-rw-r--r--xmake/templates/objc/macapp_with_framework/template.lua2
-rw-r--r--xmake/templates/objc/xcode.bundle/src/Info.plist (renamed from xmake/templates/objc/bundle/project/src/Info.plist)0
-rw-r--r--xmake/templates/objc/xcode.bundle/src/test.h (renamed from xmake/templates/objc/bundle/project/src/test.h)0
-rw-r--r--xmake/templates/objc/xcode.bundle/src/test.m (renamed from xmake/templates/objc/bundle/project/src/test.m)0
-rw-r--r--xmake/templates/objc/xcode.bundle/xmake.lua (renamed from xmake/templates/objc/bundle/project/xmake.lua)0
-rw-r--r--xmake/templates/objc/xcode.framework/src/Info.plist (renamed from xmake/templates/objc/framework/project/src/Info.plist)0
-rw-r--r--xmake/templates/objc/xcode.framework/src/test.h (renamed from xmake/templates/objc/framework/project/src/test.h)0
-rw-r--r--xmake/templates/objc/xcode.framework/src/test.m (renamed from xmake/templates/objc/framework/project/src/test.m)0
-rw-r--r--xmake/templates/objc/xcode.framework/xmake.lua (renamed from xmake/templates/objc/framework/project/xmake.lua)0
-rw-r--r--xmake/templates/objc/xcode.iosapp/src/AppDelegate.h (renamed from xmake/templates/objc/iosapp/project/src/AppDelegate.h)0
-rw-r--r--xmake/templates/objc/xcode.iosapp/src/AppDelegate.m (renamed from xmake/templates/objc/iosapp/project/src/AppDelegate.m)0
-rw-r--r--xmake/templates/objc/xcode.iosapp/src/Assets.xcassets/AppIcon.appiconset/Contents.json (renamed from xmake/templates/objc/iosapp/project/src/Assets.xcassets/AppIcon.appiconset/Contents.json)0
-rw-r--r--xmake/templates/objc/xcode.iosapp/src/Assets.xcassets/Contents.json (renamed from xmake/templates/objc/iosapp/project/src/Assets.xcassets/Contents.json)0
-rw-r--r--xmake/templates/objc/xcode.iosapp/src/Base.lproj/LaunchScreen.storyboard (renamed from xmake/templates/objc/iosapp/project/src/Base.lproj/LaunchScreen.storyboard)0
-rw-r--r--xmake/templates/objc/xcode.iosapp/src/Base.lproj/Main.storyboard (renamed from xmake/templates/objc/iosapp/project/src/Base.lproj/Main.storyboard)0
-rw-r--r--xmake/templates/objc/xcode.iosapp/src/Info.plist (renamed from xmake/templates/objc/iosapp/project/src/Info.plist)0
-rw-r--r--xmake/templates/objc/xcode.iosapp/src/SceneDelegate.h (renamed from xmake/templates/objc/iosapp/project/src/SceneDelegate.h)0
-rw-r--r--xmake/templates/objc/xcode.iosapp/src/SceneDelegate.m (renamed from xmake/templates/objc/iosapp/project/src/SceneDelegate.m)0
-rw-r--r--xmake/templates/objc/xcode.iosapp/src/ViewController.h (renamed from xmake/templates/objc/iosapp/project/src/ViewController.h)0
-rw-r--r--xmake/templates/objc/xcode.iosapp/src/ViewController.m (renamed from xmake/templates/objc/iosapp/project/src/ViewController.m)0
-rw-r--r--xmake/templates/objc/xcode.iosapp/src/main.m (renamed from xmake/templates/objc/iosapp/project/src/main.m)0
-rw-r--r--xmake/templates/objc/xcode.iosapp/xmake.lua (renamed from xmake/templates/objc/iosapp/project/xmake.lua)0
-rw-r--r--xmake/templates/objc/xcode.iosapp_with_framework/src/app/AppDelegate.h (renamed from xmake/templates/objc/iosapp_with_framework/project/src/app/AppDelegate.h)0
-rw-r--r--xmake/templates/objc/xcode.iosapp_with_framework/src/app/AppDelegate.m (renamed from xmake/templates/objc/iosapp_with_framework/project/src/app/AppDelegate.m)0
-rw-r--r--xmake/templates/objc/xcode.iosapp_with_framework/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json (renamed from xmake/templates/objc/iosapp_with_framework/project/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json)0
-rw-r--r--xmake/templates/objc/xcode.iosapp_with_framework/src/app/Assets.xcassets/Contents.json (renamed from xmake/templates/objc/iosapp_with_framework/project/src/app/Assets.xcassets/Contents.json)0
-rw-r--r--xmake/templates/objc/xcode.iosapp_with_framework/src/app/Base.lproj/LaunchScreen.storyboard (renamed from xmake/templates/objc/iosapp_with_framework/project/src/app/Base.lproj/LaunchScreen.storyboard)0
-rw-r--r--xmake/templates/objc/xcode.iosapp_with_framework/src/app/Base.lproj/Main.storyboard (renamed from xmake/templates/objc/iosapp_with_framework/project/src/app/Base.lproj/Main.storyboard)0
-rw-r--r--xmake/templates/objc/xcode.iosapp_with_framework/src/app/Info.plist (renamed from xmake/templates/objc/iosapp_with_framework/project/src/app/Info.plist)0
-rw-r--r--xmake/templates/objc/xcode.iosapp_with_framework/src/app/SceneDelegate.h (renamed from xmake/templates/objc/iosapp_with_framework/project/src/app/SceneDelegate.h)0
-rw-r--r--xmake/templates/objc/xcode.iosapp_with_framework/src/app/SceneDelegate.m (renamed from xmake/templates/objc/iosapp_with_framework/project/src/app/SceneDelegate.m)0
-rw-r--r--xmake/templates/objc/xcode.iosapp_with_framework/src/app/ViewController.h (renamed from xmake/templates/objc/iosapp_with_framework/project/src/app/ViewController.h)0
-rw-r--r--xmake/templates/objc/xcode.iosapp_with_framework/src/app/ViewController.m (renamed from xmake/templates/objc/iosapp_with_framework/project/src/app/ViewController.m)0
-rw-r--r--xmake/templates/objc/xcode.iosapp_with_framework/src/app/main.m (renamed from xmake/templates/objc/iosapp_with_framework/project/src/app/main.m)0
-rw-r--r--xmake/templates/objc/xcode.iosapp_with_framework/src/framework/Info.plist (renamed from xmake/templates/objc/iosapp_with_framework/project/src/framework/Info.plist)0
-rw-r--r--xmake/templates/objc/xcode.iosapp_with_framework/src/framework/test.h (renamed from xmake/templates/objc/iosapp_with_framework/project/src/framework/test.h)0
-rw-r--r--xmake/templates/objc/xcode.iosapp_with_framework/src/framework/test.m (renamed from xmake/templates/objc/iosapp_with_framework/project/src/framework/test.m)0
-rw-r--r--xmake/templates/objc/xcode.iosapp_with_framework/xmake.lua (renamed from xmake/templates/objc/iosapp_with_framework/project/xmake.lua)0
-rw-r--r--xmake/templates/objc/xcode.macapp/src/AppDelegate.h (renamed from xmake/templates/objc/macapp/project/src/AppDelegate.h)0
-rw-r--r--xmake/templates/objc/xcode.macapp/src/AppDelegate.m (renamed from xmake/templates/objc/macapp/project/src/AppDelegate.m)0
-rw-r--r--xmake/templates/objc/xcode.macapp/src/Assets.xcassets/AppIcon.appiconset/Contents.json (renamed from xmake/templates/objc/macapp/project/src/Assets.xcassets/AppIcon.appiconset/Contents.json)0
-rw-r--r--xmake/templates/objc/xcode.macapp/src/Assets.xcassets/Contents.json (renamed from xmake/templates/objc/macapp/project/src/Assets.xcassets/Contents.json)0
-rw-r--r--xmake/templates/objc/xcode.macapp/src/Base.lproj/Main.storyboard (renamed from xmake/templates/objc/macapp/project/src/Base.lproj/Main.storyboard)0
-rw-r--r--xmake/templates/objc/xcode.macapp/src/Info.plist (renamed from xmake/templates/objc/macapp/project/src/Info.plist)0
-rw-r--r--xmake/templates/objc/xcode.macapp/src/ViewController.h (renamed from xmake/templates/objc/macapp/project/src/ViewController.h)0
-rw-r--r--xmake/templates/objc/xcode.macapp/src/ViewController.m (renamed from xmake/templates/objc/macapp/project/src/ViewController.m)0
-rw-r--r--xmake/templates/objc/xcode.macapp/src/main.m (renamed from xmake/templates/objc/macapp/project/src/main.m)0
-rw-r--r--xmake/templates/objc/xcode.macapp/src/test.entitlements (renamed from xmake/templates/objc/macapp/project/src/test.entitlements)0
-rw-r--r--xmake/templates/objc/xcode.macapp/xmake.lua (renamed from xmake/templates/objc/macapp/project/xmake.lua)0
-rw-r--r--xmake/templates/objc/xcode.macapp_with_framework/src/app/AppDelegate.h (renamed from xmake/templates/objc/macapp_with_framework/project/src/app/AppDelegate.h)0
-rw-r--r--xmake/templates/objc/xcode.macapp_with_framework/src/app/AppDelegate.m (renamed from xmake/templates/objc/macapp_with_framework/project/src/app/AppDelegate.m)0
-rw-r--r--xmake/templates/objc/xcode.macapp_with_framework/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json (renamed from xmake/templates/objc/macapp_with_framework/project/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json)0
-rw-r--r--xmake/templates/objc/xcode.macapp_with_framework/src/app/Assets.xcassets/Contents.json (renamed from xmake/templates/objc/macapp_with_framework/project/src/app/Assets.xcassets/Contents.json)0
-rw-r--r--xmake/templates/objc/xcode.macapp_with_framework/src/app/Base.lproj/Main.storyboard (renamed from xmake/templates/objc/macapp_with_framework/project/src/app/Base.lproj/Main.storyboard)0
-rw-r--r--xmake/templates/objc/xcode.macapp_with_framework/src/app/Info.plist (renamed from xmake/templates/objc/macapp_with_framework/project/src/app/Info.plist)0
-rw-r--r--xmake/templates/objc/xcode.macapp_with_framework/src/app/ViewController.h (renamed from xmake/templates/objc/macapp_with_framework/project/src/app/ViewController.h)0
-rw-r--r--xmake/templates/objc/xcode.macapp_with_framework/src/app/ViewController.m (renamed from xmake/templates/objc/macapp_with_framework/project/src/app/ViewController.m)0
-rw-r--r--xmake/templates/objc/xcode.macapp_with_framework/src/app/main.m (renamed from xmake/templates/objc/macapp_with_framework/project/src/app/main.m)0
-rw-r--r--xmake/templates/objc/xcode.macapp_with_framework/src/app/test.entitlements (renamed from xmake/templates/objc/macapp_with_framework/project/src/app/test.entitlements)0
-rw-r--r--xmake/templates/objc/xcode.macapp_with_framework/src/framework/Info.plist (renamed from xmake/templates/objc/macapp_with_framework/project/src/framework/Info.plist)0
-rw-r--r--xmake/templates/objc/xcode.macapp_with_framework/src/framework/test.h (renamed from xmake/templates/objc/macapp_with_framework/project/src/framework/test.h)0
-rw-r--r--xmake/templates/objc/xcode.macapp_with_framework/src/framework/test.m (renamed from xmake/templates/objc/macapp_with_framework/project/src/framework/test.m)0
-rw-r--r--xmake/templates/objc/xcode.macapp_with_framework/xmake.lua (renamed from xmake/templates/objc/macapp_with_framework/project/xmake.lua)0
-rw-r--r--xmake/templates/pascal/console/src/main.pas (renamed from xmake/templates/pascal/console/project/src/main.pas)0
-rw-r--r--xmake/templates/pascal/console/template.lua2
-rw-r--r--xmake/templates/pascal/console/xmake.lua (renamed from xmake/templates/pascal/console/project/xmake.lua)0
-rw-r--r--xmake/templates/pascal/shared/src/foo.pas (renamed from xmake/templates/pascal/shared/project/src/foo.pas)0
-rw-r--r--xmake/templates/pascal/shared/src/main.pas (renamed from xmake/templates/pascal/shared/project/src/main.pas)0
-rw-r--r--xmake/templates/pascal/shared/template.lua2
-rw-r--r--xmake/templates/pascal/shared/xmake.lua (renamed from xmake/templates/pascal/shared/project/xmake.lua)0
-rw-r--r--xmake/templates/rust/console/src/main.rs (renamed from xmake/templates/rust/console/project/src/main.rs)0
-rw-r--r--xmake/templates/rust/console/template.lua2
-rw-r--r--xmake/templates/rust/console/xmake.lua (renamed from xmake/templates/rust/console/project/xmake.lua)0
-rw-r--r--xmake/templates/rust/shared/src/foo.rs (renamed from xmake/templates/rust/shared/project/src/foo.rs)0
-rw-r--r--xmake/templates/rust/shared/src/main.rs (renamed from xmake/templates/rust/shared/project/src/main.rs)0
-rw-r--r--xmake/templates/rust/shared/template.lua2
-rw-r--r--xmake/templates/rust/shared/xmake.lua (renamed from xmake/templates/rust/shared/project/xmake.lua)0
-rw-r--r--xmake/templates/rust/static/src/foo.rs (renamed from xmake/templates/rust/static/project/src/foo.rs)0
-rw-r--r--xmake/templates/rust/static/src/main.rs (renamed from xmake/templates/rust/static/project/src/main.rs)0
-rw-r--r--xmake/templates/rust/static/template.lua2
-rw-r--r--xmake/templates/rust/static/xmake.lua (renamed from xmake/templates/rust/static/project/xmake.lua)0
-rw-r--r--xmake/templates/swift/console/src/main.swift (renamed from xmake/templates/swift/console/project/src/main.swift)0
-rw-r--r--xmake/templates/swift/console/template.lua2
-rw-r--r--xmake/templates/swift/console/xmake.lua (renamed from xmake/templates/swift/console/project/xmake.lua)0
-rw-r--r--xmake/templates/vala/console/src/main.vala (renamed from xmake/templates/vala/console/project/src/main.vala)0
-rw-r--r--xmake/templates/vala/console/template.lua2
-rw-r--r--xmake/templates/vala/console/xmake.lua (renamed from xmake/templates/vala/console/project/xmake.lua)0
-rw-r--r--xmake/templates/vala/shared/src/main.vala (renamed from xmake/templates/vala/shared/project/src/main.vala)0
-rw-r--r--xmake/templates/vala/shared/src/mymath.vala (renamed from xmake/templates/vala/shared/project/src/mymath.vala)0
-rw-r--r--xmake/templates/vala/shared/template.lua2
-rw-r--r--xmake/templates/vala/shared/xmake.lua (renamed from xmake/templates/vala/shared/project/xmake.lua)0
-rw-r--r--xmake/templates/vala/static/src/main.vala (renamed from xmake/templates/vala/static/project/src/main.vala)0
-rw-r--r--xmake/templates/vala/static/src/mymath.vala (renamed from xmake/templates/vala/static/project/src/mymath.vala)0
-rw-r--r--xmake/templates/vala/static/template.lua2
-rw-r--r--xmake/templates/vala/static/xmake.lua (renamed from xmake/templates/vala/static/project/xmake.lua)0
-rw-r--r--xmake/templates/zig/console/src/main.zig (renamed from xmake/templates/zig/console/project/src/main.zig)0
-rw-r--r--xmake/templates/zig/console/template.lua2
-rw-r--r--xmake/templates/zig/console/xmake.lua (renamed from xmake/templates/zig/console/project/xmake.lua)0
-rw-r--r--xmake/templates/zig/shared/src/main.zig (renamed from xmake/templates/zig/shared/project/src/main.zig)0
-rw-r--r--xmake/templates/zig/shared/src/test.zig (renamed from xmake/templates/zig/shared/project/src/test.zig)0
-rw-r--r--xmake/templates/zig/shared/template.lua2
-rw-r--r--xmake/templates/zig/shared/xmake.lua (renamed from xmake/templates/zig/shared/project/xmake.lua)0
-rw-r--r--xmake/templates/zig/static/src/main.zig (renamed from xmake/templates/zig/static/project/src/main.zig)0
-rw-r--r--xmake/templates/zig/static/src/test.zig (renamed from xmake/templates/zig/static/project/src/test.zig)0
-rw-r--r--xmake/templates/zig/static/template.lua2
-rw-r--r--xmake/templates/zig/static/xmake.lua (renamed from xmake/templates/zig/static/project/xmake.lua)0
327 files changed, 190 insertions, 546 deletions
diff --git a/xmake/actions/create/main.lua b/xmake/actions/create/main.lua
index 2d96741bc..b4f199b69 100644
--- a/xmake/actions/create/main.lua
+++ b/xmake/actions/create/main.lua
@@ -21,13 +21,7 @@
-- imports
import("core.base.option")
import("core.project.project")
-import("core.project.template")
-
--- get the builtin variables
-function _get_builtinvars(tempinst, targetname)
- return {TARGETNAME = targetname,
- FAQ = function() return io.readfile(path.join(os.programdir(), "scripts", "faq.lua")) end}
-end
+import("actions.create.template", {rootdir = os.programdir()})
-- create project from template
function _create_project(language, templateid, targetname)
@@ -41,36 +35,6 @@ function _create_project(language, templateid, targetname)
-- check the template id
assert(templateid, "no template id!")
- -- load all templates for the given language
- local templates = template.templates(language)
-
- -- TODO: deprecated
- -- in order to be compatible with the old version template
- local templates_new = { quickapp_qt = "qt.quickapp",
- widgetapp_qt = "qt.widgetapp",
- console_qt = "qt.console",
- static_qt = "qt.static",
- shared_qt = "qt.shared",
- console_tbox = "tbox.console",
- static_tbox = "tbox.static",
- shared_tbox = "tbox.shared"}
- if templates_new[templateid] then
- cprint("${yellow}deprecated: please uses template(%s) instead of template(%s)!", templates_new[templateid], templateid)
- templateid = templates_new[templateid]
- end
-
- -- get the given template instance
- local tempinst = nil
- if templates then
- for _, t in ipairs(templates) do
- if t:name() == templateid then
- tempinst = t
- break
- end
- end
- end
- assert(tempinst and tempinst:scriptdir(), "invalid template id: %s!", templateid)
-
-- get project directory
local projectdir = path.absolute(option.get("project") or path.join(os.curdir(), targetname))
if not os.isdir(projectdir) then
@@ -94,48 +58,24 @@ function _create_project(language, templateid, targetname)
os.cd(projectdir)
-- create project
- local filedirs = {}
- local sourcedir = path.join(tempinst:scriptdir(), "project")
- if os.isdir(sourcedir) then
- for _, filedir in ipairs(os.filedirs(path.join(sourcedir, "*"))) do
- -- https://github.com/xmake-io/xmake/issues/5138#issuecomment-2329238617
- os.cp(filedir, projectdir, {writeable = true})
- table.insert(filedirs, path.relative(filedir, sourcedir))
- end
- os.cp(path.join(os.programdir(), "scripts", "gitignore"), path.join(projectdir, ".gitignore"))
- table.insert(filedirs, ".gitignore")
- else
- raise("template(%s): project not found!", templateid)
- end
+ local sourcedir = template.templatedir(language, templateid)
+ assert(os.isdir(sourcedir), "invalid template id: %s!", templateid)
-- get the builtin variables
- local builtinvars = _get_builtinvars(tempinst, targetname)
+ local builtinvars = template.builtinvars(targetname)
- -- replace all variables
- for _, configfile in ipairs(tempinst:get("configfiles")) do
- local pattern = "%${(.-)}"
- io.gsub(configfile, "(" .. pattern .. ")", function(_, variable)
- variable = variable:trim()
- local value = builtinvars[variable]
- return type(value) == "function" and value() or value
- end)
- end
+ local createdfiles = template.copy_files(sourcedir, projectdir, builtinvars)
- -- do after_create
- local after_create = tempinst:get("create_after")
- if after_create then
- after_create(tempinst, {targetname = targetname})
+ if not os.isfile(path.join(projectdir, ".gitignore")) then
+ os.cp(path.join(os.programdir(), "scripts", "gitignore"), path.join(projectdir, ".gitignore"))
+ table.insert(createdfiles, path.join(projectdir, ".gitignore"))
end
- -- trace
- for _, filedir in ipairs(filedirs) do
- if os.isdir(filedir) then
- for _, file in ipairs(os.files(path.join(filedir, "**"))) do
- cprint(" ${green}[+]: ${clear}%s", file)
- end
- else
- cprint(" ${green}[+]: ${clear}%s", filedir)
- end
+ template.replace_variables_in_files(createdfiles, builtinvars)
+
+ table.sort(createdfiles)
+ for _, file in ipairs(createdfiles) do
+ cprint(" ${green}[+]: ${clear}%s", path.relative(file, projectdir))
end
end
diff --git a/xmake/actions/create/template.lua b/xmake/actions/create/template.lua
new file mode 100644
index 000000000..dec10658f
--- /dev/null
+++ b/xmake/actions/create/template.lua
@@ -0,0 +1,134 @@
+--!A cross-platform build utility based on Lua
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015-present, Xmake Open Source Community.
+--
+-- @author ruki
+-- @file template.lua
+--
+
+function builtinvars(targetname)
+ return {TARGETNAME = targetname,
+ FAQ = function() return io.readfile(path.join(os.programdir(), "scripts", "faq.lua")) end}
+end
+
+function replace_variables_in_string(s, vars)
+ local pattern = "%${(.-)}"
+ return (s:gsub(pattern, function (variable)
+ variable = variable:trim()
+ local value = vars[variable]
+ if value == nil then
+ return "${" .. variable .. "}"
+ end
+ return type(value) == "function" and value() or tostring(value)
+ end))
+end
+
+function is_binary_file(filepath)
+ local file = io.open(filepath, "rb")
+ if not file then
+ return false
+ end
+ local data = file:read(4096) or ""
+ file:close()
+ return data:find("\0", 1, true) ~= nil
+end
+
+function templatedir(lang, templateid)
+ assert(lang)
+ assert(templateid)
+ return path.join(os.programdir(), "templates", lang, templateid)
+end
+
+function copy_files(sourcedir, projectdir, vars)
+ local createdfiles = {}
+ for _, srcfile in ipairs(os.files(path.join(sourcedir, "**"))) do
+ local relpath = path.relative(srcfile, sourcedir)
+ if relpath ~= "template.lua" then
+ local dstrelpath = replace_variables_in_string(relpath, vars)
+ local dstfile = path.absolute(path.join(projectdir, dstrelpath))
+ os.mkdir(path.directory(dstfile))
+ os.cp(srcfile, dstfile, {writeable = true})
+ table.insert(createdfiles, dstfile)
+ end
+ end
+ return createdfiles
+end
+
+function replace_variables_in_files(files, vars)
+ local pattern = "%${(.-)}"
+ for _, file in ipairs(files) do
+ if os.isfile(file) and not is_binary_file(file) then
+ io.gsub(file, "(" .. pattern .. ")", function(_, variable)
+ variable = variable:trim()
+ local value = vars[variable]
+ if value == nil then
+ return "${" .. variable .. "}"
+ end
+ return type(value) == "function" and value() or tostring(value)
+ end, {encoding = "binary"})
+ end
+ end
+end
+
+function languages()
+ local languages = {}
+ local languages_dirs = os.dirs(path.join(os.programdir(), "templates", "*"))
+ if languages_dirs then
+ for _, d in ipairs(languages_dirs) do
+ table.insert(languages, path.basename(d))
+ end
+ end
+ table.sort(languages)
+ return languages
+end
+
+function templates(lang)
+ assert(lang)
+ local results = {}
+ local templateroot = path.join(os.programdir(), "templates", lang)
+ local templatedirs = os.dirs(path.join(templateroot, "*"))
+ if templatedirs then
+ for _, templatedir in ipairs(templatedirs) do
+ if os.isfile(path.join(templatedir, "xmake.lua")) then
+ table.insert(results, path.filename(templatedir))
+ end
+ end
+ end
+ table.sort(results)
+ return results
+end
+
+function languages_for_template(templateid)
+ local accepted = {}
+ for _, l in ipairs(languages()) do
+ if os.isdir(path.join(os.programdir(), "templates", l, templateid)) then
+ table.insert(accepted, l)
+ end
+ end
+ return accepted
+end
+
+function templates_with_languages()
+ local templates_map = {}
+ for _, lang in ipairs(languages()) do
+ for _, name in ipairs(templates(lang)) do
+ templates_map[name] = templates_map[name] or {}
+ if not table.contains(templates_map[name], lang) then
+ table.insert(templates_map[name], lang)
+ end
+ end
+ end
+ return templates_map
+end
diff --git a/xmake/actions/create/xmake.lua b/xmake/actions/create/xmake.lua
index 30cfa2684..3d14a856a 100644
--- a/xmake/actions/create/xmake.lua
+++ b/xmake/actions/create/xmake.lua
@@ -18,105 +18,54 @@
-- @file xmake.lua
--
--- define task
task("create")
-
- -- set category
set_category("action")
-
- -- on run
on_run("main")
-
- -- set menu
set_menu {
- -- usage
- usage = "xmake create [options] [target]"
-
- -- description
- , description = "Create a new project."
-
- -- options
- , options =
- {
- {'f', "force", "k", nil, "Force to create project in a non-empty directory."}
- , {'l', "language", "kv", "c++", "The project language"
-
- -- show the description of all languages
- , values = function (complete, opt)
-
- -- import template
- import("core.project.template")
-
- -- get languages
- local languages = template.languages()
-
- if not complete or not opt.template then return languages end
-
- local accepted_lang = {}
- for _, l in ipairs(languages) do
- for _, t in ipairs(template.templates(l)) do
- if t:name() == opt.template then
- table.insert(accepted_lang, l)
- break
- end
- end
- end
+ usage = "xmake create [options] [target]",
+ description = "Create a new project.",
+ options = {
+ {'f', "force", "k", nil, "Force to create project in a non-empty directory."},
+ {'l', "language", "kv", "c++", "The project language",
+ values = function (complete, opt)
+ import("actions.create.template", {rootdir = os.programdir()})
- return accepted_lang
- end }
- , {'t', "template", "kv", "console", "Select the project template id or name of the given language.",
+ local languages = template.languages()
+ if not complete or not opt.template then
+ return languages
+ end
+ return template.languages_for_template(opt.template)
+ end },
+ {'t', "template", "kv", "console", "Select the project template id or name of the given language.",
+ function ()
+ import("actions.create.template", {rootdir = os.programdir()})
- -- show the description of all templates
- function ()
+ local templates = template.templates_with_languages()
+ local templates_sorted = {}
+ for name, languages in pairs(templates) do
+ table.insert(templates_sorted, {name = name, languages = languages})
+ end
+ table.sort(templates_sorted, function(a, b) return a.name < b.name end)
- -- import template
- import("core.project.template")
-
- -- get templates
- local templates = {}
- for _, l in ipairs(template.languages()) do
- for _, t in ipairs(template.templates(l)) do
- templates[t:name()] = templates[t:name()] or {}
- table.insert(templates[t:name()], l)
- end
- end
-
- -- get sorted templates
- local templates_sorted = {}
- for name, languages in pairs(templates) do
- table.insert(templates_sorted, {name = name, languages = languages})
- end
- table.sort(templates_sorted, function(a, b) return a.name < b.name end)
-
- -- make description
- local description = {}
- for _, t in ipairs(templates_sorted) do
- table.insert(description, " - " .. t.name .. ": " .. table.concat(t.languages, ", "))
- end
- return description
+ local description = {}
+ for _, t in ipairs(templates_sorted) do
+ table.insert(description, " - " .. t.name .. ": " .. table.concat(t.languages, ", "))
+ end
+ return description
+ end,
+ values = function (complete, opt)
+ if complete then
+ import("actions.create.template", {rootdir = os.programdir()})
+ local templates = {}
+ local languages = opt.language and {opt.language} or template.languages()
+ for _, l in ipairs(languages) do
+ table.join2(templates, template.templates(l))
end
- , values = function (complete, opt)
- if not complete then return end
-
- -- import template
- import("core.project.template")
-
- -- get templates
- local templates = {}
- for _, l in ipairs(opt.language and {opt.language} or template.languages()) do
- for _, t in ipairs(template.templates(l)) do
- table.insert(templates, t:name())
- end
- end
-
- return templates
- end }
-
- , {}
- , {nil, "target", "v", nil, "Create the given target."
- , "Uses the project name as target if not exists." }
- }
- }
-
-
-
+ return templates
+ end
+ end},
+ {},
+ {nil, "target", "v", nil, "Create the given target."
+ , "Uses the project name as target if not exists."}
+ }
+ }
diff --git a/xmake/core/project/template.lua b/xmake/core/project/template.lua
deleted file mode 100644
index aa246c4c6..000000000
--- a/xmake/core/project/template.lua
+++ /dev/null
@@ -1,168 +0,0 @@
---!A cross-platform build utility based on Lua
---
--- Licensed under the Apache License, Version 2.0 (the "License");
--- you may not use this file except in compliance with the License.
--- You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- Copyright (C) 2015-present, Xmake Open Source Community.
---
--- @author ruki
--- @file template.lua
---
-
--- define module: template
-local template = template or {}
-local _instance = _instance or {}
-
--- load modules
-local os = require("base/os")
-local io = require("base/io")
-local path = require("base/path")
-local table = require("base/table")
-local utils = require("base/utils")
-local string = require("base/string")
-local interpreter = require("base/interpreter")
-
--- new an instance
-function _instance.new(name, info, scriptdir)
- local instance = table.inherit(_instance)
- instance._NAME = name
- instance._INFO = info
- instance._SCRIPTDIR = scriptdir
- return instance
-end
-
--- get the package name
-function _instance:name()
- return self._NAME
-end
-
--- get the package configure
-function _instance:get(name)
-
- -- get it from info first
- local value = self._INFO:get(name)
- if value ~= nil then
- return value
- end
-end
-
--- get the script directory
-function _instance:scriptdir()
- return self._SCRIPTDIR
-end
-
--- the interpreter
-function template._interpreter()
-
- -- the interpreter has been initialized? return it directly
- if template._INTERPRETER then
- return template._INTERPRETER
- end
-
- -- init interpreter
- local interp = interpreter.new()
- assert(interp)
-
- -- define apis
- interp:api_define
- {
- values =
- {
- -- add_xxx
- "template.add_configfiles"
- }
- , script =
- {
- -- after_xxx
- "template.after_create"
- }
- }
-
- -- save interpreter
- template._INTERPRETER = interp
-
- -- ok?
- return interp
-end
-
--- get the language list
-function template.languages()
-
- -- make list
- local list = {}
-
- -- get the language list
- local languages = os.dirs(path.join(os.programdir(), "templates", "*"))
- if languages then
- for _, v in ipairs(languages) do
- table.insert(list, path.basename(v))
- end
- end
-
- -- ok?
- return list
-end
-
--- load all templates from the given language
-function template.templates(language)
-
- -- check
- assert(language)
-
- -- get interpreter
- local interp = template._interpreter()
- assert(interp)
-
- -- load all templates
- local templates = {}
- local templatefiles = os.files(path.join(os.programdir(), "templates", language, "*", "template.lua"))
- if templatefiles then
-
- -- load template
- for _, templatefile in ipairs(templatefiles) do
-
- -- load script
- local ok, errors = interp:load(templatefile)
- if not ok then
- os.raise(errors)
- end
-
- -- load template
- local results, errors = interp:make("template", true, true)
- if not results then
- os.raise(errors)
- end
-
- -- get the template name and info
- local templatename = nil
- local templateinfo = nil
- for name, info in pairs(results) do
- templatename = name
- templateinfo = info
- break
- end
- if not templateinfo then
- return nil, string.format("%s: package not found!", templatefile)
- end
-
- -- new an instance
- local instance = _instance.new(templatename, templateinfo, path.directory(templatefile))
-
- -- insert to templates
- table.insert(templates, instance)
- end
- end
- return templates
-end
-
--- return module: template
-return template
diff --git a/xmake/core/sandbox/modules/import/core/project/template.lua b/xmake/core/sandbox/modules/import/core/project/template.lua
deleted file mode 100644
index 4fe8d378b..000000000
--- a/xmake/core/sandbox/modules/import/core/project/template.lua
+++ /dev/null
@@ -1,39 +0,0 @@
---!A cross-platform build utility based on Lua
---
--- Licensed under the Apache License, Version 2.0 (the "License");
--- you may not use this file except in compliance with the License.
--- You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- Copyright (C) 2015-present, Xmake Open Source Community.
---
--- @author ruki
--- @file template.lua
---
-
--- define module
-local sandbox_core_project_template = sandbox_core_project_template or {}
-
--- load modules
-local template = require("project/template")
-local raise = require("sandbox/modules/raise")
-
--- get all languages
-function sandbox_core_project_template.languages()
- return assert(template.languages())
-end
-
--- load all templates from the given language
-function sandbox_core_project_template.templates(language)
- return assert(template.templates(language))
-end
-
--- return module
-return sandbox_core_project_template
diff --git a/xmake/templates/c++/console/project/src/main.cpp b/xmake/templates/c++/console/src/main.cpp
index 9b6abffea..9b6abffea 100644
--- a/xmake/templates/c++/console/project/src/main.cpp
+++ b/xmake/templates/c++/console/src/main.cpp
diff --git a/xmake/templates/c++/console/template.lua b/xmake/templates/c++/console/template.lua
deleted file mode 100644
index ed2e13b57..000000000
--- a/xmake/templates/c++/console/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("console")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/c++/console/project/xmake.lua b/xmake/templates/c++/console/xmake.lua
index 649206eb1..649206eb1 100644
--- a/xmake/templates/c++/console/project/xmake.lua
+++ b/xmake/templates/c++/console/xmake.lua
diff --git a/xmake/templates/c++/module.binary/project/modules/binary/bar/.gitignore b/xmake/templates/c++/module.binary/modules/binary/bar/.gitignore
index 152105761..152105761 100644
--- a/xmake/templates/c++/module.binary/project/modules/binary/bar/.gitignore
+++ b/xmake/templates/c++/module.binary/modules/binary/bar/.gitignore
diff --git a/xmake/templates/c++/module.binary/project/modules/binary/bar/src/add.cpp b/xmake/templates/c++/module.binary/modules/binary/bar/src/add.cpp
index 93fdf0ad8..93fdf0ad8 100644
--- a/xmake/templates/c++/module.binary/project/modules/binary/bar/src/add.cpp
+++ b/xmake/templates/c++/module.binary/modules/binary/bar/src/add.cpp
diff --git a/xmake/templates/c++/module.binary/project/modules/binary/bar/src/sub.cpp b/xmake/templates/c++/module.binary/modules/binary/bar/src/sub.cpp
index ae7b6d1f2..ae7b6d1f2 100644
--- a/xmake/templates/c++/module.binary/project/modules/binary/bar/src/sub.cpp
+++ b/xmake/templates/c++/module.binary/modules/binary/bar/src/sub.cpp
diff --git a/xmake/templates/c++/module.binary/project/modules/binary/bar/xmake.lua b/xmake/templates/c++/module.binary/modules/binary/bar/xmake.lua
index add3c6e97..add3c6e97 100644
--- a/xmake/templates/c++/module.binary/project/modules/binary/bar/xmake.lua
+++ b/xmake/templates/c++/module.binary/modules/binary/bar/xmake.lua
diff --git a/xmake/templates/c++/module.binary/project/src/main.cpp b/xmake/templates/c++/module.binary/src/main.cpp
index 9b6abffea..9b6abffea 100644
--- a/xmake/templates/c++/module.binary/project/src/main.cpp
+++ b/xmake/templates/c++/module.binary/src/main.cpp
diff --git a/xmake/templates/c++/module.binary/template.lua b/xmake/templates/c++/module.binary/template.lua
deleted file mode 100644
index 917f4eb23..000000000
--- a/xmake/templates/c++/module.binary/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("module.binary")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/c++/module.binary/project/xmake.lua b/xmake/templates/c++/module.binary/xmake.lua
index 47fed5bc6..47fed5bc6 100644
--- a/xmake/templates/c++/module.binary/project/xmake.lua
+++ b/xmake/templates/c++/module.binary/xmake.lua
diff --git a/xmake/templates/c++/module.shared/project/modules/shared/foo/src/foo.cpp b/xmake/templates/c++/module.shared/modules/shared/foo/src/foo.cpp
index adde214ca..adde214ca 100644
--- a/xmake/templates/c++/module.shared/project/modules/shared/foo/src/foo.cpp
+++ b/xmake/templates/c++/module.shared/modules/shared/foo/src/foo.cpp
diff --git a/xmake/templates/c++/module.shared/project/modules/shared/foo/xmake.lua b/xmake/templates/c++/module.shared/modules/shared/foo/xmake.lua
index 9b3423d41..9b3423d41 100644
--- a/xmake/templates/c++/module.shared/project/modules/shared/foo/xmake.lua
+++ b/xmake/templates/c++/module.shared/modules/shared/foo/xmake.lua
diff --git a/xmake/templates/c++/module.shared/project/src/main.cpp b/xmake/templates/c++/module.shared/src/main.cpp
index 9b6abffea..9b6abffea 100644
--- a/xmake/templates/c++/module.shared/project/src/main.cpp
+++ b/xmake/templates/c++/module.shared/src/main.cpp
diff --git a/xmake/templates/c++/module.shared/template.lua b/xmake/templates/c++/module.shared/template.lua
deleted file mode 100644
index 7869165b7..000000000
--- a/xmake/templates/c++/module.shared/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("module.shared")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/c++/module.shared/project/xmake.lua b/xmake/templates/c++/module.shared/xmake.lua
index 34496aa5b..34496aa5b 100644
--- a/xmake/templates/c++/module.shared/project/xmake.lua
+++ b/xmake/templates/c++/module.shared/xmake.lua
diff --git a/xmake/templates/c++/qt.console/project/src/main.cpp b/xmake/templates/c++/qt.console/src/main.cpp
index e876eea4f..e876eea4f 100644
--- a/xmake/templates/c++/qt.console/project/src/main.cpp
+++ b/xmake/templates/c++/qt.console/src/main.cpp
diff --git a/xmake/templates/c++/qt.console/template.lua b/xmake/templates/c++/qt.console/template.lua
deleted file mode 100644
index 6b5c26b3a..000000000
--- a/xmake/templates/c++/qt.console/template.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-template("qt.console")
- add_configfiles("xmake.lua")
-
diff --git a/xmake/templates/c++/qt.console/project/xmake.lua b/xmake/templates/c++/qt.console/xmake.lua
index fc9104ce6..fc9104ce6 100644
--- a/xmake/templates/c++/qt.console/project/xmake.lua
+++ b/xmake/templates/c++/qt.console/xmake.lua
diff --git a/xmake/templates/c++/qt.quickapp/project/src/main.cpp b/xmake/templates/c++/qt.quickapp/src/main.cpp
index 7d9cb80df..7d9cb80df 100644
--- a/xmake/templates/c++/qt.quickapp/project/src/main.cpp
+++ b/xmake/templates/c++/qt.quickapp/src/main.cpp
diff --git a/xmake/templates/c++/qt.quickapp/project/src/main.qml b/xmake/templates/c++/qt.quickapp/src/main.qml
index 120cdbddd..120cdbddd 100644
--- a/xmake/templates/c++/qt.quickapp/project/src/main.qml
+++ b/xmake/templates/c++/qt.quickapp/src/main.qml
diff --git a/xmake/templates/c++/qt.quickapp/project/src/qml.qrc b/xmake/templates/c++/qt.quickapp/src/qml.qrc
index 5f6483ac3..5f6483ac3 100644
--- a/xmake/templates/c++/qt.quickapp/project/src/qml.qrc
+++ b/xmake/templates/c++/qt.quickapp/src/qml.qrc
diff --git a/xmake/templates/c++/qt.quickapp/template.lua b/xmake/templates/c++/qt.quickapp/template.lua
deleted file mode 100644
index 144deb174..000000000
--- a/xmake/templates/c++/qt.quickapp/template.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-template("qt.quickapp")
- add_configfiles("xmake.lua")
-
diff --git a/xmake/templates/c++/qt.quickapp/project/xmake.lua b/xmake/templates/c++/qt.quickapp/xmake.lua
index 4dd4fc684..4dd4fc684 100644
--- a/xmake/templates/c++/qt.quickapp/project/xmake.lua
+++ b/xmake/templates/c++/qt.quickapp/xmake.lua
diff --git a/xmake/templates/c++/qt.quickapp_static/project/src/main.cpp b/xmake/templates/c++/qt.quickapp_static/src/main.cpp
index 7d9cb80df..7d9cb80df 100644
--- a/xmake/templates/c++/qt.quickapp_static/project/src/main.cpp
+++ b/xmake/templates/c++/qt.quickapp_static/src/main.cpp
diff --git a/xmake/templates/c++/qt.quickapp_static/project/src/main.qml b/xmake/templates/c++/qt.quickapp_static/src/main.qml
index 120cdbddd..120cdbddd 100644
--- a/xmake/templates/c++/qt.quickapp_static/project/src/main.qml
+++ b/xmake/templates/c++/qt.quickapp_static/src/main.qml
diff --git a/xmake/templates/c++/qt.quickapp_static/project/src/qml.qrc b/xmake/templates/c++/qt.quickapp_static/src/qml.qrc
index 5f6483ac3..5f6483ac3 100644
--- a/xmake/templates/c++/qt.quickapp_static/project/src/qml.qrc
+++ b/xmake/templates/c++/qt.quickapp_static/src/qml.qrc
diff --git a/xmake/templates/c++/qt.quickapp_static/template.lua b/xmake/templates/c++/qt.quickapp_static/template.lua
deleted file mode 100644
index ff528f69f..000000000
--- a/xmake/templates/c++/qt.quickapp_static/template.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-template("qt.quickapp_static")
- add_configfiles("xmake.lua")
-
diff --git a/xmake/templates/c++/qt.quickapp_static/project/xmake.lua b/xmake/templates/c++/qt.quickapp_static/xmake.lua
index 0d752b270..0d752b270 100644
--- a/xmake/templates/c++/qt.quickapp_static/project/xmake.lua
+++ b/xmake/templates/c++/qt.quickapp_static/xmake.lua
diff --git a/xmake/templates/c++/qt.shared/project/src/demo.cpp b/xmake/templates/c++/qt.shared/src/demo.cpp
index 576c861f0..576c861f0 100644
--- a/xmake/templates/c++/qt.shared/project/src/demo.cpp
+++ b/xmake/templates/c++/qt.shared/src/demo.cpp
diff --git a/xmake/templates/c++/qt.shared/project/src/demo.h b/xmake/templates/c++/qt.shared/src/demo.h
index 89f29ec46..89f29ec46 100644
--- a/xmake/templates/c++/qt.shared/project/src/demo.h
+++ b/xmake/templates/c++/qt.shared/src/demo.h
diff --git a/xmake/templates/c++/qt.shared/project/src/demo_global.h b/xmake/templates/c++/qt.shared/src/demo_global.h
index d6b1ddf0b..d6b1ddf0b 100644
--- a/xmake/templates/c++/qt.shared/project/src/demo_global.h
+++ b/xmake/templates/c++/qt.shared/src/demo_global.h
diff --git a/xmake/templates/c++/qt.shared/template.lua b/xmake/templates/c++/qt.shared/template.lua
deleted file mode 100644
index 24960332a..000000000
--- a/xmake/templates/c++/qt.shared/template.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-template("qt.shared")
- add_configfiles("xmake.lua")
-
diff --git a/xmake/templates/c++/qt.shared/project/xmake.lua b/xmake/templates/c++/qt.shared/xmake.lua
index aa5cebf0a..aa5cebf0a 100644
--- a/xmake/templates/c++/qt.shared/project/xmake.lua
+++ b/xmake/templates/c++/qt.shared/xmake.lua
diff --git a/xmake/templates/c++/qt.static/project/src/demo.cpp b/xmake/templates/c++/qt.static/src/demo.cpp
index 576c861f0..576c861f0 100644
--- a/xmake/templates/c++/qt.static/project/src/demo.cpp
+++ b/xmake/templates/c++/qt.static/src/demo.cpp
diff --git a/xmake/templates/c++/qt.static/project/src/demo.h b/xmake/templates/c++/qt.static/src/demo.h
index 24730c9d8..24730c9d8 100644
--- a/xmake/templates/c++/qt.static/project/src/demo.h
+++ b/xmake/templates/c++/qt.static/src/demo.h
diff --git a/xmake/templates/c++/qt.static/template.lua b/xmake/templates/c++/qt.static/template.lua
deleted file mode 100644
index 3a6f18019..000000000
--- a/xmake/templates/c++/qt.static/template.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-template("qt.static")
- add_configfiles("xmake.lua")
-
diff --git a/xmake/templates/c++/qt.static/project/xmake.lua b/xmake/templates/c++/qt.static/xmake.lua
index 6ff2a8c58..6ff2a8c58 100644
--- a/xmake/templates/c++/qt.static/project/xmake.lua
+++ b/xmake/templates/c++/qt.static/xmake.lua
diff --git a/xmake/templates/c++/qt.widgetapp/project/src/main.cpp b/xmake/templates/c++/qt.widgetapp/src/main.cpp
index 191ae18d2..191ae18d2 100644
--- a/xmake/templates/c++/qt.widgetapp/project/src/main.cpp
+++ b/xmake/templates/c++/qt.widgetapp/src/main.cpp
diff --git a/xmake/templates/c++/qt.widgetapp/project/src/mainwindow.cpp b/xmake/templates/c++/qt.widgetapp/src/mainwindow.cpp
index c9c6a0d98..c9c6a0d98 100644
--- a/xmake/templates/c++/qt.widgetapp/project/src/mainwindow.cpp
+++ b/xmake/templates/c++/qt.widgetapp/src/mainwindow.cpp
diff --git a/xmake/templates/c++/qt.widgetapp/project/src/mainwindow.h b/xmake/templates/c++/qt.widgetapp/src/mainwindow.h
index a4245aa42..a4245aa42 100644
--- a/xmake/templates/c++/qt.widgetapp/project/src/mainwindow.h
+++ b/xmake/templates/c++/qt.widgetapp/src/mainwindow.h
diff --git a/xmake/templates/c++/qt.widgetapp/project/src/mainwindow.ui b/xmake/templates/c++/qt.widgetapp/src/mainwindow.ui
index 1c59b695e..1c59b695e 100644
--- a/xmake/templates/c++/qt.widgetapp/project/src/mainwindow.ui
+++ b/xmake/templates/c++/qt.widgetapp/src/mainwindow.ui
diff --git a/xmake/templates/c++/qt.widgetapp/template.lua b/xmake/templates/c++/qt.widgetapp/template.lua
deleted file mode 100644
index 97a9fe3bb..000000000
--- a/xmake/templates/c++/qt.widgetapp/template.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-template("qt.widgetapp")
- add_configfiles("xmake.lua")
-
diff --git a/xmake/templates/c++/qt.widgetapp/project/xmake.lua b/xmake/templates/c++/qt.widgetapp/xmake.lua
index 9fdf5206d..9fdf5206d 100644
--- a/xmake/templates/c++/qt.widgetapp/project/xmake.lua
+++ b/xmake/templates/c++/qt.widgetapp/xmake.lua
diff --git a/xmake/templates/c++/qt.widgetapp_static/project/src/main.cpp b/xmake/templates/c++/qt.widgetapp_static/src/main.cpp
index db5b0cce8..db5b0cce8 100644
--- a/xmake/templates/c++/qt.widgetapp_static/project/src/main.cpp
+++ b/xmake/templates/c++/qt.widgetapp_static/src/main.cpp
diff --git a/xmake/templates/c++/qt.widgetapp_static/project/src/mainwindow.cpp b/xmake/templates/c++/qt.widgetapp_static/src/mainwindow.cpp
index c9c6a0d98..c9c6a0d98 100644
--- a/xmake/templates/c++/qt.widgetapp_static/project/src/mainwindow.cpp
+++ b/xmake/templates/c++/qt.widgetapp_static/src/mainwindow.cpp
diff --git a/xmake/templates/c++/qt.widgetapp_static/project/src/mainwindow.h b/xmake/templates/c++/qt.widgetapp_static/src/mainwindow.h
index a4245aa42..a4245aa42 100644
--- a/xmake/templates/c++/qt.widgetapp_static/project/src/mainwindow.h
+++ b/xmake/templates/c++/qt.widgetapp_static/src/mainwindow.h
diff --git a/xmake/templates/c++/qt.widgetapp_static/project/src/mainwindow.ui b/xmake/templates/c++/qt.widgetapp_static/src/mainwindow.ui
index 1c59b695e..1c59b695e 100644
--- a/xmake/templates/c++/qt.widgetapp_static/project/src/mainwindow.ui
+++ b/xmake/templates/c++/qt.widgetapp_static/src/mainwindow.ui
diff --git a/xmake/templates/c++/qt.widgetapp_static/template.lua b/xmake/templates/c++/qt.widgetapp_static/template.lua
deleted file mode 100644
index 6ccd9b178..000000000
--- a/xmake/templates/c++/qt.widgetapp_static/template.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-template("qt.widgetapp_static")
- add_configfiles("xmake.lua")
-
diff --git a/xmake/templates/c++/qt.widgetapp_static/project/xmake.lua b/xmake/templates/c++/qt.widgetapp_static/xmake.lua
index b2cc1ac86..b2cc1ac86 100644
--- a/xmake/templates/c++/qt.widgetapp_static/project/xmake.lua
+++ b/xmake/templates/c++/qt.widgetapp_static/xmake.lua
diff --git a/xmake/templates/c++/shared/project/src/foo.cpp b/xmake/templates/c++/shared/src/foo.cpp
index 1a1fb3425..1a1fb3425 100644
--- a/xmake/templates/c++/shared/project/src/foo.cpp
+++ b/xmake/templates/c++/shared/src/foo.cpp
diff --git a/xmake/templates/c++/shared/project/src/foo.h b/xmake/templates/c++/shared/src/foo.h
index bd496c784..bd496c784 100644
--- a/xmake/templates/c++/shared/project/src/foo.h
+++ b/xmake/templates/c++/shared/src/foo.h
diff --git a/xmake/templates/c++/shared/project/src/main.cpp b/xmake/templates/c++/shared/src/main.cpp
index 3834ee4d3..3834ee4d3 100644
--- a/xmake/templates/c++/shared/project/src/main.cpp
+++ b/xmake/templates/c++/shared/src/main.cpp
diff --git a/xmake/templates/c++/shared/template.lua b/xmake/templates/c++/shared/template.lua
deleted file mode 100644
index d7ec5bae4..000000000
--- a/xmake/templates/c++/shared/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("shared")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/c++/shared/project/xmake.lua b/xmake/templates/c++/shared/xmake.lua
index 43510f03e..43510f03e 100644
--- a/xmake/templates/c++/shared/project/xmake.lua
+++ b/xmake/templates/c++/shared/xmake.lua
diff --git a/xmake/templates/c++/static/project/src/foo.cpp b/xmake/templates/c++/static/src/foo.cpp
index 1a1fb3425..1a1fb3425 100644
--- a/xmake/templates/c++/static/project/src/foo.cpp
+++ b/xmake/templates/c++/static/src/foo.cpp
diff --git a/xmake/templates/c++/static/project/src/foo.h b/xmake/templates/c++/static/src/foo.h
index d2506bca9..d2506bca9 100644
--- a/xmake/templates/c++/static/project/src/foo.h
+++ b/xmake/templates/c++/static/src/foo.h
diff --git a/xmake/templates/c++/static/project/src/main.cpp b/xmake/templates/c++/static/src/main.cpp
index 3834ee4d3..3834ee4d3 100644
--- a/xmake/templates/c++/static/project/src/main.cpp
+++ b/xmake/templates/c++/static/src/main.cpp
diff --git a/xmake/templates/c++/static/template.lua b/xmake/templates/c++/static/template.lua
deleted file mode 100644
index abfe91a4b..000000000
--- a/xmake/templates/c++/static/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("static")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/c++/static/project/xmake.lua b/xmake/templates/c++/static/xmake.lua
index 45d81c393..45d81c393 100644
--- a/xmake/templates/c++/static/project/xmake.lua
+++ b/xmake/templates/c++/static/xmake.lua
diff --git a/xmake/templates/c++/tbox.console/project/src/main.cpp b/xmake/templates/c++/tbox.console/src/main.cpp
index 2c7596b33..2c7596b33 100644
--- a/xmake/templates/c++/tbox.console/project/src/main.cpp
+++ b/xmake/templates/c++/tbox.console/src/main.cpp
diff --git a/xmake/templates/c++/tbox.console/project/src/xmake.lua b/xmake/templates/c++/tbox.console/src/xmake.lua
index fd618b9ee..fd618b9ee 100644
--- a/xmake/templates/c++/tbox.console/project/src/xmake.lua
+++ b/xmake/templates/c++/tbox.console/src/xmake.lua
diff --git a/xmake/templates/c++/tbox.console/template.lua b/xmake/templates/c++/tbox.console/template.lua
deleted file mode 100644
index d1f2f892d..000000000
--- a/xmake/templates/c++/tbox.console/template.lua
+++ /dev/null
@@ -1,4 +0,0 @@
-template("tbox.console")
- add_configfiles("xmake.lua")
- add_configfiles("src/xmake.lua")
-
diff --git a/xmake/templates/c++/tbox.console/project/xmake.lua b/xmake/templates/c++/tbox.console/xmake.lua
index 8f8a824a1..8f8a824a1 100644
--- a/xmake/templates/c++/tbox.console/project/xmake.lua
+++ b/xmake/templates/c++/tbox.console/xmake.lua
diff --git a/xmake/templates/c++/tbox.shared/project/src/_library/interface.cpp b/xmake/templates/c++/tbox.shared/src/${TARGETNAME}/interface.cpp
index ab0a826a6..ab0a826a6 100644
--- a/xmake/templates/c++/tbox.shared/project/src/_library/interface.cpp
+++ b/xmake/templates/c++/tbox.shared/src/${TARGETNAME}/interface.cpp
diff --git a/xmake/templates/c++/tbox.shared/project/src/_library/interface.h b/xmake/templates/c++/tbox.shared/src/${TARGETNAME}/interface.h
index 843ef1c98..843ef1c98 100644
--- a/xmake/templates/c++/tbox.shared/project/src/_library/interface.h
+++ b/xmake/templates/c++/tbox.shared/src/${TARGETNAME}/interface.h
diff --git a/xmake/templates/c++/tbox.shared/project/src/_library/xmake.lua b/xmake/templates/c++/tbox.shared/src/${TARGETNAME}/xmake.lua
index 5c637ccda..5c637ccda 100644
--- a/xmake/templates/c++/tbox.shared/project/src/_library/xmake.lua
+++ b/xmake/templates/c++/tbox.shared/src/${TARGETNAME}/xmake.lua
diff --git a/xmake/templates/c++/tbox.shared/project/src/_demo/main.cpp b/xmake/templates/c++/tbox.shared/src/${TARGETNAME}_demo/main.cpp
index b1e763989..b1e763989 100644
--- a/xmake/templates/c++/tbox.shared/project/src/_demo/main.cpp
+++ b/xmake/templates/c++/tbox.shared/src/${TARGETNAME}_demo/main.cpp
diff --git a/xmake/templates/c++/tbox.shared/project/src/_demo/xmake.lua b/xmake/templates/c++/tbox.shared/src/${TARGETNAME}_demo/xmake.lua
index fd2d629da..fd2d629da 100644
--- a/xmake/templates/c++/tbox.shared/project/src/_demo/xmake.lua
+++ b/xmake/templates/c++/tbox.shared/src/${TARGETNAME}_demo/xmake.lua
diff --git a/xmake/templates/c++/tbox.shared/template.lua b/xmake/templates/c++/tbox.shared/template.lua
deleted file mode 100644
index 14fa4dbda..000000000
--- a/xmake/templates/c++/tbox.shared/template.lua
+++ /dev/null
@@ -1,9 +0,0 @@
-template("tbox.shared")
- add_configfiles("xmake.lua")
- add_configfiles("src/_demo/main.cpp")
- add_configfiles("src/_demo/xmake.lua")
- add_configfiles("src/_library/xmake.lua")
- after_create(function (template, opt)
- os.mv("src/_library", path.join("src", opt.targetname))
- os.mv("src/_demo", path.join("src", opt.targetname .. "_demo"))
- end)
diff --git a/xmake/templates/c++/tbox.shared/project/xmake.lua b/xmake/templates/c++/tbox.shared/xmake.lua
index 1cd6ebc79..1cd6ebc79 100644
--- a/xmake/templates/c++/tbox.shared/project/xmake.lua
+++ b/xmake/templates/c++/tbox.shared/xmake.lua
diff --git a/xmake/templates/c++/tbox.static/project/src/_library/interface.cpp b/xmake/templates/c++/tbox.static/src/${TARGETNAME}/interface.cpp
index ab0a826a6..ab0a826a6 100644
--- a/xmake/templates/c++/tbox.static/project/src/_library/interface.cpp
+++ b/xmake/templates/c++/tbox.static/src/${TARGETNAME}/interface.cpp
diff --git a/xmake/templates/c++/tbox.static/project/src/_library/interface.h b/xmake/templates/c++/tbox.static/src/${TARGETNAME}/interface.h
index caddb8394..caddb8394 100644
--- a/xmake/templates/c++/tbox.static/project/src/_library/interface.h
+++ b/xmake/templates/c++/tbox.static/src/${TARGETNAME}/interface.h
diff --git a/xmake/templates/c++/tbox.static/project/src/_library/xmake.lua b/xmake/templates/c++/tbox.static/src/${TARGETNAME}/xmake.lua
index bdcf999f8..bdcf999f8 100644
--- a/xmake/templates/c++/tbox.static/project/src/_library/xmake.lua
+++ b/xmake/templates/c++/tbox.static/src/${TARGETNAME}/xmake.lua
diff --git a/xmake/templates/c++/tbox.static/project/src/_demo/main.cpp b/xmake/templates/c++/tbox.static/src/${TARGETNAME}_demo/main.cpp
index b1e763989..b1e763989 100644
--- a/xmake/templates/c++/tbox.static/project/src/_demo/main.cpp
+++ b/xmake/templates/c++/tbox.static/src/${TARGETNAME}_demo/main.cpp
diff --git a/xmake/templates/c++/tbox.static/project/src/_demo/xmake.lua b/xmake/templates/c++/tbox.static/src/${TARGETNAME}_demo/xmake.lua
index fd2d629da..fd2d629da 100644
--- a/xmake/templates/c++/tbox.static/project/src/_demo/xmake.lua
+++ b/xmake/templates/c++/tbox.static/src/${TARGETNAME}_demo/xmake.lua
diff --git a/xmake/templates/c++/tbox.static/template.lua b/xmake/templates/c++/tbox.static/template.lua
deleted file mode 100644
index acc4e21bd..000000000
--- a/xmake/templates/c++/tbox.static/template.lua
+++ /dev/null
@@ -1,9 +0,0 @@
-template("tbox.static")
- add_configfiles("xmake.lua")
- add_configfiles("src/_demo/main.cpp")
- add_configfiles("src/_demo/xmake.lua")
- add_configfiles("src/_library/xmake.lua")
- after_create(function (template, opt)
- os.mv("src/_library", path.join("src", opt.targetname))
- os.mv("src/_demo", path.join("src", opt.targetname .. "_demo"))
- end)
diff --git a/xmake/templates/c++/tbox.static/project/xmake.lua b/xmake/templates/c++/tbox.static/xmake.lua
index 1cd6ebc79..1cd6ebc79 100644
--- a/xmake/templates/c++/tbox.static/project/xmake.lua
+++ b/xmake/templates/c++/tbox.static/xmake.lua
diff --git a/xmake/templates/c++/wxwidgets/project/src/main.cpp b/xmake/templates/c++/wxwidgets/src/main.cpp
index 4b43fe6e3..4b43fe6e3 100644
--- a/xmake/templates/c++/wxwidgets/project/src/main.cpp
+++ b/xmake/templates/c++/wxwidgets/src/main.cpp
diff --git a/xmake/templates/c++/wxwidgets/template.lua b/xmake/templates/c++/wxwidgets/template.lua
deleted file mode 100644
index ca0fc6319..000000000
--- a/xmake/templates/c++/wxwidgets/template.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-template("wxwidgets")
- add_configfiles("xmake.lua")
-
diff --git a/xmake/templates/c++/wxwidgets/project/xmake.lua b/xmake/templates/c++/wxwidgets/xmake.lua
index 4b062189f..4b062189f 100644
--- a/xmake/templates/c++/wxwidgets/project/xmake.lua
+++ b/xmake/templates/c++/wxwidgets/xmake.lua
diff --git a/xmake/templates/c++/xmake.cli/project/src/lni/main.cpp b/xmake/templates/c++/xmake.cli/src/lni/main.cpp
index e8955e074..e8955e074 100644
--- a/xmake/templates/c++/xmake.cli/project/src/lni/main.cpp
+++ b/xmake/templates/c++/xmake.cli/src/lni/main.cpp
diff --git a/xmake/templates/c++/xmake.cli/project/src/lua/main.lua b/xmake/templates/c++/xmake.cli/src/lua/main.lua
index d87daf102..d87daf102 100644
--- a/xmake/templates/c++/xmake.cli/project/src/lua/main.lua
+++ b/xmake/templates/c++/xmake.cli/src/lua/main.lua
diff --git a/xmake/templates/c++/xmake.cli/template.lua b/xmake/templates/c++/xmake.cli/template.lua
deleted file mode 100644
index 431e0af1f..000000000
--- a/xmake/templates/c++/xmake.cli/template.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-template("xmake.cli")
- add_configfiles("src/lni/main.cpp")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/c++/xmake.cli/project/xmake.lua b/xmake/templates/c++/xmake.cli/xmake.lua
index 5fa81aa45..5fa81aa45 100644
--- a/xmake/templates/c++/xmake.cli/project/xmake.lua
+++ b/xmake/templates/c++/xmake.cli/xmake.lua
diff --git a/xmake/templates/c/console/project/src/main.c b/xmake/templates/c/console/src/main.c
index ccf4b2a77..ccf4b2a77 100644
--- a/xmake/templates/c/console/project/src/main.c
+++ b/xmake/templates/c/console/src/main.c
diff --git a/xmake/templates/c/console/template.lua b/xmake/templates/c/console/template.lua
deleted file mode 100644
index ed2e13b57..000000000
--- a/xmake/templates/c/console/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("console")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/c/console/project/xmake.lua b/xmake/templates/c/console/xmake.lua
index 4fe46c6ff..4fe46c6ff 100644
--- a/xmake/templates/c/console/project/xmake.lua
+++ b/xmake/templates/c/console/xmake.lua
diff --git a/xmake/templates/c/module.binary/project/modules/binary/bar/.gitignore b/xmake/templates/c/module.binary/modules/binary/bar/.gitignore
index 152105761..152105761 100644
--- a/xmake/templates/c/module.binary/project/modules/binary/bar/.gitignore
+++ b/xmake/templates/c/module.binary/modules/binary/bar/.gitignore
diff --git a/xmake/templates/c/module.binary/project/modules/binary/bar/src/add.c b/xmake/templates/c/module.binary/modules/binary/bar/src/add.c
index 93fdf0ad8..93fdf0ad8 100644
--- a/xmake/templates/c/module.binary/project/modules/binary/bar/src/add.c
+++ b/xmake/templates/c/module.binary/modules/binary/bar/src/add.c
diff --git a/xmake/templates/c/module.binary/project/modules/binary/bar/src/sub.c b/xmake/templates/c/module.binary/modules/binary/bar/src/sub.c
index ae7b6d1f2..ae7b6d1f2 100644
--- a/xmake/templates/c/module.binary/project/modules/binary/bar/src/sub.c
+++ b/xmake/templates/c/module.binary/modules/binary/bar/src/sub.c
diff --git a/xmake/templates/c/module.binary/project/modules/binary/bar/xmake.lua b/xmake/templates/c/module.binary/modules/binary/bar/xmake.lua
index d4983d741..d4983d741 100644
--- a/xmake/templates/c/module.binary/project/modules/binary/bar/xmake.lua
+++ b/xmake/templates/c/module.binary/modules/binary/bar/xmake.lua
diff --git a/xmake/templates/c/module.binary/project/src/main.c b/xmake/templates/c/module.binary/src/main.c
index ccf4b2a77..ccf4b2a77 100644
--- a/xmake/templates/c/module.binary/project/src/main.c
+++ b/xmake/templates/c/module.binary/src/main.c
diff --git a/xmake/templates/c/module.binary/template.lua b/xmake/templates/c/module.binary/template.lua
deleted file mode 100644
index 917f4eb23..000000000
--- a/xmake/templates/c/module.binary/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("module.binary")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/c/module.binary/project/xmake.lua b/xmake/templates/c/module.binary/xmake.lua
index fdd8bb1e5..fdd8bb1e5 100644
--- a/xmake/templates/c/module.binary/project/xmake.lua
+++ b/xmake/templates/c/module.binary/xmake.lua
diff --git a/xmake/templates/c/module.shared/project/modules/shared/foo/src/foo.c b/xmake/templates/c/module.shared/modules/shared/foo/src/foo.c
index adde214ca..adde214ca 100644
--- a/xmake/templates/c/module.shared/project/modules/shared/foo/src/foo.c
+++ b/xmake/templates/c/module.shared/modules/shared/foo/src/foo.c
diff --git a/xmake/templates/c/module.shared/project/modules/shared/foo/xmake.lua b/xmake/templates/c/module.shared/modules/shared/foo/xmake.lua
index 035573d9f..035573d9f 100644
--- a/xmake/templates/c/module.shared/project/modules/shared/foo/xmake.lua
+++ b/xmake/templates/c/module.shared/modules/shared/foo/xmake.lua
diff --git a/xmake/templates/c/module.shared/project/src/main.c b/xmake/templates/c/module.shared/src/main.c
index ccf4b2a77..ccf4b2a77 100644
--- a/xmake/templates/c/module.shared/project/src/main.c
+++ b/xmake/templates/c/module.shared/src/main.c
diff --git a/xmake/templates/c/module.shared/template.lua b/xmake/templates/c/module.shared/template.lua
deleted file mode 100644
index 7869165b7..000000000
--- a/xmake/templates/c/module.shared/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("module.shared")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/c/module.shared/project/xmake.lua b/xmake/templates/c/module.shared/xmake.lua
index e39ac665d..e39ac665d 100644
--- a/xmake/templates/c/module.shared/project/xmake.lua
+++ b/xmake/templates/c/module.shared/xmake.lua
diff --git a/xmake/templates/c/shared/project/src/foo.c b/xmake/templates/c/shared/src/foo.c
index 1a1fb3425..1a1fb3425 100644
--- a/xmake/templates/c/shared/project/src/foo.c
+++ b/xmake/templates/c/shared/src/foo.c
diff --git a/xmake/templates/c/shared/project/src/foo.h b/xmake/templates/c/shared/src/foo.h
index e15925829..e15925829 100644
--- a/xmake/templates/c/shared/project/src/foo.h
+++ b/xmake/templates/c/shared/src/foo.h
diff --git a/xmake/templates/c/shared/project/src/main.c b/xmake/templates/c/shared/src/main.c
index f1c29d751..f1c29d751 100644
--- a/xmake/templates/c/shared/project/src/main.c
+++ b/xmake/templates/c/shared/src/main.c
diff --git a/xmake/templates/c/shared/template.lua b/xmake/templates/c/shared/template.lua
deleted file mode 100644
index d7ec5bae4..000000000
--- a/xmake/templates/c/shared/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("shared")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/c/shared/project/xmake.lua b/xmake/templates/c/shared/xmake.lua
index 91dac7c63..91dac7c63 100644
--- a/xmake/templates/c/shared/project/xmake.lua
+++ b/xmake/templates/c/shared/xmake.lua
diff --git a/xmake/templates/c/static/project/src/foo.c b/xmake/templates/c/static/src/foo.c
index 1a1fb3425..1a1fb3425 100644
--- a/xmake/templates/c/static/project/src/foo.c
+++ b/xmake/templates/c/static/src/foo.c
diff --git a/xmake/templates/c/static/project/src/foo.h b/xmake/templates/c/static/src/foo.h
index 6295ab95c..6295ab95c 100644
--- a/xmake/templates/c/static/project/src/foo.h
+++ b/xmake/templates/c/static/src/foo.h
diff --git a/xmake/templates/c/static/project/src/main.c b/xmake/templates/c/static/src/main.c
index f1c29d751..f1c29d751 100644
--- a/xmake/templates/c/static/project/src/main.c
+++ b/xmake/templates/c/static/src/main.c
diff --git a/xmake/templates/c/static/template.lua b/xmake/templates/c/static/template.lua
deleted file mode 100644
index abfe91a4b..000000000
--- a/xmake/templates/c/static/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("static")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/c/static/project/xmake.lua b/xmake/templates/c/static/xmake.lua
index fd0b0592a..fd0b0592a 100644
--- a/xmake/templates/c/static/project/xmake.lua
+++ b/xmake/templates/c/static/xmake.lua
diff --git a/xmake/templates/c/tbox.console/project/src/main.c b/xmake/templates/c/tbox.console/src/main.c
index 2c7596b33..2c7596b33 100644
--- a/xmake/templates/c/tbox.console/project/src/main.c
+++ b/xmake/templates/c/tbox.console/src/main.c
diff --git a/xmake/templates/c/tbox.console/project/src/xmake.lua b/xmake/templates/c/tbox.console/src/xmake.lua
index 40847766c..40847766c 100644
--- a/xmake/templates/c/tbox.console/project/src/xmake.lua
+++ b/xmake/templates/c/tbox.console/src/xmake.lua
diff --git a/xmake/templates/c/tbox.console/template.lua b/xmake/templates/c/tbox.console/template.lua
deleted file mode 100644
index d1f2f892d..000000000
--- a/xmake/templates/c/tbox.console/template.lua
+++ /dev/null
@@ -1,4 +0,0 @@
-template("tbox.console")
- add_configfiles("xmake.lua")
- add_configfiles("src/xmake.lua")
-
diff --git a/xmake/templates/c/tbox.console/project/xmake.lua b/xmake/templates/c/tbox.console/xmake.lua
index 7c17dca1a..7c17dca1a 100644
--- a/xmake/templates/c/tbox.console/project/xmake.lua
+++ b/xmake/templates/c/tbox.console/xmake.lua
diff --git a/xmake/templates/c/tbox.shared/project/src/_library/interface.c b/xmake/templates/c/tbox.shared/src/${TARGETNAME}/interface.c
index ab0a826a6..ab0a826a6 100644
--- a/xmake/templates/c/tbox.shared/project/src/_library/interface.c
+++ b/xmake/templates/c/tbox.shared/src/${TARGETNAME}/interface.c
diff --git a/xmake/templates/c/tbox.shared/project/src/_library/interface.h b/xmake/templates/c/tbox.shared/src/${TARGETNAME}/interface.h
index 843ef1c98..843ef1c98 100644
--- a/xmake/templates/c/tbox.shared/project/src/_library/interface.h
+++ b/xmake/templates/c/tbox.shared/src/${TARGETNAME}/interface.h
diff --git a/xmake/templates/c/tbox.shared/project/src/_library/xmake.lua b/xmake/templates/c/tbox.shared/src/${TARGETNAME}/xmake.lua
index 0c527e2b6..0c527e2b6 100644
--- a/xmake/templates/c/tbox.shared/project/src/_library/xmake.lua
+++ b/xmake/templates/c/tbox.shared/src/${TARGETNAME}/xmake.lua
diff --git a/xmake/templates/c/tbox.shared/project/src/_demo/main.c b/xmake/templates/c/tbox.shared/src/${TARGETNAME}_demo/main.c
index b1e763989..b1e763989 100644
--- a/xmake/templates/c/tbox.shared/project/src/_demo/main.c
+++ b/xmake/templates/c/tbox.shared/src/${TARGETNAME}_demo/main.c
diff --git a/xmake/templates/c/tbox.shared/project/src/_demo/xmake.lua b/xmake/templates/c/tbox.shared/src/${TARGETNAME}_demo/xmake.lua
index 4b852d481..4b852d481 100644
--- a/xmake/templates/c/tbox.shared/project/src/_demo/xmake.lua
+++ b/xmake/templates/c/tbox.shared/src/${TARGETNAME}_demo/xmake.lua
diff --git a/xmake/templates/c/tbox.shared/template.lua b/xmake/templates/c/tbox.shared/template.lua
deleted file mode 100644
index cf21d02a7..000000000
--- a/xmake/templates/c/tbox.shared/template.lua
+++ /dev/null
@@ -1,9 +0,0 @@
-template("tbox.shared")
- add_configfiles("xmake.lua")
- add_configfiles("src/_demo/main.c")
- add_configfiles("src/_demo/xmake.lua")
- add_configfiles("src/_library/xmake.lua")
- after_create(function (template, opt)
- os.mv("src/_library", path.join("src", opt.targetname))
- os.mv("src/_demo", path.join("src", opt.targetname .. "_demo"))
- end)
diff --git a/xmake/templates/c/tbox.shared/project/xmake.lua b/xmake/templates/c/tbox.shared/xmake.lua
index 1cd6ebc79..1cd6ebc79 100644
--- a/xmake/templates/c/tbox.shared/project/xmake.lua
+++ b/xmake/templates/c/tbox.shared/xmake.lua
diff --git a/xmake/templates/c/tbox.static/project/src/_library/interface.c b/xmake/templates/c/tbox.static/src/${TARGETNAME}/interface.c
index ab0a826a6..ab0a826a6 100644
--- a/xmake/templates/c/tbox.static/project/src/_library/interface.c
+++ b/xmake/templates/c/tbox.static/src/${TARGETNAME}/interface.c
diff --git a/xmake/templates/c/tbox.static/project/src/_library/interface.h b/xmake/templates/c/tbox.static/src/${TARGETNAME}/interface.h
index caddb8394..caddb8394 100644
--- a/xmake/templates/c/tbox.static/project/src/_library/interface.h
+++ b/xmake/templates/c/tbox.static/src/${TARGETNAME}/interface.h
diff --git a/xmake/templates/c/tbox.static/project/src/_library/xmake.lua b/xmake/templates/c/tbox.static/src/${TARGETNAME}/xmake.lua
index 782c92616..782c92616 100644
--- a/xmake/templates/c/tbox.static/project/src/_library/xmake.lua
+++ b/xmake/templates/c/tbox.static/src/${TARGETNAME}/xmake.lua
diff --git a/xmake/templates/c/tbox.static/project/src/_demo/main.c b/xmake/templates/c/tbox.static/src/${TARGETNAME}_demo/main.c
index b1e763989..b1e763989 100644
--- a/xmake/templates/c/tbox.static/project/src/_demo/main.c
+++ b/xmake/templates/c/tbox.static/src/${TARGETNAME}_demo/main.c
diff --git a/xmake/templates/c/tbox.static/project/src/_demo/xmake.lua b/xmake/templates/c/tbox.static/src/${TARGETNAME}_demo/xmake.lua
index 4b852d481..4b852d481 100644
--- a/xmake/templates/c/tbox.static/project/src/_demo/xmake.lua
+++ b/xmake/templates/c/tbox.static/src/${TARGETNAME}_demo/xmake.lua
diff --git a/xmake/templates/c/tbox.static/template.lua b/xmake/templates/c/tbox.static/template.lua
deleted file mode 100644
index 21c09ec3c..000000000
--- a/xmake/templates/c/tbox.static/template.lua
+++ /dev/null
@@ -1,9 +0,0 @@
-template("tbox.static")
- add_configfiles("xmake.lua")
- add_configfiles("src/_demo/main.c")
- add_configfiles("src/_demo/xmake.lua")
- add_configfiles("src/_library/xmake.lua")
- after_create(function (template, opt)
- os.mv("src/_library", path.join("src", opt.targetname))
- os.mv("src/_demo", path.join("src", opt.targetname .. "_demo"))
- end)
diff --git a/xmake/templates/c/tbox.static/project/xmake.lua b/xmake/templates/c/tbox.static/xmake.lua
index 1cd6ebc79..1cd6ebc79 100644
--- a/xmake/templates/c/tbox.static/project/xmake.lua
+++ b/xmake/templates/c/tbox.static/xmake.lua
diff --git a/xmake/templates/c/xmake.cli/project/src/lni/main.c b/xmake/templates/c/xmake.cli/src/lni/main.c
index a4c6499ee..a4c6499ee 100644
--- a/xmake/templates/c/xmake.cli/project/src/lni/main.c
+++ b/xmake/templates/c/xmake.cli/src/lni/main.c
diff --git a/xmake/templates/c/xmake.cli/project/src/lua/main.lua b/xmake/templates/c/xmake.cli/src/lua/main.lua
index d87daf102..d87daf102 100644
--- a/xmake/templates/c/xmake.cli/project/src/lua/main.lua
+++ b/xmake/templates/c/xmake.cli/src/lua/main.lua
diff --git a/xmake/templates/c/xmake.cli/template.lua b/xmake/templates/c/xmake.cli/template.lua
deleted file mode 100644
index 45f1135c6..000000000
--- a/xmake/templates/c/xmake.cli/template.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-template("xmake.cli")
- add_configfiles("src/lni/main.c")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/c/xmake.cli/project/xmake.lua b/xmake/templates/c/xmake.cli/xmake.lua
index 678c5ba3a..678c5ba3a 100644
--- a/xmake/templates/c/xmake.cli/project/xmake.lua
+++ b/xmake/templates/c/xmake.cli/xmake.lua
diff --git a/xmake/templates/cuda/console/project/src/main.cu b/xmake/templates/cuda/console/src/main.cu
index 2fe9ac797..2fe9ac797 100644
--- a/xmake/templates/cuda/console/project/src/main.cu
+++ b/xmake/templates/cuda/console/src/main.cu
diff --git a/xmake/templates/cuda/console/template.lua b/xmake/templates/cuda/console/template.lua
deleted file mode 100644
index ed2e13b57..000000000
--- a/xmake/templates/cuda/console/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("console")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/cuda/console/project/xmake.lua b/xmake/templates/cuda/console/xmake.lua
index 5cfdad354..5cfdad354 100644
--- a/xmake/templates/cuda/console/project/xmake.lua
+++ b/xmake/templates/cuda/console/xmake.lua
diff --git a/xmake/templates/cuda/shared/project/inc/lib.cuh b/xmake/templates/cuda/shared/inc/lib.cuh
index 5565e3eb5..5565e3eb5 100644
--- a/xmake/templates/cuda/shared/project/inc/lib.cuh
+++ b/xmake/templates/cuda/shared/inc/lib.cuh
diff --git a/xmake/templates/cuda/shared/project/src/lib.cu b/xmake/templates/cuda/shared/src/lib.cu
index d2cff9ac2..d2cff9ac2 100644
--- a/xmake/templates/cuda/shared/project/src/lib.cu
+++ b/xmake/templates/cuda/shared/src/lib.cu
diff --git a/xmake/templates/cuda/shared/template.lua b/xmake/templates/cuda/shared/template.lua
deleted file mode 100644
index d7ec5bae4..000000000
--- a/xmake/templates/cuda/shared/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("shared")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/cuda/shared/project/xmake.lua b/xmake/templates/cuda/shared/xmake.lua
index 45c27363f..45c27363f 100644
--- a/xmake/templates/cuda/shared/project/xmake.lua
+++ b/xmake/templates/cuda/shared/xmake.lua
diff --git a/xmake/templates/cuda/static/project/inc/lib.cuh b/xmake/templates/cuda/static/inc/lib.cuh
index 35255e31e..35255e31e 100644
--- a/xmake/templates/cuda/static/project/inc/lib.cuh
+++ b/xmake/templates/cuda/static/inc/lib.cuh
diff --git a/xmake/templates/cuda/static/project/src/lib.cu b/xmake/templates/cuda/static/src/lib.cu
index a5f054354..a5f054354 100644
--- a/xmake/templates/cuda/static/project/src/lib.cu
+++ b/xmake/templates/cuda/static/src/lib.cu
diff --git a/xmake/templates/cuda/static/template.lua b/xmake/templates/cuda/static/template.lua
deleted file mode 100644
index abfe91a4b..000000000
--- a/xmake/templates/cuda/static/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("static")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/cuda/static/project/xmake.lua b/xmake/templates/cuda/static/xmake.lua
index 6d84c3b92..6d84c3b92 100644
--- a/xmake/templates/cuda/static/project/xmake.lua
+++ b/xmake/templates/cuda/static/xmake.lua
diff --git a/xmake/templates/dlang/console/project/src/main.d b/xmake/templates/dlang/console/src/main.d
index 6bea6ec02..6bea6ec02 100644
--- a/xmake/templates/dlang/console/project/src/main.d
+++ b/xmake/templates/dlang/console/src/main.d
diff --git a/xmake/templates/dlang/console/template.lua b/xmake/templates/dlang/console/template.lua
deleted file mode 100644
index ed2e13b57..000000000
--- a/xmake/templates/dlang/console/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("console")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/dlang/console/project/xmake.lua b/xmake/templates/dlang/console/xmake.lua
index 86ace289d..86ace289d 100644
--- a/xmake/templates/dlang/console/project/xmake.lua
+++ b/xmake/templates/dlang/console/xmake.lua
diff --git a/xmake/templates/dlang/shared/project/src/interfaces.d b/xmake/templates/dlang/shared/src/interfaces.d
index b4f7ab6ba..b4f7ab6ba 100644
--- a/xmake/templates/dlang/shared/project/src/interfaces.d
+++ b/xmake/templates/dlang/shared/src/interfaces.d
diff --git a/xmake/templates/dlang/shared/project/src/main.d b/xmake/templates/dlang/shared/src/main.d
index bfcf9cf56..bfcf9cf56 100644
--- a/xmake/templates/dlang/shared/project/src/main.d
+++ b/xmake/templates/dlang/shared/src/main.d
diff --git a/xmake/templates/dlang/shared/template.lua b/xmake/templates/dlang/shared/template.lua
deleted file mode 100644
index d7ec5bae4..000000000
--- a/xmake/templates/dlang/shared/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("shared")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/dlang/shared/project/xmake.lua b/xmake/templates/dlang/shared/xmake.lua
index b9cc7cb8f..b9cc7cb8f 100644
--- a/xmake/templates/dlang/shared/project/xmake.lua
+++ b/xmake/templates/dlang/shared/xmake.lua
diff --git a/xmake/templates/dlang/static/project/src/interfaces.d b/xmake/templates/dlang/static/src/interfaces.d
index 3386c9124..3386c9124 100644
--- a/xmake/templates/dlang/static/project/src/interfaces.d
+++ b/xmake/templates/dlang/static/src/interfaces.d
diff --git a/xmake/templates/dlang/static/project/src/main.d b/xmake/templates/dlang/static/src/main.d
index bfcf9cf56..bfcf9cf56 100644
--- a/xmake/templates/dlang/static/project/src/main.d
+++ b/xmake/templates/dlang/static/src/main.d
diff --git a/xmake/templates/dlang/static/template.lua b/xmake/templates/dlang/static/template.lua
deleted file mode 100644
index abfe91a4b..000000000
--- a/xmake/templates/dlang/static/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("static")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/dlang/static/project/xmake.lua b/xmake/templates/dlang/static/xmake.lua
index ba4d99e77..ba4d99e77 100644
--- a/xmake/templates/dlang/static/project/xmake.lua
+++ b/xmake/templates/dlang/static/xmake.lua
diff --git a/xmake/templates/fortran/console/project/src/main.f90 b/xmake/templates/fortran/console/src/main.f90
index a332e8401..a332e8401 100644
--- a/xmake/templates/fortran/console/project/src/main.f90
+++ b/xmake/templates/fortran/console/src/main.f90
diff --git a/xmake/templates/fortran/console/template.lua b/xmake/templates/fortran/console/template.lua
deleted file mode 100644
index ed2e13b57..000000000
--- a/xmake/templates/fortran/console/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("console")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/fortran/console/project/xmake.lua b/xmake/templates/fortran/console/xmake.lua
index b12d74cce..b12d74cce 100644
--- a/xmake/templates/fortran/console/project/xmake.lua
+++ b/xmake/templates/fortran/console/xmake.lua
diff --git a/xmake/templates/fortran/shared/project/src/main.f90 b/xmake/templates/fortran/shared/src/main.f90
index 9adea3e26..9adea3e26 100644
--- a/xmake/templates/fortran/shared/project/src/main.f90
+++ b/xmake/templates/fortran/shared/src/main.f90
diff --git a/xmake/templates/fortran/shared/project/src/test.f90 b/xmake/templates/fortran/shared/src/test.f90
index 7b215fcdf..7b215fcdf 100644
--- a/xmake/templates/fortran/shared/project/src/test.f90
+++ b/xmake/templates/fortran/shared/src/test.f90
diff --git a/xmake/templates/fortran/shared/template.lua b/xmake/templates/fortran/shared/template.lua
deleted file mode 100644
index d7ec5bae4..000000000
--- a/xmake/templates/fortran/shared/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("shared")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/fortran/shared/project/xmake.lua b/xmake/templates/fortran/shared/xmake.lua
index 04bf17567..04bf17567 100644
--- a/xmake/templates/fortran/shared/project/xmake.lua
+++ b/xmake/templates/fortran/shared/xmake.lua
diff --git a/xmake/templates/fortran/static/project/src/main.f90 b/xmake/templates/fortran/static/src/main.f90
index 9adea3e26..9adea3e26 100644
--- a/xmake/templates/fortran/static/project/src/main.f90
+++ b/xmake/templates/fortran/static/src/main.f90
diff --git a/xmake/templates/fortran/static/project/src/test.f90 b/xmake/templates/fortran/static/src/test.f90
index 7b215fcdf..7b215fcdf 100644
--- a/xmake/templates/fortran/static/project/src/test.f90
+++ b/xmake/templates/fortran/static/src/test.f90
diff --git a/xmake/templates/fortran/static/template.lua b/xmake/templates/fortran/static/template.lua
deleted file mode 100644
index abfe91a4b..000000000
--- a/xmake/templates/fortran/static/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("static")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/fortran/static/project/xmake.lua b/xmake/templates/fortran/static/xmake.lua
index 694c1d390..694c1d390 100644
--- a/xmake/templates/fortran/static/project/xmake.lua
+++ b/xmake/templates/fortran/static/xmake.lua
diff --git a/xmake/templates/go/console/project/src/main.go b/xmake/templates/go/console/src/main.go
index b689db480..b689db480 100644
--- a/xmake/templates/go/console/project/src/main.go
+++ b/xmake/templates/go/console/src/main.go
diff --git a/xmake/templates/go/console/template.lua b/xmake/templates/go/console/template.lua
deleted file mode 100644
index ed2e13b57..000000000
--- a/xmake/templates/go/console/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("console")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/go/console/project/xmake.lua b/xmake/templates/go/console/xmake.lua
index 09355a74b..09355a74b 100644
--- a/xmake/templates/go/console/project/xmake.lua
+++ b/xmake/templates/go/console/xmake.lua
diff --git a/xmake/templates/go/static/project/src/main.go b/xmake/templates/go/static/src/main.go
index f2b477453..f2b477453 100644
--- a/xmake/templates/go/static/project/src/main.go
+++ b/xmake/templates/go/static/src/main.go
diff --git a/xmake/templates/go/static/project/src/module/add.go b/xmake/templates/go/static/src/module/add.go
index 98ffef600..98ffef600 100644
--- a/xmake/templates/go/static/project/src/module/add.go
+++ b/xmake/templates/go/static/src/module/add.go
diff --git a/xmake/templates/go/static/project/src/module/sub.go b/xmake/templates/go/static/src/module/sub.go
index a24a9abb7..a24a9abb7 100644
--- a/xmake/templates/go/static/project/src/module/sub.go
+++ b/xmake/templates/go/static/src/module/sub.go
diff --git a/xmake/templates/go/static/project/src/test.go b/xmake/templates/go/static/src/test.go
index cf10523f9..cf10523f9 100644
--- a/xmake/templates/go/static/project/src/test.go
+++ b/xmake/templates/go/static/src/test.go
diff --git a/xmake/templates/go/static/template.lua b/xmake/templates/go/static/template.lua
deleted file mode 100644
index abfe91a4b..000000000
--- a/xmake/templates/go/static/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("static")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/go/static/project/xmake.lua b/xmake/templates/go/static/xmake.lua
index 076ac6460..076ac6460 100644
--- a/xmake/templates/go/static/project/xmake.lua
+++ b/xmake/templates/go/static/xmake.lua
diff --git a/xmake/templates/kotlin/console/project/src/main.kt b/xmake/templates/kotlin/console/src/main.kt
index 543f5ac8f..543f5ac8f 100644
--- a/xmake/templates/kotlin/console/project/src/main.kt
+++ b/xmake/templates/kotlin/console/src/main.kt
diff --git a/xmake/templates/kotlin/console/template.lua b/xmake/templates/kotlin/console/template.lua
deleted file mode 100644
index ed2e13b57..000000000
--- a/xmake/templates/kotlin/console/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("console")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/kotlin/console/project/xmake.lua b/xmake/templates/kotlin/console/xmake.lua
index 2689995b1..2689995b1 100644
--- a/xmake/templates/kotlin/console/project/xmake.lua
+++ b/xmake/templates/kotlin/console/xmake.lua
diff --git a/xmake/templates/kotlin/shared_library/project/src/foo.kt b/xmake/templates/kotlin/shared/src/foo.kt
index cc5184bd7..cc5184bd7 100644
--- a/xmake/templates/kotlin/shared_library/project/src/foo.kt
+++ b/xmake/templates/kotlin/shared/src/foo.kt
diff --git a/xmake/templates/kotlin/shared_library/project/src/main.c b/xmake/templates/kotlin/shared/src/main.c
index abb3f2c12..abb3f2c12 100644
--- a/xmake/templates/kotlin/shared_library/project/src/main.c
+++ b/xmake/templates/kotlin/shared/src/main.c
diff --git a/xmake/templates/kotlin/shared_library/project/xmake.lua b/xmake/templates/kotlin/shared/xmake.lua
index 491a8f835..491a8f835 100644
--- a/xmake/templates/kotlin/shared_library/project/xmake.lua
+++ b/xmake/templates/kotlin/shared/xmake.lua
diff --git a/xmake/templates/kotlin/shared_library/template.lua b/xmake/templates/kotlin/shared_library/template.lua
deleted file mode 100644
index d7ec5bae4..000000000
--- a/xmake/templates/kotlin/shared_library/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("shared")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/kotlin/static_library/project/src/foo.kt b/xmake/templates/kotlin/static/src/foo.kt
index cc5184bd7..cc5184bd7 100644
--- a/xmake/templates/kotlin/static_library/project/src/foo.kt
+++ b/xmake/templates/kotlin/static/src/foo.kt
diff --git a/xmake/templates/kotlin/static_library/project/src/main.c b/xmake/templates/kotlin/static/src/main.c
index abb3f2c12..abb3f2c12 100644
--- a/xmake/templates/kotlin/static_library/project/src/main.c
+++ b/xmake/templates/kotlin/static/src/main.c
diff --git a/xmake/templates/kotlin/static_library/project/xmake.lua b/xmake/templates/kotlin/static/xmake.lua
index 2667c26fd..2667c26fd 100644
--- a/xmake/templates/kotlin/static_library/project/xmake.lua
+++ b/xmake/templates/kotlin/static/xmake.lua
diff --git a/xmake/templates/kotlin/static_library/template.lua b/xmake/templates/kotlin/static_library/template.lua
deleted file mode 100644
index abfe91a4b..000000000
--- a/xmake/templates/kotlin/static_library/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("static")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/nim/console/project/src/main.nim b/xmake/templates/nim/console/src/main.nim
index 17179284f..17179284f 100644
--- a/xmake/templates/nim/console/project/src/main.nim
+++ b/xmake/templates/nim/console/src/main.nim
diff --git a/xmake/templates/nim/console/template.lua b/xmake/templates/nim/console/template.lua
deleted file mode 100644
index ed2e13b57..000000000
--- a/xmake/templates/nim/console/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("console")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/nim/console/project/xmake.lua b/xmake/templates/nim/console/xmake.lua
index f41148c2f..f41148c2f 100644
--- a/xmake/templates/nim/console/project/xmake.lua
+++ b/xmake/templates/nim/console/xmake.lua
diff --git a/xmake/templates/nim/shared/project/src/foo.nim b/xmake/templates/nim/shared/src/foo.nim
index cde4de7ca..cde4de7ca 100644
--- a/xmake/templates/nim/shared/project/src/foo.nim
+++ b/xmake/templates/nim/shared/src/foo.nim
diff --git a/xmake/templates/nim/shared/project/src/main.nim b/xmake/templates/nim/shared/src/main.nim
index 1be3abe69..1be3abe69 100644
--- a/xmake/templates/nim/shared/project/src/main.nim
+++ b/xmake/templates/nim/shared/src/main.nim
diff --git a/xmake/templates/nim/shared/template.lua b/xmake/templates/nim/shared/template.lua
deleted file mode 100644
index d7ec5bae4..000000000
--- a/xmake/templates/nim/shared/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("shared")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/nim/shared/project/xmake.lua b/xmake/templates/nim/shared/xmake.lua
index e2d380ac6..e2d380ac6 100644
--- a/xmake/templates/nim/shared/project/xmake.lua
+++ b/xmake/templates/nim/shared/xmake.lua
diff --git a/xmake/templates/nim/static/project/src/foo.nim b/xmake/templates/nim/static/src/foo.nim
index be0904262..be0904262 100644
--- a/xmake/templates/nim/static/project/src/foo.nim
+++ b/xmake/templates/nim/static/src/foo.nim
diff --git a/xmake/templates/nim/static/project/src/main.nim b/xmake/templates/nim/static/src/main.nim
index 1be3abe69..1be3abe69 100644
--- a/xmake/templates/nim/static/project/src/main.nim
+++ b/xmake/templates/nim/static/src/main.nim
diff --git a/xmake/templates/nim/static/template.lua b/xmake/templates/nim/static/template.lua
deleted file mode 100644
index abfe91a4b..000000000
--- a/xmake/templates/nim/static/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("static")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/nim/static/project/xmake.lua b/xmake/templates/nim/static/xmake.lua
index cf70acb9e..cf70acb9e 100644
--- a/xmake/templates/nim/static/project/xmake.lua
+++ b/xmake/templates/nim/static/xmake.lua
diff --git a/xmake/templates/objc++/bundle/template.lua b/xmake/templates/objc++/bundle/template.lua
deleted file mode 100644
index 1f491c498..000000000
--- a/xmake/templates/objc++/bundle/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("xcode.bundle")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/objc++/console/project/src/main.mm b/xmake/templates/objc++/console/src/main.mm
index cbd1e8906..cbd1e8906 100644
--- a/xmake/templates/objc++/console/project/src/main.mm
+++ b/xmake/templates/objc++/console/src/main.mm
diff --git a/xmake/templates/objc++/console/template.lua b/xmake/templates/objc++/console/template.lua
deleted file mode 100644
index ed2e13b57..000000000
--- a/xmake/templates/objc++/console/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("console")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/objc++/console/project/xmake.lua b/xmake/templates/objc++/console/xmake.lua
index f99120596..f99120596 100644
--- a/xmake/templates/objc++/console/project/xmake.lua
+++ b/xmake/templates/objc++/console/xmake.lua
diff --git a/xmake/templates/objc++/framework/template.lua b/xmake/templates/objc++/framework/template.lua
deleted file mode 100644
index ae446df55..000000000
--- a/xmake/templates/objc++/framework/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("xcode.framework")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/objc++/bundle/project/src/Info.plist b/xmake/templates/objc++/xcode.bundle/src/Info.plist
index 20608314e..20608314e 100644
--- a/xmake/templates/objc++/bundle/project/src/Info.plist
+++ b/xmake/templates/objc++/xcode.bundle/src/Info.plist
diff --git a/xmake/templates/objc++/bundle/project/src/test.h b/xmake/templates/objc++/xcode.bundle/src/test.h
index d882546d1..d882546d1 100644
--- a/xmake/templates/objc++/bundle/project/src/test.h
+++ b/xmake/templates/objc++/xcode.bundle/src/test.h
diff --git a/xmake/templates/objc++/bundle/project/src/test.mm b/xmake/templates/objc++/xcode.bundle/src/test.mm
index 20e29bd0a..20e29bd0a 100644
--- a/xmake/templates/objc++/bundle/project/src/test.mm
+++ b/xmake/templates/objc++/xcode.bundle/src/test.mm
diff --git a/xmake/templates/objc++/bundle/project/xmake.lua b/xmake/templates/objc++/xcode.bundle/xmake.lua
index 364e27278..364e27278 100644
--- a/xmake/templates/objc++/bundle/project/xmake.lua
+++ b/xmake/templates/objc++/xcode.bundle/xmake.lua
diff --git a/xmake/templates/objc++/framework/project/src/Info.plist b/xmake/templates/objc++/xcode.framework/src/Info.plist
index 20608314e..20608314e 100644
--- a/xmake/templates/objc++/framework/project/src/Info.plist
+++ b/xmake/templates/objc++/xcode.framework/src/Info.plist
diff --git a/xmake/templates/objc++/framework/project/src/test.h b/xmake/templates/objc++/xcode.framework/src/test.h
index d882546d1..d882546d1 100644
--- a/xmake/templates/objc++/framework/project/src/test.h
+++ b/xmake/templates/objc++/xcode.framework/src/test.h
diff --git a/xmake/templates/objc++/framework/project/src/test.mm b/xmake/templates/objc++/xcode.framework/src/test.mm
index 20e29bd0a..20e29bd0a 100644
--- a/xmake/templates/objc++/framework/project/src/test.mm
+++ b/xmake/templates/objc++/xcode.framework/src/test.mm
diff --git a/xmake/templates/objc++/framework/project/xmake.lua b/xmake/templates/objc++/xcode.framework/xmake.lua
index db61439df..db61439df 100644
--- a/xmake/templates/objc++/framework/project/xmake.lua
+++ b/xmake/templates/objc++/xcode.framework/xmake.lua
diff --git a/xmake/templates/objc/bundle/template.lua b/xmake/templates/objc/bundle/template.lua
deleted file mode 100644
index 1f491c498..000000000
--- a/xmake/templates/objc/bundle/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("xcode.bundle")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/objc/console/project/src/main.m b/xmake/templates/objc/console/src/main.m
index cbd1e8906..cbd1e8906 100644
--- a/xmake/templates/objc/console/project/src/main.m
+++ b/xmake/templates/objc/console/src/main.m
diff --git a/xmake/templates/objc/console/template.lua b/xmake/templates/objc/console/template.lua
deleted file mode 100644
index ed2e13b57..000000000
--- a/xmake/templates/objc/console/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("console")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/objc/console/project/xmake.lua b/xmake/templates/objc/console/xmake.lua
index 75496210f..75496210f 100644
--- a/xmake/templates/objc/console/project/xmake.lua
+++ b/xmake/templates/objc/console/xmake.lua
diff --git a/xmake/templates/objc/framework/template.lua b/xmake/templates/objc/framework/template.lua
deleted file mode 100644
index ae446df55..000000000
--- a/xmake/templates/objc/framework/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("xcode.framework")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/objc/iosapp/template.lua b/xmake/templates/objc/iosapp/template.lua
deleted file mode 100644
index 9355dc661..000000000
--- a/xmake/templates/objc/iosapp/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("xcode.iosapp")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/objc/iosapp_with_framework/template.lua b/xmake/templates/objc/iosapp_with_framework/template.lua
deleted file mode 100644
index b2ef37185..000000000
--- a/xmake/templates/objc/iosapp_with_framework/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("xcode.iosapp_with_framework")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/objc/macapp/template.lua b/xmake/templates/objc/macapp/template.lua
deleted file mode 100644
index 1c9e67542..000000000
--- a/xmake/templates/objc/macapp/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("xcode.macapp")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/objc/macapp_with_framework/template.lua b/xmake/templates/objc/macapp_with_framework/template.lua
deleted file mode 100644
index f8438f565..000000000
--- a/xmake/templates/objc/macapp_with_framework/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("xcode.macapp_with_framework")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/objc/bundle/project/src/Info.plist b/xmake/templates/objc/xcode.bundle/src/Info.plist
index 20608314e..20608314e 100644
--- a/xmake/templates/objc/bundle/project/src/Info.plist
+++ b/xmake/templates/objc/xcode.bundle/src/Info.plist
diff --git a/xmake/templates/objc/bundle/project/src/test.h b/xmake/templates/objc/xcode.bundle/src/test.h
index d882546d1..d882546d1 100644
--- a/xmake/templates/objc/bundle/project/src/test.h
+++ b/xmake/templates/objc/xcode.bundle/src/test.h
diff --git a/xmake/templates/objc/bundle/project/src/test.m b/xmake/templates/objc/xcode.bundle/src/test.m
index 20e29bd0a..20e29bd0a 100644
--- a/xmake/templates/objc/bundle/project/src/test.m
+++ b/xmake/templates/objc/xcode.bundle/src/test.m
diff --git a/xmake/templates/objc/bundle/project/xmake.lua b/xmake/templates/objc/xcode.bundle/xmake.lua
index 088994340..088994340 100644
--- a/xmake/templates/objc/bundle/project/xmake.lua
+++ b/xmake/templates/objc/xcode.bundle/xmake.lua
diff --git a/xmake/templates/objc/framework/project/src/Info.plist b/xmake/templates/objc/xcode.framework/src/Info.plist
index 20608314e..20608314e 100644
--- a/xmake/templates/objc/framework/project/src/Info.plist
+++ b/xmake/templates/objc/xcode.framework/src/Info.plist
diff --git a/xmake/templates/objc/framework/project/src/test.h b/xmake/templates/objc/xcode.framework/src/test.h
index d882546d1..d882546d1 100644
--- a/xmake/templates/objc/framework/project/src/test.h
+++ b/xmake/templates/objc/xcode.framework/src/test.h
diff --git a/xmake/templates/objc/framework/project/src/test.m b/xmake/templates/objc/xcode.framework/src/test.m
index 20e29bd0a..20e29bd0a 100644
--- a/xmake/templates/objc/framework/project/src/test.m
+++ b/xmake/templates/objc/xcode.framework/src/test.m
diff --git a/xmake/templates/objc/framework/project/xmake.lua b/xmake/templates/objc/xcode.framework/xmake.lua
index ad8e30290..ad8e30290 100644
--- a/xmake/templates/objc/framework/project/xmake.lua
+++ b/xmake/templates/objc/xcode.framework/xmake.lua
diff --git a/xmake/templates/objc/iosapp/project/src/AppDelegate.h b/xmake/templates/objc/xcode.iosapp/src/AppDelegate.h
index b01a8dc72..b01a8dc72 100644
--- a/xmake/templates/objc/iosapp/project/src/AppDelegate.h
+++ b/xmake/templates/objc/xcode.iosapp/src/AppDelegate.h
diff --git a/xmake/templates/objc/iosapp/project/src/AppDelegate.m b/xmake/templates/objc/xcode.iosapp/src/AppDelegate.m
index 0ad500bfe..0ad500bfe 100644
--- a/xmake/templates/objc/iosapp/project/src/AppDelegate.m
+++ b/xmake/templates/objc/xcode.iosapp/src/AppDelegate.m
diff --git a/xmake/templates/objc/iosapp/project/src/Assets.xcassets/AppIcon.appiconset/Contents.json b/xmake/templates/objc/xcode.iosapp/src/Assets.xcassets/AppIcon.appiconset/Contents.json
index d8db8d65f..d8db8d65f 100644
--- a/xmake/templates/objc/iosapp/project/src/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ b/xmake/templates/objc/xcode.iosapp/src/Assets.xcassets/AppIcon.appiconset/Contents.json
diff --git a/xmake/templates/objc/iosapp/project/src/Assets.xcassets/Contents.json b/xmake/templates/objc/xcode.iosapp/src/Assets.xcassets/Contents.json
index da4a164c9..da4a164c9 100644
--- a/xmake/templates/objc/iosapp/project/src/Assets.xcassets/Contents.json
+++ b/xmake/templates/objc/xcode.iosapp/src/Assets.xcassets/Contents.json
diff --git a/xmake/templates/objc/iosapp/project/src/Base.lproj/LaunchScreen.storyboard b/xmake/templates/objc/xcode.iosapp/src/Base.lproj/LaunchScreen.storyboard
index 865e9329f..865e9329f 100644
--- a/xmake/templates/objc/iosapp/project/src/Base.lproj/LaunchScreen.storyboard
+++ b/xmake/templates/objc/xcode.iosapp/src/Base.lproj/LaunchScreen.storyboard
diff --git a/xmake/templates/objc/iosapp/project/src/Base.lproj/Main.storyboard b/xmake/templates/objc/xcode.iosapp/src/Base.lproj/Main.storyboard
index 808a21ce7..808a21ce7 100644
--- a/xmake/templates/objc/iosapp/project/src/Base.lproj/Main.storyboard
+++ b/xmake/templates/objc/xcode.iosapp/src/Base.lproj/Main.storyboard
diff --git a/xmake/templates/objc/iosapp/project/src/Info.plist b/xmake/templates/objc/xcode.iosapp/src/Info.plist
index 686d21a3a..686d21a3a 100644
--- a/xmake/templates/objc/iosapp/project/src/Info.plist
+++ b/xmake/templates/objc/xcode.iosapp/src/Info.plist
diff --git a/xmake/templates/objc/iosapp/project/src/SceneDelegate.h b/xmake/templates/objc/xcode.iosapp/src/SceneDelegate.h
index 5dbf88aa6..5dbf88aa6 100644
--- a/xmake/templates/objc/iosapp/project/src/SceneDelegate.h
+++ b/xmake/templates/objc/xcode.iosapp/src/SceneDelegate.h
diff --git a/xmake/templates/objc/iosapp/project/src/SceneDelegate.m b/xmake/templates/objc/xcode.iosapp/src/SceneDelegate.m
index d6698dd7c..d6698dd7c 100644
--- a/xmake/templates/objc/iosapp/project/src/SceneDelegate.m
+++ b/xmake/templates/objc/xcode.iosapp/src/SceneDelegate.m
diff --git a/xmake/templates/objc/iosapp/project/src/ViewController.h b/xmake/templates/objc/xcode.iosapp/src/ViewController.h
index e74d2f236..e74d2f236 100644
--- a/xmake/templates/objc/iosapp/project/src/ViewController.h
+++ b/xmake/templates/objc/xcode.iosapp/src/ViewController.h
diff --git a/xmake/templates/objc/iosapp/project/src/ViewController.m b/xmake/templates/objc/xcode.iosapp/src/ViewController.m
index c3441c87a..c3441c87a 100644
--- a/xmake/templates/objc/iosapp/project/src/ViewController.m
+++ b/xmake/templates/objc/xcode.iosapp/src/ViewController.m
diff --git a/xmake/templates/objc/iosapp/project/src/main.m b/xmake/templates/objc/xcode.iosapp/src/main.m
index 11a58afc7..11a58afc7 100644
--- a/xmake/templates/objc/iosapp/project/src/main.m
+++ b/xmake/templates/objc/xcode.iosapp/src/main.m
diff --git a/xmake/templates/objc/iosapp/project/xmake.lua b/xmake/templates/objc/xcode.iosapp/xmake.lua
index b5b00b81f..b5b00b81f 100644
--- a/xmake/templates/objc/iosapp/project/xmake.lua
+++ b/xmake/templates/objc/xcode.iosapp/xmake.lua
diff --git a/xmake/templates/objc/iosapp_with_framework/project/src/app/AppDelegate.h b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/AppDelegate.h
index b01a8dc72..b01a8dc72 100644
--- a/xmake/templates/objc/iosapp_with_framework/project/src/app/AppDelegate.h
+++ b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/AppDelegate.h
diff --git a/xmake/templates/objc/iosapp_with_framework/project/src/app/AppDelegate.m b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/AppDelegate.m
index 1f3556c06..1f3556c06 100644
--- a/xmake/templates/objc/iosapp_with_framework/project/src/app/AppDelegate.m
+++ b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/AppDelegate.m
diff --git a/xmake/templates/objc/iosapp_with_framework/project/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json
index d8db8d65f..d8db8d65f 100644
--- a/xmake/templates/objc/iosapp_with_framework/project/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json
diff --git a/xmake/templates/objc/iosapp_with_framework/project/src/app/Assets.xcassets/Contents.json b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/Assets.xcassets/Contents.json
index da4a164c9..da4a164c9 100644
--- a/xmake/templates/objc/iosapp_with_framework/project/src/app/Assets.xcassets/Contents.json
+++ b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/Assets.xcassets/Contents.json
diff --git a/xmake/templates/objc/iosapp_with_framework/project/src/app/Base.lproj/LaunchScreen.storyboard b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/Base.lproj/LaunchScreen.storyboard
index 865e9329f..865e9329f 100644
--- a/xmake/templates/objc/iosapp_with_framework/project/src/app/Base.lproj/LaunchScreen.storyboard
+++ b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/Base.lproj/LaunchScreen.storyboard
diff --git a/xmake/templates/objc/iosapp_with_framework/project/src/app/Base.lproj/Main.storyboard b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/Base.lproj/Main.storyboard
index 808a21ce7..808a21ce7 100644
--- a/xmake/templates/objc/iosapp_with_framework/project/src/app/Base.lproj/Main.storyboard
+++ b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/Base.lproj/Main.storyboard
diff --git a/xmake/templates/objc/iosapp_with_framework/project/src/app/Info.plist b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/Info.plist
index 686d21a3a..686d21a3a 100644
--- a/xmake/templates/objc/iosapp_with_framework/project/src/app/Info.plist
+++ b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/Info.plist
diff --git a/xmake/templates/objc/iosapp_with_framework/project/src/app/SceneDelegate.h b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/SceneDelegate.h
index 5dbf88aa6..5dbf88aa6 100644
--- a/xmake/templates/objc/iosapp_with_framework/project/src/app/SceneDelegate.h
+++ b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/SceneDelegate.h
diff --git a/xmake/templates/objc/iosapp_with_framework/project/src/app/SceneDelegate.m b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/SceneDelegate.m
index d6698dd7c..d6698dd7c 100644
--- a/xmake/templates/objc/iosapp_with_framework/project/src/app/SceneDelegate.m
+++ b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/SceneDelegate.m
diff --git a/xmake/templates/objc/iosapp_with_framework/project/src/app/ViewController.h b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/ViewController.h
index e74d2f236..e74d2f236 100644
--- a/xmake/templates/objc/iosapp_with_framework/project/src/app/ViewController.h
+++ b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/ViewController.h
diff --git a/xmake/templates/objc/iosapp_with_framework/project/src/app/ViewController.m b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/ViewController.m
index c3441c87a..c3441c87a 100644
--- a/xmake/templates/objc/iosapp_with_framework/project/src/app/ViewController.m
+++ b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/ViewController.m
diff --git a/xmake/templates/objc/iosapp_with_framework/project/src/app/main.m b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/main.m
index 11a58afc7..11a58afc7 100644
--- a/xmake/templates/objc/iosapp_with_framework/project/src/app/main.m
+++ b/xmake/templates/objc/xcode.iosapp_with_framework/src/app/main.m
diff --git a/xmake/templates/objc/iosapp_with_framework/project/src/framework/Info.plist b/xmake/templates/objc/xcode.iosapp_with_framework/src/framework/Info.plist
index 20608314e..20608314e 100644
--- a/xmake/templates/objc/iosapp_with_framework/project/src/framework/Info.plist
+++ b/xmake/templates/objc/xcode.iosapp_with_framework/src/framework/Info.plist
diff --git a/xmake/templates/objc/iosapp_with_framework/project/src/framework/test.h b/xmake/templates/objc/xcode.iosapp_with_framework/src/framework/test.h
index d882546d1..d882546d1 100644
--- a/xmake/templates/objc/iosapp_with_framework/project/src/framework/test.h
+++ b/xmake/templates/objc/xcode.iosapp_with_framework/src/framework/test.h
diff --git a/xmake/templates/objc/iosapp_with_framework/project/src/framework/test.m b/xmake/templates/objc/xcode.iosapp_with_framework/src/framework/test.m
index 71214544b..71214544b 100644
--- a/xmake/templates/objc/iosapp_with_framework/project/src/framework/test.m
+++ b/xmake/templates/objc/xcode.iosapp_with_framework/src/framework/test.m
diff --git a/xmake/templates/objc/iosapp_with_framework/project/xmake.lua b/xmake/templates/objc/xcode.iosapp_with_framework/xmake.lua
index 89348a3b6..89348a3b6 100644
--- a/xmake/templates/objc/iosapp_with_framework/project/xmake.lua
+++ b/xmake/templates/objc/xcode.iosapp_with_framework/xmake.lua
diff --git a/xmake/templates/objc/macapp/project/src/AppDelegate.h b/xmake/templates/objc/xcode.macapp/src/AppDelegate.h
index 5f5ba059e..5f5ba059e 100644
--- a/xmake/templates/objc/macapp/project/src/AppDelegate.h
+++ b/xmake/templates/objc/xcode.macapp/src/AppDelegate.h
diff --git a/xmake/templates/objc/macapp/project/src/AppDelegate.m b/xmake/templates/objc/xcode.macapp/src/AppDelegate.m
index da967d2ef..da967d2ef 100644
--- a/xmake/templates/objc/macapp/project/src/AppDelegate.m
+++ b/xmake/templates/objc/xcode.macapp/src/AppDelegate.m
diff --git a/xmake/templates/objc/macapp/project/src/Assets.xcassets/AppIcon.appiconset/Contents.json b/xmake/templates/objc/xcode.macapp/src/Assets.xcassets/AppIcon.appiconset/Contents.json
index 2db2b1c7c..2db2b1c7c 100644
--- a/xmake/templates/objc/macapp/project/src/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ b/xmake/templates/objc/xcode.macapp/src/Assets.xcassets/AppIcon.appiconset/Contents.json
diff --git a/xmake/templates/objc/macapp/project/src/Assets.xcassets/Contents.json b/xmake/templates/objc/xcode.macapp/src/Assets.xcassets/Contents.json
index da4a164c9..da4a164c9 100644
--- a/xmake/templates/objc/macapp/project/src/Assets.xcassets/Contents.json
+++ b/xmake/templates/objc/xcode.macapp/src/Assets.xcassets/Contents.json
diff --git a/xmake/templates/objc/macapp/project/src/Base.lproj/Main.storyboard b/xmake/templates/objc/xcode.macapp/src/Base.lproj/Main.storyboard
index 7a6d659a5..7a6d659a5 100644
--- a/xmake/templates/objc/macapp/project/src/Base.lproj/Main.storyboard
+++ b/xmake/templates/objc/xcode.macapp/src/Base.lproj/Main.storyboard
diff --git a/xmake/templates/objc/macapp/project/src/Info.plist b/xmake/templates/objc/xcode.macapp/src/Info.plist
index ce53d780c..ce53d780c 100644
--- a/xmake/templates/objc/macapp/project/src/Info.plist
+++ b/xmake/templates/objc/xcode.macapp/src/Info.plist
diff --git a/xmake/templates/objc/macapp/project/src/ViewController.h b/xmake/templates/objc/xcode.macapp/src/ViewController.h
index a974fc934..a974fc934 100644
--- a/xmake/templates/objc/macapp/project/src/ViewController.h
+++ b/xmake/templates/objc/xcode.macapp/src/ViewController.h
diff --git a/xmake/templates/objc/macapp/project/src/ViewController.m b/xmake/templates/objc/xcode.macapp/src/ViewController.m
index bccdf6189..bccdf6189 100644
--- a/xmake/templates/objc/macapp/project/src/ViewController.m
+++ b/xmake/templates/objc/xcode.macapp/src/ViewController.m
diff --git a/xmake/templates/objc/macapp/project/src/main.m b/xmake/templates/objc/xcode.macapp/src/main.m
index ae3706f51..ae3706f51 100644
--- a/xmake/templates/objc/macapp/project/src/main.m
+++ b/xmake/templates/objc/xcode.macapp/src/main.m
diff --git a/xmake/templates/objc/macapp/project/src/test.entitlements b/xmake/templates/objc/xcode.macapp/src/test.entitlements
index f2ef3ae02..f2ef3ae02 100644
--- a/xmake/templates/objc/macapp/project/src/test.entitlements
+++ b/xmake/templates/objc/xcode.macapp/src/test.entitlements
diff --git a/xmake/templates/objc/macapp/project/xmake.lua b/xmake/templates/objc/xcode.macapp/xmake.lua
index b5b00b81f..b5b00b81f 100644
--- a/xmake/templates/objc/macapp/project/xmake.lua
+++ b/xmake/templates/objc/xcode.macapp/xmake.lua
diff --git a/xmake/templates/objc/macapp_with_framework/project/src/app/AppDelegate.h b/xmake/templates/objc/xcode.macapp_with_framework/src/app/AppDelegate.h
index 5f5ba059e..5f5ba059e 100644
--- a/xmake/templates/objc/macapp_with_framework/project/src/app/AppDelegate.h
+++ b/xmake/templates/objc/xcode.macapp_with_framework/src/app/AppDelegate.h
diff --git a/xmake/templates/objc/macapp_with_framework/project/src/app/AppDelegate.m b/xmake/templates/objc/xcode.macapp_with_framework/src/app/AppDelegate.m
index 667420c8c..667420c8c 100644
--- a/xmake/templates/objc/macapp_with_framework/project/src/app/AppDelegate.m
+++ b/xmake/templates/objc/xcode.macapp_with_framework/src/app/AppDelegate.m
diff --git a/xmake/templates/objc/macapp_with_framework/project/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json b/xmake/templates/objc/xcode.macapp_with_framework/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json
index 2db2b1c7c..2db2b1c7c 100644
--- a/xmake/templates/objc/macapp_with_framework/project/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ b/xmake/templates/objc/xcode.macapp_with_framework/src/app/Assets.xcassets/AppIcon.appiconset/Contents.json
diff --git a/xmake/templates/objc/macapp_with_framework/project/src/app/Assets.xcassets/Contents.json b/xmake/templates/objc/xcode.macapp_with_framework/src/app/Assets.xcassets/Contents.json
index da4a164c9..da4a164c9 100644
--- a/xmake/templates/objc/macapp_with_framework/project/src/app/Assets.xcassets/Contents.json
+++ b/xmake/templates/objc/xcode.macapp_with_framework/src/app/Assets.xcassets/Contents.json
diff --git a/xmake/templates/objc/macapp_with_framework/project/src/app/Base.lproj/Main.storyboard b/xmake/templates/objc/xcode.macapp_with_framework/src/app/Base.lproj/Main.storyboard
index 7a6d659a5..7a6d659a5 100644
--- a/xmake/templates/objc/macapp_with_framework/project/src/app/Base.lproj/Main.storyboard
+++ b/xmake/templates/objc/xcode.macapp_with_framework/src/app/Base.lproj/Main.storyboard
diff --git a/xmake/templates/objc/macapp_with_framework/project/src/app/Info.plist b/xmake/templates/objc/xcode.macapp_with_framework/src/app/Info.plist
index ce53d780c..ce53d780c 100644
--- a/xmake/templates/objc/macapp_with_framework/project/src/app/Info.plist
+++ b/xmake/templates/objc/xcode.macapp_with_framework/src/app/Info.plist
diff --git a/xmake/templates/objc/macapp_with_framework/project/src/app/ViewController.h b/xmake/templates/objc/xcode.macapp_with_framework/src/app/ViewController.h
index a974fc934..a974fc934 100644
--- a/xmake/templates/objc/macapp_with_framework/project/src/app/ViewController.h
+++ b/xmake/templates/objc/xcode.macapp_with_framework/src/app/ViewController.h
diff --git a/xmake/templates/objc/macapp_with_framework/project/src/app/ViewController.m b/xmake/templates/objc/xcode.macapp_with_framework/src/app/ViewController.m
index bccdf6189..bccdf6189 100644
--- a/xmake/templates/objc/macapp_with_framework/project/src/app/ViewController.m
+++ b/xmake/templates/objc/xcode.macapp_with_framework/src/app/ViewController.m
diff --git a/xmake/templates/objc/macapp_with_framework/project/src/app/main.m b/xmake/templates/objc/xcode.macapp_with_framework/src/app/main.m
index ae3706f51..ae3706f51 100644
--- a/xmake/templates/objc/macapp_with_framework/project/src/app/main.m
+++ b/xmake/templates/objc/xcode.macapp_with_framework/src/app/main.m
diff --git a/xmake/templates/objc/macapp_with_framework/project/src/app/test.entitlements b/xmake/templates/objc/xcode.macapp_with_framework/src/app/test.entitlements
index f2ef3ae02..f2ef3ae02 100644
--- a/xmake/templates/objc/macapp_with_framework/project/src/app/test.entitlements
+++ b/xmake/templates/objc/xcode.macapp_with_framework/src/app/test.entitlements
diff --git a/xmake/templates/objc/macapp_with_framework/project/src/framework/Info.plist b/xmake/templates/objc/xcode.macapp_with_framework/src/framework/Info.plist
index 20608314e..20608314e 100644
--- a/xmake/templates/objc/macapp_with_framework/project/src/framework/Info.plist
+++ b/xmake/templates/objc/xcode.macapp_with_framework/src/framework/Info.plist
diff --git a/xmake/templates/objc/macapp_with_framework/project/src/framework/test.h b/xmake/templates/objc/xcode.macapp_with_framework/src/framework/test.h
index d882546d1..d882546d1 100644
--- a/xmake/templates/objc/macapp_with_framework/project/src/framework/test.h
+++ b/xmake/templates/objc/xcode.macapp_with_framework/src/framework/test.h
diff --git a/xmake/templates/objc/macapp_with_framework/project/src/framework/test.m b/xmake/templates/objc/xcode.macapp_with_framework/src/framework/test.m
index 71214544b..71214544b 100644
--- a/xmake/templates/objc/macapp_with_framework/project/src/framework/test.m
+++ b/xmake/templates/objc/xcode.macapp_with_framework/src/framework/test.m
diff --git a/xmake/templates/objc/macapp_with_framework/project/xmake.lua b/xmake/templates/objc/xcode.macapp_with_framework/xmake.lua
index 89348a3b6..89348a3b6 100644
--- a/xmake/templates/objc/macapp_with_framework/project/xmake.lua
+++ b/xmake/templates/objc/xcode.macapp_with_framework/xmake.lua
diff --git a/xmake/templates/pascal/console/project/src/main.pas b/xmake/templates/pascal/console/src/main.pas
index a908ffab7..a908ffab7 100644
--- a/xmake/templates/pascal/console/project/src/main.pas
+++ b/xmake/templates/pascal/console/src/main.pas
diff --git a/xmake/templates/pascal/console/template.lua b/xmake/templates/pascal/console/template.lua
deleted file mode 100644
index ed2e13b57..000000000
--- a/xmake/templates/pascal/console/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("console")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/pascal/console/project/xmake.lua b/xmake/templates/pascal/console/xmake.lua
index 155005840..155005840 100644
--- a/xmake/templates/pascal/console/project/xmake.lua
+++ b/xmake/templates/pascal/console/xmake.lua
diff --git a/xmake/templates/pascal/shared/project/src/foo.pas b/xmake/templates/pascal/shared/src/foo.pas
index 788950f46..788950f46 100644
--- a/xmake/templates/pascal/shared/project/src/foo.pas
+++ b/xmake/templates/pascal/shared/src/foo.pas
diff --git a/xmake/templates/pascal/shared/project/src/main.pas b/xmake/templates/pascal/shared/src/main.pas
index 02d5e88d0..02d5e88d0 100644
--- a/xmake/templates/pascal/shared/project/src/main.pas
+++ b/xmake/templates/pascal/shared/src/main.pas
diff --git a/xmake/templates/pascal/shared/template.lua b/xmake/templates/pascal/shared/template.lua
deleted file mode 100644
index d7ec5bae4..000000000
--- a/xmake/templates/pascal/shared/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("shared")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/pascal/shared/project/xmake.lua b/xmake/templates/pascal/shared/xmake.lua
index dd29cf486..dd29cf486 100644
--- a/xmake/templates/pascal/shared/project/xmake.lua
+++ b/xmake/templates/pascal/shared/xmake.lua
diff --git a/xmake/templates/rust/console/project/src/main.rs b/xmake/templates/rust/console/src/main.rs
index 88d5e2749..88d5e2749 100644
--- a/xmake/templates/rust/console/project/src/main.rs
+++ b/xmake/templates/rust/console/src/main.rs
diff --git a/xmake/templates/rust/console/template.lua b/xmake/templates/rust/console/template.lua
deleted file mode 100644
index ed2e13b57..000000000
--- a/xmake/templates/rust/console/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("console")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/rust/console/project/xmake.lua b/xmake/templates/rust/console/xmake.lua
index 2d0e19145..2d0e19145 100644
--- a/xmake/templates/rust/console/project/xmake.lua
+++ b/xmake/templates/rust/console/xmake.lua
diff --git a/xmake/templates/rust/shared/project/src/foo.rs b/xmake/templates/rust/shared/src/foo.rs
index a3a3aa4a6..a3a3aa4a6 100644
--- a/xmake/templates/rust/shared/project/src/foo.rs
+++ b/xmake/templates/rust/shared/src/foo.rs
diff --git a/xmake/templates/rust/shared/project/src/main.rs b/xmake/templates/rust/shared/src/main.rs
index 205d23da3..205d23da3 100644
--- a/xmake/templates/rust/shared/project/src/main.rs
+++ b/xmake/templates/rust/shared/src/main.rs
diff --git a/xmake/templates/rust/shared/template.lua b/xmake/templates/rust/shared/template.lua
deleted file mode 100644
index d7ec5bae4..000000000
--- a/xmake/templates/rust/shared/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("shared")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/rust/shared/project/xmake.lua b/xmake/templates/rust/shared/xmake.lua
index d20b6f5d7..d20b6f5d7 100644
--- a/xmake/templates/rust/shared/project/xmake.lua
+++ b/xmake/templates/rust/shared/xmake.lua
diff --git a/xmake/templates/rust/static/project/src/foo.rs b/xmake/templates/rust/static/src/foo.rs
index a3a3aa4a6..a3a3aa4a6 100644
--- a/xmake/templates/rust/static/project/src/foo.rs
+++ b/xmake/templates/rust/static/src/foo.rs
diff --git a/xmake/templates/rust/static/project/src/main.rs b/xmake/templates/rust/static/src/main.rs
index 205d23da3..205d23da3 100644
--- a/xmake/templates/rust/static/project/src/main.rs
+++ b/xmake/templates/rust/static/src/main.rs
diff --git a/xmake/templates/rust/static/template.lua b/xmake/templates/rust/static/template.lua
deleted file mode 100644
index abfe91a4b..000000000
--- a/xmake/templates/rust/static/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("static")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/rust/static/project/xmake.lua b/xmake/templates/rust/static/xmake.lua
index 79a9ac569..79a9ac569 100644
--- a/xmake/templates/rust/static/project/xmake.lua
+++ b/xmake/templates/rust/static/xmake.lua
diff --git a/xmake/templates/swift/console/project/src/main.swift b/xmake/templates/swift/console/src/main.swift
index ee21045f4..ee21045f4 100644
--- a/xmake/templates/swift/console/project/src/main.swift
+++ b/xmake/templates/swift/console/src/main.swift
diff --git a/xmake/templates/swift/console/template.lua b/xmake/templates/swift/console/template.lua
deleted file mode 100644
index ed2e13b57..000000000
--- a/xmake/templates/swift/console/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("console")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/swift/console/project/xmake.lua b/xmake/templates/swift/console/xmake.lua
index f607b1127..f607b1127 100644
--- a/xmake/templates/swift/console/project/xmake.lua
+++ b/xmake/templates/swift/console/xmake.lua
diff --git a/xmake/templates/vala/console/project/src/main.vala b/xmake/templates/vala/console/src/main.vala
index 8e8a32da0..8e8a32da0 100644
--- a/xmake/templates/vala/console/project/src/main.vala
+++ b/xmake/templates/vala/console/src/main.vala
diff --git a/xmake/templates/vala/console/template.lua b/xmake/templates/vala/console/template.lua
deleted file mode 100644
index ed2e13b57..000000000
--- a/xmake/templates/vala/console/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("console")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/vala/console/project/xmake.lua b/xmake/templates/vala/console/xmake.lua
index 474572597..474572597 100644
--- a/xmake/templates/vala/console/project/xmake.lua
+++ b/xmake/templates/vala/console/xmake.lua
diff --git a/xmake/templates/vala/shared/project/src/main.vala b/xmake/templates/vala/shared/src/main.vala
index da9fd895e..da9fd895e 100644
--- a/xmake/templates/vala/shared/project/src/main.vala
+++ b/xmake/templates/vala/shared/src/main.vala
diff --git a/xmake/templates/vala/shared/project/src/mymath.vala b/xmake/templates/vala/shared/src/mymath.vala
index 4f4e761c5..4f4e761c5 100644
--- a/xmake/templates/vala/shared/project/src/mymath.vala
+++ b/xmake/templates/vala/shared/src/mymath.vala
diff --git a/xmake/templates/vala/shared/template.lua b/xmake/templates/vala/shared/template.lua
deleted file mode 100644
index d7ec5bae4..000000000
--- a/xmake/templates/vala/shared/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("shared")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/vala/shared/project/xmake.lua b/xmake/templates/vala/shared/xmake.lua
index e9148106c..e9148106c 100644
--- a/xmake/templates/vala/shared/project/xmake.lua
+++ b/xmake/templates/vala/shared/xmake.lua
diff --git a/xmake/templates/vala/static/project/src/main.vala b/xmake/templates/vala/static/src/main.vala
index da9fd895e..da9fd895e 100644
--- a/xmake/templates/vala/static/project/src/main.vala
+++ b/xmake/templates/vala/static/src/main.vala
diff --git a/xmake/templates/vala/static/project/src/mymath.vala b/xmake/templates/vala/static/src/mymath.vala
index 4f4e761c5..4f4e761c5 100644
--- a/xmake/templates/vala/static/project/src/mymath.vala
+++ b/xmake/templates/vala/static/src/mymath.vala
diff --git a/xmake/templates/vala/static/template.lua b/xmake/templates/vala/static/template.lua
deleted file mode 100644
index abfe91a4b..000000000
--- a/xmake/templates/vala/static/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("static")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/vala/static/project/xmake.lua b/xmake/templates/vala/static/xmake.lua
index 143566fcb..143566fcb 100644
--- a/xmake/templates/vala/static/project/xmake.lua
+++ b/xmake/templates/vala/static/xmake.lua
diff --git a/xmake/templates/zig/console/project/src/main.zig b/xmake/templates/zig/console/src/main.zig
index db34441e1..db34441e1 100644
--- a/xmake/templates/zig/console/project/src/main.zig
+++ b/xmake/templates/zig/console/src/main.zig
diff --git a/xmake/templates/zig/console/template.lua b/xmake/templates/zig/console/template.lua
deleted file mode 100644
index ed2e13b57..000000000
--- a/xmake/templates/zig/console/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("console")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/zig/console/project/xmake.lua b/xmake/templates/zig/console/xmake.lua
index 69a4b4477..69a4b4477 100644
--- a/xmake/templates/zig/console/project/xmake.lua
+++ b/xmake/templates/zig/console/xmake.lua
diff --git a/xmake/templates/zig/shared/project/src/main.zig b/xmake/templates/zig/shared/src/main.zig
index 7dc7b2bc4..7dc7b2bc4 100644
--- a/xmake/templates/zig/shared/project/src/main.zig
+++ b/xmake/templates/zig/shared/src/main.zig
diff --git a/xmake/templates/zig/shared/project/src/test.zig b/xmake/templates/zig/shared/src/test.zig
index a04ec1544..a04ec1544 100644
--- a/xmake/templates/zig/shared/project/src/test.zig
+++ b/xmake/templates/zig/shared/src/test.zig
diff --git a/xmake/templates/zig/shared/template.lua b/xmake/templates/zig/shared/template.lua
deleted file mode 100644
index d7ec5bae4..000000000
--- a/xmake/templates/zig/shared/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("shared")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/zig/shared/project/xmake.lua b/xmake/templates/zig/shared/xmake.lua
index a21b056bc..a21b056bc 100644
--- a/xmake/templates/zig/shared/project/xmake.lua
+++ b/xmake/templates/zig/shared/xmake.lua
diff --git a/xmake/templates/zig/static/project/src/main.zig b/xmake/templates/zig/static/src/main.zig
index 7dc7b2bc4..7dc7b2bc4 100644
--- a/xmake/templates/zig/static/project/src/main.zig
+++ b/xmake/templates/zig/static/src/main.zig
diff --git a/xmake/templates/zig/static/project/src/test.zig b/xmake/templates/zig/static/src/test.zig
index a04ec1544..a04ec1544 100644
--- a/xmake/templates/zig/static/project/src/test.zig
+++ b/xmake/templates/zig/static/src/test.zig
diff --git a/xmake/templates/zig/static/template.lua b/xmake/templates/zig/static/template.lua
deleted file mode 100644
index abfe91a4b..000000000
--- a/xmake/templates/zig/static/template.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-template("static")
- add_configfiles("xmake.lua")
diff --git a/xmake/templates/zig/static/project/xmake.lua b/xmake/templates/zig/static/xmake.lua
index f1321ee0f..f1321ee0f 100644
--- a/xmake/templates/zig/static/project/xmake.lua
+++ b/xmake/templates/zig/static/xmake.lua