Možnost stažení zdrojových kódů přímo z webového rozhraní – přímo z aplikace.
authorFrantišek Kučera <franta-hg@frantovo.cz>
Thu Feb 12 00:20:36 2009 +0100 (2009-02-12)
changeset 9457918d6cd1f
parent 8 cfdfea29cfa5
child 10 025cde619dd9
Možnost stažení zdrojových kódů přímo z webového rozhraní – přímo z aplikace.
.hgignore
java/HrisniciSpameri/build.xml
java/HrisniciSpameri/licence.txt
java/HrisniciSpameri/web/index.jsp
java/HrisniciSpameri/web/styl.css
     1.1 --- a/.hgignore	Wed Feb 11 23:11:22 2009 +0100
     1.2 +++ b/.hgignore	Thu Feb 12 00:20:36 2009 +0100
     1.3 @@ -1,4 +1,5 @@
     1.4  java/HrisniciSpameri/dist/*
     1.5  java/HrisniciSpameri/build/*
     1.6 +java/HrisniciSpameri/web/HrisniciSpameri-src.zip
     1.7  
     1.8  
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/java/HrisniciSpameri/build.xml	Thu Feb 12 00:20:36 2009 +0100
     2.3 @@ -0,0 +1,77 @@
     2.4 +<?xml version="1.0" encoding="UTF-8"?>
     2.5 +<!-- You may freely edit this file. See commented blocks below for -->
     2.6 +<!-- some examples of how to customize the build. -->
     2.7 +<!-- (If you delete it and reopen the project it will be recreated.) -->
     2.8 +<!-- By default, only the Clean and Build commands use this build script. -->
     2.9 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
    2.10 +<!-- the Compile on Save feature is turned off for the project. -->
    2.11 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
    2.12 +<!-- in the project's Project Properties dialog box.-->
    2.13 +<project name="HrisniciSpameri" default="default" basedir=".">
    2.14 +    <description>Builds, tests, and runs the project HrisniciSpameri.</description>
    2.15 +    <import file="nbproject/build-impl.xml"/>
    2.16 +    <!--
    2.17 +
    2.18 +    There exist several targets which are by default empty and which can be 
    2.19 +    used for execution of your tasks. These targets are usually executed 
    2.20 +    before and after some main targets. They are: 
    2.21 +
    2.22 +      -pre-init:                 called before initialization of project properties 
    2.23 +      -post-init:                called after initialization of project properties 
    2.24 +      -pre-compile:              called before javac compilation 
    2.25 +      -post-compile:             called after javac compilation 
    2.26 +      -pre-compile-single:       called before javac compilation of single file
    2.27 +      -post-compile-single:      called after javac compilation of single file
    2.28 +      -pre-compile-test:         called before javac compilation of JUnit tests
    2.29 +      -post-compile-test:        called after javac compilation of JUnit tests
    2.30 +      -pre-compile-test-single:  called before javac compilation of single JUnit test
    2.31 +      -post-compile-test-single: called after javac compilation of single JUunit test
    2.32 +      -pre-dist:                 called before archive building 
    2.33 +      -post-dist:                called after archive building 
    2.34 +      -post-clean:               called after cleaning build products 
    2.35 +      -pre-run-deploy:           called before deploying
    2.36 +      -post-run-deploy:          called after deploying
    2.37 +
    2.38 +    Example of pluging an obfuscator after the compilation could look like 
    2.39 +
    2.40 +        <target name="-post-compile">
    2.41 +            <obfuscate>
    2.42 +                <fileset dir="${build.classes.dir}"/>
    2.43 +            </obfuscate>
    2.44 +        </target>
    2.45 +
    2.46 +    For list of available properties check the imported 
    2.47 +    nbproject/build-impl.xml file. 
    2.48 +
    2.49 +
    2.50 +    Other way how to customize the build is by overriding existing main targets.
    2.51 +    The target of interest are: 
    2.52 +
    2.53 +      init-macrodef-javac:    defines macro for javac compilation
    2.54 +      init-macrodef-junit:   defines macro for junit execution
    2.55 +      init-macrodef-debug:    defines macro for class debugging
    2.56 +      do-dist:                archive building
    2.57 +      run:                    execution of project 
    2.58 +      javadoc-build:          javadoc generation 
    2.59 +
    2.60 +    Example of overriding the target for project execution could look like 
    2.61 +
    2.62 +        <target name="run" depends="<PROJNAME>-impl.jar">
    2.63 +            <exec dir="bin" executable="launcher.exe">
    2.64 +                <arg file="${dist.jar}"/>
    2.65 +            </exec>
    2.66 +        </target>
    2.67 +
    2.68 +    Notice that overridden target depends on jar target and not only on 
    2.69 +    compile target as regular run target does. Again, for list of available 
    2.70 +    properties which you can use check the target you are overriding in 
    2.71 +    nbproject/build-impl.xml file. 
    2.72 +
    2.73 +    
    2.74 +    -->
    2.75 +
    2.76 +    <target name="-post-init">
    2.77 +            <zip basedir="../../" excludes=".hg/** .hgignore HrisniciSpameri/java/HrisniciSpameri/build/** java/HrisniciSpameri/dist/** java/HrisniciSpameri/web/HrisniciSpameri-src.zip"  includes="**" encoding="UTF-8" comment="Kódování: UTF-8 | Autor: František Kučera | Web: http://frantovo.cz/ | Licence: GNU Affero GPL, verze 3" destfile="web/HrisniciSpameri-src.zip"/>
    2.78 +    </target>
    2.79 +
    2.80 +</project>
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/java/HrisniciSpameri/licence.txt	Thu Feb 12 00:20:36 2009 +0100
     3.3 @@ -0,0 +1,1 @@
     3.4 +../../licence/agpl-3.0.txt
     3.5 \ No newline at end of file
     4.1 --- a/java/HrisniciSpameri/web/index.jsp	Wed Feb 11 23:11:22 2009 +0100
     4.2 +++ b/java/HrisniciSpameri/web/index.jsp	Thu Feb 12 00:20:36 2009 +0100
     4.3 @@ -25,5 +25,8 @@
     4.4                  <jsp:include page="souhrn.jspx"/>
     4.5              </c:otherwise>
     4.6          </c:choose>
     4.7 +
     4.8 +        <div id="licence">Program je vydán pod licencí: <a href="licence.txt">GNU Affero GPL</a>. A zdrojové kódy jsou ke stažení: <a href="HrisniciSpameri-src.zip">HrisniciSpameri-src.zip</a>.</div>
     4.9 +
    4.10      </body>
    4.11  </html>
     5.1 --- a/java/HrisniciSpameri/web/styl.css	Wed Feb 11 23:11:22 2009 +0100
     5.2 +++ b/java/HrisniciSpameri/web/styl.css	Thu Feb 12 00:20:36 2009 +0100
     5.3 @@ -24,4 +24,14 @@
     5.4  
     5.5  img {
     5.6      border: none;
     5.7 +}
     5.8 +
     5.9 +#licence {
    5.10 +    border: 1px solid silver;
    5.11 +    font-size: smaller;
    5.12 +    padding: 3px;
    5.13 +    margin-top: 2em;
    5.14 +    margin-bottom: 1em;
    5.15 +    text-align: center;
    5.16 +    background-color: #e6e6e6;
    5.17  }
    5.18 \ No newline at end of file