Thread: Nxt cache & legacy source code

Results 1 to 7 of 7
  1. #1 Nxt cache & legacy source code 
    Registered Member
    Join Date
    Jan 2017
    Posts
    3
    Thanks given
    0
    Thanks received
    1
    Rep Power
    0
    Hello everyone,
    Fairly new to the community I am *yoda voice*
    Although, new here I am well aged into communities such as GZP Gamerzneeds Ragezone etc, roughly since 1999/2000.
    cchp/Redarmor0/Keezakoni/Shadow 3vil(Shadow 3vil is one of my partners for collaborations).


    Ok so lets jump into it:
    Currently i am working on reverse engineering the NXT client for customization and to be able to run the 876 servers with ample graphics.

    Legacy Source Code: you will need winrar(easiest and free program to unpack .tar.gz files)
    Unpacked this runs roughly, 350MB and contains 32k files.

    Runescape is made under the GNU license, if you do not know what that is i suggest you look it up.
    The fact it is made under the GNU license, gives us the ability to do what we want freely with the files.

    The NXT client is also made under the same license, once i get my hands on the source code i will distribute it to a select few for collaboration and customization before release.
    This will require heavy coding and months at minimum so please don't expect an immediate release of the NXT source code.


    To use the source code you will need a c++ compiler, i suggest BloodShed Dev C++, the installation is much smaller than that of Microsoft Visual Studio. It is also free.

    I am passing this along for those of you who are adept coders looking to get a much more custom client and options for your servers.
    We have releases like this for WoW Gunz and many other games, however those are prepped much more for customization.

    This is the original source code of the Legacy Client, and includes the source code of the JagexLauncher.

    JagexLauncher is key to the NXT client, essentially a java protocol points your web link to redirect to your installed location of the NXT.

    Jagex Launcher Source Code: https://mega.nz/#!S9x2xRZB!lb9nd3_BV...dFSy42pRlvTjcY


    NXT Cache:
    https://mega.nz/#!exxnRLKI!J1OLr0Xx_...I-7AQn5MYbTj6A


    Introduction
    This release

    contains build instructions for the OpenJDK. Building the source code for the OpenJDK requires a certain degree of technical expertise.
    Windows Basic System Setup: (Links included to install required programs in Readme under /openjdk/README-builds.html)
    [SPOIL]
    Basic Windows System Setup
    i586 only: The minimum recommended hardware for building the 32-bit or X86 Windows version is an Pentium class processor or better, at least 512 MB of RAM, and approximately 600 MB of free disk space. NOTE: The Windows build machines need to use the file system NTFS. Build machines formatted to FAT32 will not work because FAT32 doesn't support case-sensitivity in file names.
    X64 only: The minimum recommended hardware for building the Windows X64 version is an AMD Opteron class processor, at least 1 GB of RAM, and approximately 10 GB of free disk space.
    Windows Paths
    Windows: Note that GNU make is a historic utility and is based very heavily on shell scripting, so it does not tolerate the Windows habit of having spaces in pathnames or the use of the \characters in pathnames. Luckily on most Windows systems, you can use /instead of \, and there is always a 'short' pathname without spaces for any path that contains spaces. Unfortunately, this short pathname can be somewhat dynamic and the formula is difficult to explain. You can use cygpath utility to map pathnames with spaces or the \character into the C:/ style of pathname (called 'mixed'), e.g. cygpath -s -m "path".
    The makefiles will try to translate any pathnames supplied to it into the C:/ style automatically.
    Note that use of CYGWIN creates a unique problem with regards to setting PATH. Normally on Windows the PATH variable contains directories separated with the ";" character (Solaris and Linux uses ":"). With CYGWIN, it uses ":", but that means that paths like "C:/path" cannot be placed in the CYGWIN version of PATH and instead CYGWIN uses something like /cygdrive/c/path which CYGWIN understands, but only CYGWIN understands. So be careful with paths on Windows.
    Basic Windows Check List
    Install the CYGWIN product.
    Install the Bootstrap JDK, set ALT_BOOTDIR.
    Install the Binary Plugs, set ALT_BINARY_PLUGS_PATH..
    Optional Import JDK, set ALT_JDK_IMPORT_PATH.
    Install the Microsoft Visual Studio Compilers (32-bit).
    Install the Microsoft Platform SDK.
    Setup all environment variables for compilers (see compilers).
    Install Microsoft DirectX SDK.
    Install Ant, make sure it is in your PATH and set ANT_HOME.
    [/SPOIL]



    GNU Licesne V2 (as required per Free Software Foundation)
    [SPOIL]
    Jagex Launcher source package README
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Copyright 2010 Jagex Limited.

    This file is part of JagexLauncher.

    JagexLauncher is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License version 2 only, as
    published by the Free Software Foundation.

    JagexLauncher is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
    version 2 for more details (a copy is included in the LICENSE file that
    accompanied this code).

    You should have received a copy of the GNU General Public License version
    2 along with this work; if not, see <http://www.gnu.org/licenses/>

    This package contains:

    The Jagex-modified OpenJDK source code (openjdk subfolder; see JagexChangeLog for details of files changed)
    The JagexLauncher program (JagexLauncher subfolder)
    [/SPOIL]

    JagexLauncher.cpp
    [SPOIL]
    /*
    * Copyright 2010 Jagex Limited.
    *
    * This file is part of JagexLauncher.
    *
    * JagexLauncher is free software; you can redistribute it and/or modify it
    * under the terms of the GNU General Public License version 2 only, as
    * published by the Free Software Foundation.
    *
    * JagexLauncher is distributed in the hope that it will be useful, but WITHOUT
    * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
    * version 2 for more details (a copy is included in the LICENSE file that
    * accompanied this code).
    *
    * You should have received a copy of the GNU General Public License version
    * 2 along with this work; if not, see <http://www.gnu.org/licenses/>
    *
    */

    #include "stdafx.h"
    #include <iostream>
    using std::cout;
    using std::endl;
    #define MAX_LINE_LENGTH 65536

    #ifndef UNICODE
    #error "Only unicode mode currently supported"
    #endif

    int mainprogram(char *game, char *prmfile, char *uri)
    {
    FILE *f;
    char **paramlines;
    int l_paramlines=0;
    if (fopen_s(&f, prmfile, "r") != 0) {
    MessageBox(NULL, TEXT("Unable to load parameter file. Please reinstall the program."), TEXT("Error"), MB_OK);
    return 0;
    } else {
    char line[MAX_LINE_LENGTH];
    while (fgets(line, MAX_LINE_LENGTH, f)!=NULL) l_paramlines++;
    paramlines=new char *[l_paramlines];
    fseek(f, 0, SEEK_SET);
    int i=0;
    while (fgets(line, MAX_LINE_LENGTH, f)!=NULL) {
    int len=strlen(line);
    for (int j=len-1; j>=0; j--) {
    if (line[j]!='\n' && line[j]!='\r') break;
    line[j]=0;
    }
    paramlines[i]=new char[len+1];
    strcpy_s(paramlines[i], len+1, line);
    i++;
    }

    }
    if (l_paramlines<1) {
    MessageBox(NULL, TEXT("Empty parameter file. Please reinstall the program."), TEXT("Error"), MB_OK);
    return 0;
    }

    JavaVM *jvm;
    JNIEnv *env;
    LoadLibrary(TEXT("jvm.dll"));
    JavaVMInitArgs vm_args;
    vm_args.version=JNI_VERSION_1_6;
    if (uri != NULL)
    {
    vm_args.nOptions=l_paramlines;
    }
    else
    {
    vm_args.nOptions=l_paramlines-1;
    }
    vm_args.options=new JavaVMOption[vm_args.nOptions];
    int index=0;
    char* buffer;
    if (uri != NULL)
    {
    int bufferLen=512;
    buffer = new char[bufferLen];
    strcpy_s(buffer, bufferLen, "-Dcom.jagex.configuri=");
    strcat_s(buffer, bufferLen, uri);
    vm_args.options[index++].optionString = buffer;
    }
    for (int i=0; i<l_paramlines-1; i++) vm_args.options[index++].optionString=paramlines[i];
    vm_args.ignoreUnrecognized=false;
    jint result=JNI_CreateJavaVM(&jvm, reinterpret_cast<void **>(&env), &vm_args);
    if (result!=JNI_OK) return 0;
    jclass cls=env->FindClass(paramlines[l_paramlines-1]);
    if (cls!=NULL) {
    jmethodID mid=env->GetStaticMethodID(cls, "main", "([Ljava/lang/StringV");
    jobjectArray args=env->NewObjectArray(1, env->FindClass("java/lang/String"), NULL);
    env->SetObjectArrayElement(args,0,env->NewStringUTF(game));
    env->CallStaticVoidMethod(cls, mid, args);
    }

    jvm->DestroyJavaVM();
    return 0;
    }

    char* convertWideString(TCHAR *input)
    {
    std::wstring wide(input);
    int length = WideCharToMultiByte(CP_ACP, 0, &wide[0], (int)wide.size(), NULL, 0, NULL, NULL);
    char* result=new char[length+1];
    WideCharToMultiByte(CP_ACP, 0, &wide[0], (int)wide.size(), result, length, NULL, NULL);
    result[length]=0;
    return result;
    }

    int runMain(int argc, TCHAR **argv)
    {
    if (argc<2) return 0;
    std::wstring path(argv[0]);
    size_t endDir = path.find_last_of(L"/\\");
    std::wstring dir = path.substr(0, endDir);
    SetCurrentDirectoryW(dir.c_str());

    char *game = convertWideString(argv[1]);
    char *uri = NULL;
    char *prmFile = NULL;
    if (argc >= 3)
    {
    prmFile = convertWideString(argv[2]);

    if (argc >= 4)
    {
    uri = convertWideString(argv[3]);
    }
    }
    if (prmFile == NULL)
    {
    prmFile = new char[512];
    sprintf_s(prmFile, 512, "../%s/%s.prm", game, game);
    }
    int ret=mainprogram(game, prmFile, uri);
    return ret;
    }

    #ifdef _CONSOLE
    int _tmain(int argc, TCHAR **argv)
    {
    return runMain(argc, argv);
    }
    #else
    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
    {
    LPWSTR* szArgList;
    int argCount;
    szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount);
    return runMain(argCount, szArgList);
    }
    #endif
    [/SPOIL]







    Some NXT Configuration Snippets:

    [SPOIL]
    title=RuneScape
    adverturl=http://www.runescape.com/k=5/bare_advert.ws
    codebase=http://world4.runescape.com/k=5/
    storebase=0
    initial_jar=gamepackkqmqF2PIyXKq4EfGlieMJRVcbNrpDc VJ_4892189.jar
    initial_class=Rs2Applet.class
    viewerversion=124
    win_sub_version=1
    mac_sub_version=2
    other_sub_version=2
    browsercontrol_win_x86_jar=browsercontrol_0_-1928975093.jar
    browsercontrol_win_amd64_jar=browsercontrol_1_1674 545273.jar
    termsurl=http://www.jagex.com/k=5/g=runescape/terms/terms.ws
    privacyurl=http://www.jagex.com/k=5/g=runescape/privacy/privacy.ws
    download=1542028
    window_preferredwidth=1024
    window_preferredheight=768
    advert_height=96
    applet_minwidth=765
    applet_minheight=540
    applet_maxwidth=3840
    applet_maxheight=2160
    msg=lang0=English
    msg=lang1=Deutsch
    msg=lang2=Français
    msg=lang3=Português
    msg=err_verify_bc64=Unable to verify browsercontrol64
    msg=err_verify_bc=Unable to verify browsercontrol
    msg=err_load_bc=Unable to load browsercontrol
    msg=err_create_advertising=Unable to create advertising
    msg=err_create_target=Unable to create target applet
    msg=copy_paste_url=Please copy and paste the following URL into your web browser
    msg=new_version=Update available! You can now launch the client directly from the RuneScape website, and chat timestamps work properly.\nGet the new version here: http://www.runescape.com/k=5/download
    msg=new_version_linktext=Download Update
    msg=new_version_link=http://www.runescape.com/k=5/download
    msg=tandc=This game is copyright © 1999 - 2016 Jagex Ltd.\Use of this game is subject to our ["http://www.runescape.com/terms/terms.ws"Terms and Conditions] and ["http://www.runescape.com/privacy/privacy.ws"Privacy Policy].
    msg=options=Options
    msg=language=Language
    msg=changes_on_restart=Your changes will take effect when you next start this program.
    msg=loading_app_resources=Loading application resources
    msg=loading_app=Loading application
    msg=err_save_file=Error saving file
    msg=err_downloading=Error downloading
    msg=ok=OK
    msg=cancel=Cancel
    msg=message=Message
    msg=information=Information
    msg=err_get_file=Error getting file
    param=5=443
    param=38=http://world4.runescape.com/k=5
    param=27=kqmqF2PIyXKq4EfGlieMJRVcbNrpDcVJ
    param=26=
    param=4=content.runescape.com
    param=34=false
    param=48=false
    param=46=0
    param=51=0
    param=18=false
    param=44=43594
    param=49=false
    param=37=0
    param=24=http://world4.runescape.com/k=5
    param=13=false
    param=10=443
    param=1=43594
    param=40=.runescape.com
    param=19=http://services.runescape.com/m=gamelogspecs/k=5/clientstats?data=
    param=41=2213
    param=0=0jzcOPwJNrJu5*1PMFr1aQ
    param=15=2003058500
    param=45=0
    param=25=0
    param=14=halign=true|valign=true|image=rs_logo.gif ,0,-43|rotatingimage=rs3_loading_spinner.gif,0,47,9.6| progress=true,Verdana,13,0xFFFFFF,0,51
    param=33=
    param=8=0
    param=36=
    param=9=1200
    param=20=1257672688
    param=22=43594
    param=-1=pfoH93B4esYuhP4*WNK46w
    param=50=1756301975
    param=16=0
    param=42=1105
    param=11=0
    param=23=443
    param=12=80
    param=3=
    param=6=wwGlrZHF5gKN6D3mDdihco3oPeYN2KFybL9hUUFqOv k
    param=52=false
    param=31=0
    param=35=443
    param=28=true
    param=7=content.runescape.com
    param=29=4
    param=30=225
    param=21=false
    param=43=61D6D56A1634AC0A4E6E68F370B627D2FC66700A9 D044B62AA2E9470F54BEEEF47CAB38F6ACE0F64A9DFA3C356B EAE00
    param=17=true
    param=39=lobby6.runescape.com
    [/SPOIL]
    Last edited by cchp; 02-01-2017 at 08:08 AM. Reason: Attachments Dropped Off, wasn't logged in. Uploading to Mega right now.
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    SERGEANT OF THE MASTER SERGEANTS MOST IMPORTANT PERSON OF EXTREME SERGEANTS TO THE MAX!

    cube's Avatar
    Join Date
    Jun 2007
    Posts
    8,871
    Thanks given
    1,854
    Thanks received
    4,745
    Rep Power
    5000
    JagexLauncher (already open source) is licensed under GNU v2, not RuneScape, it also runs the Java client, not NXT.

    Aside from that I dont see anything else? Check out the section rules

    Attached image

    Reply With Quote  
     

  4. #3  
    Registered Member
    Join Date
    Jan 2017
    Posts
    3
    Thanks given
    0
    Thanks received
    1
    Rep Power
    0
    If you read under the edit, i was logged out on accident when writing the post. Which is why the files are not there, believe it or not JagexLauncher still "runs" the NXT client.

    You can't run the .exe without using the jagex launcher.

    I've actually already gotten into the network configurations for the NXT Client and will be testing which variations of server it will be compatible with.


    ################################################## ##########
    # Default Networking Configuration File
    #
    # This file may contain default values for the networking system properties.
    # These values are only used when the system properties are not specified
    # on the command line or set programatically.
    # For now, only the various proxy settings can be configured here.
    ################################################## ##########

    # Whether or not the DefaultProxySelector will default to System Proxy
    # settings when they do exist.
    # Set it to 'true' to enable this feature and check for platform
    # specific proxy settings
    # Note that the system properties that do explicitely set proxies
    # (like http.proxyHost) do take precedence over the system settings
    # even if java.net.useSystemProxies is set to true.

    java.net.useSystemProxies=false

    #------------------------------------------------------------------------
    # Proxy configuration for the various protocol handlers.
    # DO NOT uncomment these lines if you have set java.net.useSystemProxies
    # to true as the protocol specific properties will take precedence over
    # system settings.
    #------------------------------------------------------------------------

    # HTTP Proxy settings. proxyHost is the name of the proxy server
    # (e.g. proxy.mydomain.com), proxyPort is the port number to use (default
    # value is 80) and nonProxyHosts is a '|' separated list of hostnames which
    # should be accessed directly, ignoring the proxy server (default value is
    # localhost & 127.0.0.1).
    #
    # http.proxyHost=
    # http.proxyPort=80
    http.nonProxyHosts=localhost|127.*|[::1]
    #
    # HTTPS Proxy Settings. proxyHost is the name of the proxy server
    # (e.g. proxy.mydomain.com), proxyPort is the port number to use (default
    # value is 443). The HTTPS protocol handlers uses the http nonProxyHosts list.
    #
    # https.proxyHost=
    # https.proxyPort=443
    #
    # FTP Proxy settings. proxyHost is the name of the proxy server
    # (e.g. proxy.mydomain.com), proxyPort is the port number to use (default
    # value is 80) and nonProxyHosts is a '|' separated list of hostnames which
    # should be accessed directly, ignoring the proxy server (default value is
    # localhost & 127.0.0.1).
    #
    # ftp.proxyHost=
    # ftp.proxyPort=80
    ftp.nonProxyHosts=localhost|127.*|[::1]
    #
    # Gopher Proxy settings. proxyHost is the name of the proxy server
    # (e.g. proxy.mydomain.com), proxyPort is the port number to use (default
    # value is 80)
    #
    # gopher.proxyHost=
    # gopher.proxyPort=80
    #
    # Socks proxy settings. socksProxyHost is the name of the proxy server
    # (e.g. socks.domain.com), socksProxyPort is the port number to use
    # (default value is 1080)
    #
    # socksProxyHost=
    # socksProxyPort=1080
    #
    # HTTP Keep Alive settings. remainingData is the maximum amount of data
    # in kilobytes that will be cleaned off the underlying socket so that it
    # can be reused (default value is 512K), queuedConnections is the maximum
    # number of Keep Alive connections to be on the queue for clean up (default
    # value is 10).
    # http.KeepAlive.remainingData=512
    # http.KeepAlive.queuedConnections=10
    Reply With Quote  
     

  5. #4  
    Registered Member

    Join Date
    Dec 2009
    Posts
    774
    Thanks given
    367
    Thanks received
    455
    Rep Power
    927
    Thanks for the information!
    link removed
    Reply With Quote  
     

  6. #5  
    Registered Member

    Join Date
    Sep 2009
    Posts
    1,919
    Thanks given
    479
    Thanks received
    1,687
    Rep Power
    1262
    Quote Originally Posted by cchp View Post
    Hello everyone,
    Fairly new to the community I am *yoda voice*
    Although, new here I am well aged into communities such as GZP Gamerzneeds Ragezone etc, roughly since 1999/2000.
    cchp/Redarmor0/Keezakoni/Shadow 3vil(Shadow 3vil is one of my partners for collaborations).


    Ok so lets jump into it:
    Currently i am working on reverse engineering the NXT client for customization and to be able to run the 876 servers with ample graphics.

    Legacy Source Code: you will need winrar(easiest and free program to unpack .tar.gz files)
    Unpacked this runs roughly, 350MB and contains 32k files.

    Runescape is made under the GNU license, if you do not know what that is i suggest you look it up.
    The fact it is made under the GNU license, gives us the ability to do what we want freely with the files.

    The NXT client is also made under the same license, once i get my hands on the source code i will distribute it to a select few for collaboration and customization before release.
    This will require heavy coding and months at minimum so please don't expect an immediate release of the NXT source code.


    To use the source code you will need a c++ compiler, i suggest BloodShed Dev C++, the installation is much smaller than that of Microsoft Visual Studio. It is also free.

    I am passing this along for those of you who are adept coders looking to get a much more custom client and options for your servers.
    We have releases like this for WoW Gunz and many other games, however those are prepped much more for customization.

    This is the original source code of the Legacy Client, and includes the source code of the JagexLauncher.

    JagexLauncher is key to the NXT client, essentially a java protocol points your web link to redirect to your installed location of the NXT.

    Jagex Launcher Source Code: https://mega.nz/#!S9x2xRZB!lb9nd3_BV...dFSy42pRlvTjcY


    NXT Cache:
    https://mega.nz/#!exxnRLKI!J1OLr0Xx_...I-7AQn5MYbTj6A


    Introduction
    This release

    contains build instructions for the OpenJDK. Building the source code for the OpenJDK requires a certain degree of technical expertise.
    Windows Basic System Setup: (Links included to install required programs in Readme under /openjdk/README-builds.html)
    [SPOIL]
    Basic Windows System Setup
    i586 only: The minimum recommended hardware for building the 32-bit or X86 Windows version is an Pentium class processor or better, at least 512 MB of RAM, and approximately 600 MB of free disk space. NOTE: The Windows build machines need to use the file system NTFS. Build machines formatted to FAT32 will not work because FAT32 doesn't support case-sensitivity in file names.
    X64 only: The minimum recommended hardware for building the Windows X64 version is an AMD Opteron class processor, at least 1 GB of RAM, and approximately 10 GB of free disk space.
    Windows Paths
    Windows: Note that GNU make is a historic utility and is based very heavily on shell scripting, so it does not tolerate the Windows habit of having spaces in pathnames or the use of the \characters in pathnames. Luckily on most Windows systems, you can use /instead of \, and there is always a 'short' pathname without spaces for any path that contains spaces. Unfortunately, this short pathname can be somewhat dynamic and the formula is difficult to explain. You can use cygpath utility to map pathnames with spaces or the \character into the C:/ style of pathname (called 'mixed'), e.g. cygpath -s -m "path".
    The makefiles will try to translate any pathnames supplied to it into the C:/ style automatically.
    Note that use of CYGWIN creates a unique problem with regards to setting PATH. Normally on Windows the PATH variable contains directories separated with the ";" character (Solaris and Linux uses ":"). With CYGWIN, it uses ":", but that means that paths like "C:/path" cannot be placed in the CYGWIN version of PATH and instead CYGWIN uses something like /cygdrive/c/path which CYGWIN understands, but only CYGWIN understands. So be careful with paths on Windows.
    Basic Windows Check List
    Install the CYGWIN product.
    Install the Bootstrap JDK, set ALT_BOOTDIR.
    Install the Binary Plugs, set ALT_BINARY_PLUGS_PATH..
    Optional Import JDK, set ALT_JDK_IMPORT_PATH.
    Install the Microsoft Visual Studio Compilers (32-bit).
    Install the Microsoft Platform SDK.
    Setup all environment variables for compilers (see compilers).
    Install Microsoft DirectX SDK.
    Install Ant, make sure it is in your PATH and set ANT_HOME.
    [/SPOIL]



    GNU Licesne V2 (as required per Free Software Foundation)
    [SPOIL]
    Jagex Launcher source package README
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Copyright 2010 Jagex Limited.

    This file is part of JagexLauncher.

    JagexLauncher is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License version 2 only, as
    published by the Free Software Foundation.

    JagexLauncher is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
    version 2 for more details (a copy is included in the LICENSE file that
    accompanied this code).

    You should have received a copy of the GNU General Public License version
    2 along with this work; if not, see <http://www.gnu.org/licenses/>

    This package contains:

    The Jagex-modified OpenJDK source code (openjdk subfolder; see JagexChangeLog for details of files changed)
    The JagexLauncher program (JagexLauncher subfolder)
    [/SPOIL]

    JagexLauncher.cpp
    [SPOIL]
    /*
    * Copyright 2010 Jagex Limited.
    *
    * This file is part of JagexLauncher.
    *
    * JagexLauncher is free software; you can redistribute it and/or modify it
    * under the terms of the GNU General Public License version 2 only, as
    * published by the Free Software Foundation.
    *
    * JagexLauncher is distributed in the hope that it will be useful, but WITHOUT
    * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
    * version 2 for more details (a copy is included in the LICENSE file that
    * accompanied this code).
    *
    * You should have received a copy of the GNU General Public License version
    * 2 along with this work; if not, see <http://www.gnu.org/licenses/>
    *
    */

    #include "stdafx.h"
    #include <iostream>
    using std::cout;
    using std::endl;
    #define MAX_LINE_LENGTH 65536

    #ifndef UNICODE
    #error "Only unicode mode currently supported"
    #endif

    int mainprogram(char *game, char *prmfile, char *uri)
    {
    FILE *f;
    char **paramlines;
    int l_paramlines=0;
    if (fopen_s(&f, prmfile, "r") != 0) {
    MessageBox(NULL, TEXT("Unable to load parameter file. Please reinstall the program."), TEXT("Error"), MB_OK);
    return 0;
    } else {
    char line[MAX_LINE_LENGTH];
    while (fgets(line, MAX_LINE_LENGTH, f)!=NULL) l_paramlines++;
    paramlines=new char *[l_paramlines];
    fseek(f, 0, SEEK_SET);
    int i=0;
    while (fgets(line, MAX_LINE_LENGTH, f)!=NULL) {
    int len=strlen(line);
    for (int j=len-1; j>=0; j--) {
    if (line[j]!='\n' && line[j]!='\r') break;
    line[j]=0;
    }
    paramlines[i]=new char[len+1];
    strcpy_s(paramlines[i], len+1, line);
    i++;
    }

    }
    if (l_paramlines<1) {
    MessageBox(NULL, TEXT("Empty parameter file. Please reinstall the program."), TEXT("Error"), MB_OK);
    return 0;
    }

    JavaVM *jvm;
    JNIEnv *env;
    LoadLibrary(TEXT("jvm.dll"));
    JavaVMInitArgs vm_args;
    vm_args.version=JNI_VERSION_1_6;
    if (uri != NULL)
    {
    vm_args.nOptions=l_paramlines;
    }
    else
    {
    vm_args.nOptions=l_paramlines-1;
    }
    vm_args.options=new JavaVMOption[vm_args.nOptions];
    int index=0;
    char* buffer;
    if (uri != NULL)
    {
    int bufferLen=512;
    buffer = new char[bufferLen];
    strcpy_s(buffer, bufferLen, "-Dcom.jagex.configuri=");
    strcat_s(buffer, bufferLen, uri);
    vm_args.options[index++].optionString = buffer;
    }
    for (int i=0; i<l_paramlines-1; i++) vm_args.options[index++].optionString=paramlines[i];
    vm_args.ignoreUnrecognized=false;
    jint result=JNI_CreateJavaVM(&jvm, reinterpret_cast<void **>(&env), &vm_args);
    if (result!=JNI_OK) return 0;
    jclass cls=env->FindClass(paramlines[l_paramlines-1]);
    if (cls!=NULL) {
    jmethodID mid=env->GetStaticMethodID(cls, "main", "([Ljava/lang/StringV");
    jobjectArray args=env->NewObjectArray(1, env->FindClass("java/lang/String"), NULL);
    env->SetObjectArrayElement(args,0,env->NewStringUTF(game));
    env->CallStaticVoidMethod(cls, mid, args);
    }

    jvm->DestroyJavaVM();
    return 0;
    }

    char* convertWideString(TCHAR *input)
    {
    std::wstring wide(input);
    int length = WideCharToMultiByte(CP_ACP, 0, &wide[0], (int)wide.size(), NULL, 0, NULL, NULL);
    char* result=new char[length+1];
    WideCharToMultiByte(CP_ACP, 0, &wide[0], (int)wide.size(), result, length, NULL, NULL);
    result[length]=0;
    return result;
    }

    int runMain(int argc, TCHAR **argv)
    {
    if (argc<2) return 0;
    std::wstring path(argv[0]);
    size_t endDir = path.find_last_of(L"/\\");
    std::wstring dir = path.substr(0, endDir);
    SetCurrentDirectoryW(dir.c_str());

    char *game = convertWideString(argv[1]);
    char *uri = NULL;
    char *prmFile = NULL;
    if (argc >= 3)
    {
    prmFile = convertWideString(argv[2]);

    if (argc >= 4)
    {
    uri = convertWideString(argv[3]);
    }
    }
    if (prmFile == NULL)
    {
    prmFile = new char[512];
    sprintf_s(prmFile, 512, "../%s/%s.prm", game, game);
    }
    int ret=mainprogram(game, prmFile, uri);
    return ret;
    }

    #ifdef _CONSOLE
    int _tmain(int argc, TCHAR **argv)
    {
    return runMain(argc, argv);
    }
    #else
    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
    {
    LPWSTR* szArgList;
    int argCount;
    szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount);
    return runMain(argCount, szArgList);
    }
    #endif
    [/SPOIL]







    Some NXT Configuration Snippets:

    [SPOIL]
    title=RuneScape
    adverturl=http://www.runescape.com/k=5/bare_advert.ws
    codebase=http://world4.runescape.com/k=5/
    storebase=0
    initial_jar=gamepackkqmqF2PIyXKq4EfGlieMJRVcbNrpDc VJ_4892189.jar
    initial_class=Rs2Applet.class
    viewerversion=124
    win_sub_version=1
    mac_sub_version=2
    other_sub_version=2
    browsercontrol_win_x86_jar=browsercontrol_0_-1928975093.jar
    browsercontrol_win_amd64_jar=browsercontrol_1_1674 545273.jar
    termsurl=http://www.jagex.com/k=5/g=runescape/terms/terms.ws
    privacyurl=http://www.jagex.com/k=5/g=runescape/privacy/privacy.ws
    download=1542028
    window_preferredwidth=1024
    window_preferredheight=768
    advert_height=96
    applet_minwidth=765
    applet_minheight=540
    applet_maxwidth=3840
    applet_maxheight=2160
    msg=lang0=English
    msg=lang1=Deutsch
    msg=lang2=Français
    msg=lang3=Português
    msg=err_verify_bc64=Unable to verify browsercontrol64
    msg=err_verify_bc=Unable to verify browsercontrol
    msg=err_load_bc=Unable to load browsercontrol
    msg=err_create_advertising=Unable to create advertising
    msg=err_create_target=Unable to create target applet
    msg=copy_paste_url=Please copy and paste the following URL into your web browser
    msg=new_version=Update available! You can now launch the client directly from the RuneScape website, and chat timestamps work properly.\nGet the new version here: http://www.runescape.com/k=5/download
    msg=new_version_linktext=Download Update
    msg=new_version_link=http://www.runescape.com/k=5/download
    msg=tandc=This game is copyright © 1999 - 2016 Jagex Ltd.\Use of this game is subject to our ["http://www.runescape.com/terms/terms.ws"Terms and Conditions] and ["http://www.runescape.com/privacy/privacy.ws"Privacy Policy].
    msg=options=Options
    msg=language=Language
    msg=changes_on_restart=Your changes will take effect when you next start this program.
    msg=loading_app_resources=Loading application resources
    msg=loading_app=Loading application
    msg=err_save_file=Error saving file
    msg=err_downloading=Error downloading
    msg=ok=OK
    msg=cancel=Cancel
    msg=message=Message
    msg=information=Information
    msg=err_get_file=Error getting file
    param=5=443
    param=38=http://world4.runescape.com/k=5
    param=27=kqmqF2PIyXKq4EfGlieMJRVcbNrpDcVJ
    param=26=
    param=4=content.runescape.com
    param=34=false
    param=48=false
    param=46=0
    param=51=0
    param=18=false
    param=44=43594
    param=49=false
    param=37=0
    param=24=http://world4.runescape.com/k=5
    param=13=false
    param=10=443
    param=1=43594
    param=40=.runescape.com
    param=19=http://services.runescape.com/m=gamelogspecs/k=5/clientstats?data=
    param=41=2213
    param=0=0jzcOPwJNrJu5*1PMFr1aQ
    param=15=2003058500
    param=45=0
    param=25=0
    param=14=halign=true|valign=true|image=rs_logo.gif ,0,-43|rotatingimage=rs3_loading_spinner.gif,0,47,9.6| progress=true,Verdana,13,0xFFFFFF,0,51
    param=33=
    param=8=0
    param=36=
    param=9=1200
    param=20=1257672688
    param=22=43594
    param=-1=pfoH93B4esYuhP4*WNK46w
    param=50=1756301975
    param=16=0
    param=42=1105
    param=11=0
    param=23=443
    param=12=80
    param=3=
    param=6=wwGlrZHF5gKN6D3mDdihco3oPeYN2KFybL9hUUFqOv k
    param=52=false
    param=31=0
    param=35=443
    param=28=true
    param=7=content.runescape.com
    param=29=4
    param=30=225
    param=21=false
    param=43=61D6D56A1634AC0A4E6E68F370B627D2FC66700A9 D044B62AA2E9470F54BEEEF47CAB38F6ACE0F64A9DFA3C356B EAE00
    param=17=true
    param=39=lobby6.runescape.com
    [/SPOIL]
    Why don't you go back to where you came from with your JagexLauncher.cpp because if you were at least the so called 'adept coder' yourself, you would notice that all it does is create java virtual machine for the java client.
    Cheers. (And best regards to Jedi)
    Reply With Quote  
     

  7. #6  
    Est. RS2005/PS2007

    Pertinax's Avatar
    Join Date
    Jan 2015
    Age
    28
    Posts
    145
    Thanks given
    235
    Thanks received
    76
    Rep Power
    986
    Quote Originally Posted by Cjay0091 View Post
    Why don't you go back to where you came from with your JagexLauncher.cpp because if you were at least the so called 'adept coder' yourself, you would notice that all it does is create java virtual machine for the java client.
    Cheers. (And best regards to Jedi)
    Nice bait. As matter of fact, I wouldn't be surprised if both you and mgi125 were behind the troll account used to author this forum thread.

    P.S.: I'd never befriend someone this imbecilic.
    Spoiler for ScapeRune's definition of success:
    Attached image
    Quote Originally Posted by Kool aid boy View Post
    I went on to give it a try but i saw it was dead af so i left. Is there ever peak time?

    Says like 7.5k accs registered on forums but only 2 people on?


    Reply With Quote  
     

  8. #7  
    WVWVWVWVWVWVWVW

    _jordan's Avatar
    Join Date
    Nov 2012
    Posts
    3,046
    Thanks given
    111
    Thanks received
    1,848
    Rep Power
    5000
    Quote Originally Posted by Cjay0091 View Post
    Why don't you go back to where you came from with your JagexLauncher.cpp because if you were at least the so called 'adept coder' yourself, you would notice that all it does is create java virtual machine for the java client.
    Cheers. (And best regards to Jedi)
    Quote Originally Posted by Jedi View Post
    Nice bait. As matter of fact, I wouldn't be surprised if both you and mgi125 were behind the troll account used to author this forum thread.

    P.S.: I'd never befriend someone this imbecilic.
    why would anyone take credit for this, this thread is actually useless...
    Attached image
    Attached image
    Reply With Quote  
     

  9. Thankful users:



Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Tom's cache suite source code
    By thim slug in forum Requests
    Replies: 3
    Last Post: 06-24-2013, 12:23 AM
  2. [New-Release] WebClient 377 - Source Code
    By ThuGie in forum Downloads
    Replies: 36
    Last Post: 01-25-2009, 09:42 AM
  3. Moparscape v3 SOURCE CODE :O[Almost finshed]
    By arberb in forum Downloads
    Replies: 13
    Last Post: 12-24-2007, 06:48 AM
  4. Replies: 3
    Last Post: 09-10-2007, 07:07 AM
  5. [RELEASE] WebClient-Source Code
    By ThuGie in forum Requests
    Replies: 9
    Last Post: 07-29-2007, 08:17 PM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •