1 Star 0 Fork 135

大湿胸/xmake

forked from tboox/xmake 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install.bat 2.20 KB
一键复制 编辑 原始数据 按行查看 历史
ruki 提交于 2015-07-23 17:56 +08:00 . add more install log for windows
@echo off
rem get the admin permissions
>nul 2>&1 "%systemroot%\system32\cacls.exe" "%systemroot%\system32\config\system"
if '%errorlevel%' neq '0' (
echo requesting administrative privileges...
goto uac_prompt
) else ( goto got_admin )
:uac_prompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit -B
:got_admin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%cd%"
cd /D "%~dp0"
rem create the xmake install directory
if %PROCESSOR_ARCHITECTURE%==x86_64 (
set xmake_dir_install_default=C:\Program Files (x86^)\xmake
) else (
set xmake_dir_install_default=C:\Program Files\xmake
)
echo please input the install directory
set /p xmake_dir_install=(default: %xmake_dir_install_default%):
if "%xmake_dir_install%"=="" set xmake_dir_install=%xmake_dir_install_default%
if exist "%xmake_dir_install%" rmdir /s /q "%xmake_dir_install%"
if not exist "%xmake_dir_install%" mkdir "%xmake_dir_install%"
rem compile xmake-core
echo compiling xmake-core...
cd core
cmd /K build.bat
cd ..
rem install the xmake core file
echo installing xmake-core...
set xmake_core=core\bin\demo.pkg\bin\msvc\x86\demo.exe
set xmake_core_install=%xmake_dir_install%\xmake_core.exe
copy /Y "%xmake_core%" "%xmake_core_install%" > install.log
rem install the xmake directory
xcopy /S /Q /Y "xmake" "%xmake_dir_install%" >> install.log
rem make the xmake loader
echo installing xmake-loader...
set xmake_loader=%temp%\xmake_loader
echo @echo off > %xmake_loader%
echo set XMAKE_PROGRAM_DIR=%xmake_dir_install%>> %xmake_loader%
echo "%xmake_core_install%" %%* >> %xmake_loader%
rem install the xmake loader
set xmake_loader_install=%xmake_dir_install%\xmake.bat
copy /Y "%xmake_loader%" "%xmake_loader_install%" >> install.log
rem set global PATH=%xmake_dir_install%
echo register xmake...
echo %path% | findstr /i /C:"%xmake_dir_install%" >> nul && (goto set_path_ok)
tools\dtreg.exe -MachineEnvSet path="%path%;%xmake_dir_install%" >> install.log
:set_path_ok
rem ok
echo ok!
pause
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/iframework/xmake.git
git@gitee.com:iframework/xmake.git
iframework
xmake
xmake
master

搜索帮助