Remove ability to open a published executable from Blender.
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>
Sat, 24 Apr 2004 06:29:51 +0000 (06:29 +0000)
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>
Sat, 24 Apr 2004 06:29:51 +0000 (06:29 +0000)
source/blender/blenloader/intern/readblenentry.c
source/blender/readblenfile/intern/BLO_readblenfile.c
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp

index bf4a634e8edb8ecdc338b7875f49943fce25f7c3..a008142be66c760d0f682dd1c973ff000524857d 100644 (file)
@@ -251,12 +251,6 @@ BlendFileData *BLO_read_from_file(char *file, BlendReadError *error_r) {
                        strcpy(bfd->main->name, file);
                }
                blo_freefiledata(fd);                   
-       } else if (blo_is_a_runtime(file)) {
-               bfd= blo_read_runtime(file, error_r);
-               if (bfd) {
-                       bfd->type= BLENFILETYPE_RUNTIME;
-                       strcpy(bfd->main->name, file);
-               }
        }
 
        return bfd;     
index 698fed79842d3f2c86109d54dea66ec0c8acb9d5..7fdad84089520220c1bdc0ea6132434f18fb4e55 100644 (file)
@@ -161,7 +161,7 @@ blo_read_runtime(
                *error_r= BRE_NOT_A_BLEND;
                goto cleanup;
        } else {        
-               printf("starting to read runtime from %s at datastart %d\n", path, datastart);
+               //printf("starting to read runtime from %s at datastart %d\n", path, datastart);
                lseek(fd, datastart, SEEK_SET);
                bfd = blo_read_blendafterruntime(fd, actualsize-datastart, error_r);
        }
index acdf3027f19b82f95b6cbc1c421a917e024e637f..897fb4f27cdd58e439aa7a975ca9a59c6581d386 100644 (file)
@@ -63,6 +63,7 @@ extern "C"
 #include "BLI_blenlib.h"
 #include "DNA_scene_types.h"
 #include "BLO_readfile.h"
+#include "BLO_readblenfile.h"
        
        int GHOST_HACK_getFirstFile(char buf[]);
        
@@ -175,14 +176,19 @@ char *get_filename(int argc, char **argv) {
 
 BlendFileData *load_game_data(char *progname, char *filename) {
        BlendReadError error;
-       BlendFileData *bfd;
+       BlendFileData *bfd = NULL;
        
        /* try to load ourself, will only work if we are a runtime */
-       bfd= BLO_read_from_file(progname, &error);
-       
-       if (!bfd) {
+       if (blo_is_a_runtime(progname)) {
+               bfd= blo_read_runtime(progname, &error);
+       }
+       if (bfd) {
+               bfd->type= BLENFILETYPE_RUNTIME;
+               strcpy(bfd->main->name, progname);
+       } else {
                if (filename) {
-                       bfd= BLO_read_from_file(filename, &error);
+                       return load_game_data(filename, NULL);
+//                     bfd= BLO_read_from_file(filename, &error);
                }
        }
        
@@ -566,7 +572,7 @@ int main(int argc, char** argv)
                                                {
                                                        system->processEvents(false);
                                                        system->dispatchEvents();
-                                                       if (exitcode = app.getExitRequested())
+                                                       if ((exitcode = app.getExitRequested()))
                                                        {
                                                                run = false;
                                                                exitstring = app.getExitString();