File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
java/src/processing/mode/java Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -887,10 +887,25 @@ private boolean isReferenceDownloaded() {
887887 }
888888 */
889889
890+ private String getReferenceDownloadUrl () {
891+ String versionName = Base .getVersionName ();
892+ int revisionInt = Base .getRevision ();
893+ String revision = String .valueOf (revisionInt );
894+
895+ if ("unspecified" .equals (versionName ) || revisionInt == Integer .MAX_VALUE ) {
896+ return "https://github.com/processing/processing4/releases/download/processing-1300-4.4.0/processing-4.4.0-reference.zip" ;
897+ }
898+
899+ String url = String .format (
900+ "https://github.com/processing/processing4/releases/download/processing-%s-%s/processing-%s-reference.zip" ,
901+ revision , versionName , versionName );
902+ System .out .println ("Generated URL: " + url );
903+ return url ;
904+ }
890905
891906 private void downloadReference () {
892907 try {
893- URL source = new URL (REFERENCE_URL_2 );
908+ URL source = new URL (getReferenceDownloadUrl () );
894909 HttpURLConnection conn = (HttpURLConnection ) source .openConnection ();
895910 HttpURLConnection .setFollowRedirects (true );
896911 conn .setConnectTimeout (15 * 1000 );
You can’t perform that action at this time.
0 commit comments