ENIGMA Forums

General fluff => Announcements => Topic started by: Josh @ Dreamland on May 30, 2010, 11:05:55 am

Title: Graduation
Post by: Josh @ Dreamland on May 30, 2010, 11:05:55 am
Of me, not yet ENIGMA. I know many others are graduating about now; congratulations to all of you.

I figure I should repost the method of obtaining and compiling ENIGMA. Again, post bugs and concerns here. At least five individuals have successfully checked out and compiled; don't think that this isn't going to work if it fails a few times, just ask for help.

Instructions for obtaining and compiling the ENIGMA R4 public testing copy

IRC Channel
ENIGMA has an IRC channel set up on Freenode. Predictably, it is called #enigma-dev. This link may take you there.

Procedure in general is as follows: (Subject to revision; pay attention)
Note: This is only for people who wish to test but do not wish to wait for "stable test," meaning "at least moderately workable pile of fail."

No recent revisions

Dependencies

If you are on Windows, do the following:
- Install an SVN client (either the command line version, or a visual one like RapidSVN or Tortoise)
- Install Code::Blocks ( www.codeblocks.org ) unless you know how to use Make and will put up with outdated makefiles.
- After checking out the SVN (see "Getting ENIGMA"), If this file does not exist, copy it to ENIGMAsystem/additional/zlib/: http://dl.dropbox.com/u/1052740/libzlib.a

If you are on Linux, you will need the following packages:
- g++
- libgl1-mesa-dev (or similar)
- zlib1g-dev (SHOULD be installed already, but Ism's wasn't)
- codeblocks
- svn / rapidsvn / tortoise
- Java (I -strongly- recommend sun-java6-jre)

Getting ENIGMA to Work

Getting ENIGMA

- Check out the SVN repository via the most applicable of the following:
--- From command line, you will use  svn co https://enigma-dev.svn.sourceforge.net/svnroot/enigma-dev enigma-dev )
--- From RapidSVN, go to the Repository menu, and select Checkout. Provide the URL https://enigma-dev.svn.sourceforge.net/svnroot/enigma-dev, and specify where you want it downloaded.
- The above will begin downloading ENIGMA. Let it finish.
- Go to ./trunk/
- Go to ./CompilerSource/
- Build it with your choice of these two:
--- From Code::Blocks
------- Open the Code::Blocks project. Find the drop down box that likely reads "Release." If you're on Linux, set it to "Release-Linux."
------- Hit compile (blue gear)
--- With Make
------- Your make is either called `make` or `mingw32-make`; call it with your OS name as the target. For example, `make windows` or `make linux`.
------- Make shouldn't error, but is more likely to than C::B; if it does, post here.
- Done, go back up to Trunk

Running ENIGMA Itself (LGM)

- Run LateralGM, best done with a terminal via "java -jar lateralgm16b4.jar" -- This terminal should have +++++++++++++ at the bottom.
--- If it does not, or if that errors, paste output here. If you compiled with Make, that's probably why.
------ If the terminal errors that java is not a valid application, then you are on Windows.
------ Find "java.exe" and add its directory to your PATH variable from the control panel.
- Make something simple (like a single object drawing a graded circle; that's what I've been using as a preliminary test)
- Under the "Enigma" menu, hit "Run"
- Check the terminal window (the one I hope you used to run LGM) for syntax errors.
--- If there is one that you don't think is correct, post it here. (I'm currently developing the syntax checker).
- Your code has now been secretly translated to C++ behind your back.
- If all went successfully, your game should launch.

Testing the Game You Just "Ran"

ENIGMA should run your game for you. If it does not, and you see no errors in the terminal window, you can do the following:

-Open trunk/ENIGMAsystem/SHELL/ENIGMAengine.cbp in Code::Blocks
-Select your OS from the dropdown box once more (Debug is faster to build, release will run fastest)
-Press Compile
---If anything errors and you think you followed the above correctly, right click the error list, select "Copy Contents to Clipboard," and paste them all here.
-Press run.
---If it doesn't behave as expected, describe what went wrong here.


What now?

Repeat the step starting at "Make something simple" until you're sick of finding bugs.
The most immediate concern is that everyone can achieve a simple circle.


Common Errors

ENIGMA
error: ‘instdata’ was not declared in this scope
--This means you did not actually create a game from LGM (By clicking "Run") before trying to compile it, the compile failed due to syntax errors, or you restarted LGM in the meantime. It isn't really an error.

LateralGM
- SvnKit missing, corrupted, or unusable. Please download and place next to the enigma plugin in order to enable auto-update.
---This is not an error. It is a warning thrown by Enigma.jar, warning you that it's not able to update itself if you don't have SvnKit. Of course, Enigma doesn't need to update itself.

- Unable to load plugin: SvnKit.jar: null: Missing plugin entry point (LGM-Plugin)
- Unable to load plugin: jna.jar: null: Missing plugin entry point (LGM-Plugin)
---These are not errors. They are warnings thrown by LGM indicating that it can't load those files as LGM Plugins -- because they *aren't* LGM Plugins! Basically these are just reminders to the devs that we shouldn't just throw every darned file we need access to in the Plugins folder >_<
Title: Re: Graduation
Post by: freezway on May 30, 2010, 12:41:02 pm
a few bugs:
I think they are all tied to the event system that needs work...
Title: Re: Graduation
Post by: retep998 on May 30, 2010, 01:11:04 pm
Don't forget to add that if java gives an error saying it can't find the module compileEGMf then you are basically screwed and can't use enigma.
Title: Re: Graduation
Post by: RetroX on May 31, 2010, 10:24:19 am
Please don't specify the packages using Ubuntu's annoying names.

Dependencies:
gcc, gcc-libs (also g++ if it's separate, which it isn't in every distribution in the entire universe except ubuntu)
libgl, mesa (including development files)
zlib (including development files)
codeblocks or make
subversion
openjre6 or openjdk6 (jdk and jre are ideal)

And for the PKGBUILD that I made:
Code: [Select]
pkgname=enigma-dev
pkgver=249
pkgrel=1
pkgdesc="An open-source alternative to YoYoGame's Game Maker, written in C++."
arch=('i686' 'x86_64')
url="http://enigma-dev.org"
license=('GPL')
depends=('libgl' 'mesa' 'zlib' 'gcc' 'gcc-libs' 'make' 'jre')
makedepends=('pkgconfig' 'subversion' 'make')
sources=()
md5sums=()
_svntrunk=https://enigma-dev.svn.sourceforge.net/svnroot/enigma-dev/
_svnmod=enigma-dev

build() {
  svn co $_svntrunk
  mkdir $startdir/pkg/opt
  mkdir $startdir/pkg/opt/enigma
  cp -r $startdir/src/$_svnmod/trunk -T $startdir/pkg/opt/enigma
  cd $startdir/pkg/opt/enigma/CompilerSource

  rm -rf $(find $startdir/pkg | grep 'svn$')
  rm -rf '$startdir/pkg/opt/enigma/CompilerSource/.eobjs'

  mkdir $startdir/pkg/usr
  mkdir $startdir/pkg/usr/share
  mkdir $startdir/pkg/usr/share/pixmaps
  mkdir $startdir/pkg/usr/share/applications
  cp $startdir/pkg/opt/enigma/enigma.png $startdir/pkg/usr/share/pixmaps
  cp $startdir/pkg/opt/enigma/enigma.desktop $startdir/pkg/usr/share/applications

  make linux || return 1
  }
Title: Re: Graduation
Post by: Josh @ Dreamland on May 31, 2010, 12:07:12 pm
The vast majority of Linux ENIGMA users is on Ubuntu. The rest can probably figure out the name of the package on their platform.
Title: Re: Graduation
Post by: retep998 on May 31, 2010, 12:08:05 pm
UPDATE:

If you get the java error about the specified module cannot be found, just run enigma directly from code::blocks and it will work for the time being.
Now IsmAvatar just needs to fix it so we can run enigma normally.
Title: Re: Graduation
Post by: MrJackSparrow2 on May 31, 2010, 01:05:11 pm
LGM freezes at:


This program built for i686-pc-mingw32
Good news; it should seem I can reach make from `"C:/MinGW/bin/mingw32-make"'


I did not use make.
Title: Re: Graduation
Post by: Josh @ Dreamland on May 31, 2010, 03:29:51 pm
MrJackSparrow: I've not yet heard that one. I'm in the middle of something large right now, but will commit soon enough; it may help if you join the IRC.

Retep: The problem is with your new configuration; Java is set up to run from its own working directory instead of from the directory of the Jar. I'm not sure how Ism could fix that without hacks.
Title: Re: Graduation
Post by: MrJackSparrow2 on May 31, 2010, 06:54:05 pm
It's never been a problem before, but I'm running the OS, LGM, and Enigma on D:\ but make is on C:\. Is that ok?
Title: Re: Graduation
Post by: kkg on June 01, 2010, 01:57:36 am
It's never been a problem before, but I'm running the OS, LGM, and Enigma on D:\ but make is on C:\. Is that ok?

So long as MinGW is a new install since you installed the OS it should be fine :S
Title: Re: Graduation
Post by: Josh @ Dreamland on June 01, 2010, 01:44:23 pm
Indeed. If ENIGMA got what it wanted from MinGW, I have no idea why it would freeze. Perhaps it asked a bad question and Make paused for input. Does ENIGMA waste your CPU while it is frozen?

Also, what Windows version/processor architecture are you running? I've not tested ENIGMA on Win7, either bit depth. I can test on Win7 x64 if need be.
Title: Re: Graduation
Post by: MrJackSparrow2 on June 01, 2010, 09:20:53 pm
The entire output:


Code: [Select]
D:\Users\Cody\Desktop\Enigma\trunk>java -jar lgm16b4.jar
Java Version: 10600 (1.6.0_19)
Loading lib files in D:\Users\Cody\Desktop\Enigma\trunk\lgm16b4.jar
01_move.lgl 02_main1.lgl 03_main2.lgl 04_control.lgl
 05_score.lgl 06_extra.lgl 07_draw.lgl
SvnKit missing, corrupted, or unusable. Please download and place next to the en
igma plugin in order to enable auto-update.
Initializing Enigma: Intializing Parsers.Probing for GCC...
'cpp' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
GCC located. Path: `C:/MinGW/bin/'
Successfully loaded GCC definitions
Undefining _GLIBCXX_EXPORT_TEMPLATE
# 1 "blank.txt"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "blank.txt"
5dirs:
"C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/"
"C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/mingw32/"
"C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/backward/"
"C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/"
"C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/include/"
All that worked. Trying to find make.
'C:/MinGW/bin/make' is not recognized as an internal or external command,
operable program or batch file.
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-mingw32
Good news; it should seem I can reach make from `"C:/MinGW/bin/mingw32-make"'

CPU stays at a steady 25% (java.exe) on my quad core processor. (So, 100% on a single core?)
I'm running Windows 7, 32 bit. Until the R4 release, enigma has always worked for me.
Title: Re: Graduation
Post by: IsmAvatar on June 01, 2010, 10:44:19 pm
Quote
25% (java.exe) on my quad core processor. (So, 100% on a single core?)
I laughed a little.
Title: Re: Graduation
Post by: MrJackSparrow2 on June 01, 2010, 11:15:52 pm
xD, well doing the math it's right. However, I heard somewhere it just doesn't work like that.
Title: Re: Graduation
Post by: IsmAvatar on June 03, 2010, 10:13:14 am
Code: [Select]
global COLLISION[y/16][x/16] = true;
Why does this code not give me a syntax error when I run syntax check, but it does when I go ahead and compile?
Title: Re: Graduation
Post by: Josh @ Dreamland on June 03, 2010, 10:18:37 am
Because syntax check can't account for y/16 and x/16 not existing in the global scope. This is the closest thing to a "runtime error" you'll get in ENIGMA.

It may also be because I forgot to tell it to add "var" to globals with no such definition. :P

It is possible now that fixing this error is within my power. As in, making the syntax check error.