Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
fragmental committed Aug 23, 2013
0 parents commit 0338512
Show file tree
Hide file tree
Showing 11 changed files with 275 additions and 0 deletions.
Binary file added 128px icon.ico
Binary file not shown.
Binary file added HabitRPG Local Server.ico
Binary file not shown.
2 changes: 2 additions & 0 deletions HabitRPG_Local on the Web.url
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[InternetShortcut]
URL=http://community.habitrpg.com/content/habitrpg-local-unofficial
132 changes: 132 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
README


HabitRPG-Local 0.2.1
--------------------

About:

This is an unofficial package of habitrpg's server/client.

NOTICE: This contains a local server, that DOES NOT sync with the remote server at habitrpg.com. You cannot log-in with facebook or your habitrpg.com username. You will have to create new users, and all of your data will be stored in your local database in the "c:\hrpgl\habitdb" folder.

(If you chose to install HabitRPG-Local to any folder besides "c:\hrpgl", then substitue your installation folder for "c:\hrpgl" in this document.)


Requirements:

-Microsoft Windows (Only Windows XP and Windows 7 have been tested.)
-Aproximately 600MB of hard drive space.


To Install:

Run the HabitRPGSetup021.exe file. There are instructions in the installation. They will say, "READ THIS BEFORE INSTALLING!!!"


To Use the Server and Client:


Server:

(Note: When you finish installation, there is a checkbox option to run the server. If the two cmd windows are open, you do not need to run them again. If they are functioning properly, you can skip to "Client:")
Run "HabitRPG-Local Server" from the "HabitRPG-Local" folder in your start menu, or from the desktop. Two black command prompt windows called "mongodb.cmd" and "server.cmd" will open. On first run, some windows may pop up saying that some programs are requesting access to the network. Accept the requests. Server.cmd may take some time to load, and may stay black while it's loading.

If mongodb.cmd and server.cmd are successful, the server.cmd window should say that socket.io started, followed by 4 lines of text about expressions. You may minimize these windows, if you like, but they must stay open for the server and client to work.


Client:

Once the server is running you can then open the client from the start menu(or desktop) by running "HabitRPG-Local Client",or by entering "localhost:3000" in your web browser's address bar.

NOTICE: The mongodb.cmd and server.cmd windows must be open for the server and client to work. I don't know how to hide them or run them in background, so you're stuck with them, for now. When you are done with the server/client, you may close them, but you will need to open them again with the "HabitRPG-local Server" link before you can access the HabitRPG-Local server/client again.


Start with Windows:

If you would like the HabitRPG-Local Server to start with windows, you can copy the HabitRPG-Local Server link to the "startup" folder in the start menu.


To uninstall:

NOTICE: The Uninstaller for 0.2.1 is set to leave the c:\hrpgl\habitdb\ folder, so that your data will be left intact. You will have to delete that folder by hand to removed from your computer.

To uninstall simply run the uninstaller from HabitRPG-Local start menu folder.



Troubleshooting
----------------

The installer gives errors:
The errors are probably caused by your install path being too long, or not having the right permissions to install. Try installing to the "c:\hrpgl" folder.

The "HabitRPG-Local" folder isn't in the start menu:
If you renamed the startup folder, look for the folder with the name you gave it. If you didn't rename the start folder you can go to "switch users" through the start menu. When you reach the login screen, log back in. Alternatively you can log out, and log back in, or restart the computer. The folder should show up in your start menu.

The "HabitRPG-Local Server" and "HabitRPG-Local Client" are not showing up on my desktop:
There was an option you were supposed to check in the installer to insert these icons on the desktop. If you did not check that option, you can simply copy the icons from the start menu, or right click them and click "send to > desktop".

Localhost:3000 doesn't show anything, or shows an error:
Make sure that the server.cmd and mongodb.cmd windows are open. If they are open, and you are still receiving an error, or a black page at "localhost:3000", then close the cmd windows and then reload them with "HabitRPG Local Server". If closing the two cmd windows, and restarting them doesn't solve your problem, and you installed to a folder that was not "C:\hrpgl" then it is possible that the server is having a problem with the path you chose to install to. You can try to uninstall and then reinstall to "c:\hrpgl". If you don't have administrator privileges, "c:\user\'your user name'\hrpgl" might work, where 'your user name" is the actual user name you log in with.

Troubleshooting does not solve the problem:
See "Bug Reporting etc." below.


Accessing HabitRPG-Local over LAN
---------------------------------
You can access your HabitRPG-Local server over your local network by entering the server computers ip followed by the port number(192.168.0.100:3000, for example). To find your the server computers ip, run "ipconfig" in a command prompt window. The ports will need to be open, if you have a firewall.



Technical Details
-----------------

HabitRPG-Local is just a snapshot of the HabitRPG develop branch on Github, with a windows node.js binary, a copy of Mongodb, and some batch scripts(cmd).

The batch scripts run mongodb and then the server. It's not pretty, but it seems to work.

The installer extracts everything to a folder, and then adds icons to the HabitRPG-local start menu folder and desktop.

Other Operating Systems:
Other operating systems would probably work by replacing mongodb and the node.js binary with the version for your operating system, but the batch files wouldn't work. You would need to run the mongod executable as well as "(node binary) server.js" by hand. It would make more sense to follow the directions at:
"https://github.com/lefnire/habitrpg/wiki/Running-Locally-(Server)"



License
-------
The license file, called "licenses.txt" with all the relevant licensing information, is in the "C:\hrpgl\" folder.



Changelog
---------

Version 0.2.1 - Aug. 21, 2013
Fixed missing node.js.
Tried to create prompts for overwriting directories in the installer. Also, tried to change uninstaller to leave habitdb folder.


Version 0.2.0 - Aug. 18, 2013
Added InnoSetup installer.
habitrpg:develop snapshot Aug. 17, 2013
mongodb version 2.4.5 i386
node.js version 0.8.25 32-bit

Version 0.1.0 - Aug. 17, 2013
Initial release.
WinRAR Self Extracting Executable.
habitrpg:develop snapshot Aug. 17, 2013
mongodb version 2.4.5 i386
node.js version 0.8.25 32-bit



Bug Reporting Etc.
------------------

If you have problems or questions please post them to the forum thread at http://community.habitrpg.com/content/habitrpg-local-unofficial. There is a link to the forum thread in the HabitRPG-Local Start Menu folder called "HabitRPG-Local on the Web"


6 changes: 6 additions & 0 deletions Your Local Server (localhost3000).url
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[InternetShortcut]
URL=http:///localhost:3000/
IDList=
HotKey=0
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
64 changes: 64 additions & 0 deletions habit 021 inno script.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "HabitRPG-Local"
#define MyAppVersion "0.2.1"
#define MyAppPublisher "Stewart J Martin"
#define MyAppURL "http://community.habitrpg.com/content/habitrpg-local-unofficial"
#define MyAppExeName "habitrpglocal.cmd"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{2A222FD0-A0EE-4C95-9382-961186CF793E}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=c:\hrpgl
DefaultGroupName={#MyAppName}
InfoBeforeFile=C:\Users\Stewart\Desktop\habit local\innobefore.txt
InfoAfterFile=C:\Users\Stewart\Desktop\habit local\hl\README.txt
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
DirExistsWarning=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1

[Files]
Source: "C:\Users\Stewart\Desktop\habit local\licenses.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Stewart\Desktop\habit local\Your Local Server (localhost3000).url"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Stewart\Desktop\habit local\128px icon.ico"; DestDir: "{app}"
Source: "C:\Users\Stewart\Desktop\habit local\HabitRPG Local Server.ico"; DestDir: "{app}"
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: "C:\Users\Stewart\Desktop\habit local\hl\habitrpglocal.cmd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Stewart\Desktop\habit local\hl\mongodb.cmd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Stewart\Desktop\habit local\hl\README.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Stewart\Desktop\habit local\hl\server.cmd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Stewart\Desktop\habit local\hl\habitdb\*"; DestDir: "{app}\habitdb\"; Flags: ignoreversion createallsubdirs recursesubdirs confirmoverwrite uninsneveruninstall promptifolder
Source: "C:\Users\Stewart\Desktop\habit local\hl\h\*"; DestDir: "{app}\h\"; Flags: ignoreversion createallsubdirs recursesubdirs
Source: "C:\Users\Stewart\Desktop\habit local\hl\mongodb\*"; DestDir: "{app}\mongodb\"; Flags: ignoreversion createallsubdirs recursesubdirs

[Icons]
Name: "{group}\HabitRPG-Local Client (localhost3000)"; Filename: "{app}\Your Local Server (localhost3000).url"; IconFilename: "{app}\128px icon.ico"; IconIndex: 0
Name: "{group}\HabitRPG-Local Server"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\HabitRPG Local Server.ico"; IconIndex: 0
Name: "{group}\README"; Filename: "{app}\README.txt"
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\HabitRPG-Local Client"; Filename: "{app}\Your Local Server (localhost3000).url"; IconFilename: "{app}\128px icon.ico"; IconIndex: 0
Name: "{commondesktop}\HabitRPG-Local Server"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\HabitRPG Local Server.ico"; IconIndex: 0; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: shellexec postinstall skipifsilent

9 changes: 9 additions & 0 deletions habitrpglocal.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@echo off
call "cmd /c start mongodb.cmd"
#echo "Wait for mongodb to start, and then press enter"
#pause
call "cmd /c start server.cmd"

#pause
exit

38 changes: 38 additions & 0 deletions innobefore.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
HabitRPG-Local 0.2.1
--------------------

READ THIS BEFORE INSTALLING!!!

What you are about to install is an unofficial package of habitrpg's server/client. This server is a local server, that DOES NOT sync with the remote server at habitrpg.com.


Requirements:
-This installation is for Microsoft Windows (Only XP and windows 7 have been tested.)
-You will need approximately 600MB of free hard drive space.


IMPORTANT:
Do NOT change the installation folder unless you absolutely must. This installer installs HabitRPG-Local into "C:\hrpgl", because installing into other folders may potentially cause errors with file paths being too long. If you choose to install to a different folder, try to install to a folder that is directly off of the root directory(The root directory 8 is c:\ for most people). If that is not an option for you, try to install to the folder with the shortest path name(If you don't have administrator privileges, "c:\user\'your user name'\hrpgl" might work, where 'your user name" is the actual user name you log in with). If you recieve errors, you can try to simply skip or ignore them all, and HabitRPG-Local may still work, if you're lucky.


Details:
Besides the "c:\hrpgl" folder, the installer also creates a folder called "HabitRPG-Local" in the start menu that contatins links to the HabitRPG-Local server, client, forum thread, readme and uninstaller. It also installs icons for the server and client to the desktop, unless you unchecked the box during install.


Time to install:
Once the installer starts, it will take some time. On my system it took about 5 minutes.



Post Installation:

After installation, the installer gives you the option to launch HabitRPG-Local. This will launch two black cmd prompt windows called "mongodb.cmd" and "server.cmd". This is the server and it's database. These windows must stay open for the server to work. Server.cmd may take some time to load, and may stay black while it's loading. If you recieve any popups requesting access, press accept.

If the installation, mongodb.cmd, and server.cmd are successful, the server.cmd window should say that socket.io started, followed by 4 lines of text about expressions. You can then open the client from the start menu(or desktop) by running "HabitRPG-Local Client", or by entering "localhost:3000" in your web browser's address bar.

If you have problems or questions please post them to the forum thread at http://community.habitrpg.com/content/habitrpg-local-unofficial, AFTER you have read this file and the README. There is a link to the forum thread in the HabitRPG-Local folder called "HabitRPG-Local on the Web".





14 changes: 14 additions & 0 deletions licenses.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
HabitRPG code is licensed under GNU GPL v3. Content is licensed under CC-BY-SA 3.0. See the LICENSE file in the "H" folder for details.

HabitRPG-Local code is licensed under GNU GPL v3. Content is licensed under CC-BY-SA 3.0.

MongoDB's license details can be found in the MongoDB folder, or:
MongoDB(version) is licensed using the AGPL 3.0 license.
http://www.gnu.org/licenses/agpl-3.0.html
MongoDB's drivers use the Apache 2.0 license.
http://www.apache.org/licenses/LICENSE-2.0


Node.JS is licensed using the MIT license.
https://raw.github.com/joyent/node/v0.10.16/LICENSE

4 changes: 4 additions & 0 deletions mongodb.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo off

cd mongodb\bin
mongod.exe --dbpath ..\..\habitdb
6 changes: 6 additions & 0 deletions server.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off

cd h
node.exe server.js


0 comments on commit 0338512

Please sign in to comment.