rpms/skinlf/devel import.log, NONE, 1.1 skinlf-build-xml-patch.patch, NONE, 1.1 skinlf-common-xml-patch.patch, NONE, 1.1 skinlf-generate-tarball.sh, NONE, 1.1 skinlf-nosun-jimi-patch.patch, NONE, 1.1 skinlf-sun-jdk1.5-xpath-patch.patch, NONE, 1.1 skinlf.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Daniel Haley
mycae at fedoraproject.org
Thu Dec 18 12:32:16 UTC 2008
- Previous message (by thread): rpms/yum-utils/F-10 sources, 1.27, 1.28 yum-utils.spec, 1.50, 1.51 os-import-yum-complete-transaction.patch, 1.1, NONE repodiff-unicode-fix.patch, 1.1, NONE
- Next message (by thread): rpms/mono-nunit22/devel import.log, NONE, 1.1 mono-nunit22-248-buildkey.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 mono-nunit22.spec, 1.6, 1.7 sources, 1.2, 1.3 nunit22-key.patch, 1.1, NONE nunit22-mono.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mycae
Update of /cvs/pkgs/rpms/skinlf/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14570/devel
Modified Files:
.cvsignore sources
Added Files:
import.log skinlf-build-xml-patch.patch
skinlf-common-xml-patch.patch skinlf-generate-tarball.sh
skinlf-nosun-jimi-patch.patch
skinlf-sun-jdk1.5-xpath-patch.patch skinlf.spec
Log Message:
*Thu Dec 18 2008 <mycae(a!t)yahoo.com> 6.7-6
-Add Development branch
--- NEW FILE import.log ---
skinlf-6_7-6_fc9:HEAD:skinlf-6.7-6.fc9.src.rpm:1229603463
skinlf-build-xml-patch.patch:
--- NEW FILE skinlf-build-xml-patch.patch ---
--- build.xml 1970-01-01 10:00:00.000000000 +1000
+++ skinlf-build.xml 2008-10-31 22:12:33.000000000 +1100
@@ -0,0 +1,321 @@
+<!DOCTYPE project [
+ <!ENTITY build-COMMON SYSTEM "common.xml">
+]>
+
+<!--
+ Skin Look And Feel Build
+-->
+
+<project name="skinlf" default="compile.java" basedir=".">
+<!-- Allow user to override settings -->
+<property file="${user.home}/skinlf-ant.properties"/>
+<property file="build.properties"/>
+<!-- Project Identification -->
+<property name="project" value="skinlf"/>
+<property name="version" value="6.7"/>
+<property name="year" value="2000-2006"/>
+<property name="project.fullname" value="Skin Look And Feel"/>
+<property name="project.nativeskin" value="nativeskin"/>
+<property name="javadoc.packagenames" value="com.l2fprod.gui,com.l2fprod.gui.plaf.skin,com.l2fprod.gui.region,com.l2fprod.gui.nativeskin"/>
+
+<path id="classpath">
+<pathelement location="/usr/share/java/imageconversion.jar"/>
+<pathelement location="/usr/share/java/JimiProClasses.zip"/>
+<pathelement location="/usr/share/java/xalan.jar"/>
+<pathelement location="/usr/share/java/xercesImpl.jar"/>
+<pathelement location="/usr/share/java/xml-apis.jar"/>
+<pathelement location="/usr/share/java/laf-plugin.jar"/>
+</path>
+<property name="classpath.asprop" refid="classpath"/>
+
+<!--
+ get some of the dependant jars from maven repository
+-->
+
+<target name="init.jars">
+<get src="http://www.ibiblio.org/maven/javacc/jars/JavaCC.zip" dest="lib/JavaCC.zip" verbose="true" usetimestamp="true"/>
+<get src="http://www.ibiblio.org/maven/xalan/jars/xalan-2.5.1.jar" dest="lib/xalan.jar" verbose="true" usetimestamp="true"/>
+<get src="http://www.ibiblio.org/maven/xerces/jars/xercesImpl-2.4.0.jar" dest="lib/xercesImpl.jar" verbose="true" usetimestamp="true"/>
+<get src="http://www.ibiblio.org/maven/xml-apis/jars/xml-apis-2.0.2.jar" dest="lib/xml-apis.jar" verbose="true" usetimestamp="true"/>
+</target>
+
+<target name="compile.javacc" depends="init">
+<javacc target="src/com/l2fprod/gui/plaf/skin/impl/gtk/parser/GtkParser.jj" outputdirectory="src/com/l2fprod/gui/plaf/skin/impl/gtk/parser" javacchome="lib" static="false" javaunicodeescape="true"/>
+</target>
+<target name="compile" depends="init">
+ </target>
+
+<!--
+
+ Utility targets to use the style converters
+
+-->
+
+<target name="convert.msstyles">
+<fail unless="msstyle" message="Specify path to msstyle xml -Dmsstyle=pathtoxml"/>
+<fail unless="skin" message="Specify themepack folder -Dskin=pathtothemepackdir"/>
+
+<java classname="com.l2fprod.tools.msstyles.MsStylesToSkinLF" classpath="${classpath.asprop}:${java.src.dir}:${build.classes}" fork="yes">
+<arg value="${msstyle}"/>
+<arg value="${msstyle}.xml"/>
+<arg value="${skin}"/>
+</java>
+
+<copy todir="${skin}">
+<fileset dir="src/themepacks/skeletonthemepack" includes="**"/>
+</copy>
+</target>
+<!--
+ Start Demos
+ -->
+
+<target name="demo">
+
+<java classname="examples.demo" classpath="${classpath.asprop}:${java.src.dir}:${build.classes}" fork="yes">
+<arg value="${skin}"/>
+</java>
+</target>
+<!-- Dist targets -->
+
+<target name="jar" depends="compile.java">
+<!-- uncompress laf-plugin jar -->
+<unjar src="lib/laf-plugin.jar" dest="${build.classes}/"/>
+
+<jar destfile="${build.dir}/${project}.jar">
+<fileset dir="${build.classes}" includes="*.class,nanoxml/**,org/jvnet/**,com/**/*.class" excludes="**/region/**,**/nativeskin/**"/>
+<fileset dir="${java.src.dir}" includes="com/**/*.properties"/>
+<fileset dir="${java.src.dir}" includes="com/**/*.template"/>
+<fileset dir="${java.src.dir}" includes="com/**/*.gif"/>
+
+<manifest>
+<attribute name="Built-by" value="${user.name}"/>
+<attribute name="Main-Class" value="com.l2fprod.gui.plaf.skin.Skinit"/>
+
+<section name="com/l2fprod/gui/plaf/skin">
+<attribute name="Specification-Title" value="${project.fullname}"/>
+<attribute name="Specification-Version" value="${version}"/>
+<attribute name="Specification-Vendor" value="L2FProd.com"/>
+<attribute name="Implementation-Title" value="${project.fullname}"/>
+<attribute name="Implementation-Version" value="${version}"/>
+<attribute name="Implementation-Vendor" value="L2FProd.com"/>
+</section>
+</manifest>
+</jar>
+</target>
+
+<target name="obfuscate" depends="jar">
+<taskdef name="proguard" classname="proguard.ant.ProGuardTask" classpath="lib/proguard.jar"/>
+<move file="${build.dir}/${project}.jar" tofile="${build.dir}/${project}-toobfuscate.jar"/>
+
+<proguard outjar="${build.dir}/${project}.jar" obfuscate="yes" usemixedclassnames="no" overloadaggressively="yes" printmapping="obfuscatemapping.txt" printusage="obfuscateusage.txt">
+<libraryjar name="${java.home}/lib/rt.jar"/>
+<injar name="${build.dir}/${project}-toobfuscate.jar"/>
+
+<keep access="public" type="class" name="Skinit">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.SkinApplet">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.SkinChooser">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.WindowSnapping">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.nativeskin.**">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.CompoundSkin">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.IncorrectVersionException">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.LinuxLookAndFeel">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.Skin">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.SkinButton">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.SkinFrame">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.Skinit">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.SkinLookAndFeel">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.SkinPersonality">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.SkinPreviewWindow">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.SkinProgress">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.SkinScrollbar">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.SkinSeparator">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.SkinSlider">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.SkinSplitPane">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.SkinTab">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.impl.*">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.impl.gtk.GtkSkin">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.plaf.skin.impl.kde.KdeSkin">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.gui.region.*">
+<method name="*"/>
+</keep>
+
+<keep access="public" type="class" name="com.l2fprod.tools.**">
+<method name="*"/>
+</keep>
+
+<keep type="class" name="com.l2fprod.util.**">
+<method name="*"/>
+</keep>
+</proguard>
+</target>
+
+<target name="dist.pre" depends="jar">
+<!-- examples.jar -->
+
+<jar destfile="${build.dist.lib}/examples.jar">
+<fileset dir="${build.classes}" includes="examples/**.class"/>
+<fileset dir="${java.src.dir}" includes="examples/**.properties,examples/**.gif,examples/**.jpg"/>
+</jar>
+<!-- nativeskin.jar -->
+
+<jar jarfile="${build.dist.lib}/nativeskin.jar">
+<fileset dir="${build.classes}" includes="com/l2fprod/gui/region/**,com/l2fprod/gui/nativeskin/**,com/l2fprod/util/OS**,,com/l2fprod/util/Access**" excludes="**/*.html"/>
+</jar>
+<!-- batch files -->
+
+<copy todir="${build.dist.bin}" flatten="yes" preservelastmodified="yes">
+<fileset dir="src" includes="**/*.bat"/>
+</copy>
+<!-- dlls -->
+
+<copy todir="${build.dist.lib}">
+<fileset dir="src/native/win32" includes="*.dll"/>
+</copy>
+<!-- default theme -->
+
+<zip destfile="${build.dist.lib}/themepack.zip">
+<zipfileset dir="src/themepacks/whistlerthemepack"/>
+</zip>
+</target>
+<!--
+ Publish the new version of SKinLF
+ -->
+
+<target name="publish" depends="init">
+<!-- copy zip to dist folder -->
+<copy todir="${publish.download.dir}" file="${project}-${version}-${build.version}.zip"/>
+<filter token="WEB" value="${publish.web.url}"/>
+<!-- update the jnlp website with the new release -->
+<!-- put skinlf.jar in jnlp folder -->
+
+<copy todir="${publish.skinlf.home}/jnlp/" filtering="on" overwrite="yes">
+<fileset dir="src/jnlp" includes="*.jnlp"/>
+</copy>
+<copy file="${build.dist.lib}/${project}.jar" todir="${publish.skinlf.home}/jnlp/"/>
+<copy file="${build.dist.lib}/examples.jar" todir="${publish.skinlf.home}/jnlp/"/>
+<copy file="${build.dist.lib}/themepack.zip" todir="${publish.skinlf.home}/jnlp/"/>
+<copy file="${build.dist.lib}/nativeskin.jar" todir="${publish.skinlf.home}/jnlp"/>
+<jar destfile="${publish.skinlf.home}/jnlp/nativeskinlibs.jar" basedir="${build.dist.lib}" includes="*.dll"/>
+
+<!--
+ copy the documentation
+ <copy todir="${web.skinlf.home}/documentation">
+ <fileset dir="${javadoc.destdir}"/>
+ </copy>
+
+-->
+
+
+</target>
+
+<target name="themes">
+<zip destfile="${build.www.themedir}/cellshadedthemepack.zip" basedir="src/themepacks/cellshadedthemepack"/>
+<zip destfile="${build.www.themedir}/whistlerthemepack.zip" basedir="src/themepacks/whistlerthemepack"/>
+<zip destfile="${build.www.themedir}/xplunathemepack.zip" basedir="src/themepacks/xplunathemepack"/>
+<zip destfile="${build.www.themedir}/toxicthemepack.zip" basedir="src/themepacks/toxicthemepack"/>
+<zip destfile="${build.www.themedir}/beigeazulthemepack.zip" basedir="src/themepacks/beigeazulthemepack"/>
+<!-- png for these themepacks are not in cvs -->
+<zip destfile="${build.www.themedir}/aquathemepack.zip" basedir="src/themepacks/aquathemepack"/>
+<zip destfile="${build.www.themedir}/alloythemepack.zip" basedir="src/themepacks/alloythemepack"/>
+</target>
+
+<target name="nativeskin">
+<javah destdir="src/native/x11" classpath="${build.classes}" class="com.l2fprod.gui.nativeskin.x11.X11NativeSkin"/>
+<javah class="com.l2fprod.gui.nativeskin.win32.Win32NativeSkin" destdir="src/native/win32" classpath="${build.classes}"/>
+
+<antcall target="createdll">
+<param name="java.home" value="${jdk14.home}"/>
+<param name="dir" value="src\native\win32"/>
+<param name="file" value="regionJAWT"/>
+<param name="dll" value="nativeskinwin32JAWT.dll"/>
+</antcall>
+</target>
+
+<target name="createdll">
+
+<exec executable="${bcc55.home}\bin\bcc32.exe" dir="${dir}">
+<arg line="-w-"/>
+<arg value="-I${bcc55.home}\include;${java.home}\include;${java.home}\include\win32"/>
+<arg value="-c"/>
+<arg value="${file}.c"/>
+</exec>
+
+<exec executable="${bcc55.home}\bin\ilink32.exe" dir="${dir}">
+<arg value="-L${bcc55.home}\lib;${bcc55.home}\lib\psdk;${java.home}\lib;${basedir}\..\common\lib"/>
+<arg line="-Gn -Tpd -x c0d32.obj ${file}.obj ,${dll},,user32 gdi32 bccjawt import32 cw32mt,,"/>
+</exec>
+</target>
+&build-COMMON;
+</project>
skinlf-common-xml-patch.patch:
--- NEW FILE skinlf-common-xml-patch.patch ---
--- common.xml 1970-01-01 10:00:00.000000000 +1000
+++ common.xml.new 2008-10-28 17:22:14.000000000 +1100
@@ -0,0 +1,171 @@
+<!--
+ Common Target which could be reused by other projects later.
+-->
+
+<!-- COMMON PROPERTIES -->
+
+ <property name="debug" value="true"/>
+ <property name="optimize" value="false"/>
+
+ <!-- Java Related -->
+ <property name="java.src.dir" value="src"/>
+ <property name="javac.compiler" value="modern"/>
+
+ <!-- Destination Directory for the build -->
+ <property name="build.dir" value="build"/>
+ <property name="build.classes" value="${build.dir}/classes"/>
+ <property name="build.src" value="${build.dir}/src"/>
+ <property name="build.dist.dir" value="${project}-${version}"/>
+ <property name="build.dist.src" value="${build.dist.dir}/src"/>
+ <property name="build.dist.lib" value="${build.dist.dir}/lib"/>
+ <property name="build.dist.bin" value="${build.dist.dir}/bin"/>
+ <property name="build.www.dir" value="${build.dir}/www"/>
+
+<!-- COMMON TARGETS -->
+
+ <target name="init.properties">
+ <tstamp>
+ <format property="build.time" pattern="MM/dd/yyyy hh:mm aa" locale="en"/>
+ <format property="build.version" pattern="yyyyMMdd" locale="en"/>
+ </tstamp>
+ <filter token="VERSION" value="${version}"/>
+ <filter token="PROJECT.FULLNAME" value="${project.fullname}"/>
+ <filter token="DATE" value="${build.time}"/>
+ <filter token="YEAR" value="${year}"/>
+ </target>
+
+ <target name="init.directories">
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${build.classes}"/>
+ <mkdir dir="${build.dist.dir}"/>
+ <mkdir dir="${build.dist.src}"/>
+ <mkdir dir="${build.dist.lib}"/>
+ <mkdir dir="${build.dist.bin}"/>
+ </target>
+
+ <target name="init" depends="init.properties,init.directories">
+ </target>
+
+ <target name="clean">
+ <delete dir="${build.dir}"/>
+ <delete dir="${build.dist.dir}"/>
+ </target>
+
+ <target name="fixcrlf">
+ <fixcrlf srcdir="${basedir}" eol="cr">
+ <include name="AUTHORS,LICENSE*,README,THANKS" />
+ <include name="**/*.java" />
+ </fixcrlf>
+ </target>
+
+<!-- Java Related Targets -->
+
+ <target name="compile.java" depends="init">
+ <depend srcdir="${java.src.dir}"
+ destdir="${build.classes}"
+ cache="${build.dir}/dependcache"
+ closure="yes"/>
+
+ <copy todir="${build.src}" filtering="yes">
+ <fileset dir="${java.src.dir}">
+ <include name="**/*.java"/>
+ </fileset>
+ </copy>
+ <javac srcdir="${build.src}"
+ destdir="${build.classes}"
+ classpathref="classpath"
+ compiler="${javac.compiler}"
+ includeAntRuntime="false"
+ includeJavaRuntime="false"
+ debug="${debug}"
+ optimize="${optimize}"
+ target="1.3" source="1.3">
+ </javac>
+ </target>
+
+<!-- Distribution Target -->
+
+ <target name="dist" depends="jar,dist.pre">
+ <!-- project.jar -->
+ <copy todir="${build.dist.lib}"
+ file="${build.dir}/${project}.jar"
+ preservelastmodified="yes"/>
+ <!-- source code -->
+ <copy todir="${build.dist.src}"
+ preservelastmodified="yes">
+ <fileset dir="${build.src}" includes="**/*.java"/>
+ <fileset dir="${java.src.dir}" includes="**/*.properties"/>
+ </copy>
+ <!-- regular files -->
+ <copy todir="${build.dist.dir}"
+ filtering="yes"
+ preservelastmodified="yes">
+ <fileset dir="${basedir}">
+ <include name="AUTHORS"/>
+ <include name="INSTALL"/>
+ <include name="README"/>
+ <include name="THANKS"/>
+ <include name="LICENSE"/>
+ <include name="LICENSE_*"/>
+ </fileset>
+ </copy>
+ <xslt in="xdocs/CHANGES.xml"
+ out="${build.dist.dir}/CHANGES"
+ style="xdocs/xsl/text.xsl"/>
+ <!-- zip file -->
+ <zip destfile="${project}-${version}-${build.version}.zip">
+ <zipfileset dir="${build.dist.dir}"
+ prefix="${project}-${version}" />
+ </zip>
+ </target>
+
+<!-- Source code formatting -->
+
+ <target name="jalopy" depends="init">
+ </target>
+
+<!-- Project Web Documentation -->
+
+ <target name="www" depends="init">
+ <mkdir dir="${build.www.dir}"/>
+ <xslt in="xdocs/www.xml"
+ out="${build.www.dir}/empty.html"
+ style="xdocs/xsl/tohtml.xsl">
+ <param name="output.dir" expression="${build.www.dir}"/>
+ <param name="timestamp" expression="${build.time}"/>
+ </xslt>
+ <copy todir="${build.www.dir}">
+ <fileset dir="xdocs">
+ <include name="images/**"/>
+ <include name="**.java"/>
+ </fileset>
+ </copy>
+ <mkdir dir="${build.www.dir}/javadoc"/>
+ <javadoc sourcepath="${java.src.dir}"
+ classpath="${classpath}"
+ destdir="${build.www.dir}/javadoc"
+ packagenames="${javadoc.packagenames}"
+ private="false" protected="true"
+ windowtitle="${project.fullname} ${version} API"
+ doctitle="${project.fullname} ${version}"
+ version="false" author="false" use="false"
+ stylesheetfile="xdocs/javadoc.css"
+ splitindex="true"
+ bottom="Copyright © ${year} L2FProd.com. All Rights Reserved."/>
+ <delete file="${build.www.dir}/empty.html"/>
+ </target>
+
+ <target name="www.sync" depends="init">
+ <ftp server="${build.www.server}"
+ userid="${build.www.userid}"
+ password="${build.www.password}"
+ remotedir="${build.www.remotedir}"
+ action="put"
+ verbose="yes"
+ depends="yes">
+ <fileset dir="${build.www.dir}">
+ <include name="**/**"/>
+ </fileset>
+ </ftp>
+ </target>
+
--- NEW FILE skinlf-generate-tarball.sh ---
#!/bin/bash
VERSION=$1
#Original source is located at
#https://skinlf.dev.java.net/files/documents/66/37801/skinlf-6.7-20060722.zip
rm -rf skinlf-6.7
unzip skinlf-$VERSION.zip
rm skinlf-6.7/src/examples/Clock.java
#sed -i -e 's/patentedcodec.c//' libfoo-$VERSION/src/Makefile
tar -czvf skinlf-6.7-clean.tar.gz skinlf-6.7
skinlf-nosun-jimi-patch.patch:
--- NEW FILE skinlf-nosun-jimi-patch.patch ---
--- src/com/l2fprod/tools/ImageUtils.java 2006-07-22 13:46:18.000000000 +1000
+++ src/com/l2fprod/tools/ImageUtils.java.new 2008-11-01 14:03:30.000000000 +1100
@@ -6,15 +6,11 @@
import javax.swing.ImageIcon;
-import com.ibm.imageconversion.*;
-import com.sun.jimi.core.*;
-
+import javax.imageio.*;
public class ImageUtils {
public static Component bitmapCreator = new javax.swing.JLabel();
- static BMPDecoder decoder = new BMPDecoder();
- static BMPEncoder encoder = new BMPEncoder();
public static Image loadPng(String pathToImage) throws Exception {
ImageIcon icon = new ImageIcon(new File(pathToImage).toURL());
@@ -22,29 +18,34 @@
}
public static void savePng(Image image, String pathToImage) throws Exception {
- Jimi.putImage(image, pathToImage);
+ ImageIO.write((RenderedImage)image, "png", new File(pathToImage));
}
+ private static String getFileFmt(String pathToImage) throws Exception {
+ String fmt;
+ if (pathToImage.toLowerCase().endsWith(".png")) {
+ return "png";
+ }
+ if (pathToImage.toLowerCase().endsWith(".gif")) {
+ return "gif";
+ }
+ if (pathToImage.toLowerCase().endsWith(".bmp")) {
+ return "bmp";
+ }
+ return "";
+ }
+
public static void createPicture(String pathToImage, int index, int maxParts,
String filename, boolean horizontal) {
try {
System.out.println("working with " + pathToImage);
Image image = null;
- if (pathToImage.toLowerCase().endsWith(".png") ||
- pathToImage.toLowerCase().endsWith(".gif")) {
- image = loadPng(pathToImage);
- } else if (pathToImage.toLowerCase().endsWith(".bmp")) {
- decoder.setInputFilename(pathToImage);
- decoder.triggerAction();
- image = decoder.getResult();
- } else {
- throw new Error("do not know how to load " + pathToImage);
- }
+ image = Toolkit.getDefaultToolkit().getImage(pathToImage);
// if only one image, dump it as it
- if (index == 0 && maxParts == 1) {
- Jimi.putImage(image, filename);
+ if (index == 0 && maxParts == 1) {
+ ImageIO.write((RenderedImage)image, getFileFmt(pathToImage), new File(pathToImage));
} else {
if (horizontal) {
int partHeight = image.getHeight(bitmapCreator) / maxParts;
@@ -55,8 +56,8 @@
image = grab(image, partWidth * index, 0,
partWidth, image.getHeight(bitmapCreator));
}
- Jimi.putImage(image, filename);
}
+ ImageIO.write((RenderedImage)image, getFileFmt(pathToImage), new File(pathToImage));
} catch (Exception e) {
System.out.println("error while working with " + pathToImage);
e.printStackTrace();
skinlf-sun-jdk1.5-xpath-patch.patch:
--- NEW FILE skinlf-sun-jdk1.5-xpath-patch.patch ---
--- src/com/l2fprod/tools/msstyles/MsStylesToSkinLF.java 2006-07-22 13:46:22.000000000 +1000
+++ src/com/l2fprod/tools/msstyles/MsStylesToSkinLF.java.newer 2008-11-01 14:35:47.000000000 +1100
@@ -9,7 +9,7 @@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
-import org.apache.xpath.XPathAPI;
+import com.sun.org.apache.xpath.internal.XPathAPI;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
--- NEW FILE skinlf.spec ---
Name: skinlf
Version: 6.7
Release: 6%{?dist}
Summary: Skin look and feel Skinning library for java
Group: Development/Libraries
License: ASL 2.0 and zlib and ASL 1.1
URL: http://skinlf.dev.java.net/
Source0: %{name}-%{version}-clean.tar.gz
# Original Source# Contains code that we cannot ship.
# Download the upstream tarball and invoke this script while in the
# tarball's directory
# ./skinlf-generate-tarball.sh 6.7-20060722
Source1: %{name}-generate-tarball.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
#See http://bollin.googlecode.com/svn/libskinlf-java/trunk
#for patchset maintained by Scilab developer, Sylvestre Ledru.
# These patches have been modified.
Patch0: skinlf-nosun-jimi-patch.patch
#Release file does not contain building tools. thats CVS only. Don't know which CVS revision to check out for release CVS.
Patch1: skinlf-build-xml-patch.patch
#Create common.xml as release omits building tools
Patch2: skinlf-common-xml-patch.patch
#org.apache.xpath has been removed from JDK1.5 and above
#patch to use com.sun.org.apache.xpath.internal.XPathAPI instead
Patch3: skinlf-sun-jdk1.5-xpath-patch.patch
BuildRequires: ant-nodeps
BuildRequires: laf-plugin
BuildRequires: dos2unix
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils
BuildRequires: ant
Requires: java >= 1:1.6.0
Requires: jpackage-utils
#This depends upon laf-plugin
#https://bugzilla.redhat.com/show_bug.cgi?id=461407
Requires: laf-plugin
%description
Skin Look And Feel is a java framework that is able to read GTK (The
Gimp ToolKit) and KDE (The K Desktop Environment) skins to enhance
your application.
SkinLF supports GUI controls such as Buttons, Checks, Radios, Scrollbars,
Progress Bar, Lists, Tables, Internal Frames, Colors, Background
Textures, Regular Windows.
%prep
%setup -q
%patch0
#building patches
%patch1
%patch2
#Code fixing
%patch3
#dos2unix Doc files
for i in "CHANGES README LICENSE LICENSE_nanoxml" ;
do
dos2unix -d2u $i;
done
#Remove jar files
rm -f ./lib/examples.jar
rm -f ./lib/nativeskin.jar
rm -f ./lib/skinlf.jar
#rm due to dubious license
rm -f ./src/examples/Clock.java
#Sanitise package -- disallow jar files
JAR_files=""
for j in $(find -name \*.jar); do
if [ ! -L $j ] ; then
JAR_files="$JAR_files $j"
fi
done
if [ ! -z "$JAR_files" ] ; then
echo "These JAR files should be deleted and symlinked to system JAR files: $JAR_files"
#Uncomment this line before accepting package
exit 1
fi
%build
ant
#Construct-a-jar Dont use ant jar as it tries to unpack laf-plugin
pushd build/classes
jar cf %{name}-%{version}.jar .
popd
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/%{_javadir}
install -m644 ./build/classes/%{name}-%{version}.jar -D %{buildroot}%{_javadir}/%{name}-%{version}.jar
cd %{buildroot}%{_javadir}/
ln -s %{name}-%{version}.jar %{name}.jar
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc CHANGES README LICENSE LICENSE_nanoxml
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar
%changelog
*Sat Dec 06 2008 <mycae(a!t)yahoo.com> 6.7-6
- Fixed jar dir
- Changed primary jar to name-version.jar, & linked.
- Added clean tarball generator
* Wed Dec 03 2008 <mycae(a!t)yahoo.com> 6.7-5
- Added LICENSE_nanoxml
- Updated licence spec line to include ASL 1.1 & zlib
- removed Clock.java due to incompatible license
* Sat Nov 29 2008 <mycae(a!t)yahoo.com> 6.7-4
- Updated BuildRequires to inlcude laf-plugin
- Silence several rpmlint errors
- ASL 2.0 vs Apache Source Licence 2.0
- Fix arch
- Fix EOL on docs.
* Sun Nov 23 2008 <mycae(a!t)yahoo.com> 6.7-3
- Modify description field
* Sun Nov 16 2008 <mycae(a!t)yahoo.com> 6.7-2
- Fix version numbering
- Fix top level dir when building jar
* Sat Nov 01 2008 <mycae(a!t)yahoo.com> 6.7-1
- Create spec file
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/skinlf/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 14 Dec 2008 04:54:25 -0000 1.1
+++ .cvsignore 18 Dec 2008 12:31:46 -0000 1.2
@@ -0,0 +1 @@
+skinlf-6.7-clean.tar.gz
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/skinlf/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 14 Dec 2008 04:54:25 -0000 1.1
+++ sources 18 Dec 2008 12:31:46 -0000 1.2
@@ -0,0 +1 @@
+3ef43d0f1941b1e338292ce041e57da0 skinlf-6.7-clean.tar.gz
- Previous message (by thread): rpms/yum-utils/F-10 sources, 1.27, 1.28 yum-utils.spec, 1.50, 1.51 os-import-yum-complete-transaction.patch, 1.1, NONE repodiff-unicode-fix.patch, 1.1, NONE
- Next message (by thread): rpms/mono-nunit22/devel import.log, NONE, 1.1 mono-nunit22-248-buildkey.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 mono-nunit22.spec, 1.6, 1.7 sources, 1.2, 1.3 nunit22-key.patch, 1.1, NONE nunit22-mono.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list