fix: project files not released when project updated
This commit is contained in:
@@ -79,6 +79,8 @@ public class ProjectConfig {
|
|||||||
return PFiles.join(projectDir, CONFIG_FILE_NAME);
|
return PFiles.join(projectDir, CONFIG_FILE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return mName;
|
return mName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,9 +52,12 @@ public class AssetsProjectLauncher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void prepare() {
|
private void prepare() {
|
||||||
if (mMainScriptFile.exists()) {
|
String projectConfigPath = PFiles.join(mProjectDir, ProjectConfig.CONFIG_FILE_NAME);
|
||||||
|
ProjectConfig projectConfig = ProjectConfig.fromFile(projectConfigPath);
|
||||||
|
if (projectConfig != null && projectConfig.getVersionCode() == mProjectConfig.getVersionCode()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
PFiles.copyAsset(mActivity, PFiles.join(mAssetsProjectDir, ProjectConfig.CONFIG_FILE_NAME), projectConfigPath);
|
||||||
PFiles.copyAsset(mActivity, PFiles.join(mAssetsProjectDir, mProjectConfig.getMainScriptFile()),
|
PFiles.copyAsset(mActivity, PFiles.join(mAssetsProjectDir, mProjectConfig.getMainScriptFile()),
|
||||||
mMainScriptFile.getPath());
|
mMainScriptFile.getPath());
|
||||||
for (String asset : mProjectConfig.getAssets()) {
|
for (String asset : mProjectConfig.getAssets()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user