Changeset 3416


Ignore:
Timestamp:
2010-04-11 11:59:22 (8 years ago)
Author:
vesal
Message:
 
Location:
bin
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • bin/eclipse.bat

    r41 r3416  
    55set oldpath=%PATH% 
    66set PATH=C:\MinGW\bin;%PATH% 
    7 start "Eclipse" "C:\Program Files\eclipse\eclipse.exe" -configuration "U:\config\eclipse" %* -vmargs -Xmx1024M -Xms512M 
     7::start "Eclipse" "C:\Program Files\eclipse3\eclipse.exe" -configuration "U:\config\eclipse" %* -vmargs -Xmx1024M -Xms512M 
     8call ec34.bat 
    89set path=%oldpath% 
  • bin/j2h.bat

    r668 r3416  
    1717set MBACKUP=%CLASSPATH% 
    1818set CLASSPATH=%_cp%java\j2h.jar;%CLASSPATH%;n:\kurssit\ohj2\ali\Ali.jar 
    19 java j2h -jd "C:\Program Files\Java\jdk1.5.0_06\docs"  http://java.sun.com/j2se/1.5.0/docs/api  -jd "n:\kurssit\ohj2\ali\doc"  http://www.mit.jyu.fi/vesal/kurssit/ohj2/ali/doc -m 4 %_j2h_parameter% 
     19java j2h -jd "C:\Program Files\Java\jdk1.5.0_06\docs\api"  http://java.sun.com/j2se/1.5.0/docs/api  -jd "n:\kurssit\ohj2\ali\doc"  http://www.mit.jyu.fi/vesal/kurssit/ohj2/ali/doc -m 4 %_j2h_parameter% 
    2020set CLASSPATH=%MBACKUP% 
    2121set _cp= 
  • bin/java/j2h

    r41 r3416  
    44if [ -z ${CLASSPATH:=""} ] ; then 
    55#        CLASSPATH=/opt/software/java2html/j2h.jar 
    6         CLASSPATH=/mnt/pc/bin/java/j2h.jar:/mnt/pc/kurssit/ohj2/ali/Ali.jar 
     6        CLASSPATH=/mnt/pc/bin/java/j2h.jar:/mnt/pc/kurssit/ohj2/ali/Ali.jar:/mnt/pc/kurssit/ohj1/graphics/Graphics.jar 
    77else 
    88#        CLASSPATH=/opt/software/java2html/j2h.jar:${CLASSPATH} 
    9         CLASSPATH=/mnt/pc/bin/java/j2h.jar:${CLASSPATH}:/mnt/pc/kurssit/ohj2/ali/Ali.jar 
     9        CLASSPATH=/mnt/pc/bin/java/j2h.jar:${CLASSPATH}:/mnt/pc/kurssit/ohj2/ali/Ali.jar:/mnt/pc/kurssit/ohj1/graphics/Graphics.jar 
    1010fi 
    1111export CLASSPATH 
     
    1414#exec java j2h -jd http://java.sun.com/j2se/1.4.2/docs/api  http://java.sun.com/j2se/1.4.2/docs/api -jd "/pc/mnt/kurssit/ohj2/ali/doc"  http://www.mit.jyu.fi/vesal/kurssit/ohj2/ali/doc -m 4 "$@" 
    1515echo "Ajetaan j2h $@" 
    16 exec java j2h -jd  /usr/share/doc/java-1.5.0 http://java.sun.com/j2se/1.5.0/docs/api -jd "/pc/mnt/kurssit/ohj2/ali/doc"  http://www.mit.jyu.fi/vesal/kurssit/ohj2/ali/doc -m 4 "$@" 
     16echo $CLASSPATH 
     17#exec java j2h -jd  /usr/local/java-sun-j2sdk-1.6.0/docs/api http://java.sun.com/javase/6/docs/api -jd "/pc/mnt/kurssit/ohj2/ali/doc"  http://www.mit.jyu.fi/vesal/kurssit/ohj2/ali/doc -jd "/pc/mnt/kurssit/ohj1/graphicsdoc"  http://www.mit.jyu.fi/vesal/kurssit/ohj1/graphicsdoc -m 4 "$@" 
     18exec java j2h -jd  /usr/share/doc/java-1.6.0/api http://java.sun.com/javase/6/docs/api -jd "/pc/mnt/kurssit/ohj2/ali/doc"  http://www.mit.jyu.fi/vesal/kurssit/ohj2/ali/doc -jd "/pc/mnt/kurssit/ohj1/graphicsdoc"  http://www.mit.jyu.fi/vesal/kurssit/ohj1/graphicsdoc -m 4 "$@" 
    1719 
     20 
  • bin/lue.pl

    r668 r3416  
    3636#       ei kopioida mihinkään muualle, sillä salasanana on - 
    3737# 
    38 #   perl lue.pl PUREHTML files.txt tukki vesal gko 
     38#   perl lue.pl PUREHTML files.txt tukki vesal gko docdir srcreplacement 
    3939#     - lukee paikallisen levyn oletushakemistosta tiedoston 
    4040#       files.txt ja tekee siitä tiedostot files.html ja index.html, joita 
    4141#       ei kopioida mihinkään muualle 
     42#       docdir on hakemisto, jota käytetäään dokumenttihakemistona 
     43#       srcreplacement on hakemiston nimi, jolla java-tiedosotissa oleva src 
     44#       merkkijono korvataan 
    4245# 
    4346#   perl lue.pl COPY files.txt w: vesal gko 
     
    5255#       kopioi ne paikkaa w:\gko 
    5356# 
     57#   Jos tiedoston nimi on muotoa (files.tx:n sijaan) nimiN.txt 
     58#   (missä N on luku) 
     59#   niin tulostiedostot ovat vastaavasti filesN.html, indexN.html 
     60#   Esim. files2.txt => files2.html ja index2.html 
    5461# 
    5562# Tiedoston files.txt muoto on yksinkertaisimmillaan: 
     
    411418my $mainpath = $ARGV[2]; 
    412419my $subpath  = $ARGV[4]; 
     420my $srcreplace = $ARGV[5]; 
     421my $docdir   = "doc"; 
    413422$subpath =~ s!/*$!!;                      # delete extra / end of subpath 
    414423$www =~ s!/*$!!;                          # delete extra / end of www-machine 
    415424my $defwww   = "$www/~$user/$subpath"; 
    416425 
     426my $filenr   = $filename; 
     427$filenr =~ s!(.*?)([0-9]*).txt!\2!; 
     428if ( $filenr == $filename ) { $filenr = ""; } 
     429 
     430my $fileshtml = "files$filenr.html"; 
     431my $indexhtml = "index$filenr.html"; 
     432 
     433 
    417434if ( $www =~ /\// ) { $defwww = $www; }  # if / in www then this is the 
    418435                                         # total path 
     
    430447} 
    431448 
    432 #print "Args: 0:$command 1:$filename 2:$www 3:$user 4:$kurssi 5:$comps 6:$passwd 7:$mainpath $subpath 8:$defwww\n"; 
     449#print "Args: 0:$command 1:$filename 2:$www 3:$user 4:$kurssi 5:$comps 6:$passwd 7:$mainpath $subpath 8:$defwww 9:$docdir $srcreplace\n"; 
    433450 
    434451open(TIEDOSTOT,$filename) or die("File not found: $filename!\n"); 
     
    475492 
    476493#  my $javadoc = "javadoc -nodeprecatedlist -nohelp -private -version -author -d doc   -docletpath c:/bat/XHTML_Doclet.jar -doclet xhtmldoclet.XhtmlDoclet -linksource -tag example:a:\"Example:\" "; 
    477   my $javadoc = "javadoc -nodeprecatedlist -nohelp -private -version -author -d doc  -linksource -tag example:a:\"Example:\" "; 
    478   my $j2h = "j2h -d doc/src-html -js "; 
     494  my $javadoc = "javadoc -nodeprecatedlist -nohelp -version -author -d $docdir -link http://java.sun.com/javase/6/docs/api  -linksource -tag example:a:\"Example:\" "; 
     495  my $j2h = "j2h -d $docdir/src-html -js "; 
    479496  my @arr = glob("*.java"); 
    480497  my $source = ""; 
     
    513530 
    514531 
    515   open(OUT, ">index.html") || die "Error opening output file index.html: $!\n"; 
     532  open(OUT, ">$indexhtml") || die "Error opening output file $indexhtml: $!\n"; 
    516533  print OUT <<"__STOP__"; 
    517534<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"> 
     
    521538</head> 
    522539<frameset cols=\"33%,66%\"> 
    523 <frame src=\"files.html\" NAME=m1> 
     540<frame src=\"$fileshtml\" NAME=m1> 
    524541<frame src=\"$tiedostot[0]\" NAME=m2> 
    525542<noframes> 
     
    534551  close OUT; 
    535552 
    536   open(OUT, ">files.html") || die "Error opening output file files.html: $!\n"; 
     553  open(OUT, ">$fileshtml") || die "Error opening output file $fileshtml: $!\n"; 
    537554  print OUT <<"__STOP__"; 
    538555<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
     
    559576      else { 
    560577#        my $part = substr($htmlfile, 0, index($htmlfile,".")); 
    561         my $part = substr($htmlfile, 0, -5); 
    562         print OUT "<a href=\"doc/src-html/$part.java.html\">$part</a>"; 
     578        my $origpart = substr($htmlfile, 0, -5); 
     579        my $part = $origpart; 
     580        $origpart =~ s/^src\//$srcreplace/; 
     581        $part =~ s/^src\///; 
     582        print OUT "<a href=\"$docdir/src-html/$part.java.html\">$part</a>"; 
    563583#        print OUT "<a href=\"$part.java\">java</a>"; 
    564584 
    565         if ( open(DOCFILE,"<doc/$part.html") ) { #|| die "ERROR!"; 
     585        if ( open(DOCFILE,"<$docdir/$part.html") ) { #|| die "ERROR!"; 
    566586#          print OUT "<a href=\"doc/$part.html\">doc</a>\n"; 
    567587#          print "<a href=\"doc/$part.html\">doc</a>\n"; 
    568           print OUT "<a href=\"doc/$part.html\">.</a>"; 
     588          print OUT "<a href=\"$docdir/$part.html\">.</a>"; 
     589          if ( 0 ) { # ei tarvii lisätä SRC-HTML -linkkiä 
    569590          my @array = <DOCFILE>; 
    570591          close(DOCFILE); 
    571592          my $target = "<TD BGCOLOR=\"#FFFFFF\" CLASS=\"NavBarCell1Rev\"> " . 
    572593                       "&nbsp;<FONT CLASS=\"NavBarFont1Rev\"><B>Class</B></FONT>&nbsp;</TD>"; 
    573           if (open(RESULTFILE, ">doc/$part.html")) { 
     594         if (open(RESULTFILE, ">$docdir/$part.html")) { 
    574595            for(my $k = 0; $k < @array; $k++){ 
    575596              my $line = $array[$k]; 
    576597              if( $line =~ m/$target/){ 
    577598                my @foo = split("/",$part); 
     599                print "part: $part\n"; 
    578600                $line = $line . "<TD BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\">    " . 
    579                         "<A HREF=\"$foo[@foo-1].java.html\"><FONT CLASS=\"NavBarFont1\">" . 
     601#                       "<A HREF=\"$foo[@foo-1].java.html\"><FONT CLASS=\"NavBarFont1\">" . 
     602                        "<A HREF=\"src-html/$part.java.html\"><FONT CLASS=\"NavBarFont1\">" . 
    580603                        "<B>SRC-HTML</B></FONT></A>&nbsp;</TD>\n"; 
    581604              } 
     
    583606            } 
    584607            close(RESULTFILE); 
    585           } 
     608           } 
     609         } # ei SCR-HTML -linkkiä 
    586610        } else { 
    587611          print OUT "."; 
    588612        } 
    589         print OUT "<a href=\"$part.java\">java</a>"; 
     613        print OUT "<a href=\"$origpart.java\">java</a>"; 
    590614 
    591615#        print OUT "<a href=\"doc/$part.java.html\">html</a>\n"; 
     
    631655############################################################################### 
    632656if ( $command eq "PUREHTML" ) { 
     657  if ( $subpath ne "" ) { $docdir = $subpath . "/"; } 
    633658  MakeHtmlFiles(); 
    634659} 
     
    671696   ftp::cwd("$subpath");     ShowFtpError; 
    672697 
    673   ftp::put("files.html","files.html");      ShowFtpError; 
    674   ftp::put("index.html","index.html");      ShowFtpError; 
     698  ftp::put("$fileshtml","$fileshtml");      ShowFtpError; 
     699  ftp::put("$indexhtml","$indexhtml");      ShowFtpError; 
    675700#  my @dir = ftp::dir("."); 
    676701#  print "---------\n"; 
     
    690715  } 
    691716 
    692   ftp::put("files.txt","files.txt");  ShowFtpError; 
     717  ftp::put("$filename","$filename");  ShowFtpError; 
    693718  ftp::put("doc/stylesheet.css","doc/stylesheet.css");  ShowFtpError; 
    694719  ftp::put("doc/overview-tree.html","doc/overview-tree.html");  ShowFtpError; 
     
    753778 
    754779  foreach my $hak (@lajiteltu) { 
     780    my $dochak = $hak; 
     781    $dochak =~ s/^src\///; 
     782    $hak =~ s/^src\//$srcreplace/; 
    755783    print "mkdir $destpath/$hak\n"; 
    756784    mkdir "$destpath/$hak",0; 
    757     mkdir "$destpath/doc/$hak",0; 
    758     mkdir "$destpath/doc/src-html/$hak",0; 
    759     CopyFileIfNewer("doc/$hak/package-frame.html","$destpath/doc/$hak/package-frame.html"); 
    760     CopyFileIfNewer("doc/$hak/package-summary.html","$destpath/doc/$hak/package-summary.html"); 
    761     CopyFileIfNewer("doc/$hak/package-tree.html","$destpath/doc/$hak/package-tree.html"); 
     785    mkdir "$destpath/doc/$dochak",0; 
     786    mkdir "$destpath/doc/src-html/$dochak",0; 
     787    CopyFileIfNewer("doc/$dochak/package-frame.html","$destpath/doc/$dochak/package-frame.html"); 
     788    CopyFileIfNewer("doc/$dochak/package-summary.html","$destpath/doc/$dochak/package-summary.html"); 
     789    CopyFileIfNewer("doc/$dochak/package-tree.html","$destpath/doc/$dochak/package-tree.html"); 
    762790#    copy("doc/$hak/*.html","$destpath/doc/$hak/"); 
    763791  } 
    764792 
    765   CopyFileIfNewer("files.txt","$destpath/files.txt"); 
    766   CopyFileIfNewer("files.html","$destpath/files.html"); 
    767   CopyFileIfNewer("index.html","$destpath/index.html"); 
     793  CopyFileIfNewer("$filename","$destpath/$filename"); 
     794  CopyFileIfNewer("$fileshtml","$destpath/$fileshtml"); 
     795  CopyFileIfNewer("$indexhtml","$destpath/$indexhtml"); 
    768796  CopyFileIfNewer("doc/front.html","$destpath/doc/front.html"); 
    769797  CopyFileIfNewer("doc/AllClasses.html","$destpath/doc/AllClasses.html"); 
    770798  CopyFileIfNewer("doc/allclasses-frame.html","$destpath/doc/allclasses-frame.html"); 
    771   CopyFileIfNewer("doc/index.html","$destpath/doc/index.html"); 
     799  CopyFileIfNewer("doc/$indexhtml","$destpath/doc/$indexhtml"); 
    772800  CopyFileIfNewer("doc/stylesheet.css","$destpath/doc/stylesheet.css"); 
    773801  CopyFileIfNewer("doc/src-html/stylesheet.css","$destpath/doc/src-html/stylesheet.css"); 
     
    782810    my $tied = trim($tiedostot[$i]); 
    783811    if ( $lahdepolut[$i] gt "   " ) { next; } 
    784  
    785     CopyFileIfNewer($tied,"$destpath/$tied"); 
     812    my $desttied = $tied; 
     813    $desttied =~ s/^src\//$srcreplace/; 
     814 
     815    CopyFileIfNewer($tied,"$destpath/$desttied"); 
    786816 
    787817    my $filetype = substr($tied, -5); 
    788818    if($filetype eq ".java"){ 
    789819      my $part = substr($tied, 0, index($tied,".")); 
     820      $part =~ s/^src\///; 
    790821      CopyFileIfNewer("doc/$part.html","$destpath/doc/$part.html"); 
    791822      CopyFileIfNewer("doc/src-html/$part.html","$destpath/doc/src-html/$part.html"); 
     
    845876  $package =~ s/\/\*\.java//; 
    846877  print "Paketti: $package\n"; 
     878  if ( $package =~ m/^\.\./ ) { return;        } 
    847879  if ( $package eq "*.java" ) { $package = ""; } 
    848880  # print "Paketti: $package\n"; 
    849881 
    850   my $dir = "doc/src-html/$package"; 
     882  $package =~ s/^src\///; 
     883  my $dir = "$docdir/src-html/$package"; 
    851884  print "$dir\n"; 
    852885  opendir(D, $dir) || die "can't opendir $dir: $!"; 
  • bin/siirra_avain.bat

    r290 r3416  
    1414set sshhost=%1 
    1515if "%1"=="" set sshhost=jalava.cc.jyu.fi 
    16 set sshkey =%2 
     16set sshkey=%2 
    1717if "%2"=="" set sshkey=U:\.ssh\id_dsa.pub 
    1818set sshuser=%3 
  • bin/svnht.bat

    r668 r3416  
    22rem Käsittelee harjoitustyötä svn:ssä. 
    33rem Käyttöohje ks. kohdasta :ohje 
    4 rem Käyttäminen vaatii yleensä että ssh-avaimet on luotu. 
    5 rem Avaiminen luominen ks. avain.bat 
    6 rem  
    7 rem Vesa Lappalainen 6.1.2008 
     4rem 
     5rem Vesa Lappalainen 9.1.2009 
    86 
    97rem Vaihda seuraavaan svn:si sijainti.  Myös pelkkä svn kelpaa 
     
    5755if "%1"=="" set projdir=%USERNAME% 
    5856set kurssi=%2 
     57set kausi= 
    5958if "%2"=="" set kurssi=ohj2 
     59if "%2"=="" set kausi=k10 
    6060set repo=%3 
    6161if "%3"=="" set repo=trunk 
     
    6565if "%SVN_EDITOR%"=="" set SVN_EDITOR=notepad.exe 
    6666 
    67 set svntarget=svn+ssh://%svnuser%@svn.cc.jyu.fi/srv/svn/%kurssi%/%projdir% 
     67set svntarget=https://svn.cc.jyu.fi/srv/svn/%kurssi%%kausi%/%projdir% 
    6868 
    6969rem Onko jo svn hakemisto olemassa? 
    7070if EXIST ".svn" goto svnReady 
     71rem Onko hakemisto tyhjä 
     72for /F %%i in ('dir /B') do goto createNewRepo 
     73rem ei .svn:ää eikä mitään muutakaan joten tehdään checkout 
     74goto doCheckout 
     75:createNewRepo 
     76rem Mutta uutta ei edes yritetä luoda jollei ole files.txt:tä 
     77if NOT EXIST "files.txt" goto helpOnlyEmptyFile 
     78 
    7179Echo Luodaan uusi %repo% 
    7280echo Luodaan oma varasto: svn mkdir -m "Luonti" %svntarget% 
     
    7482%svn% mkdir -m "Luonti" %svntarget%/%repo% 
    7583%svn% mkdir -m "Luonti" %svntarget%/tags 
     84IF %ERRORLEVEL% NEQ 0 goto doCheckout 
     85echo  svn checkout  -r HEAD %svntarget%/%repo% . 
     86%svn% checkout  -r HEAD %svntarget%/%repo% . 
     87goto luoIgnore 
     88 
     89:doCheckout 
     90echo . 
     91rem checkout tehdään vain tyhjään hakemistoon 
     92for /F %%i in ('dir /B') do goto helpOnlyEmptyFile 
     93 
    7694echo Haetaan varaston sisalto: 
    7795echo  svn checkout  -r HEAD %svntarget%/%repo% . 
    7896%svn% checkout  -r HEAD %svntarget%/%repo% . 
     97IF %ERRORLEVEL% NEQ 0 goto helpNoSVN 
    7998 
     99:luoIgnore 
    80100rem luodaan tarvittaessa .svnignore -tiedosto 
    81101if NOT EXIST ".svnignore" echo *>.svnignore 
     
    83103 
    84104:svnReady 
    85 echo Varasto %repo% olemassa 
     105echo Varasto %svntarget%/%repo% olemassa 
    86106echo Luetaan files.txt ja lisataan siina luetellut tiedostot versiohallinaan 
    87107perl -S lue.pl SVN files.txt 
     
    89109echo Paivitetaan varastosta: svn update 
    90110%svn% update 
     111if NOT EXIST "files.txt" goto mustHaveFilesTxt 
     112 
    91113echo Viedaan omat muutokset varastoon: svn commit 
    92114%svn% commit 
     
    120142echo Oletukset: 
    121143echo  kayttajahak: %USERNAME% 
    122 echo  kurssi:      ohj2 
     144echo  kurssi:      ohj2  (reponnimeen vielä lisäksi k09 jos kurssia ei anneta) 
    123145echo  repository:  trunk 
    124146echo  kayttaja:    %USERNAME% 
    125147echo . 
     148goto loppu 
     149 
     150:helpOnlyEmptyFile 
     151echo Hakemistossa on tiedostot: 
     152dir /B 
     153echo . 
     154echo Hakemisto ei ole tyhja!!! 
     155echo . 
     156echo Komennon saa antaa vain 
     157echo   1) taysin tyhjassa hakemistossa jotta hakee olemassa olevan projektin 
     158echo   2) hakemistossa jossa on jo valmiina versionhallinnasta haettu versio 
     159echo   3) epatyhjassa hakemistossa joka on tarkoitus 1. kerran vieda 
     160echo      versionhallintaan hakemistossa on talloin oltava files.txt 
     161echo      jossa on lueteltu siirrettavat tiedostot 
     162goto loppu 
     163 
     164:mustHaveFilesTxt 
     165echo . 
     166echo Hakemistossa on oltava files.txt jossa on lueteltu siirrettavat tiedostot 
     167goto loppu 
     168 
     169:helpNoSVN 
     170echo . 
     171echo Hakemisto on tyhja! 
     172echo Eika ole viety viela tyota versionhallintaan nimella: %projdir% 
     173echo Kirjoita tiedosto files.txt ja tarvittavat muut tiedostot, 
     174echo laita files.txt:hen viittauksen noihin tiedostoihin 
     175echo ja kokeile sitten uudelleen. 
    126176 
    127177:loppu 
Note: See TracChangeset for help on using the changeset viewer.