You are here

How to make jEdit portable - I'm a bit lost

4 posts / 0 new
Last post
5keeve
Offline
Last seen: 9 years 4 months ago
Joined: 2012-07-12 15:13
How to make jEdit portable - I'm a bit lost

Hi!

I want to make jEdit 5.0 portable. As a starting point I tried this appinfi.ini, created with the PortableApps.com Deelopment Toolkit


[Format]
Type=PortableApps.comFormat
Version=2.0

[Details]
Name=jEdit Portable
AppID=portablejEdit
Publisher=jEdit team & PortableApps.com
Homepage=PortableApps.com/portablejEdit
Category=Accessibility
Description=jEdit is a ___
Language=Multilingual

[License]
Shareable=true
OpenSource=true
Freeware=true
CommercialUse=false

[Version]
PackageVersion=0.0.0.0
DisplayVersion= Development Test 1

[Control]
Icons=1
Start=javaw.exe portablejEdit.exe

But then I think I also somehow need some portablejEdit.ini like this?

[Launch]
ProgramExecutable=javaw.exe
CommandLineArguments=-Duser.home="%PortableApps.comDocuments%\" -Xmx1024m -jar "%PAL:AppDir%\jEdit"
WorkingDirectory="%PortableApps.comDocuments%\"
WaitForProgram=true
WaitForOtherInstances=false

[Activate]
Java=require
Registry=false

[FileWrite1]
Type=Replace

But how are they connected? I don't fully understand (yet) the documentation. Is there really no quick "How To"?

Ken Herbert
Ken Herbert's picture
Online
Last seen: 33 min 54 sec ago
DeveloperModerator
Joined: 2010-05-25 18:19
First your

First your questions:

App\Appinfo.ini is the place for informational data regarding the application, as well as data necessary for the PortableApps Platform to display and run the app.

App\Launcher\AppNamePortable.ini is where data specific to making the app portable goes.

Both files are required for a proper PortableApps package.

There is no quick "How To" to making a PortableApp because there is no quick way to learn it. There is a bit of a learning curve involved, but there are a bunch of us here with experience in making PortableApps who are more than willing to help out when we can. The easiest way to learn is to look at existing apps and compare them with the documentation to understand what they are doing. Then have a go at making something easy(ish) portable, and keep reading the docs while you do. Then read the docs some more and eventually you will get the hang of it. I still consult the documentation on a regular basis, because there is always something you will forget no matter how much you read them (unless you have a photographic memory, which I know I don't).

Now on to your package. There are a few issues I can see:

appinfo.ini

  • AppID should be jEditPortable (what you have won't break anything, but AppNamePortable is the format specified by the spec).
  • Your Start entry needs to be the name of the executable created by the PortableApps.com Launcher, nothing else - this is one of the major issues stopping your app from working. Taking into account the AppID change above, that line should read Start=jEditPortable.exe

AppNamePortable.ini

  • In line with the AppID change above, this should be called jEditPortable.ini
  • In your CommandLineArguments the -jar switch should contain the full path to the .jar file (if you had eg. jEdit.jar in App\jEdit your -jar switch would be -jar="%PAL:AppDir%\jEdit\jEdit.jar") - this is the other major thing stopping your app from working.
  • You can remove WaitForProgram=true and Registry=false - these are the default values so don't need to be set
  • Once you have it working try it without setting the WorkingDirectory - if it isn't absolutely needed for running the app, don't use it
  • Also don't use WaitForOtherInstances=false unless you are absolutely sure the app can handle it
  • Not sure what you are trying to do with your [FileWrite1] there - either you missed posting some code, or it should be removed

If you want to check out another Java app to see how it is done, I have Makagiga Portable in the beta test sub-forum (there are no official Java apps yet).

5keeve
Offline
Last seen: 9 years 4 months ago
Joined: 2012-07-12 15:13
Thanks for your Help! I think

Thanks for your Help!

I think I made it. Will have to add my favourite plugins in order to see which files I need to add there for rewrites.

Ken Herbert
Ken Herbert's picture
Online
Last seen: 33 min 54 sec ago
DeveloperModerator
Joined: 2010-05-25 18:19
Not a problem

Glad to help.

Also I just noticed that jEdit is open source under the GPL, so you can mark it as CommercialUse=true.

Log in or register to post comments