forked from bartvdbraak/blender
Remove ability to open a published executable from Blender.
This commit is contained in:
parent
8ff958e821
commit
3a2194a534
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user