diff --git a/autobuild.bat b/autobuild.bat index 3015448de..9ce4df211 100644 --- a/autobuild.bat +++ b/autobuild.bat @@ -1,14 +1,5 @@ @echo off -REM ******************************************* -REM CHANGE THIS PATH TO MATCH YOUR INSTALLATION -REM ******************************************* -set MYPATH=%~dp0 - -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 \ No newline at end of file +call msys2\ps\setup.cmd +echo %cd%\builds /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 \ No newline at end of file diff --git a/msys2/autobuild.sh b/msys2/autobuild.sh deleted file mode 100644 index 9bd59a69d..000000000 --- a/msys2/autobuild.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -pm3Dir=/pm3 -copyDir=/builds -buildDir=/tmp - -export PATH=/gcc-arm-none-eabi/bin:$PATH - -pacman -Q zip 1> /dev/null -if [[ $? != 0 ]]; then - pacman --noconfirm -S zip -fi - -if [ "$MSYSTEM" == "MINGW32" ]; then - mingwDir=/mingw32 - arch=32 -fi - -if [ "$MSYSTEM" == "MINGW64" ]; then - mingwDir=/mingw64 - arch=64 -fi - -cd $pm3Dir -for i in $( ls ); do - echo Processing: $i-$arch - cd $pm3Dir/$i - git fetch - git pull - hash=$(git rev-parse HEAD) - date=$(date +%Y%m%d) - if ! ls $copyDir/$i-$arch/*-$hash.zip 1> /dev/null 2>&1; then - make clean - make all - if [ $? -eq 0 ]; then - rm -rf $buildDir/$i/* - mkdir -p $copyDir/$i-$arch/ - mkdir -p $buildDir/$i/win$arch/platforms - mkdir -p $buildDir/$i/firmware_win/bootrom - mkdir -p "$buildDir/$i/firmware_win/JTAG Only" - mkdir -p "$buildDir/$i/Windows Driver" - #you have to thank QT5 for all that dlls - cp $mingwDir/bin/{libbz2-1.dll,libdouble-conversion.dll,libfreetype-*.dll,libgcc_s_*.dll,libglib-2.0-0.dll,libgraphite2.dll,libharfbuzz-0.dll,libiconv-2.dll,libicudt64.dll,libicuin64.dll,libicuuc64.dll,libintl-8.dll,libpcre-1.dll,libpcre2-16-0.dll,libpng16-16.dll,libreadline*.dll,libstdc++-*.dll,libtermcap-0.dll,libwinpthread-1.dll,Qt5Core.dll,Qt5Gui.dll,Qt5Widgets.dll,zlib1.dll,libsndfile-1.dll,libFLAC-8.dll,libogg-0.dll,libspeex-1.dll,libvorbis-0.dll,libvorbisenc-2.dll} $buildDir/$i/win$arch - cp -r /autobuild/* $buildDir/$i/win$arch - cp -r $pm3Dir/$i/client/{proxmark3.exe,flasher.exe,*.dic,lualibs,scripts,hardnested} $buildDir/$i/win$arch - cp $mingwDir/share/qt5/plugins/platforms/qwindows.dll $buildDir/$i/win$arch/platforms - cp $pm3Dir/$i/armsrc/obj/{fullimage.elf,fullimage.s19} $buildDir/$i/firmware_win - cp $pm3Dir/$i/bootrom/obj/{bootrom.elf,bootrom.s19} $buildDir/$i/firmware_win/bootrom - cp $pm3Dir/$i/recovery/{bootrom.bin,fullimage.bin,proxmark3_recovery.bin} "$buildDir/$i/firmware_win/JTAG Only" - cp $pm3Dir/$i/driver/proxmark3.inf "$buildDir/$i/Windows Driver" - rm $buildDir/$i/win$arch/hardnested/{*.h,*.c} - cd $buildDir/$i - zip -r $copyDir/$i-$arch/$i-$arch-$date-$hash.zip ./* - echo done - fi - fi -done \ No newline at end of file diff --git a/msys2/autorebase.bat b/msys2/autorebase.bat new file mode 100644 index 000000000..7b833adda --- /dev/null +++ b/msys2/autorebase.bat @@ -0,0 +1,4 @@ +@echo off + +set PATH=%~dp0\usr\bin;%PATH% +%~dp0\usr\bin\dash /usr/bin/rebaseall -p diff --git a/msys2/autorebasebase1st.bat b/msys2/autorebasebase1st.bat new file mode 100644 index 000000000..8a89debe8 --- /dev/null +++ b/msys2/autorebasebase1st.bat @@ -0,0 +1,15 @@ +@echo off +REM Copyright (c) 2014, Ray Donnelly + +set PATH=%~dp0\usr\bin;%PATH% + +echo Querying 'base' packages for DLLs .. +%~dp0\usr\bin\bash /usr/bin/pacman-rec-filename-grep base base-dlls-unix.txt ".*\.(dll|so|oct)$" +%~dp0\usr\bin\bash /usr/bin/paths-from-unix-to-windows base-dlls-unix.txt base-dlls.txt %CD:\=/% + +echo Rebasing all DLLs, 'base' ones first .. +REM -i is new; it means ignore database and +REM rebase from end of {cygwin1,msys-2.0}.dll +REM it work by avoiding passing -s to rebase.exe +REM which has modifications to support this mode. +%~dp0\usr\bin\dash /usr/bin/rebaseall -T base-dlls.txt -i -p diff --git a/msys2/dir b/msys2/dir new file mode 100644 index 000000000..e640bffd0 --- /dev/null +++ b/msys2/dir @@ -0,0 +1,15 @@ +This is the file .../info/dir, which contains the +topmost node of the Info hierarchy, called (dir)Top. +The first time you invoke Info you start off looking at this node. + +File: dir, Node: Top This is the top of the INFO tree + + This (the Directory node) gives a menu of major topics. + Typing "q" exits, "H" lists all Info commands, "d" returns here, + "h" gives a primer for first-timers, + "mEmacs" visits the Emacs manual, etc. + + In Emacs, you can click mouse button 2 on a menu item or cross reference + to select it. + +* Menu: diff --git a/msys2/etc/nsswitch.conf b/msys2/etc/nsswitch.conf index 79140291b..90404f647 100644 --- a/msys2/etc/nsswitch.conf +++ b/msys2/etc/nsswitch.conf @@ -1,9 +1,9 @@ # Begin /etc/nsswitch.conf -passwd: files -group: files +passwd: files db +group: files db -db_enum: files +db_enum: cache builtin db_home: cygwin desc db_shell: cygwin desc diff --git a/msys2/etc/pacman.conf b/msys2/etc/pacman.conf index 3b7095fd2..091087283 100644 --- a/msys2/etc/pacman.conf +++ b/msys2/etc/pacman.conf @@ -16,7 +16,7 @@ #GPGDir = /etc/pacman.d/gnupg/ HoldPkg = pacman #XferCommand = /usr/bin/curl -C - -f %u > %o -XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u +#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u #CleanMethod = KeepInstalled #UseDelta = 0.7 Architecture = auto @@ -30,7 +30,7 @@ Architecture = auto # Misc options #UseSyslog -Color +#Color #TotalDownload CheckSpace #VerbosePkgLists diff --git a/msys2/etc/profile b/msys2/etc/profile index a8826920f..ba020e479 100644 --- a/msys2/etc/profile +++ b/msys2/etc/profile @@ -177,6 +177,5 @@ if [ "$MAYBE_FIRST_START" = "true" ]; then echo "###################################################################" echo echo - sleep infinity fi unset MAYBE_FIRST_START diff --git a/msys2/etc/wgetrc b/msys2/etc/wgetrc index 497aa2d08..d339e2b34 100644 --- a/msys2/etc/wgetrc +++ b/msys2/etc/wgetrc @@ -138,8 +138,3 @@ # default root certs location ca_certificate=/usr/ssl/certs/ca-bundle.crt - -#connect_timeout=30 -#dns_timeout=30 -#read_timeout=30 -timeout=10 diff --git a/msys2/mingw32.exe b/msys2/mingw32.exe new file mode 100644 index 000000000..96e2c2e6a Binary files /dev/null and b/msys2/mingw32.exe differ diff --git a/msys2/mingw32.ini b/msys2/mingw32.ini new file mode 100644 index 000000000..ad1b96cbe --- /dev/null +++ b/msys2/mingw32.ini @@ -0,0 +1,5 @@ +#MSYS=winsymlinks:nativestrict +#MSYS=error_start:mingw64/bin/qtcreator.exe|-debug| +#CHERE_INVOKING=1 +#MSYS2_PATH_TYPE=inherit +MSYSTEM=MINGW32 diff --git a/msys2/mingw64.exe b/msys2/mingw64.exe new file mode 100644 index 000000000..b73e034c9 Binary files /dev/null and b/msys2/mingw64.exe differ diff --git a/msys2/mingw64.ini b/msys2/mingw64.ini new file mode 100644 index 000000000..4693ab6a4 --- /dev/null +++ b/msys2/mingw64.ini @@ -0,0 +1,5 @@ +#MSYS=winsymlinks:nativestrict +#MSYS=error_start:mingw64/bin/qtcreator.exe|-debug| +#CHERE_INVOKING=1 +#MSYS2_PATH_TYPE=inherit +MSYSTEM=MINGW64 diff --git a/msys2/msys2.exe b/msys2/msys2.exe new file mode 100644 index 000000000..b98482f19 Binary files /dev/null and b/msys2/msys2.exe differ diff --git a/msys2/msys2.ico b/msys2/msys2.ico new file mode 100644 index 000000000..baea305ab Binary files /dev/null and b/msys2/msys2.ico differ diff --git a/msys2/msys2.ini b/msys2/msys2.ini new file mode 100644 index 000000000..d921caa4f --- /dev/null +++ b/msys2/msys2.ini @@ -0,0 +1,5 @@ +#MSYS=winsymlinks:nativestrict +#MSYS=error_start:mingw64/bin/qtcreator.exe|-debug| +#CHERE_INVOKING=1 +#MSYS2_PATH_TYPE=inherit +MSYSTEM=MSYS diff --git a/msys2/msys2_shell.cmd b/msys2/msys2_shell.cmd index d269ccfc2..1e97383fa 100644 --- a/msys2/msys2_shell.cmd +++ b/msys2/msys2_shell.cmd @@ -14,15 +14,6 @@ rem set MSYS=error_start:%WD%../../mingw64/bin/qtcreator.exe^|-debug^|^ nul -rem /tmp is required for bash to work -mkdir %WD%..\..\tmp 2> nul -del %WD%..\..\etc\passwd 2> nul -del %WD%..\..\etc\group 2> nul -%WD%touch /etc/passwd -%WD%touch /etc/group -%WD%bash /user_setup.sh :checkparams rem Help option diff --git a/msys2/ps/09-proxspace_setup.post b/msys2/ps/09-proxspace_setup.post new file mode 100644 index 000000000..b3bca47f6 --- /dev/null +++ b/msys2/ps/09-proxspace_setup.post @@ -0,0 +1,15 @@ +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:/ps/bin:$PATH +alias ls='ls -hF --color=auto' + +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 + diff --git a/msys2/ps/autobuild.sh b/msys2/ps/autobuild.sh new file mode 100644 index 000000000..24789b5e1 --- /dev/null +++ b/msys2/ps/autobuild.sh @@ -0,0 +1,54 @@ +#!/bin/bash +pm3Dir=/pm3 +copyDir=/builds +buildDir=/tmp + +pacman -Q zip 1> /dev/null +if [[ $? != 0 ]]; then + pacman --noconfirm -S zip +fi + +if [ "$MSYSTEM" == "MINGW32" ]; then + mingwDir=/mingw32 + arch=32 +fi + +if [ "$MSYSTEM" == "MINGW64" ]; then + mingwDir=/mingw64 + arch=64 +fi + +cd $pm3Dir +for i in $( ls -d */ ); do + echo Processing: ${i%%/}-$arch + cd $pm3Dir/${i%%/} + git fetch + git pull + hash=$(git rev-parse HEAD) + date=$(date +%Y%m%d) + if ! ls $copyDir/${i%%/}-$arch/*-$hash.zip 1> /dev/null 2>&1; then + make clean + make all + if [ $? -eq 0 ]; then + rm -rf $buildDir/${i%%/}/* + mkdir -p $copyDir/${i%%/}-$arch/ + mkdir -p $buildDir/${i%%/}/win$arch/platforms + mkdir -p $buildDir/${i%%/}/firmware_win/bootrom + mkdir -p "$buildDir/${i%%/}/firmware_win/JTAG Only" + mkdir -p "$buildDir/${i%%/}/Windows Driver" + #you have to thank QT5 for all that dlls + cp $mingwDir/bin/{libbz2-1.dll,libdouble-conversion.dll,libfreetype-*.dll,libgcc_s_*.dll,libglib-2.0-0.dll,libgraphite2.dll,libharfbuzz-0.dll,libiconv-2.dll,libicudt64.dll,libicuin64.dll,libicuuc64.dll,libintl-8.dll,libpcre-1.dll,libpcre2-16-0.dll,libpng16-16.dll,libreadline*.dll,libstdc++-*.dll,libtermcap-0.dll,libwinpthread-1.dll,Qt5Core.dll,Qt5Gui.dll,Qt5Widgets.dll,zlib1.dll,libsndfile-1.dll,libFLAC-8.dll,libogg-0.dll,libspeex-1.dll,libvorbis-0.dll,libvorbisenc-2.dll} $buildDir/${i%%/}/win$arch + cp -r /ps/autobuild/* $buildDir/${i%%/}/win$arch + cp -r $pm3Dir/${i%%/}/client/{proxmark3.exe,flasher.exe,*.dic,lualibs,scripts,hardnested} $buildDir/${i%%/}/win$arch + cp $mingwDir/share/qt5/plugins/platforms/qwindows.dll $buildDir/${i%%/}/win$arch/platforms + cp $pm3Dir/${i%%/}/armsrc/obj/{fullimage.elf,fullimage.s19} $buildDir/${i%%/}/firmware_win + cp $pm3Dir/${i%%/}/bootrom/obj/{bootrom.elf,bootrom.s19} $buildDir/${i%%/}/firmware_win/bootrom + cp $pm3Dir/${i%%/}/recovery/{bootrom.bin,fullimage.bin,proxmark3_recovery.bin} "$buildDir/${i%%/}/firmware_win/JTAG Only" + cp $pm3Dir/${i%%/}/driver/proxmark3.inf "$buildDir/${i%%/}/Windows Driver" + rm $buildDir/${i%%/}/win$arch/hardnested/{*.h,*.c} + cd $buildDir/${i%%/} + zip -r $copyDir/${i%%/}-$arch/${i%%/}-$arch-$date-$hash.zip ./* + echo done + fi + fi +done \ No newline at end of file diff --git a/msys2/autobuild/FLASH - All.bat b/msys2/ps/autobuild/FLASH - All.bat similarity index 100% rename from msys2/autobuild/FLASH - All.bat rename to msys2/ps/autobuild/FLASH - All.bat diff --git a/msys2/autobuild/FLASH - Bootrom.bat b/msys2/ps/autobuild/FLASH - Bootrom.bat similarity index 100% rename from msys2/autobuild/FLASH - Bootrom.bat rename to msys2/ps/autobuild/FLASH - Bootrom.bat diff --git a/msys2/autobuild/FLASH - fullimage.bat b/msys2/ps/autobuild/FLASH - fullimage.bat similarity index 100% rename from msys2/autobuild/FLASH - fullimage.bat rename to msys2/ps/autobuild/FLASH - fullimage.bat diff --git a/msys2/autobuild/Go.bat b/msys2/ps/autobuild/Go.bat similarity index 100% rename from msys2/autobuild/Go.bat rename to msys2/ps/autobuild/Go.bat diff --git a/msys2/autobuild/qt.conf b/msys2/ps/autobuild/qt.conf similarity index 100% rename from msys2/autobuild/qt.conf rename to msys2/ps/autobuild/qt.conf diff --git a/msys2/ps/bin/ps-info b/msys2/ps/bin/ps-info new file mode 100644 index 000000000..64d087922 --- /dev/null +++ b/msys2/ps/bin/ps-info @@ -0,0 +1,21 @@ +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 "arm-none-eabi-gcc: $(arm-none-eabi-gcc -dumpversion)" +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)" \ No newline at end of file diff --git a/msys2/ps/bin/ps-repair b/msys2/ps/bin/ps-repair new file mode 100644 index 000000000..d33671d6d --- /dev/null +++ b/msys2/ps/bin/ps-repair @@ -0,0 +1,3 @@ +for pkg in $(pacman -Q | cut -d' ' -f1); do + pacman --noconfirm --overwrite='*' -S $pkg +done \ No newline at end of file diff --git a/msys2/etc/post-install/09-proxspace.post b/msys2/ps/bin/ps-setup similarity index 75% rename from msys2/etc/post-install/09-proxspace.post rename to msys2/ps/bin/ps-setup index f47361260..11d19cee0 100644 --- a/msys2/etc/post-install/09-proxspace.post +++ b/msys2/ps/bin/ps-setup @@ -5,13 +5,6 @@ check_install () { 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 @@ -22,10 +15,8 @@ clean_64 () { pacman --noconfirm --overwrite='*' -Scc } - - setup_proxspace () -{ +{ if [ "$MSYSTEM" == "MINGW64" ]; then check_install mingw-w64-x86_64-gcc check_install mingw-w64-x86_64-readline @@ -35,6 +26,7 @@ setup_proxspace () 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 @@ -46,16 +38,7 @@ setup_proxspace () check_install pkg-config check_install mingw-w64-i686-qt5 clean_86 + echo $(date '+%Y-%m-%d %H:%M:%S') > /ps/installed32.txt fi } - -export LANG=en_US.UTF-8 - -if [ "$MAYBE_FIRST_START" = "false" ]; then - yes | pacman -Su - setup_proxspace - clear -else - yes | pacman -Syuu -fi - +setup_proxspace \ No newline at end of file diff --git a/msys2/ps/bin/ps-upgrade b/msys2/ps/bin/ps-upgrade new file mode 100644 index 000000000..dab151b41 --- /dev/null +++ b/msys2/ps/bin/ps-upgrade @@ -0,0 +1,3 @@ +rm /ps/installed64.txt &> /dev/null +rm /ps/installed32.txt &> /dev/null +yes | pacman -Syuu \ No newline at end of file diff --git a/msys2/ps/nsswitch.conf b/msys2/ps/nsswitch.conf new file mode 100644 index 000000000..79140291b --- /dev/null +++ b/msys2/ps/nsswitch.conf @@ -0,0 +1,12 @@ +# Begin /etc/nsswitch.conf + +passwd: files +group: files + +db_enum: files + +db_home: cygwin desc +db_shell: cygwin desc +db_gecos: cygwin desc + +# End /etc/nsswitch.conf diff --git a/msys2/ps/pacman.conf b/msys2/ps/pacman.conf new file mode 100644 index 000000000..eec717e80 --- /dev/null +++ b/msys2/ps/pacman.conf @@ -0,0 +1,85 @@ +# +# /etc/pacman.conf +# +# See the pacman.conf(5) manpage for option and repository directives + +# +# GENERAL OPTIONS +# +[options] +# The following paths are commented out with their default values listed. +# If you wish to use different paths, uncomment and update the paths. +#RootDir = / +#DBPath = /var/lib/pacman/ +#CacheDir = /var/cache/pacman/pkg/ +#LogFile = /var/log/pacman.log +#GPGDir = /etc/pacman.d/gnupg/ +HoldPkg = pacman +#XferCommand = /usr/bin/curl -C - -f %u > %o +XferCommand = /usr/bin/wget --passive-ftp --timeout=10 -c -O %o %u +#CleanMethod = KeepInstalled +#UseDelta = 0.7 +Architecture = auto + +# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup +#IgnorePkg = +#IgnoreGroup = + +#NoUpgrade = +#NoExtract = + +# Misc options +#UseSyslog +Color +#TotalDownload +CheckSpace +#VerbosePkgLists + +# By default, pacman accepts packages signed by keys that its local keyring +# trusts (see pacman-key and its man page), as well as unsigned packages. +#SigLevel = Never +SigLevel = Required DatabaseOptional +LocalFileSigLevel = Optional +#RemoteFileSigLevel = Required + +# NOTE: You must run `pacman-key --init` before first using pacman; the local +# keyring can then be populated with the keys of all official Arch Linux +# packagers with `pacman-key --populate archlinux`. + +# +# REPOSITORIES +# - can be defined here or included from another file +# - pacman will search repositories in the order defined here +# - local/custom mirrors can be added here or in separate files +# - repositories listed first will take precedence when packages +# have identical names, regardless of version number +# - URLs will have $repo replaced by the name of the current repo +# - URLs will have $arch replaced by the name of the architecture +# +# Repository entries are of the format: +# [repo-name] +# Server = ServerName +# Include = IncludePath +# +# The header [repo-name] is crucial - it must be present and +# uncommented to enable the repo. +# + +# The testing repositories are disabled by default. To enable, uncomment the +# repo name header and Include lines. You can add preferred servers immediately +# after the header, and they will be used before the default mirrors. + +[mingw32] +Include = /etc/pacman.d/mirrorlist.mingw32 + +[mingw64] +Include = /etc/pacman.d/mirrorlist.mingw64 + +[msys] +Include = /etc/pacman.d/mirrorlist.msys + +# An example of a custom package repository. See the pacman manpage for +# tips on creating your own repositories. +#[custom] +#SigLevel = Optional TrustAll +#Server = file:///home/custompkgs diff --git a/msys2/ps/setup.cmd b/msys2/ps/setup.cmd new file mode 100644 index 000000000..bfbc41e16 --- /dev/null +++ b/msys2/ps/setup.cmd @@ -0,0 +1,18 @@ +@echo off +SET PATH=%cd%\msys2\usr\bin;%PATH% +copy /Y %cd%\msys2\ps\*.post %cd%\msys2\etc\post-install\ >NUL +copy /Y %cd%\msys2\ps\*.conf %cd%\msys2\etc\ >NUL + +echo # For a description of the file format, see the Users Guide >%cd%\msys2/etc/fstab +echo # http://cygwin.com/cygwin-ug-net/using.html#mount-table >>%cd%\msys2/etc/fstab +echo none / cygdrive binary,posix=0,noacl,user 0 0 >>%cd%\msys2/etc/fstab +echo %cd%\pm3 /pm3 ntfs noacl 0 0 >>%cd%\msys2/etc/fstab +echo %cd%\gcc-arm-none-eabi /gcc-arm-none-eabi ntfs noacl 0 0 >>%cd%\msys2/etc/fstab + +dash /usr/bin/rebaseall -p 2> nul +mkdir %cd%\msys2\tmp 2> nul +del %cd%\msys2\etc\passwd 2> nul +del %cd%\msys2\etc\group 2> nul +touch /etc/passwd +touch /etc/group +bash /ps/user_setup.sh diff --git a/msys2/user_setup.sh b/msys2/ps/user_setup.sh similarity index 82% rename from msys2/user_setup.sh rename to msys2/ps/user_setup.sh index 983fd7c2d..1cb342ac0 100644 --- a/msys2/user_setup.sh +++ b/msys2/ps/user_setup.sh @@ -1,4 +1,8 @@ #!/bin/bash +if ! (echo "$PWD" | grep -Eq ^[a-zA-Z0-9\/\._\-]+$) ; then + echo "Error: Install path contains special characters!" + sleep infinity +fi MKPASSWD_CURRENT="$( mkpasswd -c )" MKGROUP_CURRENT="$( mkgroup -c )" @@ -18,7 +22,4 @@ GROUP_MISSING=$( grep -Fq "$GROUP_SID" /etc/group )$? # If not, add it if [ $GROUP_MISSING != 0 ]; then echo $MKGROUP_CURRENT >> /etc/group -fi - - - +fi \ No newline at end of file diff --git a/msys2/var/lib/pacman/local/filesystem-2018.12-1/files b/msys2/var/lib/pacman/local/filesystem-2018.12-1/files index 4899da3ae..e0111a07b 100644 --- a/msys2/var/lib/pacman/local/filesystem-2018.12-1/files +++ b/msys2/var/lib/pacman/local/filesystem-2018.12-1/files @@ -29,7 +29,6 @@ etc/post-install/05-home-dir.post etc/post-install/06-windows-files.post etc/post-install/07-pacman-key.post etc/post-install/08-xml-catalog.post -etc/post-install/09-proxspace.post etc/profile etc/profile.d/ etc/profile.d/lang.sh diff --git a/pm3/.bash_logout b/pm3/.bash_logout deleted file mode 100644 index 0e4e4f184..000000000 --- a/pm3/.bash_logout +++ /dev/null @@ -1,3 +0,0 @@ -# -# ~/.bash_logout -# diff --git a/pm3/.bash_profile b/pm3/.bash_profile deleted file mode 100644 index f694f7813..000000000 --- a/pm3/.bash_profile +++ /dev/null @@ -1,36 +0,0 @@ -# To the extent possible under law, the author(s) have dedicated all -# copyright and related and neighboring rights to this software to the -# public domain worldwide. This software is distributed without any warranty. -# You should have received a copy of the CC0 Public Domain Dedication along -# with this software. -# If not, see . - -# ~/.bash_profile: executed by bash(1) for login shells. - -# The copy in your home directory (~/.bash_profile) is yours, please -# feel free to customise it to create a shell -# environment to your liking. If you feel a change -# would be benifitial to all, please feel free to send -# a patch to the msys2 mailing list. - -# User dependent .bash_profile file - -# source the users bashrc if it exists -if [ -f "${HOME}/.bashrc" ] ; then - source "${HOME}/.bashrc" -fi - -# Set PATH so it includes user's private bin if it exists -# if [ -d "${HOME}/bin" ] ; then -# PATH="${HOME}/bin:${PATH}" -# fi - -# Set MANPATH so it includes users' private man if it exists -# if [ -d "${HOME}/man" ]; then -# MANPATH="${HOME}/man:${MANPATH}" -# fi - -# Set INFOPATH so it includes users' private info if it exists -# if [ -d "${HOME}/info" ]; then -# INFOPATH="${HOME}/info:${INFOPATH}" -# fi diff --git a/pm3/.bashrc b/pm3/.bashrc deleted file mode 100644 index 50791c67d..000000000 --- a/pm3/.bashrc +++ /dev/null @@ -1,194 +0,0 @@ -# To the extent possible under law, the author(s) have dedicated all -# copyright and related and neighboring rights to this software to the -# public domain worldwide. This software is distributed without any warranty. -# You should have received a copy of the CC0 Public Domain Dedication along -# with this software. -# If not, see . - -# ~/.bashrc: executed by bash(1) for interactive shells. - -# The copy in your home directory (~/.bashrc) is yours, please -# feel free to customise it to create a shell -# environment to your liking. If you feel a change -# would be benifitial to all, please feel free to send -# a patch to the msys2 mailing list. - -# User dependent .bashrc file - -# If not running interactively, don't do anything -[[ "$-" != *i* ]] && return - -# Shell Options -# -# See man bash for more options... -# -# Don't wait for job termination notification -# set -o notify -# -# Don't use ^D to exit -# set -o ignoreeof -# -# Use case-insensitive filename globbing -# shopt -s nocaseglob -# -# Make bash append rather than overwrite the history on disk -# shopt -s histappend -# -# When changing directory small typos can be ignored by bash -# for example, cd /vr/lgo/apaache would find /var/log/apache -# shopt -s cdspell - -# Completion options -# -# These completion tuning parameters change the default behavior of bash_completion: -# -# Define to access remotely checked-out files over passwordless ssh for CVS -# COMP_CVS_REMOTE=1 -# -# Define to avoid stripping description in --option=description of './configure --help' -# COMP_CONFIGURE_HINTS=1 -# -# Define to avoid flattening internal contents of tar files -# COMP_TAR_INTERNAL_PATHS=1 -# -# Uncomment to turn on programmable completion enhancements. -# Any completions you add in ~/.bash_completion are sourced last. -# [[ -f /etc/bash_completion ]] && . /etc/bash_completion - -# History Options -# -# Don't put duplicate lines in the history. -# export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups -# -# Ignore some controlling instructions -# HISTIGNORE is a colon-delimited list of patterns which should be excluded. -# The '&' is a special pattern which suppresses duplicate entries. -# export HISTIGNORE=$'[ \t]*:&:[fb]g:exit' -# export HISTIGNORE=$'[ \t]*:&:[fb]g:exit:ls' # Ignore the ls command as well -# -# Whenever displaying the prompt, write the previous line to disk -# export PROMPT_COMMAND="history -a" - -# Aliases -# -# Some people use a different file for aliases -# if [ -f "${HOME}/.bash_aliases" ]; then -# source "${HOME}/.bash_aliases" -# fi -# -# Some example alias instructions -# If these are enabled they will be used instead of any instructions -# they may mask. For example, alias rm='rm -i' will mask the rm -# application. To override the alias instruction use a \ before, ie -# \rm will call the real rm not the alias. -# -# Interactive operation... -# alias rm='rm -i' -# alias cp='cp -i' -# alias mv='mv -i' -# -# Default to human readable figures -# alias df='df -h' -# alias du='du -h' -# -# Misc :) -# alias less='less -r' # raw control characters -# alias whence='type -a' # where, of a sort -# alias grep='grep --color' # show differences in colour -# alias egrep='egrep --color=auto' # show differences in colour -# alias fgrep='fgrep --color=auto' # show differences in colour -# -# Some shortcuts for different directory listings -# alias ls='ls -hF --color=tty' # classify files in colour -# alias dir='ls --color=auto --format=vertical' -# alias vdir='ls --color=auto --format=long' -# alias ll='ls -l' # long list -# alias la='ls -A' # all but . and .. -# alias l='ls -CF' # - -# Umask -# -# /etc/profile sets 022, removing write perms to group + others. -# Set a more restrictive umask: i.e. no exec perms for others: -# umask 027 -# Paranoid: neither group nor others have any perms: -# umask 077 - -# Functions -# -# Some people use a different file for functions -# if [ -f "${HOME}/.bash_functions" ]; then -# source "${HOME}/.bash_functions" -# fi -# -# Some example functions: -# -# a) function settitle -# settitle () -# { -# echo -ne "\e]2;$@\a\e]1;$@\a"; -# } -# -# b) function cd_func -# This function defines a 'cd' replacement function capable of keeping, -# displaying and accessing history of visited directories, up to 10 entries. -# To use it, uncomment it, source this file and try 'cd --'. -# acd_func 1.0.5, 10-nov-2004 -# Petar Marinov, http:/geocities.com/h2428, this is public domain -# cd_func () -# { -# local x2 the_new_dir adir index -# local -i cnt -# -# if [[ $1 == "--" ]]; then -# dirs -v -# return 0 -# fi -# -# the_new_dir=$1 -# [[ -z $1 ]] && the_new_dir=$HOME -# -# if [[ ${the_new_dir:0:1} == '-' ]]; then -# # -# # Extract dir N from dirs -# index=${the_new_dir:1} -# [[ -z $index ]] && index=1 -# adir=$(dirs +$index) -# [[ -z $adir ]] && return 1 -# the_new_dir=$adir -# fi -# -# # -# # '~' has to be substituted by ${HOME} -# [[ ${the_new_dir:0:1} == '~' ]] && the_new_dir="${HOME}${the_new_dir:1}" -# -# # -# # Now change to the new dir and add to the top of the stack -# pushd "${the_new_dir}" > /dev/null -# [[ $? -ne 0 ]] && return 1 -# the_new_dir=$(pwd) -# -# # -# # Trim down everything beyond 11th entry -# popd -n +11 2>/dev/null 1>/dev/null -# -# # -# # Remove any other occurence of this dir, skipping the top of the stack -# for ((cnt=1; cnt <= 10; cnt++)); do -# x2=$(dirs +${cnt} 2>/dev/null) -# [[ $? -ne 0 ]] && return 0 -# [[ ${x2:0:1} == '~' ]] && x2="${HOME}${x2:1}" -# if [[ "${x2}" == "${the_new_dir}" ]]; then -# popd -n +$cnt 2>/dev/null 1>/dev/null -# cnt=cnt-1 -# fi -# done -# -# return 0 -# } -# -# alias cd=cd_func -export LANG=en_US.UTF-8 -export PS1='\[\033]0;ProxSpace v3.2 - $MSYSTEM:\w\007\033[32m\]pm3 \[\033[33m\]\w\[\033[0m\]$ ' -export PATH=/gcc-arm-none-eabi/bin:$PATH -alias ls='ls -hF --color=auto' \ No newline at end of file diff --git a/pm3/.inputrc b/pm3/.inputrc deleted file mode 100644 index 5391e2f42..000000000 --- a/pm3/.inputrc +++ /dev/null @@ -1,114 +0,0 @@ -# To the extent possible under law, the author(s) have dedicated all -# copyright and related and neighboring rights to this software to the -# public domain worldwide. This software is distributed without any warranty. -# You should have received a copy of the CC0 Public Domain Dedication along -# with this software. -# If not, see . - -# ~/.inputrc: readline initialization file. - -# The copy in your home directory (~/.inputrc) is yours, please -# feel free to customise it to create a shell -# environment to your liking. If you feel a change -# would be benifitial to all, please feel free to send -# a patch to the msys2 mailing list. - -# the following line is actually -# equivalent to "\C-?": delete-char -# "\e[3~": delete-char - -# VT -# "\e[1~": beginning-of-line -# "\e[4~": end-of-line - -# kvt -# "\e[H": beginning-of-line -# "\e[F": end-of-line - -# rxvt and konsole (i.e. the KDE-app...) -# "\e[7~": beginning-of-line -# "\e[8~": end-of-line - -# VT220 -# "\eOH": beginning-of-line -# "\eOF": end-of-line - -# Allow 8-bit input/output -# set meta-flag on -# set convert-meta off -# set input-meta on -# set output-meta on -#$if Bash - # Don't ring bell on completion - set bell-style none - - # or, don't beep at me - show me - #set bell-style visible - - # Show all instead of beeping first - set show-all-if-ambiguous off - - # Filename completion/expansion - set completion-ignore-case on - #set show-all-if-ambiguous on - - # Expand homedir name - #set expand-tilde on - - # Append "/" to all dirnames - #set mark-directories on - #set mark-symlinked-directories on - - # visible-stats - # Append a mark according to the file type in a listing - set visible-stats off - set mark-directories on - - # Match all files - #set match-hidden-files on - - # 'Magic Space' - # Insert a space character then performs - # a history expansion in the line - #Space: magic-space -#$endif - -# MSYSTEM is emacs based -$if mode=emacs - # Common to Console & RXVT - "\C-?": backward-kill-line # Ctrl-BackSpace - "\e[2~": paste-from-clipboard # "Ins. Key" - "\e[5~": beginning-of-history # Page up - "\e[6~": end-of-history # Page down - - $if term=msys # RXVT - "\e[7~": beginning-of-line # Home Key - "\e[8~": end-of-line # End Key - "\e[11~": display-shell-version # F1 - "\e[15~": re-read-init-file # F5 - "\e[12~": "Function Key 2" - "\e[13~": "Function Key 3" - "\e[14~": "Function Key 4" - "\e[17~": "Function Key 6" - "\e[18~": "Function Key 7" - "\e[19~": "Function Key 8" - "\e[20~": "Function Key 9" - "\e[21~": "Function Key 10" - $else - # Eh, normal Console is not really cygwin anymore, is it? Using 'else' instead. -mstormo - # $if term=cygwin # Console - "\e[1~": beginning-of-line # Home Key - "\e[4~": end-of-line # End Key - "\e[3~": delete-char # Delete Key - "\e\e[C": forward-word # Alt-Right - "\e\e[D": backward-word # Alt-Left - "\e[1;5C": forward-word # ctrl + right - "\e[1;5D": backward-word # ctrl + left - "\e[17~": "Function Key 6" - "\e[18~": "Function Key 7" - "\e[19~": "Function Key 8" - "\e[20~": "Function Key 9" - "\e[21~": "Function Key 10" - "\e[23~": "Function Key 11" - $endif -$endif \ No newline at end of file diff --git a/pm3/.profile b/pm3/.profile deleted file mode 100644 index b78573850..000000000 --- a/pm3/.profile +++ /dev/null @@ -1,52 +0,0 @@ -# To the extent possible under law, the author(s) have dedicated all -# copyright and related and neighboring rights to this software to the -# public domain worldwide. This software is distributed without any warranty. -# You should have received a copy of the CC0 Public Domain Dedication along -# with this software. -# If not, see . - -# ~/.profile: executed by the command interpreter for login shells. - -# The copy in your home directory (~/.profile) is yours, please -# feel free to customise it to create a shell -# environment to your liking. If you feel a change -# would be benificial to all, please feel free to send -# a patch to the msys2 mailing list. - -# User dependent .profile file - -# Set user-defined locale -export LANG=$(locale -uU) - -# This file is not read by bash(1) if ~/.bash_profile or ~/.bash_login -# exists. -# -# if running bash -if [ -n "${BASH_VERSION}" ]; then - if [ -f "${HOME}/.bashrc" ]; then - source "${HOME}/.bashrc" - fi -fi - -agm2() { - local MINGW_DIRS="mingw32 mingw64" - local AG_FIND= - - for dir in ${MINGW_DIRS}; do - if type -p /${dir}/bin/ag >/dev/null; then - AG_FIND=/${dir}/bin/ag - fi - done - - if ! type -p /usr/bin/git >/dev/null; then - echo "bash: git: command not found. Please install \"git\" package." - exit 1 - fi - - if [ -n "$AG_FIND" ]; then - $AG_FIND --makepkg --depth 1 "$@" $(git rev-parse --show-toplevel) - else - echo "bash: ag: conmmand not found. Please install \"mingw-w64-i686-ag\" or \"mingw-w64-x86_64-ag\" package." - exit 1 - fi -} diff --git a/runme.bat b/runme.bat index 3b52db03c..8a6da048c 100644 --- a/runme.bat +++ b/runme.bat @@ -1,12 +1,3 @@ @echo off -REM ******************************************* -REM CHANGE THIS PATH TO MATCH YOUR INSTALLATION -REM ******************************************* -set MYPATH=%~dp0 - -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 +call msys2\ps\setup.cmd msys2\msys2_shell.cmd -mingw32 -defterm -no-start \ No newline at end of file diff --git a/runme64.bat b/runme64.bat index cb2248cae..1dc5f15e3 100644 --- a/runme64.bat +++ b/runme64.bat @@ -1,12 +1,3 @@ @echo off -REM ******************************************* -REM CHANGE THIS PATH TO MATCH YOUR INSTALLATION -REM ******************************************* -set MYPATH=%~dp0 - -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 +call msys2\ps\setup.cmd msys2\msys2_shell.cmd -mingw64 -defterm -no-start \ No newline at end of file