Hard to believe but every time Google drive windows app syncs it creates a 34mb temp directory, with a partial python library! It quickly adds up. Screw that, uninstall! How come dropbox has no issues?
Friday, November 16, 2012
Friday, November 9, 2012
Shell binaries needed for virtualenvwrapper
[UPDATED 2013-02-07]
You will need fmt from coreutils, make and mktemp. You also need iconv and intl libraries. Your best bet in Git bash is to install base MSYS* (part of MinGW) and then copy or link those files from /c/mingw/msys/1.0/bin/ to your Git bash home bin folder ~/bin since it will always be first on its PATH.
Do not use GnuWin32 because mktemp is broken (see bug), you don't need all 99 coreutils binaries (just fmt) and ideally you want binaries compiled for a POSIX environment (Git bash is built with MSYS), although the gnuwin32 make binary does work in Git bash, and so does fmt. See my post for the differences between MinGW, MinGW-w64 and GnuWin32.
Coincidentally, make will also be useful for building HTML and pdftex from Sphinx rst files.
*Since, like many other MS Windows users, I've been migrated to Windows7 x64, I now recommend using MinGW-w64 instead of MinGW (aka mingw32). See my post on setting up MSYS home for virtualenvwrapper for more info.
You will need fmt from coreutils, make and mktemp. You also need iconv and intl libraries. Your best bet in Git bash is to install base MSYS* (part of MinGW) and then copy or link those files from /c/mingw/msys/1.0/bin/ to your Git bash home bin folder ~/bin since it will always be first on its PATH.
Do not use GnuWin32 because mktemp is broken (see bug), you don't need all 99 coreutils binaries (just fmt) and ideally you want binaries compiled for a POSIX environment (Git bash is built with MSYS), although the gnuwin32 make binary does work in Git bash, and so does fmt. See my post for the differences between MinGW, MinGW-w64 and GnuWin32.
Coincidentally, make will also be useful for building HTML and pdftex from Sphinx rst files.
*Since, like many other MS Windows users, I've been migrated to Windows7 x64, I now recommend using MinGW-w64 instead of MinGW (aka mingw32). See my post on setting up MSYS home for virtualenvwrapper for more info.
Wednesday, November 7, 2012
Sphinx make latexpdf for MS Windows
Sphinx is an amazing documentation tool. I was up and running with gorgeous html in minutes! But generating a pdf took a little longer to figure out because IMHO on Windows using any open source is always a challenge.
- Install Sphinx (1.1.3) - just use pip, easy_install, or setup, whatever you prefer.
- user@user ~$ pip install sphinx
- This will probably also install Pygments and Jinja-2, I can't remember.
- Install MikTex package repository binary. This takes care of downloading and updating your LaTeX binaries. Alternately install TeX Live and Lua TeX Windows binaries. I haven't tested this so not sure how well it works, but essentially should be the same as MikTeX since it's the same source.
- You will need a working make binary. The easiest one is from GNUwin32, but I would recommend installing MSYS either from MinGW or MinGW-w64. Alternately you could use Cygwin, but that's a different ballgame.
- After you've run sphinx-quickstart from the tutorial, type make latexpdf and voila. If you used MikTeX, it will ask you to install several LaTeX packages.
Wednesday, October 17, 2012
Tuesday, October 9, 2012
Compile binutils on your phone with C4Droid
1. Make your sdcard executable by remounting it as rw, and therefore removing noexec flag.
2. After wget binutils-2.22.tar.gz and extracting it, change shebangs in configure, missing, install-sh and mkinstalldirs to #!/system/bin/sh.
3. I made a shell script in /data/local/bin/ that creates TEMP and TMP environmental variables equal to GCCROOT/tmpdir and then runs arm-linux-androideabi-gcc with any args passed. You could also use a symbolic link or add GCCROOT to your path. Either way do the same for make, ar, as, ld and strip.
4. Run ./configure --prefix=/data/local/ SHELL=/system/bin/sh MAKE_SHELL=/system/bin/sh CFLAGS=-fno-short-enums
5. Forgot to mention patches. (a) unistd.h getpagesize macro isn't detected, so comment out redundant definition in getpagesize.c (b) time returns time_t pointer so cast it from int in archive.c (c) bucomm.c calls mkdtempwhich is never declared in bionic so add extern char * mkdtemp(char * path) to bucomm.h (d) there's one other type mismatch but I can't remember where.
6. Run make and make install and Viola!
2. After wget binutils-2.22.tar.gz and extracting it, change shebangs in configure, missing, install-sh and mkinstalldirs to #!/system/bin/sh.
3. I made a shell script in /data/local/bin/ that creates TEMP and TMP environmental variables equal to GCCROOT/tmpdir and then runs arm-linux-androideabi-gcc with any args passed. You could also use a symbolic link or add GCCROOT to your path. Either way do the same for make, ar, as, ld and strip.
4. Run ./configure --prefix=/data/local/ SHELL=/system/bin/sh MAKE_SHELL=/system/bin/sh CFLAGS=-fno-short-enums
5. Forgot to mention patches. (a) unistd.h getpagesize macro isn't detected, so comment out redundant definition in getpagesize.c (b) time returns time_t pointer so cast it from int in archive.c (c) bucomm.c calls mkdtempwhich is never declared in bionic so add extern char * mkdtemp(char * path) to bucomm.h (d) there's one other type mismatch but I can't remember where.
6. Run make and make install and Viola!
How to remove noexec flag from your sdcard
Run mount -o remount, rw /mnt/sdcard/. This will also work on any external storage, Even an internal mmc card. It won't survive a restart. You could try to modify your vold fstab file. Or add the commands to your .bashrc or profile and reverse it in .bashlogout. You may need to use /storage/sdcard0 or sdcard1 depending what ROM you are running.
Note this will not work on a fuse file system, which unfortunately is the new norm on many new smartphones (EG: Motorola RAZR HD).
Note this will not work on a fuse file system, which unfortunately is the new norm on many new smartphones (EG: Motorola RAZR HD).
Do Not Format Android External Storage
Anything but vfat! If you do Android will not mount any of your external storage and consequently any apps on York sdcard will be unusable until you reformat the offending card, which could actually be internal, back to vfat fs. Unfortunately busybox mkdosfs is broken so the only way to do this without advanced is to use newfs_msdos which just works. This means that you will never be able to make hard or symbolic links from or on your sdcard.
Subscribe to:
Posts (Atom)