App version

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
dlee
Veteran Member
Posts: 168
Joined: 2020-04-14 00:21
Location: South Carolina, USA
Contact:

App version

Post by dlee » 2023-09-15 02:55

How can I tell which version of Appgini I used to generate a web app?
TD

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1944
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: App version

Post by jsetzer » 2023-09-15 05:21

I. Javascript
I.1 In Browser
In new versions there is a version-property which you can evaluate in javascript, for example in console prompt of your browser's developer tools:

Code: Select all

AppGini.version
chrome_aXkEc9BGZv.png
chrome_aXkEc9BGZv.png (1.16 KiB) Viewed 3045 times

I.2 In Code
Open common.js. In new versions there should be a version-initialization around line 3:

Code: Select all

AppGini.version = 22.14;
---

II. PHP
II.1 At Runtime

In new versions there is a PHP constant APP_VERSION, defined in definitions.php:

Code: Select all

@define('APP_VERSION', '22.14');
You can use the constant in any of your PHP files, for example output the version in the browser like this:

Code: Select all

<!-- file: hooks/header-extras.php -->
<script>
    modal_window({
        title: 'AppGini Version',
        message: 'v.<?= APP_VERSION ?>'
    });
</script>
chrome_wsXPT78Na2.png
chrome_wsXPT78Na2.png (62.58 KiB) Viewed 3045 times

II.2 In Code

You can also check code-comments in generated PHP cocde, for example open any of your TABLENAME_dml.php files and see the comments in the first couple of lines:

Code: Select all

<?php
// ...
// This script and data application were generated by AppGini 22.14
// ...
Or simply search all your project files for the string "were generated by AppGini".

III. Project file (*.axp)

Open your project file (which actually is XML) in your text-editor (not in AppGini itself) and search for <version>
Code_NsTkWSFDLC.png
Code_NsTkWSFDLC.png (7.38 KiB) Viewed 3045 times

---

PS: I know BigProf has inserted version information a while ago. I don't know for older versions. If you are using an older version, probably a 5.x version, you could try searching your files for 5. and check if there are any code comments, generated by that older version. I have just opened an older project and found code comments like this one which means at least since 5.72 there should be code such comments:

Code: Select all

// This script and data application were generated by AppGini 5.72
Does anyone know for older versions?

Hope this helps.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 25.10 + all AppGini Helper tools

dlee
Veteran Member
Posts: 168
Joined: 2020-04-14 00:21
Location: South Carolina, USA
Contact:

Re: App version

Post by dlee » 2023-09-15 14:05

Wow, thank you Jan !

Post Reply