You are here

Compiling and modding Toucan

26 posts / 0 new
Last post
Markus700
Offline
Last seen: 12 years 8 months ago
Joined: 2010-02-26 08:50
Compiling and modding Toucan

hey steven,

first i like to thank you for this awesome program.

I like to use the sourcecode to compile a modified version for my needs. My primary goal is hiding some of the tabs and advanced option. I´m going to use the modded version for a part of my thesis in order to get my degree. I hope thats ok for you. No one will ever get this version.

I downloaded the version from your mercurial repository and tried to compile the toucann.cpp with wxdev-cpp (gcc) compiler. failed...

here´s the compiling log:

Although i made a few Java programms, I`m not a expert in programming. So I could need help Smile

Compiler: Default GCC compiler
Führt g++.exe... aus
g++.exe "C:/Users/Admin/toucan_11monate/toucan.cpp" -o "C:/Users/Admin/toucan_11monate/toucan.exe" -I"C:/Program Files (x86)/Dev-Cpp/lib/gcc/mingw32/3.4.5/include" -I"C:/Program Files (x86)/Dev-Cpp/include/c++/3.4.5/backward" -I"C:/Program Files (x86)/Dev-Cpp/include/c++/3.4.5/mingw32" -I"C:/Program Files (x86)/Dev-Cpp/include/c++/3.4.5" -I"C:/Program Files (x86)/Dev-Cpp/include" -I"C:/Program Files (x86)/Dev-Cpp/" -I"C:/Program Files (x86)/Dev-Cpp/include/3rdparty/wx/plotctrl" -I"C:/Program Files (x86)/Dev-Cpp/include/3rdparty/wx/sheet" -I"C:/Program Files (x86)/Dev-Cpp/include/3rdparty/wx/treemultictrl" -I"C:/Program Files (x86)/Dev-Cpp/include/3rdparty/wx/things" -I"C:/Program Files (x86)/Dev-Cpp/include/3rdparty/wx" -I"C:/Program Files (x86)/Dev-Cpp/include/3rdparty" -I"C:/Program Files (x86)/Dev-Cpp/include/common/wx/msw" -I"C:/Program Files (x86)/Dev-Cpp/include/common/wx/generic" -I"C:/Program Files (x86)/Dev-Cpp/include/common/wx/fl" -I"C:/Program Files (x86)/Dev-Cpp/include/common/wx/gizmos" -I"C:/Program Files (x86)/Dev-Cpp/include/common/wx/html" -I"C:/Program Files (x86)/Dev-Cpp/include/common/wx/mmedia" -I"C:/Program Files (x86)/Dev-Cpp/include/common/wx/net" -I"C:/Program Files (x86)/Dev-Cpp/include/common/wx/ogl" -I"C:/Program Files (x86)/Dev-Cpp/include/common/wx/plot" -I"C:/Program Files (x86)/Dev-Cpp/include/common/wx/protocol" -I"C:/Program Files (x86)/Dev-Cpp/include/common/wx/stc" -I"C:/Program Files (x86)/Dev-Cpp/include/common/wx/svg" -I"C:/Program Files (x86)/Dev-Cpp/include/common/wx/xml" -I"C:/Program Files (x86)/Dev-Cpp/include/common/wx/xrc" -I"C:/Program Files (x86)/Dev-Cpp/include/common/wx" -I"C:/Program Files (x86)/Dev-Cpp/include/common" -L"C:/Program Files (x86)/Dev-Cpp/Lib"
C:/Users/Admin/toucan_11monate/toucan.cpp:22:1: warning: "_WIN32_WINNT" redefined
In file included from C:/Program Files (x86)/Dev-Cpp/include/common/wx/db.h:61,
from C:/Program Files (x86)/Dev-Cpp/include/common/wx/variant.h:30,
from C:/Program Files (x86)/Dev-Cpp/include/common/wx/colour.h:48,
from C:/Program Files (x86)/Dev-Cpp/include/common/wx/bitmap.h:21,
from C:/Program Files (x86)/Dev-Cpp/include/common/wx/generic/splash.h:15,
from C:/Program Files (x86)/Dev-Cpp/include/common/wx/splash.h:15,
from C:/Users/Admin/toucan_11monate/toucan.cpp:8:
C:/Program Files (x86)/Dev-Cpp/include/common/wx/msw/wrapwin.h:43:1: warning: this is the location of the previous definition
C:/Users/Admin/toucan_11monate/toucan.cpp: In member function `virtual bool Toucan::OnInit()':
C:/Users/Admin/toucan_11monate/toucan.cpp:94: error: `wxInitAllImageHandlers' was not declared in this scope

C:/Users/Admin/toucan_11monate/toucan.cpp: In member function `void Toucan::KillConime()':
C:/Users/Admin/toucan_11monate/toucan.cpp:284: error: `wcsnlen' was not declared in this scope
C:/Users/Admin/toucan_11monate/toucan.cpp:286: error: cannot convert `CHAR*' to `const wchar_t*' for argument `1' to `int wcsncmp(const wchar_t*, const wchar_t*, size_t)'
C:/Users/Admin/toucan_11monate/toucan.cpp:286: error: cannot convert `CHAR*' to `const wchar_t*' for argument `1' to `int wcsncmp(const wchar_t*, const wchar_t*, size_t)'

Ausführung beendet
Compilation Failed. Make returned 1

alexl_ru
Offline
Last seen: 10 years 7 months ago
Joined: 2010-02-19 10:17
mingw

This is just a top of the iceberg!

You can't compile this version under mingw (which is used by dev-cpp) since it uses libs that not supported by mingw (ccrypt). You'll have to fudge with MSVC.

Try older version, it has less features as you need and it's very easy to compile from the first try (e.g. under mingw):
http://portableapps.svn.sourceforge.net/viewvc/portableapps/toucan/

p.s.
> wxInitAllImageHandlers
You use the stable release of wx (=2.9.0).

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 9 years 2 months ago
Developer
Joined: 2005-12-10 15:22
Not

strictly true I am afraid! ccrypt is not compiled in by Toucan (and is no longer in the repository) so that is not a problem.

Although wxInitAllImageHandlers does exist in wx2.8 alexl_ru is correct, I would recommend the 2.9.0 release on the wxwidgets homepage for compilation. Hopefully I will get a draft of a guide to compiling done this weekend as there seems to be interest all of a sudden!

alexl_ru
Offline
Last seen: 10 years 7 months ago
Joined: 2010-02-19 10:17
would be nice

BTW, my compilation didn't work after all. I think this is related to lua thing (luaopen_toucan() missing).

So, since you got rid of ccrypt, will be there any chance to compile Toucan under mingw? I remember a few uses of Platform SDK, but those didn't look as really necessary things.

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 9 years 2 months ago
Developer
Joined: 2005-12-10 15:22
So

I have fixed a couple of bugs in mercurial and uploaded a quick guide to compiling here:

http://drop.io/toucantest/asset/toucan-031-pdf

If you have any more question please ask, I only test on Visual Studio and GCC at the moment, although I did use MinGW for a long time!

alexl_ru
Offline
Last seen: 10 years 7 months ago
Joined: 2010-02-19 10:17
download

What's the best way to download source files?

My current workaround:
1. goto here
http://portableapps.hg.sourceforge.net/hgweb/portableapps/toucan/file/1c...
2. parse html via regexps;
3. make every link point to raw file;
4. feed url list to wget;
5. apply (2)-(4) steps for the subdirs.

computerfreaker
computerfreaker's picture
Offline
Last seen: 11 years 2 months ago
Developer
Joined: 2009-08-11 11:24
I think you'll need a

I think you'll need a Mercurial client, something like TortoiseHg.

"The question I would like to know, is the Ultimate Question of Life, the Universe and Everything. All we know about it is that the Answer is Forty-two, which is a little aggravating."

alexl_ru
Offline
Last seen: 10 years 7 months ago
Joined: 2010-02-19 10:17
what than?

Just installed one.
I think I have to run command like this:
hg.exe pull http://some_url_here

I've tried
hg.exe pull http://portableapps.hg.sourceforge.net/hgweb/portableapps/toucan/file/1c...

Nothing:
abort: There is no Mercurial repository here (.hg not found)!

computerfreaker
computerfreaker's picture
Offline
Last seen: 11 years 2 months ago
Developer
Joined: 2009-08-11 11:24
hg clone

Well, I'm no hg wizard, but let's try using Chris Morgan's hg instructions for PAL, and just change them to work with the Toucan repository.

mkdir launcher
cd launcher
hg clone http://portableapps.hg.sourceforge.net/hgweb/portableapps/toucan/

To update to the latest revision,

hg pull
hg up

"The question I would like to know, is the Ultimate Question of Life, the Universe and Everything. All we know about it is that the Answer is Forty-two, which is a little aggravating."

alexl_ru
Offline
Last seen: 10 years 7 months ago
Joined: 2010-02-19 10:17
Nice

Thanks, it works!

Markus700
Offline
Last seen: 12 years 8 months ago
Joined: 2010-02-26 08:50
hi steven, thank you for the

thank you for the quick guide.

Here is what i´ve done yet:

1. Installed Windows 7 SDK
2. Build and added zlib
3. Exchanged the findwxwidget file.
4. Compiled wxwidgets with cmake for mingw and added the includes-path to compiler (Standard gcc compilerset in wxdev-c++).

Cmake created some files and folders (compilderidc,compileridcxx,cmaketmp,.......). Do i have to use these files in some way? I just added the wx\includes to compiler yet.

5. Added cxxtest to compiler
6. How to install LUA to Compiler? (not even my tutor has a clue) Smile
7. How to install Swig to Compiler?

Current state of Compiling:
0 Errors, 0 Warnings, but failed

edit:

found errors:

toucan.cpp:82 GetConsoleWindow not declared in this scope
toucan.cpp:279 wcsnlen was not declared in this scope

alexl_ru
Offline
Last seen: 10 years 7 months ago
Joined: 2010-02-19 10:17
macro

> toucan.cpp:82 GetConsoleWindow not declared in this scope

Make sure you have macro _WIN32_WINNT defined as 0x0500 (at least).

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 9 years 2 months ago
Developer
Joined: 2005-12-10 15:22
You

don't need to worry about adding anything to the compiler as CMake sets all of that up for you Smile As for your other point what alexl_ru said should fix it!

Markus700
Offline
Last seen: 12 years 8 months ago
Joined: 2010-02-26 08:50
ok defined. But i still have

ok defined.

But i still have the problem with wcsnlen. Its not declared in wchar.h oder string.h.

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 9 years 2 months ago
Developer
Joined: 2005-12-10 15:22
Ok,

seems it isn't defined in mingw, I won't be able to get a fix pushed tonight but I ought to be able to in the morning, sorry!

EDIT: You could just try a plain wcslen until I get it fixed though!

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 9 years 2 months ago
Developer
Joined: 2005-12-10 15:22
I

have fixed and pushed the change, should work now!

Markus700
Offline
Last seen: 12 years 8 months ago
Joined: 2010-02-26 08:50
Ok toucan.cpp in compiling

Ok toucan.cpp in compiling fine.

Now:
20 C:\Users\Admin\toucan_02032010\forms\frmprogress.cpp shobjidl.h: No such file or directory.

found this file in windows sdk includes.I have added this folder to includes and produced a lot more errors Wink

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 9 years 2 months ago
Developer
Joined: 2005-12-10 15:22
Well

I can't suggest how to fix them unless you tell me what they are Wink

Markus700
Offline
Last seen: 12 years 8 months ago
Joined: 2010-02-26 08:50
Sorry i put them into a word

Sorry Smile

i put them into a word file.

http://rapidshare.com/files/357956723/formprogress_errors.docx.html

Just tried to compile various other cpp files, seemes to work except formprogress.

Thanks for your help

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 9 years 2 months ago
Developer
Joined: 2005-12-10 15:22
I

have pushed a little change to the repository that will basically stop the Windows 7 taskbar stuff being compiled under MinGW until I have dive into what it is doing!

Markus700
Offline
Last seen: 12 years 8 months ago
Joined: 2010-02-26 08:50
ok

Seems that my former wxwidgets config is not working, have to reinstall it.

just if i did something wrong:

1. install to c:\wxwidgets-2.9.0
2. add c:\wxwidgets-2.9.0 to path.
2. replace findwxwidgets in cmake modules.
3. creating wx libs: mingw32-make -f makefile.gcc MONOLITHIC=0 SHARED=0 UNICODE=1 BUILD=debug
4. add c:\wxwidgets-2.9.0\lib\gcc_lib to path.
5. start cmake with cmakelists.txt in toucan rootfolder

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:70 (MESSAGE):
Could NOT find wxWidgets (missing: wxWidgets_FOUND)
Call Stack (most recent call first):
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindwxWidgets.cmake:877 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:8 (find_package)

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 9 years 2 months ago
Developer
Joined: 2005-12-10 15:22
Sorry

for the delay on this, has the correct path to wxWidgets been filled in in the CMake gui when this error happens?

alexl_ru
Offline
Last seen: 10 years 7 months ago
Joined: 2010-02-19 10:17
cmake

I'm trying to compile Toucan using CMake and stuck with cxxtest.
CXXTEST subtree features 3 variables to set:
1. CXXTEST_INCLUDE_DIR (value = D:\Programs\mingw\cxxtest\cxxtest)
2. CXXTEST_PERL_TESTGEN_EXECUTABLE (value = CXXTEST_PERL_TESTGEN_EXECUTABLE-NOTFOUND)
3. CXXTEST_PYTHON_TESTGEN_EXECUTABLE (value = D:\Programs\mingw\python\python.exe )

Is python required to build the app?
What is Python Testgen executable?
I've installed some Python 2.6.4 from here: http://www.python.org/download/releases/2.6.4/

After generating makefile the build process fails when it gets to test.h

[ 60%] Generating D:/Develop/Toucan/source/toucan_hg/test.cpp
mingw32-make.exe[2]: *** [D:/Develop/Toucan/source/toucan_hg/test.cpp] Error 2
mingw32-make.exe[1]: *** [CMakeFiles/toucan.dir/all] Error 2
mingw32-make.exe: *** [all] Error 2

upd. Solution
0. Set variable (1) above to "D:\Programs\mingw\cxxtest"
1. Set variable (3) above to "D:\Programs\mingw\python\python.exe D:\Programs\mingw\cxxtest\cxxtestgen.py"
2. Configure/Generate
3. Edit file toucan_build\CMakeFiles\toucan.dir\build.make
1) Found string containing python.exe
2) make it look like
"D:\Programs\mingw\python\python.exe" D:\Programs\mingw\cxxtest\cxxtestgen.py -o D:/Develop/Toucan/source/toucan_hg/test.cpp D:/Develop/Toucan/source/toucan_hg/test.h

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 9 years 2 months ago
Developer
Joined: 2005-12-10 15:22
Yes

you are right, either python or perl is needed, I will hopefully do some more updates to the compiling guide this weekend, sorry it is taking a while, very busy at university at the moment!

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 9 years 2 months ago
Developer
Joined: 2005-12-10 15:22
A

quick update to the MinGW stuff, I nearly have it compiling, it goes all the way to linking and then fails, but I know why, hopefully I will be able to post fixed working instructions tomorrow.

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 9 years 2 months ago
Developer
Joined: 2005-12-10 15:22
So

I finally got it all working today and have pushed another fix to the Mercurial repository, this is what I did:

  1. Install Python, then add it to path
  2. Download cxxtest and add it to path
  3. Install MinGW and add it to path
  4. Download SWIG and add it to path
  5. Download wxWidgets 2.9 and build it with
    mingw32-make -f makefile.gcc
  6. Run CMake, it should fill in all the paths apart from the Toucan_Output which you need to fill in. Then generate the makefiles
  7. Navigate to the build folder and run
    mingw32-make
  8. Toucan should build!

There are still a couple if issues, mainly with the manifest, but I think I know how to fix this, hopefully I will get a commit in later to fix it.

Log in or register to post comments