Console: Move modified flags to new directory,
in prep for symlinking original flags dir to package for package installs (ticket #2270)
@@ -11,21 +11,34 @@
|
||||
* flags.jsp?c=de => icons/flags/de.png
|
||||
* flags.jsp?c=de&s=48 => icons/flags48x48/de.png
|
||||
* with headers set so the browser caches.
|
||||
*
|
||||
* As of 0.9.36:
|
||||
* All new and changed flags must go in the flags16x11/ dir,
|
||||
* which will be checked first by flags.jsp.
|
||||
* The flags/ dir is the original set from famfamfam,
|
||||
* which may be symlinked in package installs.
|
||||
*
|
||||
*/
|
||||
String c = request.getParameter("c");
|
||||
if (c != null &&
|
||||
(c.length() == 2 || c.length() == 7) &&
|
||||
c.replaceAll("[a-z0-9_]", "").length() == 0) {
|
||||
String flagSet = "flags";
|
||||
String flagSet = "flags16x11";
|
||||
String s = request.getParameter("s");
|
||||
if ("48".equals(s)) {
|
||||
flagSet = "flags48x48";
|
||||
}
|
||||
java.io.OutputStream cout = response.getOutputStream();
|
||||
String base = net.i2p.I2PAppContext.getGlobalContext().getBaseDir().getAbsolutePath();
|
||||
String file = "docs" + java.io.File.separatorChar + "icons" + java.io.File.separatorChar +
|
||||
flagSet + java.io.File.separatorChar + c + ".png";
|
||||
String base = net.i2p.I2PAppContext.getGlobalContext().getBaseDir().getAbsolutePath() +
|
||||
java.io.File.separatorChar +
|
||||
"docs" + java.io.File.separatorChar + "icons";
|
||||
String file = flagSet + java.io.File.separatorChar + c + ".png";
|
||||
java.io.File ffile = new java.io.File(base, file);
|
||||
if (!ffile.exists()) {
|
||||
// fallback to flags dir, which will be symlinked to /usr/share/flags/countries/16x11 for package builds
|
||||
file = "flags" + java.io.File.separatorChar + c + ".png";
|
||||
ffile = new java.io.File(base, file);
|
||||
}
|
||||
long lastmod = ffile.lastModified();
|
||||
if (lastmod > 0) {
|
||||
long iflast = request.getDateHeader("If-Modified-Since");
|
||||
|
23
build.xml
@@ -1330,11 +1330,9 @@
|
||||
</copy>
|
||||
<copy file="installer/resources/themes/console/images/favicon.ico" tofile="pkg-temp/eepsite/docroot/favicon.ico" />
|
||||
<copy todir="pkg-temp/docs/icons/flags" >
|
||||
<!-- base flags/ dir only. flags16x11/ and flags48x48/ dirs already copied by prepConsoleDocs target -->
|
||||
<fileset dir="installer/resources/icons/flags" />
|
||||
</copy>
|
||||
<copy todir="pkg-temp/docs/icons/flags48x48" >
|
||||
<fileset dir="installer/resources/icons/flags48x48" />
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="copyjetty" depends="copyjetty-unlesspkg" >
|
||||
@@ -1496,10 +1494,14 @@
|
||||
<copy todir="pkg-temp/docs/" >
|
||||
<fileset dir="installer/resources/readme/" includes="readme*.html" />
|
||||
<fileset dir="installer/resources/proxy/" includes="*.ht" />
|
||||
<!-- 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;
|
||||
im.png added in 0.8.12; cw.png added in 0.9.5; ap,bl,bq,ss,sx added in 0.9.21;
|
||||
lang_gl added in 0.9.28; a0.png added in 0.9.31 -->
|
||||
<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" />
|
||||
<!--
|
||||
As of 0.9.36:
|
||||
All new and changed flags must go in the flags16x11/ dir,
|
||||
which will be checked first by flags.jsp.
|
||||
The flags/ dir is the original set from famfamfam,
|
||||
which may be symlinked in package installs.
|
||||
-->
|
||||
<fileset dir="installer/resources/" includes="icons/flags16x11/*" />
|
||||
<!-- flags48x48 added in 0.9.32 -->
|
||||
<fileset dir="installer/resources/" includes="icons/flags48x48/*" />
|
||||
</copy>
|
||||
@@ -2726,11 +2728,8 @@
|
||||
<fileset dir="installer/resources/themes/console/images/" />
|
||||
</copy>
|
||||
<!-- FLAGs for language icon (not for ip)-->
|
||||
<copy todir="pkg-temp/docs/icons/flags" >
|
||||
<fileset dir="installer/resources/icons/flags/" includes="cn.png,de.png,fr.png,nl.png,ru.png,se.png,us.png" />
|
||||
</copy>
|
||||
<copy todir="pkg-temp/docs/icons/flags48x48" >
|
||||
<fileset dir="installer/resources/icons/flags48x48" />
|
||||
<copy todir="pkg-temp/docs/icons" >
|
||||
<fileset dir="installer/resources/icons" />
|
||||
</copy>
|
||||
<mkdir dir="pkg-temp/webapps" />
|
||||
<copy todir="pkg-temp/webapps/">
|
||||
|
Before Width: | Height: | Size: 275 B After Width: | Height: | Size: 275 B |
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 545 B |
Before Width: | Height: | Size: 435 B After Width: | Height: | Size: 435 B |
Before Width: | Height: | Size: 347 B After Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 697 B After Width: | Height: | Size: 697 B |
Before Width: | Height: | Size: 469 B After Width: | Height: | Size: 469 B |
Before Width: | Height: | Size: 418 B After Width: | Height: | Size: 418 B |
Before Width: | Height: | Size: 413 B After Width: | Height: | Size: 413 B |
Before Width: | Height: | Size: 491 B After Width: | Height: | Size: 491 B |
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 459 B After Width: | Height: | Size: 459 B |
Before Width: | Height: | Size: 418 B After Width: | Height: | Size: 418 B |
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 377 B After Width: | Height: | Size: 377 B |