Export to exe file

I’ve been away from Processing for a few months, but I’m back now.
My last query about decoupling text from image rotation is resolved. Thank you.
I now need to do the following -
1: export sketch to exe file Windows 10
2: export sketch to android 10 platform
When I tried this previously I received the following errors

1.5.1 standard or android but no support p3d
2.2.1 java but no support p3d
3.5.4 java p3d OK. No exe or android apk
4.0a1 java p3d OK. No exe or android apk

Any solutions?

1 Like

Even simple example sketches?

No Noel. I’m still waiting for replies.

Regards
Peter Turner

When you “Export the Android project”, what exactly shows up in the console?

Options for Windows or Linux
Embedded java

I get an exe file in application.windows64 but it won’t run when double clicked, and one in application.windows32 which gives an error.

I think I might need to define some data location, somewhere. The only external data sources are a series of maps located in a Windows folder.

Regards
Peter Turner

These are the export parameters written in my preferences.txt file.
What are yours?

export.application.embed_java=true
export.application.fullscreen=false
export.application.platform_macosx=false
export.application.platform_windows=true
export.application.present=false
export.application.stop=true
export.delete_target_folder=true

@paturn ===

  • as for windows.exe is your sketch using the data folder?

  • as for android what happens? is created the android folder? does the console fires some error message? which one?

  • and anyway does this happen when using some basic example (not using P3D)

Processing 3.5.4
I can get export to exe working OK, without a data folder - just using the original path in the pde.

However, I’m struggling with the android mode. It asks for the sdk location, I give it the location manually (it doesn’t find it automatically) but it says the Android SDK could not be loaded. It tells me to load Android Studio to extract (another) sdk path but it won’t download or install Android Studio. It tells me to check Environment Variables.

Is it that complicated to run in android mode?

Regards
Peter Turner

I don’t have problems with this at all. I just use this SDK folder and unzip it in the documents/processing folder or elsewhere. Then open I the preferences.txt file. (The location you can find at the bottom of the File/settings menu.) In the android parameters you will find something like:

android.emulator.image.abi=x86
android.emulator.port.phone=5566
android.sdk.ar=1.12.0
android.sdk.gvr=1.180.0
android.sdk.path=D:\an\android\sdk
android.sdk.play_services=16.0.1
android.sdk.support=28.0.0
android.sdk.target=28
android.sdk.wear=2.4.0

Change/set or correct the right sdk path as where you saved it.
Close processing’s IDE and only than save the preferences.txt file.
Then start ide again.

Thank you for your reply, Noel.

I’m not at my computer today, but I’ll try it tomorrow.

I do use android sdk up to 26 and beyond in numerous apps with Eclipse software, and I hope the additional sdk location doesn’t upset the working of those apps, some of which have been working successfully for up to 5 years.

Regards
Peter Turner

Thank you Noel.

I have it part-working, but I get many error messages which are difficult to read (red against black background). I think green text would look better.

I have tried
console.log(colors.fg.green);
or
console.log(color(0,255,0);
but neither work.

Any suggestions?

Regards
Peter Turner

In the theme.txt file, located at C:\Program Files (x86)\processing-3.5.3\lib on my pc; you will find the parameters to change. It looks something like:

# CONSOLE
# The font is handled by preferences, so its size/etc are modifiable.
console.color = #000000
console.output.color = #cccccc
# text color for errors printed in the console
console.error.color = #d9211e

PS. Remember to only save the file with the IDE closed!

Thank you Noel.

It certainly is more visible, but a lot slower
(Build 6m 41s vs 2m 40s)

I had resorted to highlighting the error messages, copying them and pasting them on Notepad.exe.

Now to find what the errors are …n

Regards
Peter Turner

Build time is back to 2m 40s so the first one must have been an anomaly.

I’m trying to catch a key down event from the virtual keyboard produced from InputMethodManager. I’ve tried keyPressed() onKeyDown() keyDown() keydown() but only keyPressed captures ENTER or BACKSPACE or SHIFT with android.view.keyEvent imported, but not ‘d’, ‘D’, “d”, " D", KeyEvent.KEYCODE_D. Any ideas?

Also, during a “successful build” of approx 2m 40s I always get 28 actionable Tasks with 28 executed, most of which refer to debug. Is this an indication of errors, or always to be expected?

Regards
Peter Turner

Is it to capture a key event in an edit text box?

No Noel. I am not using edit boxes.

I use the virtual keyboard to generate key strokes, and detect each one via keyPressed (or some other procedure) which is then translated to a string, and this is used to adjust the image centred on the screen.

This works OK in Processing for Windows exe, but it doesn’t detect the alphanumeric keystrokes in Processing for Android, only ENTER and BACKSPACE.

I have previously used EditText boxes in Eclipse for Android. Can I use them in Processing for Android? If so, then this may be an alternative solution.

Regards
Peter Turner

Se various codes here

Hi Noel.

I’ve almost completed my code, thanks to your reference to EditBox (and Menu).

I’m now stuck with a problem :- I need to rotate a 3D image with the mouse button. It works OK in Windows, but not on the android phone. I think the problem is the use of mouseDragged() and mouseMoved(). In Windows using a mouse, mouseDragged() is interpreted correctly to rotate the image. However in Android, because there is no separate mouse button to click or hold down, it is interpreted as a mouseMoved() event, and does not trigger the mouseDragged() event required.

I have tried

void mouseMoved() {
redraw(); // to call draw() each time
}

void mouseDragged() {
redraw(); // to call draw() each time
}

but this doesn’t work.

Any ideas?

Regards
Peter Turner

Sorry for the late reply.
Here is how I rotate 3D on android.
It’s a code I wrote to rotate a shape, just replace it with an image.

Thank you Noel. A very effective demonstration, and the code’s working well on my project.

Regards
Peter Turner