Changeset baa11d8


Ignore:
Timestamp:
Jun 26, 2018 7:11:53 PM (3 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
ef7b3e0
Parents:
2d24f213
Message:

Console: Move modified flags to new directory,
in prep for symlinking original flags dir to package
for package installs (ticket #2270)

Files:
2 edited
17 moved

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/jsp/flags.jsp

    r2d24f213 rbaa11d8  
    1212 *  flags.jsp?c=de&s=48 => icons/flags48x48/de.png
    1313 *  with headers set so the browser caches.
     14 *
     15 *  As of 0.9.36:
     16 *  All new and changed flags must go in the flags16x11/ dir,
     17 *  which will be checked first by flags.jsp.
     18 *  The flags/ dir is the original set from famfamfam,
     19 *  which may be symlinked in package installs.
     20 *
    1421 */
    1522String c = request.getParameter("c");
     
    1724    (c.length() == 2 || c.length() == 7) &&
    1825    c.replaceAll("[a-z0-9_]", "").length() == 0) {
    19     String flagSet = "flags";
     26    String flagSet = "flags16x11";
    2027    String s = request.getParameter("s");
    2128    if ("48".equals(s)) {
     
    2330    }
    2431    java.io.OutputStream cout = response.getOutputStream();
    25     String base = net.i2p.I2PAppContext.getGlobalContext().getBaseDir().getAbsolutePath();
    26     String file = "docs" + java.io.File.separatorChar + "icons" + java.io.File.separatorChar +
    27                   flagSet + java.io.File.separatorChar + c + ".png";
     32    String base = net.i2p.I2PAppContext.getGlobalContext().getBaseDir().getAbsolutePath() +
     33                  java.io.File.separatorChar +
     34                  "docs" + java.io.File.separatorChar + "icons";
     35    String file = flagSet + java.io.File.separatorChar + c + ".png";
    2836    java.io.File ffile = new java.io.File(base, file);
     37    if (!ffile.exists()) {
     38        // fallback to flags dir, which will be symlinked to /usr/share/flags/countries/16x11 for package builds
     39        file = "flags" + java.io.File.separatorChar + c + ".png";
     40        ffile = new java.io.File(base, file);
     41    }
    2942    long lastmod = ffile.lastModified();
    3043    if (lastmod > 0) {
  • build.xml

    r2d24f213 rbaa11d8  
    13311331        <copy file="installer/resources/themes/console/images/favicon.ico" tofile="pkg-temp/eepsite/docroot/favicon.ico" />
    13321332        <copy todir="pkg-temp/docs/icons/flags" >
     1333          <!-- base flags/ dir only. flags16x11/ and flags48x48/ dirs already copied by prepConsoleDocs target -->
    13331334          <fileset dir="installer/resources/icons/flags" />
    1334         </copy>
    1335         <copy todir="pkg-temp/docs/icons/flags48x48" >
    1336           <fileset dir="installer/resources/icons/flags48x48" />
    13371335        </copy>
    13381336    </target>
     
    14971495          <fileset dir="installer/resources/readme/" includes="readme*.html" />
    14981496          <fileset dir="installer/resources/proxy/" includes="*.ht" />
    1499           <!-- lang_ar.png added in 0.8.4; a1,a2,je, and eu.png added in 0.8.9; gg.png added in 0.8.10;
    1500                im.png added in 0.8.12; cw.png added in 0.9.5; ap,bl,bq,ss,sx added in 0.9.21;
    1501                lang_gl added in 0.9.28; a0.png added in 0.9.31 -->
    1502           <fileset dir="installer/resources/" includes="icons/flags/lang_ar.png icons/flags/gg.png icons/flags/je.png icons/flags/eu.png icons/flags/im.png icons/flags/a1.png icons/flags/a2.png icons/flags/cw.png icons/flags/ap.png icons/flags/bl.png icons/flags/bq.png icons/flags/ss.png icons/flags/sx.png icons/flags/lang_gl.png icons/flags/a0.png" />
     1497          <!--
     1498               As of 0.9.36:
     1499               All new and changed flags must go in the flags16x11/ dir,
     1500               which will be checked first by flags.jsp.
     1501               The flags/ dir is the original set from famfamfam,
     1502               which may be symlinked in package installs.
     1503           -->
     1504          <fileset dir="installer/resources/" includes="icons/flags16x11/*" />
    15031505          <!-- flags48x48 added in 0.9.32 -->
    15041506          <fileset dir="installer/resources/" includes="icons/flags48x48/*" />
     
    27272729                        </copy>
    27282730                        <!-- FLAGs for language icon (not for ip)-->
    2729                         <copy todir="pkg-temp/docs/icons/flags" >
    2730                                 <fileset dir="installer/resources/icons/flags/" includes="cn.png,de.png,fr.png,nl.png,ru.png,se.png,us.png" />
    2731                         </copy>
    2732                         <copy todir="pkg-temp/docs/icons/flags48x48" >
    2733                                 <fileset dir="installer/resources/icons/flags48x48" />
     2731                        <copy todir="pkg-temp/docs/icons" >
     2732                                <fileset dir="installer/resources/icons" />
    27342733                        </copy>
    27352734                <mkdir dir="pkg-temp/webapps" />
Note: See TracChangeset for help on using the changeset viewer.