Store data in executable

前端 未结 6 1952
梦毁少年i
梦毁少年i 2021-01-02 07:15

I\'m just curious about this for a long time.

Is it possible for an application to store some changeable data (like configurations and options) inside its own execut

6条回答
  •  清歌不尽
    2021-01-02 07:27

    Yes, it's possible. You probably shouldn't do it.

    Mac OS X does have the concept of "bundles" where they combine an executable and its resources into one "package" (file ending in .app), but I'm not sure it's typical for applications to modifying their own bundles, and most other operating systems don't work that way either as far as I know. It's more of a facility to store images and audio and so forth along with the code, as opposed to storing configuration data that is going to be modified when the program runs.

提交回复
热议问题