From 6131537c5729de9fed93912b14c364c7bc727a94 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 9 Mar 2008 18:18:21 +0000 Subject: [PATCH] - wrapper: compile fixes for Mac - delete uppercase/ svn path=/trunk/boinc_samples/; revision=14873 --- checkin_notes | 6 + uppercase/Makefile | 47 ------- uppercase/README | 9 -- uppercase/in | 1 - uppercase/logo.jpg | Bin 20291 -> 0 bytes uppercase/uc_graphics.C | 224 -------------------------------- uppercase/upper_case.C | 274 ---------------------------------------- wrapper/wrapper.C | 8 +- 8 files changed, 10 insertions(+), 559 deletions(-) delete mode 100644 uppercase/Makefile delete mode 100644 uppercase/README delete mode 100644 uppercase/in delete mode 100644 uppercase/logo.jpg delete mode 100644 uppercase/uc_graphics.C delete mode 100755 uppercase/upper_case.C diff --git a/checkin_notes b/checkin_notes index 37447e1fb0..d6d604f3bc 100644 --- a/checkin_notes +++ b/checkin_notes @@ -568,3 +568,9 @@ David 6 Mar 2008 wrapper/ wrapper.C + +David 9 Mar 2008 + - wrapper: compile fixes for Mac + + wrapper/ + wrapper.C diff --git a/uppercase/Makefile b/uppercase/Makefile deleted file mode 100644 index 331ec8594f..0000000000 --- a/uppercase/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# This should work on Linux. Modify as needed for other platforms. - -# Do this first: -# ln -s `g++ -print-file-name=libstdc++.a` -# This creates a symbolic link to the C++ library, -# which is linked statically - -BOINC_DIR = ../../boinc -BOINC_API_DIR = $(BOINC_DIR)/api -BOINC_LIB_DIR = $(BOINC_DIR)/lib - -CXXFLAGS = -g \ - -I$(BOINC_DIR) \ - -I$(BOINC_LIB_DIR) \ - -I$(BOINC_API_DIR) \ - -L$(BOINC_API_DIR) \ - -L$(BOINC_LIB_DIR) \ - -L /usr/X11R6/lib \ - -L. - -# the following should be freeglut; use nm to check -# you may have to change the paths for your system -LIBGLUT = /usr/local/lib/libglut.a -LIBGLU = /usr/local/lib/libGLU.a -LIBJPEG = /usr/local/lib/libjpeg.a - -PROGS = upper_case upper_case.so - -all: $(PROGS) - -clean: - rm $(PROGS) - -# the -Wl,--export-dynamic causes the main program's symbols -# to be exported to the graphics library - -upper_case: upper_case.o $(BOINC_API_DIR)/libboinc_api.a $(BOINC_API_DIR)/libboinc_graphics_lib.a $(BOINC_LIB_DIR)/libboinc.a - $(CXX) $(CXXFLAGS) -Wl,--export-dynamic -o upper_case upper_case.o libstdc++.a -pthread -lboinc_api -lboinc -lboinc_graphics_lib -ldl - -upper_case.so: uc_graphics.o $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_graphics_impl.a - $(CXX) $(CXXFLAGS) -o upper_case.so \ - -shared -fPIC -pthread \ - uc_graphics.o \ - libstdc++.a \ - -lboinc_graphics_impl -lboinc \ - $(LIBGLUT) $(LIBGLU) $(LIBJPEG) \ - -lGL -lX11 -lXmu -lm; \ diff --git a/uppercase/README b/uppercase/README deleted file mode 100644 index 894db028af..0000000000 --- a/uppercase/README +++ /dev/null @@ -1,9 +0,0 @@ -NOTE: this app is deprecated and won't build. -Use boinc_samples/example_app/ instead. ----------------------- - -The graphics should show a bouncing ball. - -If you want a logo, put a file "logo.jpg" in this directory. - -If you want text, copy Helvetica.txf to this directory. diff --git a/uppercase/in b/uppercase/in deleted file mode 100644 index 8caf86e2f9..0000000000 --- a/uppercase/in +++ /dev/null @@ -1 +0,0 @@ -test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test diff --git a/uppercase/logo.jpg b/uppercase/logo.jpg deleted file mode 100644 index f681f3916ea36f0f086e386179c44cd69fb7c0b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20291 zcmeFZcUV*F)-M`FK&6ZHrUIf==^aFnj#24dK{}y_UZe;}3DTv7-kU%|=q*5`OA8Qs z@4ffS+Iy{U?el&6+;i_a=a2Kp89b2rymMw|Fy`p*Z{%j|W)?uAB&R3`z`6qfe7^kw z+-w3!Wx*!a?f@*nT>t!UXKV`i+!uCRdCN8y4i*;HEu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^GtP(xB&3D8o!;o zaYCnV?PPCZ-tA@FCw{#=n|A4N`}xTy z<)yCs_CJ~`cBj=Sp_swmB-^zKE=mMmM^pU#qG_O;-l&GMFY zweQX5rbVre=;K+XA5uK)+H{Myt&4>oFJPD`)ysO`n6W3s%Aax0hq{g*VSlXc%E1jp znb-He@7eoKuX@YQBab{|IeM)Wr={Xg!tk`LP*9+7-ak+~HNCduniSu>RXx|l!)+hW zay|61aOE^dm7{C)Y#&=+`|x#Y$?Z#f6s3U;B5f=_<}jP~XK!R^^V8oP{-+Awcf2-# z99i`4bzH~GsaFmg-*}mkJEg?;5L@|w1}*o@!Z+*6e6H;mTb11P!7Efvp|fCDP{3x% z*q-)-o%;lTG;J4?j;j*b=doT~vvBv->(=aZJ=~kQE39o&OAQ{ZwJ1#9=ebE}FVTlI z;aa#04};l`>1)?29J}kWYtw$`YMHE_-CdXaMW-A!E4lVtR#cAfaJIqU#mCvZth(n; zFV6nv9Bb$r%{n)ssjoQd(sKb|9G5T%DP-hT&Rly;OYY|#w&DXefmfeKe|Yor_Jy;P z?KO%wdHj@%SMI*|R<95^At)#)xWwqptF2Y2i3T4JI+`W)^z-`v49h33_mz#*Pj95nzRHxs4&iLQ_L$X)o|K9`v6nI=P diff --git a/uppercase/uc_graphics.C b/uppercase/uc_graphics.C deleted file mode 100644 index fe15b3e3e1..0000000000 --- a/uppercase/uc_graphics.C +++ /dev/null @@ -1,224 +0,0 @@ -// Berkeley Open Infrastructure for Network Computing -// http://boinc.berkeley.edu -// Copyright (C) 2005 University of California -// -// This is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; -// either version 2.1 of the License, or (at your option) any later version. -// -// This software 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 Lesser General Public License for more details. -// -// To view the GNU Lesser General Public License visit -// http://www.gnu.org/copyleft/lesser.html -// or write to the Free Software Foundation, Inc., -// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -// graphics code for upper_case - -#ifdef _WIN32 -#include "boinc_win.h" -#else -#include -#include "config.h" -#endif - -#include "parse.h" -#include "gutil.h" -#include "boinc_gl.h" -#include "graphics_api.h" -#include "txf_util.h" - -float white[4] = {1., 1., 1., 1.}; -TEXTURE_DESC logo; -int width, height; // window dimensions -APP_INIT_DATA uc_aid; -bool mouse_down = false; -int mouse_x, mouse_y; -double pitch_angle, roll_angle, viewpoint_distance=10; -float color[4] = {.7, .2, .5, 1}; - -static void parse_project_prefs(char* buf) { - char cs[256]; - COLOR c; - double hue; - if (!buf) return; - if (parse_str(buf, "", cs, 256)) { - if (!strcmp(cs, "Tahiti Sunset")) { - hue = .9; - } else if (!strcmp(cs, "Desert Sands")) { - hue = .1; - } else { - hue = .5; - } - HLStoRGB(hue, .5, .5, c); - color[0] = c.r; - color[1] = c.g; - color[2] = c.b; - color[3] = 1; - } -} - -// set up lighting model -// -static void init_lights() { - GLfloat ambient[] = {1., 1., 1., 1.0}; - GLfloat position[] = {-13.0, 6.0, 20.0, 1.0}; - GLfloat dir[] = {-1, -.5, -3, 1.0}; - glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); - glLightfv(GL_LIGHT0, GL_POSITION, position); - glLightfv(GL_LIGHT0, GL_SPOT_DIRECTION, dir); -} - -void app_graphics_init() { - char path[256]; - int viewport[4]; - - boinc_get_init_data(uc_aid); - parse_project_prefs(uc_aid.project_preferences); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - txf_load_fonts("."); - boinc_resolve_filename("logo.jpg", path, sizeof(path)); - logo.load_image_file(path); - init_lights(); - get_viewport(viewport); - app_graphics_resize(viewport[2], viewport[3]); -} - -static void draw_logo() { - if (logo.present) { - float pos[3] = {.2, .3, 0}; - float size[3] = {.6, .4, 0}; - logo.draw(pos, size, ALIGN_CENTER, ALIGN_CENTER); - } -} - -static void draw_text() { - static float x=0, y=0; - static float dx=0.0003, dy=0.0007; - char buf[256]; - x += dx; - y += dy; - if (x < 0 || x > .5) dx *= -1; - if (y < 0 || y > .5) dy *= -1; - sprintf(buf, "User: %s", uc_aid.user_name); - txf_render_string(.1, x, y, 0, 500, white, 0, buf); - sprintf(buf, "Team: %s", uc_aid.team_name); - txf_render_string(.1, x, y+.1, 0, 500, white, 0, buf); - sprintf(buf, "%% Done: %f", 100*boinc_get_fraction_done()); - txf_render_string(.1, x, y+.2, 0, 500, white, 0, buf); -} - -static void draw_3d_stuff() { - static float x=0, y=0, z=10; - static float dx=0.3, dy=0.2, dz=0.5; - x += dx; - y += dy; - z += dz; - if (x < -15 || x > 15) dx *= -1; - if (y < -15 || y > 15) dy *= -1; - if (z < 0 || z > 40) dz *= -1; - float pos[3]; - pos[0] = x; - pos[1] = y; - pos[2] = z; - drawSphere(pos, 4); - drawCylinder(false, pos, 6, 6); -} - -void set_viewpoint(double dist) { - double x, y, z; - x = 0; - y = 3.0*dist; - z = 11.0*dist; - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - gluLookAt( - x, y, z, // eye position - 0,-.8,0, // where we're looking - 0.0, 1.0, 0. // up is in positive Y direction - ); - glRotated(pitch_angle, 1., 0., 0); - glRotated(roll_angle, 0., 1., 0); -} - -static void app_init_camera(double dist) { - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective( - 45.0, // field of view in degree - 1.0, // aspect ratio - 1.0, // Z near clip - 1000.0 // Z far - ); - set_viewpoint(dist); -} - -extern "C" { - -void app_graphics_render(int xs, int ys, double time_of_day) { - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - mode_unshaded(); - mode_ortho(); - draw_logo(); - ortho_done(); - - app_init_camera(viewpoint_distance); - - scale_screen(width, height); - mode_shaded(color); - draw_3d_stuff(); - - scale_screen(width, height); - mode_unshaded(); - mode_ortho(); - draw_text(); - ortho_done(); -} - -void app_graphics_resize(int w, int h){ - width = w; - height = h; - glViewport(0, 0, w, h); -} - -void app_graphics_reread_prefs(){ - boinc_parse_init_data_file(); - boinc_get_init_data(uc_aid); - parse_project_prefs(uc_aid.project_preferences); -} - -void boinc_app_mouse_move(int x, int y, int left, int middle, int right) { - if (left) { - pitch_angle += (y-mouse_y)*.1; - roll_angle += (x-mouse_x)*.1; - mouse_y = y; - mouse_x = x; - } else if (right) { - double d = (y-mouse_y); - viewpoint_distance *= exp(d/100.); - mouse_y = y; - mouse_x = x; - } else { - mouse_down = false; - } -} - -void boinc_app_mouse_button(int x, int y, int which, int is_down) { - if (is_down) { - mouse_down = true; - mouse_x = x; - mouse_y = y; - } else { - mouse_down = false; - } -} - -void boinc_app_key_press(int, int){} - -void boinc_app_key_release(int, int){} - -} diff --git a/uppercase/upper_case.C b/uppercase/upper_case.C deleted file mode 100755 index ef9db80b47..0000000000 --- a/uppercase/upper_case.C +++ /dev/null @@ -1,274 +0,0 @@ -// Berkeley Open Infrastructure for Network Computing -// http://boinc.berkeley.edu -// Copyright (C) 2005 University of California -// -// This is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; -// either version 2.1 of the License, or (at your option) any later version. -// -// This software 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 Lesser General Public License for more details. -// -// To view the GNU Lesser General Public License visit -// http://www.gnu.org/copyleft/lesser.html -// or write to the Free Software Foundation, Inc., -// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -// DEPRECATED!!! Use example_app/ instead -// -// This is the primary sample BOINC application; -// it shows most of the features of the BOINC API. -// -// read "in", convert to upper case, write to "out" -// -// command line options (use for debugging various scenarios): -// -run_slow: sleep 1 second after each character; useful for debugging -// -cpu_time N: use about N CPU seconds after copying files -// -early_exit: exit(10) after 30 chars -// -early_crash: crash after 30 chars -// - -#ifdef _WIN32 -#include "boinc_win.h" -#else -#include "config.h" -#endif - -#ifndef _WIN32 -#include -#include -#include -#include -#include -#include -#include -#endif - -#define BOINC_APP_GRAPHICS - -#ifdef BOINC_APP_GRAPHICS -#include "graphics_api.h" -#include "graphics_lib.h" -#endif - -#include "diagnostics.h" -#include "str_util.h" -#include "util.h" -#include "filesys.h" -#include "boinc_api.h" -#include "mfile.h" - -using std::string; - -#define CHECKPOINT_FILE "upper_case_state" -#define INPUT_FILENAME "in" -#define OUTPUT_FILENAME "out" - -bool run_slow = false; -bool early_exit = false; -bool early_crash = false; -bool early_sleep = false; -double cpu_time = 20; - - -static void use_some_cpu() { - double j = 3.14159; - int i, n = 0; - for (i=0; i<20000000; i++) { - n++; - j *= n+j-3.14159; - j /= (float)n; - } -} - -int do_checkpoint(MFILE& mf, int nchars) { - int retval; - string resolved_name; - - FILE* f = fopen("temp", "w"); - if (!f) return 1; - fprintf(f, "%d", nchars); - fclose(f); - - fprintf(stderr, "APP: upper_case checkpointing\n"); - - retval = mf.flush(); - if (retval) return retval; - boinc_resolve_filename_s(CHECKPOINT_FILE, resolved_name); - retval = boinc_rename("temp", resolved_name.c_str()); - if (retval) return retval; - - //use_some_cpu(); - fprintf(stderr, "APP: upper_case checkpoint done\n"); - return 0; -} - - -void worker() { - int c, nchars = 0, retval, n; - double fsize; - char input_path[512], output_path[512], chkpt_path[512]; - MFILE out; - FILE* state, *infile; - - // open the input file (resolve logical name first) - // - boinc_resolve_filename(INPUT_FILENAME, input_path, sizeof(input_path)); - infile = boinc_fopen(input_path, "r"); - if (!infile) { - fprintf(stderr, - "Couldn't find input file, resolved name %s.\n", input_path - ); - exit(-1); - } - - // get size of input file (used to compute fraction done) - // - file_size(input_path, fsize); - - // open output file - // - boinc_resolve_filename(OUTPUT_FILENAME, output_path, sizeof(output_path)); - - // See if there's a valid checkpoint file. - // If so seek input file and truncate output file - // - boinc_resolve_filename(CHECKPOINT_FILE, chkpt_path, sizeof(chkpt_path)); - state = boinc_fopen(chkpt_path, "r"); - if (state) { - n = fscanf(state, "%d", &nchars); - fclose(state); - } - if (state && n==1) { - fseek(infile, nchars, SEEK_SET); - boinc_truncate(output_path, nchars); - retval = out.open(output_path, "a"); - } else { - retval = out.open(output_path, "w"); - } - if (retval) { - fprintf(stderr, "APP: upper_case output open failed:\n"); - fprintf(stderr, "resolved name %s, retval %d\n", output_path, retval); - perror("open"); - exit(1); - } - - // main loop - read characters, convert to UC, write - // - for (int i=0; ; i++) { - c = fgetc(infile); - - if (c == EOF) break; - c = toupper(c); - out._putchar(c); - nchars++; - if (run_slow) { - boinc_sleep(1.); - } - - if (early_exit && i>30) { - exit(-10); - } - - if (early_crash && i>30) { -#ifdef _WIN32 - DebugBreak(); -#else - *(int*)0 = 0; -#endif - } - if (early_sleep && i>30) { - g_sleep = true; - while (1) boinc_sleep(1); - } - - if (boinc_time_to_checkpoint()) { - retval = do_checkpoint(out, nchars); - if (retval) { - fprintf(stderr, "APP: upper_case checkpoint failed %d\n", retval); - exit(retval); - } - boinc_checkpoint_completed(); - } - - double f = nchars/fsize; - if (cpu_time) f /= 2; - boinc_fraction_done(f); - } - - retval = out.flush(); - if (retval) { - fprintf(stderr, "APP: upper_case flush failed %d\n", retval); - exit(1); - } - - // burn up some CPU time if needed - // - if (cpu_time) { - double start = dtime(); - while (1) { - double e = dtime()-start; - if (e > cpu_time) break; - boinc_fraction_done(.5 + e/(cpu_time*2)); - - if (boinc_time_to_checkpoint()) { - retval = do_checkpoint(out, nchars); - if (retval) { - fprintf(stderr, "APP: upper_case checkpoint failed %d\n", retval); - exit(1); - } - boinc_checkpoint_completed(); - } - - use_some_cpu(); - } - } - boinc_finish(0); -} - -int main(int argc, char **argv) { - int i; - int retval = 0; - - for (i=0; i