Skip to content

Commit

Permalink
Merge pull request nitram2342#6 from StackSmashing/master
Browse files Browse the repository at this point in the history
Fixed compilation & project creation
  • Loading branch information
nitram2342 committed Jan 10, 2012
2 parents 05fcf76 + f61e396 commit f4a23ea
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -16,4 +16,5 @@ tp2/

gui/degate_bin
libtest/libdegate_test
lib/libdegate.dylib
lib/libdegate.dylib
lib/libdegate.so
25 changes: 25 additions & 0 deletions degate_start.sh
@@ -0,0 +1,25 @@
#!/bin/sh

# First we set environment variables.

# This is mandatory, because degate must know where all the glade files and icons are.
export DEGATE_HOME=gui;

# Set the global image tile cache size in MB.
# Each image tile has a dimension of 1024x1024 pixels. Each pixel is an RGBA value.
# That is a single image tile has 4MB. You should adjust the cache size, that at
# least a whole horizotnal row of image tiles fit into the cache. E. g. if your
# project usually has a horizontal dimension of 10000 pixel, you need around 10
# tiles for a tile row. That are around 40 MB cache size.
# If you have enough memory, you can multiply this value by the number of layers
# you normally use.
export DEGATE_CACHE_SIZE=256

# Set the temp directory.
export DEGATE_TEMP=/tmp

# Set the URI pattern for the collaboration server.
export DEGATE_SERVER_URI_PATTERN=http://degate.org/cgi-bin/xmlrpc-server-cgi.pl?channel=%1%

# Launch degate.
$DEGATE_HOME/degate_bin
5 changes: 3 additions & 2 deletions lib/ProjectExporter.cc
Expand Up @@ -248,8 +248,9 @@ void ProjectExporter::add_colors(xmlpp::Element* prj_elem, Project_shptr prj) {
xmlpp::Element* colors_elem = prj_elem->add_child("default-colors");
if(colors_elem == NULL) throw(std::runtime_error("Failed to create node."));

BOOST_FOREACH(default_colors_t::value_type const& p, prj->get_default_colors()) {

default_colors_t default_colors = prj->get_default_colors();
BOOST_FOREACH(default_colors_t::value_type const& p, default_colors) {
cout << "ITERATING\n";
xmlpp::Element* color_elem = colors_elem->add_child("color");
if(color_elem == NULL) throw(std::runtime_error("Failed to create node."));

Expand Down
10 changes: 5 additions & 5 deletions lib/TileCache.h
Expand Up @@ -32,6 +32,7 @@
#include <ctime>
#include <utility> // for make_pair
#include <iostream>
#include <inttypes.h>

#ifdef __APPLE__
#include <sys/time.h> // for gettimeofday
Expand Down Expand Up @@ -122,17 +123,16 @@ namespace degate {
public:

void print_table() const {

printf("Global Image Tile Cache:\n"
"Used memory : %ld bytes\n"
"Max memory : %ld bytes\n\n"
"Used memory : %llu bytes\n"
"Max memory : %llu bytes\n\n"
"Holder | Last access (sec,nsec) | Amount of memory\n"
"-----------------+---------------------------+------------------------------------\n",
allocated_memory, max_cache_memory);
(long long unsigned)allocated_memory, (long long unsigned)max_cache_memory);

for(cache_t::const_iterator iter = cache.begin(); iter != cache.end(); ++iter) {
cache_entry_t const& entry = iter->second;
printf("%16p | %12ld.%12ld | %ld M (%ld bytes)\n",
printf("%16p | %12ld.%12ld | %u M (%u bytes)\n",
iter->first, entry.first.tv_sec, entry.first.tv_nsec, entry.second/(1024*1024), entry.second);
iter->first->print();
}
Expand Down
6 changes: 6 additions & 0 deletions tools/gate_lib_documentation/CMakeLists.txt
Expand Up @@ -11,6 +11,12 @@ if(Boost_FOUND)
set(LIBS ${LIBS} ${Boost_LIBRARIES})
endif()

find_package(XMLRPC COMPONENTS c++2 client)
if(XMLRPC_FOUND)
include_directories(${XMLRPC_INCLUDE_DIRS})
set(LIBS ${LIBS} ${XMLRPC_LIBRARIES})
endif()



include_directories(. ../../lib)
Expand Down

0 comments on commit f4a23ea

Please sign in to comment.