Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / AGK Project in a Mood (missing files)

Author
Message
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Jan 2012 23:10
I'm running and testing my AppGameKit Project in Windows 7. All has gone well for 2 or 3 weeks. Then I needed to delete a file from the <Documents>/AGK/Project folder (where it runs from). It worked for a couple of times, but now it won't copy my media and files into the Documents runtime folder. All of the AppGameKit default images are copied OK, but not my stuff.

I got to the point where I deleted the entire folder, which it recreated, added the media folder, added the AppGameKit bits but omitted mine again.

Does anyone know how this is controlled, and if there is a "reset" flag somewhere?

LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 6th Jan 2012 13:13
In AppGameKit Tier 1, your media files remain in the Project folder. Only the interpreter graphics are copied to the Documents temp folder. Are you referring to Tier 2 behaviour?

I drink tea, and in my spare time I write software.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Jan 2012 14:55
Does that include new and edited files? My debug.txt file always goes into My Documents.

I think I have got my head around the issue. While the files are read-only they stay in the media folder. But as soon as you openToWrite(), they drop into My Documents. Does that sound about right?

Next task is to check what happens if you makes changes manually in the media folder whilst there is another version in My documents.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 6th Jan 2012 16:10
There is no way right now in T1 to alter files in the media folder!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Jan 2012 17:39
Quote: "There is no way right now in T1 to alter files in the media folder!"


Yes you can, you just need to be a little creative!

1. Copy the file
2. Read in the copied file and make any necessary changes as you write it back out to the original filename
3. Delete the copy.

The only quirk of this is that on Windows it moves the file from Media to My Documents as demonstrated in my example here.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 6th Jan 2012 18:19
exactly my point. You cannot load a file from the meida folder, alter it, and save it back to its original location. maybe 107 will fix that
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Jan 2012 00:49
That's nothing to worry about though for a deployed program. It will put the files where they need to be, albeit in different places.

I do agree though, it would be nice for everything to be in one place. The problem with Windows though is that place must be My Documents, not the media folder in the program folder. Otherwise all of your users would have to have admin rights and you can't force that requirement on them.

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 10th Jan 2012 18:18
For clarification, things in the media folder are read only and cannot be deleted. Things that are created or changed are put in the write folder in my documents. If a file in the media folder and a file in the write folder have the same name the one in the write folder is used. Deleting such a file using its file name will delete only the copy in the write folder.
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 26th Jan 2012 23:27
In 107 build we will be adding a command called SetWriteDir(".") which will allow you full access to your local media folder alongside your project/exe for Windows and Mac. Keep the feedback coming

I drink tea, and in my spare time I write software.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 27th Jan 2012 10:29
SetWriteDir()

Please remove the automatic creation of the AppGameKit directory and subdirectories in MyDocuments

Login to post a reply

Server time is: 2024-11-23 01:53:38
Your offset time is: 2024-11-23 01:53:38