From owner-svn-ports-head@FreeBSD.ORG Sun Sep 7 21:21:03 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EEFAC512; Sun, 7 Sep 2014 21:21:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D94451D9E; Sun, 7 Sep 2014 21:21:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s87LL2Yd015769; Sun, 7 Sep 2014 21:21:02 GMT (envelope-from kmoore@FreeBSD.org) Received: (from kmoore@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s87LL29u015762; Sun, 7 Sep 2014 21:21:02 GMT (envelope-from kmoore@FreeBSD.org) Message-Id: <201409072121.s87LL29u015762@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kmoore set sender to kmoore@FreeBSD.org using -f From: Kris Moore Date: Sun, 7 Sep 2014 21:21:02 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r367607 - in head/games/minecraft-client: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2014 21:21:03 -0000 Author: kmoore Date: Sun Sep 7 21:21:01 2014 New Revision: 367607 URL: http://svnweb.freebsd.org/changeset/ports/367607 QAT: https://qat.redports.org/buildarchive/r367607/ Log: - Update minecraft client to work with the recent 1.8 client patch - Change first-run script to only warn the user about changing the profile - Bump PORTREV Added: head/games/minecraft-client/files/Notifier.java - copied, changed from r367605, head/games/minecraft-client/files/Notifer.java Deleted: head/games/minecraft-client/files/Notifer.java Modified: head/games/minecraft-client/Makefile head/games/minecraft-client/files/minecraft-client head/games/minecraft-client/pkg-plist Modified: head/games/minecraft-client/Makefile ============================================================================== --- head/games/minecraft-client/Makefile Sun Sep 7 21:17:11 2014 (r367606) +++ head/games/minecraft-client/Makefile Sun Sep 7 21:21:01 2014 (r367607) @@ -3,7 +3,7 @@ PORTNAME= minecraft-client PORTVERSION= 1.7.9 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= games java MASTER_SITES= http://s3.amazonaws.com/Minecraft.Download/launcher/:minecraft \ http://media-mcw.cursecdn.com/c/c5/:icon @@ -41,8 +41,10 @@ do-install: -e 's|PREFIX|${PREFIX}|' \ -e 's|JAVA_CMD|${JAVA}|' ${FILESDIR}/minecraft-client \ > ${WRKDIR}/minecraft-client + ${SED} -e 's|%%PREFIX%%|${PREFIX}|' ${FILESDIR}/Notifier.java \ + > ${WRKDIR}/Notifier.java ${INSTALL_SCRIPT} ${WRKDIR}/minecraft-client ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${FILESDIR}/minecraft-runtime ${STAGEDIR}${DATADIR} - ${INSTALL_DATA} ${FILESDIR}/Notifer.java ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKDIR}/Notifier.java ${STAGEDIR}${DATADIR} .include Copied and modified: head/games/minecraft-client/files/Notifier.java (from r367605, head/games/minecraft-client/files/Notifer.java) ============================================================================== --- head/games/minecraft-client/files/Notifer.java Sun Sep 7 20:26:55 2014 (r367605, copy source) +++ head/games/minecraft-client/files/Notifier.java Sun Sep 7 21:21:01 2014 (r367607) @@ -4,7 +4,7 @@ import javax.swing.UIManager; import javax.swing.Icon; import java.awt.EventQueue; -public class Notifer extends JFrame{ +public class Notifier extends JFrame{ //Using a standard Java icon private Icon optionIcon = UIManager.getIcon("FileView.computerIcon"); @@ -16,13 +16,13 @@ public class Notifer extends JFrame{ public void run() { //create GUI frame - new Notifer().setVisible(true); + new Notifier().setVisible(true); } }); } - public Notifer() + public Notifier() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //setTitle("Simple Dialog Box Example"); @@ -31,7 +31,7 @@ public class Notifer extends JFrame{ setLocationRelativeTo(null); // Show our warning to first time users - JOptionPane.showMessageDialog(this, "After the first time logging in with a new user, you will need to close the Minecraft Launcher and restart before the game will run." + JOptionPane.showMessageDialog(this, "Before starting MineCraft, be sure to open your Profile and set the Java Executable to: '%%PREFIX%%/share/minecraft-client/minecraft-runtime'" ,"Important Notification", JOptionPane.PLAIN_MESSAGE); System.exit(0); Modified: head/games/minecraft-client/files/minecraft-client ============================================================================== --- head/games/minecraft-client/files/minecraft-client Sun Sep 7 21:17:11 2014 (r367606) +++ head/games/minecraft-client/files/minecraft-client Sun Sep 7 21:21:01 2014 (r367607) @@ -1,43 +1,18 @@ #!/bin/sh export JAVA_HOME=JAVA_HOME -# Look for launcher_profiles to fix -if [ -e "${HOME}/.minecraft/launcher_profiles.json" ] ; then - rm ${HOME}/.minecraft/launcher_profiles.json.new 2>/dev/null - - # Lets make sure we set the fixed java executable script - while IFS='' read -r line - do - # Skip old javaDir lines - echo $line | grep -q '"javaDir": "' - if [ $? -eq 0 ] ; then continue ; fi - - # If not a name line, add and continue - echo $line | grep -q '"name": "' - if [ $? -ne 0 ] ; then - printf "%s\n" "$line" >> ${HOME}/.minecraft/launcher_profiles.json.new - continue - fi - - # Found a profile entry, lets add the correct runtime - printf "%s\n" "$line" >> ${HOME}/.minecraft/launcher_profiles.json.new - echo ' "javaDir": "/usr/local/share/minecraft-client/minecraft-runtime",' >> ${HOME}/.minecraft/launcher_profiles.json.new - - done < ${HOME}/.minecraft/launcher_profiles.json - - # See if we have dangling } - tail -1 ${HOME}/.minecraft/launcher_profiles.json.new | grep -q "^}" - if [ $? -ne 0 ] ; then - printf "}" >> ${HOME}/.minecraft/launcher_profiles.json.new +# The first time warn the user to set the runtime executable in place of java +if [ ! -e "${HOME}/.minecraft/notified-runtime" ] ; then + if [ ! -d "${HOME}/.minecraft" ] ; then + mkdir ${HOME}/.minecraft fi + touch ${HOME}/.minecraft/notified-runtime 2>/dev/null - mv ${HOME}/.minecraft/launcher_profiles.json.new ${HOME}/.minecraft/launcher_profiles.json -else # No .minecraft dir, lets display the first time notification - javac -d /tmp /usr/local/share/minecraft-client/Notifer.java + javac -d /tmp /usr/local/share/minecraft-client/Notifier.java cd /tmp - java Notifer - rm Notifer*.class + # Run this as a background task, so that it appears over the launcher + ( sleep 3; java Notifier ; rm Notifier*.class ) & fi exec ${JAVA_HOME}/bin/java -Djava.nio.file.spi.DefaultFileSystemProvider=sun.nio.fs.BsdFileSystemProvider \ Modified: head/games/minecraft-client/pkg-plist ============================================================================== --- head/games/minecraft-client/pkg-plist Sun Sep 7 21:17:11 2014 (r367606) +++ head/games/minecraft-client/pkg-plist Sun Sep 7 21:21:01 2014 (r367607) @@ -1,6 +1,6 @@ bin/minecraft-client %%DATADIR%%/Minecraft.jar %%DATADIR%%/minecraft-runtime -%%DATADIR%%/Notifer.java +%%DATADIR%%/Notifier.java share/pixmaps/minecraft-client.png @dirrm %%DATADIR%%