Relative vs Absolute path during export

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Kaushik
:warning: Old Version Published before Godot 3 was released.

I am using a custom java module as well as a release key in my project. If I give absolute path for them in export options, they work fine. However, if I try to give relative path, with res://, the custom apk works, but while fetching the keystore, godot is implicitly prefixing the absolute path before res, resulting in export being failed. Details:
export.cfg

custom_package/release=“res://custom_apk/java-release.apk”
keystore/release=“res://keystore_key/release.keystore”
terminal output during export

jarsigner error: java.lang.RuntimeException: keystore load: /home/kaushik/godot/projects/texttest/res:/keystore_key/release.keystore (No such file or directory)
Doesn’t make any sense. Any help appreciated.

:bust_in_silhouette: Reply From: volzhs

I think it doesn’t make sense putting export template and keystore under res://

If you want it as relative path,
put custom package and keystore outside of res://
and using custom_package/release="../template/java-release.apk" or something like that.

Thanks, this works.

I have a requirement to ship the project and I wanted minimal user intervention for export options. That’s why I wanted to hard-code those values in export.cfg.

I was already underway to implement a dirty hack. I was doing a getwd(buf); and then buf+“custom_key/rel.key” and pass this as the keystore before OS::get_singleton()->execute(jarsigner,args,true,NULL,NULL,&retval);

getwd() was returning the res::// absolute path to me and I had it there. But your suggestion is cleaner than cluttering the code.

Can you explain why …/ works for jarsigner ??

Kaushik | 2017-01-12 17:33