소스 검색

替换星沐游Jar包

zengqb 4 년 전
부모
커밋
de6825454d

+ 1 - 1
file_utils.py

@@ -184,7 +184,7 @@ def copyFile(formFile, toFile, delete = False):
 
 
     fpath, fname = os.path.split(toFile)  #分离文件名和路径
     fpath, fname = os.path.split(toFile)  #分离文件名和路径
     if not os.path.exists(fpath):
     if not os.path.exists(fpath):
-        print('%s not exists, crate' % fpath)
+        #print('%s not exists, crate' % fpath)
         os.makedirs(fpath)              #创建路径
         os.makedirs(fpath)              #创建路径
 
 
     '''if os.path.exists(toFile) and os.path.getsize(formFile) > 104857600 and equalsFile(formFile, toFile):
     '''if os.path.exists(toFile) and os.path.getsize(formFile) > 104857600 and equalsFile(formFile, toFile):

+ 2 - 77
package_utils.py

@@ -110,8 +110,7 @@ def pack(game, sdk, config):
     #if ret:
     #if ret:
     #    return ret
     #    return ret
     # 打包lib依赖
     # 打包lib依赖
-    # packReativeJar(game, sdk, subChannel, config)
-    # i = 1/0
+
     ret = packJar(game, sdk, subChannel, config)
     ret = packJar(game, sdk, subChannel, config)
     if ret:
     if ret:
         return ret
         return ret
@@ -127,6 +126,7 @@ def pack(game, sdk, config):
     ret = doGamePostScript(game, sdk, config)
     ret = doGamePostScript(game, sdk, config)
     if ret:
     if ret:
         return ret
         return ret
+
     # log sdk
     # log sdk
     if 'logSdk' in config:
     if 'logSdk' in config:
         for log in config['logSdk']:
         for log in config['logSdk']:
@@ -983,81 +983,6 @@ def packLogJar(game, sdk, subChannel, config, logSdk):
 
 
 
 
 
 
-def packReativeJar(game, sdk, subChannel, config):
-    '''
-       打包Reative Jar
-       '''
-    splitDex = config['splitDex']
-    decompliePath = file_utils.getDecompliePath(game, sdk, subChannel, config['cache'])
-    outPath = file_utils.getFullPath(decompliePath, 'gen')
-
-    dx = file_utils.getD8Path()
-    androidPlatforms = file_utils.getAndroidCompileToolPath()
-    dexCmd = '--lib "%s" --output "%s"' % (androidPlatforms, outPath)
-
-    # 找到所有lib依赖
-    sdkPath = file_utils.getFullSDKPath(sdk)
-    libs = os.path.join(sdkPath, 'libs')
-    libConfig = os.path.join(libs, 'config.json')
-    print('jar ----> reactive-streams.jar');
-    dexCmd += ' ' + os.path.join(libs, "reactive-streams.jar")
-    # 存在配置文件
-    # if os.path.exists(libConfig):
-    #     jsonText = file_utils.readFile(libConfig)
-    #     libConf = json.loads(jsonText)
-    #     if 'libConfig' in config and config['libConfig'] in libConf:
-    #         conf = config['libConfig']
-    #         libList = libConf[conf]
-    #         for jar in libList:
-    #             print('jar ----> reactive-streams.jar');
-    #             dexCmd += ' ' + os.path.join(libs, jar)
-    #     elif 'default' in libConf:
-    #         libList = libConf['default']
-    #         for jar in libList:
-    #             print('jar --> ' + jar);
-    #             dexCmd += ' ' + os.path.join(libs, jar)
-    #     else:
-    #         for jar in os.listdir(libs):
-    #             if not jar.endswith('.jar'):
-    #                 continue
-    #             dexCmd += ' ' + os.path.join(libs, jar)
-    # else:
-    #     for jar in os.listdir(libs):
-    #         if not jar.endswith('.jar'):
-    #             continue
-    #         dexCmd += ' ' + os.path.join(libs, jar)
-
-    # multidex.jar
-    # if splitDex:
-    #     dexCmd += ' ' + file_utils.getMultiDexPath()
-
-    # sdk实现类
-    print('packageing all jar ...')
-    #dexCmd += ' ' + os.path.join(sdkPath, '%s.jar' % sdk)
-    ret = file_utils.execJarCmd(dx, dexCmd)
-    if ret:
-        return ret
-
-    # 反向dex生成smali
-    # 存放在out目录
-    print('baksmali classes.dex ...')
-    outDex = os.path.join(outPath, 'classes.dex')
-    baksmaliPath = file_utils.getBaksmaliPath()
-    outPath = file_utils.getFullPath(decompliePath, 'out')
-
-    ret = file_utils.execJarCmd(baksmaliPath, 'd "%s" -o "%s"' % (outDex, outPath))
-    if ret:
-        return ret
-
-    # 将生成的文件拷贝到目标目录
-    print('copy all smali ...')
-    smaliPath = file_utils.getFullPath(decompliePath, 'smali')
-    ret = file_utils.copyFileAllDir(outPath, smaliPath, False)
-    if ret:
-        return ret
-
-    return 0
-
 
 
 def splitDex(game, sdk, subChannel, config):
 def splitDex(game, sdk, subChannel, config):
     '''
     '''

+ 9 - 2
package_utils_yfsdk.py

@@ -39,7 +39,10 @@ def pack(game, sdk, config):
     ret = decomplie(game, sdk, subChannel, config)
     ret = decomplie(game, sdk, subChannel, config)
     if ret:
     if ret:
         return ret
         return ret
-
+        # 删除旧代码
+    # ret = removeOldCode(game, sdk, subChannel, config)
+    # if ret:
+    #     return ret
 
 
     # 复制app res资源
     # 复制app res资源
     ret = copyAppRes(game, sdk, subChannel, config)
     ret = copyAppRes(game, sdk, subChannel, config)
@@ -68,6 +71,10 @@ def pack(game, sdk, config):
 
 
     ret = copyIcon(game, sdk, subChannel, config)
     ret = copyIcon(game, sdk, subChannel, config)
 
 
+    # ret = packJar(game, sdk, subChannel, config)
+    # if ret:
+    #     return ret
+
     # 增加配置文件
     # 增加配置文件
     ret = createJmhyProperties(game, sdk, subChannel, config)
     ret = createJmhyProperties(game, sdk, subChannel, config)
     if ret:
     if ret:
@@ -123,7 +130,7 @@ def removeOldCode(game, sdk, subChannel, config):
     删除旧代码
     删除旧代码
     '''
     '''
     decompliePath = file_utils.getDecompliePath(game, sdk, subChannel, config['cache'])
     decompliePath = file_utils.getDecompliePath(game, sdk, subChannel, config['cache'])
-    codePath = os.path.join(decompliePath, 'smali', 'com', 'jmhy', 'sdk')
+    codePath = os.path.join(decompliePath, 'smali', 'com', 'Jcat', 'Adsdk')
     #file_utils.deleteFolder(codePath)
     #file_utils.deleteFolder(codePath)
     allFiles = []
     allFiles = []
     allFiles = file_utils.list_files(codePath, allFiles)
     allFiles = file_utils.list_files(codePath, allFiles)

+ 0 - 3
sdk/jm_xingmuyou/libs/config.json

@@ -1,6 +1,5 @@
 {
 {
 	"default":[
 	"default":[
-		"reactive-streams.jar",
 		"android-support-v4.jar",
 		"android-support-v4.jar",
 		"commons-httpclient-3.1.jar",
 		"commons-httpclient-3.1.jar",
 		"org.apache.http.legacy.jar",
 		"org.apache.http.legacy.jar",
@@ -14,8 +13,6 @@
 		"xmy_channel_mj.jar",
 		"xmy_channel_mj.jar",
 		"tracking1.4.2.jar",
 		"tracking1.4.2.jar",
 		"rxpermissions.jar",
 		"rxpermissions.jar",
-		"rxandroid-2.1.1-sources.jar",
-		"rxjava-2.2.7-sources.jar",
 		"gson-2.8.5.jar",
 		"gson-2.8.5.jar",
 		"jm_sdk_20200221.jar"
 		"jm_sdk_20200221.jar"
 	]
 	]

BIN
sdk/jm_xingmuyou/libs/mj_sdk.jar


BIN
sdk/jm_xingmuyou/libs/reactive-streams.jar


BIN
sdk/jm_xingmuyou/libs/rxandroid-2.1.1-sources.jar


BIN
sdk/jm_xingmuyou/libs/rxjava-2.2.7-sources.jar


BIN
sdk/jm_xingmuyou/libs/xmy_base_sdk.jar


BIN
sdk/jm_xingmuyou/libs/xmy_channel_mj.jar


+ 2 - 1
sdk/jm_xingmuyou/script/sdk_script.py

@@ -39,7 +39,8 @@ def execute(game, sdk, config):
     jsonConfig['metaData'] = meta
     jsonConfig['metaData'] = meta
     addMetaData(game, sdk, subChannel, jsonConfig, config['cache'])
     addMetaData(game, sdk, subChannel, jsonConfig, config['cache'])
     addLauncherActivity(manifest, config['screenOrientation'], 'fusion.mj.communal.element.SplashScreenActivity')
     addLauncherActivity(manifest, config['screenOrientation'], 'fusion.mj.communal.element.SplashScreenActivity')
-    copySmaliCode(game, sdk, subChannel, config)
+
+    #copySmaliCode(game, sdk, subChannel, config)
     return 0
     return 0
 
 
 def checkConfig(config):
 def checkConfig(config):

+ 0 - 24
sdk/jm_xingmuyou/smali/org/reactivestreams/Processor.smali

@@ -1,24 +0,0 @@
-.class public interface abstract Lorg/reactivestreams/Processor;
-.super Ljava/lang/Object;
-.source "Processor.java"
-
-# interfaces
-.implements Lorg/reactivestreams/Subscriber;
-.implements Lorg/reactivestreams/Publisher;
-
-
-# annotations
-.annotation system Ldalvik/annotation/Signature;
-    value = {
-        "<T:",
-        "Ljava/lang/Object;",
-        "R:",
-        "Ljava/lang/Object;",
-        ">",
-        "Ljava/lang/Object;",
-        "Lorg/reactivestreams/Subscriber<",
-        "TT;>;",
-        "Lorg/reactivestreams/Publisher<",
-        "TR;>;"
-    }
-.end annotation

+ 0 - 26
sdk/jm_xingmuyou/smali/org/reactivestreams/Publisher.smali

@@ -1,26 +0,0 @@
-.class public interface abstract Lorg/reactivestreams/Publisher;
-.super Ljava/lang/Object;
-.source "Publisher.java"
-
-
-# annotations
-.annotation system Ldalvik/annotation/Signature;
-    value = {
-        "<T:",
-        "Ljava/lang/Object;",
-        ">",
-        "Ljava/lang/Object;"
-    }
-.end annotation
-
-
-# virtual methods
-.method public abstract subscribe(Lorg/reactivestreams/Subscriber;)V
-    .annotation system Ldalvik/annotation/Signature;
-        value = {
-            "(",
-            "Lorg/reactivestreams/Subscriber<",
-            "-TT;>;)V"
-        }
-    .end annotation
-.end method

+ 0 - 33
sdk/jm_xingmuyou/smali/org/reactivestreams/Subscriber.smali

@@ -1,33 +0,0 @@
-.class public interface abstract Lorg/reactivestreams/Subscriber;
-.super Ljava/lang/Object;
-.source "Subscriber.java"
-
-
-# annotations
-.annotation system Ldalvik/annotation/Signature;
-    value = {
-        "<T:",
-        "Ljava/lang/Object;",
-        ">",
-        "Ljava/lang/Object;"
-    }
-.end annotation
-
-
-# virtual methods
-.method public abstract onComplete()V
-.end method
-
-.method public abstract onError(Ljava/lang/Throwable;)V
-.end method
-
-.method public abstract onNext(Ljava/lang/Object;)V
-    .annotation system Ldalvik/annotation/Signature;
-        value = {
-            "(TT;)V"
-        }
-    .end annotation
-.end method
-
-.method public abstract onSubscribe(Lorg/reactivestreams/Subscription;)V
-.end method

+ 0 - 11
sdk/jm_xingmuyou/smali/org/reactivestreams/Subscription.smali

@@ -1,11 +0,0 @@
-.class public interface abstract Lorg/reactivestreams/Subscription;
-.super Ljava/lang/Object;
-.source "Subscription.java"
-
-
-# virtual methods
-.method public abstract cancel()V
-.end method
-
-.method public abstract request(J)V
-.end method

BIN
sdk/yfsdk/libs/JimiAdSDK-20200410.jar


+ 5 - 0
sdk/yfsdk/libs/config.json

@@ -0,0 +1,5 @@
+{
+	"default":[
+		"JimiAdSDK-20200410.jar"
+	]
+}

BIN
sdk/yfsdk/res/drawable-hdpi/jmad_float.png


BIN
sdk/yfsdk/res/drawable-hdpi/jmad_float_on.png