Recent posts

#1
General Archi Discussion / Re: Custom Preferences when Ge...
Last post by Phil Beauvoir - May 14, 2025, 10:23:23 AM
Good news!

The relative path thing only occurred to me last night. I always thought that Eclipse locates paths in an .ini file relative to the matching .exe file. Not so.

I've updated the wiki to reflect this - https://github.com/archimatetool/archi/wiki/How-to-create-a-packaged-version-of-Archi-(including-configuration-and-plugins)
#2
Quote from: Phil Beauvoir on May 13, 2025, 20:03:32 PMIt does work. I have it working here.

To test, create a localised copy of Archi 5.6 as follows:

1. Download Archi 5.6 zip version
2. Unzip it somewhere in a folder
3. Replace the Archi.ini file with this:

...

For me this is working and using the colors and settings in "custom_defaults.prefs" (the one you posted here)


I just tested it this morning : it works for me too !

Quote from: Phil Beauvoir on May 13, 2025, 20:30:40 PMI think I know what the problem might be - paths in the Archi.ini file are relative to the directory from where you launch Archi.

If you have the following in your "Archi.ini" file you need to also run Archi from the same directory:

-pluginCustomization
custom_defaults.prefs

If you are not running Archi from the same directory in your CLI script, then you need to make it an absolute path something like this:

-pluginCustomization
c:/path_to_archi_folder/custom_defaults.prefs

Or you could change directory to the Archi directory in the calling script:

cd path_to_archi_folder
Archi -application com.archimatetool.commandline.app....

Eureka !  :o  :o

I followed your tip and tested this in my Archi.ini :

-pluginCustomization
c:/path_to_archi_folder/custom_defaults.prefs

...and it works like a charm ! Well done ! (I should have thought of it, shame on me)
(and thanks again for your time and your precious help... I'll sleep better now that I have the key to the mystery  ;D )
#3
General Archi Discussion / Re: Custom Preferences when Ge...
Last post by Phil Beauvoir - May 13, 2025, 20:30:40 PM
I think I know what the problem might be - paths in the Archi.ini file are relative to the directory from where you launch Archi.

If you have the following in your "Archi.ini" file you need to also run Archi from the same directory:

-pluginCustomization
custom_defaults.prefs

If you are not running Archi from the same directory in your CLI script, then you need to make it an absolute path something like this:

-pluginCustomization
c:/path_to_archi_folder/custom_defaults.prefs

Or you could change directory to the Archi directory in the calling script:

cd path_to_archi_folder
Archi -application com.archimatetool.commandline.app....
#4
General Archi Discussion / Re: Custom Preferences when Ge...
Last post by Phil Beauvoir - May 13, 2025, 20:03:32 PM
Quote from: Eric Vendeville on May 13, 2025, 19:47:58 PMArchi's CLI only search for (and work with) com.archimatetool.editor.prefs : it seems to ignore the custom_defaults.prefs) !

It does work. I have it working here.

To test, create a localised copy of Archi 5.6 as follows:

1. Download Archi 5.6 zip version
2. Unzip it somewhere in a folder
3. Replace the Archi.ini file with this:

-startup
plugins/org.eclipse.equinox.launcher_1.6.800.v20240513-1750.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.1000.v20240507-1834
-cleanConfig
--launcher.defaultAction
openFile
-pluginCustomization
custom_defaults.prefs
-eclipse.keyring
@user.home/AppData/Roaming/Archi/secure_storage
-vmargs
-Dosgi.requiredJavaVersion=21
-Dfile.encoding=UTF-8
-Declipse.p2.data.area=@config.dir/p2
-Ddata.location=@user.home/Documents/Archi
--add-modules=ALL-SYSTEM
-Dosgi.instance.area=workspace
-Dosgi.configuration.area=workspace/config
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=%user.home%/AppData/Roaming/Archi/dropins

4. Copy the "custom_defaults.prefs" file into this Archi folder
5. Create a script file called "run.bat" in this Archi folder:

Archi -application com.archimatetool.commandline.app -consoleLog -nosplash --modelrepository.loadModel "path_to_archi_repo" --html.createReport "C:\Users\YourName\Desktop\Test"

6. Run the run.bat file

For me this is working and using the colors and settings in "custom_defaults.prefs" (the one you posted here)
#5
A last and final post (I promise  ;D ), just because I need to clarify my own last message :

  • Archi's GUI works exactly as you depicted (search for com.archimatetool.editor.prefs, and uses custom_defaults.prefs instead if it does not exist... this works fine on my environment : I can indeed see how my custom prefs (defined in custom_defaults.prefs) are loaded and rendered in Archi's Preferences menus)
  • Archi's CLI only search for (and work with) com.archimatetool.editor.prefs : it seems to ignore the custom_defaults.prefs) !

I'm pretty sure of myself this time...
#6
Thanks for your reply Phil.

OK, i think I understood the expected behavior now.

I (ideally) now have to understand why (when that com.archimatetool.editor.prefs file does not exist) my packaged version of archi refuses to default to the preferences set in my custom_defaults.prefs  :'(  :'(  :'(

(but I've taken up enough of your time... it will be for next time...  ;D )
#7
General Archi Discussion / Re: Custom Preferences when Ge...
Last post by Phil Beauvoir - May 13, 2025, 18:02:17 PM
Quote from: Eric Vendeville on May 13, 2025, 17:56:40 PMBut on "archi's side", and after fixing the above mentioned problem, I realized that my "packaged version of archi" (with the custom_defaults.prefs), when first executed right after install (either through the GUI or the CLI), do not automatically create/generate the appropriate ~/.archi/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.archimatetool.editor.prefs as (I think) it should.

Hi, no it won't add to that file unless you change the default manually in Archi. It will read that file and preference if it exists, otherwise it defaults to what it finds in custom_defaults.prefs.
#8
Hello Phil,

I'm back to give some news (sorry for the delay... i've been busy with other "higher priority" matters...)

After a few more hours investigating the problem, I finally understood what was happening... and I feel like the ""blame"" is (perhaps ?) to be shared :

  • On my side, the paths used in my Archi.ini file (relying on the %user.home% environment variable) did not refer to the directory I was thinking of at first (because the azure agent that run Archi in CLI mode has been deployed by a colleague of mine, then it was (logically) using his %user.home%, not mine... I should have thought of it before...  ::)  :-[ )
  • But on "archi's side", and after fixing the above mentioned problem, I realized that my "packaged version of archi" (with the custom_defaults.prefs), when first executed right after install (either through the GUI or the CLI), do not automatically create/generate the appropriate ~/.archi/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.archimatetool.editor.prefs as (I think) it should... Yet, some other files like ~/.archi/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs (among others...) are well created/generated... so this time, it's no longer a "path resolution" problem...(

I also saw the following discussion on Archi's issues tracker :
https://github.com/archimatetool/archi/issues/1142

It seems like I'm not the only one who has encountered this problem (op finally managed to apply the prefs by manually putting the file in ~/.archi/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.archimatetool.editor.prefs too, as I did).

Not a big deal thoug, we can deal (and live) with it... but maybe this post will help other people facing the same difficulty in the future !  :)



 
#9
Archi Development / Re: Using ELK with Archi for a...
Last post by Alexis_H - May 13, 2025, 15:37:54 PM
Hi @fanievh, you're welcome. Nice to hear that it helped you.

I didn't found enough available time to finalize this ELK/Archi integration, maybe I will in the summer time ;)

Regards,
Alexis
#10
General Archi Discussion / Archi 5.6 Released
Last post by Phil Beauvoir - May 12, 2025, 12:34:14 PM
Hi everyone,

Archi version 5.6 is now available.

The download is here - https://www.archimatetool.com/download

And the version history is here - https://www.archimatetool.com/version-history

Thanks to everyone for supporting Archi!

Phil