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 / working directory [AGK2]

Author
Message
Dobro
6
Years of Service
User Offline
Joined: 23rd Apr 2018
Location: France
Posted: 9th Aug 2019 11:28 Edited at: 9th Aug 2019 11:34
hello..,

I am very disappointed by Application Game Kit2

it seems impossible to force him to work on a personalized work directory...

by default, under windows 10, it works in the "C:\Users\Name_user\AppData\Local\AGKApps" directory

I installed AGK2 in the directory
"D:\Dobro\App Game Kit 2\"

in which I have a "Projects" folder

I expect my programs to work in this directory..
I don't understand that by default, it goes to C:\........... etc

why not respect the programmer's choice to work in his repertoire!

even if I do "
" at the beginning of code (which is already a mistake)

It doesn't work!!!

to take a comparison, with the Purebasic,
when I code in a directory, my code works in that directory
and its "root" reference is this directory, it will not run in another directory!

when I use B4A it's the same!

a program must take its files from where it is located
where it was planned, that it happens to be.....

this problem only exists, with AppGameKit 2.....

tell me, is that how Application Game Kit Studio works too?
if so, I don't invest in it...

I've been looking for a week for a way not to let AGK2
uses my System disk (c:\)
that I want him to use my disk d:\

I'm not talking about reading a file in x place.
but rather a current work directory!
"GetCurrentDirrectory()"

I don't understand why no one is bothered by this.

Translated with www.DeepL.com/Translator
Carpe Diem
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 9th Aug 2019 11:51
Setfolder is depreciated
use write("raw:\Dobro\App Game Kit 2\Projects\Dobro\procedural_world\media.txt")
or save with raw path etc

the reason why they go to c:\users\appdata\agk app\filename by default is this was designed
originally as a sort of temp location and is required to be done this way to work within Android
requirements. And AppGameKit was originally designed to be ported to mobile
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Dobro
6
Years of Service
User Offline
Joined: 23rd Apr 2018
Location: France
Posted: 9th Aug 2019 12:58 Edited at: 9th Aug 2019 13:15
Thank you for the feedback,

SetFolder is not depreciated!
it is "SetCurrentDir" which is


the answer that it would be for Android is a bad excuse!
the workplace should be local to the executable under windows!

and it is only at the time of compilation (or manufacture of the APK) that the installation must be in the right place for android...
note that I have already installed Apk on my SD card without any problems...

the problem I'm raising concerns only Windows!
it could be solved, if AppGameKit used the application folder at the time of its creation (like most computer languages or programs....
the working directory can be defined at the time of installation...

there, we don't control anything...

on my "C:\" SSD I have 235 go (115 free)
while on my "D:\" hard drive I have 1.80 Tera!!!!!

why am I going to risk saturating my SSD???

No, seriously, it's a real problem.


PS :

I'm talking about a relative working directory,
use Raw: with a direct path, doesn't make sense, when I'm going to distribute
my program, the future user, will not have the same path as me



for example : in purebasic

this code :


Debug GetCurrentDirectory() ; <------------ return "D:\temp\" the current directory of my prg
Debug GetHomeDirectory() ; <----------------- return "C:\Users\Dobro\" , my user directory
Debug GetUserDirectory(#PB_Directory_Documents) ; return "C:\Users\Dobro\Documents\"
Debug GetTemporaryDirectory() ; <------------- return " C:\Users\Dobro\AppData\Local\Temp\"
Debug #PB_Compiler_Home ; <--------- return "D:\Dobro\PureBasic_5_70\x86\" directory of compiler
Debug #PB_Compiler_File ; <------------- return "D:\temp\Nouveau.pb" the path of my prg
Debug #PB_Compiler_Filename ; <----------- the name of file of my prg
Debug #PB_Compiler_FilePath ; < ----------- return the path of my prg "D:\temp\"


purebasic work on Linux, Mac and Windows ...




Translated with www.DeepL.com/Translator
Carpe Diem
Increase
7
Years of Service
User Offline
Joined: 21st Feb 2017
Location:
Posted: 9th Aug 2019 13:29

Worldwide optimal state system - ISBN 9783748157748
Weltweit optimales Staatssystem - ISBN 9783748159476
Dobro
6
Years of Service
User Offline
Joined: 23rd Apr 2018
Location: France
Posted: 9th Aug 2019 14:26 Edited at: 9th Aug 2019 14:41
Arf!!!

Thank you. Thank you.

it's almost that, because at home
getreadpath() returns ----> "D:/Dobro/App Game Kit 2/Tier 1/Compiler/interpreters/"

while the application is in : ------> "D:\Dobro\App Game Kit 2\Projects\Dobro\procedural_world"

It's nice of you to try.

PS :
the advantage of a Getcurrentdirectory() (which works)

is that even if we change the location of the program

It's always going to send the good path to the prg!
it allows "portable" applications




setcurrentdirectory() forces the program to work on a specific folder, any read and write functions are linked to setcurrentdirectory()

Apparently AGK2 and Studio are not having that?!
Carpe Diem

Login to post a reply

Server time is: 2024-04-23 06:33:06
Your offset time is: 2024-04-23 06:33:06