mirror of
https://github.com/xxoommd/magic.git
synced 2025-05-22 05:02:42 +00:00
Add win profile
This commit is contained in:
parent
9c140241da
commit
8b2517b9b1
64
profiles/win/profile
Normal file
64
profiles/win/profile
Normal file
@ -0,0 +1,64 @@
|
||||
alias l='ls -lhF'
|
||||
alias la='ls -AlhF'
|
||||
alias ll=l
|
||||
alias open=explorer
|
||||
|
||||
export LC_ALL=zh_CN.utf-8
|
||||
export http_proxyserver=http://127.0.0.1:10809
|
||||
|
||||
function set-proxy() {
|
||||
if [[ $1 == "on" ]]; then
|
||||
export HTTP_PROXY=$http_proxyserver
|
||||
export HTTPS_PROXY=$http_proxyserver
|
||||
elif [[ $1 == "off" ]]; then
|
||||
unset HTTP_PROXY HTTPS_PROXY
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "HTTP_PROXY=$HTTP_PROXY"
|
||||
echo "HTTPS_PROXY=$HTTPS_PROXY"
|
||||
echo
|
||||
}
|
||||
|
||||
function c3_build() {
|
||||
# check if augustus or julius build folder
|
||||
|
||||
if [[ $PWD =~ "augustus" || $PWD =~ "julius" ]]; then
|
||||
# 判断 basename 是否为 build
|
||||
if [ "$(basename "$PWD")" = "build" ]; then
|
||||
echo "当前目录: $PWD"
|
||||
else
|
||||
echo "【错误】进入 'augustus' 或者 'julius' 的 'build' 目录"
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
echo "【错误】进入 'augustus' 或者 'julius' 的 'build' 目录"
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
cmd=$1
|
||||
MINGW32_MAKE_PATH="/D/App/w64devkit/bin/mingw32-make.exe"
|
||||
if [[ -z $cmd || $cmd == "build" ]]; then
|
||||
if [[ ! -f "Makefile" ]]; then
|
||||
cmake .. -G "MinGW Makefiles"
|
||||
fi
|
||||
$MINGW32_MAKE_PATH -j$(nproc)
|
||||
|
||||
rm -rf assets maps
|
||||
echo
|
||||
echo " - Updating assets ..." && cp -r ../res/assets .
|
||||
echo " - Updating maps ..." && cp -r ../res/maps .
|
||||
echo " - Updating libs ..." && cp ../ext/SDL2/SDL2-2.32.4/x86_64-w64-mingw32/bin/SDL2.dll . && cp ../ext/SDL2/SDL2_mixer-2.8.1/x86_64-w64-mingw32/bin/SDL2_mixer.dll .
|
||||
elif [[ $cmd == "clean" ]]; then
|
||||
echo "开始清理..."
|
||||
echo " - Deleting CMakeCache.txt ..." && rm -rf CMakeCache.txt
|
||||
echo " - Deleting CMakeFiles ..." && rm -rf CMakeFiles
|
||||
echo " - Deleting Makefile ..." && rm -f Makefile
|
||||
echo " - Deleting cmake_install.cmake ..." && rm -f cmake_install.cmake
|
||||
echo " - Deleting augustus.* ..." && rm -f augustus.*
|
||||
echo " - Deleting res ..." && rm -rf assets maps
|
||||
echo " - Deleting libs ..." && rm -rf SDL2*
|
||||
echo " - Deleting Logs ..." && rm -rf *log*.txt
|
||||
fi
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
GREEN='\033[0;32m'
|
||||
RED='\033[0;31m'
|
||||
|
Loading…
x
Reference in New Issue
Block a user