Keeping files external

Monkey Targets Forums/Desktop/Keeping files external

Leon Brown(Posted 2012) [#1]
Hi. I've noticed that compiling Monkey with the GLFW target produces an executable with all media embedded - how would I compile to keep all media external from the executable?


muddy_shoes(Posted 2012) [#2]
Are you sure? My media is all sitting in a data folder under the executable folder.


Leon Brown(Posted 2012) [#3]
Files are being kept external on the HTML5, but not on the GLFW build - at least that's how it appears with files being altered int he data folder not updating in the executable.


muddy_shoes(Posted 2012) [#4]
Altered in which data folder? If you're on Windows the data files are copied to a data folder in the same place that the exe ends up. I can edit my text files there and they're clearly being read by the executable.


therevills(Posted 2012) [#5]
On my version of Monkey GLFW does not produce an exe with media embedded...

And I believe the only target which does is Flash.


Leon Brown(Posted 2012) [#6]
On the HTML5 target, all media is put in the data folder that is located in the same folder as the monkeygame.html and main.js code files. On GLFW, the executable is located at:

xcode/build/release/MonkeyGame

... and the data files are located at :

/xcode/data/

Changing the data files makes now change to the executable. Unless I'm changing the wrong version of the data files - although I can't see why they would be stored anywhere else.


therevills(Posted 2012) [#7]
My GFLW build folder looks like this:

test.build\
  glfw\
    glfw\
    openal\
    stb\
    vc2010\
      build\
      Release\
        data\
          mojo_font.png
        MonkeyGame.exe
        MonkeyGame.pdb
      MonkeyGame.exe
      MonkeyGame.sln
      MonkeyGame.vcxproj
      MonkeyGame.vcxproj.filters
    xcode\
    CONFIG.TXT
    main.cpp
    main.h
    README.TXT


And I grab the exe and data folder from glfw\vc2010\Release\

[Edit: Quick Q - What OS are you trying this on? I havent tried GFLW on a Mac, just Windows ]


Leon Brown(Posted 2012) [#8]
The only thing I see in my release folder is MonkeyGame - the data folder is on the same level as the build folder. Maybe Mac builds are different to Windows?


JIM(Posted 2012) [#9]
Mac builds differ a lot from Windows builds if they're anything like iOS (which I think they are).

All the data (including executable - even multiple versions of the executable, for PPC and Intel) are all packed in one file. That's the application package. And it's pretty much equivalent to .app on iOS or .apk on Android.

It should be fairly easy to open and edit (somewhat like a zip archive) so your files are sort of external.

I'm not quite familiar with OSX so I can't help you further :(


AdamRedwoods(Posted 2012) [#10]
on macosx, you can control-click and view app contents, your files will be there. it's just a folder, you can edit the contents inside.

But if you need the files separate, I think the xcode.proj file within the monkey folder is what describes how the app bundle is built. you may want to check there first.


therevills(Posted 2012) [#11]
Okay next time anyone asks a question about GLFW, they need to put the OS they are using - this is now LAW! ;)


TheRedFox(Posted 2012) [#12]
OSX apps look like a single file but are a package.
Right click in Finder and open the package, go into the Resources/Content branch and you'll see the stuff.