mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-14 09:59:24 +08:00
Add: pack source code without git info
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -21,6 +21,11 @@ config/reloadalas
|
||||
test.py
|
||||
test/
|
||||
|
||||
# pack
|
||||
build
|
||||
pack
|
||||
install
|
||||
|
||||
# Created by .ignore support plugin (hsz.mobi)
|
||||
|
||||
### JetBrains template
|
||||
|
||||
40
CMakeLists.txt
Normal file
40
CMakeLists.txt
Normal file
@@ -0,0 +1,40 @@
|
||||
cmake_minimum_required(VERSION 3.25)
|
||||
project(Alas)
|
||||
|
||||
set(PROJECT_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
set(INSTALL_DIR ${PROJECT_DIR}/install)
|
||||
set(PACK_DIR ${PROJECT_DIR}/pack)
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX ${INSTALL_DIR})
|
||||
|
||||
set(INSTALL_DIR_COMPOENT
|
||||
${PROJECT_DIR}/assets
|
||||
${PROJECT_DIR}/bin
|
||||
${PROJECT_DIR}/campaign
|
||||
${PROJECT_DIR}/config
|
||||
${PROJECT_DIR}/deploy
|
||||
${PROJECT_DIR}/dev_tools
|
||||
${PROJECT_DIR}/doc
|
||||
${PROJECT_DIR}/module
|
||||
${PROJECT_DIR}/submodule
|
||||
${PROJECT_DIR}/webapp
|
||||
)
|
||||
|
||||
file(GLOB INSTALL_FILE_COMPOENT ${PROJECT_DIR}/*.py)
|
||||
|
||||
install(DIRECTORY ${INSTALL_DIR_COMPOENT}
|
||||
DESTINATION .
|
||||
PATTERN "__pycache__" EXCLUDE
|
||||
)
|
||||
|
||||
install(FILES ${INSTALL_FILE_COMPOENT}
|
||||
DESTINATION .
|
||||
)
|
||||
|
||||
if(NOT DEFINED CPACK_GENERATOR)
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
endif()
|
||||
|
||||
set(CPACK_OUTPUT_FILE_PREFIX ${PACK_DIR})
|
||||
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME})
|
||||
include(CPack)
|
||||
17
Makefile
Normal file
17
Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
.PHONY: clean pack
|
||||
|
||||
RM = -rmdir /S /Q
|
||||
CMAKE = cmake
|
||||
|
||||
all: clean pack
|
||||
|
||||
pack:
|
||||
$(CMAKE) -B build
|
||||
$(CMAKE) --build build
|
||||
$(CMAKE) --install build
|
||||
$(CMAKE) --build build --target package
|
||||
|
||||
clean:
|
||||
$(RM) build
|
||||
$(RM) pack
|
||||
$(RM) install
|
||||
49
make.bat
Normal file
49
make.bat
Normal file
@@ -0,0 +1,49 @@
|
||||
@echo off
|
||||
|
||||
cls
|
||||
|
||||
set target=%1
|
||||
|
||||
if not defined target (
|
||||
set target=all
|
||||
)
|
||||
|
||||
if %target%==clean (
|
||||
call :clean
|
||||
)else if %target%==all (
|
||||
call :clean
|
||||
call :pack
|
||||
)else if %target%==pack (
|
||||
call :pack
|
||||
) else (
|
||||
echo Unknow target: %target%
|
||||
)
|
||||
|
||||
exit /B 0
|
||||
|
||||
:clean
|
||||
call :title "CLEAN"
|
||||
setlocal
|
||||
set RM=rmdir /S /Q
|
||||
%RM% build
|
||||
%RM% pack
|
||||
%RM% install
|
||||
endlocal
|
||||
exit /B 0
|
||||
|
||||
:pack
|
||||
call :title "PACK"
|
||||
setlocal
|
||||
set CMAKE=cmake
|
||||
%CMAKE% -B build
|
||||
%CMAKE% --build build
|
||||
%CMAKE% --install build
|
||||
%CMAKE% --build build --target package
|
||||
endlocal
|
||||
exit /B 0
|
||||
|
||||
:title
|
||||
echo ************************************************************
|
||||
echo %~1
|
||||
echo ************************************************************
|
||||
exit /B 0
|
||||
Reference in New Issue
Block a user