Skip to content

Commit aef22be

Browse files
authored
Merge branch 'processing:main' into gradle-preprocessor
2 parents ada478d + ecd219b commit aef22be

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+947
-173
lines changed

.all-contributorsrc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,6 +1484,26 @@
14841484
"code"
14851485
]
14861486
},
1487+
{
1488+
"login": "babaissarkar",
1489+
"name": "Subhraman Sarkar",
1490+
"avatar_url": "https://avatars.githubusercontent.com/u/8469888?v=4",
1491+
"profile": "https://github.com/babaissarkar",
1492+
"contributions": [
1493+
"code",
1494+
"a11y"
1495+
]
1496+
},
1497+
{
1498+
"login": "SushantBansal-tech",
1499+
"name": "SushantBansal-tech",
1500+
"avatar_url": "https://avatars.githubusercontent.com/u/189839531?v=4",
1501+
"profile": "https://github.com/SushantBansal-tech",
1502+
"contributions": [
1503+
"ideas",
1504+
"code"
1505+
]
1506+
}
14871507
],
14881508
"repoType": "github",
14891509
"repoHost": "https://github.com",

BUILD.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ First, [download the IntelliJ IDEA Community Edition](https://www.jetbrains.com/
88

99
1. Clone the Processing4 repository to your machine locally
1010
1. Open the cloned repository in IntelliJ IDEA CE
11+
1. When prompted, select **Trust Project**. You can preview the project in Safe Mode but you won't be able to build Processing.
12+
1. IntelliJ may start loading Gradle dependencies automatically. Wait for this process to complete.
1113
1. In the main menu, go to File > Project Structure > Project Settings > Project.
1214
1. In the SDK Dropdown option, select a JDK version 17 or Download the jdk
1315
1. Click the green Run Icon in the top right of the window. This is also where you can find the option to debug Processing.
@@ -31,7 +33,7 @@ Processing consists of three main components: `Core`, `Java`, and `App`. The `Co
3133

3234
- **Java**: The part of Processing that compiles and runs `.pde` files. It supports different *modes* which implement support for different languages or versions of Processing. The default mode is `Java`.
3335

34-
- `App`: This is the Processing Development Environment (PDE), the visual part of the editor that you see and work within when you use Processing.
36+
- **App**: This is the Processing Development Environment (PDE), the visual part of the editor that you see and work within when you use Processing.
3537

3638

3739
### Examples

CONTRIBUTING.md

Lines changed: 94 additions & 34 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ Processing is a flexible software sketchbook and a programming language designed
77

88
This repository contains the source code for the [Processing](https://processing.org/) project for people who want to help improve the code.
99

10-
## Announcing Processing 4.3.1
10+
## Welcome to Processing 4.4!
1111

12-
We’re excited to announce the release of Processing 4.3.1! This update brings tooling improvements and a friendlier experience for contributors. To learn more, read the [Processing 4.3.1 announcement](https://github.com/processing/processing4-carbon-aug-19/wiki/Announcing-Processing-4.3.1).
12+
We’re excited to announce the release of Processing 4.4! This update modernizes Processing under the hood to make future development easier. Key changes include switching the build system from Ant to Gradle, starting the transition from Swing to Jetpack Compose Multiplatform for the UI, and adding Kotlin support to the codebase. To learn more, check out [Changes in 4.4.0](https://github.com/processing/processing4/wiki/Changes-in-4.4).
1313

14-
Processing was initiated in 2001 by Ben Fry and Casey Reas, who lead the development and maintenance of the project until 2023. We are grateful for their vision and dedication to the project. Processing is also indebted to over two decades of contributions from the broader Processing community.
14+
We hope these updates will make it easier for more people to contribute to Processing. If you'd like to get involved, have a look at our [Contributor Guide](CONTRIBUTING.md).
1515

16-
> [!NOTE]
17-
> Due to platform limitations, the GitHub Contributors page for this repository does not show the complete list of contributors. However, the [git commit history](https://github.com/processing/processing4/commits/main/) provides a full record of the project's contributions. For contributor graphs before November 13th, refer to [this page](https://github.com/benfry/processing4/graphs/contributors). A comprehensive [list of all contributors](#contributors) is also included below. To see all commits by a contributor, click on the [💻](https://github.com/processing/processing4/commits?author=benfry) emoji below their name.
16+
## Acknowledgement
17+
Processing was initiated in 2001 by Ben Fry and Casey Reas, who led the development and maintenance of the project until 2023. We are grateful for their vision and dedication to the project. Processing is also indebted to over two decades of contributions from the broader Processing community.
1818

1919
## Using Processing
2020

@@ -66,8 +66,9 @@ For licensing information about the Processing website see the [processing-websi
6666
Copyright (c) 2015-now The Processing Foundation
6767

6868
## Contributors
69+
The Processing project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification, recognizing all forms of contributions (not just code!). A list of all contributors is included below. You can add yourself to the contributors list [here](https://github.com/processing/processing4-carbon-aug-19/issues/839)!
6970

70-
Add yourself to the contributors list [here](https://github.com/processing/processing4-carbon-aug-19/issues/839)!
71+
_Note: due to GitHub's limitations, this repository's [Contributors](https://github.com/processing/processing4/graphs/contributors) page only shows accurate contribution data starting from late 2024. Contributor graphs from before November 13th 2024 can be found on [this page](https://github.com/benfry/processing4/graphs/contributors). The [git commit history](https://github.com/processing/processing4/commits/main/) provides a full record of the project's contributions. To see all commits by a contributor, click on the [💻](https://github.com/processing/processing4/commits?author=benfry) emoji below their name._
7172

7273
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
7374
<!-- prettier-ignore-start -->
@@ -290,6 +291,10 @@ Add yourself to the contributors list [here](https://github.com/processing/proce
290291
<td align="center" valign="top" width="16.66%"><a href="https://github.com/Rishab87"><img src="https://avatars.githubusercontent.com/u/138858208?v=4?s=120" width="120px;" alt="Rishab Kumar Jha"/><br /><sub><b>Rishab Kumar Jha</b></sub></a><br /><a href="https://github.com/processing/processing4/commits?author=Rishab87" title="Code">💻</a></td>
291292
<td align="center" valign="top" width="16.66%"><a href="https://github.com/yehiarasheed"><img src="https://avatars.githubusercontent.com/u/157399068?v=4?s=120" width="120px;" alt="Yehia Rasheed"/><br /><sub><b>Yehia Rasheed</b></sub></a><br /><a href="https://github.com/processing/processing4/commits?author=yehiarasheed" title="Code">💻</a></td>
292293
</tr>
294+
<tr>
295+
<td align="center" valign="top" width="16.66%"><a href="https://github.com/babaissarkar"><img src="https://avatars.githubusercontent.com/u/8469888?v=4?s=120" width="120px;" alt="Subhraman Sarkar"/><br /><sub><b>Subhraman Sarkar</b></sub></a><br /><a href="https://github.com/processing/processing4/commits?author=babaissarkar" title="Code">💻</a> <a href="#a11y-babaissarkar" title="Accessibility">️️️️♿️</a></td>
296+
<td align="center" valign="top" width="16.66%"><a href="https://github.com/SushantBansal-tech"><img src="https://avatars.githubusercontent.com/u/189839531?v=4?s=120" width="120px;" alt="SushantBansal-tech"/><br /><sub><b>SushantBansal-tech</b></sub></a><br /><a href="#ideas-SushantBansal-tech" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/processing/processing4/commits?author=SushantBansal-tech" title="Code">💻</a></td>
297+
</tr>
293298
</tbody>
294299
</table>
295300

SCHEMA.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Processing URI Schema Definition
22

3+
The Processing URI schema defines a custom protocol for launching and interacting with the Processing Development Environment (PDE) via specially formatted `pde://` links. These links can be used to open sketches, create new ones, load hosted or base64-encoded files, and set preferences, all through a simple URI-based interface.
4+
5+
This feature is primarily intended for integration with web platforms, tutorials, documentation, or third-party tools that want to streamline the experience of launching sketches in Processing from a web page.
6+
7+
Because these links can be generated dynamically, they support a range of interactive use cases. For example, an online editor could generate a unique link for each sketch, or a forum could create links based on user-submitted code snippets.
8+
9+
>[!WARNING]
10+
> Be cautious when opening `pde://` links from unknown sources. Always review the contents of a sketch before running it, especially if it was shared by someone you don’t know. To protect your system, Processing runs downloaded sketches in a temporary folder, but you should still treat untrusted code with care.
11+
312
## Local File Schema
413
```
514
pde:///path/to/sketch.pde
@@ -60,4 +69,4 @@ Sets and saves multiple preferences in a single operation.
6069
- URL-based operations automatically prepend https:// if no scheme is provided
6170
- All URLs and query parameters are decoded using UTF-8
6271
- File downloads occur asynchronously in a separate thread
63-
- Base64 and remote sketches are saved to temporary folders
72+
- Base64 and remote sketches are saved to temporary folders

app/build.gradle.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ compose.desktop {
7272
entitlementsFile.set(file("macos/entitlements.plist"))
7373
runtimeEntitlementsFile.set(file("macos/entitlements.plist"))
7474
appStore = true
75+
jvmArgs("-Dsun.java2d.metal=true")
7576
}
7677
windows{
7778
iconFile = rootProject.file("build/windows/processing.ico")
@@ -354,6 +355,7 @@ tasks.register<Download>("includeJdk") {
354355
into(composeResources(""))
355356
}
356357
}
358+
finalizedBy("prepareAppResources")
357359
}
358360
tasks.register<Copy>("includeSharedAssets"){
359361
from("../build/shared/")
@@ -511,7 +513,6 @@ afterEvaluate {
511513
dependsOn(
512514
"includeCore",
513515
"includeJavaMode",
514-
"includeJdk",
515516
"includeSharedAssets",
516517
"includeProcessingExamples",
517518
"includeProcessingWebsiteExamples",
@@ -539,7 +540,7 @@ afterEvaluate {
539540
}
540541
}
541542
tasks.named("createDistributable").configure {
542-
dependsOn("signResources")
543+
dependsOn("signResources", "includeJdk")
543544
finalizedBy("setExecutablePermissions")
544545
}
545-
}
546+
}

app/src/main/resources/about-processing.svg

Lines changed: 74 additions & 0 deletions
Loading
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# The default is 8, which creates tiny nubby scroll bars
2+
ScrollBar.width = 16
3+
4+
TitlePane.inactiveForeground = #000000
5+
6+
7+
# Better matched for macOS dark mode (but using everywhere)
8+
# https://github.com/JFormDesigner/FlatLaf/issues/497
9+
10+
[dark]@background = #1e1e1e
11+
[dark]@foreground = #e0e0e0
12+
[dark]@accentColor = #107aff
13+
[dark]@accentFocusColor = #176896
14+
15+
[dark]Component.arrowType = chevron
16+
17+
[dark]CheckBox.icon.style = filled
18+
[dark]CheckBox.icon[filled].selectedBorderColor = @accentColor
19+
[dark]CheckBox.icon[filled].selectedBackground = @accentColor
20+
[dark]CheckBox.icon[filled].checkmarkColor = @foreground
21+
22+
[dark]RadioButton.icon.style = filled
23+
[dark]RadioButton.icon[filled].centerDiameter = 6

app/src/processing/app/Schema.kt

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package processing.app
22

3+
import kotlinx.coroutines.CoroutineScope
4+
import kotlinx.coroutines.Dispatchers
5+
import kotlinx.coroutines.Job
6+
import kotlinx.coroutines.launch
37
import processing.app.ui.Editor
48
import java.io.File
59
import java.io.FileOutputStream
@@ -13,6 +17,8 @@ import java.util.*
1317
class Schema {
1418
companion object{
1519
private var base: Base? = null
20+
val jobs = mutableListOf<Job>()
21+
1622
@JvmStatic
1723
fun handleSchema(input: String, base: Base): Editor?{
1824
this.base = base
@@ -92,8 +98,9 @@ class Schema {
9298
}
9399

94100
}
101+
102+
private val scope = CoroutineScope(Dispatchers.Default)
95103
private fun downloadFiles(uri: URI, urlList: String, targetFolder: File, extension: String = ""){
96-
Thread{
97104
targetFolder.mkdirs()
98105

99106
val base = uri.path.split("/")
@@ -128,15 +135,20 @@ class Schema {
128135
URL("https://$content").path.isNotBlank() -> "https://$content"
129136
else -> "https://$base/$content"
130137
})
131-
url.openStream().use { input ->
132-
target.outputStream().use { output ->
133-
input.copyTo(output)
138+
val download = scope.launch{
139+
url.openStream().use { input ->
140+
target.outputStream().use { output ->
141+
input.copyTo(output)
142+
}
134143
}
135144
}
145+
jobs.add(download)
146+
download.invokeOnCompletion {
147+
jobs.remove(download)
148+
}
136149
}
137150

138151
}
139-
}.start()
140152
}
141153

142154

app/src/processing/app/platform/LinuxPlatform.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
import processing.app.Preferences;
3232
import processing.core.PApplet;
3333

34+
import javax.swing.*;
35+
3436

3537
public class LinuxPlatform extends DefaultPlatform {
3638
String homeDir;
@@ -39,6 +41,9 @@ public class LinuxPlatform extends DefaultPlatform {
3941
public void initBase(Base base) {
4042
super.initBase(base);
4143

44+
JFrame.setDefaultLookAndFeelDecorated(true);
45+
System.setProperty("flatlaf.menuBarEmbedded", "true");
46+
4247
// Set X11 WM_CLASS property which is used as the application
4348
// name by Gnome 3 and other window managers.
4449
// https://github.com/processing/processing/issues/2534

0 commit comments

Comments
 (0)