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 / Call AGK compiler from outside of editor ?

Author
Message
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 19th Apr 2020 13:23
Is it possible to call AppGameKit compiler from outside of AppGameKit (classics or studio) editor ?
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 19th Apr 2020 22:03
Yes. I'm pretty sure you can do this.
There are command line options that will compile/run/broadcast/debug the program
I know there is a thread around somewhere which documents this but having had a look just now i cant find it
This is an extension for Notepad++. I think you might find the command line options somewhere in there

Note that the compiler is bound with the IDE in Studio so this is not possible in Studio
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 20th Apr 2020 13:57 Edited at: 20th Apr 2020 13:58
@blink0k :
Thank you for your reply.
Too bad that compiler is bound in IDE with Studio as this request was to analyse small source codes for code composition in my 2DMapEditor project...
I will make this functionality available for AppGameKit Classics and will request TGC help to know if they can find a solution for me (the objective is not to create executable but just check source code for errors).

The link for notepad extensions provides me the information I required :
Quote: "Compile
"F:\AGK108B19\IDE\Compiler\AGKCompiler.exe" -agk $(FULL_CURRENT_PATH)"


Thank you ! Problem solved for Classics. Will require attention for Studio.
DannyD
6
Years of Service
User Offline
Joined: 29th Aug 2017
Location:
Posted: 20th Apr 2020 14:19
I Can't find the thread link now, but there were a discussion in AGKS that someone said they will ask Preben if it will be possible to do a compiler commandline for AGKS.
Maybe search the AGKS forum....
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 20th Apr 2020 22:42
I would add a request for this over at github
https://github.com/TheGameCreators/AGK-Studio/issues
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 21st Apr 2020 01:44 Edited at: 21st Apr 2020 01:44
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 21st Apr 2020 08:20 Edited at: 21st Apr 2020 08:20
blink0k wrote: "I would add a request for this over at github
https://github.com/TheGameCreators/AGK-Studio/issues"


Fubarpk already added a request for access to the compiler in AppGameKit studio back in december
https://github.com/TheGameCreators/AGK-Studio/issues/582

The compiler access in classic is no problem.
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 21st Apr 2020 09:01
Thank you all for your answers.
Really instructives ones for some

But my requirements are really light.
1. Compiles an .agk project
2. Get result (errors or compilation ok)

I got the answer for classics and will integrate my idea in my 2DMapEditor project
Will keep an eye for AppGameKit Studio compiler release to add support for it if changes must be done for ~.

Thank you all.
Regards,
Freddix
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 21st Apr 2020 12:22
Tried a cmd line without success... Agk compiler does not compiles, nor return error or anything else. Anyone have an idea?
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 21st Apr 2020 14:44
If you put the project in the folder with the compiler and run cmd as administrator, then this works.
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 21st Apr 2020 15:03 Edited at: 21st Apr 2020 15:08
[href]null[/href]ow, and you put the compiler argument -agk + the source code to compiles inside double quotes..
But having to copy everything inside the AppGameKit compiler directory may be bad way of doing thing. More to this, I must be able to run the compiler from inside an AppGameKit executable this mean that I have no control over administrator on/off capabilities of the executable (except by telling user "you must make 2DMapEditor.exe being run as adminitrator" .. Not top. It must be simpler... AppGameKit can run compiler without being adminsitrator of the computer. right ? So I must found a solution ....

I must also found a solution to compiles directly in another folder....

Tried to put AGKCompiler.exe being auto-used as administrator (properties of executable) didn't work there.. .exe is not generated
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 21st Apr 2020 15:04
Very strange, the full path does not work for me, but if you look at https://github.com/TheGameCreators/AGKIDE/blob/master/data/filetypes.agk it says how to access the command line.

Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 21st Apr 2020 15:14
I found my old record of how it worked for me. I'll try to repeat.
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 21st Apr 2020 15:19 Edited at: 21st Apr 2020 15:56
It works!!

x32 (x86)


x64
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 21st Apr 2020 15:33
When I use your last code snippet and adapt it to my install folders (path for the Agc file) ...
Nothing happen ... no error message ... no .exe compiled ..
Same result than before
(I'm on Windows 7)
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 21st Apr 2020 17:05
The same parameters were in 2016.
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 22nd Apr 2020 14:23 Edited at: 22nd Apr 2020 14:37
Will get it a try again ... I've probably done something wrong.

EDIT : I didn't see you log output as ... there was an error and nothing generated.
Now it work correctly.
Thank you.

I'll have to make user define the AppGameKit installation path to use this inside my 2DMapEditor tool.
Thank you.
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 2nd Jun 2020 00:27
Freddix, a little more precise, if you change the -agk to -run then it will compile and run.

Login to post a reply

Server time is: 2024-04-25 13:54:04
Your offset time is: 2024-04-25 13:54:04