|
1 | 1 | package com.nmmedit.apkprotect; |
2 | 2 |
|
3 | 3 | import com.nmmedit.apkprotect.data.Prefs; |
| 4 | +import com.nmmedit.apkprotect.util.OsDetector; |
4 | 5 | import org.jetbrains.annotations.NotNull; |
5 | 6 |
|
6 | 7 | import java.io.*; |
@@ -141,16 +142,16 @@ public String getStripBinaryPath() { |
141 | 142 | switch (abi) { |
142 | 143 | case "armeabi-v7a": |
143 | 144 | return new File(getNdkHome(), "/toolchains/arm-linux-androideabi-4.9/prebuilt/" + |
144 | | - Prefs.getOsName() + "/bin/arm-linux-androideabi-strip").getAbsolutePath(); |
| 145 | + Prefs.osName() + "/bin/arm-linux-androideabi-strip").getAbsolutePath(); |
145 | 146 | case "arm64-v8a": |
146 | 147 | return new File(getNdkHome(), "/toolchains/aarch64-linux-android-4.9/prebuilt/" + |
147 | | - Prefs.getOsName() + "/bin/aarch64-linux-android-strip").getAbsolutePath(); |
| 148 | + Prefs.osName() + "/bin/aarch64-linux-android-strip").getAbsolutePath(); |
148 | 149 | case "x86": |
149 | 150 | return new File(getNdkHome(), "/toolchains/x86-4.9/prebuilt/" + |
150 | | - Prefs.getOsName() + "/bin/i686-linux-android-strip").getAbsolutePath(); |
| 151 | + Prefs.osName() + "/bin/i686-linux-android-strip").getAbsolutePath(); |
151 | 152 | case "x86_64": |
152 | 153 | return new File(getNdkHome(), "/toolchains/x86_64-4.9/prebuilt/" + |
153 | | - Prefs.getOsName() + "/bin/x86_64-linux-android-strip").getAbsolutePath(); |
| 154 | + Prefs.osName() + "/bin/x86_64-linux-android-strip").getAbsolutePath(); |
154 | 155 | } |
155 | 156 | //不支持arm和x86以外的abi |
156 | 157 | throw new RuntimeException("Unsupported abi " + abi); |
@@ -186,10 +187,18 @@ public List<String> getCmakeArguments() { |
186 | 187 |
|
187 | 188 | //最后输出的so文件 |
188 | 189 | public List<File> getSharedObjectFile() { |
189 | | - return Arrays.asList( |
190 | | - new File(getLibOutputDir(), "libnmmvm.so"), |
191 | | - new File(getLibOutputDir(), "libnmmp.so") |
192 | | - ); |
| 190 | + if(OsDetector.isWindows()){ |
| 191 | + return Arrays.asList( |
| 192 | + new File(getBuildPath(), "vm/libnmmvm.so"), |
| 193 | + new File(getBuildPath(), "libnmmp.so") |
| 194 | + ); |
| 195 | + |
| 196 | + }else { |
| 197 | + return Arrays.asList( |
| 198 | + new File(getLibOutputDir(), "libnmmvm.so"), |
| 199 | + new File(getLibOutputDir(), "libnmmp.so") |
| 200 | + ); |
| 201 | + } |
193 | 202 | } |
194 | 203 |
|
195 | 204 | public enum BuildType { |
|
0 commit comments