mirror of
https://github.com/Gator96100/ProxSpace.git
synced 2025-08-19 04:49:41 -07:00
Added ps-info and ps-setup command
This commit is contained in:
parent
478ea7e9f0
commit
b66ceaed98
6 changed files with 93 additions and 82 deletions
|
@ -1,14 +1,11 @@
|
|||
@echo off
|
||||
REM *******************************************
|
||||
REM CHANGE THIS PATH TO MATCH YOUR INSTALLATION
|
||||
REM *******************************************
|
||||
set MYPATH=%~dp0
|
||||
|
||||
copy /Y msys2\ps\*.post msys2\etc\post-install\ >NUL
|
||||
echo # For a description of the file format, see the Users Guide >msys2/etc/fstab
|
||||
echo # http://cygwin.com/cygwin-ug-net/using.html#mount-table >>msys2/etc/fstab
|
||||
echo none / cygdrive binary,posix=0,noacl,user 0 0 >>msys2/etc/fstab
|
||||
echo %MYPATH%pm3 /pm3 ntfs noacl 0 0 >>msys2/etc/fstab
|
||||
echo %MYPATH%gcc-arm-none-eabi /gcc-arm-none-eabi ntfs noacl 0 0 >>msys2/etc/fstab
|
||||
echo %MYPATH%builds /builds ntfs noacl 0 0 >>msys2/etc/fstab
|
||||
call msys2\msys2_shell.cmd -mingw32 -defterm -no-start -c /autobuild.sh
|
||||
call msys2\msys2_shell.cmd -mingw64 -defterm -no-start -c /autobuild.sh
|
||||
echo %~dp0pm3 /pm3 ntfs noacl 0 0 >>msys2/etc/fstab
|
||||
echo %~dp0gcc-arm-none-eabi /gcc-arm-none-eabi ntfs noacl 0 0 >>msys2/etc/fstab
|
||||
echo %~dp0builds /builds ntfs noacl 0 0 >>msys2/etc/fstab
|
||||
call msys2\msys2_shell.cmd -mingw32 -defterm -no-start -c /ps/autobuild.sh
|
||||
call msys2\msys2_shell.cmd -mingw64 -defterm -no-start -c /ps/autobuild.sh
|
|
@ -1,66 +1,15 @@
|
|||
PSVERSION="3.3"
|
||||
export PSVERSION="3.3"
|
||||
export LANG=en_US.UTF-8
|
||||
export PS1='\[\033]0;ProxSpace v$PSVERSION - $MSYSTEM:\w\007\033[32m\]pm3 \[\033[33m\]\w\[\033[0m\]$ '
|
||||
export PATH=/gcc-arm-none-eabi/bin:$PATH
|
||||
export PATH=/gcc-arm-none-eabi/bin:/ps/bin:$PATH
|
||||
alias ls='ls -hF --color=auto'
|
||||
|
||||
|
||||
check_install () {
|
||||
pacman -Q $1 > /dev/null
|
||||
if [ $? == 1 ]; then
|
||||
pacman --noconfirm --overwrite='*' -S $1
|
||||
fi
|
||||
}
|
||||
|
||||
check_install_web () {
|
||||
pacman -Q $1 | grep $2 > /dev/null
|
||||
if [ $? == 1 ]; then
|
||||
pacman --noconfirm --overwrite='*' -U $3
|
||||
fi
|
||||
}
|
||||
|
||||
clean_86 () {
|
||||
rm -rf /mingw32/share/qt5/examples
|
||||
pacman --noconfirm --overwrite='*' -Scc
|
||||
}
|
||||
|
||||
clean_64 () {
|
||||
rm -rf /mingw64/share/qt5/examples
|
||||
pacman --noconfirm --overwrite='*' -Scc
|
||||
}
|
||||
|
||||
|
||||
|
||||
setup_proxspace ()
|
||||
{
|
||||
if [ "$MSYSTEM" == "MINGW64" ]; then
|
||||
check_install mingw-w64-x86_64-gcc
|
||||
check_install mingw-w64-x86_64-readline
|
||||
check_install mingw-w64-x86_64-libsndfile
|
||||
check_install git
|
||||
check_install make
|
||||
check_install pkg-config
|
||||
check_install mingw-w64-x86_64-qt5
|
||||
clean_64
|
||||
fi
|
||||
|
||||
if [ "$MSYSTEM" == "MINGW32" ]; then
|
||||
check_install mingw-w64-i686-readline
|
||||
check_install mingw-w64-i686-gcc
|
||||
check_install mingw-w64-i686-libsndfile
|
||||
check_install git
|
||||
check_install make
|
||||
check_install pkg-config
|
||||
check_install mingw-w64-i686-qt5
|
||||
clean_86
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$MAYBE_FIRST_START" = "false" ]; then
|
||||
yes | pacman -Su
|
||||
setup_proxspace
|
||||
clear
|
||||
else
|
||||
if [ \( ! -f /ps/installed32.txt -a "$MSYSTEM" == "MINGW32" \) -o \( ! -f /ps/installed64.txt -a "$MSYSTEM" == "MINGW64" \) ]; then
|
||||
if [ "$MAYBE_FIRST_START" = "true" ]; then
|
||||
yes | pacman -Syuu
|
||||
else
|
||||
yes | pacman -Su
|
||||
ps-setup
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
20
msys2/ps/bin/ps-info
Normal file
20
msys2/ps/bin/ps-info
Normal file
|
@ -0,0 +1,20 @@
|
|||
ps_print () {
|
||||
printf "%s\n" "$1" 2>&1 | tee -a ps-info.log
|
||||
}
|
||||
|
||||
rm ps-info.log &> /dev/null
|
||||
ps_print "ProxSpace info:"
|
||||
ps_print "Version: $PSVERSION"
|
||||
ps_print "Arch: $MSYSTEM_CARCH"
|
||||
ps_print "OS: $(wmic OS get Caption,CSDVersion,OSArchitecture,Version | awk 'NR==2')"
|
||||
ps_print "CPU: $(wmic CPU get Name | awk 'NR==2')"
|
||||
ps_print "Ram: $(wmic COMPUTERSYSTEM get TotalPhysicalMemory | awk 'NR==2')"
|
||||
ps_print "Installed32: $(cat /ps/installed32.txt)"
|
||||
ps_print "Installed64: $(cat /ps/installed64.txt)"
|
||||
ps_print "OLDPWD: $OLDPWD"
|
||||
ps_print "Path: $PATH"
|
||||
ps_print "gcc: $(gcc -dumpversion)"
|
||||
ps_print "git: $(git --version)"
|
||||
ps_print "make: $(make -v)"
|
||||
ps_print "pkg-config: $(pkg-config --version)"
|
||||
ps_print "Qt: $(qmake --version)"
|
51
msys2/ps/bin/ps-setup
Normal file
51
msys2/ps/bin/ps-setup
Normal file
|
@ -0,0 +1,51 @@
|
|||
check_install () {
|
||||
pacman -Q $1 > /dev/null
|
||||
if [ $? == 1 ]; then
|
||||
pacman --noconfirm --overwrite='*' -S $1
|
||||
fi
|
||||
}
|
||||
|
||||
check_install_web () {
|
||||
pacman -Q $1 | grep $2 > /dev/null
|
||||
if [ $? == 1 ]; then
|
||||
pacman --noconfirm --overwrite='*' -U $3
|
||||
fi
|
||||
}
|
||||
|
||||
clean_86 () {
|
||||
rm -rf /mingw32/share/qt5/examples
|
||||
pacman --noconfirm --overwrite='*' -Scc
|
||||
}
|
||||
|
||||
clean_64 () {
|
||||
rm -rf /mingw64/share/qt5/examples
|
||||
pacman --noconfirm --overwrite='*' -Scc
|
||||
}
|
||||
|
||||
setup_proxspace ()
|
||||
{
|
||||
if [ "$MSYSTEM" == "MINGW64" ]; then
|
||||
check_install mingw-w64-x86_64-gcc
|
||||
check_install mingw-w64-x86_64-readline
|
||||
check_install mingw-w64-x86_64-libsndfile
|
||||
check_install git
|
||||
check_install make
|
||||
check_install pkg-config
|
||||
check_install mingw-w64-x86_64-qt5
|
||||
clean_64
|
||||
echo $(date '+%Y-%m-%d %H:%M:%S') > /ps/installed64.txt
|
||||
fi
|
||||
|
||||
if [ "$MSYSTEM" == "MINGW32" ]; then
|
||||
check_install mingw-w64-i686-readline
|
||||
check_install mingw-w64-i686-gcc
|
||||
check_install mingw-w64-i686-libsndfile
|
||||
check_install git
|
||||
check_install make
|
||||
check_install pkg-config
|
||||
check_install mingw-w64-i686-qt5
|
||||
clean_86
|
||||
echo $(date '+%Y-%m-%d %H:%M:%S') > /ps/installed32.txt
|
||||
fi
|
||||
}
|
||||
setup_proxspace
|
|
@ -1,12 +1,9 @@
|
|||
@echo off
|
||||
REM *******************************************
|
||||
REM CHANGE THIS PATH TO MATCH YOUR INSTALLATION
|
||||
REM *******************************************
|
||||
set MYPATH=%~dp0
|
||||
|
||||
copy /Y msys2\ps\*.post msys2\etc\post-install\ >NUL
|
||||
echo # For a description of the file format, see the Users Guide >msys2/etc/fstab
|
||||
echo # http://cygwin.com/cygwin-ug-net/using.html#mount-table >>msys2/etc/fstab
|
||||
echo none / cygdrive binary,posix=0,noacl,user 0 0 >>msys2/etc/fstab
|
||||
echo %MYPATH%pm3 /pm3 ntfs noacl 0 0 >>msys2/etc/fstab
|
||||
echo %MYPATH%gcc-arm-none-eabi /gcc-arm-none-eabi ntfs noacl 0 0 >>msys2/etc/fstab
|
||||
echo %~dp0pm3 /pm3 ntfs noacl 0 0 >>msys2/etc/fstab
|
||||
echo %~dp0gcc-arm-none-eabi /gcc-arm-none-eabi ntfs noacl 0 0 >>msys2/etc/fstab
|
||||
msys2\msys2_shell.cmd -mingw32 -defterm -no-start
|
|
@ -1,12 +1,9 @@
|
|||
@echo off
|
||||
REM *******************************************
|
||||
REM CHANGE THIS PATH TO MATCH YOUR INSTALLATION
|
||||
REM *******************************************
|
||||
set MYPATH=%~dp0
|
||||
|
||||
copy /Y msys2\ps\*.post msys2\etc\post-install\ >NUL
|
||||
echo # For a description of the file format, see the Users Guide >msys2/etc/fstab
|
||||
echo # http://cygwin.com/cygwin-ug-net/using.html#mount-table >>msys2/etc/fstab
|
||||
echo none / cygdrive binary,posix=0,noacl,user 0 0 >>msys2/etc/fstab
|
||||
echo %MYPATH%pm3 /pm3 ntfs noacl 0 0 >>msys2/etc/fstab
|
||||
echo %MYPATH%gcc-arm-none-eabi /gcc-arm-none-eabi ntfs noacl 0 0 >>msys2/etc/fstab
|
||||
echo %~dp0pm3 /pm3 ntfs noacl 0 0 >>msys2/etc/fstab
|
||||
echo %~dp0gcc-arm-none-eabi /gcc-arm-none-eabi ntfs noacl 0 0 >>msys2/etc/fstab
|
||||
msys2\msys2_shell.cmd -mingw64 -defterm -no-start
|
Loading…
Add table
Add a link
Reference in a new issue