Sign in to follow this  
Kest

Emulating read-only drives

Recommended Posts

Sorry, I'm not sure where I should be posting this. Anyway, is this possible? Say for example, I want to make sure my game can run entirely off of a CD-ROM. Do I need to burn a new CD for every bug fix? Is there a way I can rig a folder to disallow my code to modify files? Thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by smart_idiot
Quote:
Original post by BKBen7
You could always use Daemon-Tools and mount an iso to a virtual CD drive


/me seconds


Just burn images. It is much cheaper. [smile]

Share this post


Link to post
Share on other sites
(In the case of windows) Right mouse on the directory, select Properties and check "Read Only". It'll then ask you if you want to do files and subfolders.

If you want to do it from a command prompt or as a post build event you can use:

attrib /s +r <folder name>

You can use that to simulate it during incremental changes.

Share this post


Link to post
Share on other sites
Quote:
Original post by SiCrane
What operating system are you using?

Sorry for leaving out the details. I'm running Windows XP HE.

Quote:
Original post by BKBen7
You could always use Daemon-Tools and mount an iso to a virtual CD drive

I'll look into that. Thanks :)

Quote:
Original post by nprz
Just burn images. It is much cheaper. [smile]

Even burning the images would take considerable time. This might sound pretty dumb, but how do you run a CD image?

Quote:
Original post by MauMan
(In the case of windows) Right mouse on the directory, select Properties and check "Read Only". It'll then ask you if you want to do files and subfolders.

I don't think this pertains to directories, just the files in those directories. Unfortunately, my game doesn't do much modifying of existing files. The code could still create new files and such with this setup. I have a pretty robust engine - I'm not sure I can even remember what all happens in between the lines. That's why I want to simulate this.

I would love to find a way to make this effortless. A way to toggle absolute-read-only state on a folder perhaps? I suppose I can use a simpler method, then finalize tests with images or CDs.

I appreciate the help :)

Share this post


Link to post
Share on other sites
On Windows, I believe you can create a share on your own machine, then mount it on a drive letter (with Windows Explorer or "net use"). Set the ACL on the share to allow only readonly access.

You should then have a directory on a drive letter which has the same contents as that directory, but is readonly.

Shares have ACLs which are independent from the filesystem ones, and can be applied even if the filesystem does not support ACLs itself (FAT32 for example).

Mark

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this