diff -Nru runescape-3.9.1/debian/changelog runescape-3.9.4~PPA1/debian/changelog --- runescape-3.9.1/debian/changelog 2012-08-25 18:56:58.000000000 +0000 +++ runescape-3.9.4~PPA1/debian/changelog 2012-11-19 20:35:32.000000000 +0000 @@ -1,24 +1,42 @@ -runescape (3.9.1) maverick; urgency=low +runescape (3.9.4~PPA1) maverick; urgency=low - * Fixed update from mac client + * Remove the beta launcher and beta parameters file. + * FINAL release for maverick and natty since EoC Beta is finished - -- HikariKnight Sat, 25 Aug 2012 20:37:15 +0200 + -- HikariKnight Sat, 17 Nov 2012 16:43:37 +0200 + +runescape (3.9.3) oneiric; urgency=low + + * Made the client use Apple Java6 on OSX if it exists + (instead of default java) + * Fixed the windows_main function so that the client can run + on windows again. + + -- HikariKnight Fri, 10 Nov 2012 13:17:05 +0200 -runescape (3.8.2r6) lucid; urgency=low +runescape (3.9.2) oneiric; urgency=low - * Added menu entry for runescape EoC beta (thanks ker laeda) + * Splitted the source into modules + * Made it possible to write custom modules + * Store information that are used by modules inside the + $rsu_data mutator for easy transfer of info to modules + * Git repository made on github.com! + * Fixed a bug where the launch command lacked some + output for the debug messages after the source was + splitted. - -- HikariKnight Mon, 13 Jul 2012 21:06:51 +0200 + -- HikariKnight Sun, 14 Oct 2012 17:59:05 +0200 -runescape (3.8.2r3) maverick; urgency=low +runescape (3.9.1) oneiric; urgency=low - * Fixed the runescape-beta.prm + * Fixed update from mac client - -- HikariKnight Mon, 13 Jul 2012 17:58:51 +0200 + -- HikariKnight Sat, 25 Aug 2012 20:37:15 +0200 runescape (3.8.2r2) oneiric; urgency=low * Removed openjdk from recommends in the runescape package + in the PPA. -- HikariKnight Mon, 13 Jul 2012 17:34:00 +0200 diff -Nru runescape-3.9.1/opt/runescape/README.txt runescape-3.9.4~PPA1/opt/runescape/README.txt --- runescape-3.9.1/opt/runescape/README.txt 2011-12-25 16:52:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/README.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -To update the unix client just replace the -bin/jagexappletviewer.jar and share/runescape.prm with the -ones from the windows client - -OR - -Run the file "update-runescape-client", it will check if you have p7zip-full -installed before downloading and extracting the new files from the runescape windows client -on http://runescape.com - -If you do not have p7zip-full installed, the updater will download and compile -a copy for use only by the updater (this requires "make" and a c++ compiler like g++ or gcc) \ No newline at end of file diff -Nru runescape-3.9.1/opt/runescape/changelog.txt runescape-3.9.4~PPA1/opt/runescape/changelog.txt --- runescape-3.9.1/opt/runescape/changelog.txt 2012-08-25 18:37:08.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/changelog.txt 2012-11-18 09:48:06.000000000 +0000 @@ -1,3 +1,31 @@ +runescape (3.9.4) oneiric; urgency=low + + * Remove the beta launcher and beta parameters file. + + -- HikariKnight Sat, 17 Nov 2012 16:43:37 +0200 + +runescape (3.9.3) oneiric; urgency=low + + * Made the client use Apple Java6 on OSX if it exists + (instead of default java) + * Fixed the windows_main function so that the client can run + on windows again. + + -- HikariKnight Fri, 10 Nov 2012 13:17:05 +0200 + +runescape (3.9.2) oneiric; urgency=low + + * Splitted the source into modules + * Made it possible to write custom modules + * Store information that are used by modules inside the + $rsu_data mutator for easy transfer of info to modules + * Git repository made on github.com! + * Fixed a bug where the launch command lacked some + output for the debug messages after the source was + splitted. + + -- HikariKnight Sun, 14 Oct 2012 17:59:05 +0200 + runescape (3.9.1) oneiric; urgency=low * Fixed update from mac client diff -Nru runescape-3.9.1/opt/runescape/install-desktop-icons runescape-3.9.4~PPA1/opt/runescape/install-desktop-icons --- runescape-3.9.1/opt/runescape/install-desktop-icons 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/install-desktop-icons 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,171 @@ +#!/usr/bin/perl -w + +# Be strict to avoid messy code +use strict; + +# Use FindBin module to get script directory +use FindBin; + +# Get script directory +my $cwd = $FindBin::Bin; +# Get the homefolder +my $homedir = $ENV{"HOME"}; +# Detect the current OS +my $OS = "$^O"; + +# Kill script if we run on MacOSX or Windows, since this script is +# made for unix platforms like linux, bsd and solaris (with exception of mac) +die "Installing desktop icons works only on Linux, BSD, MacOSX and Solaris platforms +I suggest you download the runescape client for your platform if you +want it in the StartMenu.\n" +if $OS =~ /(MSWin32)/; +# End of the unsupported platform check + +# Check if we are root +my $isroot = `whoami`; + +# Settings Start +my $settings = { + # Name of the uninstaller + uninstaller => "uninstall-desktop-icons", + }; + +# If we are on mac OSX +if ($OS =~ /(darwin)/) +{ + # Run the make_osx_app function + make_osx_app(); +} +# Else we are on other unix platforms +else +{ + # run install_desktop_files function + install_desktop_files(); +} + + +# +#---------------------------------------- *** ---------------------------------------- +# + +sub install_desktop_files +{ + # Prepare an uninstall header + system "echo \"#!/bin/sh\" > /tmp/$settings->{uninstaller}"; + + # Find the desktop file for symlinking + my $desktopfiles = `find $cwd/templates/launchers/ -name "*.conf"`; + + # Split the list by newlines + my @desktopfiles = split(/\n/, $desktopfiles); + + # Make a counter for the desktop files + my $desktopcounter = 0; + + # For each value in the array + foreach(@desktopfiles) + { + # Get the file content + my $content = `cat $desktopfiles[$desktopcounter]`; + + # Edit the desktop file correctly for system install + if ($isroot =~ /root/) + { + # Replace Icon= with Icon={PATH TO ICONS} + $content =~ s/Icon=/Icon=$cwd\/share\//; + + # Replace Exec= with Exec={PATH TO BINARY} + $content =~ s/Exec=/Exec=$cwd\//; + + # Fix parts using xterm + $content =~ s/Exec=$cwd\/xterm/Exec=xterm/; + } + # else if local install then edit the file for that + else + { + # Replace Icon= with Icon={PATH TO ICONS} + $content =~ s/Icon=/Icon=$cwd\/share\//; + + # Replace Exec= with Exec={PATH TO BINARY} + $content =~ s/Exec=/Exec=$cwd\//; + + # Fix parts using xterm + $content =~ s/Exec=$cwd\/xterm/Exec=xterm/; + $content =~ s/update-runescape-client/$cwd\/update-runescape-client/; + } + + # Get the filename + my $filename = $desktopfiles[$desktopcounter]; + my @filename = split(/\//, $filename); + @filename = split(/\./, $filename[-1]); + + # Write a temp file + system("echo \"$content\" > /tmp/$filename[0].desktop"); + + # Move the temp file to its proper location and make it executable + if ($isroot =~ /root/) + { + # Move the desktop file to the system applications folder + system("mv /tmp/$filename[0].desktop /usr/share/applications/ && chmod 755 /usr/share/applications/$filename[0].desktop && echo sudo rm -fv /usr/share/applications/$filename[0].desktop >> /tmp/$settings->{uninstaller}"); + } + # Else + else + { + # Move the desktop file to the local applications folder + system("mv /tmp/$filename[0].desktop $homedir/.local/share/applications/ && chmod 755 $homedir/.local/share/applications/$filename[0].desktop && echo rm -fv $homedir/.local/share/applications/$filename[0].desktop >> /tmp/$settings->{uninstaller}"); + } + + # Increase the counter by 1 + $desktopcounter += 1; + } + + # Copy the uninstallscript to $cwd and make it executable + system("mv /tmp/$settings->{uninstaller} \"$cwd/\" && chmod 755 \"$cwd/$settings->{uninstaller}\""); +} + +sub make_osx_app +{ + # Tell user what we are doing + print "Making application directory.\n"; + + # Make the client directory + system "mkdir -v -p /Applications/RuneScape_Unix/"; + + # Tell user what we are doing + print "\nCopying the template to the directory.\n"; + + # Copy the template + system "cp -R -v \"$cwd/templates/darwin/RuneScape.app\" /Applications/RuneScape_Unix/"; + + # Tell user what we are doing + print "\nCopying client files into the template.\n"; + + # Copy the client files to the files directory + system "cp -R -v \"$cwd/\"* /Applications/RuneScape_Unix/RuneScape.app/Contents/Resources/"; + + # Tell user what we are doing + print "\nMaking symlinks to the runescape script and RSU icon\n"; + + # Make symlinks to the RSU icon and the runescape script + system "cd /Applications/RuneScape_Unix/RuneScape.app/Contents/Resources/ && ln -s runescape script && ln -s share/runescape.icns runescape.icns"; + + # Tell user what we are doing + print "\nCreating a symlink to Resource folder so that the client files are easily accessable.\n"; + + # Symlink the client files to the launcher + system "cd /Applications/RuneScape_Unix/ && ln -v -s RuneScape.app/Contents/Resources ./"; + + # Tell user what we are doing + print "\nCreating symlink to the rsu-settings script\n"; + + # Symlink the rsu-settings script to the RuneScape_Unix folder + system "cd /Applications/RuneScape_Unix/ && ln -s RuneScape.app/Contents/Resources/rsu-settings ./"; + + # Tell user we are done + print "\n\nApplication launcher created and can be run from /Applications/RuneScape_Unix/\n"; +} + +# +#---------------------------------------- *** ---------------------------------------- +# + diff -Nru runescape-3.9.1/opt/runescape/modules/client_modules/rsu_IO.pm runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_IO.pm --- runescape-3.9.1/opt/runescape/modules/client_modules/rsu_IO.pm 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_IO.pm 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,121 @@ +package rsu_IO; + + # Write a file from scratch(deletes previous content) + sub WriteFile + { + # Get the passed variables + my ($content, $writemode, $outfile) = @_; + + # Open the outfile for Writing/Rewrite + open (my $FILE, "$writemode$outfile"); + + # Write the content passed to the function to the file + print $FILE "$content\n"; + } + + # + #---------------------------------------- *** ---------------------------------------- + # + + # Read contents from a file and put it into a pointer + sub ReadFile + { + # Gets passed data from the function call + my ($filename) = @_; + + # Makes an array to keep the inputdata + my @inputdata; + + # Opens the passed file, if error it returns language=0 which equals english + open (my $FILE, "$filename") || return "error reading file"; + + # While there is something in the file + while(<$FILE>) + { + # Skip comments + next if /^\s*#/; + + # Push data into the inputdata array + push(@inputdata, $_) + } + + # Close the file + close($FILE); + + # Return the pointer to the datafile inputdata + return(\@inputdata); + } + + # + #---------------------------------------- *** ---------------------------------------- + # + + sub readconf + { + # Get the passed data from function call + my ($key, $default, $rsu_data) = @_; + + # Get the content from the settings file + my $confcontent = ReadFile($rsu_data->clientdir."/share/settings.conf"); + + # If no file is found or error reading the file + if ($confcontent =~ /error reading file/) + { + # Print debug info + print "Error reading settings.conf, using default value: $default\n"; + + # Then return default value + return $default; + } + + # Split the conf file content by newline + my @settings = split /(\n|\r\n|\r)/, "@$confcontent"; + + # Make a container for the value of the key we are looking for + my $value = ''; + + # Make a counter for the foreach loop + my $counter = 0; + + # For each index in the @settings array + foreach(@settings) + { + # If the line starts with the $key + if ($settings[$counter] =~ /$key/) + { + # Print debug info + print "Reading value from \"$key\"\n"; + + # Split the line by = + my @keyvalue = split /=/, $_; + + # Put the value into the one we are returning + $value = $keyvalue[1]; + } + + # Increase the counter by 1 + $counter += 1; + } + + # If we still got no value + if ($value eq '') + { + # Print debug info + print "Did not find $key in ".$rsu_data->clientdir."/share/settings.conf\n"; + + # Set value to default + $value = $default; + } + + + # Print debug info + print "Setting script data $key to $value\n"; + + # Return the value of the key we were looking for + return $value; + } + + # + #---------------------------------------- *** ---------------------------------------- + # +1; diff -Nru runescape-3.9.1/opt/runescape/modules/client_modules/rsu_check_for_jagexappletviewer.pm runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_check_for_jagexappletviewer.pm --- runescape-3.9.1/opt/runescape/modules/client_modules/rsu_check_for_jagexappletviewer.pm 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_check_for_jagexappletviewer.pm 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,54 @@ +package rsu_cfjav; + + sub check_for_jagexappletviewer + { + # Get the rsu_data container + my $rsu_data = shift; + + # Pass the data to some variables that can be used in commands + my $cwd = $rsu_data->cwd; + my $clientdir = $rsu_data->clientdir; + + my $jarfileexistcheck = ""; + + # If we are on windows + if ($rsu_data->OS =~ /MSWin32/) + { + # Make $cwd use \ instead of / + $cwd =~ s/\\/\//g; + # Set a temp %PATH% variable so we can use grep and then execute dir against the bin folder and pipe the result to grep to + # check if jagexappletviewer.jar exists + $jarfileexistcheck = `set PATH=%CD%\\win32\\jawt\\;%CD%\\win32\\gnu\\;%PATH% && dir \"$cwd\\bin\\\" | grep \"jagexappletviewer.jar\" ` + } + # Else we are on unix + else + { + # execute ls and pipe the result to grep to check if jagexappletviewer.jar exists + $jarfileexistcheck = `ls \"$clientdir/bin/\" | grep \"jagexappletviewer.jar\"`; + } + + # Transfer the result to a new variable + my $jarcheckresult = $jarfileexistcheck; + + # If jagexappletviewer.jar do not exist then + if ($jarcheckresult !~ /jagexappletviewer.jar/) + { + # Make a variable containing the path to the update script + my $updatescript = "\"$cwd/update-runescape-client\""; + + # If we are on windows + if ($rsu_data->OS =~ /MSWin32/) + { + # Use a different execution line + $updatescript = "start cmd /c \"$cwd/update-client-on-windows.bat\""; + } + + # Execute the updater + system "$updatescript"; + } + } + + # + #---------------------------------------- *** ---------------------------------------- + # +1; diff -Nru runescape-3.9.1/opt/runescape/modules/client_modules/rsu_java.pm runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_java.pm --- runescape-3.9.1/opt/runescape/modules/client_modules/rsu_java.pm 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_java.pm 2012-11-10 13:42:28.000000000 +0000 @@ -0,0 +1,348 @@ +# This modules deals with finding the java binary to run the client +package rsu_java; + + sub findjavabin + { + # Get the data container + my $rsu_data = shift; + + # Print debug info + print "I will now check what platform you are using\nand use the correct java path for that platform\n\n"; + + # Define the variable for javabin + my $javabin; + + # Define a variable to contain a boolean(true/false) to see if openjdk exists + my $openjdk; + + # If we are on mac osx (AKA Darwin) + if ($rsu_data->OS =~ /darwin/) + { + # Print debug info + print "You are running darwin/MacOSX.\nI will use Apple Java6 if it exists\notherwise we will use the Java from PATH\n"; + + # javabin is /usr/bin/java + $javabin = "/usr/bin/java"; + + # Check the version of java installed in the Frameworks in OSX (this is where apple dumps its java) + my $applejavaexist = `/System/Library/Frameworks/JavaVM.framework/Commands/java -version 2>&1 | grep "java version"`; + + # If Apple Java is version 1.6.0_* then + if ($applejavaexist =~ /1\.6\.0_*/) + { + # Use the Apple Java as javabin (and avoid java7 until apple actually removes java6) + $javabin = "/System/Library/Frameworks/JavaVM.framework/Commands/java"; + } + } + # Else if we are on linux + elsif($rsu_data->OS =~ /linux/) + { + # Print debug info + print "You are running ".$rsu_data->OS.", I will probe for OpenJDK6 or newer\nand use the newest version if possible.\n\n"; + + # Make a variable to contain the preferredjava so we can use it in the command + my $preferredjava = $rsu_data->preferredjava; + + # run "find /usr/lib/jvm/ -name java" to see if we can find openjdk by using grep + $openjdk = `find -L /usr/lib/jvm/ -name "java" |grep -P "$preferredjava(|-amd64|-i386|-\$\(uname -i\))/bin"`; + + # if $openjdk is found (hurray!) + if ($openjdk =~ /java-\d{1,1}-openjdk(|-\$\(uname -p\)|-i386|-amd64)/) + { + # Print debug info + print "Found OpenJDK files, now checking for the newest installed one.\n"; + + # Split the string by newline incase openjdk-7 was found + my @openjdkbin = split /\n/, $openjdk; + + # Print debug info + print "Checking which OpenJDK versions are installed...\n\n"; + + # Run a check to see if we detected openjdk7 + my $detectedopenjdk7 = grep { $openjdkbin[$_] =~ /java-\d{1,1}-openjdk-(\$\(uname -p\)|i386|amd64)/ } 0..$#openjdkbin; + + # If openjdk7 was not found + #if ($openjdkbin[$index] !~ /java-\d{1,1}-openjdk-(\$\(uname -p\)|i386|amd64)/) + if($detectedopenjdk7 =~ /0/) + { + # Print debug info + print "OpenJDK6 detected!, I will use this to run the client!\n"; + + # we will use openjdk6 to launch it (openjdk does not have sfx problems like sun-java) + $javabin = "$openjdkbin[0] "; + } + else + { + # Print debug info + print "OpenJDK7 detected!, I will use this to run the client!\n"; + + # Find the index of OpenJDK7 + my @openjdk7index = grep { $openjdkbin[$_] =~ /java-\d{1,1}-openjdk-(\$\(uname -p\)|i386|amd64)/ } 0..$#openjdkbin; + + # We will use openjdk7 to launch it (openjdk does not have sfx problems like sun-java) + $javabin = "$openjdkbin[$openjdk7index[0]] "; + } + } + else + { + # Print debug info + print "I did not find any version of OpenJDK in /usr/lib/jvm\nI will instead use the default java in \$PATH\n"; + + # if openjdk is not found then we will use default java (lets pray it is in the $PATH) + $javabin = "java"; + } + } + # Else we are running bsd or solaris (both should have java in their $PATH) + else + { + # Print debug info + print "You are running ".$rsu_data->OS.", I will use the default java on your system\n\n"; + + # We just use the one from $PATH + $javabin = "java"; + } + + # Return to call with the java executable + return $javabin; + } + + # + #---------------------------------------- *** ---------------------------------------- + # + + sub check_for_java_client_mode + { + # Gets passed data from the function call + my $rsu_data = shift; + + # Pass the binary to a variable so we can use it in commands + my $java_binary = $rsu_data->javabin; + + # Execute java -help and see if this java have the -client parameter available + my $results = `$java_binary -help 2>&1`; + + # If the -client parameter is an option + if ($results =~ /-client/) + { + # Tell java to execute in client mode + $java_binary = "$java_binary -client"; + } + + # Return the results + return "$java_binary"; + } + + # + #---------------------------------------- *** ---------------------------------------- + # + + sub unix_find_default_java_binary + { + # Get the data container + my $rsu_data = shift; + + # Make a variable for the location of the java in path + my $whereisjava; + + # If our os is linux or freebsd + if ($rsu_data->OS =~ /(linux|freebsd)/) + { + # Ask where the java executable is + $whereisjava = `whereis java | sed s/java:\\ // | sed s/\\ .*//`; + } + # Else if we are on solaris + elsif($rsu_data->OS =~ /(solaris)/) + { + # Return the default symlink location (since solaris have the libjli.so linked properly) + return "/usr/bin/java"; + } + + # Make a variable to contain the testing results + my $test_exec; + + # Make a for loop which follows symlinks up to 10 times in order to find the java binary + # (you must be really silly if you have 10 symlinks together to point to it!) + my $counter; + for ($counter = 0; $counter < 10; $counter++) + { + # Check if this is the true binary + $test_exec = `ls -la $whereisjava`; + + # If the result contains "java -> /" then + if ($test_exec =~ /java\ -.\ \//) + { + # Split the result by whitespace + my @newtest = split(/\ /, $test_exec); + + # Replace $whereisjava with the new location to test + $whereisjava = $newtest[-1]; + } + else + { + # Split the result by whitespace + my @truebinary = split(/\ /, $test_exec); + + # Replace $whereisjava with the new location to test + $whereisjava = $truebinary[-1]; + + # Remove the newline from the output + $whereisjava =~ s/\n//; + + # Make sure we end this loop (no point to continue checking) + $counter = 11; + } + } + + # Do a final check to see if the java binary is found... + # If $whereisjava do not end with /bin/java then + if ($whereisjava !~ /\/bin\/java$/) + { + # Run a function which will tell the user what to do in order to fix this issue + $whereisjava = rsu_java::unix_default_java_is_a_script($rsu_data); + } + + # Return the true default java binary + return "$whereisjava"; + } + + # + #---------------------------------------- *** ---------------------------------------- + # + + sub unix_default_java_is_a_script + { + # This function depends on rsu_IO.pm + require rsu_IO; + + # Get the data container + my $rsu_data = shift; + + # Pass the current directory to a variable for use in a message + my $cwd = $rsu_data->cwd; + + # Define any large messages we will need in the script + # Message if java in $PATH is not a binary + my $java_not_bin = << "java_not_binary_message"; +It looks like your default java is not a binary file! +This script requires direct use of the java BINARY file +in order to make sure all the java library files gets loaded properly. +Please edit $cwd/share/settings.conf +and add the path to the java BINARY as the value for preferredjava. + +You can use the command (You can find this text inside /tmp/java_notice.txt): +sudo find / -name "libjli.so" | sed "s/\\/lib\\/\\(i386\\|amd64\\)\\/jli\\/libjli.so/\\/bin\\/java/g" + +In order to get a list of possible paths you can use as the preferredjava value. +Also please look at $cwd/share/settings.conf.example +for examples on the setting values. + +Please press ENTER/RETURN to continue running the script +after you added the path to the binary into the +$cwd/share/settings.conf file. + +java_not_binary_message + + # Make a variable to contain the new java path + my $newjavapath; + + # if we are inside an interactive shell then + if (-t STDOUT) + { + # Write the java notice to a file + rsu_IO::WriteFile($java_not_bin, ">", "/tmp/java_notice.txt"); + + # Display the message + print $java_not_bin; + + # Wait for user to press ENTER/RETURN + my $continue = ; + + # remove the notice + system "rm /tmp/java_notice.txt"; + + # Read the preferred java in the config file, if nothing is found then say JAVA NOT SET + $newjavapath = readconf("preferredjava", "JAVA NOT SET"); + } + else + { + # Write the java notice to a file + WriteFile($java_not_bin, ">", "/tmp/java_notice.txt"); + + # run script in xterm so we can get input from user and with right permissions + system "xterm -e \"cat /tmp/java_notice.txt && read i\""; + + # remove the notice + system "rm /tmp/java_notice.txt"; + + # Read the preferred java in the config file, if nothing is found then say JAVA NOT SET + $newjavapath = readconf("preferredjava", "JAVA NOT SET"); + } + + # If java is still not set + if ($newjavapath =~ /JAVA NOT SET/) + { + # Tell user whats wrong and then exit + print "You did not set the path to java in the preferredjava setting\ninside ".$rsu_data->cwd."/share/settings.conf\nThe client will not work for you without this setting... EXITING!\n"; + exit + } + + # return the new javapath + return "$newjavapath"; + } + + # + #---------------------------------------- *** ---------------------------------------- + # + + sub win32_find_java + { + # Gets passed data from the function call + my ($win32java_setting, $rsu_data) = "@_"; + + # Make an array for the current version + my $currentversion = "6"; + + # If the win32java setting is default-java + if ($win32java_setting =~ /default-java/) + { + # Run a registry query and grep for the current java version (example: 1.6) + $currentversion = `set PATH=%CD%\\win32\\gnu\\;%PATH% && reg query \"hklm\\Software\\JavaSoft\\Java Runtime Environment\" /v CurrentVersion | grep CurrentVersion`; + # Remove all tabs, whitespace and newlines and the 1. and also remove REG_SZ and everything before that from the last array entry + $currentversion =~ s/(.+REG_SZ|\n\r|\r|\n|\s+|\t+|1\.)//g; + } + else + { + # Prepare the win32java setting so that we only get the number we want + $win32java_setting =~ s/(\d{1,1}\.|\.\d{1,2}_\d{1,2})//g; + + # Set the currentversion_array content to be the same as the win32java setting + $currentversion = $win32java_setting; + } + + # Make the string Java#FamilyVersion + my $javafamily = "Java$currentversion"."FamilyVersion"; + + # Use the current version to run a new registry query and grep for Java#FamilyVersion (replace # with number) + my $javafamilyversion = `set PATH=%CD%\\win32\\gnu\\;%PATH% && reg query \"hklm\\Software\\JavaSoft\\Java Runtime Environment\" /v $javafamily | grep $javafamily`; + # Remove all tabs, whitespace and newlines and also remove REG_SZ and everything before that from the last array entry + $javafamilyversion =~ s/(.+REG_SZ|\n\r|\r|\n|\s|\t|\s+)//g; + + # Use the javafamilyversion to run a new registry querty and grep for JavaHome which contains the location of the java installation + my $javahome = `set PATH=%CD%\\win32\\gnu\\;%PATH% && reg query \"hklm\\Software\\JavaSoft\\Java Runtime Environment\\$javafamilyversion\" /v JavaHome | grep JavaHome`; + # Split the result by REG_SZ and add everything to an array + my @javahome_array = split(/REG_SZ/i, $javahome); + # Remove all tabs, whitespace and newlines and also remove REG_SZ and everything before that from the last array entry + $javahome_array[-1] =~ s/(.+REG_SZ|\n\r|\r|\n|\t+|\s{2,10})//g; + + # Put together the path to the java.exe + my $javabin_result = "$javahome_array[-1]\\bin\\java.exe"; + + # Return the result + return $javabin_result; + } + + # + #---------------------------------------- *** ---------------------------------------- + # + +1; diff -Nru runescape-3.9.1/opt/runescape/modules/client_modules/rsu_javalib_opengl.pm runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_javalib_opengl.pm --- runescape-3.9.1/opt/runescape/modules/client_modules/rsu_javalib_opengl.pm 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_javalib_opengl.pm 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,35 @@ +# This module deals with making sure that opengl works with java on linux +# NOTE: no support for nvidia optimus yet! but it is being worked on! +package rsu_javalib; + + sub unix_findlibrarypath + { + # Gets passed data from the function call + my $rsu_data = shift; + + # Pass the binary to a variable so we can use it in commands + my $binary = $rsu_data->javabin; + + # List up the shared library files used by the java binary (not the symlink!) and remove unneeded info + my $lddresult = `ldd $binary | grep libjli.so`; + #my $lddresult = `ldd $binary | grep libjli.so | sed s/libjli.so\\ =\\>// | sed s/\\(.*// | sed s/jli\\\\/libjli.so//`; + + # Finds the library path from the ldd output line, removing whitespaces before + # and after the path. + $lddresult =~ s/\s*libjli\.so\s*=>\s+(.*)jli\/libjli\.so\s+\(\S+\)\s*$/$1/; + + # Remove the TAB and whitespaces before the path + #$lddresult =~ s/^(\t+\s+|\t+|\s+)//g; + + # Remove the newline from the output + #$lddresult =~ s/\n//g; + + # Return the library path for java + return "LD_LIBRARY_PATH=$lddresult"; + } + + # + #---------------------------------------- *** ---------------------------------------- + # + +1; diff -Nru runescape-3.9.1/opt/runescape/modules/client_modules/rsu_language_support.pm runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_language_support.pm --- runescape-3.9.1/opt/runescape/modules/client_modules/rsu_language_support.pm 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_language_support.pm 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,50 @@ +package rsu_lang; + + sub getlanguage + { + # This function depends on functions from rsu_IO.pm + require rsu_IO; + + # Get the data container + my $rsu_data = shift; + + # Print debug info + print "Checking your client language setting(if any)\nTrying to read file\n".$rsu_data->HOME."/jagexappletviewer.preferences\n\n"; + + # Make a variable to contain the contents of $HOME/jagexappletviewer.preferences + my $lang = rsu_IO::ReadFile($rsu_data->HOME."/jagexappletviewer.preferences"); + + # If there is an error with the file + if ($lang =~ /error reading file/) + { + # Print debug info + print "Unable to read jagexappletviewer.preferences file, defaulting to Language=0 (English).\n"; + + # Default to english + $lang = "Language=0"; + } + # Else we will convert the pointer to a string + else + { + # Make the pointer into a string so we can work with it + $lang = "@$lang"; + + # Print debug info + print "File read and this is the content i found!\n######## File Start ########\n\n$lang\n######## File End ########\n\n"; + } + + # Print debug info + print "I will now parse the contents from the\njagexappletviewer.preferences file so it can be used.\n"; + + # Replace newlines and get only the Language number out of the string + $lang =~ s/(Language\=|\n|\r|\r\n|Member\=|yes|no|\s+)//g; + + # Return the prefered language + return $lang; + } + + # + #---------------------------------------- *** ---------------------------------------- + # + +1; diff -Nru runescape-3.9.1/opt/runescape/modules/client_modules/rsu_mains.pm runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_mains.pm --- runescape-3.9.1/opt/runescape/modules/client_modules/rsu_mains.pm 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_mains.pm 2012-11-10 13:42:28.000000000 +0000 @@ -0,0 +1,249 @@ +package rsu_mains; + +# All functions in this module requires these modules +require rsu_java; +require rsu_prm_filehandler; + +sub unix_main +{ + # Get the data container + my $rsu_data = shift; + + # Check if user have a preferred java on unix + # If user want to use default-java then + if (($rsu_data->preferredjava =~ /default-java/)) + { + # Use default java + $rsu_data->javabin = "java"; + + # If we are not on mac (mac does not have opengl issues with java7) + if ($rsu_data->OS !~ /darwin/) + { + # Search for the location of the true default java binary (not the symlink) + $rsu_data->javabin = rsu_java::unix_find_default_java_binary($rsu_data); + } + # Else we are on mac + else + { + # Probe for Java6 and use that instead of Java7 (if Java6 exists) + $rsu_data->javabin = rsu_java::findjavabin($rsu_data); + } + } + # Else if user have set a custom path to a java binary (most likely sun/oracle java) + elsif (($rsu_data->preferredjava =~ /^\//)) + { + # Use the user set java binary + $rsu_data->javabin = $rsu_data->preferredjava; + } + + # Else just check what java to use + else + { + # Find the java executable + $rsu_data->javabin = rsu_java::findjavabin($rsu_data); + } + + + # Get the language setting + my $params = rsu_prm::parseprmfile($rsu_data); + + # Make a variable to contain the java library path + my $javalibpath; + + # If we are not on MacOSX + if ($rsu_data->OS !~ /darwin/) + { + # Locate the java JRE lib folder so we can add it to the library PATH + $javalibpath = rsu_javalib::unix_findlibrarypath($rsu_data); + } + + # Check if java can be run in client mode and make sure we use the client mode if available + # as the client mode gives a HUGE boost in performance compared to the default server mode. + $rsu_data->javabin = rsu_java::check_for_java_client_mode($rsu_data); + + # Pass the java binary to a variable so we can use it in commands + my $javabin = $rsu_data->javabin; + + # If user enabled alsa sounds and OS is linux + if ($rsu_data->forcealsa =~ /(1|true)/i && $rsu_data->OS =~ /linux/) + { + # Run the java -version command and check if it is openjdk or java (both uses different alsa fixes) + $rsu_data->javaversion = `$javabin -version 2>&1`; + + # Pass the result to a new variable + my $javaused_result = $rsu_data->javaversion; + + # If java used is sun/oracle java + if ($javaused_result =~ /Java\(TM\) SE/i) + { + # Make a variable for aoss + my $aoss = "aoss"; + + # Check /usr/bin for aoss32 + my $aosstest = `ls /usr/bin | grep aoss32`; + + # Check if $javabin contains the -client parameter and aoss32 was found + if($rsu_data->javabin =~ /-client/ && $aosstest =~ /aoss32/) + { + # Use aoss32 instead of aoss + $aoss = "aoss32"; + } + + # Wrap java inside aoss (alsa wrapper) + $rsu_data->javabin = "$aoss ".$rsu_data->javabin; + } + # Else we are using openjdk + else + { + # Tell OpenJDK to use alsa (aoss does not work as OpenJDK is usually set to use pulseaudio over alsa) + $rsu_data->javabin = $rsu_data->javabin." -Djavax.sound.sampled.Clip=com.sun.media.sound.DirectAudioDeviceProvider -Djavax.sound.sampled.Port=com.sun.media.sound.PortMixerProvider -Djavax.sound.sampled.SourceDataLine=com.sun.media.sound.DirectAudioDeviceProvider -Djavax.sound.sampled.TargetDataLine=com.sun.media.sound.DirectAudioDeviceProvider"; + } + # Set forcepulseaudio to false so that java dont get wrapped in pulse and alsa (chaotic results) + $rsu_data->forcepulseaudio = 0; + } + # Else if user requested to force use pulseaudio + elsif ($rsu_data->forcepulseaudio =~ /(1|true)/i && $rsu_data->OS !~ /darwin/) + { + # Print debug info + print "Forcing java to use pulseaudio by wrapping it inside \"padsp\"!\n"; + + # Then edit $javabin into "padsp $javabin" + $rsu_data->javabin = "padsp ".$rsu_data->javabin; + } + + # Display java version we are using + print "Launching client using this java version: \n"; + + # Display the java version + system $rsu_data->javabin." -version 2>&1 && echo"; + + # Make a variable to contain the MacOSX integration (app icon and name) + my $osxprms = ""; + + # If we are on macosx/darwin then + if ($rsu_data->OS =~ /darwin/) + { + # Print debug info + print "Adding application name and icon to the dock.\n"; + + # Add the dock icon and dock name to the variable, so that it will be used in the java execution + $osxprms = "-Xdock:name=\"RuneScape Unix Client\" -Xdock:icon=\"".$rsu_data->cwd."/share/runescape.icns\""; + } + else + { + # Tell user what we are doing + print "Fixing possible OpenGL issues by adding the environment variable\n$javalibpath\n"; + + # Add the library path to the java binary command + $rsu_data->javabin = "$javalibpath ".$rsu_data->javabin; + } + + + # Print debug info + print "\nLaunching the RuneScape Client using this command:\ncd ".$rsu_data->clientdir."/bin && ".$rsu_data->javabin." $osxprms ".$rsu_data->verboseprms." -cp $params /share\n\nExecuting the RuneScape Client!\nYou are now in the hands of Jagex.\n\n######## End Of Script ########\n######## Jagex client output will appear below here ########\n\n"; + + # Execute the runescape client(hopefully) + system "cd ".$rsu_data->clientdir."/bin && ".$rsu_data->javabin." $osxprms ".$rsu_data->verboseprms." -cp $params /share 2>&1"; +} + +# +#---------------------------------------- *** ---------------------------------------- +# + +sub windows_main +{ + # This function depends on rsu_IO.pm + require rsu_IO; + + # Get the data container + my $rsu_data = shift; + + # Get the win32javabin setting which will be used as a searchpath to find jawt.dll and java.exe + my $win32javabin = rsu_IO::readconf("win32java.exe", "default-java", $rsu_data); + + # Make a variable containing the default path containing jawt.dll + my $javalibspath = "%CD%\\win32\\jawt"; + + # If the win32javabin setting is default-java, 6, 7, 1.6 or 1.7 + if ($win32javabin =~ /^(default-java|6|7|1\.6|1\.7)/) + { + # Probe for the default java used on the system + $win32javabin = rsu_java::win32_find_java($win32javabin, $rsu_data); + + # Prepare the new native javalibs path + $javalibspath = $win32javabin; + + # Remove \\java.exe from the string + $javalibspath =~ s/\\java.exe//ig; + } + + # Get the language setting + my $params = rsu_prm::parseprmfile($rsu_data); + + # Display java version we are using + print "Launching client using this java version: \n"; + + # Display the java version + system "\"$win32javabin\" -version 2>&1"; + + # Adjust the parameters abit + $params =~ s/jagexappletviewer\.jar/bin\/jagexappletviewer\.jar/; + + # Print debug info + print "\nLaunching the RuneScape Client using this command:\nset PATH=$javalibspath;%CD%\\win32\\gnu\\;%PATH% && $win32javabin ".$rsu_data->verboseprms." -cp $params /share\n\nExecuting the RuneScape Client!\nYou are now in the hands of Jagex.\n\n######## End Of Script ########\n######## Jagex client output will appear below here ########\n\n"; + + # Execute the runescape client(hopefully) and then pipe the output to grep to remove the lines saying "Recieved command: _11" which i dont know why appears + system "set PATH=$javalibspath;%CD%\\win32\\gnu\\;%PATH% && \"$win32javabin\" ".$rsu_data->verboseprms." -cp $params /share 2>&1 | grep -v \"Received command\""; +} + +# +#---------------------------------------- *** ---------------------------------------- +# + +sub checkcompabilitymode +{ + # Get the data container + my $rsu_data = shift; + + # If compabilitymode is activated (either with $rsu_data->compabilitymode = 1 or with the --compabilitymode parameter) + if (($rsu_data->args =~ /--compabilitymode/ && $rsu_data->OS !~ /MSWin32/) || ($rsu_data->compabilitymode =~ /(1|true)/i && $rsu_data->OS !~ /MSWin32/)) + { + # Tell user we are executing the client in compabilitymode + print "Compabilitymode requested, starting client through wine!\nThe client will use the java that is installed inside wine\n\n"; + + # Parse the prm file + my $params = rsu_prm::parseprmfile($rsu_data); + + # Launch client through wine + system "cd \"".$rsu_data->cwd."/\" && wine cmd /c \"set PATH=%CD%\\\\win32\\\\jawt;%PATH% && cd Z:".$rsu_data->clientdir."/bin && java -cp $params /share && exit\""; + + # Once the client is closed we need to do some cleanup (bug when running commands through shell to wine cmd + # Make a variable to contain the pids of cmd (from wine) + my $zombies = `pidof cmd`; + + # Split up the list of pids + my @zombie = split /\s/, $zombies; + + # Make a counter + my $zombiecounter = 0; + + # For each pid in the array + foreach(@zombie) + { + # kill the zombie process + system "kill -9 $zombie[$zombiecounter]"; + + # Increase counter by 1 + $zombiecounter += 1; + } + + # Exit this script so we dont cause trouble + exit + } +} + +# +#---------------------------------------- *** ---------------------------------------- +# + +1; diff -Nru runescape-3.9.1/opt/runescape/modules/client_modules/rsu_modules.pm runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_modules.pm --- runescape-3.9.1/opt/runescape/modules/client_modules/rsu_modules.pm 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_modules.pm 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,39 @@ +# This is the modules loader, include load lines in this file +# The modules can be ordered in any order even if they depend +# on a module which have not been loaded yet +package modules; + # Include(if not already included) the core modules for the RSU client + require rsu_check_for_jagexappletviewer; + require rsu_IO; + require rsu_language_support; + require rsu_prm_filehandler; + require rsu_verbose; + require rsu_java; + require rsu_javalib_opengl; + require rsu_mains; + + # End of core modules, add custom modules below this line + + + # End of custom modules # +1; + + +# List of data that you get access to if you pass the variable $rsu_data +# to your functions (need to be passed to your function from the runescape script first) +# +# $rsu_data = data container +# $rsu_data->version = scriptversion +# $rsu_data->cwd = current directory +# $rsu_data->clientdir = client directory +# $rsu_data->OS = Operating System +# $rsu_data->args = arguments passed to the runescape script +# $rsu_data->verboseprms = verbose arguments passed to the runescape script (otherwise empty) + +## Settings stored in the $rsu_data mutator +# $rsu_data->compabilitymode = returns 1 or true if enabled (otherwise returns 0 or false) +# $rsu_data->forcepulseaudio = returns 1 or true if enabled (otherwise returns 0 or false) +# $rsu_data->forcealsa = returns 1 or true if enabled (otherwise returns 0 or false) +# $rsu_data->preferredjava = returns the users java setting for the client (linux, mac and other unixes only) +# $rsu_data->prmfile = name of the currently used prmfile +# $rsu_data->fallbackprms = the fallback parameters used if the prmfile is not found diff -Nru runescape-3.9.1/opt/runescape/modules/client_modules/rsu_prm_filehandler.pm runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_prm_filehandler.pm --- runescape-3.9.1/opt/runescape/modules/client_modules/rsu_prm_filehandler.pm 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_prm_filehandler.pm 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,62 @@ +package rsu_prm; + + sub parseprmfile + { + # This module depends on rsu_IO.pm + require rsu_IO; + + # Get the data container + my $rsu_data = shift; + + # Print debug info + print "Reading .prm file ".$rsu_data->clientdir."/share/".$rsu_data->prmfile."\n"; + + # Read the runescape parameters file and send pointer to $prms + my $prms = rsu_IO::ReadFile($rsu_data->clientdir."/share/".$rsu_data->prmfile.""); + + # If there is an error reading the file + if ($prms =~ /error reading file/) + { + # Print debug info + print "Error opening ".$rsu_data->clientdir."/share/".$rsu_data->prmfile."\nI will instead use these fallback parameters:\n".$rsu_data->fallbackprms."\n"; + + # Use the fallback prms defined at the top of the script + $prms = $rsu_data->fallbackprms; + } + # Else we will convert the pointer to a string + else + { + # Make the pointer into a string we can work with + $prms = "@$prms"; + + # Print debug info + print "This is the info i gathered from the ".$rsu_data->prmfile." file\n######## File Start ########\n$prms\n######## File End ########\n\n"; + } + + # Print debug info + print "I will now parse the parameters!\n"; + + # Make the string into 1 line + $prms =~ s/(-Djava.class.path=|\n|\r|\r\n)//g; + + # Get the client language settings + my $lang = rsu_lang::getlanguage($rsu_data); + + # Print debug info + print "Stitching the language setting to the final parameters.\n\n"; + + # Apply the language setting to the prms + $prms =~ s/\$\(Language:0\)/$lang/g; + + # Print debug info + print "Final parameter string is:\n$prms\n\n"; + + # Return to call with the whole prm string + return $prms; + } + + # + #---------------------------------------- *** ---------------------------------------- + # + +1; diff -Nru runescape-3.9.1/opt/runescape/modules/client_modules/rsu_verbose.pm runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_verbose.pm --- runescape-3.9.1/opt/runescape/modules/client_modules/rsu_verbose.pm 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/modules/client_modules/rsu_verbose.pm 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,70 @@ +# This module provides the verbose functionality in the rsu client +package rsu_verbose; + + sub verbosecheck + { + # Get the data container + my $rsu_data = shift; + + # Tell user what we are going to do + print "Checking if any --verbose parameters were passed to the script\n"; + + # If --verbose was passed to the script + if ($rsu_data->args =~ /--verbose($|\ )/g) + { + # Tell user the result of the check + print "--verbose was passed to the script, java will run in verbose mode when executed!\n"; + + # Return the verbose parameters for java (no need to check anymore since this contains all the verbose modes) + return "-verbose:class -verbose:jni -verbose:gc"; + } + # Else if no --verbose parameters are passed + elsif ($rsu_data->args !~ /--verbose(|:jni|:class|:gc)($|\ )/g) + { + # Tell user the result of the check + print "The --verbose parameter was not passed to the script.\nJava will be executed without extra output.\n"; + + # Return empty string since no verbose mode was specified + return ""; + } + + # Make an array to hold the specific parameters if they are passed + my @verboseprms; + + # If --verbose:jni was passed + if($rsu_data->args =~ /--verbose:jni($|\ )/g) + { + # Tell user the result of the check + print "--verbose:jni was passed to the script, java will run in verbose:jni mode when executed!\n"; + + # Add the verbose parameters for java to the array + push(@verboseprms, "-verbose:jni"); + } + # If --verbose:class + if($rsu_data->args =~ /--verbose:class($|\ )/g) + { + # Tell user the result of the check + print "--verbose:class was passed to the script, java will run in verbose:class mode when executed!\n"; + + # Add the verbose parameters for java to the array + push(@verboseprms, "-verbose:class"); + } + # If --verbose:gc + if($rsu_data->args =~ /--verbose:gc($|\ )/g) + { + # Tell user the result of the check + print "--verbose:gc was passed to the script, java will run in verbose:gc mode when executed!\n"; + + # Add the verbose parameters for java to the array + push(@verboseprms, "-verbose:gc"); + } + + # Return the parameters + return "@verboseprms"; + } + + # + #---------------------------------------- *** ---------------------------------------- + # + +1; diff -Nru runescape-3.9.1/opt/runescape/modules/rsu-settings_gui.fbp runescape-3.9.4~PPA1/opt/runescape/modules/rsu-settings_gui.fbp --- runescape-3.9.1/opt/runescape/modules/rsu-settings_gui.fbp 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/modules/rsu-settings_gui.fbp 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,2382 @@ + + + + + + XRC + 1 + UTF-8 + connect + impl_virtual + rsu-settings_gui + 1000 + none + 0 + rsu-settings + + . + + 1 + 0 + 0 + + + + + 1 + + + + + wxID_ANY + + + mainwindow + + 468,525 + wxDEFAULT_FRAME_STYLE + + RuneScape Config Editor + + + wxFILTER_NONE + wxDefaultValidator + + + + wxTAB_TRAVERSAL + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 0 + wxEXPAND | wxALL + 1 + + + + 1 + + + 0 + wxID_ANY + + + scrolledWindow + protected + + 5 + 5 + + + + + wxFILTER_NONE + wxDefaultValidator + + + + wxHSCROLL|wxVSCROLL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer7 + wxVERTICAL + none + + 0 + wxEXPAND | wxALL + 1 + + + + + 1 + + + + wxID_ANY + + + tab_box1 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Script Settings + 1 + + + + 1 + + + + wxID_ANY + + + scriptwindow + protected + + 5 + 5 + + + + + wxFILTER_NONE + wxDefaultValidator + + + + wxHSCROLL|wxVSCROLL + + + + + + + + + + + + + + + + + + + + + + + + + 1 + wxBOTH + 0 + 3 + 0 + + fgSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 5 + 0 + + 5 + wxALL|wxEXPAND + 1 + + wxID_ANY + Java (All platforms) + + sbSizer1 + wxVERTICAL + none + + + 5 + wxEXPAND + 1 + + 2 + wxBOTH + 0 + + 0 + + fgSizer2 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALL + 0 + + + + 1 + + + + wxID_ANY + Parameter File: + + + m_staticText91 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + + wxID_ANY + + 0 + + prmFile + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + + wxID_ANY + Preferred Java to use: + + + m_staticText11 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + "default-java" "7-openjdk (/usr/lib/jvm)" "6-openjdk (/usr/lib/jvm)" "custom-java" + + 1 + + + + wxID_ANY + + + preferredjava + protected + + 0 + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 0 + + + + wxID_ANY + + Select a file + + customjava + protected + + + wxFLP_DEFAULT_STYLE|wxFLP_USE_TEXTCTRL + + + + wxFILTER_NONE + wxDefaultValidator + + + Java binary (java,java-bin,java.exe)|java;java-bin;java.exe + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "Let Java decide by itself" "PulseAudio (All Unixes)" "ALSA (Linux Only)" "ALSA(Linux)+Pulse(Other)" + + 1 + + + + wxID_ANY + Tell Java which sound system to use + 2 + + + soundsystem + protected + + 0 + + wxRA_SPECIFY_COLS + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + wxID_ANY + Compability + + sbSizer2 + wxVERTICAL + none + + + 5 + wxALL + 0 + + + 0 + + 1 + + + + wxID_ANY + Tell the script to launch the client through WINE. + + + winemode + protected + + + wxALIGN_RIGHT + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + + wxID_ANY + Running the game through wine will let you play RuneScape on some Unix platforms that are not supported natively by this script or on platforms that Java no longer supports. REQUIRES THAT WINE IS COMPILED WITH OPENGL SUPPORT! + + + m_staticText111 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxEXPAND + 1 + + 3 + wxBOTH + 0 + + 0 + + fgSizer3 + wxFLEX_GROWMODE_SPECIFIED + none + 1 + 0 + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + + wxID_ANY + Save Script Settings + + + saveconf + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + + wxID_ANY + Close + + + close2 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Client Settings + 0 + + + + 1 + + + + wxID_ANY + + + rswindow + protected + + 5 + 5 + + + + + wxFILTER_NONE + wxDefaultValidator + + + + wxHSCROLL|wxVSCROLL + + + + + + + + + + + + + + + + + + + + + + + + + 1 + wxBOTH + 0 + 3 + 0 + + fgSizer4 + wxFLEX_GROWMODE_SPECIFIED + none + 5 + 0 + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + + wxID_ANY + + 0 + + configfilepath + protected + + + wxTE_DONTWRAP + + + + wxFILTER_NONE + wxDefaultValidator + + ~/.config/runescape/share/runescape.prm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + wxID_ANY + Java Settings + + sbSizer3 + wxVERTICAL + none + + + 5 + wxEXPAND + 1 + + 3 + wxBOTH + 1,0 + 1,0 + 0 + + fgSizer5 + wxFLEX_GROWMODE_SPECIFIED + none + 3 + 0 + + 5 + wxALL + 0 + + + + 1 + + + + wxID_ANY + Minimum Java Heap Allocation(MB): + + + m_staticText3 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 5 + + 0 + protected + 50 + + + + 5 + wxALL + 0 + + + + 1 + + + + wxID_ANY + 0 + 4096 + + 0 + + Xms + protected + + + wxSP_ARROW_KEYS + + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + + wxID_ANY + Maximum Java Heap Allocation(MB): + + + m_staticText6 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 5 + + 0 + protected + 50 + + + + 5 + wxALL + 0 + + + + 1 + + + + wxID_ANY + 512 + 4096 + + 256 + + Xmx + protected + + + wxSP_ARROW_KEYS + + + + wxFILTER_NONE + wxDefaultValidator + + 512 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + + wxID_ANY + Java Stack Size(MB): + + + m_staticText71 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALL + 0 + + + + 1 + + + + wxID_ANY + 1 + 5 + + 1 + + Xss + protected + + + wxSP_ARROW_KEYS + + + + wxFILTER_NONE + wxDefaultValidator + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + wxID_ANY + RuneScape Settings + + sbSizer4 + wxVERTICAL + none + + + 5 + wxEXPAND + 1 + + 2 + wxBOTH + 1 + + 0 + + fgSizer6 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 0 + + 5 + wxALL + 0 + + + + 1 + + + + wxID_ANY + ClassPath: + + + m_staticText7 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 0 + + + + wxID_ANY + + 0 + + classpath + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + jagexappletviewer.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + + + + wxID_ANY + Config URL: + + + m_staticText10 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + + wxID_ANY + + 0 + + configurl + protected + + + + + it works + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + wxID_ANY + Misc Settings (1 line per setting) + + sbSizer5 + wxVERTICAL + none + + + 5 + wxEXPAND + 1 + + 1 + wxBOTH + 0 + 0 + 0 + + fgSizer7 + wxFLEX_GROWMODE_SPECIFIED + none + 1 + 0 + + 5 + wxALIGN_BOTTOM|wxALL|wxEXPAND + 0 + + + + 1 + + + + wxID_ANY + + 0 + + prms + protected + + + wxTE_MULTILINE + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer2 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + + wxID_ANY + Save + + + save + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + + wxID_ANY + Close + + + close + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JagexCache + 0 + + + + 1 + + + + wxID_ANY + + + cachewindow + protected + + 5 + 5 + + + + + wxFILTER_NONE + wxDefaultValidator + + + + wxHSCROLL|wxVSCROLL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer3 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + Main Cache + + sbSizer6 + wxVERTICAL + none + + + 5 + wxEXPAND + 1 + + 3 + wxBOTH + 1 + + 0 + + fgSizer8 + wxFLEX_GROWMODE_SPECIFIED + none + 1 + 0 + + 5 + wxALL + 0 + + + + 1 + + + + wxID_ANY + Clear the cache and turn RuneScape's settings back to default: + + + m_staticText9 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 20 + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + + 0 + 1 + + + + wxID_ANY + Clear Main Cache + + + clear_main + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + BETA Cache + + sbSizer7 + wxVERTICAL + none + + + 5 + wxEXPAND + 1 + + 3 + wxBOTH + 1 + + 0 + + fgSizer9 + wxFLEX_GROWMODE_SPECIFIED + none + 1 + 0 + + 5 + wxALL + 0 + + + + 1 + + + + wxID_ANY + Clear the BETA cache and turn RuneScape's settings back to default: + + + m_staticText101 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 13 + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + + wxID_ANY + Clear BETA Cache + + + clear_beta + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 3 + + wxID_ANY + Console Output + + sbSizer8 + wxVERTICAL + none + + + 5 + wxEXPAND + 1 + + 1 + 0 + + gSizer1 + none + 1 + 0 + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + + wxID_ANY + + 0 + + terminal_output + protected + + + wxTE_MULTILINE + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru runescape-3.9.1/opt/runescape/modules/rsu-settings_gui.xrc runescape-3.9.4~PPA1/opt/runescape/modules/rsu-settings_gui.xrc --- runescape-3.9.1/opt/runescape/modules/rsu-settings_gui.xrc 2012-07-09 16:37:23.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/modules/rsu-settings_gui.xrc 2012-10-15 09:36:56.000000000 +0000 @@ -4,547 +4,558 @@ 468,525 RuneScape Config Editor - - - - 1 - - - - 5 - 1 - 0 - 0 - 0 - 3 - - - wxALL|wxEXPAND - 5 - - wxVERTICAL - - - - wxEXPAND - 5 - - 2 - 2 - 0 - 0 - 0 - - - - wxALL - 5 - - - - - - - wxALL|wxEXPAND - 5 - - - 0 - - - - - wxALL - 5 - - - - - - - wxALL - 5 - - 0 - - default-java - 7-openjdk (/usr/lib/jvm) - 6-openjdk (/usr/lib/jvm) - custom-java - - - - - - - - wxALL|wxEXPAND - 5 - - - Select a file - Java binary (java,java-bin,java.exe)|java;java-bin;java.exe - - 0 - - - - - - - wxALL|wxEXPAND - 5 - - - - 0 - - Let Java decide by itself - PulseAudio (All Unixes) - ALSA (Linux Only) - ALSA(Linux)+Pulse(Other) - - 2 - - - - - wxALL|wxEXPAND - 5 - - wxVERTICAL - - - - wxALL - 5 - - - - 0 - - - - - wxALL - 5 - - - - - - - - - wxEXPAND - 5 - 0,0 - - - - wxEXPAND - 5 - - 1 - 3 - 0 - 0 - 0 - - - - wxEXPAND - 5 - 0,0 - - - - wxALL - 5 - - - 0 - - - - - wxALL - 5 - - - 0 - - - - - - - - - - 0 - - - - 5 - 1 - 0 - 0 - 0 - 3 - - - wxALL|wxEXPAND - 5 - - - ~/.config/runescape/share/runescape.prm - 0 - - - - - wxALL|wxEXPAND - 5 - - wxVERTICAL - - - - wxEXPAND - 5 - - 3 - 3 - 0 - 0 - 1,0 - 1,0 - - - wxALL - 5 - - - - - - - wxEXPAND - 5 - 50,0 - - - - wxALL - 5 - - - 0 - 0 - 4096 - - - - - wxALL - 5 - - - - - - - wxEXPAND - 5 - 50,0 - - - - wxALL - 5 - - - 512 - 256 - 4096 - - - - - wxALL - 5 - - - - - - - wxEXPAND - 5 - 0,0 - - - - wxALL - 5 - - - 1 - 1 - 5 - - - - - - - - - wxALL|wxEXPAND - 5 - - wxVERTICAL - - - - wxEXPAND - 5 - - 2 - 2 - 0 - 0 - 1 - - - - wxALL - 5 - - - - - - - wxALL|wxEXPAND - 5 - - 0 - jagexappletviewer.jar - 0 - - - - - wxALL - 5 - - - - - - - wxALL|wxEXPAND - 5 - - it works - - 0 - - - - - - - - - wxALL|wxEXPAND - 5 - - wxVERTICAL - - - - wxEXPAND - 5 - - 1 - 1 - 0 - 0 - 0 - 0 - - - wxALIGN_BOTTOM|wxALL|wxEXPAND - 5 - - - - 0 - - - - - - - - - wxEXPAND - 5 - - wxHORIZONTAL - - - wxEXPAND - 5 - 0,0 - - - - wxALL - 5 - - - 0 - - - - - wxALL - 5 - - - 0 - - - - - - - - - - 0 - - - - wxVERTICAL - - - wxALL|wxEXPAND - 5 - - wxVERTICAL - - - - wxEXPAND - 5 - - 1 - 3 - 0 - 0 - 1 - - - - wxALL - 5 - - - - - - - wxEXPAND - 5 - 20,0 - - - - wxALIGN_RIGHT|wxALL - 5 - - - 0 - - - - - - - - - wxALL|wxEXPAND - 5 - - wxVERTICAL - - - - wxEXPAND - 5 - - 1 - 3 - 0 - 0 - 1 - - - - wxALL - 5 - - - - - - - wxEXPAND - 5 - 13,0 - - - - wxALL - 5 - - - 0 - - - - - - - - - wxALL|wxEXPAND - 5 - - wxVERTICAL - - - - wxEXPAND - 5 - - 1 - 1 - 0 - 0 - - - wxALL|wxEXPAND - 5 - - - - 0 + + + + wxVERTICAL + + + wxEXPAND | wxALL + 0 + + + + 1 + + + + 5 + 1 + 0 + 0 + 0 + 3 + + + wxALL|wxEXPAND + 5 + + wxVERTICAL + + + + wxEXPAND + 5 + + 2 + 2 + 0 + 0 + 0 + + + + wxALL + 5 + + + + + + + wxALL|wxEXPAND + 5 + + + 0 + + + + + wxALL + 5 + + + + + + + wxALL + 5 + + 0 + + default-java + 7-openjdk (/usr/lib/jvm) + 6-openjdk (/usr/lib/jvm) + custom-java + + + + + + + + wxALL|wxEXPAND + 5 + + + Select a file + Java binary (java,java-bin,java.exe)|java;java-bin;java.exe + + 0 + + + + + + + wxALL|wxEXPAND + 5 + + + + 0 + + Let Java decide by itself + PulseAudio (All Unixes) + ALSA (Linux Only) + ALSA(Linux)+Pulse(Other) + + 2 + + + + + wxALL|wxEXPAND + 5 + + wxVERTICAL + + + + wxALL + 5 + + + + 0 + + + + + wxALL + 5 + + + + + + + + + wxEXPAND + 5 + 0,0 + + + + wxEXPAND + 5 + + 1 + 3 + 0 + 0 + 0 + + + + wxEXPAND + 5 + 0,0 + + + + wxALL + 5 + + + 0 + + + + + wxALL + 5 + + + 0 + + + + + + + + + + 0 + + + + 5 + 1 + 0 + 0 + 0 + 3 + + + wxALL|wxEXPAND + 5 + + + ~/.config/runescape/share/runescape.prm + 0 + + + + + wxALL|wxEXPAND + 5 + + wxVERTICAL + + + + wxEXPAND + 5 + + 3 + 3 + 0 + 0 + 1,0 + 1,0 + + + wxALL + 5 + + + + + + + wxEXPAND + 5 + 50,0 + + + + wxALL + 5 + + + 0 + 0 + 4096 + + + + + wxALL + 5 + + + + + + + wxEXPAND + 5 + 50,0 + + + + wxALL + 5 + + + 512 + 256 + 4096 + + + + + wxALL + 5 + + + + + + + wxEXPAND + 5 + 0,0 + + + + wxALL + 5 + + + 1 + 1 + 5 + + + + + + + + + wxALL|wxEXPAND + 5 + + wxVERTICAL + + + + wxEXPAND + 5 + + 2 + 2 + 0 + 0 + 1 + + + + wxALL + 5 + + + + + + + wxALL|wxEXPAND + 5 + + 0 + jagexappletviewer.jar + 0 + + + + + wxALL + 5 + + + + + + + wxALL|wxEXPAND + 5 + + it works + + 0 + + + + + + + + + wxALL|wxEXPAND + 5 + + wxVERTICAL + + + + wxEXPAND + 5 + + 1 + 1 + 0 + 0 + 0 + 0 + + + wxALIGN_BOTTOM|wxALL|wxEXPAND + 5 + + + + 0 + + + + + + + + + wxEXPAND + 5 + + wxHORIZONTAL + + + wxEXPAND + 5 + 0,0 + + + + wxALL + 5 + + + 0 + + + + + wxALL + 5 + + + 0 + + + + + + + + + + 0 + + + + wxVERTICAL + + + wxALL|wxEXPAND + 5 + + wxVERTICAL + + + + wxEXPAND + 5 + + 1 + 3 + 0 + 0 + 1 + + + + wxALL + 5 + + + + + + + wxEXPAND + 5 + 20,0 + + + + wxALIGN_RIGHT|wxALL + 5 + + + 0 + + + + + + + + + wxALL|wxEXPAND + 5 + + wxVERTICAL + + + + wxEXPAND + 5 + + 1 + 3 + 0 + 0 + 1 + + + + wxALL + 5 + + + + + + + wxEXPAND + 5 + 13,0 + + + + wxALL + 5 + + + 0 + + + + + + + + + wxALL|wxEXPAND + 5 + + wxVERTICAL + + + + wxEXPAND + 5 + + 1 + 1 + 0 + 0 + + + wxALL|wxEXPAND + 5 + + + + 0 + + + diff -Nru runescape-3.9.1/opt/runescape/modules/settings runescape-3.9.4~PPA1/opt/runescape/modules/settings --- runescape-3.9.1/opt/runescape/modules/settings 2012-07-09 16:47:24.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/modules/settings 2012-10-15 09:36:56.000000000 +0000 @@ -188,6 +188,7 @@ saveconf close2 tab_box1 + scrolledWindow ) ); @@ -265,9 +266,35 @@ $self->winemode = $self->FindWindow('winemode'); $self->tab_box1 = $self->FindWindow('tab_box1'); + # Set default size + $self->SetSize(470,500); + $self->SetMinSize($self->GetSize); + $self->SetMaxSize($self->GetSize); + + # If we are on windows + if ($OS =~ /MSWin32/) + { + # Set scrollbar properties on these widgets + setScrollBars( + $self->FindWindow('scrolledWindow') + ); + } + # Else + else + { + # Set scrollbar properties on these widgets + setScrollBars( + $self->FindWindow('scriptwindow'), + $self->FindWindow('rswindow'), + $self->FindWindow('cachewindow') + ); + } + # If RSU mode is disabled if ($RSU =~ /0/) { + # Change to the RS Settings page + $self->tab_box1->ChangeSelection(1); # Remove the script settings page $self->tab_box1->RemovePage(0); # The $prmfile is always runescape.prm @@ -282,7 +309,28 @@ #---------------------------------------- *** ---------------------------------------- # +sub setScrollBars +{ + # Get the widgets to make scrollable + my @scrolledWindows = @_; + + # Set scroll properties + my $pixelsPerUnitX = 5; + my $pixelsPerUnitY = 5; + my $noUnitsX = 100; + my $noUnitsY = 100; + + # For each widget to make scrollable + foreach my $window (@scrolledWindows) + { + # Enable scrolling + $window->SetScrollbars($pixelsPerUnitX, $pixelsPerUnitY, $noUnitsX, $noUnitsY); + } +} +# +#---------------------------------------- *** ---------------------------------------- +# # Create mutator function from "Programming Perl" sub create_mutator @@ -904,9 +952,9 @@ $self->classpath->SetToolTip("The classpath is the name and location of the .jar file\nwhich is the actual client, the classpath is ALWAYS jagexappletviewer.jar"); $self->configurl->SetToolTip("The config url is where the client loads it's external settings,\nit's also the config url that decides which world you will\nbe logged into when you first login to the game.\nBy default this is the world closest to your location, however if you replace \"www\" with world7\nit would make you always use world7 as your default world."); $self->prms->SetToolTip("The Misc Settings is a special field where you can enter advanced\njava parameters, it is mostly used to fix new issues or add non standard client settings.\nIn short you can alter the java execution here and tweak\nthe client to work best on your computer.\n\nFor a full list of settings you can add here just google for \"Java HotSpot VM Options\""); - $self->soundsystem->SetToolTip("In some cases Java will be unable to play sounds properly on unix(randomly disappearing sound effects), forcing java to play sounds through alsa(recommended for linux) or pulseaudio(recommended for other unixes) will fix these sound issues."); - $self->prmFile->SetToolTip("Here you can assign a custom parameter file to the script, this is nice to do if you do not want to change or mess up your default parameter file, or you want to create a custom one for a certain situation.\nNOTE: If the new file do not exist, it will use the previous file as a template!"); - $self->customjava->SetToolTip("If you set preferred java to custom-java, you will be able to use this to tell the script to use a custom java binary/executable. This will let you run the game through oracle java or openjdk at will or let you run the game through 32bit java on 64bit platforms"); + $self->soundsystem->SetToolTip("In some cases Java will be unable to play sounds properly on\nunix(randomly disappearing sound effects), forcing java to\nplay sounds through alsa(recommended for linux) or\npulseaudio(recommended for other unixes) will fix these\nsound issues."); + $self->prmFile->SetToolTip("Here you can assign a custom parameter file to the script, this\nis nice to do if you do not want to change or mess up your\ndefault parameter file, or you want to create a custom one for\na certain situation.\nNOTE: If the new file do not exist, it will use the previous file as a template!"); + $self->customjava->SetToolTip("If you set preferred java to custom-java, you will be\nable to use this to tell the script to use a custom java\nbinary/executable. This will let you run the game\nthrough oracle java or openjdk at will or let you run the game\nthrough 32bit java on 64bit platforms"); $self->configfilepath->SetToolTip("A copy/paste-able location of the currently used parameter file.\nThis is provided incase you need it for something."); } diff -Nru runescape-3.9.1/opt/runescape/runescape runescape-3.9.4~PPA1/opt/runescape/runescape --- runescape-3.9.1/opt/runescape/runescape 2012-08-25 18:39:28.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/runescape 2012-11-10 13:42:28.000000000 +0000 @@ -14,7 +14,7 @@ # If you like this script you may want to check out my other projects at # http://hkprojects.weebly.com -my $scriptversion = "3.9.1"; +my $scriptversion = "3.9.3"; # Before starting show runescape script version print "RuneScape Unix Client script version $scriptversion\n\n"; @@ -24,38 +24,57 @@ # Get script directory my $cwd = $FindBin::RealBin; -# Make a variable to contain the client directory -my $clientdir = $cwd; +# Include perl modules in ./modules/client_modules +use lib $FindBin::RealBin."/modules/client_modules"; +require rsu_modules; + +# Create a variable to store mutators inside for use as +# transport of information through module functions +my $rsu_data = {}; +bless $rsu_data; + +# Create mutators and add them to the variable +$rsu_data->create_mutator(qw(version OS cwd clientdir javabin javaversion HOME args verboseprms compabilitymode preferredjava forcepulseaudio forcealsa prmfile fallbackprms)); + +# Add clientdir data to the data container +$rsu_data->clientdir = $cwd; +# Add cwd data to the data container +$rsu_data->cwd = $cwd; +# Add scriptversion to the data container +$rsu_data->version = $scriptversion; +# Add all the arguments passed to the script to the data container +$rsu_data->args = "@ARGV"; -# Detect the current OS -my $OS = "$^O"; +# Detect the current OS and add it to the data container +$rsu_data->OS = "$^O"; checkforcleanup(); -# Make a variable for users homedir -my $HOME; # If we are on windows -if ($OS =~ /MSWin32/) +if ($rsu_data->OS =~ /MSWin32/) { # Get the environment variable for USERPROFILE - $HOME = $ENV{"USERPROFILE"}; + $rsu_data->HOME = $ENV{"USERPROFILE"}; # Replace all backslashes with forward slashes - $HOME =~ s/\\/\//g; + $rsu_data->HOME =~ s/\\/\//g; } # Else we are on UNIX else { - $HOME = $ENV{"HOME"}; + $rsu_data->HOME = $ENV{"HOME"}; } +# Make a variable to contain the location of the homefolder for use later in the script +my $HOME = $rsu_data->HOME; + # If --version was provided then print out the version info -if ("@ARGV" =~ /--version/) +if ($rsu_data->args =~ /--version/) { - # Print version info then exit - print "RuneScape UNIX Client Script version: $scriptversion\n"; + # Version is now printed at the start of the script so just exit instead + #print "RuneScape UNIX Client Script version: $scriptversion\n"; exit; } -elsif ("@ARGV" =~ /--help/) +elsif ($rsu_data->args =~ /--help/) { # Display the help text print "Run the \"runescape\" without any parameters to launch the client normally. @@ -85,58 +104,52 @@ exit; } - -# If --launch is not passed then make sure the script runs from the script directory(this will fix "unable to find settings.conf") -#if ("@ARGV" !~ /--launch/) -#{ - # cd to current directory and launch script from there (suprisingly this fixes "unable to find settings.conf") -# system "cd \"$cwd\" && \"$cwd/runescape\" --launch @ARGV"; -# exit -#} - # If this script have been installed systemwide -if ($cwd =~ /^(\/usr\/s?bin|\/opt\/runescape|\/usr\/local\/s?bin)/) +if ($rsu_data->cwd =~ /^(\/usr\/s?bin|\/opt\/runescape|\/usr\/local\/s?bin)/) { # Print debug info - print "The script is running from a system path!\n$HOME/.config/runescape will be used as client folder instead!\n\n"; + print "The script is running from a system path!\n".$rsu_data->HOME."/.config/runescape will be used as client folder instead!\n\n"; - # Change $clientdir to ~/.config/runescape - $clientdir = "$HOME/.config/runescape/"; + # Change clientdir to ~/.config/runescape + $rsu_data->clientdir = $rsu_data->HOME."/.config/runescape/"; # Make the client folders - system "mkdir -p \"$HOME/.config/runescape/bin\" && mkdir -p \"$HOME/.config/runescape/share\""; - - # Symlink or Copy needed resources to the $clientdir - system "ln -s \"$cwd/share/jagexappletviewer.png\" \"$clientdir/share/jagexappletviewer.png\" && cp -v \"$cwd/share/settings.conf.example\" \"$clientdir/share/settings.conf.example\" && cp -v \"$cwd/share/runescape.prm.example\" \"$clientdir/share/runescape.prm.example\" && cp -v \"$cwd/share/runescape-beta.prm\" \"$clientdir/share/runescape-beta.prm\""; + system "mkdir -p \"".$rsu_data->HOME."/.config/runescape/bin\" && mkdir -p \"".$rsu_data->HOME."/.config/runescape/share\""; - # check if runescape.prm exists + # Symlink or Copy needed resources to the clientdir + system "ln -s \"".$rsu_data->cwd."/share/jagexappletviewer.png\" \"".$rsu_data->clientdir."/share/jagexappletviewer.png\" && cp -v \"".$rsu_data->cwd."/share/settings.conf.example\" \"".$rsu_data->clientdir."/share/settings.conf.example\" && cp -v \"".$rsu_data->cwd."/share/runescape.prm.example\" \"".$rsu_data->clientdir."/share/runescape.prm.example\" && cp -v \"".$rsu_data->cwd."/share/runescape-beta.prm\" \"".$rsu_data->clientdir."/share/runescape-beta.prm\""; + + # Make a variable to contain the clientdir so we can use it in a command + my $clientdir = $rsu_data->clientdir; + + # Check if runescape.prm exists my $prmfile_exists = `ls -la $clientdir/share|grep -P \"runescape.prm\$\"`; # If runescape.prm do not exist if ($prmfile_exists !~ /runescape.prm/) { - # Copy the example file to $clientdir as runescape.prm - system "cp -v \"$cwd/share/runescape.prm.example\" \"$clientdir/share/runescape.prm\""; + # Copy the example file to clientdir as runescape.prm + system "cp -v \"".$rsu_data->cwd."/share/runescape.prm.example\" \"".$rsu_data->clientdir."/share/runescape.prm\""; } } # Else if script is installed locally -elsif($cwd =~ /$HOME\/.local\/bin/) +elsif($rsu_data->cwd =~ /$HOME\/.local\/bin/) { # Print debug info - print "We are running from $cwd, however the client\nshould be at \\\$HOME/.local/share/runescape\nchanging directory to \\\$HOME/.local/share/runescape\n\n"; + print "We are running from ".$rsu_data->cwd.", however the client\nshould be at \\\$HOME/.local/share/runescape\nchanging directory to \\\$HOME/.local/share/runescape\n\n"; - # change $cwd to the local installation location - $cwd = "$HOME/.local/opt/runescape"; + # change cwd to the local installation location + $cwd = $rsu_data->HOME."/.local/opt/runescape"; } # Due to legal reasons the file jagexappletviewer.jar is no longer included by default so we need to check if it exists -# If jagexappletviewer.jar do not exist inside the $cwd/bin folder then -check_for_jagexappletviewer(); +# If jagexappletviewer.jar do not exist inside the $rsu_data->cwd/bin folder then +rsu_cfjav::check_for_jagexappletviewer($rsu_data); # Print debug info -print "Trying to read $clientdir/share/settings.conf\n"; +print "Trying to read ".$rsu_data->clientdir."/share/settings.conf\n"; ######################################################################## # BELOW THIS LINE ARE SOME SETTINGS YOU CAN CHANGE # @@ -145,24 +158,24 @@ # Read from the config file if the user want to run in compabilitymode/wine, # if nothing is found then dont use it -my $compabilitymode = parseargs("compabilitymode", "0"); +$rsu_data->compabilitymode = parseargs("compabilitymode", "0"); # Read the preferred java in the config file, if nothing is found then use default-java -my $preferredjava = parseargs("preferredjava", "default-java"); +$rsu_data->preferredjava = parseargs("preferredjava", "default-java"); # Read from the config file or passed parameters if the user want to force the client to use pulseaudio # if nothing then dont use it (incase a system does not have pulseaudio/padsp installed) -my $forcepulseaudio = parseargs("forcepulseaudio", "0"); +$rsu_data->forcepulseaudio = parseargs("forcepulseaudio", "0"); # Read from the config file or passed parameters if the user want to tell java to use alsa in the base for sounds # If nothing is found then do not use alsa and instead use the java default -my $forcealsa = parseargs("forcealsa", "0"); +$rsu_data->forcealsa = parseargs("forcealsa", "0"); # Check if a prmfile setting is active -my $prmfile = parseargs("prmfile", "runescape.prm"); +$rsu_data->prmfile = parseargs("prmfile", "runescape.prm"); # Define fallbackprms incase we cannot read share/runescape.prm -my $fallbackprms = "jagexappletviewer.jar -Dsun.java2d.noddraw=true -Dcom.jagex.config=http://www.runescape.com/k=3/l=\$(Language:0)/jav_config.ws -Xss2m -Xmx512m -XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC jagexappletviewer "; +$rsu_data->fallbackprms = "jagexappletviewer.jar -Dsun.java2d.noddraw=true -Dcom.jagex.config=http://www.runescape.com/k=3/l=\$(Language:0)/jav_config.ws -Xss2m -Xmx512m -XX:CompileThreshold=1500 -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC jagexappletviewer "; ######################################################################## #DO NOT EDIT THE CODE BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING! @@ -172,7 +185,7 @@ print "\n"; # Check if any --verbose parameters were passed to the script -my $verboseprms = verbosecheck(); +$rsu_data->verboseprms = rsu_verbose::verbosecheck($rsu_data); # Make debug info look abit nicer print "\n"; @@ -180,915 +193,23 @@ # Be strict to avoid messy code use strict; - -# Define any large messages we will need in the script -# Message if java in $PATH is not a binary -my $java_not_bin = << "java_not_binary_message"; -It looks like your default java is not a binary file! -This script requires direct use of the java BINARY file -in order to make sure all the java library files gets loaded properly. -Please edit $cwd/share/settings.conf -and add the path to the java BINARY as the value for preferredjava. - -You can use the command (You can find this text inside /tmp/java_notice.txt): -sudo find / -name "libjli.so" | sed "s/\\/lib\\/\\(i386\\|amd64\\)\\/jli\\/libjli.so/\\/bin\\/java/g" - -In order to get a list of possible paths you can use as the preferredjava value. -Also please look at $cwd/share/settings.conf.example -for examples on the setting values. - -Please press ENTER/RETURN to continue running the script -after you added the path to the binary into the -$cwd/share/settings.conf file. - -java_not_binary_message - - # Start actual process of running the client # Check if user wants to run in compability mode -checkcompabilitymode(); - -sub checkcompabilitymode -{ - # If compabilitymode is activated (either with $compabilitymode = 1 or with the --compabilitymode parameter) - if (("@ARGV" =~ /--compabilitymode/ && $OS !~ /MSWin32/) || ($compabilitymode =~ /(1|true)/i && $OS !~ /MSWin32/)) - { - # Tell user we are executing the client in compabilitymode - print "Compabilitymode requested, starting client through wine!\nThe client will use the java that is installed inside wine\n\n"; - - # Parse the prm file - my $params = parseprmfile(); - - # Launch client through wine - system "cd \"$cwd/\" && wine cmd /c \"set PATH=%CD%\\\\win32\\\\jawt;%PATH% && cd Z:$clientdir/bin && java -cp $params /share && exit\""; - - # Once the client is closed we need to do some cleanup (bug when running commands through shell to wine cmd - # Make a variable to contain the pids of cmd (from wine) - my $zombies = `pidof cmd`; - - # Split up the list of pids - my @zombie = split /\s/, $zombies; - - # Make a counter - my $zombiecounter = 0; - - # For each pid in the array - foreach(@zombie) - { - # kill the zombie process - system "kill -9 $zombie[$zombiecounter]"; - - # Increase counter by 1 - $zombiecounter += 1; - } - - # Exit this script so we dont cause trouble - exit - } -} - -# -#---------------------------------------- *** ---------------------------------------- -# +rsu_mains::checkcompabilitymode($rsu_data); # If compabilitymode is disabled then it will run the main function # If we are on windows -if ($OS =~ /MSWin32/) +if ($rsu_data->OS =~ /MSWin32/) { # Run the main function for windows - windows_main(); + rsu_mains::windows_main($rsu_data); } # Else we are on unix else { # Run the main function for unix - unix_main(); -} - -sub windows_main -{ - # Get the win32javabin setting which will be used as a searchpath to find jawt.dll and java.exe - my $win32javabin = readconf("win32java.exe", "default-java"); - - # Make a variable containing the default path containing jawt.dll - my $javalibspath = "%CD%\\win32\\jawt"; - - # If the win32javabin setting is default-java, 6, 7, 1.6 or 1.7 - if ($win32javabin =~ /^(default-java|6|7|1\.6|1\.7)/) - { - # Probe for the default java used on the system - $win32javabin = win32_find_java($win32javabin); - - # Prepare the new native javalibs path - $javalibspath = $win32javabin; - - # Remove \\java.exe from the string - $javalibspath =~ s/\\java.exe//ig; - } - - # Get the language setting - my $params = parseprmfile(); - - # Display java version we are using - print "Launching client using this java version: \n"; - - # Display the java version - system "\"$win32javabin\" -version 2>&1"; - - # Adjust the parameters abit - $params =~ s/jagexappletviewer\.jar/bin\/jagexappletviewer\.jar/; - - # Print debug info - print "\nLaunching the RuneScape Client using this command:\nset PATH=$javalibspath;%CD%\\win32\\gnu\\;%PATH% && $win32javabin $verboseprms -cp $params /share\n\nExecuting the RuneScape Client!\nYou are now in the hands of Jagex.\n\n######## End Of Script ########\n######## Jagex client output will appear below here ########\n\n"; - - # Execute the runescape client(hopefully) and then pipe the output to grep to remove the lines saying "Recieved command: _11" which i dont know why appears - system "set PATH=$javalibspath;%CD%\\win32\\gnu\\;%PATH% && \"$win32javabin\" $verboseprms -cp $params /share 2>&1 | grep -v \"Received command\""; -} - -# -#---------------------------------------- *** ---------------------------------------- -# - - - -sub unix_main -{ - # Make a variable to contain the java to use - my $javabin; - - # Check if user have a preferred java on unix - # If user want to use default-java then - if (($preferredjava =~ /default-java/)) - { - # Use default java - $javabin = "java"; - - # If we are not on mac (mac does not have opengl issues with java7) - if ($OS !~ /darwin/) - { - # Search for the location of the true default java binary (not the symlink) - my $truebinary = unix_find_default_java_binary(); - - # replace $javabin with the location of the true binary - $javabin = "$truebinary"; - } - - - } - # Else if user have set a custom path to a java binary (most likely sun/oracle java) - elsif (($preferredjava =~ /^\//)) - { - # Use the user set java binary - $javabin = $preferredjava; - } - - # Else just check what java to use - else - { - # Find the java executable - $javabin = findjavabin(); - } - - - # Get the language setting - my $params = parseprmfile(); - - # Make a variable to contain the java library path - my $javalibpath; - - # If we are not on MacOSX - if ($OS !~ /darwin/) - { - # Locate the java JRE lib folder so we can add it to the library PATH - $javalibpath = unix_findlibrarypath("$javabin"); - } - - # Check if java can be run in client mode and make sure we use the client mode if available - # as the client mode gives a HUGE boost in performance compared to the default server mode. - $javabin = check_for_java_client_mode("$javabin"); - - # If user enabled alsa sounds and OS is linux - if ($forcealsa =~ /(1|true)/i && $OS =~ /linux/) - { - # Run the java -version command and check if it is openjdk or java (both uses different alsa fixes) - my $javaused = `$javabin -version 2>&1`; - - # Pass the result to a new variable - my $javaused_result = $javaused; - - # If java used is sun/oracle java - if ($javaused_result =~ /Java\(TM\) SE/i) - { - # Make a variable for aoss - my $aoss = "aoss"; - - # Check /usr/bin for aoss32 - my $aosstest = `ls /usr/bin | grep aoss32`; - - # Check if $javabin contains the -client parameter and aoss32 was found - if($javabin =~ /-client/ && $aosstest =~ /aoss32/) - { - # Use aoss32 instead of aoss - $aoss = "aoss32"; - } - - # Wrap java inside aoss (alsa wrapper) - $javabin = "$aoss $javabin"; - } - # Else we are using openjdk - else - { - # Tell OpenJDK to use alsa (aoss does not work as OpenJDK is usually set to use pulseaudio over alsa) - $javabin = "$javabin -Djavax.sound.sampled.Clip=com.sun.media.sound.DirectAudioDeviceProvider -Djavax.sound.sampled.Port=com.sun.media.sound.PortMixerProvider -Djavax.sound.sampled.SourceDataLine=com.sun.media.sound.DirectAudioDeviceProvider -Djavax.sound.sampled.TargetDataLine=com.sun.media.sound.DirectAudioDeviceProvider"; - } - # Set $forcepulseaudio to false so that java dont get wrapped in pulse and alsa (chaotic results) - $forcepulseaudio = 0; - } - # Else if user requested to force use pulseaudio - elsif ($forcepulseaudio =~ /(1|true)/i && $OS !~ /darwin/) - { - # Print debug info - print "Forcing java to use pulseaudio by wrapping it inside \"padsp\"!\n"; - - # Then edit $javabin into "padsp $javabin" - $javabin = "padsp $javabin"; - } - - # Display java version we are using - print "Launching client using this java version: \n"; - - # Display the java version - system "$javabin -version 2>&1 && echo"; - - # Make a variable to contain the MacOSX integration (app icon and name) - my $osxprms = ""; - - # If we are on macosx/darwin then - if ($OS =~ /darwin/) - { - # Print debug info - print "Adding application name and icon to the dock.\n"; - - # Add the dock icon and dock name to the variable, so that it will be used in the java execution - $osxprms = "-Xdock:name=\"RuneScape Unix Client\" -Xdock:icon=\"$cwd/share/runescape.icns\""; - } - else - { - # Tell user what we are doing - print "Fixing possible OpenGL issues by adding the environment variable\n$javalibpath\n"; - - # Add the library path to the java binary command - $javabin = "$javalibpath $javabin"; - } - - - # Print debug info - print "\nLaunching the RuneScape Client using this command:\ncd $clientdir/bin && $javabin $osxprms $verboseprms -cp $params /share\n\nExecuting the RuneScape Client!\nYou are now in the hands of Jagex.\n\n######## End Of Script ########\n######## Jagex client output will appear below here ########\n\n"; - - # Execute the runescape client(hopefully) - system "cd $clientdir/bin && $javabin $osxprms $verboseprms -cp $params /share 2>&1"; -} - -# -#---------------------------------------- *** ---------------------------------------- -# - -sub findjavabin -{ - # Print debug info - print "I will now check what platform you are using\nand use the correct java path for that platform\n\n"; - - # Define the variable for javabin - my $javabin; - - # Define a variable to contain a boolean(true/false) to see if openjdk exists - my $openjdk; - - # If we are on mac osx (AKA Darwin) - if ($OS =~ /darwin/) - { - # Print debug info - print "You are running darwin/MacOSX.\nI will use Apple Java Path\n\n"; - - # javabin is /usr/bin/java - $javabin = "/usr/bin/java"; - } - # Else if we are on linux - elsif($OS =~ /linux/) - { - # Print debug info - print "You are running $OS, I will probe for OpenJDK6 or newer\nand use the newest version if possible.\n\n"; - - # run "find /usr/lib/jvm/ -name java" to see if we can find openjdk by using grep - $openjdk = `find -L /usr/lib/jvm/ -name "java" |grep -P "$preferredjava(|-amd64|-i386|-\$\(uname -i\))/bin"`; - - # if $openjdk is found (hurray!) - if ($openjdk =~ /java-\d{1,1}-openjdk(|-\$\(uname -p\)|-i386|-amd64)/) - { - # Print debug info - print "Found OpenJDK files, now checking for the newest installed one.\n"; - - # Split the string by newline incase openjdk-7 was found - my @openjdkbin = split /\n/, $openjdk; - - # Print debug info - print "Checking which OpenJDK versions are installed...\n\n"; - - # Run a check to see if we detected openjdk7 - my $detectedopenjdk7 = grep { $openjdkbin[$_] =~ /java-\d{1,1}-openjdk-(\$\(uname -p\)|i386|amd64)/ } 0..$#openjdkbin; - - # If openjdk7 was not found - #if ($openjdkbin[$index] !~ /java-\d{1,1}-openjdk-(\$\(uname -p\)|i386|amd64)/) - if($detectedopenjdk7 =~ /0/) - { - # Print debug info - print "OpenJDK6 detected!, I will use this to run the client!\n"; - - # we will use openjdk6 to launch it (openjdk does not have sfx problems like sun-java) - $javabin = "$openjdkbin[0] "; - } - else - { - # Print debug info - print "OpenJDK7 detected!, I will use this to run the client!\n"; - - # Find the index of OpenJDK7 - my @openjdk7index = grep { $openjdkbin[$_] =~ /java-\d{1,1}-openjdk-(\$\(uname -p\)|i386|amd64)/ } 0..$#openjdkbin; - - # We will use openjdk7 to launch it (openjdk does not have sfx problems like sun-java) - $javabin = "$openjdkbin[$openjdk7index[0]] "; - } - } - else - { - # Print debug info - print "I did not find any version of OpenJDK in /usr/lib/jvm\nI will instead use the default java in \\\$PATH\n"; - - # if openjdk is not found then we will use default java (lets pray it is in the $PATH) - $javabin = "java"; - } - } - # Else we are running bsd or solaris (both should have java in their $PATH) - else - { - # Print debug info - print "You are running $OS, I will use the default java on your system\n\n"; - - # We just use the one from $PATH - $javabin = "java"; - } - - # Return to call with the java executable - return $javabin; -} - -# -#---------------------------------------- *** ---------------------------------------- -# - -sub parseprmfile -{ - # Print debug info - print "Reading .prm file $clientdir/share/$prmfile\n"; - - # Read the runescape parameters file and send pointer to $prms - my $prms = ReadFile("$clientdir/share/$prmfile"); - - # If there is an error reading the file - if ($prms =~ /error reading file/) - { - # Print debug info - print "Error opening $clientdir/share/$prmfile\nI will instead use these fallback parameters:\n$fallbackprms\n"; - - # Use the fallback prms defined at the top of the script - $prms = $fallbackprms; - } - # Else we will convert the pointer to a string - else - { - # Make the pointer into a string we can work with - $prms = "@$prms"; - - # Print debug info - print "This is the info i gathered from the $prmfile file\n######## File Start ########\n$prms\n######## File End ########\n\n"; - } - - # Print debug info - print "I will now parse the parameters!\n"; - - # Make the string into 1 line - $prms =~ s/(-Djava.class.path=|\n|\r|\r\n)//g; - - # Get the client language settings - my $lang = getlanguage(); - - # Print debug info - print "Stitching the language setting to the final parameters.\n\n"; - - # Apply the language setting to the prms - $prms =~ s/\$\(Language:0\)/$lang/g; - - # Print debug info - print "Final parameter string is:\n$prms\n\n"; - - # Return to call with the whole prm string - return $prms; -} - -# -#---------------------------------------- *** ---------------------------------------- -# - - - -sub getlanguage -{ - # Print debug info - print "Checking your client language setting(if any)\nTrying to read file\n$HOME/jagexappletviewer.preferences\n\n"; - - # Make a variable to contain the contents of $HOME/jagexappletviewer.preferences - my $lang = ReadFile("$HOME/jagexappletviewer.preferences"); - - # If there is an error with the file - if ($lang =~ /error reading file/) - { - # Print debug info - print "Unable to read jagexappletviewer.preferences file, defaulting to Language=0 (English).\n"; - - # Default to english - $lang = "Language=0"; - } - # Else we will convert the pointer to a string - else - { - # Make the pointer into a string so we can work with it - $lang = "@$lang"; - - # Print debug info - print "File read and this is the content i found!\n######## File Start ########\n\n$lang\n######## File End ########\n\n"; - } - - # Print debug info - print "I will now parse the contents from the\njagexappletviewer.preferences file so it can be used.\n"; - - # Replace newlines and get only the Language number out of the string - $lang =~ s/(Language\=|\n|\r|\r\n|Member\=|yes|no|\s+)//g; - - # Return the prefered language - return $lang; -} - -# -#---------------------------------------- *** ---------------------------------------- -# - -# Read contents from a file and put it into a pointer -sub ReadFile -{ - # Gets passed data from the function call - my ($filename) = @_; - - # Makes an array to keep the inputdata - my @inputdata; - - # Opens the passed file, if error it returns language=0 which equals english - open (my $FILE, "$filename") || return "error reading file"; - - # While there is something in the file - while(<$FILE>) - { - # Skip comments - next if /^\s*#/; - - # Push data into the inputdata array - push(@inputdata, $_) - } - - # Close the file - close($FILE); - - # Return the pointer to the datafile inputdata - return(\@inputdata); -} - -# -#---------------------------------------- *** ---------------------------------------- -# - -sub readconf -{ - # Get the passed data from function call - my ($key, $default) = @_; - - # Get the content from the settings file - my $confcontent = ReadFile("$clientdir/share/settings.conf"); - - # If no file is found or error reading the file - if ($confcontent =~ /error reading file/) - { - # Print debug info - print "Error reading settings.conf, using default value: $default\n"; - - # Then return default value - return $default; - } - - # Split the conf file content by newline - my @settings = split /(\n|\r\n|\r)/, "@$confcontent"; - - # Make a container for the value of the key we are looking for - my $value = ''; - - # Make a counter for the foreach loop - my $counter = 0; - - # For each index in the @settings array - foreach(@settings) - { - # If the line starts with the $key - if ($settings[$counter] =~ /$key/) - { - # Print debug info - print "Reading value from \"$key\"\n"; - - # Split the line by = - my @keyvalue = split /=/, $_; - - # Put the value into the one we are returning - $value = $keyvalue[1]; - } - - # Increase the counter by 1 - $counter += 1; - } - - # If we still got no value - if ($value eq '') - { - # Print debug info - print "Did not find $key in $clientdir/share/settings.conf\n"; - - # Set value to default - $value = $default; - } - - - # Print debug info - print "Setting script variable $key to $value\n"; - - # Return the value of the key we were looking for - return $value; -} - -# -#---------------------------------------- *** ---------------------------------------- -# - -sub verbosecheck -{ - # Tell user what we are going to do - print "Checking if any --verbose parameters were passed to the script\n"; - - # If --verbose was passed to the script - if ("@ARGV" =~ /--verbose($|\ )/g) - { - # Tell user the result of the check - print "--verbose was passed to the script, java will run in verbose mode when executed!\n"; - - # Return the verbose parameters for java (no need to check anymore since this contains all the verbose modes) - return "-verbose:class -verbose:jni -verbose:gc"; - } - # Else if no --verbose parameters are passed - elsif ("@ARGV" !~ /--verbose(|:jni|:class|:gc)($|\ )/g) - { - # Tell user the result of the check - print "The --verbose parameter was not passed to the script.\nJava will be executed without extra output.\n"; - - # Return empty string since no verbose mode was specified - return ""; - } - - # Make an array to hold the specific parameters if they are passed - my @verboseprms; - - # If --verbose:jni was passed - if("@ARGV" =~ /--verbose:jni($|\ )/g) - { - # Tell user the result of the check - print "--verbose:jni was passed to the script, java will run in verbose:jni mode when executed!\n"; - - # Add the verbose parameters for java to the array - push(@verboseprms, "-verbose:jni"); - } - # If --verbose:class - if("@ARGV" =~ /--verbose:class($|\ )/g) - { - # Tell user the result of the check - print "--verbose:class was passed to the script, java will run in verbose:class mode when executed!\n"; - - # Add the verbose parameters for java to the array - push(@verboseprms, "-verbose:class"); - } - # If --verbose:gc - if("@ARGV" =~ /--verbose:gc($|\ )/g) - { - # Tell user the result of the check - print "--verbose:gc was passed to the script, java will run in verbose:gc mode when executed!\n"; - - # Add the verbose parameters for java to the array - push(@verboseprms, "-verbose:gc"); - } - - # Return the parameters - return "@verboseprms"; -} - -# -#---------------------------------------- *** ---------------------------------------- -# - -sub check_for_jagexappletviewer -{ - my $jarfileexistcheck = ""; - - # If we are on windows - if ($OS =~ /MSWin32/) - { - # Make $cwd use \ instead of / - $cwd =~ s/\\/\//g; - # Set a temp %PATH% variable so we can use grep and then execute dir against the bin folder and pipe the result to grep to - # check if jagexappletviewer.jar exists - $jarfileexistcheck = `set PATH=%CD%\\win32\\jawt\\;%CD%\\win32\\gnu\\;%PATH% && dir \"$cwd\\bin\\\" | grep \"jagexappletviewer.jar\" ` - } - # Else we are on unix - else - { - # execute ls and pipe the result to grep to check if jagexappletviewer.jar exists - $jarfileexistcheck = `ls \"$clientdir/bin/\" | grep \"jagexappletviewer.jar\"`; - } - - # Transfer the result to a new variable - my $jarcheckresult = $jarfileexistcheck; - - # If jagexappletviewer.jar do not exist then - if ($jarcheckresult !~ /jagexappletviewer.jar/) - { - # Make a variable containing the path to the update script - my $updatescript = "\"$cwd/update-runescape-client\""; - - # If we are on windows - if ($OS =~ /MSWin32/) - { - # Use a different execution line - $updatescript = "start cmd /c \"$cwd/update-client-on-windows.bat\""; - } - - # Execute the updater - system "$updatescript"; - } -} - -# -#---------------------------------------- *** ---------------------------------------- -# - -sub win32_find_java -{ - # Gets passed data from the function call - my ($win32java_setting) = "@_"; - - # Make an array for the current version - my $currentversion = "6"; - - # If the win32java setting is default-java - if ($win32java_setting =~ /default-java/) - { - # Run a registry query and grep for the current java version (example: 1.6) - $currentversion = `set PATH=%CD%\\win32\\gnu\\;%PATH% && reg query \"hklm\\Software\\JavaSoft\\Java Runtime Environment\" /v CurrentVersion | grep CurrentVersion`; - # Remove all tabs, whitespace and newlines and the 1. and also remove REG_SZ and everything before that from the last array entry - $currentversion =~ s/(.+REG_SZ|\n\r|\r|\n|\s+|\t+|1\.)//g; - } - else - { - # Prepare the win32java setting so that we only get the number we want - $win32java_setting =~ s/(\d{1,1}\.|\.\d{1,2}_\d{1,2})//g; - - # Set the currentversion_array content to be the same as the win32java setting - $currentversion = $win32java_setting; - } - - # Make the string Java#FamilyVersion - my $javafamily = "Java$currentversion"."FamilyVersion"; - - # Use the current version to run a new registry query and grep for Java#FamilyVersion (replace # with number) - my $javafamilyversion = `set PATH=%CD%\\win32\\gnu\\;%PATH% && reg query \"hklm\\Software\\JavaSoft\\Java Runtime Environment\" /v $javafamily | grep $javafamily`; - # Remove all tabs, whitespace and newlines and also remove REG_SZ and everything before that from the last array entry - $javafamilyversion =~ s/(.+REG_SZ|\n\r|\r|\n|\s|\t|\s+)//g; - - # Use the javafamilyversion to run a new registry querty and grep for JavaHome which contains the location of the java installation - my $javahome = `set PATH=%CD%\\win32\\gnu\\;%PATH% && reg query \"hklm\\Software\\JavaSoft\\Java Runtime Environment\\$javafamilyversion\" /v JavaHome | grep JavaHome`; - # Split the result by REG_SZ and add everything to an array - my @javahome_array = split(/REG_SZ/i, $javahome); - # Remove all tabs, whitespace and newlines and also remove REG_SZ and everything before that from the last array entry - $javahome_array[-1] =~ s/(.+REG_SZ|\n\r|\r|\n|\t+|\s{2,10})//g; - - # Put together the path to the java.exe - my $javabin_result = "$javahome_array[-1]\\bin\\java.exe"; - - # Return the result - return $javabin_result; -} - -# -#---------------------------------------- *** ---------------------------------------- -# - -sub unix_findlibrarypath -{ - # Gets passed data from the function call - my ($binary) = "@_"; - - # List up the shared library files used by the java binary (not the symlink!) and remove unneeded info - my $lddresult = `ldd $binary | grep libjli.so`; - #my $lddresult = `ldd $binary | grep libjli.so | sed s/libjli.so\\ =\\>// | sed s/\\(.*// | sed s/jli\\\\/libjli.so//`; - - # Finds the library path from the ldd output line, removing whitespaces before - # and after the path. - $lddresult =~ s/\s*libjli\.so\s*=>\s+(.*)jli\/libjli\.so\s+\(\S+\)\s*$/$1/; - - # Remove the TAB and whitespaces before the path - #$lddresult =~ s/^(\t+\s+|\t+|\s+)//g; - - # Remove the newline from the output - #$lddresult =~ s/\n//g; - - # Return the library path for java - return "LD_LIBRARY_PATH=$lddresult"; -} - -# -#---------------------------------------- *** ---------------------------------------- -# - -sub unix_find_default_java_binary -{ - # Make a variable for the location of the java in path - my $whereisjava; - - # If our os is linux or freebsd - if ($OS =~ /(linux|freebsd)/) - { - # Ask where the java executable is - $whereisjava = `whereis java | sed s/java:\\ // | sed s/\\ .*//`; - } - # Else if we are on solaris - elsif($OS =~ /(solaris)/) - { - # Return the default symlink location (since solaris have the libjli.so linked properly) - return "/usr/bin/java"; - } - - # Make a variable to contain the testing results - my $test_exec; - - # Make a for loop which follows symlinks up to 10 times in order to find the java binary - # (you must be really silly if you have 10 symlinks together to point to it!) - my $counter; - for ($counter = 0; $counter < 10; $counter++) - { - # Check if this is the true binary - $test_exec = `ls -la $whereisjava`; - - # If the result contains "java -> /" then - if ($test_exec =~ /java\ -.\ \//) - { - # Split the result by whitespace - my @newtest = split(/\ /, $test_exec); - - # Replace $whereisjava with the new location to test - $whereisjava = $newtest[-1]; - } - else - { - # Split the result by whitespace - my @truebinary = split(/\ /, $test_exec); - - # Replace $whereisjava with the new location to test - $whereisjava = $truebinary[-1]; - - # Remove the newline from the output - $whereisjava =~ s/\n//; - - # Make sure we end this loop (no point to continue checking) - $counter = 11; - } - } - - # Do a final check to see if the java binary is found... - # If $whereisjava do not end with /bin/java then - if ($whereisjava !~ /\/bin\/java$/) - { - # Run a function which will tell the user what to do in order to fix this issue - $whereisjava = unix_default_java_is_a_script(); - } - - # Return the true default java binary - return "$whereisjava"; -} - -# -#---------------------------------------- *** ---------------------------------------- -# - -sub unix_default_java_is_a_script -{ - # Make a variable to contain the new java path - my $newjavapath; - - # if we are inside an interactive shell then - if (-t STDOUT) - { - # Write the java notice to a file - WriteFile($java_not_bin, ">", "/tmp/java_notice.txt"); - - # Display the message - print $java_not_bin; - - # Wait for user to press ENTER/RETURN - my $continue = ; - - # remove the notice - system "rm /tmp/java_notice.txt"; - - # Read the preferred java in the config file, if nothing is found then say JAVA NOT SET - $newjavapath = readconf("preferredjava", "JAVA NOT SET"); - } - else - { - # Write the java notice to a file - WriteFile($java_not_bin, ">", "/tmp/java_notice.txt"); - - # run script in xterm so we can get input from user and with right permissions - system "xterm -e \"cat /tmp/java_notice.txt && read i\""; - - # remove the notice - system "rm /tmp/java_notice.txt"; - - # Read the preferred java in the config file, if nothing is found then say JAVA NOT SET - $newjavapath = readconf("preferredjava", "JAVA NOT SET"); - } - - # If java is still not set - if ($newjavapath =~ /JAVA NOT SET/) - { - # Tell user whats wrong and then exit - print "You did not set the path to java in the preferredjava setting\ninside $cwd/share/settings.conf\nThe client will not work for you without this setting... EXITING!\n"; - exit - } - - # return the new javapath - return "$newjavapath"; -} - -# -#---------------------------------------- *** ---------------------------------------- -# - -# Write a file from scratch(deletes previous content) -sub WriteFile -{ - # Get the passed variables - my ($content, $writemode, $outfile) = @_; - - # Open the outfile for Writing/Rewrite - open (my $FILE, "$writemode$outfile"); - - # Write the content passed to the function to the file - print $FILE "$content\n"; -} - -# -#---------------------------------------- *** ---------------------------------------- -# - -sub check_for_java_client_mode -{ - # Gets passed data from the function call - my ($java_binary) = "@_"; - - # Execute java -help and see if this java have the -client parameter available - my $results = `$java_binary -help 2>&1`; - - # If the -client parameter is an option - if ($results =~ /-client/) - { - # Tell java to execute in client mode - $java_binary = "$java_binary -client"; - } - - # Return the results - return "$java_binary"; + rsu_mains::unix_main($rsu_data); } # @@ -1121,7 +242,7 @@ else { # If no parameter that matches is passed then read from settings.conf - my $result = readconf("$arg2find", "$default"); + my $result = rsu_IO::readconf("$arg2find", "$default", $rsu_data); # Return setting return $result; @@ -1135,7 +256,7 @@ sub checkforcleanup { - if ($OS =~ /MSWin32/) + if ($rsu_data->OS =~ /MSWin32/) { # Replace / with \\ $cwd =~ s/\//\\/g; @@ -1150,10 +271,12 @@ if ($checkforscript =~ /cleanupscript.pl/) { # Run the Download-Windows-Files.exe to make sure the win32 folder is updated - system "$cwd\\Download-Windows-Files.exe"; + #system "$cwd\\Download-Windows-Files.exe"; - # Run the cleanupscript then delete it - system "$win32path && perl \"$cwd\\cleanupscript.pl\" && del \"$cwd\\cleanupscript.pl\""; + # Run the cleanupscript then delete it then show a notice to the user + system "$win32path && perl \"".$rsu_data->cwd."\\cleanupscript.pl\" && del \"".$rsu_data->cwd."\\cleanupscript.pl\" && perl -e \"use Wx qw[:everything]; Wx::MessageBox('The scripts were recently updated. Please press OK and run Download-Windows-Files.exe to make sure the modules are up to date.', 'Recently Updated!', wxOK,undef);"; + + exit; } } else @@ -1165,7 +288,7 @@ if ($checkforscript =~ /cleanupscript.pl/) { # Run the cleanupscript then delete it - system "perl \"$cwd/cleanupscript.pl\" && rm \"$cwd/cleanupscript.pl\""; + system "perl \"".$rsu_data->cwd."/cleanupscript.pl\" && rm \"".$rsu_data->cwd."/cleanupscript.pl\""; } } } @@ -1174,6 +297,36 @@ #---------------------------------------- *** ---------------------------------------- # +# Create mutator function from "Programming Perl" +sub create_mutator +{ + + my $self = shift; + + # From "Programming Perl" 3rd Ed. p338. + for my $attribute (@_) + { + + no strict "refs"; # So symbolic ref to typeglob works. + no warnings; # Suppress "subroutine redefined" warning. + + *$attribute = sub : lvalue + { + + my $self = shift; + + $self->{$attribute} = shift if @_; + $self->{$attribute}; + + }; + + } + +} + +# +#---------------------------------------- *** ---------------------------------------- +# # Old script based on Ethoxyethaan's forum post kept for historical reasons :) diff -Nru runescape-3.9.1/opt/runescape/share/runescape-beta.prm runescape-3.9.4~PPA1/opt/runescape/share/runescape-beta.prm --- runescape-3.9.1/opt/runescape/share/runescape-beta.prm 2012-07-13 15:50:38.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/share/runescape-beta.prm 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ --Djava.class.path=jagexappletviewer.jar -#Do not change anything above this line --Dsun.java2d.noddraw=true --Dcom.jagex.config=http://world201.runescape.com/k=3/l=$(Language:0)/jav_config.ws --Xss2m --Xmx512m --XX:CompileThreshold=1500 --Xincgc --XX:+UseConcMarkSweepGC --XX:+UseParNewGC -# Proxy settings -#-DhttpProxyHost=127.0.0.1 -#-DhttpProxyPort=8080 -#-DhttpsProxyHost=127.0.0.1 -#-DhttpsProxyPort=8080 -#-DsocksProxyHost=127.0.0.1 -#-DsocksProxyPort=9050 -#Do not change anything below this line -jagexappletviewer - Binary files /tmp/oeow2PDoGl/runescape-3.9.1/opt/runescape/share/runescape-old.png and /tmp/TfBK4Igyiv/runescape-3.9.4~PPA1/opt/runescape/share/runescape-old.png differ Binary files /tmp/oeow2PDoGl/runescape-3.9.1/opt/runescape/share/runescape.icns and /tmp/TfBK4Igyiv/runescape-3.9.4~PPA1/opt/runescape/share/runescape.icns differ Binary files /tmp/oeow2PDoGl/runescape-3.9.1/opt/runescape/share/runescape.ico and /tmp/TfBK4Igyiv/runescape-3.9.4~PPA1/opt/runescape/share/runescape.ico differ diff -Nru runescape-3.9.1/opt/runescape/share/runescape.prm runescape-3.9.4~PPA1/opt/runescape/share/runescape.prm --- runescape-3.9.1/opt/runescape/share/runescape.prm 2012-05-29 22:53:21.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/share/runescape.prm 2012-11-18 09:55:43.000000000 +0000 @@ -1,29 +1,6 @@ -# This file can be edited to feed special options -# to java during execution, you comment out an option by -# placing an # infront of the line - -# Jagex default settings --Djava.class.path=jagexappletviewer.jar --Dsun.java2d.noddraw=true --Dcom.jagex.config=http://www.runescape.com/k=3/l=$(Language:0)/jav_config.ws --Xmx512m - -# Stack size fixing Error_game_crash, Credit to Test6125 for the solution --Xss1m - -# Proxy settings -#-DhttpProxyHost=127.0.0.1 -#-DhttpProxyPort=8080 -#-DhttpsProxyHost=127.0.0.1 -#-DhttpsProxyPort=8080 -#-DsocksProxyHost=127.0.0.1 -#-DsocksProxyPort=9050 - -# Try to make the client use the 64-bit data model if possible (not sure if it actually works) -#-d64 - -# Get some debug information if run from the terminal (not the same as --verbose) --Xdebug - -# Class to execute -jagexappletviewer +-Djava.class.path=jagexappletviewer.jar +-Dcom.jagex.config=http://world68.runescape.com/k=3/l=$(Language:0)/jav_config.ws +-Xmx512m +-Xss2m +-Dsun.java2d.noddraw=true +jagexappletviewer diff -Nru runescape-3.9.1/opt/runescape/share/runescape.prm.example runescape-3.9.4~PPA1/opt/runescape/share/runescape.prm.example --- runescape-3.9.1/opt/runescape/share/runescape.prm.example 2012-05-30 18:07:37.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/share/runescape.prm.example 2012-10-15 09:36:56.000000000 +0000 @@ -6,7 +6,7 @@ -Djava.class.path=jagexappletviewer.jar -Dsun.java2d.noddraw=true -Dcom.jagex.config=http://www.runescape.com/k=3/l=$(Language:0)/jav_config.ws --Xmx512m +-Xmx256m # Stack size fixing Error_game_crash, Credit to Test6125 for the solution -Xss1m diff -Nru runescape-3.9.1/opt/runescape/share/settings.conf runescape-3.9.4~PPA1/opt/runescape/share/settings.conf --- runescape-3.9.1/opt/runescape/share/settings.conf 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/share/settings.conf 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,6 @@ +prmfile=runescape.prm +preferredjava=default-java +win32java.exe=default-java +forcepulseaudio=false +forcealsa=false +compabilitymode=false diff -Nru runescape-3.9.1/opt/runescape/share/settings.conf.example runescape-3.9.4~PPA1/opt/runescape/share/settings.conf.example --- runescape-3.9.1/opt/runescape/share/settings.conf.example 2012-05-30 18:07:17.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/share/settings.conf.example 2012-10-15 09:36:56.000000000 +0000 @@ -40,7 +40,7 @@ # However you must have alsa and alsa-oss installed # If both forcepulseaudio and forcealsa are set to true, then alsa will get priority over pulseaudio! # NOTE: this option only works on linux! -forcealsa=false +forcealsa=true # Set compability to 1 or true to run the game through wine (requires java to be installed on wine) # Running the game through wine-java with this script gives very close to native performance (but limited java heap space) Binary files /tmp/oeow2PDoGl/runescape-3.9.1/opt/runescape/share/update-runescape.ico and /tmp/TfBK4Igyiv/runescape-3.9.4~PPA1/opt/runescape/share/update-runescape.ico differ diff -Nru runescape-3.9.1/opt/runescape/templates/MSWin32/Download-Windows-Files_src.au3 runescape-3.9.4~PPA1/opt/runescape/templates/MSWin32/Download-Windows-Files_src.au3 --- runescape-3.9.1/opt/runescape/templates/MSWin32/Download-Windows-Files_src.au3 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/templates/MSWin32/Download-Windows-Files_src.au3 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,58 @@ +#Region ;**** Directives created by AutoIt3Wrapper_GUI **** +#AutoIt3Wrapper_Icon=..\..\share\runescape.ico +#AutoIt3Wrapper_Outfile=Download-Windows-Files.exe +#AutoIt3Wrapper_Compression=4 +#AutoIt3Wrapper_UseUpx=n +#AutoIt3Wrapper_Res_Description=A downloader to add the files required for the unix client to run on Windows +#AutoIt3Wrapper_Res_Fileversion=2.3.0.0 +#AutoIt3Wrapper_Res_LegalCopyright=HikariKnight (hkprojects.weebly.com) +#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker +#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** +#include +#include +#include + +#Region ### START Koda GUI section ### +$Form1 = GUICreate("Downloading Required files for Windows Support", 633, 42, -1, -1, BitOR($WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_BORDER,$WS_CLIPSIBLINGS), 0) +$Progress = GUICtrlCreateProgress(0, 0, 631, 17) +$Button = GUICtrlCreateButton("Downloading win32.7z", 0, 16, 632, 25, $WS_GROUP) +GUICtrlSetState(-1, $GUI_DISABLE) +GUISetState(@SW_SHOW) +#EndRegion ### END Koda GUI section ### + + +; Gets the size of the file +$downsize = InetGetSize("http://dl.dropbox.com/u/11631899/opensource/Perl/runescape_unix_client/win32.7z") + +; Location and name of file when downloaded +$filename = @ScriptDir & '\win32.7z' + +; Downloads the file containing the windows files +$dl = inetget("http://dl.dropbox.com/u/11631899/opensource/Perl/runescape_unix_client/win32.7z", $filename, 1, 1) + +; While downloading, update progressbar +While FileGetSize($filename) <> $downsize + ; Update the progressbar + GUICtrlSetData($Progress, InetGetInfo($dl, 0) * 100 / $downsize) + ;sleep(30) +WEnd + +; Close the download +InetClose($dl) +; Set Process to 100% +GUICtrlSetData($Progress, 100) + +; Use 7-zip to extract the files windows need to run the client and wait for the process to finish +ShellExecuteWait(@ScriptDir & "\win32\7-zip\7z.exe", "x -y win32.7z", @ScriptDir) + +; Wait 10 milliseconds +sleep(10) + +; Delete the archive +FileDelete(@ScriptDir & "\win32.7z") + +; Wait 10 milliseconds +sleep(10) + +; Run the client +Run(@ScriptDir & "\RuneScape.exe") \ No newline at end of file diff -Nru runescape-3.9.1/opt/runescape/templates/MSWin32/README.txt runescape-3.9.4~PPA1/opt/runescape/templates/MSWin32/README.txt --- runescape-3.9.1/opt/runescape/templates/MSWin32/README.txt 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/templates/MSWin32/README.txt 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,3 @@ +These files are just normal .txt files! +You can open them in any text editor like wordpad +and notepad! :) \ No newline at end of file diff -Nru runescape-3.9.1/opt/runescape/templates/MSWin32/RuneScape-src.au3 runescape-3.9.4~PPA1/opt/runescape/templates/MSWin32/RuneScape-src.au3 --- runescape-3.9.1/opt/runescape/templates/MSWin32/RuneScape-src.au3 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/templates/MSWin32/RuneScape-src.au3 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,14 @@ +; We do not want any tray icon +#NoTrayIcon +#Region ;**** Directives created by AutoIt3Wrapper_GUI **** +#AutoIt3Wrapper_Icon=..\..\share\runescape.ico +#AutoIt3Wrapper_Outfile=RuneScape.exe +#AutoIt3Wrapper_Compression=4 +#AutoIt3Wrapper_UseUpx=n +#AutoIt3Wrapper_Res_Description=Native Windows launcher for the RuneScape Unix Client created by HikariKnight +#AutoIt3Wrapper_Res_Fileversion=2.3.0.0 +#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker +#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** + +; Execute the RuneScape Unix Client +Run(@ScriptDir & '\win32\perl\bin\perl.exe "' & @ScriptDir & '\runescape" --launch --verbose 1>runescape-debug.rtf 2>&1', @ScriptDir, @SW_HIDE) \ No newline at end of file diff -Nru runescape-3.9.1/opt/runescape/templates/MSWin32/rsu-settings-src.au3 runescape-3.9.4~PPA1/opt/runescape/templates/MSWin32/rsu-settings-src.au3 --- runescape-3.9.1/opt/runescape/templates/MSWin32/rsu-settings-src.au3 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/templates/MSWin32/rsu-settings-src.au3 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,14 @@ +; We do not want any tray icon +#NoTrayIcon +#Region ;**** Directives created by AutoIt3Wrapper_GUI **** +#AutoIt3Wrapper_Icon=..\..\share\runescape.ico +#AutoIt3Wrapper_Outfile=rsu-settings.exe +#AutoIt3Wrapper_Compression=4 +#AutoIt3Wrapper_UseUpx=n +#AutoIt3Wrapper_Res_Description=A native launcher for the rsu-settings perl script +#AutoIt3Wrapper_Res_Fileversion=2.3.0.0 +#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker +#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** + +; Execute the RuneScape Unix Client +Run(@ScriptDir & '\win32\perl\bin\perl.exe "' & @ScriptDir & '\rsu-settings"', @ScriptDir, @SW_HIDE) \ No newline at end of file Binary files /tmp/oeow2PDoGl/runescape-3.9.1/opt/runescape/templates/darwin/RuneScape.app/Contents/Info.plist and /tmp/TfBK4Igyiv/runescape-3.9.4~PPA1/opt/runescape/templates/darwin/RuneScape.app/Contents/Info.plist differ Binary files /tmp/oeow2PDoGl/runescape-3.9.1/opt/runescape/templates/darwin/RuneScape.app/Contents/MacOS/RuneScape_UNIX_Client and /tmp/TfBK4Igyiv/runescape-3.9.4~PPA1/opt/runescape/templates/darwin/RuneScape.app/Contents/MacOS/RuneScape_UNIX_Client differ Binary files /tmp/oeow2PDoGl/runescape-3.9.1/opt/runescape/templates/darwin/RuneScape.app/Contents/Resources/AppSettings.plist and /tmp/TfBK4Igyiv/runescape-3.9.4~PPA1/opt/runescape/templates/darwin/RuneScape.app/Contents/Resources/AppSettings.plist differ Binary files /tmp/oeow2PDoGl/runescape-3.9.1/opt/runescape/templates/darwin/RuneScape.app/Contents/Resources/MainMenu.nib and /tmp/TfBK4Igyiv/runescape-3.9.4~PPA1/opt/runescape/templates/darwin/RuneScape.app/Contents/Resources/MainMenu.nib differ diff -Nru runescape-3.9.1/opt/runescape/templates/launchers/rsu-settings.conf runescape-3.9.4~PPA1/opt/runescape/templates/launchers/rsu-settings.conf --- runescape-3.9.1/opt/runescape/templates/launchers/rsu-settings.conf 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/templates/launchers/rsu-settings.conf 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,29 @@ +# HEADER! DO NOT REMOVE +[Desktop Entry] +Version=1.0 + +# Application = GUI application, Terminal = Terminal application +Type=Application + +# Name displayed in the menus and on shortcuts +Name=RuneScape Client Settings +# Same as above but for KDE only +GenericName=RuneScape Client Settings + +# A hint about what the application is +Comment=A graphical settings editor for the RSU client + +# Which icon file to use +Icon=runescape.png + +# Show terminal? +Terminal=false + +# Executable binary file +Exec=rsu-settings + +# Menu cathegory (GTK, Development, IDE, Office, Application, +# AudioVideo, Audio, Video, AudioVideoEditing, GNOME, Utility, +# TextEditor, Graphics, 2DGraphics, RasterGraphics, Emulator, System, +# Settings, DesktopSettings, Filesystem) +Categories=GNOME;GTK;Game; diff -Nru runescape-3.9.1/opt/runescape/templates/launchers/runescape-update-client.conf runescape-3.9.4~PPA1/opt/runescape/templates/launchers/runescape-update-client.conf --- runescape-3.9.1/opt/runescape/templates/launchers/runescape-update-client.conf 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/templates/launchers/runescape-update-client.conf 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,29 @@ +# HEADER! DO NOT REMOVE +[Desktop Entry] +Version=1.0 + +# Application = GUI application, Terminal = Terminal application +Type=Application + +# Name displayed in the menus and on shortcuts +Name=Runescape Client Updater +# Same as above but for KDE only +GenericName=Runescape Client Updater + +# A hint about what the application is +Comment=Update the runescape client + +# Which icon file to use +Icon=update-runescape.png + +# Show terminal? +Terminal=false + +# Executable binary file +Exec=xterm -e \"update-runescape-client\" + +# Menu cathegory (GTK, Development, IDE, Office, Application, +# AudioVideo, Audio, Video, AudioVideoEditing, GNOME, Utility, +# TextEditor, Graphics, 2DGraphics, RasterGraphics, Emulator, System, +# Settings, DesktopSettings, Filesystem) +Categories=GNOME;GTK;Game; diff -Nru runescape-3.9.1/opt/runescape/templates/launchers/runescape.conf runescape-3.9.4~PPA1/opt/runescape/templates/launchers/runescape.conf --- runescape-3.9.1/opt/runescape/templates/launchers/runescape.conf 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/templates/launchers/runescape.conf 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,42 @@ +# HEADER! DO NOT REMOVE +[Desktop Entry] +Version=1.0 + +# Application = GUI application, Terminal = Terminal application +Type=Application + +# Name displayed in the menus and on shortcuts +Name=RuneScape +# Same as above but for KDE only +GenericName=RuneScape + +# A hint about what the application is +Comment=The RuneScape Unix Client + +# Which icon file to use +Icon=runescape.png + +# Show terminal? +Terminal=false + +# Executable binary file +Exec=runescape + +# Menu cathegory (GTK, Development, IDE, Office, Application, +# AudioVideo, Audio, Video, AudioVideoEditing, GNOME, Utility, +# TextEditor, Graphics, 2DGraphics, RasterGraphics, Emulator, System, +# Settings, DesktopSettings, Filesystem) +Categories=GNOME;GTK;Game; + +# Unity only support +X-Ayatana-Desktop-Shortcuts=LaunchBeta;UpdateClient; + +[UpdateClient Shortcut Group] +Name=Update Runescape Client +Exec=xterm -e "update-runescape-client" +#TargetEnvironment=Unity + +[LaunchBeta Shortcut Group] +Name=Launch Runescape EOC BETA +Exec=runescape --prmfile=runescape-beta.prm +#TargetEnvironment=Unity diff -Nru runescape-3.9.1/opt/runescape/templates/launchers/template.txt runescape-3.9.4~PPA1/opt/runescape/templates/launchers/template.txt --- runescape-3.9.1/opt/runescape/templates/launchers/template.txt 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/templates/launchers/template.txt 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,29 @@ +# HEADER! DO NOT REMOVE +[Desktop Entry] +Version=1.0 + +# Application = GUI application, Terminal = Terminal application +Type=Application + +# Name displayed in the menus and on shortcuts +Name=My Simple LogBook +# Same as above but for KDE only +GenericName=My Simple LogBook + +# A hint about what the application is +Comment=A simple but flexible logbook or diary + +# Which icon file to use +Icon=mslb.png + +# Show terminal? +Terminal=false + +# Executable binary file +Exec=mslb + +# Menu cathegory (GTK, Development, IDE, Office, Application, +# AudioVideo, Audio, Video, AudioVideoEditing, GNOME, Utility, +# TextEditor, Graphics, 2DGraphics, RasterGraphics, Emulator, System, +# Settings, DesktopSettings, Filesystem) +Categories=Office; diff -Nru runescape-3.9.1/opt/runescape/templates/packaging/usr/games/rsu-settings runescape-3.9.4~PPA1/opt/runescape/templates/packaging/usr/games/rsu-settings --- runescape-3.9.1/opt/runescape/templates/packaging/usr/games/rsu-settings 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/templates/packaging/usr/games/rsu-settings 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,2 @@ +#!/bin/sh +/opt/runescape/rsu-settings $@ diff -Nru runescape-3.9.1/opt/runescape/templates/packaging/usr/games/runescape runescape-3.9.4~PPA1/opt/runescape/templates/packaging/usr/games/runescape --- runescape-3.9.1/opt/runescape/templates/packaging/usr/games/runescape 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/templates/packaging/usr/games/runescape 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,2 @@ +#!/bin/sh +/opt/runescape/runescape $@ diff -Nru runescape-3.9.1/opt/runescape/templates/packaging/usr/games/update-runescape-client runescape-3.9.4~PPA1/opt/runescape/templates/packaging/usr/games/update-runescape-client --- runescape-3.9.1/opt/runescape/templates/packaging/usr/games/update-runescape-client 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/templates/packaging/usr/games/update-runescape-client 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,2 @@ +#!/bin/sh +/opt/runescape/update-runescape-client $@ diff -Nru runescape-3.9.1/opt/runescape/templates/packaging/usr/share/applications/rsu-settings.desktop runescape-3.9.4~PPA1/opt/runescape/templates/packaging/usr/share/applications/rsu-settings.desktop --- runescape-3.9.1/opt/runescape/templates/packaging/usr/share/applications/rsu-settings.desktop 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/templates/packaging/usr/share/applications/rsu-settings.desktop 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,30 @@ +# HEADER! DO NOT REMOVE +[Desktop Entry] +Version=1.0 + +# Application = GUI application, Terminal = Terminal application +Type=Application + +# Name displayed in the menus and on shortcuts +Name=RuneScape Client Settings +# Same as above but for KDE only +GenericName=RuneScape Client Settings + +# A hint about what the application is +Comment=A graphical settings editor for the RSU client + +# Which icon file to use +Icon=/opt/runescape/share/runescape.png + +# Show terminal? +Terminal=false + +# Executable binary file +Exec=rsu-settings + +# Menu cathegory (GTK, Development, IDE, Office, Application, +# AudioVideo, Audio, Video, AudioVideoEditing, GNOME, Utility, +# TextEditor, Graphics, 2DGraphics, RasterGraphics, Emulator, System, +# Settings, DesktopSettings, Filesystem) +Categories=GNOME;GTK;Game; +Name[en_US]=rsu-settings.desktop diff -Nru runescape-3.9.1/opt/runescape/templates/packaging/usr/share/applications/runescape-update-client.desktop runescape-3.9.4~PPA1/opt/runescape/templates/packaging/usr/share/applications/runescape-update-client.desktop --- runescape-3.9.1/opt/runescape/templates/packaging/usr/share/applications/runescape-update-client.desktop 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/templates/packaging/usr/share/applications/runescape-update-client.desktop 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,30 @@ +# HEADER! DO NOT REMOVE +[Desktop Entry] +Version=1.0 + +# Application = GUI application, Terminal = Terminal application +Type=Application + +# Name displayed in the menus and on shortcuts +Name=Runescape Client Updater +# Same as above but for KDE only +GenericName=Runescape Client Updater + +# A hint about what the application is +Comment=Update the runescape client + +# Which icon file to use +Icon=/opt/runescape/share/update-runescape.png + +# Show terminal? +Terminal=false + +# Executable binary file +Exec=/opt/runescape/update-runescape-client + +# Menu cathegory (GTK, Development, IDE, Office, Application, +# AudioVideo, Audio, Video, AudioVideoEditing, GNOME, Utility, +# TextEditor, Graphics, 2DGraphics, RasterGraphics, Emulator, System, +# Settings, DesktopSettings, Filesystem) +Categories=GNOME;GTK;Game; + diff -Nru runescape-3.9.1/opt/runescape/templates/packaging/usr/share/applications/runescape.desktop runescape-3.9.4~PPA1/opt/runescape/templates/packaging/usr/share/applications/runescape.desktop --- runescape-3.9.1/opt/runescape/templates/packaging/usr/share/applications/runescape.desktop 1970-01-01 00:00:00.000000000 +0000 +++ runescape-3.9.4~PPA1/opt/runescape/templates/packaging/usr/share/applications/runescape.desktop 2012-10-15 09:36:56.000000000 +0000 @@ -0,0 +1,38 @@ +# HEADER! DO NOT REMOVE +[Desktop Entry] +Version=1.0 + +# Application = GUI application, Terminal = Terminal application +Type=Application + +# Name displayed in the menus and on shortcuts +Name=RuneScape +# Same as above but for KDE only +GenericName=RuneScape + +# A hint about what the application is +Comment=The RuneScape Unix Client + +# Which icon file to use +Icon=/opt/runescape/share/runescape.png + +# Show terminal? +Terminal=false + +# Executable binary file +Exec=/opt/runescape/runescape + +# Menu cathegory (GTK, Development, IDE, Office, Application, +# AudioVideo, Audio, Video, AudioVideoEditing, GNOME, Utility, +# TextEditor, Graphics, 2DGraphics, RasterGraphics, Emulator, System, +# Settings, DesktopSettings, Filesystem) +Categories=GNOME;GTK;Game; + +# Unity only support +X-Ayatana-Desktop-Shortcuts=UpdateClient; + +[UpdateClient Shortcut Group] +Name=Update Runescape Client +Exec=xterm -e "/opt/runescape/update-runescape-client" +#TargetEnvironment=Unity + diff -Nru runescape-3.9.1/usr/share/applications/runescape-beta.desktop runescape-3.9.4~PPA1/usr/share/applications/runescape-beta.desktop --- runescape-3.9.1/usr/share/applications/runescape-beta.desktop 2012-07-13 18:35:15.000000000 +0000 +++ runescape-3.9.4~PPA1/usr/share/applications/runescape-beta.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -# HEADER! DO NOT REMOVE - -[Desktop Entry] -Version=1.0 - -# Application = GUI application, Terminal = Terminal application -Type=Application - -# Name displayed in the menus and on shortcuts -Name=RuneScape EoC beta -# Same as above but for KDE only -GenericName=RuneScape EoC beta - -# A hint about what the application is -Comment=The RuneScape Unix Client - -# Which icon file to use -Icon=/opt/runescape/share/runescape.png - -# Show terminal? -Terminal=false - -# Executable binary file -Exec=/opt/runescape/runescape --prmfile=runescape-beta.prm - -# Menu cathegory (GTK, Development, IDE, Office, Application, -# AudioVideo, Audio, Video, AudioVideoEditing, GNOME, Utility, -# TextEditor, Graphics, 2DGraphics, RasterGraphics, Emulator, System, -# Settings, DesktopSettings, Filesystem) -Categories=GNOME;GTK;Game; - -# Unity only support -X-Ayatana-Desktop-Shortcuts=UpdateClient; - -[UpdateClient Shortcut Group] -Name=Update Runescape Client -Exec=xterm -e "/opt/runescape/update-runescape-client" -#TargetEnvironment=Unity -