diff options
| author | ruki <[email protected]> | 2015-04-27 18:47:01 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-04-27 18:47:01 +0800 |
| commit | 43e612143df1333bc3e5d0d86c6c21619b9031d0 (patch) | |
| tree | 6e7fbb22bd10666204a0ad8ac765f52799b0c62d | |
| parent | 7e1eaad77a9b18b3da5ad4f0148d59fb800d32ad (diff) | |
install xmake binary file for windows
| -rwxr-xr-x | core/build.sh | 6 | ||||
| -rwxr-xr-x | install | 7 | ||||
| -rw-r--r-- | install.bat | 19 |
3 files changed, 29 insertions, 3 deletions
diff --git a/core/build.sh b/core/build.sh index 53b916997..4eb828647 100755 --- a/core/build.sh +++ b/core/build.sh @@ -1,5 +1,7 @@ #!/bin/sh -rm .config.mak -make f DEBUG=n +if [ -f .config.mak ]; then + rm .config.mak +fi +make f DEBUG=n PLAT=msvc ARCH=x86 make r exit @@ -2,9 +2,11 @@ # is debug? debug=n +verbose= if [ $1 ]; then if [ $1 = "--debug" ] || [ $1 = "-d" ]; then debug=y + verbose=-v fi fi @@ -34,6 +36,9 @@ fi # compile xmake-core cd ./core +if [ -f .config.mak ]; then + rm .config.mak +fi make f DEBUG=$debug if [ $? -ne 0 ]; then exit; fi make r @@ -62,7 +67,7 @@ if [ $? -ne 0 ]; then exit; fi xmake_loader=/tmp/xmake_loader echo "#!/bin/bash" > $xmake_loader echo "export XMAKE_PROGRAM_DIR=$xmake_dir_install" >> $xmake_loader -echo "$xmake_core_install" >> $xmake_loader +echo "$xmake_core_install $verbose" >> $xmake_loader if [ $? -ne 0 ]; then exit; fi # install the xmake loader diff --git a/install.bat b/install.bat index e4196dc4b..208290cbc 100644 --- a/install.bat +++ b/install.bat @@ -1,5 +1,24 @@ @echo off
+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 not exist "%xmake_dir_install%" mkdir "%xmake_dir_install%"
+
+rem install the xmake core file
+set xmake_core=core\bin\demo.pkg\bin\msvc\x86\demo.exe
+set xmake_core_install=%xmake_dir_install%\xmake.exe
+copy /Y "%xmake_core%" "%xmake_core_install%"
+
+rem install the xmake directory
+xcopy "xmake\" "%xmake_dir_install%"
+
rem compile xmake-core
echo compiling xmake-core...
cd core
|
