Commit:    dc1d5bc623bd3c5a186799cdae2ab0aad9009a97
Author:    Anatol Belski <a...@php.net>         Mon, 10 Sep 2018 18:50:47 +0200
Parents:   c56db5b68c986ceda00fcb88dd29fa5387e72e82
Branches:  revamp_3

Link:       
http://git.php.net/?p=pftt2.git;a=commitdiff;h=dc1d5bc623bd3c5a186799cdae2ab0aad9009a97

Log:
Update places for version parsing, compiler recognition, etc.

Changed paths:
  M  src/com/mostc/pftt/main/PfttAuto.java
  M  src/com/mostc/pftt/model/core/EBuildBranch.java
  M  src/com/mostc/pftt/model/core/ECompiler.java
  M  src/com/mostc/pftt/model/core/PhpBuild.java
  M  src/com/mostc/pftt/util/WindowsSnapshotDownloadUtil.groovy


Diff:
diff --git a/src/com/mostc/pftt/main/PfttAuto.java 
b/src/com/mostc/pftt/main/PfttAuto.java
index ce7197c..6451b98 100644
--- a/src/com/mostc/pftt/main/PfttAuto.java
+++ b/src/com/mostc/pftt/main/PfttAuto.java
@@ -37,6 +37,14 @@ import com.mostc.pftt.util.TimerUtil;
 // TODO cleanup really old build, test, debug packs
 public class PfttAuto {
        static final BuildSpec[] BUILD_SPECS = new BuildSpec[] {
+                       new BuildSpec(EBuildBranch.PHP_7_3, EBuildType.TS, 
ECPUArch.X64),
+                       new BuildSpec(EBuildBranch.PHP_7_3, EBuildType.NTS, 
ECPUArch.X64),
+                       new BuildSpec(EBuildBranch.PHP_7_3, EBuildType.TS, 
ECPUArch.X86),
+                       new BuildSpec(EBuildBranch.PHP_7_3, EBuildType.NTS, 
ECPUArch.X86),
+                       new BuildSpec(EBuildBranch.PHP_7_2, EBuildType.TS, 
ECPUArch.X64),
+                       new BuildSpec(EBuildBranch.PHP_7_2, EBuildType.NTS, 
ECPUArch.X64),
+                       new BuildSpec(EBuildBranch.PHP_7_2, EBuildType.TS, 
ECPUArch.X86),
+                       new BuildSpec(EBuildBranch.PHP_7_2, EBuildType.NTS, 
ECPUArch.X86),
                        new BuildSpec(EBuildBranch.PHP_7_1, EBuildType.TS, 
ECPUArch.X64),
                        new BuildSpec(EBuildBranch.PHP_7_1, EBuildType.NTS, 
ECPUArch.X64),      
                        new BuildSpec(EBuildBranch.PHP_7_1, EBuildType.TS, 
ECPUArch.X86),
diff --git a/src/com/mostc/pftt/model/core/EBuildBranch.java 
b/src/com/mostc/pftt/model/core/EBuildBranch.java
index b256df4..7edd966 100644
--- a/src/com/mostc/pftt/model/core/EBuildBranch.java
+++ b/src/com/mostc/pftt/model/core/EBuildBranch.java
@@ -63,6 +63,12 @@ public enum EBuildBranch {
                        return null; // could be X86 or X64
                }
        },
+       PHP_7_3 {
+               @Override
+               public ECPUArch getCPUArch() {
+                       return null; // could be X86 or X64
+               }
+       },
        STR_SIZE_AND_INT64 {
                @Override
                public ECPUArch getCPUArch() {
@@ -71,7 +77,7 @@ public enum EBuildBranch {
        };
        
        public static EBuildBranch getNewest() {
-               return PHP_7_1;
+               return PHP_7_3;
        }
        
        /** flexibly matches different values, guessing which EBuildBranch it 
refers to
@@ -99,6 +105,8 @@ public enum EBuildBranch {
                        return PHP_7_1;
                else if 
(str.equals("php_7_2")||str.equals("7_2")||str.equals("7.2")||str.equals("72")||str.equals("php7_2")||str.equals("php72")||str.equals("php7.2")||str.equals("php_7.2"))
                        return PHP_7_2;
+               else if 
(str.equals("php_7_3")||str.equals("7_3")||str.equals("7.3")||str.equals("73")||str.equals("php7_3")||str.equals("php73")||str.equals("php7.3")||str.equals("php_7.3"))
+                       return PHP_7_3;
                else if (str.equals("master")||str.equals("php_master"))
                        return PHP_Master;
                else if (str.equals("str_size_and_int64"))
@@ -123,6 +131,8 @@ public enum EBuildBranch {
                        return PHP_7_1;
                else if 
(str.contains("php_7_2")||str.contains("php7_2")||str.contains("php72")||str.contains("php7.2")||str.contains("php_7.2"))
                        return PHP_7_2;
+               else if 
(str.contains("php_7_3")||str.contains("php7_3")||str.contains("php73")||str.contains("php7.3")||str.contains("php_7.3"))
+                       return PHP_7_3;
                else if (str.contains("master"))
                        return PHP_Master;
                else if (str.contains("str_size")||str.contains("int64"))
diff --git a/src/com/mostc/pftt/model/core/ECompiler.java 
b/src/com/mostc/pftt/model/core/ECompiler.java
index 189035f..04f91af 100644
--- a/src/com/mostc/pftt/model/core/ECompiler.java
+++ b/src/com/mostc/pftt/model/core/ECompiler.java
@@ -7,6 +7,7 @@ public enum ECompiler {
        VC11, // Visual Studio 2012
        VC12,
        VC14, // Visual Studio 2015
+       VC15,
        GCC4, 
        GCC3
 }
diff --git a/src/com/mostc/pftt/model/core/PhpBuild.java 
b/src/com/mostc/pftt/model/core/PhpBuild.java
index 6d85897..865af95 100644
--- a/src/com/mostc/pftt/model/core/PhpBuild.java
+++ b/src/com/mostc/pftt/model/core/PhpBuild.java
@@ -411,6 +411,22 @@ public class PhpBuild extends SAPIManager {
                        branch = EBuildBranch.PHP_5_6;
                        major = 5;
                        minor = 6;
+               } else if (b.contains("php-7.0")) {
+                       branch = EBuildBranch.PHP_7_0;
+                       major = 7;
+                       minor = 0;
+               } else if (b.contains("php-7.1")) {
+                       branch = EBuildBranch.PHP_7_1;
+                       major = 7;
+                       minor = 1;
+               } else if (b.contains("php-7.2")) {
+                       branch = EBuildBranch.PHP_7_2;
+                       major = 7;
+                       minor = 2;
+               } else if (b.contains("php-7.3")) {
+                       branch = EBuildBranch.PHP_7_3;
+                       major = 7;
+                       minor = 3;
                } else if (b.contains("php-master")) {
                        branch = EBuildBranch.PHP_Master;
                        major = 5;
@@ -439,8 +455,8 @@ public class PhpBuild extends SAPIManager {
                                                minor = 
Integer.parseInt(split[1]);
                                        } catch ( NumberFormatException ex ) {
                                                // guess
-                                               major = 5;
-                                               minor = 5;
+                                               major = 7;
+                                               minor = 3;
                                        }
                                        //
                                        if (revision==null)
@@ -463,6 +479,21 @@ public class PhpBuild extends SAPIManager {
                                                        branch  = 
EBuildBranch.PHP_5_6;
                                                        break;
                                                }
+                                       } else if (major == 7) {
+                                               switch(minor) {
+                                               case 0:
+                                                       branch  = 
EBuildBranch.PHP_7_0;
+                                                       break;
+                                               case 1:
+                                                       branch  = 
EBuildBranch.PHP_7_1;
+                                                       break;
+                                               case 2:
+                                                       branch  = 
EBuildBranch.PHP_7_2;
+                                                       break;
+                                               case 3:
+                                                       branch  = 
EBuildBranch.PHP_7_3;
+                                                       break;
+                                               }
                                        }
                                        
                                        break;
diff --git a/src/com/mostc/pftt/util/WindowsSnapshotDownloadUtil.groovy 
b/src/com/mostc/pftt/util/WindowsSnapshotDownloadUtil.groovy
index b14a8e8..8b8980e 100644
--- a/src/com/mostc/pftt/util/WindowsSnapshotDownloadUtil.groovy
+++ b/src/com/mostc/pftt/util/WindowsSnapshotDownloadUtil.groovy
@@ -36,6 +36,8 @@ final class WindowsSnapshotDownloadUtil {
        static final URL PHP_5_6_DOWNLOAD = new 
URL("http://windows.php.net/downloads/snaps/php-5.6/";)
        static final URL PHP_7_0_DOWNLOAD = new 
URL("http://windows.php.net/downloads/snaps/php-7.0/";)
        static final URL PHP_7_1_DOWNLOAD = new 
URL("http://windows.php.net/downloads/snaps/php-7.1/";)
+       static final URL PHP_7_2_DOWNLOAD = new 
URL("http://windows.php.net/downloads/snaps/php-7.2/";)
+       static final URL PHP_7_3_DOWNLOAD = new 
URL("http://windows.php.net/downloads/snaps/php-7.3/";)
        static final URL STR_SIZE_AND_INT64_DOWNLOAD = new 
URL("http://windows.php.net/downloads/snaps/str_size_and_int64/";)
        static final URL PHP_MASTER_DOWNLOAD = new 
URL("http://windows.php.net/downloads/snaps/master/";)

Reply via email to