diff --git a/bin/#hasync b/bin/#hasync deleted file mode 100755 index 68b3373f..00000000 --- a/bin/#hasync +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -# Prepare dirs -rm -rf ~/tmp/.hanez_org - -mkdir ~/tmp/.hanez_org - -cd ~/tmp/.hanez_org - -# wget all that needs to generated -#wget -U "Hannes/1.0" -X photos -X photo -m http://hanez -wget -U "Bing/23.42" -m http://hanez - -#wget http://hanez/error404.html -O hanez/error404.html - -#wget http://hanez/feed/ -O hanez/feed.xml -#wget http://hanez/feed/atom/ -O hanez/atom.xml -#wget http://www.jabz.de/robots.txt -O hanez/robots.txt - -# Local Foo -rsync --delete -avr --times --exclude=.svn ~/www/hanez.org/htdocs/files/ ~/tmp/.hanez_org/hanez/files/ - -cp ~/.gnupg/hanez.asc ~/www/hanez.org/htdocs/files/hanez.asc - -rsync --delete -avr --times --exclude=.svn ~/www/hanez.org/htdocs/css/ ~/tmp/.hanez_org/hanez/css/ - -#rsync --delete -avr --times --exclude=.svn ~/www/hanez.org/htdocs/fonts/ ~/tmp/.hanez_org/hanez/fonts/ - -rsync --delete -avr --times --exclude=.svn ~/www/hanez.org/htdocs/images/ ~/tmp/.hanez_org/hanez/images/ - -rsync --delete -avr --times --exclude=.svn ~/www/hanez.org/htdocs/js/ ~/tmp/.hanez_org/hanez/js/ - -rsync --delete -avr --times --exclude=.svn --exclude=.git --delete-excluded ~/www/hanez.org/htdocs/reveal.js/ ~/tmp/.hanez_org/hanez/reveal.js/ - -#cp -R ~/www/hanez.org/htdocs/x356g ~/tmp/.hanez_org/hanez/x356g - -#cp ~/www/hanez.org/htdocs/sitemap.xml ~/tmp/.hanez_org/hanez/sitemap.xml - -#cp ~/tmp/.hanez_org/hanez/images/index.html ~/tmp/.hanez_org/hanez/photo/index.html - -mv ~/tmp/.hanez_org/hanez/feed/index.html ~/tmp/.hanez_org/hanez/feed/index.rss - -mv ~/tmp/.hanez_org/hanez/feed/atom/index.html ~/tmp/.hanez_org/hanez/feed/atom/index.rss - -# Server Foo -rsync --delete -r -v -z --perms --group --times ~/tmp/.hanez_org/hanez/ hanez.org:/var/www/hanez.org/www/htdocs/ - -#scp ~/www/hanez.org/htdocs/htaccess hanez.org:/var/www/hanez.org/.htaccess - -# Cleanup -rm -rf ~/tmp/.hanez_org - diff --git a/bin/+myip b/bin/+myip deleted file mode 100755 index c3a701dc..00000000 --- a/bin/+myip +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# http://askubuntu.com/questions/95910/command-for-determining-my-public-ip - -# Works too but very slow (a lot more features available): -# curl ifconfig.me - -wget -qO- http://ipecho.net/plain; echo - diff --git a/bin/+nas-boot b/bin/+nas-boot deleted file mode 100755 index a38ab8e4..00000000 --- a/bin/+nas-boot +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -# Needs NAS_HOST and NAS_MAC defined in ~/.config.sh - -source ~/.config.sh - -/usr/bin/zenity --question --text "Do You really want to boot your NAS device?" -case $? in -0) - ping -c 1 $NAS_HOST - VALUE=$? - if [ $VALUE == 0 ]; then - /usr/bin/zenity --info --icon-name=error --text "Boot command failed: Device already up!" - elif [ $VALUE == 1 ]; then - /usr/bin/wol $NAS_MAC - /usr/bin/zenity --info --text "Boot command sent to NAS device." - fi -;; -esac diff --git a/bin/+nas-reboot b/bin/+nas-reboot deleted file mode 100755 index 560a8cac..00000000 --- a/bin/+nas-reboot +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# Needs NAS_HOST and NAS_USER defined in ~/.config.sh - -source ~/.config.sh - -/usr/bin/zenity --question --text "Do You really want to reboot your NAS device?" -case $? in -0) - /usr/bin/ssh $NAS_USER@$NAS_HOST "/usr/bin/sudo /sbin/shutdown -r now" - VALUE=$? - if [ $VALUE == 0 ]; then - /usr/bin/zenity --info --text "Reboot command send to NAS device." - elif [ $VALUE == 255 ]; then - /usr/bin/zenity --info --icon-name=error --text "Reboot command failed: No route to host" - fi -;; -esac diff --git a/bin/+nas-shutdown b/bin/+nas-shutdown deleted file mode 100755 index 8fc6fa9b..00000000 --- a/bin/+nas-shutdown +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# Needs NAS_HOST and NAS_USER defined in ~/.config.sh - -source ~/.config.sh - -/usr/bin/zenity --question --text "Do You really want to shutdown your NAS device?" -case $? in -0) - /usr/bin/ssh $NAS_USER@$NAS_HOST "/usr/bin/sudo /sbin/shutdown -h -P now" - VALUE=$? - if [ $VALUE == 0 ]; then - /usr/bin/zenity --info --text "Shutdown command send to NAS device." - elif [ $VALUE == 255 ]; then - /usr/bin/zenity --info --icon-name=error --text "Shutdown command failed: No route to host" - fi -;; -esac diff --git a/bin/.directory b/bin/.directory deleted file mode 100644 index 2b173811..00000000 --- a/bin/.directory +++ /dev/null @@ -1,4 +0,0 @@ -[Dolphin] -Timestamp=2015,9,18,2,50,8 -Version=3 -ViewMode=2 diff --git a/bin/README.md b/bin/README.md deleted file mode 100644 index 1abf357b..00000000 --- a/bin/README.md +++ /dev/null @@ -1,11 +0,0 @@ -~/bin -===== - -This repository contains my ~/bin directory to make it easy to share it across -multiple hosts. - -Scripts use a "+" as prefix to prevent name collisions in command completion. - -Some scripts require a ~/.config.sh file where some config vars are defined. - -No documentation! Maybe some day... diff --git a/bin/_old/mkxpi b/bin/_old/mkxpi deleted file mode 100755 index 17c39be3..00000000 --- a/bin/_old/mkxpi +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash -# -# A simple script to make xpi files. -# Version: 0.2 -# -# Original Author: Gordon Luk -# Website: http://www.getluky.net/projects/mkxpi -# -# Patched by Johannes Findeisen to work more usefull. -# Website: http://hanez.org -# -# Notes: -# It expects the following directory structure: -# / - Project directory, will place finished xpi file here. -# //install.rdf - Installation RDF -# //install.js - Installation JavaSript -# //chrome/ - will make the .jar file here. -# //chrome/content/ - project content files -# //chrome/locale/ - project locale files -# //chrome/skin/ - project skin files - -usage() -{ - echo "Usage: mkxpi " -} - -path=$1 - -project=$2 - -version=$3 - -if [ "1$project" = "1" ]; then - usage - exit 1 -fi - -if [ "1$path" = "1" ]; then - usage - exit 1 -fi - -if [ "1$version" = "1" ]; then - usage - exit 1 -fi - -cd $path - -cd chrome - -jar -cfM $project.jar ./content ./skin ./locale - -cd $path - -jar -cfM $project-$version-fx.xpi ./chrome/$project.jar ./install.rdf - -mv $project-$version-fx.xpi ../ - -echo "Cleaning up..." - -cd $path - -rm ./chrome/$project.jar - -echo "Done!" - -exit 0 diff --git a/bin/_old/old/____hasync2 b/bin/_old/old/____hasync2 deleted file mode 100755 index 112d9578..00000000 --- a/bin/_old/old/____hasync2 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -rsync -r -v -z hanez.org:/var/www/hanez.org/www/htdocs/ /home/www/hanez.org/htdocs/ --exclude=wp-config.php --exclude=*~ --exclude=.svn --exclude=tmp.txt --exclude=cache/* --perms --group --times diff --git a/bin/_old/old/backup.sh b/bin/_old/old/backup.sh deleted file mode 100755 index 63f32ae8..00000000 --- a/bin/_old/old/backup.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -rsync -v -r --delete --progress --exclude=/dev --exclude=/tmp -e ssh root@217.160.187.113:/ /data/server/ diff --git a/bin/_old/old/ctail b/bin/_old/old/ctail deleted file mode 100755 index 17e79046..00000000 --- a/bin/_old/old/ctail +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - - -tail -f $1 | perl -pe $reg "s/$2/\e[1;31;43m$&\e[0m/g" - diff --git a/bin/_old/old/cvspasswd.c b/bin/_old/old/cvspasswd.c deleted file mode 100755 index 399ba5ab..00000000 --- a/bin/_old/old/cvspasswd.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Trivial password generator for cvs. Compile with 'cc -o cvspasswd cvspasswd.c -lcrypt' */ -#include -#include -#include - -/* Generate a single character of salt given a random integer. See 'man crypt'. */ -int base64(int x) -{ - const char b64[64] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz./"; - return b64[x % 64]; -} - -int main(int argc, char **argv) -{ - char ibuf[256]; - char passwd[256]; - char saltstr[3]; - struct tms t; - - if (argc != 2) { - fprintf(stderr, "Usage: cvspasswd username\n"); - exit(1); - } - fprintf(stderr, "Password for %s: ", argv[1]); - ibuf[0] = 0; - fgets(ibuf, sizeof(ibuf), stdin); - sscanf(ibuf, "%s", passwd); - saltstr[0] = base64(times(&t)); - saltstr[1] = base64(time(0)); - saltstr[2] = 0; - - printf("%s:%s:cvsuser\n", argv[1], crypt(passwd, saltstr)); - exit(0); -} - diff --git a/bin/_old/old/cvspasswd.sh b/bin/_old/old/cvspasswd.sh deleted file mode 100755 index 17f366b7..00000000 --- a/bin/_old/old/cvspasswd.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/perl - -srand (time()); -my $randletter = "(int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97))"; -my $salt = sprintf ("%c%c", eval $randletter, eval $randletter); -my $plaintext = shift; -my $crypttext = crypt ($plaintext, $salt); - -print "${crypttext}\n"; diff --git a/bin/_old/old/dnsnotify b/bin/_old/old/dnsnotify deleted file mode 100755 index ea8ee13e..00000000 --- a/bin/_old/old/dnsnotify +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/perl -w - -# usage: dnsnotify zone slave [...] -# example: dnsnotify example.org 1.2.3.4 1.2.3.5 - -use Net::DNS; - -$zone = shift; -@master_ns = @ARGV; - -$res = new Net::DNS::Resolver; - -foreach $ns (@master_ns) { - $packet = new Net::DNS::Packet($zone, "SOA", "IN"); - die unless defined $packet; - - ($packet->header)->opcode("NS_NOTIFY_OP"); - ($packet->header)->rd(0); - ($packet->header)->aa(1); - - $res->nameservers($ns); - - # Prints outgoing packet - the NOTIFY - # $packet->print; - - $reply = $res->send($packet); - - if (defined $reply) { - - print "Received NOTIFY answer from " . $reply->answerfrom . "\n"; - # Print received packet - the answer - # $reply->print; - - } else { - - warn "\$res->send indicates NOTIFY error for $ns\n"; - } -} - -exit 0; - diff --git a/bin/_old/old/dynhdparm b/bin/_old/old/dynhdparm deleted file mode 100755 index 9c02fb5b..00000000 --- a/bin/_old/old/dynhdparm +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -# dynhdparm is a script to deactivate harddiscs with "hdparm -y" if -# they are not used. I had this running as cron job on a fileserver. -# -# Author: Johannes Findeisen -# -# Usage: dynhdparm /dev/hda -# Or: dynhdparm /dev/hda /dev/hdb -# -# Note: This script will not work to disable devices where the root -# partition resides on. - -if [ $# -lt 1 ]; then - echo "You need at least to set one device as paramater" - echo "Example: dynhdparm /dev/hdd /dev/sda" - echo "" - exit -fi - -DEVICES=$@ -LSOFDATA="" - -for DEVICE in $DEVICES; do - PARTITIONS=`cat /etc/mtab | grep $DEVICE | cut -d " " -f 2` - for PARTITION in $PARTITIONS; do - LSOFDATA=$LSOFDATA`lsof | grep $PARTITION` - done - if [ ${#LSOFDATA} -lt 1 ]; then - HDPARMOUT=`hdparm -y $DEVICE` - fi -done - diff --git a/bin/_old/old/foo b/bin/_old/old/foo deleted file mode 100755 index ba08889b..00000000 --- a/bin/_old/old/foo +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -foo=`dirname $0` - -echo $foo; - diff --git a/bin/_old/old/glasync b/bin/_old/old/glasync deleted file mode 100755 index 09e7971a..00000000 --- a/bin/_old/old/glasync +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -rsync --delete -r -v -z /mnt/shared/www/wordpress/ \ - -e ssh \ - glashoffs.de:/var/www/glashoffs.de/www/htdocs/ \ - --exclude='*~' \ - --exclude='wp-config.php' \ - --delete-excluded --perms --group - diff --git a/bin/_old/old/hddstandby.sh b/bin/_old/old/hddstandby.sh deleted file mode 100755 index a6c38dec..00000000 --- a/bin/_old/old/hddstandby.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -sudo /sbin/hdparm -y /dev/hdc diff --git a/bin/_old/old/homeback b/bin/_old/old/homeback deleted file mode 100755 index 24e09645..00000000 --- a/bin/_old/old/homeback +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -rsync -av --delete /home/ /media/DATA_400GB-2/homebackup/ - diff --git a/bin/_old/old/hprint b/bin/_old/old/hprint deleted file mode 100755 index 619e18fa..00000000 --- a/bin/_old/old/hprint +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -echo "TODO...!" - -#cd /home/hanez/Desktop/neu/ - -#for i in ./*; do -# echo $i -# pdf2ps $i -# mv *.ps ../ps/ -#done - -#cd /home/hanez/Desktop/ps/ - -#for h in ./*; do -# cat $h > /dev/usb/lp0 -# echo $h -# sleep 5 -#done - - diff --git a/bin/_old/old/hxterm b/bin/_old/old/hxterm deleted file mode 100755 index baf0aa8e..00000000 --- a/bin/_old/old/hxterm +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -xterm -bg black -fg grey -sb -leftbar -si -bc -cr orange - diff --git a/bin/_old/old/install-daemontools b/bin/_old/old/install-daemontools deleted file mode 100755 index c40b2a2e..00000000 --- a/bin/_old/old/install-daemontools +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -# -# install daemontools on fedora/redhat linux -# -# Mike Jackson 5 NOV 2005 -# -# -mkdir /package -chmod 1755 /package -cd /package -wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz -tar xzvf daemontools-0.76.tar.gz -rm -f daemontools-0.76.tar.gz -cd admin/daemontools-0.76/src -wget http://www.qmailrocks.org/downloads/patches/daemontools-0.76.errno.patch -patch < daemontools-0.76.errno.patch -cd .. -package/install diff --git a/bin/_old/old/intenso b/bin/_old/old/intenso deleted file mode 100755 index c14b1ba9..00000000 --- a/bin/_old/old/intenso +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -mencoder $1 \ - -o $2 \ - -ffourcc XVID \ - -ofps 18 \ - -vf-add scale=220:176, \ - -vf-add expand=220:176:-1:-1:1,rotate=2,flip \ - -srate 44100 \ - -ovc xvid \ - -xvidencopts bitrate=800:max_bframes=0:quant_type=h263:me_quality=0 \ - -oac lavc \ - -lavcopts acodec=mp2:abitrate=64 - diff --git a/bin/_old/old/jd.sh b/bin/_old/old/jd.sh deleted file mode 100755 index 464774c1..00000000 --- a/bin/_old/old/jd.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash -#JD Installer/Starter Version 0.2 -#by Jiaz(JD-Team), jiaz@jdownloader.org -#You need at least: -#1.) bash (its a bash script ;) ) -#2.) wget -#3.) Java Version >= 1.5 (OpenJDK works also in latest Version) - -#How to use this? -#1.) chmod +x jd.sh -#2.) Place it anywhere you want -#3.) Running jd.sh for the first time will install and setup JD into JDDIR folder -#4.) Running jd.sh after the first time will start JDownloader directly - -#Parameters -# update (will perform an update) - -#JD Installation folder (adjust to your needs) -JDDIR=~/.jd -#default path to our install/update tool (DO NOT Change this) -JDINSTALLER=http://update0.jdownloader.org/jdupdate.jar - -if [ -e $JDDIR ] -then -if [ "$1" = "update" ] -then -if [ -e $JDDIR/jdupdate.jar ] -then -cd $JDDIR -echo "Start JD-Updater" -java -Xmx512m -jar jdupdate.jar -exit -else -echo "Cannot start JD-Updater: Download/Start JD-Installer" -cd $JDDIR -wget $JDINSTALLER -java -Xmx512m -jar jdupdate.jar -exit -fi -fi -if [ -e $JDDIR/JDownloader.jar ] -then -echo "JD Installation found: Starting JD now" -cd $JDDIR -#java -Xmx512m -jar JDownloader.jar --add-links $1 $2 $3 $4 $5 $6 $7 $8 $9 -java -Xmx512m -jar JDownloader.jar -exit -else -echo "JD Installation found: No valid JDownloader.jar exist!" -fi -if [ -e $JDDIR/jdupdate.jar ] -then -cd $JDDIR -echo "Start JD-Updater" -java -Xmx512m -jar jdupdate.jar -else -echo "Cannot start JD-Updater: Download/Start JD-Installer" -cd $JDDIR -wget $JDINSTALLER -java -Xmx512m -jar jdupdate.jar -exit -fi -else -echo "Download/Start JD-Installer" -mkdir $JDDIR -cd $JDDIR -wget $JDINSTALLER -java -Xmx512m -jar jdupdate.jar -exit -fi diff --git a/bin/_old/old/mkmp3list b/bin/_old/old/mkmp3list deleted file mode 100644 index c58ae404..00000000 --- a/bin/_old/old/mkmp3list +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/php - - $slashcount) - $min_slash = $slashcount; - - $tfile = strrchr($list[$i], "/"); - $xfile = substr($tfile, 1, strlen($tfile)); - - if (is_dir($list[$i])) { - $xlist[$slashcount][$i]['fileextension'] = ""; - $xlist[$slashcount][$i]['file'] = $xfile; - $tpath = $list[$i]; - } - else { - $xlist[$slashcount][$i]['fileextension'] = substr($list[$i], strlen($list[$i])-4 , 4); - $xlist[$slashcount][$i]['file'] = substr($xfile, 0, strlen($tfile)-5); - $tpath = substr($list[$i], 0, strlen($list[$i])-4); - } - - $xpath = substr($tpath, 0, (strlen($tpath)-strlen($xlist[$slashcount][$i]['file']))); - - $xlist[$slashcount][$i]['path'] = $xpath; - - $dfile = str_replace(". ", "_", $xlist[$slashcount][$i]['file']); - $dfile = str_replace("--", "_", $dfile); - $dfile = str_replace(" ", "_", $dfile); - $dfile = str_replace(" .", "_", $dfile); - $dfile = str_replace("( ", "(", $dfile); - $dfile = str_replace(" )", ")", $dfile); - $dfile = str_replace("'", "", $dfile); - $dfile = str_replace(" ", "_", $dfile); - $dfile = str_replace(".", "_", $dfile); - $dfile = str_replace("__", "_", $dfile); - - $xlist[$slashcount][$i]['destination'] = $xlist[$slashcount][$i]['path'] . $dfile . $xlist[$slashcount][$i]['fileextension']; - } -} - -for ($i=$max_slash;$i>=$min_slash;$i--) { - foreach ($xlist[$i] as $value) { - if ($value['source'] != $value['destination']) { - $com = "mv -f --verbose \"".$value['source']."' '".$value['destination']."\""; - echo $com; - #passthru($com); - } - } -} - - -?> - diff --git a/bin/_old/old/simple-glade-codegen b/bin/_old/old/simple-glade-codegen deleted file mode 100755 index 1b91ac3f..00000000 --- a/bin/_old/old/simple-glade-codegen +++ /dev/null @@ -1,465 +0,0 @@ -#!/usr/bin/env python - -# simple-glade-codegen.py -# A code generator that uses pygtk, glade and SimpleGladeApp.py -# Copyright (C) 2004 Sandino Flores Moreno - -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA - -import sys -import os -import re -import codecs -import tokenize -import shutil -import time -import xml.sax -from xml.sax._exceptions import SAXParseException - -header_format = """\ -#!/usr/bin/env python -# -*- coding: UTF8 -*- - -# Python module %(module)s.py -# Autogenerated from %(glade)s -# Generated on %(date)s - -# Warning: Do not delete or modify comments related to context -# They are required to keep user's code - -import os -import gtk -from SimpleGladeApp import SimpleGladeApp - -glade_dir = "" - -# Put your modules and data here - -# From here through main() codegen inserts/updates a class for -# every top-level widget in the .glade file. - -""" - -class_format = """\ -class %(class)s(SimpleGladeApp): -%(t)sdef __init__(self, path="%(glade)s", root="%(root)s", domain=None, **kwargs): -%(t)s%(t)spath = os.path.join(glade_dir, path) -%(t)s%(t)sSimpleGladeApp.__init__(self, path, root, domain, **kwargs) - -%(t)sdef new(self): -%(t)s%(t)s#context %(class)s.new { -%(t)s%(t)sprint "A new %(class)s has been created" -%(t)s%(t)s#context %(class)s.new } - -%(t)s#context %(class)s custom methods { -%(t)s#--- Write your own methods here ---# -%(t)s#context %(class)s custom methods } - -""" - -callback_format = """\ -%(t)sdef %(handler)s(self, widget, *args): -%(t)s%(t)s#context %(class)s.%(handler)s { -%(t)s%(t)sprint "%(handler)s called with self.%%s" %% widget.get_name() -%(t)s%(t)s#context %(class)s.%(handler)s } - -""" - -creation_format = """\ -%(t)sdef %(handler)s(self, str1, str2, int1, int2): -%(t)s%(t)s#context %(class)s.%(handler)s { -%(t)s%(t)swidget = gtk.Label("%(handler)s") -%(t)s%(t)swidget.show_all() -%(t)s%(t)sreturn widget -%(t)s%(t)s#context %(class)s.%(handler)s } - -""" - -main_format = """\ -def main(): -""" - -instance_format = """\ -%(t)s%(root)s = %(class)s() -""" -run_format = """\ - -%(t)s%(root)s.run() - -if __name__ == "__main__": -%(t)smain() -""" - -class NotGladeDocumentException(SAXParseException): - def __init__(self, glade_writer): - strerror = "Not a glade-2 document" - SAXParseException.__init__(self, strerror, None, glade_writer.sax_parser) - -class SimpleGladeCodeWriter(xml.sax.handler.ContentHandler): - def __init__(self, glade_file): - self.indent = "\t" - self.code = "" - self.roots_list = [] - self.widgets_stack = [] - self.creation_functions = [] - self.callbacks = [] - self.parent_is_creation_function = False - self.parent_is_object = False - self.glade_file = glade_file - self.data = {} - self.input_dir, self.input_file = os.path.split(glade_file) - base = os.path.splitext(self.input_file)[0] - module = self.normalize_symbol(base) - self.output_file = os.path.join(self.input_dir, module) + ".py" - self.sax_parser = xml.sax.make_parser() - self.sax_parser.setFeature(xml.sax.handler.feature_external_ges, False) - self.sax_parser.setContentHandler(self) - self.data["glade"] = self.input_file - self.data["module"] = module - self.data["date"] = time.asctime() - - def normalize_symbol(self, base): - return "_".join( re.findall(tokenize.Name, base) ) - - def capitalize_symbol(self, base): - ClassName = "[a-zA-Z0-9]+" - base = self.normalize_symbol(base) - capitalize_map = lambda s : s[0].upper() + s[1:] - return "".join( map(capitalize_map, re.findall(ClassName, base)) ) - - def uncapitalize_symbol(self, base): - InstanceName = "([a-z])([A-Z])" - action = lambda m: "%s_%s" % ( m.groups()[0], m.groups()[1].lower() ) - base = self.normalize_symbol(base) - base = base[0].lower() + base[1:] - return re.sub(InstanceName, action, base) - - def startElement(self, name, attrs): - if self.parent_is_object: - return - elif name == "object": - self.parent_is_object = True - elif name == "widget": - widget_id = attrs.get("id") - widget_class = attrs.get("class") - if not widget_id or not widget_class: - raise NotGladeDocumentException(self) - if not self.widgets_stack: - self.creation_functions = [] - self.callbacks = [] - class_name = self.capitalize_symbol(widget_id) - self.data["class"] = class_name - self.data["root"] = widget_id - self.roots_list.append(widget_id) - self.code += class_format % self.data - self.widgets_stack.append(widget_id) - elif name == "signal": - if not self.widgets_stack: - raise NotGladeDocumentException(self) - widget = self.widgets_stack[-1] - signal_object = attrs.get("object") - if signal_object: - return - handler = attrs.get("handler") - if not handler: - raise NotGladeDocumentException(self) - if handler.startswith("gtk_"): - return - signal = attrs.get("name") - if not signal: - raise NotGladeDocumentException(self) - self.data["widget"] = widget - self.data["signal"] = signal - self.data["handler"]= handler - if handler not in self.callbacks: - self.code += callback_format % self.data - self.callbacks.append(handler) - elif name == "property": - if not self.widgets_stack: - raise NotGladeDocumentException(self) - widget = self.widgets_stack[-1] - prop_name = attrs.get("name") - if not prop_name: - raise NotGladeDocumentException(self) - if prop_name == "creation_function": - self.parent_is_creation_function = True - - def characters(self, content): - if self.parent_is_object: - return - if self.parent_is_creation_function: - if not self.widgets_stack: - raise NotGladeDocumentException(self) - handler = content.strip() - if handler not in self.creation_functions: - self.data["handler"] = handler - self.code += creation_format % self.data - self.creation_functions.append(handler) - - def endElement(self, name): - if name == "object": - self.parent_is_object = False - elif name == "property": - self.parent_is_creation_function = False - elif name == "widget": - if not self.widgets_stack: - raise NotGladeDocumentException(self) - self.widgets_stack.pop() - - def write(self): - self.data["t"] = self.indent - self.code += header_format % self.data - try: - glade = open(self.glade_file, "r") - self.sax_parser.parse(glade) - except xml.sax._exceptions.SAXParseException, e: - sys.stderr.write("Error parsing document\n") - return None - except IOError, e: - sys.stderr.write("%s\n" % e.strerror) - return None - - self.code += main_format % self.data - - for root in self.roots_list: - self.data["class"] = self.capitalize_symbol(root) - self.data["root"] = self.uncapitalize_symbol(root) - self.code += instance_format % self.data - - self.data["root"] = self.uncapitalize_symbol(self.roots_list[0]) - self.code += run_format % self.data - - try: - self.output = codecs.open(self.output_file, "w", "utf-8") - self.output.write(self.code) - self.output.close() - except IOError, e: - sys.stderr.write("%s\n" % e.strerror) - return None - return self.output_file - -def usage(): - program = sys.argv[0] - print """\ -Write a simple python file from a glade file. -Usage: %s -""" % program - -def which(program): - if sys.platform.startswith("win"): - exe_ext = ".exe" - else: - exe_ext = "" - path_list = os.environ["PATH"].split(os.pathsep) - for path in path_list: - program_path = os.path.join(path, program) + exe_ext - if os.path.isfile(program_path): - return program_path - return None - -def check_for_programs(): - packages = {"diff" : "diffutils", "patch" : "patch"} - for package in packages.keys(): - if not which(package): - sys.stderr.write("Required program %s could not be found\n" % package) - sys.stderr.write("Is the package %s installed?\n" % packages[package]) - if sys.platform.startswith("win"): - sys.stderr.write("Download it from http://gnuwin32.sourceforge.net/packages.html\n") - sys.stderr.write("Also, be sure it is in the PATH\n") - return False - return True - -def main(): - if not check_for_programs(): - return -1 - if len(sys.argv) == 2: - code_writer = SimpleGladeCodeWriter( sys.argv[1] ) - glade_file = code_writer.glade_file - output_file = code_writer.output_file - output_file_orig = output_file + ".orig" - output_file_bak = output_file + ".bak" - short_f = os.path.split(output_file)[1] - short_f_orig = short_f + ".orig" - short_f_bak = short_f + ".bak" - helper_module = os.path.join(code_writer.input_dir,SimpleGladeApp_py) - custom_diff = "custom.diff" - - exists_output_file = os.path.exists(output_file) - exists_output_file_orig = os.path.exists(output_file_orig) - if not exists_output_file_orig and exists_output_file: - sys.stderr.write('File "%s" exists\n' % short_f) - sys.stderr.write('but "%s" does not.\n' % short_f_orig) - sys.stderr.write("That means your custom code would be overwritten.\n") - sys.stderr.write('Please manually remove "%s"\n' % short_f) - sys.stderr.write("from this directory.\n") - sys.stderr.write("Anyway, I\'ll create a backup for you in\n") - sys.stderr.write('"%s"\n' % short_f_bak) - shutil.copy(output_file, output_file_bak) - return -1 - if exists_output_file_orig and exists_output_file: - os.system("diff -U1 %s %s > %s" % (output_file_orig, output_file, custom_diff) ) - shutil.copy(output_file, output_file_bak) - if not code_writer.write(): - os.remove(custom_diff) - return -1 - shutil.copy(output_file, output_file_orig) - if os.system("patch -fp0 < %s" % custom_diff): - os.remove(custom_diff) - return -1 - os.remove(custom_diff) - else: - if not code_writer.write(): - return -1 - shutil.copy(output_file, output_file_orig) - os.chmod(output_file, 0755) - if not os.path.isfile(helper_module): - open(helper_module, "w").write(SimpleGladeApp_content) - print "Wrote", output_file - return 0 - else: - usage() - return -1 - -SimpleGladeApp_py = "SimpleGladeApp.py" - -SimpleGladeApp_content = '''\ -# SimpleGladeApp.py -# Module that provides an object oriented abstraction to pygtk and libglade. -# Copyright (C) 2004 Sandino Flores Moreno - -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA - -try: - import os - import sys - import gtk - import gtk.glade - import weakref -except ImportError: - print "Error importing pygtk2 and pygtk2-libglade" - sys.exit(1) - -class SimpleGladeApp(dict): - def __init__(self, glade_filename, main_widget_name=None, domain=None, **kwargs): - if os.path.isfile(glade_filename): - self.glade_path = glade_filename - else: - glade_dir = os.path.split( sys.argv[0] )[0] - self.glade_path = os.path.join(glade_dir, glade_filename) - for key, value in kwargs.items(): - try: - setattr(self, key, weakref.proxy(value) ) - except TypeError: - setattr(self, key, value) - self.glade = None - gtk.glade.set_custom_handler(self.custom_handler) - self.glade = gtk.glade.XML(self.glade_path, main_widget_name, domain) - if main_widget_name: - self.main_widget = self.glade.get_widget(main_widget_name) - else: - self.main_widget = None - self.signal_autoconnect() - self.new() - - def signal_autoconnect(self): - signals = {} - for attr_name in dir(self): - attr = getattr(self, attr_name) - if callable(attr): - signals[attr_name] = attr - self.glade.signal_autoconnect(signals) - - def custom_handler(self, - glade, function_name, widget_name, - str1, str2, int1, int2): - if hasattr(self, function_name): - handler = getattr(self, function_name) - return handler(str1, str2, int1, int2) - - def __getattr__(self, name): - if name in self: - data = self[name] - return data - else: - widget = self.glade.get_widget(name) - if widget != None: - self[name] = widget - return widget - else: - raise AttributeError, name - - def __setattr__(self, name, value): - self[name] = value - - def new(self): - pass - - def on_keyboard_interrupt(self): - pass - - def gtk_widget_show(self, widget, *args): - widget.show() - - def gtk_widget_hide(self, widget, *args): - widget.hide() - - def gtk_widget_grab_focus(self, widget, *args): - widget.grab_focus() - - def gtk_widget_destroy(self, widget, *args): - widget.destroy() - - def gtk_window_activate_default(self, widget, *args): - widget.activate_default() - - def gtk_true(self, *args): - return gtk.TRUE - - def gtk_false(self, *args): - return gtk.FALSE - - def gtk_main_quit(self, *args): - gtk.main_quit() - - def main(self): - gtk.main() - - def quit(self): - gtk.main_quit() - - def run(self): - try: - self.main() - except KeyboardInterrupt: - self.on_keyboard_interrupt() -''' - -if __name__ == "__main__": - exit_code = main() - sys.exit(exit_code) diff --git a/bin/_old/old/snscan b/bin/_old/old/snscan deleted file mode 100755 index fe79ead4..00000000 --- a/bin/_old/old/snscan +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/ruby - -f = 1..255 - -#f.each do |line| -# puts line -# system("ping -c 1 192.168.0.#{line}") - -#pig = IO.popen("ping -c 1 192.168.0.#{line}") -#puts pig.gets - -#end - - - -count = 0 -arr = [] -f.each do |i| - arr[i] = Thread.new { - #sleep(rand(0)/10.0) - - system("ping -c 1 192.168.0.#{i}") - #Thread.current["mycount"] = IO.popen("ping -c 1 192.168.0.#{i}") - #Thread.current["mycount"] = count - count += 1 - } -end -#arr.each {|t| t.join; print t["mycount"], ", " } -#puts "count = #{count}" - - - - diff --git a/bin/_old/old/test.sh b/bin/_old/old/test.sh deleted file mode 100755 index 1783e64e..00000000 --- a/bin/_old/old/test.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -foo=aaabbbccc; bar=zzz; lop=`echo $foo | sed -e s/aaa/$bar/`; echo $lop - -foo=aaabbbccc; bar=zzz; lop=`echo $foo | sed -e s/aaa/$bar/`; echo $lop - -foo=/home/hanez/fooo; bar=/home/hanez; lop=`echo $foo | sed -e "s|\${bar}|AAAA|"`; echo $lop -echo $bar diff --git a/bin/_old/old/um_gentoo b/bin/_old/old/um_gentoo deleted file mode 100644 index 03e79295..00000000 --- a/bin/_old/old/um_gentoo +++ /dev/null @@ -1 +0,0 @@ -/home/hanez/linux//vmlinux ubda=/home/hanez/projects/linux/Gentoo-2006.1-x86-root_fs mem=128M eth0=tuntap,,,192.168.0.254 diff --git a/bin/_old/old/upsync b/bin/_old/old/upsync deleted file mode 100755 index fa2311a7..00000000 --- a/bin/_old/old/upsync +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -rsync --delete -r -v -z /home/www/unixpeople.org/ hanez.org:/var/www/unixpeople.org/www/ --exclude=*~ --exclude=.svn --exclude=config.xml --perms --group --times diff --git a/bin/_old/old/upsync2 b/bin/_old/old/upsync2 deleted file mode 100755 index f2c1ea79..00000000 --- a/bin/_old/old/upsync2 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -rsync --delete -r -v -z /data/hanez/unixpeople.org/ hanez.org:/var/www/unixpeople.org/www/ --exclude=*~ --exclude=.svn --delete-excluded --perms --group --times diff --git a/bin/_old/old/winetricks b/bin/_old/old/winetricks deleted file mode 100755 index 6c09ee67..00000000 --- a/bin/_old/old/winetricks +++ /dev/null @@ -1,3296 +0,0 @@ -#!/bin/sh -# Quick and dirty script to download and install various -# redistributable runtime libraries -# -# Current maintainers: Austin English, Dan Kegel -# Copyright 2007, 2008, 2009 Google (Dan Kegel, dank@kegel.com) -# Copyright 2008, 2009 Austin English (austinenglish@gmail.com) -# Thanks to Detlef Riekenberg for lots of updates -# Thanks to Saulius Krasuckas for corrections and suggestions -# Thanks to Erik Inge Bolsø for several patches -# Thanks to Hugh Perkins for the directplay patch -# Please report problems at http://code.google.com/p/winezeug/issues -# See also http://wiki.winehq.org/winetricks -# -# Note to contributors: please avoid gnu extensions in this shell script, -# as it has to run on MacOSX and Solaris, too. A good book on the topic is -# "Portable Shell Programming" by Bruce Blinn - -#---- Constants ------------------------------------------------- - -# Name of this version of winetricks (YYYYMMDD) -VERSION=20091213 - -early_wine() -{ - WINEDLLOVERRIDES=mshtml= $WINE "$@" -} - -# Default values for important settings if not already in environment. -# These settings should not need editing here. -case "$OS" in - "Windows_NT") - # Cheezy fix for getting rid of double slashes when running cygwin in wine - case $HOME in - /) HOME="" ;; - esac - WINE="" - WINEPREFIX=${WINEPREFIX:-$HOME/.wine} - DRIVE_C="C:/" - XXXPATH=cygpath - ;; - *) - WINE=${WINE:-wine} - WINEPREFIX=${WINEPREFIX:-$HOME/.wine} - DRIVE_C="$WINEPREFIX/drive_c" - XXXPATH="early_wine winepath" - ;; -esac - -# Internal variables; these locations are not too important -WINETRICKS_CACHE=$HOME/winetrickscache -# Default to hiding the directory, by popular demand -test -d "$WINETRICKS_CACHE" || WINETRICKS_CACHE=$HOME/.winetrickscache -WINETRICKS_CACHE_WIN="`$XXXPATH -w $WINETRICKS_CACHE`" -WINETRICKS_TMP="$DRIVE_C"/winetrickstmp -WINETRICKS_TMP_WIN='c:\winetrickstmp' -mkdir -p $WINETRICKS_TMP - -# Overridden for windows -ISO_MOUNT_ROOT=/mnt/winetricks - -WINDIR="$DRIVE_C/windows" - -# Which sourceforge mirror to use. Rotate based on time, since -# their mirror picker sometimes persistantly sends you to a broken -# mirror. -case `date +%S` in -*[01]) SOURCEFORGE=http://internap.dl.sourceforge.net/sourceforge ;; -*[23]) SOURCEFORGE=http://easynews.dl.sourceforge.net/sourceforge ;; -*) SOURCEFORGE=http://downloads.sourceforge.net;; -esac - -#---- Functions ------------------------------------------------- - -# Check for known desktop environments -# Set variable DE to the desktop environment's name, lowercase -detectDE() { - if [ x"$KDE_FULL_SESSION" = x"true" ] - then - DE=kde - elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ] - then - DE=gnome - elif [ x"$DISPLAY" != x"" ] - then - DE=x - else - DE=none - fi -} - -warn() { - echo "$@" - - test "$GUI" = 1 || return - - case $DE in - gnome) zenity --error --title=Winetricks --text="$@" --no-wrap ;; - kde) kdialog --title Winetricks --error "$@" ;; - x) xmessage -title Winetricks -center " Error: $@ " ;; - esac -} - -die() { - warn "$@" - - exit 1 -} - -# Abort if user doesn't own the given directory (or its parent, if it doesn't exist yet) -die_if_user_not_dirowner() { - if test -d "$1" - then - checkdir="$1" - else - # fixme: quoting problem? - checkdir=`dirname "$1"` - fi - nuser=`id -u` - nowner=`ls -l -n -d "$checkdir" | awk '{print $3}'` - if test x$nuser != x$nowner - then - die "You (`id -un`) don't own $checkdir. Don't run winetricks as another user!" - fi -} - -#---------------------------------------------------------------- - -usage() { - set +x - # WARNING: do not use single quote in any package description; that breaks the gui menu. - echo "Usage: $0 [options] package [package] ..." - echo "This script can help you prepare your system for Windows applications" - echo "that mistakenly assume all users' systems have all the needed" - echo "redistributable runtime libraries or fonts." - echo "Some options require the Linux 'cabextract' program." - echo "" - echo "Options:" - echo " -q quiet. You must have already agreed to the EULAs." - echo " -v verbose" - echo " -V display Version" - echo "Packages:" - echo " art2kmin MS Access 2007 runtime" - echo " atmlib Adobe Type Manager. Needed for Adobe CS4" - echo " autohotkey Autohotkey (open source gui scripting language)" - echo " cmake CMake, the cross-platform, open-source build system" - echo " colorprofile Standard RGB color profile" - echo " comctl32 MS common controls 5.80" - echo " comctl32.ocx MS comctl32.ocx and mscomctl.ocx, comctl32 wrappers for VB6" - echo " controlpad MS ActiveX Control Pad" - echo " corefonts MS Arial, Courier, Times fonts" - echo " cygwin Unix apps for Windows (needed by some build scripts)" - echo " d3dx9 MS d3dx9_??.dll (from DirectX 9 user redistributable)" - echo " dcom98 MS DCOM (ole32, oleaut32); requires Windows 98 license, but does not check for one" - echo " dinput8 MS dinput8.dll (from DirectX 9 user redistributable)" - echo " dirac0.8 the obsolete Dirac 0.8 directshow filter" - echo " directplay MS DirectPlay (from DirectX 9 user redistributable)" - echo " directx9 MS DirectX 9 user redistributable (not recommended! use d3dx9 instead)" - echo " divx divx video codec" - echo " dotnet11 MS .NET 1.1 (requires Windows license, but does not check for one)" -# Doesn't work yet, don't make it public -# echo " dotnet11sdk MS .NET Framework SDK Version 1.1 (requires Windows license, but does not check for one; may not work yet)" - echo " dotnet20 MS .NET 2.0 (requires Windows license, but does not check for one)" -# Doesn't work yet, don't make it public -# echo " dotnet20sdk MS .NET Framework SDK Version 2.0 (requires Windows license, but does not check for one, may not work yet)" - echo " dotnet20sp2 MS .NET 2.0 sp2 (requires Windows license, but does not check for one)" - echo " dotnet30 MS .NET 3.0 (requires Windows license, but does not check for one, might not work yet)" - echo " droid Droid fonts (on LCD, looks better with fontsmooth-rgb)" - echo " ffdshow ffdshow video codecs" - echo " firefox Firefox web browser" - echo " flash Adobe Flash Player ActiveX and firefox plugins" - echo " fm20 MS Forms 2.0 Object Library" - echo " fontfix Fix bad fonts which cause crash in some apps (e.g. .net)." - echo " fontsmooth-bgr Enables subpixel smoothing for BGR LCDs" - echo " fontsmooth-disable Disables font smoothing" - echo " fontsmooth-gray Enables grayscale font smoothing" - echo " fontsmooth-rgb Enables subpixel smoothing for RGB LCDs" - echo " gdiplus MS gdiplus.dll" - echo " gecko-dbg The HTML rendering Engine (Mozilla), with debugging symbols" - echo " gecko The HTML rendering Engine (Mozilla)" - echo " hosts Adds empty C:\windows\system32\drivers\etc\{hosts,services} files" - echo " icodecs Intel Codecs (Indeo)" - echo " ie6 Microsoft Internet Explorer 6.0" - echo " ie7 Microsoft Internet Explorer 7.0" - echo " jet40 MS Jet 4.0 Service Pack 8" - echo " kde KDE for Windows installer" - echo " liberation Red Hat Liberation fonts (Sans, Serif, Mono)" - echo " mdac25 MS MDAC 2.5: Microsoft ODBC drivers, etc." - echo " mdac27 MS MDAC 2.7" - echo " mdac28 MS MDAC 2.8" - echo " mfc40 MS mfc40 (Microsoft Foundation Classes from Visual C++ 4)" - echo " mfc42 MS mfc42 (same as vcrun6 below)" - echo " mingw-gdb GDB for MinGW" - echo " mingw Minimalist GNU for Windows, including GCC for Windows!" - echo " mono20 mono-2.0.1" - echo " mono22 mono-2.2" - echo " mono24 mono-2.4" - echo " mozillabuild Mozilla build environment" - echo " mpc Media Player Classic" - echo " mshflxgd MS Hierarchical Flex Grid Control" - echo " msi2 MS Installer 2.0" - echo " msls31 MS Line Services 3.1 (needed by native riched?)" - echo " msmask MS Masked Edit Control" - echo " msscript MS Script Control" - echo " msxml3 MS XML version 3" - echo " msxml4 MS XML version 4" - echo " msxml6 MS XML version 6" - echo " ogg ogg filters/codecs: flac, theora, speex, vorbis, schroedinger" - echo " ole2 MS 16 bit OLE" - echo " openwatcom Open Watcom C/C++ compiler (can compile win16 code!)" - echo " pdh MS pdh.dll (Performance Data Helper)" - echo " physx NVIDIA/AGEIA PhysX runtime" - echo " psdk2003 MS Platform SDK 2003" - echo " psdkvista MS Vista SDK (does not install yet)" - echo " psdkwin7 MS Windows 7 SDK (installing just headers and c++ compiler works)" - echo " python26 Python 2.6.2 (and pywin32)" - echo " python-comtypes Python 0.6.1-1 comtypes package" - echo " quicktime72 Apple Quicktime 7.2" - echo " riched20 MS riched20 and riched32" - echo " riched30 MS riched30" - echo " richtx32 MS Rich TextBox Control 6.0" - echo " shockwave Adobe Shockwave Player" - echo " tahoma MS Tahoma font (not part of corefonts)" - echo " urlmon MS urlmon.dll" - echo " vb2run MS Visual Basic 2 runtime" - echo " vb3run MS Visual Basic 3 runtime" - echo " vb4run MS Visual Basic 4 runtime" - echo " vb5run MS Visual Basic 5 runtime" - echo " vb6run MS Visual Basic 6 Service Pack 6 runtime" - echo " vc2005express MS Visual C++ 2005 Express" - echo " vc2005expresssp1 MS Visual C++ 2005 Express SP1 (does not work yet)" - echo " vc2005sp1 MS Visual C++ 2005 Service Pack 1 (install trial 1st)" - echo " vc2005trial MS Visual C++ 2005 Trial" - echo " vcrun2003 MS Visual C++ 2003 libraries (mfc71,msvcp71,msvcr71)" - echo " vcrun2005 MS Visual C++ 2005 sp1 libraries (mfc80,msvcp80,msvcr80)" - echo " vcrun2008 MS Visual C++ 2008 libraries (mfc90,msvcp90,msvcr90)" - echo " vcrun6 MS Visual C++ 6 sp4 libraries (mfc42, msvcp60, msvcrt)" - echo " vcrun6sp6 MS Visual C++ 6 sp6 libraries (mfc42, msvcp60, msvcrt; 64 MB download)" - echo " vjrun20 MS Visual J# 2.0 SE libraries (requires dotnet20)" - echo " vlc VLC media player" - echo " wenquanyi WenQuanYi CJK font (on LCD looks better with fontsmooth-rgb)" - echo " wininet MS wininet.dll (requires Windows license, but does not check for one)" - echo " wme9 MS Windows Media Encoder 9 (requires Windows license, but does not check for one)" - echo " wmp10 MS Windows Media Player 10 (requires Windows license, but does not check for one)" - echo " wmp9 MS Windows Media Player 9 (requires Windows license, but does not check for one)" - echo " wsh56js MS Windows scripting 5.6, jscript only, no cscript" - echo " wsh56 MS Windows Scripting Host 5.6" - echo " wsh56vb MS Windows scripting 5.6, vbscript only, no cscript" - echo " xact MS XACT Engine (x3daudio?_?.dll, xactengine?_?.dll)" - echo " xvid xvid video codec" - echo "Pseudopackages:" - echo " allfonts All listed fonts (corefonts, tahoma, liberation)" - echo " allcodecs All listed codecs (xvid, ffdshow, icodecs)" - echo " fakeie6 Set registry to claim IE6sp1 is installed" - echo " glsl-disable Disable GLSL use by Wine Direct3D" - echo " glsl-enable Enable GLSL use by Wine Direct3D (default)" - echo " heapcheck Enable heap checking" - echo " native_mdac Override odbc32, odbccp32 and oledb32" - echo " native_oleaut32 Override oleaut32" - echo " nocrashdialog Disable the graphical crash dialog" - echo " orm=backbuffer Registry tweak: OffscreenRenderingMode=backbuffer" - echo " orm=fbo Registry tweak: OffscreenRenderingMode=fbo (default)" - echo " orm=pbuffer Registry tweak: OffscreenRenderingMode=pbuffer" - echo " sandbox Sandbox the wineprefix - remove links to ~" - echo " sound=alsa Set sound driver to ALSA" - echo " sound=audioio Set sound driver to AudioIO" - echo " sound=coreaudio Set sound driver to CoreAudio" - echo " sound=esound Set sound driver to Esound" - echo " sound=jack Set sound driver to Jack" - echo " sound=nas Set sound driver to Nas" - echo " sound=oss Set sound driver to OSS" - echo " nt40 Set windows version to nt40" - echo " win98 Set windows version to Windows 98" - echo " win2k Set windows version to Windows 2000" - echo " winxp Set windows version to Windows XP" - echo " vista Set windows version to Windows Vista" - echo " winver= Set windows version to default (winxp)" - echo " volnum Rename drive_c to harddiskvolume0 (needed by some installers)" -} - -#---------------------------------------------------------------- -# Trivial GUI just to handle case where user tries running without commandline - -kde_showmenu() { - title="$1" - shift - text="$1" - shift - col1name="$1" - shift - col2name="$1" - shift - while test $# -gt 0 - do - args="$args $1 $1 off" - shift - done - kdialog --title "$title" --separate-output --checklist "$text" $args -} - -x_showmenu() { - title="$1" - shift - text="$1" - shift - col1name="$1" - shift - col2name="$1" - shift - if test $# -gt 0 - then - args="$1" - shift - fi - while test $# -gt 0 - do - args="$args,$1" - shift - done - (echo "$title"; echo ""; echo "$text") | \ - xmessage -print -file - -buttons "Cancel,$args" | sed 's/Cancel//' -} - -showmenu() -{ - case $DE in - kde) kde_showmenu "$@" ;; - gnome|x) x_showmenu "$@" ;; - none) usage 1>&2; exit 1;; - esac -} - -dogui() -{ - if [ $DE = gnome ] - then - echo "zenity --title 'Select a package to install' --text 'Install?' --list --checklist --column '' --column Package --column Description --height 440 --width 600 \\" > "$WINETRICKS_TMP"/zenity.sh - usage | grep '^ [a-z]' | sed 's/^ \([^ ]*\) *\(.*\)/FALSE "\1" '"'\2'/" | sed 's/$/ \\/' >> $WINETRICKS_TMP/zenity.sh - todo="`sh "$WINETRICKS_TMP"/zenity.sh | tr '|' ' '`" - else - packages=`usage | awk '/^ [a-z]/ {print $1}'` - todo="`showmenu "winetricks" "Select a package to install" "Install?" "Package" $packages`" - fi - - if test "$todo"x = x - then - exit 0 - fi -} - -#----- Helpers ------------------------------------------------ - -# Execute with error checking -try() { - # "VAR=foo try cmd" fails to put VAR in the environment - # with some versions of bash if try is a shell function?! - # Adding this explicit export works around it. - export WINEDLLOVERRIDES - echo Executing "$@" - # Mark executable - needed if running on windows vista - case "$1" in - *.exe) chmod +x "$1" || true - cmd /c "$@" - ;; - *) - "$@" - ;; - esac - status=$? - if test $status -ne 0 - then - die "Note: command '$@' returned status $status. Aborting." - fi -} - -try_regedit() { - try early_wine regedit "$@" -} - -regedit() { - die oops, bug, please report -} - -# verify an sha1sum -verify_sha1sum() { - wantsum=$1 - file=$2 - - gotsum=`$SHA1SUM < $file | sed 's/ .*//'` - if [ "$gotsum"x != "$wantsum"x ] - then - die "sha1sum mismatch! Rename $file and try again." - fi -} - -# Download a file -# Usage: package url [sha1sum [filename]] -# Caches downloads in winetrickscache/$package -download() { - if [ "$4"x != ""x ] - then - file="$4" - else - file=`basename "$2"` - fi - cache="$WINETRICKS_CACHE/$1" - mkdir -p "$cache" - if test ! -f "$cache/$file" - then - cd "$cache" - # Mac folks tend to have curl rather than wget - # On Mac, 'which' doesn't return good exit status - # Need to jam in --header "Accept-Encoding: gzip,deflate" else - # redhat.com decompresses liberation-fonts.tar.gz! - if [ -x "`which wget`" ] - then - # Use -nd to insulate ourselves from people who set -x in WGETRC - # [*] --retry-connrefused works around the broken sf.net mirroring - # system when downloading corefonts - # [*] --read-timeout is useful on the adobe server that doesn't - # close the connection unless you tell it to (control-C or closing - # the socket) - try wget -O "$file" -nd -c --read-timeout=300 --retry-connrefused --header "Accept-Encoding: gzip,deflate" "$2" - else - # curl doesn't get filename from the location given by the server! - # fortunately, we know it - try curl -L -o "$file" -C - --header "Accept-Encoding: gzip,deflate" "$2" - fi - # Need to decompress .exe's that are compressed, else cygwin fails - # Only affects cygwin, so don't barf if 'file' not installed - FILE=`which file` - case $FILE-$file in - /*-*.exe) - case `file $file` in - *gzip*) mv $file $file.gz; gunzip < $file.gz > $file;; - esac - esac - - cd "$olddir" - fi - if [ "$3"x != ""x ] - then - verify_sha1sum $3 "$cache/$file" - fi -} - -set_winver() { - echo "Setting Windows version to $1" - cat > "$WINETRICKS_TMP"/set-winver.reg <<_EOF_ -REGEDIT4 - -[HKEY_CURRENT_USER\Software\Wine] -"Version"="$1" - -_EOF_ - try_regedit "$WINETRICKS_TMP"/set-winver.reg -} - -set_app_winver() { - app="$1" - version="$2" - echo "Setting $app to $version mode" - ( - echo REGEDIT4 - echo "" - echo "[HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\$app]" - echo "\"Version\"=\"$version\"" - ) > "$WINETRICKS_TMP"/set-winver.reg - - try_regedit "$WINETRICKS_TMP"/set-winver.reg - rm "$WINETRICKS_TMP"/set-winver.reg -} - -set_orm() { - echo "Setting OffscreenRenderingMode to $1" - cat > "$WINETRICKS_TMP"/set-orm.reg <<_EOF_ -REGEDIT4 - -[HKEY_CURRENT_USER\Software\Wine\Direct3D] -"OffscreenRenderingMode"="$1" - -_EOF_ - try_regedit "$WINETRICKS_TMP"/set-orm.reg -} - -set_sound_driver() { - echo "Setting sound driver to to $1" - cat > "$WINETRICKS_TMP"/set-sound.reg <<_EOF_ -REGEDIT4 - -[HKEY_CURRENT_USER\Software\Wine\Drivers] -"Audio"="$1" - -_EOF_ - try_regedit "$WINETRICKS_TMP"/set-sound.reg -} - -disable_crashdialog() { - echo "Disabling graphical crash dialog" - cat > "$WINETRICKS_TMP"/crashdialog.reg <<_EOF_ -REGEDIT4 - -[HKEY_CURRENT_USER\Software\Wine\WineDbg] -"ShowCrashDialog"=dword:00000000 - -_EOF_ - try_regedit "$WINETRICKS_TMP"/crashdialog.reg -} - -sandbox() { - # remove symlinks - try rm "$WINEPREFIX/drive_c/users/$USER/Desktop" - try rm "$WINEPREFIX/drive_c/users/$USER/My Documents" - try rm "$WINEPREFIX/drive_c/users/$USER/My Music" - try rm "$WINEPREFIX/drive_c/users/$USER/My Pictures" - try rm "$WINEPREFIX/drive_c/users/$USER/My Videos" - # create replacement directories - try mkdir "$WINEPREFIX/drive_c/users/$USER/Desktop" - try mkdir "$WINEPREFIX/drive_c/users/$USER/My Documents" - try mkdir "$WINEPREFIX/drive_c/users/$USER/My Music" - try mkdir "$WINEPREFIX/drive_c/users/$USER/My Pictures" - try mkdir "$WINEPREFIX/drive_c/users/$USER/My Videos" -} - -unset_winver() { - echo "Clearing Windows version back to default" - cat > "$WINETRICKS_TMP"/unset-winver.reg <<_EOF_ -REGEDIT4 - -[HKEY_CURRENT_USER\Software\Wine] -"Version"=- - -_EOF_ - try_regedit "$WINETRICKS_TMP"/unset-winver.reg -} - -override_dlls() { - mode=$1 - shift - echo Using $mode override for following DLLs: $@ - cat > "$WINETRICKS_TMP"/override-dll.reg <<_EOF_ -REGEDIT4 - -[HKEY_CURRENT_USER\Software\Wine\DllOverrides] -_EOF_ - while test "$1" != "" - do - case "$1" in - comctl32) - rm -rf "$WINDIR"/winsxs/manifests/x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef.manifest - ;; - esac - echo "\"$1\"=\"$mode\"" >> "$WINETRICKS_TMP"/override-dll.reg - shift - done - - try_regedit "$WINETRICKS_TMP"/override-dll.reg - rm "$WINETRICKS_TMP"/override-dll.reg -} - -override_app_dlls() { - app=$1 - shift - mode=$1 - shift - echo Using $mode override for following DLLs when running $app: $@ - ( - echo REGEDIT4 - echo "" - echo "[HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\$app\\DllOverrides]" - ) > "$WINETRICKS_TMP"/override-dll.reg - - while test "$1" != "" - do - case "$1" in - comctl32) - rm -rf "$WINDIR"/winsxs/manifests/x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef.manifest - ;; - esac - echo "\"$1\"=\"$mode\"" >> "$WINETRICKS_TMP"/override-dll.reg - shift - done - - try_regedit "$WINETRICKS_TMP"/override-dll.reg - rm "$WINETRICKS_TMP"/override-dll.reg -} - -register_font() { - file=$1 - shift - font=$1 - #echo "Registering $file as $font" - cat > "$WINETRICKS_TMP"/register-font.reg <<_EOF_ -REGEDIT4 - -[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Fonts] -"$font"="$file" -_EOF_ - # too verbose - try_regedit "$WINETRICKS_TMP"/register-font.reg -} - -append_path() { -# Get the %PATH% -WIN_PATH="`WINEDEBUG= $WINE cmd.exe /c echo "%PATH%"`" - -# Set the path. Make sure to not remove any other variables in %PATH% set by the user/other programs: - NEW_PATH="$1" - cat > "$WINETRICKS_TMP"/path.reg <<_EOF_ -REGEDIT4 - -[HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\Environment] -_EOF_ - - printf '"PATH"="' >>"$WINETRICKS_TMP"/path.reg - printf "$NEW_PATH;$WIN_PATH"'\"' | sed "s/\\\\/\\\\\\\\/g" >> "$WINETRICKS_TMP"/path.reg - - try_regedit "$WINETRICKS_TMP"/path.reg - rm -f "$WINETRICKS_TMP"/path.reg - -} -#----- common download for several verbs -helper_directx_dl() { - # Aug 2009 DirectX 9c User Redistributable - # http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=04ac064b-00d1-474e-b7b1-442d8712d553 - download . http://download.microsoft.com/download/B/7/9/B79FC9D7-47B8-48B7-A75E-101DEBEB5AB4/directx_aug2009_redist.exe 563b96a3d78d6038d10428f23954f083320b4019 - - DIRECTX_NAME=directx_aug2009_redist.exe -} - -#----- One function per package, in alphabetical order ---------- - -load_art2kmin() { - # See http://www.microsoft.com/downloads/details.aspx?familyid=d9ae78d9-9dc6-4b38-9fa6-2c745a175aed&displaylang=en - download . http://download.microsoft.com/download/D/2/A/D2A2FC8B-0447-491C-A5EF-E8AA3A74FB98/AccessRuntime.exe 571811b7536e97cf4e4e53bbf8260cddd69f9b2d - cd "$WINETRICKS_CACHE" - try $WINE AccessRuntime.exe $WINETRICKS_QUIET - cd "$olddir" -} - -#---------------------------------------------------------------- - -load_atmlib() { - # http://www.microsoft.com/downloads/details.aspx?FamilyID=1001AAF1-749F-49F4-8010-297BD6CA33A0&displaylang=en - # FIXME: This is a huge download for a single dll. - download . http://download.microsoft.com/download/E/6/A/E6A04295-D2A8-40D0-A0C5-241BFECD095E/W2KSP4_EN.EXE fadea6d94a014b039839fecc6e6a11c20afa4fa8 - cd "$WINETRICKS_TMP" - try cabextract "$WINETRICKS_CACHE"/W2KSP4_EN.EXE i386/atmlib.dl_ - try cp atmlib.dll "$WINDIR"/system32 - try rm -rf i386 - cd "$olddir" -} - -#---------------------------------------------------------------- - -load_autohotkey() { - download . http://www.autohotkey.net/programs/AutoHotkey104805_Install.exe 13e5a9ca6d5b7705f1cd02560c3af4d38b1904fc - try $WINE "$WINETRICKS_CACHE"/AutoHotkey104805_Install.exe $WINETRICKS_S -} - -#---------------------------------------------------------------- - -load_cc580() { - # http://www.microsoft.com/downloads/details.aspx?familyid=6f94d31a-d1e0-4658-a566-93af0d8d4a1e - download . http://download.microsoft.com/download/platformsdk/redist/5.80.2614.3600/w9xnt4/en-us/cc32inst.exe 94c3c494258cc54bd65d2f0153815737644bffde - - try $WINE "$WINETRICKS_CACHE"/cc32inst.exe "/T:$winetricks_tmp_win" /c $WINETRICKS_QUIET - try unzip -o $WINETRICKS_UNIXQUIET -d "$WINDIR"/temp "$WINETRICKS_TMP"/comctl32.exe - try $WINE "$WINDIR"/temp/x86/50ComUpd.Exe "/T:$winetricks_tmp_win" /c $WINETRICKS_QUIET - try cp "$WINETRICKS_TMP"/comcnt.dll "$WINDIR"/system32/comctl32.dll - - override_dlls native,builtin comctl32 - - # some builtin apps don't like native comctl32 - override_app_dlls winecfg.exe builtin comctl32 - override_app_dlls explorer.exe builtin comctl32 - override_app_dlls iexplore.exe builtin comctl32 -} - -#---------------------------------------------------------------- - -load_cmake() { - download . http://www.cmake.org/files/v2.6/cmake-2.6.4-win32-x86.exe 00bd502423546b8bce19ffc180ea78e0e2f396cf - try $WINE "$WINETRICKS_CACHE"/cmake-2.6.4-win32-x86.exe -} - -#---------------------------------------------------------------- - -load_comctl32ocx() { - # http://www.microsoft.com/downloads/details.aspx?FamilyID=25437D98-51D0-41C1-BB14-64662F5F62FE - download . http://download.microsoft.com/download/3/a/5/3a5925ac-e779-4b1c-bb01-af67dc2f96fc/VisualBasic6-KB896559-v1-ENU.exe f52cf2034488235b37a1da837d1c40eb2a1bad84 - - try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/VisualBasic6-KB896559-v1-ENU.exe - try cp "$WINETRICKS_TMP"/mscomctl.ocx "$WINDIR"/system32/mscomctl.ocx - try cp "$WINETRICKS_TMP"/comctl32.ocx "$WINDIR"/system32/comctl32.ocx - try $WINE regsvr32 comctl32.ocx - try $WINE regsvr32 mscomctl.ocx -} - -#---------------------------------------------------------------- - -load_colorprofile() { - download . http://download.microsoft.com/download/whistler/hwdev1/1.0/wxp/en-us/ColorProfile.exe 6b72836b32b343c82d0760dff5cb51c2f47170eb - try unzip -o $WINETRICKS_UNIXQUIET -d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/ColorProfile.exe - mkdir -p "$WINDIR"/system32/spool/drivers/color - try cp -f "$WINETRICKS_TMP/sRGB Color Space Profile.icm" "$WINDIR"/system32/spool/drivers/color -} - -#---------------------------------------------------------------- - -load_controlpad() { - # http://msdn.microsoft.com/en-us/library/ms968493.aspx - # Fixes error "Failed to load UniText..." - load_wsh56 - download . http://download.microsoft.com/download/activexcontrolpad/install/4.0.0.950/win98mexp/en-us/setuppad.exe 8921e0f52507ca6a373c94d222777c750fb48af7 - try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/setuppad.exe - echo "If setup says 'Unable to start DDE ...', press Ignore" - try $WINE "$WINETRICKS_TMP"/setup $WINETRICKS_QUIET_T -} - -#---------------------------------------------------------------- - -load_corefonts() { - # See http://corefonts.sf.net - # TODO: let user pick mirror, - # see http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec for how - # TODO: add more fonts - - # Added More Fonts (see msttcorefonts) - # [*] Pointed download locations to sites that actually contained the - # fonts to download (as of 04-03-2008) - #download . $SOURCEFORGE/corefonts/andale32.exe c4db8cbe42c566d12468f5fdad38c43721844c69 - download . $SOURCEFORGE/corefonts/arial32.exe 6d75f8436f39ab2da5c31ce651b7443b4ad2916e - download . $SOURCEFORGE/corefonts/arialb32.exe d45cdab84b7f4c1efd6d1b369f50ed0390e3d344 - download . $SOURCEFORGE/corefonts/comic32.exe 2371d0327683dcc5ec1684fe7c275a8de1ef9a51 - download . $SOURCEFORGE/corefonts/courie32.exe 06a745023c034f88b4135f5e294fece1a3c1b057 - download . $SOURCEFORGE/corefonts/georgi32.exe 90e4070cb356f1d811acb943080bf97e419a8f1e - download . $SOURCEFORGE/corefonts/impact32.exe 86b34d650cfbbe5d3512d49d2545f7509a55aad2 - download . $SOURCEFORGE/corefonts/times32.exe 20b79e65cdef4e2d7195f84da202499e3aa83060 - download . $SOURCEFORGE/corefonts/trebuc32.exe 50aab0988423efcc9cf21fac7d64d534d6d0a34a - download . $SOURCEFORGE/corefonts/verdan32.exe f5b93cedf500edc67502f116578123618c64a42a - download . $SOURCEFORGE/corefonts/webdin32.exe 2fb4a42c53e50bc70707a7b3c57baf62ba58398f - - # Natively installed versions of these fonts will cause the installers - # to exit silently. Because there are apps out there that depend on the - # files being present in the Windows font directory we use cabextract - # to obtain the files and register the fonts by hand. - - # Andale needs a FontSubstitutes entry - # try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/andale32.exe - - # Display EULA - test x"$WINETRICKS_QUIET" = x"" || try $WINE "$WINETRICKS_CACHE"/arial32.exe $WINETRICKS_QUIET - - try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/arial32.exe - try cp -f "$WINETRICKS_TMP"/Arial*.TTF "$winefontsdir" - register_font Arial.TTF "Arial (TrueType)" - register_font Arialbd.TTF "Arial Bold (TrueType)" - register_font Arialbi.TTF "Arial Bold Italic (TrueType)" - register_font Ariali.TTF "Arial Italic (TrueType)" - - try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/arialb32.exe - try cp -f "$WINETRICKS_TMP"/AriBlk.TTF "$winefontsdir" - register_font AriBlk.TTF "Arial Black (TrueType)" - - try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/comic32.exe - try cp -f "$WINETRICKS_TMP"/Comic*.TTF "$winefontsdir" - register_font Comic.TTF "Comic Sans MS (TrueType)" - register_font Comicbd.TTF "Comic Sans MS Bold (TrueType)" - - try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/courie32.exe - try cp -f "$WINETRICKS_TMP"/cour*.ttf "$winefontsdir" - register_font Cour.TTF "Courier New (TrueType)" - register_font CourBD.TTF "Courier New Bold (TrueType)" - register_font CourBI.TTF "Courier New Bold Italic (TrueType)" - register_font Couri.TTF "Courier New Italic (TrueType)" - - try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/georgi32.exe - try cp -f "$WINETRICKS_TMP"/Georgia*.TTF "$winefontsdir" - register_font Georgia.TTF "Georgia (TrueType)" - register_font Georgiab.TTF "Georgia Bold (TrueType)" - register_font Georgiaz.TTF "Georgia Bold Italic (TrueType)" - register_font Georgiai.TTF "Georgia Italic (TrueType)" - - try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/impact32.exe - try cp -f "$WINETRICKS_TMP"/Impact.TTF "$winefontsdir" - register_font Impact.TTF "Impact (TrueType)" - - try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/times32.exe - try cp -f "$WINETRICKS_TMP"/Times*.TTF "$winefontsdir" - register_font Times.TTF "Times New Roman (TrueType)" - register_font Timesbd.TTF "Times New Roman Bold (TrueType)" - register_font Timesbi.TTF "Times New Roman Bold Italic (TrueType)" - register_font Timesi.TTF "Times New Roman Italic (TrueType)" - - try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/trebuc32.exe - try cp -f "$WINETRICKS_TMP"/trebuc*.ttf "$winefontsdir" - register_font Trebuc.TTF "Trebucet MS (TrueType)" - register_font Trebucbd.TTF "Trebucet MS Bold (TrueType)" - register_font Trebucbi.TTF "Trebucet MS Bold Italic (TrueType)" - register_font Trebucit.TTF "Trebucet MS Italic (TrueType)" - - try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/verdan32.exe - try cp -f "$WINETRICKS_TMP"/Verdana*.TTF "$winefontsdir" - register_font Verdana.TTF "Verdana (TrueType)" - register_font Verdanab.TTF "Verdana Bold (TrueType)" - register_font Verdanaz.TTF "Verdana Bold Italic (TrueType)" - register_font Verdanai.TTF "Verdana Italic (TrueType)" - - try cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/webdin32.exe - try cp -f "$WINETRICKS_TMP"/Webdings.TTF "$winefontsdir" - register_font Webdings.TTF "Webdings (TrueType)" -} - -#---------------------------------------------------------------- - -load_cygwin() { - download cygwin http://cygwin.com/setup.exe 5cfb8ebe4f385b0fcffa04d22d607ec75ea05180 - mkdir -p "$DRIVE_C"/cygpkgs - cp "$WINETRICKS_CACHE/cygwin/setup.exe" "$DRIVE_C"/cygpkgs - cd "$DRIVE_C"/cygpkgs - try $WINE setup.exe - cd "$olddir" -} - -#---------------------------------------------------------------- - -load_d3dx9() { - helper_directx_dl - - # Kinder, less invasive directx - only extract and override d3dx9_??.dll - cabextract -d "$WINETRICKS_TMP" -L -F '*d3dx9*x86*' "$WINETRICKS_CACHE"/$DIRECTX_NAME - for x in `ls "$WINETRICKS_TMP"/*.cab` - do - cabextract -d "$WINDIR"/system32 -L -F '*.dll' "$x" - done - - # For now, not needed, but when Wine starts preferring our builtin dll over native it will be. - override_dlls native d3dx9_24 d3dx9_25 d3dx9_26 d3dx9_27 d3dx9_28 d3dx9_29 d3dx9_30 - override_dlls native d3dx9_31 d3dx9_32 d3dx9_33 d3dx9_34 d3dx9_35 d3dx9_36 d3dx9_37 - override_dlls native d3dx9_38 d3dx9_39 d3dx9_40 d3dx9_41 d3dx9_42 -} - -#---------------------------------------------------------------- -load_dinput8() { - helper_directx_dl - - cabextract -d "$WINETRICKS_TMP" -L -F 'dxnt.cab' "$WINETRICKS_CACHE"/$DIRECTX_NAME - cabextract -d "$WINDIR"/system32 -L -F 'dinput8.dll' "$WINETRICKS_TMP/dxnt.cab" - - try $WINE regsvr32 dinput8 - - override_dlls native dinput8 -} - -#---------------------------------------------------------------- - -load_dirac08() { - download . http://codecpack.nl/dirac_dsfilter_080.exe aacfcddf6b2636de5f0a50422ba9155e395318af - try $WINE "$WINETRICKS_CACHE"/dirac_dsfilter_080.exe $WINETRICKS_SILENT -} - -#---------------------------------------------------------------- - -load_directplay() { - helper_directx_dl - - cabextract -d "$WINETRICKS_TMP" -L -F dxnt.cab "$WINETRICKS_CACHE"/$DIRECTX_NAME - cabextract -d "$WINDIR"/system32 -L -F 'dplaysvr.exe' "$WINETRICKS_TMP/dxnt.cab" - cabextract -d "$WINDIR"/system32 -L -F 'dplayx.dll' "$WINETRICKS_TMP/dxnt.cab" - cabextract -d "$WINDIR"/system32 -L -F 'dpnet.dll' "$WINETRICKS_TMP/dxnt.cab" - cabextract -d "$WINDIR"/system32 -L -F 'dpnhpast.dll' "$WINETRICKS_TMP/dxnt.cab" - cabextract -d "$WINDIR"/system32 -L -F 'dpwsockx.dll' "$WINETRICKS_TMP/dxnt.cab" - - try $WINE regsvr32 dplayx.dll - try $WINE regsvr32 dpnet.dll - try $WINE regsvr32 dpnhpast.dll - - override_dlls native dplayx dpnet dpnhpast dpwsockx -} - -#---------------------------------------------------------------- - -load_directx9() { - helper_directx_dl - - # Stefan suggested that, when installing, one should override as follows: - # 1) use builtin wintrust (we don't run native properly somehow?) - # 2) disable mscoree (else if it's present some module misbehaves?) - # 3) override native any directx DLL whose Wine version doesn't register itself well yet - # For #3, I have no idea which DLLs don't register themselves well yet, - # so I'm just listing a few of the basic ones. Let's whittle that - # list down as soon as we can. - echo "You probably shouldn't be using this. It's VERY invasive." - echo "Use 'winetricks d3dx9' instead." - set_winver win2k - WINEDLLOVERRIDES="wintrust=b,mscoree=,ddraw,d3d8,d3d9,dsound,dinput=n" \ - try $WINE "$WINETRICKS_CACHE"/$DIRECTX_NAME /t:"$WINETRICKS_TMP_WIN" $WINETRICKS_QUIET - - # How many of these do we really need? - # We should probably remove most of these...? - override_dlls native d3dim d3drm d3dx8 d3dx9_24 d3dx9_25 d3dx9_26 d3dx9_27 d3dx9_28 d3dx9_29 - override_dlls native d3dx9_30 d3dx9_31 d3dx9_32 d3dx9_33 d3dx9_34 d3dx9_35 d3dx9_36 d3dx9_37 - override_dlls native d3dx9_38 d3dx9_39 d3dx9_40 d3dx9_41 d3dx9_42 d3dxof - override_dlls native dciman32 ddrawex devenum dmband dmcompos dmime dmloader dmscript dmstyle - override_dlls native dmsynth dmusic dmusic32 dnsapi dplay dplayx dpnaddr dpnet dpnhpast dpnlobby - override_dlls native dswave dxdiagn mscoree msdmo qcap quartz streamci - override_dlls builtin d3d8 d3d9 dinput dinput8 dsound - - # Should be below, but fails on Wine when used silently. - #if [ $WINETRICKS_QUIET ] - #then - # try $WINE "$WINETRICKS_TMP_WIN"/DXSETUP.exe /silent - #else - # try $WINE "$WINETRICKS_TMP_WIN"/DXSETUP.exe - #fi - - try $WINE "$WINETRICKS_TMP_WIN"/DXSETUP.exe - - unset_winver -} - -#---------------------------------------------------------------- - -load_divx() { - # 6.8.2: 02203fdc4dddd13e789c39b22902837da31d2a1d ? - # 6.8.2: e36bf87c1675d0cf9169839bc0cd8f866b9db026 as of 4 Jun 2008 as http://download.divx.com/divx/DivXInstaller.exe - # 6.8.3: f4f4387ef89316aea440a29f3e24c1f1945e14af as of 20 Jun 2008 as http://download.divx.com/divx/abt/b1/DivXInstaller.exe - # 6.8.4: c5fcb1465a1bb24d1c104c2588fdb6706d1e1476 as of 10 Jul 2008 as http://download.divx.com/divx/abt/b1/DivXInstaller.exe - # 6.8.4: d28a2b041f4af45d22c4dedfe7608f2958cf997d as of 23 Aug 2008 as http://download.divx.com/divx/DivXInstaller.exe - - # 7.? 4d91ef90ae26a6088851560c4263ef0cdbf09123 as of 22 Mar 2009 as http://download.divx.com/divx/DivXInstaller.exe - # 7.0.? 19c9ba3104025d1fab335e405e7f411dfbbcb477 as of 28 May 2009 as http://download.divx.com/divx/DivXInstaller.exe - # 7.0.? 786aef0f421df5e7358d2d740d9911f9afd055de as of 24 June 2009 as http://download.divx.com/divx/DivXInstaller.exe - # 7.0.? ad420bf8bf72e924e658c9c6ad6bba76b848fb79 as of 23 Sep 2009 as http://download.divx.com/divx/DivXInstaller.exe - # 7.0.? 3385aa8f6ba64ae32e06f651bbbea247bcc1a44d as of 12 Dec 2009 as http://download.divx.com/divx/DivXInstaller.exe - - download divx-7 http://download.divx.com/divx/DivXInstaller.exe 3385aa8f6ba64ae32e06f651bbbea247bcc1a44d - - try $WINE "$WINETRICKS_CACHE"/divx-7/DivXInstaller -} - -#---------------------------------------------------------------- - -load_dcom98() { - # Install native dcom per http://wiki.winehq.org/NativeDcom - # to avoid http://bugs.winehq.org/show_bug.cgi?id=4228 - # See http://www.microsoft.com/downloads/details.aspx?familyid=08b1ac1b-7a11-43e8-b59d-0867f9bdda66 - download . http://download.microsoft.com/download/d/1/3/d13cd456-f0cf-4fb2-a17f-20afc79f8a51/DCOM98.EXE aff002bd03f17340b2bef2e6b9ea8e3798e9ccc1 - - # Pick win98 so we can install native dcom - set_winver win98 - - # Avoid "err:setupapi:SetupDefaultQueueCallbackA copy error 5 ..." - # Those messages are suspect, probably shouldn't be err's. - rm -f "$WINDIR"/system32/ole32.dll - rm -f "$WINDIR"/system32/olepro32.dll - rm -f "$WINDIR"/system32/oleaut32.dll - rm -f "$WINDIR"/system32/rpcrt4.dll - - # Normally only need to override ole32, but overriding advpack - # as well gets us the correct exit status. - WINEDLLOVERRIDES="ole32,advpack=n" try $WINE "$WINETRICKS_CACHE"/DCOM98.EXE $WINETRICKS_QUIET - - # Set native DCOM by default for all apps (ok, this might be overkill) - override_dlls native,builtin ole32 oleaut32 rpcrt4 - - # but not for a few builtin apps that don't like it - override_app_dlls explorer.exe builtin ole32 oleaut32 rpcrt4 - override_app_dlls iexplore.exe builtin ole32 oleaut32 rpcrt4 - override_app_dlls services.exe builtin ole32 oleaut32 rpcrt4 - override_app_dlls wineboot.exe builtin ole32 oleaut32 rpcrt4 - override_app_dlls winedevice.exe builtin ole32 oleaut32 rpcrt4 - - # and undo version win98 - unset_winver -} - -#---------------------------------------------------------------- - -load_dotnet11() { - DOTNET_INSTALL_DIR="$WINDIR/Microsoft.NET/Framework/v1.1.4322" - - # If this is just a dependency check, don't re-install - if test $PACKAGE != dotnet11 && test -d "$DOTNET_INSTALL_DIR" - then - echo "prerequisite dotnet11 already installed, skipping" - return - fi - - # need corefonts, else installer crashes - load_corefonts - - # http://www.microsoft.com/downloads/details.aspx?FamilyId=262D25E3-F589-4842-8157-034D1E7CF3A3 - download dotnet11 http://download.microsoft.com/download/a/a/c/aac39226-8825-44ce-90e3-bf8203e74006/dotnetfx.exe 16a354a2207c4c8846b617cbc78f7b7c1856340e - if [ $WINETRICKS_QUIET ] - then - try $WINE "$WINETRICKS_CACHE"/dotnet11/dotnetfx.exe /q /C:"install /q" - else - try $WINE "$WINETRICKS_CACHE"/dotnet11/dotnetfx.exe - fi -} - -#---------------------------------------------------------------- - -load_dotnet11sdk() { - load_dotnet11 - - warn "Installer hangs at end... not sure if it works fully." - # http://www.microsoft.com/downloads/details.aspx?familyid=9B3A2CA6-3647-4070-9F41-A333C6B9181D - download dotnet11sdk http://download.microsoft.com/download/5/2/0/5202f918-306e-426d-9637-d7ee26fbe507/setup.exe 9509b14924bcaf84a7780de3f6ad7894004c3450 - cd "$WINETRICKS_CACHE"/dotnet11sdk - try $WINE setup.exe - cd "$olddir" -} - -#---------------------------------------------------------------- - -load_dotnet20() { - # If this is just a dependency check, don't re-install - if test $PACKAGE != dotnet20 && test -f "$WINDIR"/system32/l_intl.nls - then - echo "prerequisite dotnet20 already installed, skipping" - return - fi - warn "Instaling .net 2.0 runtime. Can take several minutes. See http://wiki.winehq.org/MicrosoftDotNet for tips." - - # Recipe from http://bugs.winehq.org/show_bug.cgi?id=10467#c57 - test -d "$WINDIR/gecko" || test -d "$WINDIR/system32/gecko" || load_gecko - set_winver win2k - # See http://kegel.com/wine/l_intl-sh.txt for how l_intl.nls was generated - download dotnet20 http://kegel.com/wine/l_intl.nls 0d2e3f025bcdf852b192c9408a361ac2659fa249 - try cp -f "$WINETRICKS_CACHE"/dotnet20/l_intl.nls "$WINDIR/system32/" - - # http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5 - download dotnet20 http://download.microsoft.com/download/5/6/7/567758a3-759e-473e-bf8f-52154438565a/dotnetfx.exe a3625c59d7a2995fb60877b5f5324892a1693b2a - if [ "$WINETRICKS_QUIET"x = ""x ] - then - try $WINE "$WINETRICKS_CACHE"/dotnet20/dotnetfx.exe - else - try $WINE "$WINETRICKS_CACHE"/dotnet20/dotnetfx.exe /q /c:"install.exe /q" - fi - unset_winver -} -#---------------------------------------------------------------- - -load_dotnet20sp2() { - warn "Instaling .net 2.0 runtime. Can take several minutes. See http://wiki.winehq.org/MicrosoftDotNet for tips." - - # Recipe from http://bugs.winehq.org/show_bug.cgi?id=10467#c57 - test -d "$WINDIR/gecko" || test -d "$WINDIR/system32/gecko" || load_gecko - #set_winver win2k - # See http://kegel.com/wine/l_intl-sh.txt for how l_intl.nls was generated - download dotnet20 http://kegel.com/wine/l_intl.nls 0d2e3f025bcdf852b192c9408a361ac2659fa249 - try cp -f "$WINETRICKS_CACHE"/dotnet20/l_intl.nls "$WINDIR/system32/" - - # http://www.microsoft.com/downloads/details.aspx?familyid=5B2C0358-915B-4EB5-9B1D-10E506DA9D0F - download dotnet20 http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe 22d776d4d204863105a5db99e8b8888be23c61a7 - if [ "$WINETRICKS_QUIET"x = ""x ] - then - try $WINE "$WINETRICKS_CACHE"/dotnet20/NetFx20SP2_x86.exe - else - try $WINE "$WINETRICKS_CACHE"/dotnet20/NetFx20SP2_x86.exe /q /c:"install.exe /q" - fi - unset_winver -} - -#---------------------------------------------------------------- - -load_dotnet20sdk() { - load_dotnet20 - - # http://www.microsoft.com/downloads/details.aspx?familyid=9B3A2CA6-3647-4070-9F41-A333C6B9181D - download dotnet20sdk http://download.microsoft.com/download/c/4/b/c4b15d7d-6f37-4d5a-b9c6-8f07e7d46635/setup.exe 4e4b1072b5e65e855358e2028403f2dc52a62ab4 - cd "$WINETRICKS_CACHE"/dotnet20sdk - try $WINE setup.exe - cd "$olddir" -} - -#---------------------------------------------------------------- - -load_dotnet30() { - # If this is just a dependency check, don't re-install - if test $PACKAGE != dotnet30 && test -d "$WINDIR/Microsoft.NET/Framework/v3.0/Microsoft .NET Framework 3.0" - then - echo "prerequisite dotnet30 already installed, skipping" - return - fi - - warn "Instaling .net 3.0 runtime. Can take 15-30 minutes. See http://wiki.winehq.org/MicrosoftDotNet for tips." - load_dotnet20 - - # http://msdn.microsoft.com/en-us/netframework/bb264589.aspx - download dotnet30 http://download.microsoft.com/download/3/F/0/3F0A922C-F239-4B9B-9CB0-DF53621C57D9/dotnetfx3.exe f3d2c3c7e4c0c35450cf6dab1f9f2e9e7ff50039 - - export _SFX_CAB_SHUTDOWN_REQUEST=1 - if [ "$WINETRICKS_QUIET"x = ""x ] - then - try $WINE "$WINETRICKS_CACHE"/dotnet30/dotnetfx3.exe - else - try $WINE "$WINETRICKS_CACHE"/dotnet30/dotnetfx3.exe /q /c:"install.exe /q" - fi -} - -#---------------------------------------------------------------- - -load_dotnet35() { - warn "This does not work yet" - - # According to AF's recipe, installing dotnet30 first works around msi bugs - load_dotnet30 - - # http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6 - download dotnet35 http://download.microsoft.com/download/6/0/f/60fc5854-3cb8-4892-b6db-bd4f42510f28/dotnetfx35.exe - - if [ "$WINETRICKS_QUIET"x = ""x ] - then - try $WINE "$WINETRICKS_CACHE"/dotnet35/dotnetfx35.exe - else - try $WINE "$WINETRICKS_CACHE"/dotnet35/dotnetfx35.exe /q /c:"install.exe /q" - fi -} - -#---------------------------------------------------------------- - -do_droid() { - download . ${DROID_URL}$1';hb=HEAD' $3 $1 - try cp -f "$WINETRICKS_CACHE"/$1 "$winefontsdir" - register_font $1 "$2" -} - -load_droid() { - # See http://en.wikipedia.org/wiki/Droid_(font) - DROID_URL='http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_plain;f=data/fonts/' - - do_droid DroidSans-Bold.ttf "Droid Sans Bold" ada4e79c592f3c54546b7587b48f2b232d95ce2f - do_droid DroidSansFallback.ttf "Droid Sans Fallback" 2f8a266389a8e22f68f402b775731eec6b760334 - do_droid DroidSansJapanese.ttf "Droid Sans Japanese" b3a248c11692aa88a30eb25df425b8910fe05dc5 - do_droid DroidSansMono.ttf "Droid Sans Mono" f0815c6f36c72be1d0f2f5e2b82fa85c8bf95655 - do_droid DroidSans.ttf "Droid Sans" da5b3c7758a2c8fbc4775beb69d7150493c7d312 - do_droid DroidSerif-BoldItalic.ttf "Droid Serif Bold Italic" c1602dc11bf0f7131aec21c7c3888195ad78e486 - do_droid DroidSerif-Bold.ttf "Droid Serif Bold" d7896b9c0723299553e95a00d27cbe52f7515c8c - do_droid DroidSerif-Italic.ttf "Droid Serif Italic" 117941be102c8f38a86a70ebccaecb8078f7027e - do_droid DroidSerif-Regular.ttf "Droid Serif" 7f243858e496ed1bb1faca9f3a7bbe52defcbb5d -} - -#---------------------------------------------------------------- - -# Fake IE per workaround in http://bugs.winehq.org/show_bug.cgi?id=3453 -# Just the first registry key works for most apps. -# The App Paths part is required by a few apps, like Quickbooks Pro; -# see http://windowsxp.mvps.org/ie/qbooks.htm -set_fakeie6() { - - cat > "$WINETRICKS_TMP"/fakeie6.reg <<"_EOF_" -REGEDIT4 - -[HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer] -"Version"="6.0.2900.2180" - -[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE] -_EOF_ - - echo -n '@="' >>"$WINETRICKS_TMP"/fakeie6.reg - echo -n "${programfilesdir_win}" | sed "s/\\\\/\\\\\\\\/" >>"$WINETRICKS_TMP"/fakeie6.reg - echo '\\\\Internet Explorer\\\\iexplore.exe"' >>"$WINETRICKS_TMP"/fakeie6.reg - - echo -n '"PATH"="' >>"$WINETRICKS_TMP"/fakeie6.reg - echo -n "${programfilesdir_win}" | sed "s/\\\\/\\\\\\\\/" >>"$WINETRICKS_TMP"/fakeie6.reg - echo '\\\\Internet Explorer"' >>"$WINETRICKS_TMP"/fakeie6.reg - - try_regedit "$WINETRICKS_TMP"/fakeie6.reg - - # On old wineprefixes iexplore.exe is not created. Create a fake dll using - # shdocvw.dll that should have similar VERSIONINFO. - if [ ! -f "$programfilesdir_unix/Internet Explorer/iexplore.exe" ] - then - echo "You have an old wineprefix without iexplore.exe. Will create a fake now" - if [ ! -d "$programfilesdir_unix/Internet Explorer/iexplore.exe" ] - then - try mkdir "$programfilesdir_unix/Internet Explorer"; - fi - try cp -f "$WINDIR/system32/shdocvw.dll" "$programfilesdir_unix/Internet Explorer/iexplore.exe" - fi -} - -#---------------------------------------------------------------- - -load_firefox() { - download . "http://releases.mozilla.org//pub/mozilla.org/firefox/releases/3.5.5/win32/en-US/Firefox%20Setup%203.5.5.exe" 39126be271b28ef50c48e3acbe52ee83bbf31066 "Firefox Setup 3.5.5.exe" - if [ "$WINETRICKS_QUIET"x = ""x ] - then - try $WINE "$WINETRICKS_CACHE"/"Firefox Setup 3.5.5.exe" - else - try $WINE "$WINETRICKS_CACHE"/"Firefox Setup 3.5.5.exe" -ms - fi -} - -#---------------------------------------------------------------- - -load_ffdshow() { - # ffdshow - download . $SOURCEFORGE/ffdshow-tryout/ffdshow_beta5_rev2033_20080705_clsid.exe 6da6837e2f400923ff5294a6591a88a3eee5ee40 - try $WINE "$WINETRICKS_CACHE"/ffdshow_beta5_rev2033_20080705_clsid.exe $WINETRICKS_SILENT -} - -#---------------------------------------------------------------- - -load_flash() { - # www.adobe.com/products/flashplayer/ - - # Active X plugin - # http://blogs.adobe.com/psirt/2008/03/preparing_for_april_flash_play.html - # http://fpdownload.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_active_x.msi - # 2008-04-01: old version sha1sum f4dd1c0c715b791db2c972aeba90d3b78372996a - # 2008-04-18: new version sha1sum 04ac79c4f1eb1e1ca689f27fa71f12bb5cd11cc2 - # Version 10 http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_ax.exe - # 2008-11-27: 10 sha1sum 7f6850ae815e953311bb94a8aa9d226f97a646dd - # 2009-02-27: sha1sum 86745020a25edc9695a1a6a4d59eae375665a0b3 - # 2009-07-31: sha1sum 11a81ad1b19344c28b1e1249169f15dfbd2a04f5 - # 2009-12-09: sha1sum f4ec0e95099e354fd01cd3bb27c202f54932dc70 - - download . http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_ax.exe f4ec0e95099e354fd01cd3bb27c202f54932dc70 - try $WINE "$WINETRICKS_CACHE"/install_flash_player_ax.exe $WINETRICKS_S - - # Mozilla / Firefox plugin - # 2008-07-22: sha1sum 1e6f7627784a5b791e99ae9ad63133dc11c7940b - # 2008-11-27: sha1sum 20ec0300a8cae19105c903a7ec6c0801e016beb0 - # 2009-02-27: sha1sum 770db9ad471ffd4357358bc16ff0bb6c98d71e5d - # 2009-07-31: sha1sum 9590fb87cc33d3a3a1f2f42a1918f06b9f0fd88d - # 2009-12-09: sha1sum ccb4811b1cc26721c4abb2e5a080868acdee7b87 - - download . http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player.exe ccb4811b1cc26721c4abb2e5a080868acdee7b87 - try $WINE "$WINETRICKS_CACHE"/install_flash_player.exe $WINETRICKS_S -} - -#---------------------------------------------------------------- - -load_fontfix() { - # some versions of ukai.ttf and uming.ttf crash .net and picasa - # See http://bugs.winehq.org/show_bug.cgi?id=7098#c9 - # Could fix globally, but that needs root, so just fix for wine - if test -f /usr/share/fonts/truetype/arphic/ukai.ttf - then - gotsum=`$SHA1SUM < /usr/share/fonts/truetype/arphic/ukai.ttf | sed 's/ .*//'` - # FIXME: do all affected versions of the font have same sha1sum as Gutsy? Seems unlikely. - if [ "$gotsum"x = "96e1121f89953e5169d3e2e7811569148f573985"x ] - then - download . https://launchpadlibrarian.net/1499628/ttf-arphic-ukai_0.1.20060108.orig.tar.gz 92e577602d71454a108968e79ab667451f3602a2 - cd "$WINETRICKS_TMP/" - gunzip -dc "$WINETRICKS_CACHE/ttf-arphic-ukai_0.1.20060108.orig.tar.gz" | tar -xf - - try mv ttf-arphic-ukai-0.1.20060108/*.ttf "$winefontsdir" - cd "$olddir" - fi - fi - - if test -f /usr/share/fonts/truetype/arphic/uming.ttf - then - gotsum=`$SHA1SUM < /usr/share/fonts/truetype/arphic/uming.ttf | sed 's/ .*//'` - if [ "$gotsum"x = "2a4f4a69e343c21c24d044b2cb19fd4f0decc82c"x ] - then - download . https://launchpadlibrarian.net/1564410/ttf-arphic-uming_0.1.20060108.orig.tar.gz 1439cdd731906e9e5311f320c2cb33262b24ef91 - cd "$WINETRICKS_TMP/" - gunzip -dc "$WINETRICKS_CACHE/ttf-arphic-uming_0.1.20060108.orig.tar.gz" | tar -xf - - try mv ttf-arphic-uming-0.1.20060108/*.ttf "$winefontsdir" - cd "$olddir" - fi - fi - - # Focht says Samyak is bad news, and font substitution isn't a good workaround. - if xlsfonts | grep -i samyak - then - warn "Please uninstall the Samyak font. It has been known to cause problems." - fi -} - -#---------------------------------------------------------------- -load_fs_disable() { - cat > "$WINETRICKS_TMP"/fs_disable.reg <<_EOF_ -REGEDIT4 - -[HKEY_CURRENT_USER\Control Panel\Desktop] -"FontSmoothing"="0" -"FontSmoothingGamma"=dword:00000578 -"FontSmoothingOrientation"=dword:00000001 -"FontSmoothingType"=dword:00000000 - -_EOF_ - try_regedit "$WINETRICKS_TMP"/fs_disable.reg -} -#---------------------------------------------------------------- -load_fs_grayscale() { - cat > "$WINETRICKS_TMP"/fs_grayscale.reg <<_EOF_ - -REGEDIT4 - -[HKEY_CURRENT_USER\Control Panel\Desktop] -"FontSmoothing"="2" -"FontSmoothingGamma"=dword:00000578 -"FontSmoothingOrientation"=dword:00000001 -"FontSmoothingType"=dword:00000001 - -_EOF_ - try_regedit "$WINETRICKS_TMP"/fs_grayscale.reg -} -#---------------------------------------------------------------- -load_fs_bgr() { - cat > "$WINETRICKS_TMP"/fs_bgr.reg <<_EOF_ - -REGEDIT4 - -[HKEY_CURRENT_USER\Control Panel\Desktop] -"FontSmoothing"="2" -"FontSmoothingGamma"=dword:00000578 -"FontSmoothingOrientation"=dword:00000000 -"FontSmoothingType"=dword:00000002 - -_EOF_ - try_regedit "$WINETRICKS_TMP"/fs_bgr.reg -} -#---------------------------------------------------------------- -load_fs_rgb() { - cat > "$WINETRICKS_TMP"/fs_rgb.reg <<_EOF_ - -REGEDIT4 - -[HKEY_CURRENT_USER\Control Panel\Desktop] -"FontSmoothing"="2" -"FontSmoothingGamma"=dword:00000578 -"FontSmoothingOrientation"=dword:00000001 -"FontSmoothingType"=dword:00000002 - -_EOF_ - try_regedit "$WINETRICKS_TMP"/fs_rgb.reg -} -#---------------------------------------------------------------- - -load_gecko() { - # Load the HTML rendering Engine (Gecko) - # FIXME: shouldn't this code be in some script installed - # as part of Wine instead of in winetricks? - # (e.g. we hardcode gecko's url here, but it's normally - # only hardcoded in wine.inf, and fetched from the registry thereafter, - # so we're adding a maintenance burden here.) - case `$WINE --version` in - wine-0*|wine-1.0*|wine-1.1|wine-1.1.?|wine-1.1.11) - GECKO_DIR="$WINDIR" - GECKO_VERSION=0.1.0 - GECKO_SHA1SUM=c16f1072dc6b0ced20935662138dcf019a38cd56 - ;; - wine-1.1.1[234]*) - GECKO_DIR="$WINDIR" - GECKO_VERSION=0.9.0 - GECKO_SHA1SUM=5cf410ff7fdd3f9d625f481f9d409968728d3d09 - ;; - wine-1.1.1[56789]*|wine-1.1.2[0123456]*) - GECKO_DIR="$WINDIR" - GECKO_VERSION=0.9.1 - GECKO_SHA1SUM=9a49fc691740596517e381b47096a4bdf19a87d8 - ;; - *) - GECKO_DIR="$WINDIR/system32" - GECKO_VERSION=1.0.0 - GECKO_ARCH=-x86 - GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01 - ;; - esac - - if test ! -f "$WINETRICKS_CACHE"/wine_gecko-$GECKO_VERSION$GECKO_ARCH.cab - then - # FIXME: busted if using curl! - download . "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH.cab" \ - $GECKO_SHA1SUM wine_gecko-$GECKO_VERSION$GECKO_ARCH.cab - fi - - cat > "$WINETRICKS_TMP"/geckopath.reg <<_EOF_ -REGEDIT4 - -[HKEY_CURRENT_USER\\Software\\Wine\\MSHTML\\$GECKO_VERSION] -_EOF_ - - printf '"GeckoPath"="' >>"$WINETRICKS_TMP"/geckopath.reg - case $GECKO_VERSION in - 0.*) - printf 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' | - sed "s/\\\\/\\\\\\\\/g" >> "$WINETRICKS_TMP"/geckopath.reg - ;; - 1.*) - printf 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' | - sed "s/\\\\/\\\\\\\\/g" >> "$WINETRICKS_TMP"/geckopath.reg - ;; - esac - - # extract the files - mkdir -p "$GECKO_DIR/gecko/$GECKO_VERSION" - cd "$GECKO_DIR/gecko/$GECKO_VERSION" - try cabextract $WINETRICKS_UNIXQUIET "$WINETRICKS_CACHE"/wine_gecko-$GECKO_VERSION$GECKO_ARCH.cab - cd "$olddir" - - # set install-path - try_regedit "$WINETRICKS_TMP"/geckopath.reg - - # register the dll, since it was disabled before - try $WINE regsvr32 mshtml -} - -#---------------------------------------------------------------- - -load_gecko_dbg() { - # Load the HTML rendering Engine (Gecko), with debugging symbols - # FIXME: shouldn't this code be in some script installed - # as part of Wine instead of in winetricks? - # (e.g. we hardcode gecko's url here, but it's normally - # only hardcoded in wine.inf, and fetched from the registry thereafter, - # so we're adding a maintenance burden here.) - case `$WINE --version` in - wine-0*|wine-1.0*|wine-1.1|wine-1.1.?|wine-1.1.11) - die "There isn't a gecko debug build for your Wine version." - ;; - wine-1.1.1[234]*) - GECKO_DIR="$WINDIR" - GECKO_VERSION=0.9.0 - GECKO_SHA1SUM=23e354a82d7b7e61a6abe0384cc44669fbf92f86 - ;; - wine-1.1.1[56789]*|wine-1.1.2[0123456]*) - GECKO_DIR="$WINDIR" - GECKO_VERSION=0.9.1 - GECKO_SHA1SUM=a9b58d3330f8c78524fe4683f348302bfce96ff4 - ;; - *) - GECKO_DIR="$WINDIR/system32" - GECKO_VERSION=1.0.0 - GECKO_ARCH=-x86 - GECKO_SHA1SUM=2de16b443826295f646cd5d54313ca421fd71210 - ;; - esac - - if test ! -f "$WINETRICKS_CACHE"/wine_gecko-$GECKO_VERSION$GECKO_ARCH-dbg.cab - then - # FIXME: busted if using curl! - download . "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH-dbg.cab" $GECKO_SHA1SUM wine_gecko-$GECKO_VERSION$GECKO_ARCH-dbg.cab - fi - - cat > "$WINETRICKS_TMP"/geckopath.reg <<_EOF_ -REGEDIT4 - -[HKEY_CURRENT_USER\\Software\\Wine\\MSHTML\\$GECKO_VERSION] -_EOF_ - - printf '"GeckoPath"="' >>"$WINETRICKS_TMP"/geckopath.reg - if [ ! "$GECKO_VERSION" = "1.0.0" ] - then - printf 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' | sed "s/\\\\/\\\\\\\\/g" >>"$WINETRICKS_TMP"/geckopath.reg - else - printf 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' | sed "s/\\\\/\\\\\\\\/g" >>"$WINETRICKS_TMP"/geckopath.reg - fi - - # extract the files - mkdir -p "$GECKO_DIR/gecko/$GECKO_VERSION" - cd "$GECKO_DIR/gecko/$GECKO_VERSION" - try cabextract $WINETRICKS_UNIXQUIET "$WINETRICKS_CACHE"/wine_gecko-$GECKO_VERSION$GECKO_ARCH-dbg.cab - cd "$olddir" - - # set install-path - try_regedit "$WINETRICKS_TMP"/geckopath.reg - - # register the dll, since it was disabled before - try $WINE regsvr32 mshtml -} - -#---------------------------------------------------------------- - -load_gdiplus() { - # http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en - download . http://download.microsoft.com/download/a/b/c/abc45517-97a0-4cee-a362-1957be2f24e1/WindowsXP-KB975337-x86-ENU.exe b9a84bc3de92863bba1f5eb1d598446567fbc646 - try $WINE "$WINETRICKS_CACHE"/WindowsXP-KB975337-x86-ENU.exe /extract:$WINETRICKS_TMP_WIN $WINETRICKS_QUIET - # And then make it globally available. - try cp "$WINETRICKS_TMP/asms/10/msft/windows/gdiplus/gdiplus.dll" "$WINDIR"/system32/ - - # For some reason, native,builtin isn't good enough...? - override_dlls native gdiplus -} - -#---------------------------------------------------------------- - -load_glsl_disable() { - echo "Disabling GLSL" - cat > "$WINETRICKS_TMP"/disableglsl.reg <<_EOF_ -REGEDIT4 - -[HKEY_CURRENT_USER\Software\Wine\Direct3D] -"UseGLSL"="disabled" - -_EOF_ - try_regedit "$WINETRICKS_TMP"/disableglsl.reg -} - -#---------------------------------------------------------------- - -load_glsl_enable() { - echo "Enabling GLSL" - cat > "$WINETRICKS_TMP"/enableglsl.reg <<_EOF_ -REGEDIT4 - -[HKEY_CURRENT_USER\Software\Wine\Direct3D] -"UseGLSL"="enabled" - -_EOF_ - try_regedit "$WINETRICKS_TMP"/enableglsl.reg -} - -#---------------------------------------------------------------- - -load_hosts() { - # Create fake system32\drivers\etc\hosts and system32\drivers\etc\services files. - # The hosts file is used to map network names to IP addresses without DNS. - # The services file is used map service names to network ports. - # Some apps depend on these files, but they're not implemented in wine. - # Fortunately, empty files in the correct location satisfy those apps. - # See http://bugs.winehq.org/show_bug.cgi?id=12076 - mkdir -p "$WINDIR"/system32/drivers/etc - touch "$WINDIR"/system32/drivers/etc/hosts - touch "$WINDIR"/system32/drivers/etc/services -} - -#---------------------------------------------------------------- - -set_heapcheck() { - cat > "$WINETRICKS_TMP"/heapcheck.reg <<_EOF_ -REGEDIT4 - -[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager] -"GlobalFlag"=dword:00200030 - -_EOF_ - try_regedit "$WINETRICKS_TMP"/heapcheck.reg -} - -#---------------------------------------------------------------- - -load_icodecs() { - # http://downloadcenter.intel.com/Detail_Desc.aspx?strState=LIVE&ProductID=355&DwnldID=2846 - download . http://downloadmirror.intel.com/2846/eng/codinstl.exe 2c5d64f472abe3f601ce352dcca75b4f02996f8a - try $WINE "$WINETRICKS_CACHE"/codinstl.exe - # Work around bug in codec's installer? - # http://support.britannica.com/other/touchthesky/win/issues/TSTUw_150.htm - # http://appdb.winehq.org/objectManager.php?sClass=version&iId=7091 - try $WINE regsvr32 ir50_32.dll -} - -#---------------------------------------------------------------- -load_ie6() { - load_msls31 - - # Unregister Wine IE - try $WINE iexplore -unregserver - - # Change the override to the native so we are sure we use and register them - override_dlls native,builtin iexplore.exe itircl itss jscript mlang mshtml msimtf shdoclc shdocvw shlwapi urlmon - - # Remove the fake dlls, if any - mv "$programfilesdir_unix"/"Internet Explorer"/iexplore.exe "$programfilesdir_unix"/"Internet Explorer"/iexplore.exe.bak - for dll in itircl itss jscript mlang mshtml msimtf shdoclc shdocvw shlwapi urlmon - do - test -f "$WINDIR"/system32/$dll.dll && - mv "$WINDIR"/system32/$dll.dll "$WINDIR"/system32/$dll.dll.bak - done - - # The installer doesn't want to install iexplore.exe in XP mode. - set_winver win2k - - # Workaround a IE6 Installer bug, not Wine's fault - # See http://bugs.winehq.org/show_bug.cgi?id=5409 - # Actual value downloaded doesn't matter - rm -f "$WINETRICKS_CACHE"/ie6sites.dat - download . http://www.microsoft.com/windows/ie/ie6sp1/download/rtw/x86/ie6sites.dat - - # Install - download . http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/EN-US/ie6setup.exe f3ab61a785eb9611fa583612e83f3b69377f2cef - - # Workaround http://bugs.winehq.org/show_bug.cgi?id=21009 - # See also http://code.google.com/p/winezeug/issues/detail?id=78 - rm -f "$WINDIR"/system32/browseui.dll "$WINDIR"/system32/inseng.dll - - # Silent install recipe from: - # http://www.axonpro.sk/japo/info/MS/SILENT%20INSTALL/Unattended-Silent%20Installation%20Switches%20for%20Windows%20Apps.htm - if [ $WINETRICKS_QUIET ] - then - $WINE "$WINETRICKS_CACHE"/ie6setup.exe /q:a /r:n /c:"ie6wzd /S:""#e"" /q:a /r:n" - else - $WINE "$WINETRICKS_CACHE"/ie6setup.exe - fi - # IE6 exits with 194 to signal a reboot - status=$? - case $status in - 0|194) ;; - *) die ie6 installation failed - esac - - # Work around DLL registration bug until ierunonce/RunOnce/wineboot is fixed - # FIXME: whittle down this list - cd "$WINDIR"/system32/ - for i in actxprxy.dll browseui.dll browsewm.dll cdfview.dll ddraw.dll \ - dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll \ - imgutil.dll inetcomm.dll inseng.dll isetup.dll jscript.dll laprxy.dll \ - mlang.dll mshtml.dll mshtmled.dll msi.dll msident.dll \ - msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \ - ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \ - rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \ - shdocvw.dll shell32.dll urlmon.dll vbscript.dll webcheck.dll \ - wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \ - plugin.ocx proctexe.ocx tdc.ocx webcheck.dll wshom.ocx - do - $WINE regsvr32 /i $i > /dev/null 2>&1 - done - - # Set windows version back to user's default. Leave at win2k for better rendering (is there a bug for that?) - unset_winver - - # try $WINE "$programfilesdir_unix"/"Internet Explorer"/IEXPLORE.EXE http://www.winehq.org -} - -#---------------------------------------------------------------- - -load_ie7() { - # Unregister Wine IE - try $WINE iexplore -unregserver - - # Change the override to the native so we are sure we use and register them - override_dlls native,builtin iexplore.exe itircl itss jscript mshtml msimtf shdoclc shdocvw shlwapi urlmon xmllite - - # Bundled updspapi cannot work on wine - override_dlls builtin updspapi - - # Remove the fake dlls from the existing WINEPREFIX - for dll in itircl itss jscript mshtml msimtf shdoclc shdocvw shlwapi urlmon - do - test -f "$WINDIR"/system32/$dll.dll && - mv "$WINDIR"/system32/$dll.dll "$WINDIR"/system32/$dll.dll.bak - done - - # See http://bugs.winehq.org/show_bug.cgi?id=16013 - # Find instructions to create this file in dlls/wintrust/tests/crypt.c - download . http://winezeug.googlecode.com/svn/trunk/winetricks_files/winetest.cat ac8f50dd54d011f3bb1dd79240dae9378748449f - - # Put a dummy catalog file in place - mkdir -p "$WINDIR"/system32/catroot/\{f750e6c3-38ee-11d1-85e5-00c04fc295ee\} - try cp -f "$WINETRICKS_CACHE"/winetest.cat "$WINDIR"/system32/catroot/\{f750e6c3-38ee-11d1-85e5-00c04fc295ee\}/oem0.cat - - # Install - download . http://download.microsoft.com/download/3/8/8/38889DC1-848C-4BF2-8335-86C573AD86D9/IE7-WindowsXP-x86-enu.exe d39b89c360fbaa9706b5181ae4718100687a5326 - if [ $WINETRICKS_QUIET ] - then - $WINE "$WINETRICKS_CACHE"/IE7-WindowsXP-x86-enu.exe /quiet - else - $WINE "$WINETRICKS_CACHE"/IE7-WindowsXP-x86-enu.exe - fi - - # Work around DLL registration bug until ierunonce/RunOnce/wineboot is fixed - # FIXME: whittle down this list - cd "$WINDIR"/system32/ - for i in actxprxy.dll browseui.dll browsewm.dll cdfview.dll ddraw.dll \ - dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll \ - imgutil.dll inetcomm.dll inseng.dll isetup.dll jscript.dll laprxy.dll \ - mlang.dll mshtml.dll mshtmled.dll msi.dll msident.dll \ - msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \ - ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \ - rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \ - shdocvw.dll shell32.dll urlmon.dll vbscript.dll webcheck.dll \ - wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \ - plugin.ocx proctexe.ocx tdc.ocx webcheck.dll wshom.ocx - do - $WINE regsvr32 /i $i > /dev/null 2>&1 - done - - # Seeing is believing - if [ "$WINETRICKS_QUIET" = "" ] - then - warn "Starting ie7. To start it later, use the command $WINE '${programfilesdir_win}\\\\Internet Explorer\\\\iexplore'" - $WINE "${programfilesdir_win}\\Internet Explorer\\iexplore" http://www.microsoft.com/windows/internet-explorer/ie7/ > /dev/null 2>&1 & - else - warn "To start ie7, use the command $WINE '${programfilesdir_win}\\\\Internet Explorer\\\\iexplore'" - fi -} - -#---------------------------------------------------------------- - -load_jet40() { - # http://support.microsoft.com/kb/239114 - # See also http://bugs.winehq.org/show_bug.cgi?id=6085 - download . http://download.microsoft.com/download/4/3/9/4393c9ac-e69e-458d-9f6d-2fe191c51469/jet40sp8_9xnt.exe 8cd25342030857969ede2d8fcc34f3f7bcc2d6d4 - try $WINE "$WINETRICKS_CACHE"/jet40sp8_9xnt.exe $WINETRICKS_QUIET -} - -#---------------------------------------------------------------- - -load_kde() { - download . http://www.winkde.org/pub/kde/ports/win32/installer/kdewin-installer-gui-0.9.6-5.exe f612945e094390d7bc0e4f8840d308ef2b00f86e - mkdir -p "$programfilesdir_unix/kde" - try cp "$WINETRICKS_CACHE"/kdewin-installer-gui-0.9.6-5.exe "$programfilesdir_unix/kde" - cd "$programfilesdir_unix/kde" - try $WINE "$programfilesdir_win\\kde\\kdewin-installer-gui-0.9.6-5.exe" - cd "$olddir" -} - -#---------------------------------------------------------------- - -load_liberation() { - # http://www.redhat.com/promo/fonts/ - case `uname -s` in - SunOS|Solaris) - echo "If you get 'ERROR: Certificate verification error for fedorahosted.org: unable to get local issuer certificate':" - echo "Then you need to add Verisign root certificates to your local keystore." - echo "OpenSolaris users, see: http://www.linuxtopia.org/online_books/opensolaris_2008/SYSADV1/html/swmgrpatchtasks-14.html" - echo "Or edit winetricks' download function, and add '--no-check-certificate' to the command." - ;; - esac - - download . https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-1.04.tar.gz 097882c92e3260742a3dc3bf033792120d8635a3 - cd "$WINETRICKS_TMP" - gunzip -dc "$WINETRICKS_CACHE"/liberation-fonts-1.04.tar.gz | tar -xf - - mv liberation-fonts-1.04/*.ttf "$winefontsdir" - rm -rf "$WINETRICKS_TMP"/* - cd "$olddir" -} - -#---------------------------------------------------------------- - -set_native_mdac() { - # Set those overrides globally so user programs get MDAC's odbc - # instead of wine's unixodbc - override_dlls native,builtin odbc32 odbccp32 oledb32 -} - -#---------------------------------------------------------------- - -load_mdac25() { - download mdac25 http://download.microsoft.com/download/e/e/4/ee4fe9ee-6fa1-4ab6-ab8c-fe1769f4edcf/mdac_typ.exe 09e974a5dbebaaa08c7985a4a1126886dc05fd87 - set_native_mdac - set_winver nt40 - if [ $WINETRICKS_QUIET ] - then - try $WINE "$WINETRICKS_CACHE"/mdac25/mdac_typ.exe /q /C:"setup /QNT" - else - try $WINE "$WINETRICKS_CACHE"/mdac25/mdac_typ.exe - fi - unset_winver -} - -#---------------------------------------------------------------- - -load_mdac27() { - download mdac27 http://download.microsoft.com/download/3/b/f/3bf74b01-16ba-472d-9a8c-42b2b4fa0d76/mdac_typ.exe f68594d1f578c3b47bf0639c46c11c5da161feee - set_native_mdac - set_winver win2k - if [ $WINETRICKS_QUIET ] - then - try $WINE "$WINETRICKS_CACHE"/mdac27/mdac_typ.exe /q /C:"setup /QNT" - else - try $WINE "$WINETRICKS_CACHE"/mdac27/mdac_typ.exe - fi - unset_winver -} - -#---------------------------------------------------------------- - -load_mdac28() { - download mdac28 http://download.microsoft.com/download/c/d/f/cdfd58f1-3973-4c51-8851-49ae3777586f/MDAC_TYP.EXE 91bd59f0b02b67f3845105b15a0f3502b9a2216a - set_native_mdac - set_winver win98 - if [ $WINETRICKS_QUIET ] - then - try $WINE "$WINETRICKS_CACHE"/mdac28/mdac_typ.exe /q /C:"setup /QNT" - else - try $WINE "$WINETRICKS_CACHE"/mdac28/mdac_typ.exe - fi - unset_winver -} - -#---------------------------------------------------------------- - -load_mfc40() { - # See http://support.microsoft.com/kb/122244 - download . http://download.microsoft.com/download/ole/ole2v/3.5/w351/en-us/ole2v.exe c6cac71f32405ccb09c6f375e0738e6e13f073e4 - try unzip -o $WINETRICKS_UNIXQUIET -d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/ole2v.exe - try cp -f "$WINETRICKS_TMP"/MFC40.DLL "$WINDIR"/system32/ - - rm -rf "$WINETRICKS_TMP"/* -} - -#---------------------------------------------------------------- - -load_mingw_min() { - # If this is just a dependency check, don't re-install - if test $PACKAGE != mingw_min && test $PACKAGE != mingw && test $PACKAGE != mingw-min && test -f "$DRIVE_C"/MinGW/bin/gcc.exe - then - echo "prerequisite mingw_min already installed, skipping" - return - fi - - # See http://mingw.org/wiki/Getting_Started - download . http://sourceforge.net/projects/mingw/files/GNU%20Binutils/binutils-2.19.1-mingw32-bin.tar.gz 1ab72f3af3fe96d08c3c9bff60c47913704d5774 - download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-core-4.4.0-mingw32-bin.tar.gz b88b8f3644ca0cdf2c41cd03f820bf7823a8eabb - download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-core-4.4.0-mingw32-dll.tar.gz 0372ecf4caf75d0d9fe4a7739ca234f1a3de831b - download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gmp-4.2.4-mingw32-dll.tar.gz a14dd928382f093f67cb3cd57c140625b1b265bb - download . http://sourceforge.net/projects/mingw/files/MinGW%20libiconv/libiconv-1.13.1-1-mingw32-dll-2.tar.lzma 5b60ce4d9ec9cf91aee437915a2469b915e1235f - download . http://sourceforge.net/projects/mingw/files/MinGW%20Runtime/mingwrt-3.16-mingw32-dev.tar.gz 770ff5001989d8a9a1ec4f3621d8f264a24e178f - download . http://sourceforge.net/projects/mingw/files/MinGW%20Runtime/mingwrt-3.16-mingw32-dll.tar.gz b8032e97c79e16a3c540043f0f39821df1531ae9 - download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/mpfr-2.4.1-mingw32-dll.tar.gz 43b7ecb2c0c785c44321ff6c4376f51375713a7b - download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/pthreads-w32-2.8.0-mingw32-dll.tar.gz f922f8c0c42921fd4482a3d2e6f779d6384040c1 - download . http://sourceforge.net/projects/mingw/files/MinGW%20API%20for%20MS-Windows/w32api-3.13-mingw32-dev.tar.gz 5eb7d8ec0fe032a92bea3a2c8282a78df2f1793c - - mkdir "$DRIVE_C"/MinGW - cd "$DRIVE_C"/MinGW - gzip -d -c "$WINETRICKS_CACHE"/binutils-2.19.1-mingw32-bin.tar.gz | tar x - gzip -d -c "$WINETRICKS_CACHE"/mingwrt-3.16-mingw32-dev.tar.gz | tar x - gzip -d -c "$WINETRICKS_CACHE"/mingwrt-3.16-mingw32-dll.tar.gz | tar x - gzip -d -c "$WINETRICKS_CACHE"/w32api-3.13-mingw32-dev.tar.gz | tar x - gzip -d -c "$WINETRICKS_CACHE"/gmp-4.2.4-mingw32-dll.tar.gz | tar x - lzma -d -c "$WINETRICKS_CACHE"/libiconv-1.13.1-1-mingw32-dll-2.tar.lzma | tar x - gzip -d -c "$WINETRICKS_CACHE"/mpfr-2.4.1-mingw32-dll.tar.gz | tar x - gzip -d -c "$WINETRICKS_CACHE"/pthreads-w32-2.8.0-mingw32-dll.tar.gz | tar x - gzip -d -c "$WINETRICKS_CACHE"/gcc-core-4.4.0-mingw32-bin.tar.gz | tar x - gzip -d -c "$WINETRICKS_CACHE"/gcc-core-4.4.0-mingw32-dll.tar.gz | tar x - - append_path C:\\MinGW\\bin -} - -#---------------------------------------------------------------- - -load_mingw_gdb() { - # See http://mingw.org/wiki/Getting_Started - load_mingw_min - - download . $SOURCEFORGE/mingw/GNU%20Source-Level%20Debugger/GDB-7.0/gdb-7.0-2-mingw32-bin.tar.gz a560cb0e3980d0ed853994c84038260212f58925 - - cd "$DRIVE_C"/MinGW - gzip -d -c "$WINETRICKS_CACHE"/gdb-7.0-2-mingw32-bin.tar.gz | tar x -} - -#---------------------------------------------------------------- - -load_mono20() { - # Load Mono, have it handle all .net requests - download . ftp://ftp.novell.com/pub/mono/archive/2.0.1/windows-installer/1/mono-2.0.1-gtksharp-2.10.4-win32-1.exe ccb67ac41b59522846e47d0c423836b9d334c088 - try $WINE "$WINETRICKS_CACHE"/mono-2.0.1-gtksharp-2.10.4-win32-1.exe $WINETRICKS_SILENT - - cat > "$WINETRICKS_TMP"/mono_2.0.reg <<_EOF_ -REGEDIT4 - -[HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727] -"Install"=dword:00000001 -"SP"=dword:00000001 - -[HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\policy\v2.0] -"4322"="3706-4322" -_EOF_ - try_regedit "$WINETRICKS_TMP"/mono_2.0.reg - rm -f "$WINETRICKS_TMP"/mono_2.0.reg -} - -#---------------------------------------------------------------- - -load_mono22() { - # Load Mono, have it handle all .net requests - download . ftp://ftp.novell.com/pub/mono/archive/2.2/windows-installer/5/mono-2.2-gtksharp-2.12.7-win32-5.exe be977dfa9c49deea1be02ba4a2228e343f1e5840 - try $WINE "$WINETRICKS_CACHE"/mono-2.2-gtksharp-2.12.7-win32-5.exe $WINETRICKS_SILENT - - # FIXME: what should this be for mono 2.2? - cat > "$WINETRICKS_TMP"/mono_2.0.reg <<_EOF_ -REGEDIT4 - -[HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727] -"Install"=dword:00000001 -"SP"=dword:00000001 - -[HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\policy\v2.0] -"4322"="3706-4322" -_EOF_ - try_regedit "$WINETRICKS_TMP"/mono_2.0.reg - rm -f "$WINETRICKS_TMP"/mono_2.0.reg -} - -#---------------------------------------------------------------- - -load_mono24() { - # Load Mono, have it handle all .net requests - download . http://ftp.novell.com/pub/mono/archive/2.4.2.3/windows-installer/3/mono-2.4.2.3-gtksharp-2.12.9-win32-3.exe 4f0d051bcedd7668e63c12903310be0ea38f9654 - try $WINE "$WINETRICKS_CACHE"/mono-2.4.2.3-gtksharp-2.12.9-win32-3.exe $WINETRICKS_SILENT - - # FIXME: what should this be for mono 2.4? - cat > "$WINETRICKS_TMP"/mono_2.0.reg <<_EOF_ -REGEDIT4 - -[HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727] -"Install"=dword:00000001 -"SP"=dword:00000001 - -[HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\policy\v2.0] -"4322"="3706-4322" -_EOF_ - try_regedit "$WINETRICKS_TMP"/mono_2.0.reg - rm -f "$WINETRICKS_TMP"/mono_2.0.reg -} - -#---------------------------------------------------------------- - -load_mozillabuild() { - download . http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.4.exe - try $WINE "$WINETRICKS_CACHE"/MozillaBuildSetup-1.4.exe $WINETRICKS_S -} - -#---------------------------------------------------------------- - -load_mpc() { - download . $SOURCEFORGE/guliverkli2/Media%20Player%20Classic/6.4.9.1/mplayerc_20090706.zip 9b8e06a3997a786dccfb5739e0cc1a34f17905b6 - mkdir -p "$programfilesdir_unix/Media Player Classic" - cd "$programfilesdir_unix/Media Player Classic" - try unzip "$WINETRICKS_CACHE"/mplayerc_20090706.zip - - append_path "$programfilesdir_win\Media Player Classic" - - cd "$olddir" - warn "MPC now available as $programfilesdir_win\Media Player Classic\mplayerc.exe" -} - -#---------------------------------------------------------------- - -load_msi2() { - # Install native msi per http://wiki.winehq.org/NativeMsi - # http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=CEBBACD8-C094-4255-B702-DE3BB768148F - download . http://download.microsoft.com/download/WindowsInstaller/Install/2.0/W9XMe/EN-US/InstMsiA.exe e739c40d747e7c27aacdb07b50925b1635ee7366 - - # Pick win98 so we can install native msi - set_winver win98 - - # Avoid "err:setupapi:SetupDefaultQueueCallbackA copy error 5 ..." - rm -f "$WINDIR"/system32/msi.dll - rm -f "$WINDIR"/system32/msiexec.exe - - WINEDLLOVERRIDES="msi,msiexec.exe=n" try $WINE "$WINETRICKS_CACHE"/InstMSIA.exe $WINETRICKS_QUIET - - override_dlls native,builtin msi msiexec.exe - - # and undo version win98 - unset_winver -} - -#---------------------------------------------------------------- - -load_mshflxgd() { - # http://msdn.microsoft.com/en-us/library/aa240864(VS.60).aspx - # orig: 5f9c7a81022949bfe39b50f2bbd799c448bb7377 - # Jan 2009: 7ad74e589d5eefcee67fa14e65417281d237a6b6 - # May 2009: bd8aa796e16e5f213414af78931e0379d9cbe292 - download . http://activex.microsoft.com/controls/vb6/MSHFLXGD.CAB bd8aa796e16e5f213414af78931e0379d9cbe292 - try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/MSHFLXGD.CAB - try cp -f "$WINETRICKS_TMP"/[Mm][Ss][Hh][Ff][Ll][Xx][Gg][Dd].[Oo][Cc][Xx] "$WINDIR"/system32 -} - -#---------------------------------------------------------------- - -load_msls31() { - # Install native Microsoft Line Services (needed by e-Sword, possibly only when using native riched20) - download . http://download.microsoft.com/download/WindowsInstaller/Install/2.0/W9XMe/EN-US/InstMsiA.exe e739c40d747e7c27aacdb07b50925b1635ee7366 - try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/InstMsiA.exe - try cp -f "$WINETRICKS_TMP"/msls31.dll "$WINDIR"/system32 -} - -#---------------------------------------------------------------- - -load_msmask() { - # http://msdn.microsoft.com/en-us/library/11405hcf(VS.71).aspx - # http://bugs.winehq.org/show_bug.cgi?id=2934 - # old: 3c6b26f68053364ea2e09414b615dbebafb9d5c3 - # May 2009: 30e55679e4a13fe4d9620404476f215f93239292 - download . http://activex.microsoft.com/controls/vb6/MSMASK32.CAB 30e55679e4a13fe4d9620404476f215f93239292 - try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/MSMASK32.CAB - try cp -f "$WINETRICKS_TMP"/[Mm][Ss][Mm][Aa][Ss][Kk]32.[Oo][Cc][Xx] "$WINDIR"/system32/msmask32.ocx - try $WINE regsvr32 msmask32.ocx -} - -#---------------------------------------------------------------- - -load_msscript() { - # http://msdn.microsoft.com/scripting/scriptcontrol/x86/sct10en.exe - # http://www.microsoft.com/downloads/details.aspx?familyid=d7e31492-2595-49e6-8c02-1426fec693ac - download . http://download.microsoft.com/download/d/2/a/d2a7430c-6d5b-48e9-96c4-3c751be7bffe/sct10en.exe fd9f2f23357ab11ae70682d6864f7e9f188adf2a - try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/sct10en.exe - try cp -f "$WINETRICKS_TMP"/msscript.ocx "$WINDIR"/system32 - try $WINE regsvr32 msscript.ocx -} - -#---------------------------------------------------------------- - -load_msxml3() { - # Service Pack 5 - #download http://download.microsoft.com/download/a/5/e/a5e03798-2454-4d4b-89a3-4a47579891d8/msxml3.msi - # Service Pack 7 - download . http://download.microsoft.com/download/8/8/8/888f34b7-4f54-4f06-8dac-fa29b19f33dd/msxml3.msi d4c2178dfb807e1a0267fce0fd06b8d51106d913 - # http://bugs.winehq.org/show_bug.cgi?id=7849 fixed since 0.9.37 - override_dlls native,builtin msxml3 - try $WINE msiexec /i "$WINETRICKS_CACHE"/msxml3.msi $WINETRICKS_QUIET -} - -#---------------------------------------------------------------- - -load_msxml4() { - # If this is just a dependency check, don't re-install - if test $PACKAGE != msxml4 && test -f "$WINDIR"/system32/msxml4.dll - then - echo "prerequisite msxml4 already installed, skipping" - return - fi - # MS06-071: http://www.microsoft.com/downloads/details.aspx?familyid=24B7D141-6CDF-4FC4-A91B-6F18FE6921D4 - # download . http://download.microsoft.com/download/e/2/e/e2e92e52-210b-4774-8cd9-3a7a0130141d/msxml4-KB927978-enu.exe d364f9fe80c3965e79f6f64609fc253dfeb69c25 - # MS07-042: http://www.microsoft.com/downloads/details.aspx?FamilyId=021E12F5-CB46-43DF-A2B8-185639BA2807 - # download . http://download.microsoft.com/download/9/4/2/9422e6b6-08ee-49cb-9f05-6c6ee755389e/msxml4-KB936181-enu.exe 73d75d7b41f8a3d49f272e74d4f73bb5e82f1acf - # SP3 (2009): http://www.microsoft.com/downloads/details.aspx?familyid=7F6C0CB4-7A5E-4790-A7CF-9E139E6819C0 - download msxml4sp3 http://download.microsoft.com/download/A/2/D/A2D8587D-0027-4217-9DAD-38AFDB0A177E/msxml.msi aa70c5c1a7a069af824947bcda1d9893a895318b - - try $WINE msiexec /i "$WINETRICKS_CACHE"/msxml4sp3/msxml.msi $WINETRICKS_QUIET -} - -#---------------------------------------------------------------- - -load_msxml6() { - # If this is just a dependency check, don't re-install - if test $PACKAGE != msxml6 && test -f "$WINDIR"/system32/msxml6.dll - then - echo "prerequisite msxml6 already installed, skipping" - return - fi - - # http://www.microsoft.com/downloads/details.aspx?FamilyID=993c0bcf-3bcf-4009-be21-27e85e1857b1 - # download . http://download.microsoft.com/download/2/e/0/2e01308a-e17f-4bf9-bf48-161356cf9c81/msxml6.msi 2308743ddb4cb56ae910e461eeb3eab0a9e58058 - # Service Pack 1 - # http://www.microsoft.com/downloads/details.aspx?familyid=D21C292C-368B-4CE1-9DAB-3E9827B70604 - download . http://download.microsoft.com/download/e/a/f/eafb8ee7-667d-4e30-bb39-4694b5b3006f/msxml6_x86.msi - - try $WINE msiexec /i "$WINETRICKS_CACHE"/msxml6_x86.msi $WINETRICKS_QUIET -} - -#---------------------------------------------------------------- - -load_ogg() { - # flac, ogg, speex, vorbis, ogm source, ogg source - download . http://cross-lfs.org/~mlankhorst/oggcodecs_0.81.2.exe c9d10a8f1b65b9f3824e227333d66247e14fad4c - #try $WINE "$WINETRICKS_CACHE"/oggcodecs_0.81.2.exe $WINETRICKS_QUIET - # oh, and the new schroedinger direct show filter, too - # see following URLs for more info - # http://www.diracvideo.org/ - # http://cross-lfs.org/~mlankhorst/direct-schro.txt - # http://www.diracvideo.org/git?p=direct-schro.git;a=summary - # Requires wine-1.1.1 - download . http://cross-lfs.org/~mlankhorst/direct-schro.dll - try cp "$WINETRICKS_CACHE"/direct-schro.dll "$WINDIR"/system32/direct-schro.dll - # This is currently broken. Maarten's not sure why. - try $WINE regsvr32 direct-schro.dll -} - -#---------------------------------------------------------------- - -load_ole2() { - # http://support.microsoft.com/kb/123087/EN-US/ - download . http://download.microsoft.com/download/win31/update/2.03/win/en-us/ww1116.exe b803991c40f387464b61f606536b7c98a88245d2 - try unzip -o $WINETRICKS_UNIXQUIET -d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/ww1116.exe - set_winver win31 - cd "$WINETRICKS_TMP" - try $WINE setup.exe - cd "$olddir" - unset_winver - - override_dlls native,builtin COMPOBJ.DLL OLE2CONV.DLL OLE2DISP.DLL OLE2.DLL - override_dlls native,builtin OLE2NLS.DLL OLE2PROX.DLL STORAGE.DLL TYPELIB.DLL -} - -#---------------------------------------------------------------- - -load_openwatcom() { - # http://www.openwatcom.org - download . "http://ftp.openwatcom.org/ftp/open-watcom-c-win32-1.8.exe" 44afd1fabfdf0374f614f054824e60ac560f9dc0 - if [ $WINETRICKS_QUIET ] - then - # Options documented at http://bugzilla.openwatcom.org/show_bug.cgi?id=898 - # But they don't seem to work on wine, so jam them into setup.inf - # Pick smallest installation that supports 16 bit C and C++ - cd "$WINETRICKS_TMP" - cp "$WINETRICKS_CACHE"/open-watcom-c-win32-1.8.exe . - unzip open-watcom-c-win32-1.8.exe setup.inf - sed -i 's/tools16=.*/tools16=true/' setup.inf - zip -f open-watcom-c-win32-1.8.exe - try $WINE open-watcom-c-win32-1.8.exe -s - cd "$olddir" - else - try $WINE "$WINETRICKS_CACHE"/open-watcom-c-win32-1.8.exe - fi - if test ! -f "$DRIVE_C"/WATCOM/binnt/wcc.exe - then - warn "c:/watcom/binnt/wcc.exe not found; you probably didn't select 16 bit tools, and won't be able to buld win16test" - fi -} - -#---------------------------------------------------------------- - -load_pdh() { - # http://support.microsoft.com/kb/284996 - download . http://download.microsoft.com/download/platformsdk/Redist/5.0.2195.2668/NT4/EN-US/pdhinst.exe f42448660def8cd7f42b34aa7bc7264745f4425e - try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/pdhinst.exe - try unzip -o $WINETRICKS_UNIXQUIET -d "$WINETRICKS_TMP" "$WINETRICKS_TMP"/pdh.exe - try cp -f "$WINETRICKS_TMP"/x86/Pdh.Dll "$WINDIR"/system32/pdh.dll -} - -#---------------------------------------------------------------- - -load_physx() -{ - # http://www.nvidia.com/object/physx_9.09.0814.html - download . http://us.download.nvidia.com/Windows/9.09.0814/PhysX_9.09.0814_SystemSoftware.exe e19f7c3385a4a68e7acb85301bb4d2d0d1eaa1e2 - try $WINE "$WINETRICKS_CACHE"/PhysX_9.09.0814_SystemSoftware.exe $WINETRICKS_QUIET -} - -#---------------------------------------------------------------- - -load_psdk2003() -{ - load_vcrun6 - - # Note: aborts on 64 bit windows with dialog saying "don't run on WoW" - # http://www.microsoft.com/downloads/details.aspx?familyid=0baf2b35-c656-4969-ace8-e4c0c0716adb - download psdk2003 http://download.microsoft.com/download/f/a/d/fad9efde-8627-4e7a-8812-c351ba099151/PSDK-x86.exe 5c7dc2e1eb902b376d7797cc383fefdfc64ff9c9 - echo "This can take up to an hour." - cd "$WINETRICKS_CACHE"/psdk2003 - try $WINE PSDK-x86.exe - cd "$olddir" -} - -#---------------------------------------------------------------- - -load_psdkvista() -{ - # http://www.microsoft.com/downloads/details.aspx?familyid=0baf2b35-c656-4969-ace8-e4c0c0716adb - warn "Vista SDK doesn't work yet as of wine-1.1.28" - load_dotnet20 - download psdkvista download.microsoft.com/download/c/a/1/ca145d10-e254-475c-85f9-1439f4cd2a9e/Setup.exe 756c21a7fc9b831f7200f3f44ae55cc7689e8063 - #chmod +x "$WINETRICKS_CACHE"/psdkvista/Setup.exe - cd "$WINETRICKS_CACHE"/psdkvista - try $WINE Setup.exe - cd "$olddir" -} - -#---------------------------------------------------------------- - -load_psdkwin7() -{ - # http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&displaylang=en - warn "When given a choice, select only C++ compilers and headers, the other options don't work yet." - load_vcrun6 - load_vcrun2008 - load_dotnet20 - - # don't have a working unattended recipe. Maybe we'll have to - # do an autohotkey script until msft gets its act together: - # http://social.msdn.microsoft.com/Forums/en-US/windowssdk/thread/c053b616-7d5b-405d-9841-ec465a8e21d5 - download psdkwin7 http://download.microsoft.com/download/7/A/B/7ABD2203-C472-4036-8BA0-E505528CCCB7/winsdk_web.exe a01dcc67a38f461e80ea649edf1353f306582507 - cd "$WINETRICKS_CACHE"/psdkwin7 - try $WINE winsdk_web.exe - cd "$olddir" -} - -#---------------------------------------------------------------- - -load_python26() { - - # If this is just a dependency check, don't re-install - if test $PACKAGE != python26 && test -f "$WINEPREFIX"/drive_c/Python26/python.exe - then - echo "prerequisite python26 already installed, skipping" - return - fi - - download . http://www.python.org/ftp/python/2.6.2/python-2.6.2.msi 2d1503b0e8b7e4c72a276d4d9027cf4856b208b8 - download . $SOURCEFORGE/project/pywin32/pywin32/Build%20214/pywin32-214.win32-py2.6.exe eca58f29b810d8e3e7951277ebb3e35ac35794a3 - cd "$WINETRICKS_CACHE" - try $WINE msiexec /i python-2.6.2.msi ALLUSERS=1 $WINETRICKS_QUIET - # FIXME: unzip this instead of running it if quiet install? - try $WINE pywin32-214.win32-py2.6.exe - cd "$olddir" -} - -#---------------------------------------------------------------- - -load_python_comtypes() { - - load_python26 - - download . $SOURCEFORGE/project/comtypes/comtypes/0.6.1/comtypes-0.6.1-1.zip 814318cdae0ab2471a9cd500847bf12f4df9a57c - cd "$WINETRICKS_CACHE" - try unzip comtypes-0.6.1-1.zip - cd comtypes-0.6.1 - try $WINE "C:\Python26\python.exe" setup.py install - cd "$olddir" -} - -#---------------------------------------------------------------- - -load_quicktime72() { - echo "Quicktime needs gdiplus..." - load_gdiplus - - # http://www.apple.com/support/downloads/quicktime72forwindows.html - download quicktime72 'http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=14402&cat=59&platform=osx&method=sa/QuickTimeInstaller.exe' bb89981f10cf21de57b9453e53cf81b9194271a9 - unset QUICKTIME_QUIET - if test "$WINETRICKS_QUIET"x != x - then - QUICKTIME_QUIET="/qn" # ISSETUPDRIVEN=0 - fi - # set vista mode to inhibit directdraw overlay use that blacks the screen - set_winver vista - try $WINE "$WINETRICKS_CACHE"/quicktime72/QuickTimeInstaller.exe ALLUSERS=1 DESKTOP_SHORTCUTS=0 QTTaskRunFlags=0 QTINFO.BISQTPRO=1 SCHEDULE_ASUW=0 REBOOT_REQUIRED=No $QUICKTIME_QUIET > /dev/null 2>&1 - if test "$WINETRICKS_QUIET"x = x - then - echo "You probably want to select Advanced / Safe Mode in the Quicktime control panel" - try $WINE control "$programfilesdir_win\\QuickTime\\QTSystem\\QuickTime.cpl" - fi - - unset_winver - # user might want to set vista mode himself, or run - # wine control ".wine/drive_c/Program Files/QuickTime/QTSystem/QuickTime.cpl" - # and pick Advanced / Safe Mode (gdi only). - # We could probably force that by overwriting QuickTime.qtp - # (probably in Program Files/QuickTime/QTSystem/QuickTime.qtp) - # but the format isn't known, so we'd have to override all other settings, too. -} - -#---------------------------------------------------------------- - -volnum() { - case "$OS" in - "Windows_NT") - return - ;; - esac - - # Recent Microsoft installers are often based on "windows package manager", see - # http://support.microsoft.com/kb/262841 and - # http://www.microsoft.com/technet/prodtechnol/windowsserver2003/deployment/winupdte.mspx - # These installers check the drive name, and if it doesn't start with 'harddisk', - # they complain "Unable to find a volume for file extraction", see - # http://bugs.winehq.org/show_bug.cgi?id=5351 - # You may be able to work around this by using the installer's /x or /extract switch, - # but renaming drive_c to "harddiskvolume0" lets you just run the installer as normal. - - if test ! -d "$WINEPREFIX"/harddiskvolume0/ - then - ln -s drive_c "$WINEPREFIX"/harddiskvolume0 - rm "$WINEPREFIX"/dosdevices/c: - ln -s ../harddiskvolume0 "$WINEPREFIX"/dosdevices/c: - echo "Renamed drive_c to harddiskvolume0" - else - echo "drive_c already named harddiskvolume0" - fi -} - -#---------------------------------------------------------------- - -load_riched20() { - # http://support.microsoft.com/?kbid=249973 - download . http://download.microsoft.com/download/winntsp/Patch/RTF/NT4/EN-US/Q249973i.EXE f0b7663f15dbd31410435483ba832318c7a70470 - try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/Q249973i.EXE - try cp -f "$WINETRICKS_TMP"/riched??.dll "$WINDIR"/system32 - override_dlls native,builtin riched20 riched32 - - rm -rf "$WINETRICKS_TMP"/* -} - -#---------------------------------------------------------------- - -load_riched30() { - # http://www.novell.com/documentation/nm1/readmeen_web/readmeen_web.html#Akx3j64 - # claims that Groupwise Messenger's View / Text Size command - # only works with riched30, and recommends getting it by installing - # msi 2, which just happens to come with riched30 version of riched20 - # (though not with a corresponding riched32, which might be a problem) - # http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=CEBBACD8-C094-4255-B702-DE3BB768148F - download . http://download.microsoft.com/download/WindowsInstaller/Install/2.0/W9XMe/EN-US/InstMsiA.exe e739c40d747e7c27aacdb07b50925b1635ee7366 - try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/InstMsiA.exe - try cp -f "$WINETRICKS_TMP"/riched20.dll "$WINDIR"/system32 - override_dlls native,builtin riched20 - - rm -rf "$WINETRICKS_TMP"/* -} - -#---------------------------------------------------------------- - -load_richtx32() { - download . http://activex.microsoft.com/controls/vb6/richtx32.cab da404b566df3ad74fe687c39404a36c3e7cadc07 - try cabextract "$WINETRICKS_CACHE"/richtx32.cab -d "$WINDIR"/system32 -F RichTx32.Ocx - try $WINE regsvr32 RichTx32.ocx -} - -#---------------------------------------------------------------- - -load_shockwave() { - # Not silent enough, use msi instead - #download . http://fpdownload.macromedia.com/get/shockwave/default/english/win95nt/latest/Shockwave_Installer_Full.exe 840e34e9b067cf247bfa9092665b8966158f38e3 - #try $WINE "$WINETRICKS_CACHE"/Shockwave_Installer_Full.exe $WINETRICKS_S - # old sha1sum: 6a91a9da4b54c3fdc97130a15e1a173117e5f4ff - # 2009-07-31 sha1sum: 0bb506ef67a268e8d3fb6c7ce556320ee10b9da5 - # 2009-12-13 sha1sum: d35649883bf13cb1a86f5650e1050d15533ac0f4 - - download . http://fpdownload.macromedia.com/get/shockwave/default/english/win95nt/latest/sw_lic_full_installer.msi d35649883bf13cb1a86f5650e1050d15533ac0f4 - try $WINE msiexec /i "$WINETRICKS_CACHE"/sw_lic_full_installer.msi $WINETRICKS_QUIET -} - -#---------------------------------------------------------------- - -load_tahoma() { - # The tahoma and tahomabd fonts are needed by e.g. Steam - - download . http://download.microsoft.com/download/office97pro/fonts/1/w95/en-us/tahoma32.exe 888ce7b7ab5fd41f9802f3a65fd0622eb651a068 - try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/tahoma32.exe - try cp -f "$WINETRICKS_TMP"/Tahoma.TTF "$winefontsdir"/tahoma.ttf - try cp -f "$WINETRICKS_TMP"/Tahomabd.TTF "$winefontsdir"/tahomabd.ttf - chmod +w "$winefontsdir"/tahoma*.ttf - rm -rf "$WINETRICKS_TMP"/* -} - -#---------------------------------------------------------------- - -load_urlmon() { - # This is an updated urlmon from IE 6.0 - # See http://www.microsoft.com/downloads/details.aspx?familyid=85BB441A-5BB1-4A82-86EC-A249AF287513 - # (Works for Dolphin Smalltalk, see http://bugs.winehq.org/show_bug.cgi?id=8258) - download . http://download.microsoft.com/download/8/2/0/820faffc-3ea0-4914-bca3-584235964ded/Q837251.exe bcc79b92ac3c06c4de3692672c3d70bdd36be892 - try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE/Q837251.exe" - try cp -f "$WINETRICKS_TMP"/URLMON.DLL "$WINDIR"/system32/urlmon.dll - override_dlls native,builtin urlmon -} - -#---------------------------------------------------------------- - -load_vb2run() { - # Not referenced on MS web anymore. But the old Microsoft Software Library FTP still has it. - # See ftp://ftp.microsoft.com/Softlib/index.txt - download . ftp://ftp.microsoft.com/Softlib/MSLFILES/VBRUN200.EXE ac0568b73ee375408778e9b505df995f79ab907e - try unzip -o $WINETRICKS_UNIXQUIET -d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/VBRUN200.EXE - try cp -f "$WINETRICKS_TMP/VBRUN200.DLL" "$WINDIR"/system32/ - -} - -#---------------------------------------------------------------- - -load_vb3run() { - # See http://support.microsoft.com/kb/196285 - download . http://download.microsoft.com/download/vb30/utility/1/w9xnt4/en-us/vb3run.exe 518fcfefde9bf680695cadd06512efadc5ac2aa7 - try unzip -o $WINETRICKS_UNIXQUIET -d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/vb3run.exe - try cp -f "$WINETRICKS_TMP/Vbrun300.dll" "$WINDIR"/system32/ - -} - -#---------------------------------------------------------------- - -load_vb4run() { - # See http://support.microsoft.com/kb/196286 - download . http://download.microsoft.com/download/vb40ent/sample27/1/w9xnt4/en-us/vb4run.exe 83e968063272e97bfffd628a73bf0ff5f8e1023b - try unzip -o $WINETRICKS_UNIXQUIET -d "$WINETRICKS_TMP" "$WINETRICKS_CACHE"/vb4run.exe - try cp -f "$WINETRICKS_TMP/Vb40032.dll" "$WINDIR"/system32/ - try cp -f "$WINETRICKS_TMP/Vb40016.dll" "$WINDIR"/system32/ - -} - -#---------------------------------------------------------------- - -load_vbvm50() { - download . http://download.microsoft.com/download/vb50pro/utility/1/win98/en-us/msvbvm50.exe 28bfaf09b8ac32cf5ffa81252f3e2fadcb3a8f27 - try $WINE "$WINETRICKS_CACHE"/msvbvm50.exe $WINETRICKS_QUIET -} - -#---------------------------------------------------------------- - -load_vbrun60() { - if test ! -f "$WINETRICKS_CACHE"/vbrun60sp6.exe - then - download . http://download.microsoft.com/download/5/a/d/5ad868a0-8ecd-4bb0-a882-fe53eb7ef348/VB6.0-KB290887-X86.exe 73ef177008005675134d2f02c6f580515ab0d842 - rm -rf "$WINETRICKS_TMP"/* - - try $WINE "$WINETRICKS_CACHE"/VB6.0-KB290887-X86.exe "/T:$winetricks_tmp_win" /c $WINETRICKS_QUIET - if test ! -f "$WINETRICKS_TMP"/vbrun60sp6.exe - then - die vbrun60sp6.exe not found - fi - try mv "$WINETRICKS_TMP"/vbrun60sp6.exe "$WINETRICKS_CACHE" - fi - - # Delete some fake DLLs to ensure that the installer overwrites them. - rm -f "$WINDIR"/system32/comcat.dll - rm -f "$WINDIR"/system32/oleaut32.dll - rm -f "$WINDIR"/system32/olepro32.dll - rm -f "$WINDIR"/system32/stdole2.tlb - # Exits with status 43 for some reason? - $WINE "$WINETRICKS_CACHE"/vbrun60sp6.exe $WINETRICKS_QUIET - - status=$? - case $status in - 0|43) ;; - *) die $PACKAGE installation failed - esac -} - -#---------------------------------------------------------------- - -load_vcrun6() { - # Load the Visual C++ 6 runtime libraries, including the elusive mfc42u.dll - - # If this is just a dependency check, don't re-install - if test $PACKAGE != vcrun6 && test -f "$WINDIR"/system32/mfc42u.dll - then - echo "prerequisite vcrun6 already installed, skipping" - return - fi - - if test ! -f "$WINETRICKS_CACHE"/vcredist.exe - then - download . http://download.microsoft.com/download/vc60pro/update/1/w9xnt4/en-us/vc6redistsetup_enu.exe 382c8f5a7f41189af8d4165cf441f274b7e2a457 - rm -rf "$WINETRICKS_TMP"/* - - try $WINE "$WINETRICKS_CACHE"/vc6redistsetup_enu.exe "/T:$winetricks_tmp_win" /c $WINETRICKS_QUIET - if test ! -f "$WINETRICKS_TMP"/vcredist.exe - then - die vcredist.exe not found - fi - mv "$WINETRICKS_TMP"/vcredist.exe "$WINETRICKS_CACHE" - fi - # Delete some fake dlls to avoid vcredist installer warnings - rm -f "$WINDIR"/system32/comcat.dll - rm -f "$WINDIR"/system32/msvcrt.dll - rm -f "$WINDIR"/system32/oleaut32.dll - rm -f "$WINDIR"/system32/olepro32.dll - rm -f "$WINDIR"/system32/stdole2.tlb - # vcredist still exits with status 43. Anyone know why? - $WINE "$WINETRICKS_CACHE"/vcredist.exe - - status=$? - case $status in - 0|43) ;; - *) die $PACKAGE installation failed - esac - - # And then some apps need mfc42u.dll, dunno what right way - # is to get it, vcredist doesn't install it by default? - try cabextract "$WINETRICKS_CACHE"/vcredist.exe -d "$WINDIR"/system32/ -F mfc42u.dll - - override_dlls native,builtin msvcrt - -} - -#---------------------------------------------------------------- - -load_vcrun6sp6() { - if test ! -f vcredistsp6.exe - then - download . http://download.microsoft.com/download/1/9/f/19fe4660-5792-4683-99e0-8d48c22eed74/Vs6sp6.exe 2292437a8967349261c810ae8b456592eeb76620 - - # No EULA is presented when passing command-line extraction arguments, - # so we'll simplify extraction with cabextract. We'll also try to avoid - # overwriting the older vcrun6 redist by renaming the extracted file. - try cabextract "$WINETRICKS_CACHE"/Vs6sp6.exe -d "$WINETRICKS_TMP" -F vcredist.exe - try mv "$WINETRICKS_TMP"/vcredist.exe "$WINETRICKS_CACHE"/vcredistsp6.exe - fi - - # Delete some fake dlls to avoid vcredist installer warnings - try rm -f "$WINDIR"/system32/comcat.dll - try rm -f "$WINDIR"/system32/msvcrt.dll - try rm -f "$WINDIR"/system32/oleaut32.dll - try rm -f "$WINDIR"/system32/olepro32.dll - try rm -f "$WINDIR"/system32/stdole2.tlb - # vcredist still exits with status 43. Anyone know why? - $WINE "$WINETRICKS_CACHE"/vcredistsp6.exe - - status=$? - case $status in - 0|43) ;; - *) die $PACKAGE installation failed - esac - - # And then some apps need mfc42u.dll, dunno what right way - # is to get it, vcredist doesn't install it by default? - try cabextract "$WINETRICKS_CACHE"/vcredistsp6.exe -d "$WINDIR"/system32/ -F mfc42u.dll - - override_dlls native,builtin msvcrt -} - -#---------------------------------------------------------------- - -load_vcrun2003() { - # Load the Visual C++ 2003 runtime libraries - # Sadly, I know of no Microsoft URL for these - echo "Installing BZFlag (which comes with the Visual C++ 2003 runtimes)" - download . $SOURCEFORGE/bzflag/BZEditW32_1.6.5_Installer.exe bdd1b32c4202fd77e6513fd507c8236888b09121 - try $WINE "$WINETRICKS_CACHE"/BZEditW32_1.6.5_Installer.exe $WINETRICKS_S - try cp "$programfilesdir_unix/BZEdit1.6.5"/m*71* "$WINDIR"/system32/ -} - -#---------------------------------------------------------------- - -load_vcrun2005() { - # Load the latest Visual C++ 2005 runtime libraries - # If this is just a dependency check, don't re-install - - # SP1 + ATL security fix build 4053 (MS09-035) - # See http://www.microsoft.com/downloads/details.aspx?familyid=766A6AF7-EC73-40FF-B072-9112BAB119C2 - if test $PACKAGE != vcrun2005 && test -d "$WINDIR"/winsxs/x86_Microsoft.VC80.MFC_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_b77cec8e - then - echo "prerequisite vcrun2005 already installed, skipping" - return - fi - download vcrun2005-ms09-035 http://download.microsoft.com/download/6/B/B/6BB661D6-A8AE-4819-B79F-236472F6070C/vcredist_x86.exe e052789ebad7dc8d6f8505a9295b0576babd125e - try $WINE "$WINETRICKS_CACHE"/vcrun2005-ms09-035/vcredist_x86.exe $WINETRICKS_QUIET -} - -#---------------------------------------------------------------- - -load_vcrun2008() { - # For the moment, assume windows already has this. - case "$OS" in - "Windows_NT") - return - ;; - esac - - # Work around bug 5351 (http://bugs.winehq.org/show_bug.cgi?id=5351). In recent - # wine (>= 1.1.7) the bug is fixed. The workaround doesn't hurt anything, and lets - # installer work on older Wine (e.g., the stabe 1.0.1). - volnum - - # Load the latest Visual C++ 2008 runtime libraries - # If this is just a dependency check, don't re-install - # SP1 + ATL security fix build 4148 (MS09-035) - # See http://www.microsoft.com/downloads/details.aspx?familyid=2051a0c1-c9b5-4b0a-a8f5-770a549fd78c - if test $PACKAGE != vcrun2008 && test -d "$WINDIR"/winsxs/x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.30729.4148_x-ww_a57c1f53 - then - echo "prerequisite vcrun2008 already installed, skipping" - return - fi - download vcrun2008-ms09-035 http://download.microsoft.com/download/9/7/7/977B481A-7BA6-4E30-AC40-ED51EB2028F2/vcredist_x86.exe bd18409cfe75b88c2a9432d36d96f4bf125a3237 - try $WINE "$WINETRICKS_CACHE"/vcrun2008-ms09-035/vcredist_x86.exe $WINETRICKS_QUIET - -} - -#---------------------------------------------------------------- - -load_vjrun20() { - load_dotnet20 - # See http://www.microsoft.com/downloads/details.aspx?FamilyId=E9D87F37-2ADC-4C32-95B3-B5E3A21BAB2C - download vjrun20 http://download.microsoft.com/download/9/2/3/92338cd0-759f-4815-8981-24b437be74ef/vjredist.exe 80a098e36b90d159da915aebfbfbacf35f302bd8 - if [ $WINETRICKS_QUIET ] - then - try $WINE "$WINETRICKS_CACHE"/vjrun20/vjredist.exe /q /C:"install /QNT" - else - try $WINE vjrun20/vjredist.exe - fi -} - -#---------------------------------------------------------------- - -load_vc2003toolkit() -{ - # http://www.dotnetmonster.com/Uwe/Forum.aspx/dotnet-vc/2679/ANN-Microsoft-Visual-C-Toolkit-2003 - #download . http://download.microsoft.com/download/3/9/b/39bac755-0a1e-4d0b-b72c-3a158b7444c4/VCToolkitSetup.exe 956c81c3106b97042c4126b23c81885c4b5211f4 - # I'm going to link to this for now even though it's not straight from microsoft - # because it's a developer tool rather than a runtime, and - # I'm in the middle of trying to get lots of open source windows - # apps to build on Wine; see http://wiki.winehq.org/UnitTestSuites - # (Plus the sha1sum, which I still have from a copy straight from microsoft, - # protects us somewhat against corrupted copies.) - download . http://npg.dl.ac.uk/MIDAS/MIDAS_Release/VCToolkitSetup.exe 956c81c3106b97042c4126b23c81885c4b5211f4 - cd "$WINETRICKS_CACHE" - try $WINE VCToolkitSetup.exe - cd "$olddir" -} - -#---------------------------------------------------------------- - -load_vc2005express() -{ - # Thanks to http://blogs.msdn.com/astebner/articles/551674.aspx for the recipe - load_dotnet20 - load_msxml6 - - # http://go.microsoft.com/fwlink/?LinkId=51410 - download vc2005express http://download.microsoft.com/download/8/3/a/83aad8f9-38ba-4503-b3cd-ba28c360c27b/ENU/vcsetup.exe 0292ae1d576edd8ee5350a27113c94c9f9958d5c - - if [ $WINETRICKS_QUIET ] - then - # Thanks to Aaron Stebner's unattended install recipe - # http://blogs.msdn.com/astebner/archive/2006/03/19/555326.aspx - - # "http://go.microsoft.com/fwlink/?LinkId=51417" - download vc2005express http://download.microsoft.com/download/0/5/A/05AA45B9-A4BE-4872-8D57-733DF5297284/Ixpvc.exe ce0da62b5649f33c7a150de276d799fb2d68d12a - - cd "$WINETRICKS_TMP" - rm -rf vc2005express.tmp || true - mkdir vc2005express.tmp - cd vc2005express.tmp - cabextract "$WINETRICKS_CACHE"/vc2005express/vcsetup.exe - cp "$WINETRICKS_CACHE"/vc2005express/Ixpvc.exe . - chmod +x Ixpvc.exe - # Add /qn after ReallySuppress for a really silent install (but then you won't see any errors) - - try $WINE Ixpvc /t:"$WINETRICKS_TMP_WIN\\\\vc2005express.tmp" /q:a /c:"msiexec /i vcsetup.msi VSEXTUI=1 ADDLOCAL=ALL REBOOT=ReallySuppress" - - cd .. - rm -rf vc2005express.tmp || true - else - warn "Don't forget to install the IDE, or mt.exe won't be installed" - cd "$WINETRICKS_CACHE"/vc2005express - try $WINE vcsetup.exe - # The interactive installer seems to be asynchronous, so wait until its log file directory is created - while test ! -d "$programfilesdir_unix/Microsoft Visual Studio 8/Microsoft Visual C++ 2005 Express Edition - ENU/Logs" - do - echo "Waiting for install to finish..." - sleep 10 - done - fi - cd "$olddir" -} - -#---------------------------------------------------------------- - -load_vc2005expresssp1() -{ - warn "$PACKAGE does not work yet" - if test ! -f "$programfilesdir_unix/Microsoft Visual Studio 8/Common7/Tools/vsvars32.bat" - then - die "install vc2005express first (this verb will be merged into that once it's debugged)" - fi - - # http://www.microsoft.com/downloads/details.aspx?FamilyId=7B0B0339-613A-46E6-AB4D-080D4D4A8C4E - download vc2005express download.microsoft.com/download/7/7/3/7737290f-98e8-45bf-9075-85cc6ae34bf1/VS80sp1-KB926748-X86-INTL.exe 8b9a0172efad64774aa122f29e093ad2043b308d - try $WINE "$WINETRICKS_CACHE"/vc2005express/VS80sp1-KB926748-X86-INTL.exe -} - -load_vcdmount() -{ - if test "$WINE" != "" - then - return - fi - - # Call only on real Windows. - # Sets VCDMOUNT and ISO_MOUNT_ROOT - - # The only free mount tool I know for Windows Vista is Virtual CloneDrive, - # which can be downloaded at - # http://www.slysoft.com/en/virtual-clonedrive.html - # FIXME: actually install it here - - # Locate vcdmount.exe. FIXME: internationalize this. - for PROGRAMFILES in "c:/Program Files (x86)" "c:/Program Files" - do - test -d "$PROGRAMFILES" && break - done - VCDMOUNT="$PROGRAMFILES/Elaborate Bytes/VirtualCloneDrive/vcdmount.exe" - if test ! -x "$VCDMOUNT" - then - warn "Installing Virtual CloneDrive" - download . http://static.slysoft.com/SetupVirtualCloneDrive.exe - # have to use cmd else vista won't let cygwin run .exe's? - chmod +x "$WINETRICKS_CACHE"/SetupVirtualCloneDrive.exe - cmd /c "$WINETRICKS_CACHE_WIN"\\SetupVirtualCloneDrive.exe - fi - - # FIXME: Use WMI to locate the drive named - # "ELBY CLONEDRIVE..." using WMI as described in - # http://delphihaven.wordpress.com/2009/07/05/using-wmi-to-get-a-drive-friendly-name/ - # For now, you just have to hardcode it for your system :-( - warn "You probably need to edit the script to tell it which drive VirtualCloneDrive picked" - for letter in e f g h - do - ISO_MOUNT_ROOT=/cygdrive/$letter - test -d $ISO_MOUNT_ROOT || break - done - test -d $ISO_MOUNT_ROOT && die "cannot find the VirtualCloneDrive" -} - -iso_mount() -{ - my_img="$1" - - if test "$WINE" = "" - then - load_vcdmount - my_img_win="`$XXXPATH -w $my_img`" - try "$VCDMOUNT" /l=$letter "$my_img_win" - while ! test -d "$ISO_MOUNT_ROOT" - do - echo "Waiting for mount to finish" - sleep 1 - done - else - # Linux - case "$GUI-$DE" in - gnome) - 1-gksudo "mkdir -p $ISO_MOUNT_ROOT" - 1-gksudo "mount -o ro,loop $my_img $ISO_MOUNT_ROOT" - ;; - *) - sudo mkdir -p $ISO_MOUNT_ROOT - sudo mount -o ro,loop "$my_img" $ISO_MOUNT_ROOT - ;; - esac - fi -} - -iso_umount() -{ - if test "$WINE" = "" - then - # Windows - load_vcdmount - "$VCDMOUNT" /u - else - case "$GUI-$DE" in - gnome) - 1-gksudo "umount $ISO_MOUNT_ROOT" - 1-gksudo "rm -rf $ISO_MOUNT_ROOT" - ;; - *) - sudo umount $ISO_MOUNT_ROOT - sudo rm -rf $ISO_MOUNT_ROOT - ;; - esac - fi -} - -#---------------------------------------------------------------- - -load_vc2005trial() -{ - load_vcrun6 - load_dotnet20 - load_msxml6 - load_vcdmount - - warn "Downloading/checksumming Visual C++ 2005 Trial. This will take some time!" - download vc2005trial http://download.microsoft.com/download/6/f/5/6f5f7a01-50bb-422d-8742-c099c8896969/En_vs_2005_vsts_180_Trial.img f66ae07618d67e693ca0524d3582208c20e07823 - - iso_umount - iso_mount "$WINETRICKS_CACHE"/vc2005trial/En_vs_2005_vsts_180_Trial.img - - # FIXME: do this right - rm -f /cygdrive/c/Users/$USER/AppData/local/temp/dd_vsinstall80.txt - - if false && [ $WINETRICKS_QUIET ] - then - # Thanks to http://blogs.msdn.com/astebner/archive/2005/05/24/421314.aspx for unattended install method - # See also http://support.microsoft.com/?kbid=913445 - die "not implemented yet" - else - cd $ISO_MOUNT_ROOT/vs/Setup - try $WINE setup.exe - - # FIXME: unify these and make the windows one right - if test "$WINE" = "" - then - while ! tr -d '\000' < /cygdrive/c/Users/$USER/AppData/local/temp/dd_vsinstall80.txt | grep End_Session - do - sleep 10 - echo waiting for setup to finish - done - else - while ps $psargs | grep -q setup.exe - do - sleep 10 - echo waiting for setup to finish - done - fi - cd "$olddir" - fi - - iso_umount -} - -#---------------------------------------------------------------- - -load_vc2005sp1() -{ - if test ! -f "$programfilesdir_unix/Microsoft Visual Studio 8/Common7/Tools/vsvars32.bat" - then - die "install vc2005trial first (this verb will be merged into that once it's debugged)" - fi - - # http://www.microsoft.com/downloads/details.aspx?FamilyID=bb4a75ab-e2d4-4c96-b39d-37baf6b5b1dc - download vc2005sp1 http://download.microsoft.com/download/6/3/c/63c69e5d-74c9-48ea-b905-30ac3831f288/VS80sp1-KB926601-X86-ENU.exe d4b5c73253a7a4f5b4b389f41b94fea4a7247b57 - cd "$WINETRICKS_CACHE"/vc2005sp1 - try $WINE VS80sp1-KB926601-X86-ENU.exe - cd "$olddir" -} - -#---------------------------------------------------------------- - -load_vc2008trial() -{ - load_vcrun6 - load_dotnet20 - load_msxml6 - load_vcdmount - - warn "Visual C++ 2008 Trial does not yet work in Wine, and this recipe isn't quite debugged even in windows yet." - warn "Downloading/checksumming Visual C++ 2008 Trial. This will take some time!" - # http://www.microsoft.com/downloads/details.aspx?FamilyID=83c3a1ec-ed72-4a79-8961-25635db0192b - download vc2008trial http://download.microsoft.com/download/8/1/d/81d3f35e-fa03-485b-953b-ff952e402520/VS2008ProEdition90dayTrialENUX1435622.iso dfb601096f62fd75af6ad62b277be79793f53b56 - - iso_umount - iso_mount "$WINETRICKS_CACHE"/vc2008trial/VS2008ProEdition90dayTrialENUX1435622.iso - - # FIXME: do this right - rm -f /cygdrive/c/Users/$USER/AppData/local/temp/dd_vsinstall80.txt - - if true - then - cd $ISO_MOUNT_ROOT/Setup - try $WINE setup.exe - - # FIXME: unify these and make the windows one right - if test "$WINE" = "" - then - while ! tr -d '\000' < /cygdrive/c/Users/$USER/AppData/local/temp/dd_vsinstall80.txt | grep End_Session - do - sleep 10 - echo waiting for setup to finish - done - else - while ps $psargs | grep -q setup.exe - do - sleep 10 - echo waiting for setup to finish - done - fi - cd "$olddir" - fi - - iso_umount -} - -#---------------------------------------------------------------- - -load_vc2008sp1() -{ - echo pfdu is ${programfilesdir_unix} - echo setting FOO - FOO="${programfilesdir_unix}/Microsoft Visual Studio 9.0/Microsoft Visual Studio 2008 Professional Edition - ENU" - echo FOO set to $FOO - if test ! -d "$FOO" - then - die "install vc2008trial first (this verb will be merged into that once it's debugged)" - fi - - # http://www.microsoft.com/downloads/details.aspx?familyid=FBEE1648-7106-44A7-9649-6D9F6D58056E - download vc2008sp1 http://download.microsoft.com/download/f/6/7/f67fdf05-0586-413f-8231-affbe12f80a8/VS90sp1-KB945140-ENU.exe 91c146dffa96c6d8f9ceb2b5235b04349cf93ed9 - cd "$WINETRICKS_CACHE"/vc2008sp1 - try $WINE VS90sp1-KB945140-ENU.exe - cd "$olddir" -} - -#---------------------------------------------------------------- - -load_vlc() { - download . http://www.videolan.org/mirror-geo-redirect.php?file=vlc/0.8.6f/win32/vlc-0.8.6f-win32.exe b83558e4232c47a385dbc93ebdc2e6b942fbcfbf - try $WINE "$WINETRICKS_CACHE"/vlc-0.8.6f-win32.exe $WINETRICKS_S -} - -#---------------------------------------------------------------- - -load_wininet() { - # This is an updated wininet from IE 5.0.1. - # (Good enough for Active Worlds browser. Also helps "Avatar - Legends of the Arena" get to login screen.) - # See http://www.microsoft.com/downloads/details.aspx?familyid=6DEE32AB-B618-4FB3-9A45-CDD08162E167 - download . http://download.microsoft.com/download/ie5/Update/1/WIN98/EN-US/3725.exe b048e0b4e303298de3317b16f7008c43ca71ddfe - try cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE/3725.exe" - try cp -f "$WINETRICKS_TMP"/Wininet.dll "$WINDIR"/system32/wininet.dll - override_dlls native,builtin wininet -} - -#---------------------------------------------------------------- - -load_wme9() { - # See also http://www.microsoft.com/downloads/details.aspx?FamilyID=5691ba02-e496-465a-bba9-b2f1182cdf24 - download wme9 http://download.microsoft.com/download/8/1/f/81f9402f-efdd-439d-b2a4-089563199d47/WMEncoder.exe 7a3f8781f3e5705651992ef0150ee30bc1295116 - - try $WINE "$WINETRICKS_CACHE"/wme9/WMEncoder.exe $WINETRICKS_QUIET -} - -#---------------------------------------------------------------- - -load_wmp9() { - # Not really expected to work well yet; see - # http://appdb.winehq.org/appview.php?versionId=1449 - - load_wsh56 - - set_winver win2k - - # See also http://www.microsoft.com/windows/windowsmedia/player/9series/default.aspx - download wmp9 http://download.microsoft.com/download/1/b/c/1bc0b1a3-c839-4b36-8f3c-19847ba09299/MPSetup.exe 580536d10657fa3868de2869a3902d31a0de791b - - # Have to run twice; see http://bugs.winehq.org/show_bug.cgi?id=1886 - try $WINE "$WINETRICKS_CACHE"/wmp9/MPSetup.exe $WINETRICKS_QUIET - try $WINE "$WINETRICKS_CACHE"/wmp9/MPSetup.exe $WINETRICKS_QUIET - - # Also install the codecs - # See http://www.microsoft.com/downloads/details.aspx?FamilyID=06fcaab7-dcc9-466b-b0c4-04db144bb601 - download . http://download.microsoft.com/download/5/c/2/5c29d825-61eb-4b16-8eb8-58367d0464d5/WM9Codecs9x.exe 8b76bdcbea0057eb12b7966edab4b942ddacc253 - try $WINE "$WINETRICKS_CACHE"/WM9Codecs9x.exe $WINETRICKS_QUIET - - # Disable WMP's services, since they depend on unimplemented stuff, they trigger the GUI debugger several times - try_regedit /D "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdr4_2K" - try_regedit /D "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdralw2k" - - unset_winver -} - -#---------------------------------------------------------------- - -load_wmp10() { - # See http://appdb.winehq.org/appview.php?iVersionId=3212 - - load_wsh56 - - # See also http://www.microsoft.com/windows/windowsmedia/player/10 - download . http://download.microsoft.com/download/1/2/A/12A31F29-2FA9-4F50-B95D-E45EF7013F87/MP10Setup.exe 69862273a5d9d97b4a2e5a3bd93898d259e86657 - - # Crashes on exit, but otherwise ok; see http://bugs.winehq.org/show_bug.cgi?id=12633 - echo Executing $WINE "$WINETRICKS_CACHE"/MP10Setup.exe $WINETRICKS_QUIET - try $WINE "$WINETRICKS_CACHE"/MP10Setup.exe $WINETRICKS_QUIET - - # Also install the codecs - # See http://www.microsoft.com/downloads/details.aspx?FamilyID=06fcaab7-dcc9-466b-b0c4-04db144bb601 - download . http://download.microsoft.com/download/5/c/2/5c29d825-61eb-4b16-8eb8-58367d0464d5/WM9Codecs9x.exe 8b76bdcbea0057eb12b7966edab4b942ddacc253 - set_winver win2k - try $WINE "$WINETRICKS_CACHE"/WM9Codecs9x.exe $WINETRICKS_QUIET - - # Disable WMP's services, since they depend on unimplemented stuff, they trigger the GUI debugger several times - try_regedit /D "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdr4_2K" - try_regedit /D "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdralw2k" - - unset_winver -} - -#---------------------------------------------------------------- - -load_wenquanyi() { - # See http://wenq.org/enindex.cgi - # Donate at http://wenq.org/enindex.cgi?Download(en)#MicroHei_Beta if you want to help support free CJK font development - download . $SOURCEFORGE/wqy/wqy-microhei-0.2.0-beta.tar.gz 28023041b22b6368bcfae076de68109b81e77976 - cd "$WINETRICKS_TMP/" - gunzip -dc "$WINETRICKS_CACHE/wqy-microhei-0.2.0-beta.tar.gz" | tar -xf - - try mv wqy-microhei/wqy-microhei.ttc "$winefontsdir" - register_font wqy-microhei.ttc "WenQuanYi Micro Hei" - cd "$olddir" -} - -#---------------------------------------------------------------- - -load_wsh56() { - # If this is just a dependency check, don't re-install - if test $PACKAGE != wsh56 && test -f "$WINDIR"/system32/wscript.exe - then - echo "prerequisite wsh56 already installed, skipping" - return - fi - - load_vcrun6 - - # See also http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=C717D943-7E4B-4622-86EB-95A22B832CAA - download . http://download.microsoft.com/download/2/8/a/28a5a346-1be1-4049-b554-3bc5f3174353/WindowsXP-Windows2000-Script56-KB917344-x86-enu.exe f4692766caa3ee9b38d4166845486c6199a33457 - - try $WINE "$WINETRICKS_CACHE"/WindowsXP-Windows2000-Script56-KB917344-x86-enu.exe $WINETRICKS_QUIET -} - -#---------------------------------------------------------------- - -load_wsh56js() { - # This installs jscript 5.6 (but not vbscript) - # See also http://www.microsoft.com/downloads/details.aspx?FamilyID=16dd21a1-c4ee-4eca-8b80-7bd1dfefb4f8&DisplayLang=en - download . http://download.microsoft.com/download/b/c/3/bc3a0c36-fada-497d-a3de-8b0139766f3b/Windows2000-KB917344-56-x86-enu.exe add5f74c5bd4da6cfae47f8306de213ec6ed52c8 - - try $WINE "$WINETRICKS_CACHE"/Windows2000-KB917344-56-x86-enu.exe $WINETRICKS_QUIET -} - -#---------------------------------------------------------------- - -load_wsh56vb() { - # This installs vbscript 5.6 (but not jscript) - # See also http://www.microsoft.com/downloads/details.aspx?familyid=4F728263-83A3-464B-BCC0-54E63714BC75 - download . http://download.microsoft.com/download/IE60/Patch/Q318089/W9XNT4Me/EN-US/vbs56men.exe 48f14a93db33caff271da0c93f334971f9d7cb22 - - try $WINE "$WINETRICKS_CACHE"/vbs56men.exe $WINETRICKS_QUIET -} - -#---------------------------------------------------------------- - -load_xact() { - helper_directx_dl ; - - # xactengine?_?.dll, X3DAudio?_?.dll, xaudio?_?.dll, xapofx?_?.dll - extract - cabextract -d "$WINETRICKS_TMP" -L -F '*_xact_*x86*' "$WINETRICKS_CACHE"/$DIRECTX_NAME - cabextract -d "$WINETRICKS_TMP" -L -F '*_x3daudio_*x86*' "$WINETRICKS_CACHE"/$DIRECTX_NAME - cabextract -d "$WINETRICKS_TMP" -L -F '*_xaudio_*x86*' "$WINETRICKS_CACHE"/$DIRECTX_NAME - for x in `ls "$WINETRICKS_TMP"/*.cab` - do - cabextract -d "$WINDIR"/system32 -L -F '*.dll' "$x" - done - - # xactengine?_?.dll, xaudio?_?.dll - register - for x in `ls "$WINDIR"/system32/xactengine* "$WINDIR"/system32/xaudio*` - do - try $WINE regsvr32 `basename $x` - done -} - -#---------------------------------------------------------------- - -load_xvid() { - # xvid - load_vcrun6 - download . http://www.koepi.info/Xvid-1.2.2-07062009.exe 435203e7f713c4484ca4f50f43e847f3dc118962 - try $WINE "$WINETRICKS_CACHE"/Xvid-1.2.2-07062009.exe $WINETRICKS_SILENT -} - -#---------------------------------------------------------------- - -print_version() { - echo "$VERSION" -} - -#--------- Main program ----------------------------------------- - -# On Solaris, choose more modern commands (needed for id -u). -case `uname -s` in -SunOS) PATH="/usr/xpg6/bin:/usr/xpg4/bin:$PATH" - ;; -esac - -case "$1" in --V|--version) - echo "Winetricks version $VERSION. (C) 2007-2009 Dan Kegel et al. LGPL." - exit 0 - ;; -esac - -detectDE - -GUI=0 -case x"$1" in -x) GUI=1 ;; -x-h|x--help|xhelp) usage ; exit 1 ;; -esac - -case "$OS" in - "Windows_NT") - ;; - *) - # Prevent running with wrong user id. - # It's bad to create files as the wrong user! - die_if_user_not_dirowner "$WINEPREFIX" - die_if_user_not_dirowner "$WINETRICKS_CACHE" - - if [ ! -x "`which "$WINE"`" ] - then - die "Cannot find wine ($WINE)" - fi - - # Create wineprefix if not already there - test -d "$WINEPREFIX" || WINEDLLOVERRIDES=mshtml= $WINE cmd /c echo yes > /dev/null 2>&1 - ;; -esac - -mkdir -p "$WINETRICKS_TMP" - -case $GUI in -1) dogui ; set $todo ;; -esac - -mkdir -p "$WINETRICKS_CACHE" -olddir=`pwd` -# Clean up after failed runs, if needed -rm -rf "$WINETRICKS_TMP"/* - -# The folder-name is localized! -programfilesdir_win="`unset WINEDEBUG; WINEDLLOVERRIDES=mshtml= $WINE cmd.exe /c echo "%ProgramFiles%"`" -test x"$programfilesdir_win" != x || die "$WINE cmd.exe /c echo '%ProgramFiles%' returned empty string" -programfilesdir_unix="`unset WINEDEBUG; $XXXPATH -u "$programfilesdir_win" | tr -d '\015' `" -test x"$programfilesdir_unix" != x || die "winepath -u $programfilesdir_win returned empty string" -winetricks_tmp_win="`$XXXPATH -w "$WINETRICKS_TMP"`" - -# (Fixme: get fonts path from SHGetFolderPath -# See also http://blogs.msdn.com/oldnewthing/archive/2003/11/03/55532.aspx) -# -# Did the user rename Fonts to fonts? -if test ! -d "$WINDIR"/Fonts && test -d "$WINDIR"/fonts -then - winefontsdir="$WINDIR"/fonts -else - winefontsdir="$WINDIR"/Fonts -fi - -# Mac folks tend to not have sha1sum, but we can make do with openssl -if [ -x "`which sha1sum`" ] -then - SHA1SUM="sha1sum" -elif [ -x "`which openssl`" ] -then - SHA1SUM="openssl dgst -sha1" -else - die "No sha1sum utility available." -fi - -if [ ! -x "`which cabextract`" ] -then - die "Cannot find cabextract. Please install it (e.g. 'sudo apt-get install cabextract' or 'sudo yum install cabextract')." -fi - -if [ ! -x "`which unzip`" ] -then - die "Cannot find unzip. Please install it (e.g. 'sudo apt-get install unzip' or 'sudo yum install unzip')." -fi - -while test "$1" != "" -do - PACKAGE=$1 - case $1 in - -q) WINETRICKS_QUIET="/q" - WINETRICKS_QUIET_T="/qt" # Microsoft Control Pad - WINETRICKS_UNIXQUIET="-q" - WINETRICKS_SILENT="/silent" - WINETRICKS_S="/S" # for NSIS installers - WINEDEBUG=${WINEDEBUG:-"fixme-all"} - export WINEDEBUG - ;; - -v) set -x;; - art2kmin|art2k7min) load_art2kmin;; - atmlib) load_atmlib;; - autohotkey|ahk) load_autohotkey;; - cmake) load_cmake;; - comctl32.ocx) load_comctl32ocx;; - comctl32|cc580) load_cc580;; - colorprofile) load_colorprofile;; - controlpad|fm20) load_controlpad;; - corefonts) load_corefonts;; - cygwin) load_cygwin;; - d3dx9) load_d3dx9;; - dcom98) load_dcom98;; - dinput8) load_dinput8;; - dirac|dirac0.8) load_dirac08;; - directplay|dxplay|dplay) load_directplay;; - directx9) load_directx9;; - divx) load_divx;; - dotnet1|dotnet11) load_dotnet11; load_fontfix;; - dotnet11sdk) load_dotnet11sdk;; - dotnet2|dotnet20) load_dotnet20; load_fontfix;; - dotnet20sdk) load_dotnet20sdk;; - dotnet20sp2) load_dotnet20sp2; load_fontfix;; - dotnet3|dotnet30) load_dotnet30; load_fontfix;; - dotnet35) load_dotnet35; load_fontfix;; - droid) load_droid;; - ffdshow) load_ffdshow;; - firefox|firefox3) load_firefox;; - flash) load_flash;; - fontfix) load_fontfix;; - fontsmooth-bgr|fs-bgr) load_fs_bgr;; - fontsmooth-disable|fs-disable) load_fs_disable;; - fontsmooth-gray|fontsmooth-grayscale|fontsmooth-enable|fs-enable) load_fs_grayscale;; - fontsmooth-rgb|fs-rgb|fs-cleartype) load_fs_rgb;; - gdiplus) load_gdiplus;; - gecko) load_gecko;; - gecko-dbg|geckodbg|gecko_dbg|geckodebug|gecko_debug|gecko-debug) load_gecko_dbg;; - glsl-disable) load_glsl_disable;; - glsl-enable) load_glsl_enable;; - hosts) load_hosts;; - icodecs) load_icodecs;; - ie6) load_ie6;; - ie7) load_ie7;; - jet40) load_jet40;; - kde) load_kde;; - liberation) load_liberation;; - mdac25) load_mdac25;; - mdac27) load_mdac27;; - mdac28) load_mdac28;; - mfc40) load_mfc40;; - mingw|mingw-min|mingw_min) load_mingw_min;; - mingw-gdb|mingw_gdb) load_mingw_gdb;; - mono19|mono20) load_mono20;; - mono22) load_mono22;; - mono24) load_mono24;; - mozillabuild) load_mozillabuild;; - mpc) load_mpc;; - msi2) load_msi2;; - mshflxgd) load_mshflxgd;; - msls31) load_msls31;; - msmask) load_msmask;; - msscript) load_msscript;; - msxml3) load_msxml3;; - msxml4) load_msxml4;; - msxml6) load_msxml6;; - ogg) load_ogg;; - ole2) load_ole2;; - openwatcom|watcom) load_openwatcom;; - pdh) load_pdh;; - physx) load_physx;; - psdk2003) load_psdk2003;; - psdkvista) load_psdkvista;; - psdkwin7) load_psdkwin7;; - python|python26) load_python26;; - python-comtypes|pythoncom|python-com|pythoncomtypes) load_python_comtypes;; - quicktime72) load_quicktime72;; - riched20) load_riched20;; - riched30) load_riched30;; - richtx32) load_richtx32;; - shockwave) load_shockwave;; - tahoma) load_tahoma;; - urlmon) load_urlmon;; - vbrun200|vb2run) load_vb2run;; - vbrun300|vb3run) load_vb3run;; - vbrun400|vb4run) load_vb4run;; - vbrun500|vbvm50|vb5run) load_vbvm50;; - vbrun600|vbrun60|vb6run) load_vbrun60;; - vc2003toolkit) load_vc2003toolkit;; - vc2005express) load_vc2005express;; - vc2005expresssp1) load_vc2005expresssp1;; - vc2005sp1) load_vc2005sp1;; - vc2008sp1) load_vc2008sp1;; - vc2005trial) load_vc2005trial;; - vc2008trial) load_vc2008trial;; - vcrun600|vcrun60|vcrun6|mfc42) load_vcrun6;; - vcrun60sp6|vcrun6sp6) load_vcrun6sp6;; - vcrun2003) load_vcrun2003;; - vcrun2005|vcrun2005sp1) load_vcrun2005;; - vcrun2008|vcrun2008sp1) load_vcrun2008;; - vjrun20) load_vjrun20;; - vlc) load_vlc;; - wenquanyi) load_wenquanyi;; - wininet) load_wininet;; - wme9) load_wme9;; - wmp9) load_wmp9;; - wmp10) load_wmp10;; - wsh56) load_wsh56;; - wsh56js) load_wsh56js;; - wsh56vb) load_wsh56vb;; - xact|xactengine|x3daudio) load_xact;; - xvid) load_xvid;; - - allcodecs|allvcodecs) load_vcrun6; load_ffdshow; load_xvid; load_icodecs;; - allfonts) load_corefonts; load_tahoma; load_liberation; load_droid; load_wenquanyi;; - fakeie6) set_fakeie6;; - heapcheck) set_heapcheck;; - native_mdac) set_native_mdac;; - native_oleaut32) override_dlls native,builtin oleaut32;; - nocrashdialog) disable_crashdialog;; - orm=backbuffer|backbuffer) set_orm backbuffer;; - orm=fbo|fbo) set_orm fbo;; - orm=pbuffer|pbuffer) set_orm pbuffer;; - sandbox) sandbox;; - sound=alsa|alsa) set_sound_driver alsa;; - sound=audioio|audioio) set_sound_driver audioio;; - sound=coreaudio|coreaudio) set_sound_driver coreaudio;; - sound=esound|esound) set_sound_driver esound;; - sound=jack|jack) set_sound_driver jack;; - sound=nas|nas) set_sound_driver nas;; - sound=oss|oss) set_sound_driver oss;; - version) print_version;; - volnum) volnum;; - winver=nt40|nt40) set_winver nt40;; - winver=win98|win98) set_winver win98;; - winver=win2k|win2k) set_winver win2k;; - winver=winxp|winxp) set_winver winxp;; - winver=vista|vista) set_winver vista;; - winver=) unset_winver;; - *) echo Unknown arg $1; usage ; exit 1;; - esac - # Provide a bit of feedback - test "$WINETRICKS_QUIET" = "" && case $1 in - -q) echo Setting quiet mode;; - -v) echo Setting verbose mode;; - *) echo "Install of $1 done" ;; - esac - shift - # cleanup - rm -rf "$WINETRICKS_TMP"/* -done - - # remove the temp directory - rm -rf "$WINETRICKS_TMP" - -test "$WINETRICKS_QUIET" = "" && echo winetricks done. || true diff --git a/bin/_old/old/xw3 b/bin/_old/old/xw3 deleted file mode 100755 index 58b50853..00000000 --- a/bin/_old/old/xw3 +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash - -# The XW3 website generator. -# -# This scipts generates a complete website in plain HTML from a source- -# directory containing all content. -# -# You don't need Apache when using this Software. -# -# Licensed under the GNU Public License (GPL) -# -# Copyright: Johannes Findeisen - - -parseFile() -{ - #$1 - echo $1 - echo $2 - - if [ $1 = php ]; then - echo $PARSER[$1] - #$2 >> $3 - fi -} - -if [ ! $1 ]; then - echo "Usage: xw3 /path/to/projectroot" - exit -fi - -PROJECTPATH=$1 - -if [ ! -e $PROJECTPATH ] || [ ! -e $PROJECTPATH/xw3.conf ]; then - echo "[xw3 error]: Projectpath: $PROJECTPATH does not exist or you have no xw3.conf in there. It seems not to be a xw3 project!" - exit -fi - -. $PROJECTPATH/xw3.conf - -rm -Rf $OUTPUTDIR/* -if [ ! -e $OUTPUTDIR ]; then - mkdir $OUTPUTDIR -fi - -for i in 1 2 3 4 5; do - echo $i - #sleep 1 -done - -for file in `find $PROJECTPATH/input/ -type f -print` -do - - filename=`basename $file` - dirname=`dirname $file` - dirextension=`echo $dirname | sed -e "s|\${PROJECTPATH}\/input||"` - #if [ -z $dirextension ]; then - # dirextension="." - #fi - ext=${filename##*.} - filenamewoext=${filename%.*} - newname=$filenamewoext.$OUTPUTEXTENSION - - if [ -d $PROJECTPATH/input$dirextension ]; then - mkdir -p $OUTPUTDIR$dirextension - fi - - if [ $ext = php ]; then - - cat $PROJECTPATH/head.html > $OUTPUTDIR$dirextension/$newname - - parseFile php $file $OUTPUTDIR$dirextension/$newname - - cat $PROJECTPATH/foot.html >> $OUTPUTDIR$dirextension/$newname - - # cat $PROJECTPATH/head.html > $OUTPUTDIR$dirextension/$newname - # echo `$PHPBIN $file` >> $OUTPUTDIR$dirextension/$newname - # cat $PROJECTPATH/foot.html >> $OUTPUTDIR$dirextension/$newname - - elif [ $ext = html ] || [ $ext = htm ]; then - cat $PROJECTPATH/head.html > $OUTPUTDIR$dirextension/$newname - cat $PROJECTPATH/input$dirextension/$filename >> $OUTPUTDIR$dirextension/$newname - cat $PROJECTPATH/foot.html >> $OUTPUTDIR$dirextension/$newname - elif [ $ext = jpeg ] || [ $ext = jpg ] || [ $ext = png ] || [ $ext = gif ]; then - cp $PROJECTPATH/input$dirextension/$filename $OUTPUTDIR$dirextension/$filename - elif [ $ext = "" ]; then - cat $PROJECTPATH/head.html > $OUTPUTDIR$dirextension/$newname - echo `sh -c $PROJECTPATH/input$dirextension/$filename` >> $OUTPUTDIR$dirextension/$newname - cat $PROJECTPATH/foot.html >> $OUTPUTDIR$dirextension/$newname - fi - # if --verbose - echo $dirextension/$newname"... Finished!" -done - -cp -r $PROJECTPATH/content/* $OUTPUTDIR/ - -echo "Finished... ;)" diff --git a/bin/_old/old/xw32 b/bin/_old/old/xw32 deleted file mode 100755 index 5642989d..00000000 --- a/bin/_old/old/xw32 +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash - -# The XW3 website generator. -# -# This scipts generates a complete website in plain HTML from a source- -# directory containing all content. -# -# You don't need Apache when using this Software. -# -# Licensed under the GNU Public License (GPL) -# -# Copyright: Johannes Findeisen - -# Commandline parameter / .xw3 settings -#PROJECTDIR - use this if .xw3 exists -PROJECTPATH=/home/hanez/wg -OUTPUTEXTENSION=html -#UPLOAD=ssh,scp,ftp -#HOST=hanez.org -#USERNAME=Foo -#PASSWORD=Bar - -# LANGUAGE FORMAT -# 0 = /path/to/file/filename.LN.html (default) -# 1 = /LN/path/to/file/filename.html -# LN = the language code you use e.g. en, de etc. -LANGUAGE_FORMAT=0 - -# Static configuration variables -OUTPUTDIR=$PROJECTPATH/output -PHPBIN=/usr/bin/php -PERLBIN=/usr/bin/perl -PYTHONBIN=/usr/bin/python - -# Execute -rm -Rf $OUTPUTDIR/* -if [ ! -e $dirname ]; then - mkdir $OUTPUTDIR -fi - -for file in `find $PROJECTPATH/input/ -type f -print` -do - - filename=`basename $file` - dirname=`dirname $file` - dirextension=`echo $dirname | sed -e "s|\${PROJECTPATH}\/input||"` - #if [ -z $dirextension ]; then - # dirextension="." - #fi - ext=${filename##*.} - filenamewoext=${filename%.*} - newname=$filenamewoext.$OUTPUTEXTENSION - - if [ -d $PROJECTPATH/input$dirextension ]; then - mkdir -p $OUTPUTDIR$dirextension - fi - - if [ $ext = php ]; then - cat $PROJECTPATH/head.html > $OUTPUTDIR$dirextension/$newname - echo `$PHPBIN $file` >> $OUTPUTDIR$dirextension/$newname - cat $PROJECTPATH/foot.html >> $OUTPUTDIR$dirextension/$newname - elif [ $ext = html ] || [ $ext = htm ]; then - cat $PROJECTPATH/head.html > $OUTPUTDIR$dirextension/$newname - cat $PROJECTPATH/input$dirextension/$filename >> $OUTPUTDIR$dirextension/$newname - cat $PROJECTPATH/foot.html >> $OUTPUTDIR$dirextension/$newname - elif [ $ext = jpeg ] || [ $ext = jpg ] || [ $ext = png ] || [ $ext = gif ]; then - cp $PROJECTPATH/input$dirextension/$filename $OUTPUTDIR$dirextension/$filename - elif [ $ext = "" ]; then - cat $PROJECTPATH/head.html > $OUTPUTDIR$dirextension/$newname - echo `sh -c $PROJECTPATH/input$dirextension/$filename` >> $OUTPUTDIR$dirextension/$newname - cat $PROJECTPATH/foot.html >> $OUTPUTDIR$dirextension/$newname - fi - # if --verbose - echo $dirextension/$newname"... Finished!" -done - -cp -r $PROJECTPATH/content/* $OUTPUTDIR/ - -echo "Finished... ;)" diff --git a/bin/_old/old/you@hanez.org.sh b/bin/_old/old/you@hanez.org.sh deleted file mode 100755 index 29465600..00000000 --- a/bin/_old/old/you@hanez.org.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -echo "Johannes Findeisen | Lokstedter Weg 100 | 20251 Hamburg | Germany" -echo "" -echo "Let's rock the web!!!" -echo "(Lassen Sie uns das Netz schaukeln!!!) translated by google.com" -echo "" -echo "Key Lookup:" -echo " http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0xF58D4435" -gpg --fingerprint you@hanez.org -#echo "Take a look @:" -#echo "http://www.againsttcpa.com/ | http://petition.eurolinux.org/ | http://www.opensource.org/ | http://www.gentoo.org/ | http://kde.org/" diff --git a/bin/_old/old/zynkx b/bin/_old/old/zynkx deleted file mode 100755 index ef236c6a..00000000 --- a/bin/_old/old/zynkx +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec /usr/bin/mono /home/hanez/projects/zynk/Zynk.exe "$@" diff --git a/bin/_old/old/zysync b/bin/_old/old/zysync deleted file mode 100755 index 2bcfbc26..00000000 --- a/bin/_old/old/zysync +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -rsync --delete -r -v -z /home/www/zynk.org/ zynk.org:/var/www/zynk.org/www/ --exclude=*~ --exclude=.svn --exclude=tmp.txt --exclude=cache/* --exclude=comments/* --perms --group --times diff --git a/bin/_old/old2/automysqlbackup-2.5.1-01.sh b/bin/_old/old2/automysqlbackup-2.5.1-01.sh deleted file mode 100755 index 30603008..00000000 --- a/bin/_old/old2/automysqlbackup-2.5.1-01.sh +++ /dev/null @@ -1,789 +0,0 @@ -#!/bin/bash -# -# MySQL Backup Script -# VER. 2.5.1 - http://sourceforge.net/projects/automysqlbackup/ -# Copyright (c) 2002-2003 wipe_out@lycos.co.uk -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#===================================================================== -#===================================================================== -# Set the following variables to your system needs -# (Detailed instructions below variables) -#===================================================================== -#set -x -CONFIGFILE="/etc/automysqlbackup/automysqlbackup.conf" - -if [ -r ${CONFIGFILE} ]; then - # Read the configfile if it's existing and readable - source ${CONFIGFILE} -else - # do inline-config otherwise - # To create a configfile just copy the code between "### START CFG ###" and "### END CFG ###" - # to /etc/automysqlbackup/automysqlbackup.conf. After that you're able to upgrade this script - # (copy a new version to its location) without the need for editing it. - ### START CFG ### - # Username to access the MySQL server e.g. dbuser - USERNAME=root - - # Password to access the MySQL server e.g. password - PASSWORD=root - - # Host name (or IP address) of MySQL server e.g localhost - DBHOST=127.0.0.1 - - # List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3" - DBNAMES="all" - - # Backup directory location e.g /backups - BACKUPDIR="/home/backup/db" - - # Mail setup - # What would you like to be mailed to you? - # - log : send only log file - # - files : send log file and sql files as attachments (see docs) - # - stdout : will simply output the log to the screen if run manually. - # - quiet : Only send logs if an error occurs to the MAILADDR. - MAILCONTENT="log" - - # Set the maximum allowed email size in k. (4000 = approx 5MB email [see docs]) - MAXATTSIZE="4000" - - # Email Address to send mail to? (user@domain.com) - MAILADDR="you@hanez.org" - - - # ============================================================ - # === ADVANCED OPTIONS ( Read the doc's below for details )=== - #============================================================= - - # List of DBBNAMES for Monthly Backups. - MDBNAMES="${DBNAMES}" - - # List of DBNAMES to EXLUCDE if DBNAMES are set to all (must be in " quotes) - DBEXCLUDE="" - - # Include CREATE DATABASE in backup? - CREATE_DATABASE=yes - - # Separate backup directory and file for each DB? (yes or no) - SEPDIR=yes - - # Which day do you want weekly backups? (1 to 7 where 1 is Monday) - DOWEEKLY=6 - - # Choose Compression type. (gzip or bzip2) - COMP=gzip - - # Compress communications between backup server and MySQL server? - COMMCOMP=no - - # Additionally keep a copy of the most recent backup in a seperate directory. - LATEST=no - - # The maximum size of the buffer for client/server communication. e.g. 16MB (maximum is 1GB) - MAX_ALLOWED_PACKET= - - # For connections to localhost. Sometimes the Unix socket file must be specified. - SOCKET= - - # Command to run before backups (uncomment to use) - #PREBACKUP="/etc/mysql-backup-pre" - - # Command run after backups (uncomment to use) - #POSTBACKUP="/etc/mysql-backup-post" - ### END CFG ### -fi - -#===================================================================== -# Options documantation -#===================================================================== -# Set USERNAME and PASSWORD of a user that has the appropriate permissions -# to backup ALL databases. (See mysql documentation for details) -# NEW in 2.5.1: -# - If USERNAME is set to "debian" and PASSWORD is unset or "" obtain -# them from the file /etc/mysql/debian.cnf -# - First command line option "-c" for configfile -# - Interpretable Exit-States: -# 1: given configfile is not readable or does not exist -# 2: unknown option -# -# Set the DBHOST option to the server you wish to backup, leave the -# default to backup "this server".(to backup multiple servers make -# copies of this file and set the options for that server) -# -# Put in the list of DBNAMES(Databases)to be backed up. If you would like -# to backup ALL DBs on the server set DBNAMES="all".(if set to "all" then -# any new DBs will automatically be backed up without needing to modify -# this backup script when a new DB is created). -# -# If the DB you want to backup has a space in the name replace the space -# with a % e.g. "data base" will become "data%base" -# NOTE: Spaces in DB names may not work correctly when SEPDIR=no. -# -# You can change the backup storage location from /backups to anything -# you like by using the BACKUPDIR setting.. -# -# The MAILCONTENT and MAILADDR options and pretty self explanitory, use -# these to have the backup log mailed to you at any email address or multiple -# email addresses in a space seperated list. -# (If you set mail content to "log" you will require access to the "mail" program -# on your server. If you set this to "files" you will have to have mutt installed -# on your server. If you set it to "stdout" it will log to the screen if run from -# the console or to the cron job owner if run through cron. If you set it to "quiet" -# logs will only be mailed if there are errors reported. ) -# -# MAXATTSIZE sets the largest allowed email attachments total (all backup files) you -# want the script to send. This is the size before it is encoded to be sent as an email -# so if your mail server will allow a maximum mail size of 5MB I would suggest setting -# MAXATTSIZE to be 25% smaller than that so a setting of 4000 would probably be fine. -# -# Finally copy automysqlbackup.sh to anywhere on your server and make sure -# to set executable permission. You can also copy the script to -# /etc/cron.daily to have it execute automatically every night or simply -# place a symlink in /etc/cron.daily to the file if you wish to keep it -# somwhere else. -# NOTE:On Debian copy the file with no extention for it to be run -# by cron e.g just name the file "automysqlbackup" -# -# Thats it.. -# -# -# === Advanced options doc's === -# -# The list of MDBNAMES is the DB's to be backed up only monthly. You should -# always include "mysql" in this list to backup your user/password -# information along with any other DBs that you only feel need to -# be backed up monthly. (if using a hosted server then you should -# probably remove "mysql" as your provider will be backing this up) -# NOTE: If DBNAMES="all" then MDBNAMES has no effect as all DBs will be backed -# up anyway. -# -# If you set DBNAMES="all" you can configure the option DBEXCLUDE. Other -# wise this option will not be used. -# This option can be used if you want to backup all dbs, but you want -# exclude some of them. (eg. a db is to big). -# -# Set CREATE_DATABASE to "yes" (the default) if you want your SQL-Dump to create -# a database with the same name as the original database when restoring. -# Saying "no" here will allow your to specify the database name you want to -# restore your dump into, making a copy of the database by using the dump -# created with automysqlbackup. -# NOTE: Not used if SEPDIR=no -# -# The SEPDIR option allows you to choose to have all DBs backed up to -# a single file (fast restore of entire server in case of crash) or to -# seperate directories for each DB (each DB can be restored seperately -# in case of single DB corruption or loss). -# -# To set the day of the week that you would like the weekly backup to happen -# set the DOWEEKLY setting, this can be a value from 1 to 7 where 1 is Monday, -# The default is 6 which means that weekly backups are done on a Saturday. -# -# COMP is used to choose the copmression used, options are gzip or bzip2. -# bzip2 will produce slightly smaller files but is more processor intensive so -# may take longer to complete. -# -# COMMCOMP is used to enable or diable mysql client to server compression, so -# it is useful to save bandwidth when backing up a remote MySQL server over -# the network. -# -# LATEST is to store an additional copy of the latest backup to a standard -# location so it can be downloaded bt thrid party scripts. -# -# If the DB's being backed up make use of large BLOB fields then you may need -# to increase the MAX_ALLOWED_PACKET setting, for example 16MB.. -# -# When connecting to localhost as the DB server (DBHOST=localhost) sometimes -# the system can have issues locating the socket file.. This can now be set -# using the SOCKET parameter.. An example may be SOCKET=/private/tmp/mysql.sock -# -# Use PREBACKUP and POSTBACKUP to specify Per and Post backup commands -# or scripts to perform tasks either before or after the backup process. -# -# -#===================================================================== -# Backup Rotation.. -#===================================================================== -# -# Daily Backups are rotated weekly.. -# Weekly Backups are run by default on Saturday Morning when -# cron.daily scripts are run...Can be changed with DOWEEKLY setting.. -# Weekly Backups are rotated on a 5 week cycle.. -# Monthly Backups are run on the 1st of the month.. -# Monthly Backups are rotated on a 5 month cycle... -# It may be a good idea to copy Monthly backups offline or to another -# server.. -# -#===================================================================== -# Please Note!! -#===================================================================== -# -# I take no resposibility for any data loss or corruption when using -# this script.. -# This script will not help in the event of a hard drive crash. If a -# copy of the backup has not be stored offline or on another PC.. -# You should copy your backups offline regularly for best protection. -# -# Happy backing up... -# -#===================================================================== -# Restoring -#===================================================================== -# Firstly you will need to uncompress the backup file. -# eg. -# gunzip file.gz (or bunzip2 file.bz2) -# -# Next you will need to use the mysql client to restore the DB from the -# sql file. -# eg. -# mysql --user=username --pass=password --host=dbserver database < /path/file.sql -# or -# mysql --user=username --pass=password --host=dbserver -e "source /path/file.sql" database -# -# NOTE: Make sure you use "<" and not ">" in the above command because -# you are piping the file.sql to mysql and not the other way around. -# -# Lets hope you never have to use this.. :) -# -#===================================================================== -# Change Log -#===================================================================== -# -# VER 2.5.1-01 - (2010-07-06) -# - Fixed pathname bug item #3025849 (by Johannes Kolter) -# VER 2.5.1 - (2010-07-04) -# - Added support for default and optional config file (by Johannes Kolter) -# - Rotating after backup was successful whith find(1) (by Johannes Kolter) -# - Implementation of Variables containing full path to binaries to -# avoid possibly confusion with aliases or builtins. (by Johannes Kolter) -# - Fixed bug where weekly backups were not being rotated. -# Added rotation of 5 monthly backups -# Now all old backups are deleted, not only the most recent one -# (inspired by oleg@bintime.com) -# - Use Debian special-file to access database (by Johannes Kolter) -# - Fixed bug ID: 1438565 -# Moved IO redirection to a place before decicions are made and actions are taken. -# (inspired by Derk Bernhardt) -# - Fixed bug ID: #3000316 (reported by Sascha Feldhorst) -# - Fixed bug ID: #1529458 (reported by Natalie ( njwood )) -# - Fixed bug ID: #1548919 (reported by Piotr Kuczynski) -# VER 2.5 - (2006-01-15) -# Added support for setting MAXIMUM_PACKET_SIZE and SOCKET parameters (suggested by Yvo van Doorn) -# VER 2.4 - (2006-01-23) -# Fixed bug where weekly backups were not being rotated. (Fix by wolf02) -# Added hour an min to backup filename for the case where backups are taken multiple -# times in a day. NOTE This is not complete support for mutiple executions of the script -# in a single day. -# Added MAILCONTENT="quiet" option, see docs for details. (requested by snowsam) -# Updated path statment for compatibility with OSX. -# Added "LATEST" to additionally store the last backup to a standard location. (request by Grant29) -# VER 2.3 - (2005-11-07) -# Better error handling and notification of errors (a long time coming) -# Compression on Backup server to MySQL server communications. -# VER 2.2 - (2004-12-05) -# Changed from using depricated "-N" to "--skip-column-names". -# Added ability to have compressed backup's emailed out. (code from Thomas Heiserowski) -# Added maximum attachment size setting. -# VER 2.1 - (2004-11-04) -# Fixed a bug in daily rotation when not using gzip compression. (Fix by Rob Rosenfeld) -# VER 2.0 - (2004-07-28) -# Switched to using IO redirection instead of pipeing the output to the logfile. -# Added choice of compression of backups being gzip of bzip2. -# Switched to using functions to facilitate more functionality. -# Added option of either gzip or bzip2 compression. -# VER 1.10 - (2004-07-17) -# Another fix for spaces in the paths (fix by Thomas von Eyben) -# Fixed bug when using PREBACKUP and POSTBACKUP commands containing many arguments. -# VER 1.9 - (2004-05-25) -# Small bug fix to handle spaces in LOGFILE path which contains spaces (reported by Thomas von Eyben) -# Updated docs to mention that Log email can be sent to multiple email addresses. -# VER 1.8 - (2004-05-01) -# Added option to make backups restorable to alternate database names -# meaning that a copy of the database can be created (Based on patch by Rene Hoffmann) -# Seperated options into standard and advanced. -# Removed " from single file dump DBMANES because it caused an error but -# this means that if DB's have spaces in the name they will not dump when SEPDIR=no. -# Added -p option to mkdir commands to create multiple subdirs without error. -# Added disk usage and location to the bottom of the backup report. -# VER 1.7 - (2004-04-22) -# Fixed an issue where weelky backups would only work correctly if server -# locale was set to English (issue reported by Tom Ingberg) -# used "eval" for "rm" commands to try and resolve rotation issues. -# Changed name of status log so multiple scripts can be run at the same time. -# VER 1.6 - (2004-03-14) -# Added PREBACKUP and POSTBACKUP command functions. (patch by markpustjens) -# Added support for backing up DB's with Spaces in the name. -# (patch by markpustjens) -# VER 1.5 - (2004-02-24) -# Added the ability to exclude DB's when the "all" option is used. -# (Patch by kampftitan) -# VER 1.4 - (2004-02-02) -# Project moved to Sourceforge.net -# VER 1.3 - (2003-09-25) -# Added support for backing up "all" databases on the server without -# having to list each one seperately in the configuration. -# Added DB restore instructions. -# VER 1.2 - (2003-03-16) -# Added server name to the backup log so logs from multiple servers -# can be easily identified. -# VER 1.1 - (2003-03-13) -# Small Bug fix in monthly report. (Thanks Stoyanski) -# Added option to email log to any email address. (Inspired by Stoyanski) -# Changed Standard file name to .sh extention. -# Option are set using yes and no rather than 1 or 0. -# VER 1.0 - (2003-01-30) -# Added the ability to have all databases backup to a single dump -# file or seperate directory and file for each database. -# Output is better for log keeping. -# VER 0.6 - (2003-01-22) -# Bug fix for daily directory (Added in VER 0.5) rotation. -# VER 0.5 - (2003-01-20) -# Added "daily" directory for daily backups for neatness (suggestion by Jason) -# Added DBHOST option to allow backing up a remote server (Suggestion by Jason) -# Added "--quote-names" option to mysqldump command. -# Bug fix for handling the last and first of the year week rotation. -# VER 0.4 - (2002-11-06) -# Added the abaility for the script to create its own directory structure. -# VER 0.3 - (2002-10-01) -# Changed Naming of Weekly backups so they will show in order. -# VER 0.2 - (2002-09-27) -# Corrected weekly rotation logic to handle weeks 0 - 10 -# VER 0.1 - (2002-09-21) -# Initial Release -# -#===================================================================== -#===================================================================== -#===================================================================== -# -# Should not need to be modified from here down!! -# -#===================================================================== -#===================================================================== -#===================================================================== -# -# Full pathname to binaries to avoid problems with aliases and builtins etc. -# -WHICH="`which which`" -AWK="`${WHICH} gawk`" -LOGGER="`${WHICH} logger`" -ECHO="`${WHICH} echo`" -CAT="`${WHICH} cat`" -BASENAME="`${WHICH} basename`" -DATEC="`${WHICH} date`" -DU="`${WHICH} du`" -EXPR="`${WHICH} expr`" -FIND="`${WHICH} find`" -RM="`${WHICH} rm`" -MYSQL="`${WHICH} mysql`" -MYSQLDUMP="`${WHICH} mysqldump`" -GZIP="`${WHICH} gzip`" -BZIP2="`${WHICH} bzip2`" -CP="`${WHICH} cp`" -HOSTNAMEC="`${WHICH} hostname`" -SED="`${WHICH} sed`" -GREP="`${WHICH} grep`" - -function get_debian_pw() { - if [ -r /etc/mysql/debian.cnf ]; then - eval $(${AWK} ' - ! user && /^[[:space:]]*user[[:space:]]*=[[:space:]]*/ { - print "USERNAME=" gensub(/.+[[:space:]]+([^[:space:]]+)[[:space:]]*$/, "\\1", "1"); user++ - } - ! pass && /^[[:space:]]*password[[:space:]]*=[[:space:]]*/ { - print "PASSWORD=" gensub(/.+[[:space:]]+([^[:space:]]+)[[:space:]]*$/, "\\1", "1"); pass++ - }' /etc/mysql/debian.cnf - ) - else - ${LOGGER} "${PROGNAME}: File \"/etc/mysql/debian.cnf\" not found." - exit 1 - fi -} - -[ "x${USERNAME}" = "xdebian" -a "x${PASSWORD}" = "x" ] && get_debian_pw - -while [ $# -gt 0 ]; do - case $1 in - -c) - if [ -r "$2" ]; then - source "$2" - shift 2 - else - ${ECHO} "Ureadable config file \"$2\"" - exit 1 - fi - ;; - *) - ${ECHO} "Unknown Option \"$1\"" - exit 2 - ;; - esac -done - -export LC_ALL=C -PROGNAME=`${BASENAME} $0` -PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/mysql/bin -DATE=`${DATEC} +%Y-%m-%d_%Hh%Mm` # Datestamp e.g 2002-09-21 -DOW=`${DATEC} +%A` # Day of the week e.g. Monday -DNOW=`${DATEC} +%u` # Day number of the week 1 to 7 where 1 represents Monday -DOM=`${DATEC} +%d` # Date of the Month e.g. 27 -M=`${DATEC} +%B` # Month e.g January -W=`${DATEC} +%V` # Week Number e.g 37 -VER=2.5.1 # Version Number -LOGFILE=${BACKUPDIR}/${DBHOST}-`${DATEC} +%N`.log # Logfile Name -LOGERR=${BACKUPDIR}/ERRORS_${DBHOST}-`${DATEC} +%N`.log # Logfile Name -BACKUPFILES="" -OPT="--quote-names --opt" # OPT string for use with mysqldump ( see man mysqldump ) - -# IO redirection for logging. -touch ${LOGFILE} -exec 6>&1 # Link file descriptor #6 with stdout. - # Saves stdout. -exec > ${LOGFILE} # stdout replaced with file ${LOGFILE}. -touch ${LOGERR} -exec 7>&2 # Link file descriptor #7 with stderr. - # Saves stderr. -exec 2> ${LOGERR} # stderr replaced with file ${LOGERR}. - -# Add --compress mysqldump option to ${OPT} -if [ "${COMMCOMP}" = "yes" ]; - then - OPT="${OPT} --compress" - fi - -# Add --max_allowed_packet=... mysqldump option to ${OPT} -if [ "${MAX_ALLOWED_PACKET}" ]; - then - OPT="${OPT} --max_allowed_packet=${MAX_ALLOWED_PACKET}" - fi - -# Create required directories -if [ ! -e "${BACKUPDIR}" ] # Check Backup Directory exists. - then - mkdir -p "${BACKUPDIR}" -fi - -if [ ! -e "${BACKUPDIR}/daily" ] # Check Daily Directory exists. - then - mkdir -p "${BACKUPDIR}/daily" -fi - -if [ ! -e "${BACKUPDIR}/weekly" ] # Check Weekly Directory exists. - then - mkdir -p "${BACKUPDIR}/weekly" -fi - -if [ ! -e "${BACKUPDIR}/monthly" ] # Check Monthly Directory exists. - then - mkdir -p "${BACKUPDIR}/monthly" -fi - -if [ "${LATEST}" = "yes" ] -then - if [ ! -e "${BACKUPDIR}/latest" ] # Check Latest Directory exists. - then - mkdir -p "${BACKUPDIR}/latest" - fi -eval ${RM} -fv "${BACKUPDIR}/latest/*" -fi - - -# Functions - -# Database dump function -dbdump () { -${MYSQLDUMP} --user=${USERNAME} --password=${PASSWORD} --host=${DBHOST} ${OPT} ${1} > ${2} -return $? -} - -# Compression function plus latest copy -SUFFIX="" -compression () { -if [ "${COMP}" = "gzip" ]; then - ${GZIP} -f "${1}" - ${ECHO} - ${ECHO} Backup Information for "${1}" - ${GZIP} -l "${1}.gz" - SUFFIX=".gz" -elif [ "${COMP}" = "bzip2" ]; then - ${ECHO} Compression information for "${1}.bz2" - ${BZIP2} -f -v ${1} 2>&1 - SUFFIX=".bz2" -else - ${ECHO} "No compression option set, check advanced settings" -fi -if [ "${LATEST}" = "yes" ]; then - ${CP} ${1}${SUFFIX} "${BACKUPDIR}/latest/" -fi -return 0 -} - - -# Run command before we begin -if [ "${PREBACKUP}" ] - then - ${ECHO} ====================================================================== - ${ECHO} "Prebackup command output." - ${ECHO} - eval ${PREBACKUP} - ${ECHO} - ${ECHO} ====================================================================== - ${ECHO} -fi - - -if [ "${SEPDIR}" = "yes" ]; then # Check if CREATE DATABSE should be included in Dump - if [ "${CREATE_DATABASE}" = "no" ]; then - OPT="${OPT} --no-create-db" - else - OPT="${OPT} --databases" - fi -else - OPT="${OPT} --databases" -fi - -# Hostname for LOG information -if [ "${DBHOST}" = "localhost" ]; then - HOST=`${HOSTNAMEC}` - if [ "${SOCKET}" ]; then - OPT="${OPT} --socket=${SOCKET}" - fi -else - HOST=${DBHOST} -fi - -# If backing up all DBs on the server -if [ "${DBNAMES}" = "all" ]; then - DBNAMES="`${MYSQL} --user=${USERNAME} --password=${PASSWORD} --host=${DBHOST} --batch --skip-column-names -e "show databases"| ${SED} 's/ /%/g'`" - - # If DBs are excluded - for exclude in ${DBEXCLUDE} - do - DBNAMES=`${ECHO} ${DBNAMES} | ${SED} "s/\b${exclude}\b//g"` - done - - MDBNAMES=${DBNAMES} -fi - -${ECHO} ====================================================================== -${ECHO} AutoMySQLBackup VER ${VER} -${ECHO} http://sourceforge.net/projects/automysqlbackup/ -${ECHO} -${ECHO} Backup of Database Server - ${HOST} -${ECHO} ====================================================================== - -# Test is seperate DB backups are required -if [ "${SEPDIR}" = "yes" ]; then -${ECHO} Backup Start Time `${DATEC}` -${ECHO} ====================================================================== - # Monthly Full Backup of all Databases - if [ ${DOM} = "01" ]; then - for MDB in ${MDBNAMES} - do - - # Prepare ${DB} for using - MDB="`${ECHO} ${MDB} | ${SED} 's/%/ /g'`" - - if [ ! -e "${BACKUPDIR}/monthly/${MDB}" ] # Check Monthly DB Directory exists. - then - mkdir -p "${BACKUPDIR}/monthly/${MDB}" - fi - ${ECHO} Monthly Backup of ${MDB}... - dbdump "${MDB}" "${BACKUPDIR}/monthly/${MDB}/${MDB}_${DATE}.${M}.${MDB}.sql" - [ $? -eq 0 ] && { - ${ECHO} "Rotating 5 month backups for ${MDB}" - ${FIND} "${BACKUPDIR}/monthly/${MDB}" -mtime +150 -type f -exec ${RM} -v {} \; - } - compression "${BACKUPDIR}/monthly/${MDB}/${MDB}_${DATE}.${M}.${MDB}.sql" - BACKUPFILES="${BACKUPFILES} ${BACKUPDIR}/monthly/${MDB}/${MDB}_${DATE}.${M}.${MDB}.sql${SUFFIX}" - ${ECHO} ---------------------------------------------------------------------- - done - fi - - for DB in ${DBNAMES} - do - # Prepare ${DB} for using - DB="`${ECHO} ${DB} | ${SED} 's/%/ /g'`" - - # Create Seperate directory for each DB - if [ ! -e "${BACKUPDIR}/daily/${DB}" ] # Check Daily DB Directory exists. - then - mkdir -p "${BACKUPDIR}/daily/${DB}" - fi - - if [ ! -e "${BACKUPDIR}/weekly/${DB}" ] # Check Weekly DB Directory exists. - then - mkdir -p "${BACKUPDIR}/weekly/${DB}" - fi - - # Weekly Backup - if [ ${DNOW} = ${DOWEEKLY} ]; then - ${ECHO} Weekly Backup of Database \( ${DB} \) - ${ECHO} - dbdump "${DB}" "${BACKUPDIR}/weekly/${DB}/${DB}_week.${W}.${DATE}.sql" - [ $? -eq 0 ] && { - ${ECHO} Rotating 5 weeks Backups... - ${FIND} "${BACKUPDIR}/weekly/${DB}" -mtime +35 -type f -exec ${RM} -v {} \; - } - compression "${BACKUPDIR}/weekly/${DB}/${DB}_week.${W}.${DATE}.sql" - BACKUPFILES="${BACKUPFILES} ${BACKUPDIR}/weekly/${DB}/${DB}_week.${W}.${DATE}.sql${SUFFIX}" - ${ECHO} ---------------------------------------------------------------------- - - # Daily Backup - else - ${ECHO} Daily Backup of Database \( ${DB} \) - ${ECHO} - dbdump "${DB}" "${BACKUPDIR}/daily/${DB}/${DB}_${DATE}.${DOW}.sql" - [ $? -eq 0 ] && { - ${ECHO} Rotating last weeks Backup... - ${FIND} "${BACKUPDIR}/daily/${DB}" -mtime +6 -type f -exec ${RM} -v {} \; - } - compression "${BACKUPDIR}/daily/${DB}/${DB}_${DATE}.${DOW}.sql" - BACKUPFILES="${BACKUPFILES} ${BACKUPDIR}/daily/${DB}/${DB}_${DATE}.${DOW}.sql${SUFFIX}" - ${ECHO} ---------------------------------------------------------------------- - fi - done -${ECHO} Backup End `${DATEC}` -${ECHO} ====================================================================== - - -else # One backup file for all DBs -${ECHO} Backup Start `${DATEC}` -${ECHO} ====================================================================== - # Monthly Full Backup of all Databases - if [ ${DOM} = "01" ]; then - ${ECHO} Monthly full Backup of \( ${MDBNAMES} \)... - dbdump "${MDBNAMES}" "${BACKUPDIR}/monthly/${DATE}.${M}.all-databases.sql" - [ $? -eq 0 ] && { - ${ECHO} "Rotating 5 month backups." - ${FIND} "${BACKUPDIR}/monthly" -mtime +150 -type f -exec ${RM} -v {} \; - } - compression "${BACKUPDIR}/monthly/${DATE}.${M}.all-databases.sql" - BACKUPFILES="${BACKUPFILES} ${BACKUPDIR}/monthly/${DATE}.${M}.all-databases.sql${SUFFIX}" - ${ECHO} ---------------------------------------------------------------------- - fi - - # Weekly Backup - if [ ${DNOW} = ${DOWEEKLY} ]; then - ${ECHO} Weekly Backup of Databases \( ${DBNAMES} \) - ${ECHO} - ${ECHO} - dbdump "${DBNAMES}" "${BACKUPDIR}/weekly/week.${W}.${DATE}.sql" - [ $? -eq 0 ] && { - ${ECHO} Rotating 5 weeks Backups... - ${FIND} "${BACKUPDIR}/weekly/" -mtime +35 -type f -exec ${RM} -v {} \; - } - compression "${BACKUPDIR}/weekly/week.${W}.${DATE}.sql" - BACKUPFILES="${BACKUPFILES} ${BACKUPDIR}/weekly/week.${W}.${DATE}.sql${SUFFIX}" - ${ECHO} ---------------------------------------------------------------------- - - # Daily Backup - else - ${ECHO} Daily Backup of Databases \( ${DBNAMES} \) - ${ECHO} - ${ECHO} - dbdump "${DBNAMES}" "${BACKUPDIR}/daily/${DATE}.${DOW}.sql" - [ $? -eq 0 ] && { - ${ECHO} Rotating last weeks Backup... - ${FIND} "${BACKUPDIR}/daily" -mtime +6 -type f -exec ${RM} -v {} \; - } - compression "${BACKUPDIR}/daily/${DATE}.${DOW}.sql" - BACKUPFILES="${BACKUPFILES} ${BACKUPDIR}/daily/${DATE}.${DOW}.sql${SUFFIX}" - ${ECHO} ---------------------------------------------------------------------- - fi -${ECHO} Backup End Time `${DATEC}` -${ECHO} ====================================================================== -fi -${ECHO} Total disk space used for backup storage.. -${ECHO} Size - Location -${ECHO} `${DU} -hs "${BACKUPDIR}"` -${ECHO} -${ECHO} ====================================================================== -${ECHO} If you find AutoMySQLBackup valuable please make a donation at -${ECHO} http://sourceforge.net/project/project_donations.php?group_id=101066 -${ECHO} ====================================================================== - -# Run command when we're done -if [ "${POSTBACKUP}" ] - then - ${ECHO} ====================================================================== - ${ECHO} "Postbackup command output." - ${ECHO} - eval ${POSTBACKUP} - ${ECHO} - ${ECHO} ====================================================================== -fi - -#Clean up IO redirection -exec 1>&6 6>&- # Restore stdout and close file descriptor #6. -exec 2>&7 7>&- # Restore stdout and close file descriptor #7. - -if [ "${MAILCONTENT}" = "files" ] -then - if [ -s "${LOGERR}" ] - then - # Include error log if is larger than zero. - BACKUPFILES="${BACKUPFILES} ${LOGERR}" - ERRORNOTE="WARNING: Error Reported - " - fi - #Get backup size - ATTSIZE=`${DU} -c ${BACKUPFILES} | ${GREP} "[[:digit:][:space:]]total$" |${SED} s/\s*total//` - if [ ${MAXATTSIZE} -ge ${ATTSIZE} ] - then - BACKUPFILES=`${ECHO} "${BACKUPFILES}" | ${SED} -e "s# # -a #g"` #enable multiple attachments - mutt -s "${ERRORNOTE} MySQL Backup Log and SQL Files for ${HOST} - ${DATE}" ${BACKUPFILES} ${MAILADDR} < ${LOGFILE} #send via mutt - else - ${CAT} "${LOGFILE}" | mail -s "WARNING! - MySQL Backup exceeds set maximum attachment size on ${HOST} - ${DATE}" ${MAILADDR} - fi -elif [ "${MAILCONTENT}" = "log" ] -then - ${CAT} "${LOGFILE}" | mail -s "MySQL Backup Log for ${HOST} - ${DATE}" ${MAILADDR} - if [ -s "${LOGERR}" ] - then - ${CAT} "${LOGERR}" | mail -s "ERRORS REPORTED: MySQL Backup error Log for ${HOST} - ${DATE}" ${MAILADDR} - fi -elif [ "${MAILCONTENT}" = "quiet" ] -then - if [ -s "${LOGERR}" ] - then - ${CAT} "${LOGERR}" | mail -s "ERRORS REPORTED: MySQL Backup error Log for ${HOST} - ${DATE}" ${MAILADDR} - ${CAT} "${LOGFILE}" | mail -s "MySQL Backup Log for ${HOST} - ${DATE}" ${MAILADDR} - fi -else - if [ -s "${LOGERR}" ] - then - ${CAT} "${LOGFILE}" - ${ECHO} - ${ECHO} "###### WARNING ######" - ${ECHO} "Errors reported during AutoMySQLBackup execution.. Backup failed" - ${ECHO} "Error log below.." - ${CAT} "${LOGERR}" - else - ${CAT} "${LOGFILE}" - fi -fi - -if [ -s "${LOGERR}" ] - then - STATUS=1 - else - STATUS=0 -fi - -# Clean up Logfile -eval ${RM} -f "${LOGFILE}" -eval ${RM} -f "${LOGERR}" - -exit ${STATUS} diff --git a/bin/_old/old2/comsync b/bin/_old/old2/comsync deleted file mode 100755 index 4f3768ca..00000000 --- a/bin/_old/old2/comsync +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -mkdir ~/tmp/.puting_de - -cd ~/tmp/.puting_de - -wget -m http://computing - -#cd ~/tmp/.puting_de/hoyme/ - -#wget -m http://bolsena-ferienhaus - -#mv bolsena-ferienhaus hoyme/neu - -cp -R ~/www/com.puting.de/htdocs/hoyme ~/tmp/.puting_de/computing/hoyme - -rsync --delete -r -v -z --perms --group ~/tmp/.puting_de/computing/ hanez.org:/var/www/puting.de/com/htdocs/ - -#rm -rf ~/tmp/.puting_de - -#rsync --delete -r -v -z /home/www/hanez.org/ hanez.org:/var/www/hanez.org/www/ --exclude=*~ --exclude=wp-config.php --exclude=.svn --exclude=tmp.txt --exclude=cache/* --exclude=comments/* --perms --group --times diff --git a/bin/_old/old2/csr b/bin/_old/old2/csr deleted file mode 100755 index 9ddf87af..00000000 --- a/bin/_old/old2/csr +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/sh -# csr.sh: Certificate Signing Request Generator -# Copyright(c) 2005 Evaldo Gardenali -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the name of the author nor the names of its contributors may -# be used to endorse or promote products derived from this software -# without specific prior written permission. -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -# ChangeLog: -# Mon May 23 00:14:37 BRT 2005 - evaldo - Initial Release - -# be safe about permissions -LASTUMASK=`umask` -umask 077 - -# OpenSSL for HPUX needs a random file -RANDOMFILE=$HOME/.rnd - -# create a config file for openssl -CONFIG=`mktemp -q /tmp/openssl-conf.XXXXXXXX` -if [ ! $? -eq 0 ]; then - echo "Could not create temporary config file. exiting" - exit 1 -fi - -echo "Private Key and Certificate Signing Request Generator" -echo "This script was designed to suit the request format needed by" -echo "the CAcert Certificate Authority. www.CAcert.org" -echo - -printf "Short Hostname (ie. imap big_srv www2): " -read HOST -printf "FQDN/CommonName (ie. www.example.com) : " -read COMMONNAME - -echo "Type SubjectAltNames for the certificate, one per line. Enter a blank line to finish" -SAN=1 # bogus value to begin the loop -SANAMES="" # sanitize -while [ ! "$SAN" = "" ]; do - printf "SubjectAltName: DNS:" - read SAN - if [ "$SAN" = "" ]; then break; fi # end of input - if [ "$SANAMES" = "" ]; then - SANAMES="DNS:$SAN" - else - SANAMES="$SANAMES,DNS:$SAN" - fi -done - -# Config File Generation - -cat < $CONFIG -# -------------- BEGIN custom openssl.cnf ----- - HOME = $HOME -EOF - -if [ "`uname -s`" = "HP-UX" ]; then - echo " RANDFILE = $RANDOMFILE" >> $CONFIG -fi - -cat <> $CONFIG - oid_section = new_oids - [ new_oids ] - [ req ] - default_days = 730 # how long to certify for - default_keyfile = $HOME/${HOST}_privatekey.pem - distinguished_name = req_distinguished_name - encrypt_key = no - string_mask = nombstr -EOF - -if [ ! "$SANAMES" = "" ]; then - echo "req_extensions = v3_req # Extensions to add to certificate request" >> $CONFIG -fi - -cat <> $CONFIG - [ req_distinguished_name ] - commonName = Common Name (eg, YOUR name) - commonName_default = $COMMONNAME - commonName_max = 64 - [ v3_req ] -EOF - -if [ ! "$SANAMES" = "" ]; then - echo "subjectAltName=$SANAMES" >> $CONFIG -fi - -echo "# -------------- END custom openssl.cnf -----" >> $CONFIG - -echo "Running OpenSSL..." -openssl req -batch -config $CONFIG -newkey rsa:2048 -out $HOME/${HOST}_csr.pem -echo "Copy the following Certificate Request and paste into CAcert website to obtain a Certificate." -echo "When you receive your certificate, you 'should' name it something like ${HOST}_server.pem" -echo -cat $HOME/${HOST}_csr.pem -echo -echo The Certificate request is also available in $HOME/${HOST}_csr.pem -echo The Private Key is stored in $HOME/${HOST}_privatekey.pem -echo - -rm $CONFIG - -#restore umask -umask $LASTUMASK - diff --git a/bin/_old/old2/discinfo b/bin/_old/old2/discinfo deleted file mode 100755 index 93a4a8d9..00000000 --- a/bin/_old/old2/discinfo +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -#---------------------------------------------------------------------- -# Author: haveaniceday -# Version: 1, Last updated: 12/2007 -#---------------------------------------------------------------------- - - # fdisk finden - PATH="/sbin:$PATH" - if [ $# -lt 1 ] - then - echo "usage: ${0##*/} " - exit 1 - fi - - IMAGE=$1 - if [ ! -f $IMAGE ] - then - echo "Warnung, $IMAGE ist kein File" - fi - - # tr -d '*' => bootflag entfernen - LANG=C fdisk -lu $IMAGE 2>&1 | tr -d '*' | grep "$IMAGE[a-z0-9]" | while read part start end blocks id rest - do - echo - echo "$read $part $start $end $blocks $id $rest" - case $id in - 5|f|85) echo "Ignoriere extended partition" - continue - ;; - 82) echo "Ignoriere Swap" - continue - ;; - *) - ;; - esac - - let offset=$start*512 - echo mount -o loop,ro,offset=$offset $IMAGE /mnt - done - exit 0 diff --git a/bin/_old/old2/fanspeed b/bin/_old/old2/fanspeed deleted file mode 100755 index 6bfa2646..00000000 --- a/bin/_old/old2/fanspeed +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cat "/proc/acpi/ibm/fan" | grep "speed" | cut -f3 - diff --git a/bin/_old/old2/foo b/bin/_old/old2/foo deleted file mode 100755 index 86fa5e54..00000000 --- a/bin/_old/old2/foo +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -echo "$@" diff --git a/bin/_old/old2/git-cal b/bin/_old/old2/git-cal deleted file mode 100755 index 984d1db4..00000000 --- a/bin/_old/old2/git-cal +++ /dev/null @@ -1,371 +0,0 @@ -#!/usr/bin/perl -use strict; - -use utf8; -use Getopt::Long; -use Pod::Usage; -use Data::Dumper; - -binmode(STDOUT, ":utf8"); -#command line options -my ( $help, $period, $author, $filepath ); - -GetOptions( - 'help|?' => \$help, - 'period|p=n' => \$period, - 'author=s' => \$author, -) or pod2usage(2); -pod2usage(1) if $help; - -$filepath = shift @ARGV; - -# also tried to use unicode chars instead of colors, the exp did not go well -#qw(⬚ ⬜ ▤ ▣ ⬛) -#qw(⬚ ▢ ▤ ▣ ⬛) - -my @colors = ( 237, 157, 155, 47, 2 ); -my @months = qw (Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); - -process(); - -# 53 X 7 grid -# consists of 0 - 370 blocks -my ( @grid, @timeline, %pos_month, %month_pos, $jan1, $cur_year, $max_epoch, $min_epoch, $max_commits, $q1, $q2, $q3 ); -my ( $first_block, $last_block, $start_block, $end_block, $row_start, $row_end ); -my ( $total_commits, $max_streak, $cur_streak, $max_streak_weekdays, $cur_streak_weekdays ); -my ( $cur_start, $max_start, $max_end, $cur_weekdays_start, $max_weekdays_start, $max_weekdays_end ); -#loads of global variables - -sub process { - #try to exit gracefully when the terminal doesn't support enough colors - no warnings; #dont warn if tput command fails - my $colors_supported = qx/tput colors/; - if ($colors_supported && $colors_supported < 256) { - chomp $colors_supported; - print "fatal: 'tput colors' returned < 256 (" . $colors_supported . ") , cannot plot the calendar as the terminal doesn't support enough colors\n"; #will try to hack around this soon - exit(1); - } - init_cal_stuff(); - my $extra_args = ""; - $extra_args = " --author=" . $author if $author; - if ($filepath) { - if ( -e $filepath ) { - $extra_args .= " -- " . $filepath; - } - else { - print "fatal: $filepath do not exists\n"; - exit(2); - } - } - my $git_command = "git log --pretty=format:\"%at\" --since=\"13 months\"" . $extra_args; #commits might not be in strict time order, check some past too - my $epochs = qx/$git_command/; - if ($?) { - print "fatal: git-cal failed to get the git log\n"; - exit(2); - } - my @epochs = split /\n/, $epochs; - if (! @epochs) { - print "git-cal: got empty log, nothing to do\n"; - exit(1); - } - my $status; - foreach (@epochs) { - $status = add_epoch($_); - last if !$status; - } - compute_stats(); - print_grid(); -} - - -sub init_cal_stuff { - my ( $wday, $yday, $month, $year ) = ( localtime(time) )[ 6, 7, 4, 5 ]; - $cur_year = $year; - $jan1 = 370 - ( $yday + 6 - $wday ); - $last_block = $jan1 + $yday + 1; - $first_block = $last_block - 365; - $max_commits = 0; - push @timeline, $jan1; - $month_pos{0} = $jan1; - my $cur = $jan1; - - foreach ( 0 .. $month - 1 ) { - $cur += number_of_days( $_, $year ); - push @timeline, $cur; - $month_pos{ $_ + 1 } = $cur; - } - $cur = $jan1; - for ( my $m = 11; $m > $month; $m-- ) { - $cur -= number_of_days( $m, $year - 1 ); - unshift @timeline, $cur; - $month_pos{$m} = $cur; - } - - $pos_month{ $month_pos{$_} } = $months[$_] foreach keys %month_pos; - - die "period can only be between -11 to -1 and 1 to 12" if ( defined $period && ( $period < -11 || $period > 12 || $period == 0 ) ); - $period = 0 if !defined $period; - if ( $period == 0 ) { - $start_block = $first_block; - $end_block = $last_block; - } - elsif ( $period > 0 ) { - $start_block = $month_pos{ $period - 1 }; - $end_block = $month_pos{ $period % 12 }; - $end_block = $last_block if $start_block > $end_block; - } - else { - $start_block = $timeline[ 11 + $period ]; - $start_block = $first_block if $period == -12; - $end_block = $last_block; - } - $row_start = int $start_block / 7; - $row_end = int $end_block / 7; - $max_epoch = time - 86400 * ( $last_block - $end_block ); - $min_epoch = time - 86400 * ( $last_block - $start_block ); - - ( $total_commits, $max_streak, $cur_streak, $max_streak_weekdays, $cur_streak_weekdays ) = (0) x 5; - ( $cur_start, $max_start, $max_end, $cur_weekdays_start, $max_weekdays_start, $max_weekdays_end ) = (0) x 6; - -} - - -sub add_epoch { - my $epoch = shift; - if ( $epoch > $max_epoch || $epoch < $min_epoch ) { - return 1; - } - my ( $month, $year, $wday, $yday ) = ( localtime($epoch) )[ 4, 5, 6, 7 ]; - my $pos; - if ( $year == $cur_year ) { - $pos = ( $jan1 + $yday ); - } - else { - my $total = ( $year % 4 ) ? 365 : 366; - $pos = ( $jan1 - ( $total - $yday ) ); - } - return 0 if $pos < 0; #just in case - add_to_grid( $pos, $epoch ); - return 1; -} - -sub add_to_grid { - my ( $pos, $epoch ) = @_; - my $r = int $pos / 7; - my $c = $pos % 7; - $grid[$r][$c]->{commits}++; - $grid[$r][$c]->{epoch} = $epoch; - $max_commits = $grid[$r][$c]->{commits} if $grid[$r][$c]->{commits} > $max_commits; -} - - -sub compute_stats { - my %commit_counts; - foreach my $r ( $row_start .. $row_end ) { - foreach my $c ( 0 .. 6 ) { - my $cur_block = ( $r * 7 ) + $c; - if ( $cur_block >= $start_block && $cur_block < $end_block ) { - my $count = $grid[$r][$c]->{commits} || 0; - $total_commits += $count; - if ($count) { - $commit_counts{$count} = 1; - $cur_streak++; - $cur_start = $grid[$r][$c]->{epoch} if $cur_start == 0; - if ( $cur_streak > $max_streak ) { - $max_streak = $cur_streak; - $max_start = $cur_start; - $max_end = $grid[$r][$c]->{epoch}; - } - - #count++ if you work on weekends and streak will not be broken otherwise :) - $cur_streak_weekdays++; - $cur_weekdays_start = $grid[$r][$c]->{epoch} if $cur_weekdays_start == 0; - if ( $cur_streak_weekdays > $max_streak_weekdays ) { - $max_streak_weekdays = $cur_streak_weekdays; - $max_weekdays_start = $cur_weekdays_start; - $max_weekdays_end = $grid[$r][$c]->{epoch}; - } - } - else { - $cur_streak = 0; - $cur_start = 0; - if ( $c > 0 && $c < 6 ) { - $cur_streak_weekdays = 0; - $cur_weekdays_start = 0; - } - } - } - } - } - - #now compute quartiles - my @commit_counts = sort { $a <=> $b } ( keys %commit_counts ); - $q1 = $commit_counts[ int( scalar @commit_counts ) / 4 ]; - $q2 = $commit_counts[ int( scalar @commit_counts ) / 2 ]; - $q3 = $commit_counts[ int( 3 * ( scalar @commit_counts ) / 4 ) ]; - - #print "commit counts: " . (scalar @commit_counts) . " - " . (join ",",@commit_counts) . "\n\n"; - #print "quartiles: $q1 $q2 $q3\n"; -} - -sub print_grid { - my $space = 6; - print_month_names($space); - foreach my $c ( 0 .. 6 ) { - printf "\n%" . ( $space - 2 ) . "s", ""; - if ( $c == 1 ) { - print "M "; - } - elsif ( $c == 3 ) { - print "W "; - } - elsif ( $c == 5 ) { - print "F "; - } - else { - print " "; - } - foreach my $r ( $row_start .. $row_end ) { - my $cur_block = ( $r * 7 ) + $c; - if ( $cur_block >= $start_block && $cur_block < $end_block ) { - my $val = $grid[$r][$c]->{commits} || 0; - my $index = 0; - - #$index = ( int( ( $val - 4 ) / $divide ) ) + 1 if $val > 0; #too dumb and bad - if ($val) { - if ( $val <= $q1 ) { - $index = 1; - } - elsif ( $val <= $q2 ) { - $index = 2; - } - elsif ( $val <= $q3 ) { - $index = 3; - } - else { - $index = 4; - } - } - print_block($index); - } - else { - print " "; - } - } - } - print "\n\n"; - printf "%" . ( 2 * ( $row_end - $row_start ) + $space - 10 ) . "s", "Less "; #such that the right borders align - print_block($_) foreach ( 0 .. 4 ); - print " More\n"; - - printf "%4d: Total commits\n", $total_commits; - print_message( $max_streak_weekdays, $max_weekdays_start, $max_weekdays_end, "Longest streak excluding weekends" ); - print_message( $max_streak, $max_start, $max_end, "Longest streak including weekends" ); - print_message( $cur_streak_weekdays, $cur_weekdays_start, time, "Current streak" ); -} - - -sub print_block { - my $index = shift; - $index = 4 if $index > 4; - my $c = $colors[$index]; - #always show on a black background, else it looks different (sometimes really bad ) with different settings. - #print "\e[40;38;5;${c}m⬛ \e[0m"; - print "\e[40;38;5;${c}m\x{25fc} \e[0m"; -} - -sub print_month_names { - #print month labels, printing current month in the right position is tricky - my $space = shift; - if ( defined $period && $period > 0 ) { - printf "%" . $space . "s %3s", "", $months[ $period - 1 ]; - return; - } - my $label_printer = 0; - my $timeline_iter = 11 + ( $period || -11 ); - if ( $start_block == $first_block && $timeline[0] != 0 ) { - my $first_pos = int $timeline[0] / 7; - if ( $first_pos == 0 ) { - printf "%" . ( $space - 2 ) . "s", ""; - print $pos_month{ $timeline[-1] } . " "; - print $pos_month{ $timeline[0] } . " "; - $timeline_iter++; - } - elsif ( $first_pos == 1 ) { - printf "%" . ( $space - 2 ) . "s", ""; - print $pos_month{ $timeline[-1] } . " "; - } - else { - printf "%" . $space . "s", ""; - printf "%-" . ( 2 * $first_pos ) . "s", $pos_month{ $timeline[-1] }; - } - $label_printer = $first_pos; - } - else { - printf "%" . $space . "s", ""; - $label_printer += ( int $start_block / 7 ); - } - - while ( $label_printer < $end_block / 7 && $timeline_iter <= $#timeline ) { - while ( ( int $timeline[$timeline_iter] / 7 ) != $label_printer ) { print " "; $label_printer++; } - print " " . $pos_month{ $timeline[$timeline_iter] } . " "; - $label_printer += 3; - $timeline_iter++; - } -} - -sub print_message { - my ( $days, $start_epoch, $end_epoch, $message ) = @_; - if ($days) { - my @range; - foreach my $epoch ( $start_epoch, $end_epoch ) { - my ( $mday, $mon, $year ) = ( localtime($epoch) )[ 3, 4, 5 ]; - my $s = sprintf( "%3s %2d %4d", $months[$mon], $mday, ( 1900 + $year ) ); - push @range, $s; - } - printf "%4d: Days ( %-25s ) - %-40s\n", $days, ( join " - ", @range ), $message; - } - else { - printf "%4d: Days - %-40s\n", $days, $message; - } -} - -sub number_of_days { - my ( $month, $year ) = @_; - return 30 if $month == 3 || $month == 5 || $month == 8 || $month == 10; - return 31 if $month != 1; - return 28 if $year % 4; - return 29; -} - -__END__ - -=head1 NAME - -git-cal - A simple tool to view commits calendar (similar to github contributions calendar) on command line - -=head1 SYNOPSIS - -"git-cal" is a tool to visualize the git commit history in github's contribution calendar style. -The calendar shows how frequently the commits are made over the past year or some choosen period - - git-cal - git-cal --author= -- - -=head2 OPTIONS - - --author view commits of a particular author (passed to git log --author= ) - --period|p Do not show the entire year, p=1 to 12 shows only one month (1 = Jan .. 12 = Dec), p=-1 to -11 shows last p months and the current month - --help|? help me - -=head2 ADDITIONAL OPTIONS - - -- filename to view the logs of a particular file or directory - -=head1 AUTHOR - -Karthik katooru - -=head1 COPYRIGHT AND LICENSE - -This program is free software; you can redistribute it and/or modify it under the MIT License diff --git a/bin/_old/old2/homeback b/bin/_old/old2/homeback deleted file mode 100755 index 215e26c4..00000000 --- a/bin/_old/old2/homeback +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -# Backup MySQL Databases -#/home/hanez/bin/automysqlbackup-2.5.1-01.sh - -# Backup HOME -rsync -av --delete --delete-excluded --exclude=hanez/movies/.shared \ -/home/* /media/BACKUP_600GB/HOME/ - -# Backup / -rsync -av --delete \ - --exclude=/dev --exclude=/tmp --exclude=/home --exclude=/sys \ - --exclude=/var/log/wtmp --exclude=/media --exclude=/mnt --exclude=/proc \ -/* /media/BACKUP_600GB/ROOT/ diff --git a/bin/_old/old2/linsync b/bin/_old/old2/linsync deleted file mode 100755 index 506790ac..00000000 --- a/bin/_old/old2/linsync +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -mkdir ~/tmp/.linspector_org - -cd ~/tmp/.linspector_org - -#rsync -avr hanez.org:/var/www/linspector.org/www/htdocs/wiki/conf/* ~/www/linspector.org/htdocs/wiki/conf/ -#rsync -avr hanez.org:/var/www/linspector.org/www/htdocs/wiki/data/* ~/www/linspector.org/htdocs/wiki/data/ - -wget -m http://linspector - -#rm -rf ~/tmp/.linspector_org/linspector/wiki/* - -rsync --delete -avr ~/dev/linspector/docs/* ~/tmp/.linspector_org/linspector/docs/api/ - -#rsync -avr --exclude=data/ ~/www/linspector.org/htdocs/wiki/* ~/tmp/.linspector_org/linspector/wiki/ - -rsync --delete -r -v -z --perms --group --exclude=wiki/data/ ~/tmp/.linspector_org/linspector/ hanez.org:/var/www/linspector.org/www/htdocs/ - -rm -rf ~/tmp/.linspector_org - -#rsync --delete -r -v -z /home/www/hanez.org/ hanez.org:/var/www/hanez.org/www/ --exclude=*~ --exclude=wp-config.php --exclude=.svn --exclude=tmp.txt --exclude=cache/* --exclude=comments/* --perms --group --times diff --git a/bin/_old/old2/lm4flash b/bin/_old/old2/lm4flash deleted file mode 100755 index ae29f863..00000000 Binary files a/bin/_old/old2/lm4flash and /dev/null differ diff --git a/bin/_old/old2/lsmodparms b/bin/_old/old2/lsmodparms deleted file mode 100755 index 79aa998a..00000000 --- a/bin/_old/old2/lsmodparms +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -cat /proc/modules | cut -f 1 -d " " | while read module; do echo "Module: $module"; if [ -d "/sys/module/$module/parameters" ]; then ls /sys/module/$module/parameters/ | while read parameter; do echo -n "Parameter: $parameter --> "; cat /sys/module/$module/parameters/$parameter; done; fi; echo; done diff --git a/bin/_old/old2/ping.sh b/bin/_old/old2/ping.sh deleted file mode 100755 index 8599936d..00000000 --- a/bin/_old/old2/ping.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -for i in `seq 1 255`; do -ping -c 1 192.168.55.$i; -done diff --git a/bin/_old/old2/repo b/bin/_old/old2/repo deleted file mode 100755 index ff7c4188..00000000 --- a/bin/_old/old2/repo +++ /dev/null @@ -1,596 +0,0 @@ -#!/bin/sh - -## repo default configuration -## -REPO_URL='git://android.git.kernel.org/tools/repo.git' -REPO_REV='stable' - -# Copyright (C) 2008 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -magic='--calling-python-from-/bin/sh--' -"""exec" python -E "$0" "$@" """#$magic" -if __name__ == '__main__': - import sys - if sys.argv[-1] == '#%s' % magic: - del sys.argv[-1] -del magic - -# increment this whenever we make important changes to this script -VERSION = (1, 9) - -# increment this if the MAINTAINER_KEYS block is modified -KEYRING_VERSION = (1,0) -MAINTAINER_KEYS = """ - - Repo Maintainer ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.2.2 (GNU/Linux) - -mQGiBEj3ugERBACrLJh/ZPyVSKeClMuznFIrsQ+hpNnmJGw1a9GXKYKk8qHPhAZf -WKtrBqAVMNRLhL85oSlekRz98u41H5si5zcuv+IXJDF5MJYcB8f22wAy15lUqPWi -VCkk1l8qqLiuW0fo+ZkPY5qOgrvc0HW1SmdH649uNwqCbcKb6CxaTxzhOwCgj3AP -xI1WfzLqdJjsm1Nq98L0cLcD/iNsILCuw44PRds3J75YP0pze7YF/6WFMB6QSFGu -aUX1FsTTztKNXGms8i5b2l1B8JaLRWq/jOnZzyl1zrUJhkc0JgyZW5oNLGyWGhKD -Fxp5YpHuIuMImopWEMFIRQNrvlg+YVK8t3FpdI1RY0LYqha8pPzANhEYgSfoVzOb -fbfbA/4ioOrxy8ifSoga7ITyZMA+XbW8bx33WXutO9N7SPKS/AK2JpasSEVLZcON -ae5hvAEGVXKxVPDjJBmIc2cOe7kOKSi3OxLzBqrjS2rnjiP4o0ekhZIe4+ocwVOg -e0PLlH5avCqihGRhpoqDRsmpzSHzJIxtoeb+GgGEX8KkUsVAhbQpUmVwbyBNYWlu -dGFpbmVyIDxyZXBvQGFuZHJvaWQua2VybmVsLm9yZz6IYAQTEQIAIAUCSPe6AQIb -AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEBZTDV6SD1xl1GEAn0x/OKQpy7qI -6G73NJviU0IUMtftAKCFMUhGb/0bZvQ8Rm3QCUpWHyEIu7kEDQRI97ogEBAA2wI6 -5fs9y/rMwD6dkD/vK9v4C9mOn1IL5JCPYMJBVSci+9ED4ChzYvfq7wOcj9qIvaE0 -GwCt2ar7Q56me5J+byhSb32Rqsw/r3Vo5cZMH80N4cjesGuSXOGyEWTe4HYoxnHv -gF4EKI2LK7xfTUcxMtlyn52sUpkfKsCpUhFvdmbAiJE+jCkQZr1Z8u2KphV79Ou+ -P1N5IXY/XWOlq48Qf4MWCYlJFrB07xjUjLKMPDNDnm58L5byDrP/eHysKexpbakL -xCmYyfT6DV1SWLblpd2hie0sL3YejdtuBMYMS2rI7Yxb8kGuqkz+9l1qhwJtei94 -5MaretDy/d/JH/pRYkRf7L+ke7dpzrP+aJmcz9P1e6gq4NJsWejaALVASBiioqNf -QmtqSVzF1wkR5avZkFHuYvj6V/t1RrOZTXxkSk18KFMJRBZrdHFCWbc5qrVxUB6e -N5pja0NFIUCigLBV1c6I2DwiuboMNh18VtJJh+nwWeez/RueN4ig59gRTtkcc0PR -35tX2DR8+xCCFVW/NcJ4PSePYzCuuLvp1vEDHnj41R52Fz51hgddT4rBsp0nL+5I -socSOIIezw8T9vVzMY4ArCKFAVu2IVyBcahTfBS8q5EM63mONU6UVJEozfGljiMw -xuQ7JwKcw0AUEKTKG7aBgBaTAgT8TOevpvlw91cAAwUP/jRkyVi/0WAb0qlEaq/S -ouWxX1faR+vU3b+Y2/DGjtXQMzG0qpetaTHC/AxxHpgt/dCkWI6ljYDnxgPLwG0a -Oasm94BjZc6vZwf1opFZUKsjOAAxRxNZyjUJKe4UZVuMTk6zo27Nt3LMnc0FO47v -FcOjRyquvgNOS818irVHUf12waDx8gszKxQTTtFxU5/ePB2jZmhP6oXSe4K/LG5T -+WBRPDrHiGPhCzJRzm9BP0lTnGCAj3o9W90STZa65RK7IaYpC8TB35JTBEbrrNCp -w6lzd74LnNEp5eMlKDnXzUAgAH0yzCQeMl7t33QCdYx2hRs2wtTQSjGfAiNmj/WW -Vl5Jn+2jCDnRLenKHwVRFsBX2e0BiRWt/i9Y8fjorLCXVj4z+7yW6DawdLkJorEo -p3v5ILwfC7hVx4jHSnOgZ65L9s8EQdVr1ckN9243yta7rNgwfcqb60ILMFF1BRk/ -0V7wCL+68UwwiQDvyMOQuqkysKLSDCLb7BFcyA7j6KG+5hpsREstFX2wK1yKeraz -5xGrFy8tfAaeBMIQ17gvFSp/suc9DYO0ICK2BISzq+F+ZiAKsjMYOBNdH/h0zobQ -HTHs37+/QLMomGEGKZMWi0dShU2J5mNRQu3Hhxl3hHDVbt5CeJBb26aQcQrFz69W -zE3GNvmJosh6leayjtI9P2A6iEkEGBECAAkFAkj3uiACGwwACgkQFlMNXpIPXGWp -TACbBS+Up3RpfYVfd63c1cDdlru13pQAn3NQy/SN858MkxN+zym86UBgOad2 -=CMiZ ------END PGP PUBLIC KEY BLOCK----- -""" - -GIT = 'git' # our git command -MIN_GIT_VERSION = (1, 5, 4) # minimum supported git version -repodir = '.repo' # name of repo's private directory -S_repo = 'repo' # special repo reposiory -S_manifests = 'manifests' # special manifest repository -REPO_MAIN = S_repo + '/main.py' # main script - - -import optparse -import os -import re -import readline -import subprocess -import sys - -home_dot_repo = os.path.expanduser('~/.repoconfig') -gpg_dir = os.path.join(home_dot_repo, 'gnupg') - -extra_args = [] -init_optparse = optparse.OptionParser(usage="repo init -u url [options]") - -# Logging -group = init_optparse.add_option_group('Logging options') -group.add_option('-q', '--quiet', - dest="quiet", action="store_true", default=False, - help="be quiet") - -# Manifest -group = init_optparse.add_option_group('Manifest options') -group.add_option('-u', '--manifest-url', - dest='manifest_url', - help='manifest repository location', metavar='URL') -group.add_option('-o', '--origin', - dest='manifest_origin', - help="use REMOTE instead of 'origin' to track upstream", - metavar='REMOTE') -group.add_option('-b', '--manifest-branch', - dest='manifest_branch', - help='manifest branch or revision', metavar='REVISION') -group.add_option('-m', '--manifest-name', - dest='manifest_name', - help='initial manifest file (deprecated)', - metavar='NAME.xml') -group.add_option('--mirror', - dest='mirror', action='store_true', - help='mirror the forrest') - -# Tool -group = init_optparse.add_option_group('repo Version options') -group.add_option('--repo-url', - dest='repo_url', - help='repo repository location', metavar='URL') -group.add_option('--repo-branch', - dest='repo_branch', - help='repo branch or revision', metavar='REVISION') -group.add_option('--no-repo-verify', - dest='no_repo_verify', action='store_true', - help='do not verify repo source code') - - -class CloneFailure(Exception): - """Indicate the remote clone of repo itself failed. - """ - - -def _Init(args): - """Installs repo by cloning it over the network. - """ - opt, args = init_optparse.parse_args(args) - if args or not opt.manifest_url: - init_optparse.print_usage() - sys.exit(1) - - url = opt.repo_url - if not url: - url = REPO_URL - extra_args.append('--repo-url=%s' % url) - - branch = opt.repo_branch - if not branch: - branch = REPO_REV - extra_args.append('--repo-branch=%s' % branch) - - if branch.startswith('refs/heads/'): - branch = branch[len('refs/heads/'):] - if branch.startswith('refs/'): - print >>sys.stderr, "fatal: invalid branch name '%s'" % branch - raise CloneFailure() - - if not os.path.isdir(repodir): - try: - os.mkdir(repodir) - except OSError, e: - print >>sys.stderr, \ - 'fatal: cannot make %s directory: %s' % ( - repodir, e.strerror) - # Don't faise CloneFailure; that would delete the - # name. Instead exit immediately. - # - sys.exit(1) - - _CheckGitVersion() - try: - if _NeedSetupGnuPG(): - can_verify = _SetupGnuPG(opt.quiet) - else: - can_verify = True - - if not opt.quiet: - print >>sys.stderr, 'Getting repo ...' - print >>sys.stderr, ' from %s' % url - - dst = os.path.abspath(os.path.join(repodir, S_repo)) - _Clone(url, dst, opt.quiet) - - if can_verify and not opt.no_repo_verify: - rev = _Verify(dst, branch, opt.quiet) - else: - rev = 'refs/remotes/origin/%s^0' % branch - - _Checkout(dst, branch, rev, opt.quiet) - except CloneFailure: - if opt.quiet: - print >>sys.stderr, \ - 'fatal: repo init failed; run without --quiet to see why' - raise - - -def _CheckGitVersion(): - cmd = [GIT, '--version'] - proc = subprocess.Popen(cmd, stdout=subprocess.PIPE) - ver_str = proc.stdout.read().strip() - proc.stdout.close() - proc.wait() - - if not ver_str.startswith('git version '): - print >>sys.stderr, 'error: "%s" unsupported' % ver_str - raise CloneFailure() - - ver_str = ver_str[len('git version '):].strip() - ver_act = tuple(map(lambda x: int(x), ver_str.split('.')[0:3])) - if ver_act < MIN_GIT_VERSION: - need = '.'.join(map(lambda x: str(x), MIN_GIT_VERSION)) - print >>sys.stderr, 'fatal: git %s or later required' % need - raise CloneFailure() - - -def _NeedSetupGnuPG(): - if not os.path.isdir(home_dot_repo): - return True - - kv = os.path.join(home_dot_repo, 'keyring-version') - if not os.path.exists(kv): - return True - - kv = open(kv).read() - if not kv: - return True - - kv = tuple(map(lambda x: int(x), kv.split('.'))) - if kv < KEYRING_VERSION: - return True - return False - - -def _SetupGnuPG(quiet): - if not os.path.isdir(home_dot_repo): - try: - os.mkdir(home_dot_repo) - except OSError, e: - print >>sys.stderr, \ - 'fatal: cannot make %s directory: %s' % ( - home_dot_repo, e.strerror) - sys.exit(1) - - if not os.path.isdir(gpg_dir): - try: - os.mkdir(gpg_dir, 0700) - except OSError, e: - print >>sys.stderr, \ - 'fatal: cannot make %s directory: %s' % ( - gpg_dir, e.strerror) - sys.exit(1) - - env = dict(os.environ) - env['GNUPGHOME'] = gpg_dir - - cmd = ['gpg', '--import'] - try: - proc = subprocess.Popen(cmd, - env = env, - stdin = subprocess.PIPE) - except OSError, e: - if not quiet: - print >>sys.stderr, 'warning: gpg (GnuPG) is not available.' - print >>sys.stderr, 'warning: Installing it is strongly encouraged.' - print >>sys.stderr - return False - - proc.stdin.write(MAINTAINER_KEYS) - proc.stdin.close() - - if proc.wait() != 0: - print >>sys.stderr, 'fatal: registering repo maintainer keys failed' - sys.exit(1) - print - - fd = open(os.path.join(home_dot_repo, 'keyring-version'), 'w') - fd.write('.'.join(map(lambda x: str(x), KEYRING_VERSION)) + '\n') - fd.close() - return True - - -def _SetConfig(local, name, value): - """Set a git configuration option to the specified value. - """ - cmd = [GIT, 'config', name, value] - if subprocess.Popen(cmd, cwd = local).wait() != 0: - raise CloneFailure() - - -def _Fetch(local, quiet, *args): - cmd = [GIT, 'fetch'] - if quiet: - cmd.append('--quiet') - err = subprocess.PIPE - else: - err = None - cmd.extend(args) - cmd.append('origin') - - proc = subprocess.Popen(cmd, cwd = local, stderr = err) - if err: - proc.stderr.read() - proc.stderr.close() - if proc.wait() != 0: - raise CloneFailure() - - -def _Clone(url, local, quiet): - """Clones a git repository to a new subdirectory of repodir - """ - try: - os.mkdir(local) - except OSError, e: - print >>sys.stderr, \ - 'fatal: cannot make %s directory: %s' \ - % (local, e.strerror) - raise CloneFailure() - - cmd = [GIT, 'init', '--quiet'] - try: - proc = subprocess.Popen(cmd, cwd = local) - except OSError, e: - print >>sys.stderr - print >>sys.stderr, "fatal: '%s' is not available" % GIT - print >>sys.stderr, 'fatal: %s' % e - print >>sys.stderr - print >>sys.stderr, 'Please make sure %s is installed'\ - ' and in your path.' % GIT - raise CloneFailure() - if proc.wait() != 0: - print >>sys.stderr, 'fatal: could not create %s' % local - raise CloneFailure() - - _SetConfig(local, 'remote.origin.url', url) - _SetConfig(local, 'remote.origin.fetch', - '+refs/heads/*:refs/remotes/origin/*') - _Fetch(local, quiet) - _Fetch(local, quiet, '--tags') - - -def _Verify(cwd, branch, quiet): - """Verify the branch has been signed by a tag. - """ - cmd = [GIT, 'describe', 'origin/%s' % branch] - proc = subprocess.Popen(cmd, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - cwd = cwd) - cur = proc.stdout.read().strip() - proc.stdout.close() - - proc.stderr.read() - proc.stderr.close() - - if proc.wait() != 0 or not cur: - print >>sys.stderr - print >>sys.stderr,\ - "fatal: branch '%s' has not been signed" \ - % branch - raise CloneFailure() - - m = re.compile(r'^(.*)-[0-9]{1,}-g[0-9a-f]{1,}$').match(cur) - if m: - cur = m.group(1) - if not quiet: - print >>sys.stderr - print >>sys.stderr, \ - "info: Ignoring branch '%s'; using tagged release '%s'" \ - % (branch, cur) - print >>sys.stderr - - env = dict(os.environ) - env['GNUPGHOME'] = gpg_dir - - cmd = [GIT, 'tag', '-v', cur] - proc = subprocess.Popen(cmd, - stdout = subprocess.PIPE, - stderr = subprocess.PIPE, - cwd = cwd, - env = env) - out = proc.stdout.read() - proc.stdout.close() - - err = proc.stderr.read() - proc.stderr.close() - - if proc.wait() != 0: - print >>sys.stderr - print >>sys.stderr, out - print >>sys.stderr, err - print >>sys.stderr - raise CloneFailure() - return '%s^0' % cur - - -def _Checkout(cwd, branch, rev, quiet): - """Checkout an upstream branch into the repository and track it. - """ - cmd = [GIT, 'update-ref', 'refs/heads/default', rev] - if subprocess.Popen(cmd, cwd = cwd).wait() != 0: - raise CloneFailure() - - _SetConfig(cwd, 'branch.default.remote', 'origin') - _SetConfig(cwd, 'branch.default.merge', 'refs/heads/%s' % branch) - - cmd = [GIT, 'symbolic-ref', 'HEAD', 'refs/heads/default'] - if subprocess.Popen(cmd, cwd = cwd).wait() != 0: - raise CloneFailure() - - cmd = [GIT, 'read-tree', '--reset', '-u'] - if not quiet: - cmd.append('-v') - cmd.append('HEAD') - if subprocess.Popen(cmd, cwd = cwd).wait() != 0: - raise CloneFailure() - - -def _FindRepo(): - """Look for a repo installation, starting at the current directory. - """ - dir = os.getcwd() - repo = None - - while dir != '/' and not repo: - repo = os.path.join(dir, repodir, REPO_MAIN) - if not os.path.isfile(repo): - repo = None - dir = os.path.dirname(dir) - return (repo, os.path.join(dir, repodir)) - - -class _Options: - help = False - - -def _ParseArguments(args): - cmd = None - opt = _Options() - arg = [] - - for i in xrange(0, len(args)): - a = args[i] - if a == '-h' or a == '--help': - opt.help = True - - elif not a.startswith('-'): - cmd = a - arg = args[i + 1:] - break - return cmd, opt, arg - - -def _Usage(): - print >>sys.stderr,\ -"""usage: repo COMMAND [ARGS] - -repo is not yet installed. Use "repo init" to install it here. - -The most commonly used repo commands are: - - init Install repo in the current working directory - help Display detailed help on a command - -For access to the full online help, install repo ("repo init"). -""" - sys.exit(1) - - -def _Help(args): - if args: - if args[0] == 'init': - init_optparse.print_help() - else: - print >>sys.stderr,\ - "error: '%s' is not a bootstrap command.\n"\ - ' For access to online help, install repo ("repo init").'\ - % args[0] - else: - _Usage() - sys.exit(1) - - -def _NotInstalled(): - print >>sys.stderr,\ -'error: repo is not installed. Use "repo init" to install it here.' - sys.exit(1) - - -def _NoCommands(cmd): - print >>sys.stderr,\ -"""error: command '%s' requires repo to be installed first. - Use "repo init" to install it here.""" % cmd - sys.exit(1) - - -def _RunSelf(wrapper_path): - my_dir = os.path.dirname(wrapper_path) - my_main = os.path.join(my_dir, 'main.py') - my_git = os.path.join(my_dir, '.git') - - if os.path.isfile(my_main) and os.path.isdir(my_git): - for name in ['git_config.py', - 'project.py', - 'subcmds']: - if not os.path.exists(os.path.join(my_dir, name)): - return None, None - return my_main, my_git - return None, None - - -def _SetDefaultsTo(gitdir): - global REPO_URL - global REPO_REV - - REPO_URL = gitdir - proc = subprocess.Popen([GIT, - '--git-dir=%s' % gitdir, - 'symbolic-ref', - 'HEAD'], - stdout = subprocess.PIPE, - stderr = subprocess.PIPE) - REPO_REV = proc.stdout.read().strip() - proc.stdout.close() - - proc.stderr.read() - proc.stderr.close() - - if proc.wait() != 0: - print >>sys.stderr, 'fatal: %s has no current branch' % gitdir - sys.exit(1) - - -def main(orig_args): - main, dir = _FindRepo() - cmd, opt, args = _ParseArguments(orig_args) - - wrapper_path = os.path.abspath(__file__) - my_main, my_git = _RunSelf(wrapper_path) - - if not main: - if opt.help: - _Usage() - if cmd == 'help': - _Help(args) - if not cmd: - _NotInstalled() - if cmd == 'init': - if my_git: - _SetDefaultsTo(my_git) - try: - _Init(args) - except CloneFailure: - for root, dirs, files in os.walk(repodir, topdown=False): - for name in files: - os.remove(os.path.join(root, name)) - for name in dirs: - os.rmdir(os.path.join(root, name)) - os.rmdir(repodir) - sys.exit(1) - main, dir = _FindRepo() - else: - _NoCommands(cmd) - - if my_main: - main = my_main - - ver_str = '.'.join(map(lambda x: str(x), VERSION)) - me = [main, - '--repo-dir=%s' % dir, - '--wrapper-version=%s' % ver_str, - '--wrapper-path=%s' % wrapper_path, - '--'] - me.extend(orig_args) - me.extend(extra_args) - try: - os.execv(main, me) - except OSError, e: - print >>sys.stderr, "fatal: unable to start %s" % main - print >>sys.stderr, "fatal: %s" % e - sys.exit(148) - - -if __name__ == '__main__': - main(sys.argv[1:]) - diff --git a/bin/_old/old2/secpass b/bin/_old/old2/secpass deleted file mode 100755 index 0a2491be..00000000 --- a/bin/_old/old2/secpass +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -dd if=/dev/urandom bs=16 count=1 2>/dev/null | base64 | sed 's/=//g' diff --git a/bin/_old/old2/setua1g b/bin/_old/old2/setua1g deleted file mode 100755 index f266a5b2..00000000 --- a/bin/_old/old2/setua1g +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -pacmd "set-default-sink alsa_output.usb-Roland_UA-1G-00-UA1G.analog-stereo" diff --git a/bin/_old/old2/shellshow b/bin/_old/old2/shellshow deleted file mode 100755 index 1cc276ef..00000000 --- a/bin/_old/old2/shellshow +++ /dev/null @@ -1,397 +0,0 @@ -#!/usr/bin/perl - -# shellshow: terminal slideshow program with a few basic wipes -# Probably the next version will be written in C, this was written in -# perl for quick prototyping and for my @climagic presentation at -# Indiana Linux Fest 2012. - -# Copyright (C) 2012 Mark Krenz (Deltaray) - -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# You may contact the author at - -my $VERSION = 0.1; - -$| = 1; -my $rows = `tput lines`; -my $cols = `tput cols`; - -&setupterminal(); - -$SIG{INT} = sub { &restoreterminal(); }; -$SIG{TERM} = sub { &restoreterminal(); }; - -if (@ARGV < 2 || $ARGV[0] eq "-h" || $ARGV[0] eq "--help") { - &showhelp(); -} - -# A simple timing array to use for the slides to give them -# a little acceleration. -my @timing = (); -for($i = 0; $i < $cols/2; $i++) { - $time = 0.1 / ($i + 1); - $timing[$i] = $time; -} -# Now make the other half of the timing array. -for($i = $cols/2 - 1; $i >= 0; $i--) { -# print "pushing " . $timing[$i] . " onto the list.\n"; - push(@timing, $timing[$i]); -} - -my @graydient = (); -for ($i = 255; $i >= 232; $i--) { # Gray colors in the ansi color spectrum - push(@graydient, $i); -} - -my @frames = (); -my $frame = 0; - - -foreach $file (@ARGV) { - open(my $fh, $file); - my $thisline; - my $lineno = 0; -LINE: while (<$fh>) { - chomp($_); - if ($lineno > $rows - 1) { - last LINE; - } - $_ =~ s/\t/ /g; # Convert tabs into 4 spaces. - my $thisline = substr($_, 0, $cols); - if (length($_) > $cols) { - $thisline = substr($thisline, $cols-1,1, "+"); # This does the pico/nano like behavior of showing that a line is overlength. - } - my $diff = $cols - length($thisline); - if ($diff) { - $thisline .= " " x $diff; - } - $frames[$frame][$lineno] = $thisline; - $lineno++; - } - if ($lineno <= $rows) { - my $thisline = " " x $cols; - foreach ($lineno; $lineno <= $rows; $lineno++) { - $frames[$frame][$lineno] = $thisline; - } - } - $frame++; - close($fh); -} - -my $totalframes = scalar @frames; - - print "\033[2J"; -#foreach $frameno (keys @frames) { -$frameno = 0; -while ($frameno < $totalframes && $frameno >= 0) { - poscursor(1,1); - displayframe(\@frames,$frameno,$cols,$rows); - - # Seems crazy to have to run system commands twice just to read a char. - # We'll make this more efficient in the future and/or switch to C. - if ($BSD_STYLE) { - system "stty cbreak /dev/tty 2>&1"; - } else { - system "stty", '-icanon', 'eol', "\001"; - } - $read = getc(); - if ($BSD_STYLE) { - system "stty -cbreak /dev/tty 2>&1"; - } else { - system 'stty', 'icanon', 'eol', '^@'; # ASCII NUL - } - - # Do the transition. Perl needs a case to store all the Pearls. - if ($read eq "\n" or $read eq " ") { # Return or space to move forward. - $oldframe = $frameno; - $newframe = $frameno+1; - slideright(\@frames,$oldframe,$newframe, $cols, $rows, \@timing); - $frameno = $newframe; - } elsif ($read eq "\177" or $read eq "b") { # Backspace to go back. - $oldframe = $frameno; - $newframe = $frameno-1; - slideleft(\@frames,$oldframe,$newframe, $cols, $rows, \@timing); - $frameno = $newframe; - } elsif ($read eq "l") { # l to move forward using line at a time wipe - $oldframe = $frameno; - $newframe = $frameno+1; - slidelineright(\@frames,$oldframe,$newframe, $cols, $rows, \@timing); - $frameno = $newframe; - } elsif ($read eq "k") { # l to move forward using line at a time wipe - $oldframe = $frameno; - $newframe = $frameno-1; - slidelineleft(\@frames,$oldframe,$newframe, $cols, $rows, \@timing); - $frameno = $newframe; - } elsif ($read eq "f") { # f to move forward using fade method. - $oldframe = $frameno; - $newframe = $frameno+1; - fadeoutfadein(\@frames,$oldframe,$newframe, $cols, $rows, \@graydient, 0.01); - $frameno = $newframe; - } elsif ($read eq "d") { # f to move forward using fade method. - $oldframe = $frameno; - $newframe = $frameno-1; - fadeoutfadein(\@frames,$oldframe,$newframe, $cols, $rows, \@graydient, 0.01); - $frameno = $newframe; - } - # Maybe have an r for random. Later of course we should allow a YAML config - # file or something to setup a saved show so you can just play that with - # predetermined wipes and waittimes, etc. -} - -&restoreterminal(); -exit 0; - - -sub showhelp { - print <<"EOF"; --------------------------------------------------------------------------------- -shellshow: A program to show "slides" in an interesting way inside the terminal -Version: $VERSION --------------------------------------------------------------------------------- -Usage: - shellshow [file3 [, file4, [ ... ]]] - -Movement/Wipes: - , = Move forward a frame in slide motion. - , = Move backward a frame in slide motion. - = Move forward with slideline wipe. (slow) - = Move backward with slideline wipe. (slow) - = Move forward with fadeout/fadein wipe. (req. black bg) - = Move backward with fadeout/fadein wipe. (req. black bg) - -Description: - Shellshow determines the size of your terminal window and reads in - files given as args as frames, storing only the part of the file that - will fit inside the terminal window. You must at least give two filenames - as arguments. You can use shell glob patterns/wildcards if you want. - -Limitations: - Right now this program can't handle files with ANSI escapes or multibyte - characters like UTF-8 or binary characters. - - I'd recommend using a black background with white forground text for now. - Eventually we'll have options for working with various background types, etc. - -EOF - exit(0); -} - -sub setupterminal { - # I could have used Curses, but decided not to go that route - # for a bit more simplicity right now. - system('tput', 'smcup'); # Must be called using system. - # Backticks won't work. - # The codes for smcup were listed as [?1049h on some page as well. :-( -# printf "\0337\033[?47h"; # Switch to alternate screen (smcup) - printf "\033[?25l"; # Hide the cursor (civis) - `stty -echo`; # Turn off input echo. -} - -sub restoreterminal { - system('tput', 'rmcup'); -# printf "\033[2J\033[?47l"; # Switch back to normal screen (rmcup) - printf "\033[?25h"; # show the cursor again. (cnorm) - `stty echo`; # Turn input echo back on. - exit 0; -} - -sub displayframe { - my $framesref = shift; - my $frame = shift; - my $cols = shift; - my $rows = shift; - - my $line = ""; - poscursor(1, 1); - for ($y = 0; $y < $rows; $y++) { - $line = substr($$framesref[$frame][$y], 0, $cols); - if ($y + 1 == $rows) { - print "$line"; # Don't put a newline on the last line. - } else { - print "$line\n"; - } - } - return 1; -} - - - -sub slideright { - $framesref = shift; - $oldframe = shift; - $newframe = shift; - $cols = shift; - $rows = shift; - $timingref = shift; - - if (defined($$framesref[$newframe])) { - my $leftline = ""; - my $rightline = ""; - for ($x = 1; $x < $cols; $x++) { - poscursor(1, 1); - for ($y = 0; $y < $rows; $y++) { - $leftline = substr($$framesref[$oldframe][$y], $x); - $rightline = substr($$framesref[$newframe][$y], 0, $x); - if ($y + 1 == $rows) { - print "$leftline$rightline"; # Don't put a newline on the last line. - } else { - print "$leftline$rightline\n"; - } - } - select(undef,undef, undef, $$timingref[$x]); - } - } - return 1; -} -sub slideleft { - $framesref = shift; - $oldframe = shift; - $newframe = shift; - $cols = shift; - $rows = shift; - $timingref = shift; - - if (defined($$framesref[$oldframe])) { - my $leftline = ""; - my $rightline = ""; - for ($x = $cols - 1; $x > 0; $x--) { - poscursor(1, 1); - for ($y = 0; $y < $rows; $y++) { - $leftline = substr($$framesref[$newframe][$y], $x); - $rightline = substr($$framesref[$oldframe][$y], 0, $x); - if ($y + 1 == $rows) { - print "$leftline$rightline"; # Don't put a newline on the last line. - } else { - print "$leftline$rightline\n"; - } - } - select(undef,undef, undef, $$timingref[$x]); - } - } - return 1; -} - -# These are too slow. -sub slidelineright { - $framesref = shift; - $oldframe = shift; - $newframe = shift; - $cols = shift; - $rows = shift; - $timingref = shift; - - if (defined($$framesref[$newframe])) { - my $leftline = ""; - my $rightline = ""; - for ($y = 0; $y < $rows; $y++) { - for ($x = 1; $x <= $cols; $x++) { - poscursor(1,$y + 1); - $leftline = substr($$framesref[$oldframe][$y], $x); - $rightline = substr($$framesref[$newframe][$y], 0, $x); - print "$leftline$rightline"; # Don't put a newline on the last line. - select(undef,undef,undef, 0.001); - } - unless ($y + 1 == rows) { - print "\n"; - } - #select(undef,undef, undef, $$timingref[$y]); - select(undef,undef, undef, 0.0001); - } - } - return 1; -} -sub slidelineleft { - $framesref = shift; - $oldframe = shift; - $newframe = shift; - $cols = shift; - $rows = shift; - $timingref = shift; - - if (defined($$framesref[$oldframe])) { - my $leftline = ""; - my $rightline = ""; - for ($y = 0; $y < $rows; $y++) { - for ($x = $cols; $x >= 0; $x--) { - poscursor(1,$y + 1); - $leftline = substr($$framesref[$newframe][$y], $x); - $rightline = substr($$framesref[$oldframe][$y], 0, $x); - print "$leftline$rightline"; # Don't put a newline on the last line. - select(undef,undef,undef, 0.001); - } - unless ($y + 1 == rows) { - print "\n"; - } - #select(undef,undef, undef, $$timingref[$y]); - select(undef,undef, undef, 0.0001); - } - } - return 1; -} - -sub fadeoutfadein { - $framesref = shift; - $oldframe = shift; - $newframe = shift; - $cols = shift; - $rows = shift; - $graydientref = shift; - $wait = shift || 0.03; - - if (defined($$framesref[$newframe])) { - foreach my $color (@$graydientref) { - poscursor(1,1); - - for ($y = 0; $y < $rows; $y++) { - print "\033[38;5;${color}m" . $$framesref[$oldframe][$y]; - unless ($y + 1 == $rows) { - print "\n"; - } - } - select(undef,undef,undef, $wait); - } - foreach my $color (reverse @$graydientref) { - poscursor(1,1); - - for ($y = 0; $y < $rows; $y++) { - print "\033[38;5;${color}m" . $$framesref[$newframe][$y]; - unless ($y + 1 == $rows) { - print "\n"; - } - } - select(undef,undef,undef, $wait); - } - - - } - return 1; -} - - -sub poscursor { - my $x = shift; - my $y = shift; - print "\033[${y};${x}H"; - return 1; -} - - - - - - - - diff --git a/bin/_old/old2/ssbackup b/bin/_old/old2/ssbackup deleted file mode 100755 index 5d9ad614..00000000 --- a/bin/_old/old2/ssbackup +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -# Look at mkxpi!!! useful option code is there!!! - -# alle db backups als user backup machen!!! -# -# /home/backup/bin/ für alles scripts! auch die, die dann von root ausgeführt -# werden um backups zu amchen -# -# wenn kein parameter: -# ?? /home/§USER/.ssconfig für ALLE config variablen fürs backup. nochmal -# überlegen ob dies wirklich möglich ist mit einem script. sonst als parameter -# übergeben - -# import global lib here; import special libs below where the options are -# parsed. -. `dirname $0`/sslib - -set -- `getopt -n$0 -u -a --longoptions="depth: adddays: topN:" "h" "$@"` || usage -[ $# -eq 0 ] && usage - -while [ $# -gt 0 ] -do - case "$1" in - --depth) depth=$2;shift;; - --adddays) adddays=$2;shift;; - --topN) topN=$2;shift;; - -h) usage;; - --) shift;break;; - -*) usage;; - *) break;; #better be the crawl directory - esac - shift -done -echo $depth - -#aflag= -#cflag= -#while getopts 'ac:' OPTION -#do -# case $OPTION in -# a) -# aflag=1 -# boo "hannes" -# ;; -# c) -# bflag=1 -# cval="$OPTARG" -# ;; -# ?) -# usage; -# exit 2 -# ;; -# esac -#done -#printf $OPTIND - -if [ "$aflag" ] -then - printf "Option -a specified\n" -fi -if [ "$cflag" ] -then - printf 'Option -c "%s" specified\n' "$cval" -fi -printf "Remaining arguments are: %s\n" "$*" - - - diff --git a/bin/_old/old2/sslib b/bin/_old/old2/sslib deleted file mode 100755 index b763a153..00000000 --- a/bin/_old/old2/sslib +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -usage() -{ - printf "Usage: %s: [-a] [-c value] args\n" $(basename $0) >&2 - #-b [backup type] Type of backup e.g. one of: global, state or log - #-c [path] Path to config file; If this is set all params are read from there - #-d [database names] Array of db names e.g.: "foo bar" - #-g [game name] Name of the game e.g.: PirateGalaxy - #-n [database names] The names of the DB's to backup e.g.: "PirateGalaxy_Global PirateGalaxy_Payment PirateGalaxy_News" - #-u [game username] Name of the user the games runs on e.g.: pirategalaxy -} - - -boo() -{ - USER=$1 - shift; - echo "Param USER: $USER ...!!" -} diff --git a/bin/_old/old2/ssterm b/bin/_old/old2/ssterm deleted file mode 100755 index 017203c6..00000000 --- a/bin/_old/old2/ssterm +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -EU_HOSTS="eu-admin-01.splitscreenserver.com -eu-db-01.splitscreenserver.com -eu-db-02.splitscreenserver.com -eu-gs-01.splitscreenserver.com -eu-gs-02.splitscreenserver.com -eu-gs-03.splitscreenserver.com -eu-gs-04.splitscreenserver.com -eu-gs-05.splitscreenserver.com -eu-gs-06.splitscreenserver.com -eu-gs-07.splitscreenserver.com -eu-ptr-01.splitscreenserver.com -eu-web-01.splitscreenserver.com" - -US_HOSTS="us-gs-01.splitscreenserver.com -us-gs-02.splitscreenserver.com -us-web-01.splitscreenserver.com" - -for HOST in $EU_HOSTS; do - uxterm -bg black -fg grey -sb -leftbar -si -bc -cr orange -e ssh $HOST & sleep 1 -done - -for HOST in $US_HOSTS; do - uxterm -bg black -fg grey -sb -leftbar -si -bc -cr orange -e ssh $HOST & sleep 1 -done - diff --git a/bin/_old/old2/ssvars b/bin/_old/old2/ssvars deleted file mode 100755 index f4f790c2..00000000 --- a/bin/_old/old2/ssvars +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - - - - -BACKUP_USER=backup -BACKUP_DIR=/home/backup -BACKUP_BIN_DIR=/home/backup/bin - -GAME_NAME=PirateGalaxy - -SYSTEM_USERNAME=pirategalaxy - -DB_USERNAME=$GAME_NAME -DB_PASSWORD=zpd7hq9sN28hEDUd - -DB_HOST=localhost - -# List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3" -DB_NAMES_GLOBAL="PirateGalaxy_Global PirateGalaxy_Payment PirateGalaxy_News" -DB_BACKUP_DIR_GLOBAL="/home/pirategalaxy/backup/sql" - -DB_NAMES_STATE="PirateGalaxy_State" -DB_BACKUP_DIR_GLOBAL="/home/pirategalaxy/backup/$DB_NAMES_STATE" - -DB_NAMES_LOG="PirateGalaxy_Log" -DB_BACKUP_DIR_LOG="/home/pirategalaxy/backup/history" - - -MAILADDR="jf@splitscreenstudios.com" diff --git a/bin/_old/old2/steam.sh b/bin/_old/old2/steam.sh deleted file mode 100755 index 5c7b64f1..00000000 --- a/bin/_old/old2/steam.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -STEAM_RUNTIME=1 /usr/bin/steam %U diff --git a/bin/_old/old2/wikidpad b/bin/_old/old2/wikidpad deleted file mode 100755 index 406bcff3..00000000 --- a/bin/_old/old2/wikidpad +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cd ~/opt/wikidpad -python WikidPad.py diff --git a/bin/_old/old2/wsync b/bin/_old/old2/wsync deleted file mode 100755 index 4ff3f517..00000000 --- a/bin/_old/old2/wsync +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# $1 local host -# $2 remote host - - -mkdir ~/tmp/.hanez_org - -cd ~/tmp/.hanez_org - -wget -m http://hanez - -rsync --delete -avr --times --exclude=.svn ~/www/hanez.org/htdocs/files/ ~/tmp/.hanez_org/hanez/files/ - -rsync --delete -avr --times --exclude=.svn ~/www/hanez.org/htdocs/images/ ~/tmp/.hanez_org/hanez/images/ - -rsync --delete -r -v -z --perms --group --times ~/tmp/.hanez_org/hanez/ hanez.org:/var/www/hanez.org/www/htdocs/ - -rm -rf ~/tmp/.hanez_org - -#rsync --delete -r -v -z /home/www/hanez.org/ hanez.org:/var/www/hanez.org/www/ --exclude=*~ --exclude=wp-config.php --exclude=.svn --exclude=tmp.txt --exclude=cache/* --exclude=comments/* --perms --group --times diff --git a/bin/eagle b/bin/eagle deleted file mode 100755 index b615b9bc..00000000 --- a/bin/eagle +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -LANGUAGE=de_DE LANG=de_DE /usr/bin/eagle - diff --git a/bin/gnucash b/bin/gnucash deleted file mode 100755 index 53c658bc..00000000 --- a/bin/gnucash +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -LANGUAGE=de_DE LANG=de_DE /usr/bin/gnucash %f - diff --git a/bin/lit b/bin/lit deleted file mode 100755 index 084b94f5..00000000 Binary files a/bin/lit and /dev/null differ diff --git a/bin/luvi b/bin/luvi deleted file mode 100755 index bc4c745a..00000000 Binary files a/bin/luvi and /dev/null differ diff --git a/bin/luvit b/bin/luvit deleted file mode 100755 index d7616ea0..00000000 Binary files a/bin/luvit and /dev/null differ