сборка компонент под юниксом через гит
This commit is contained in:
16
.idea/workspace.xml
generated
16
.idea/workspace.xml
generated
@@ -7,15 +7,15 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadDvmRepository.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Component/Sapfor/Sapfor_F.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Component/Sapfor/Sapfor_F.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Component/Visualizer_2.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Component/Visualizer_2.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadRepository.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/BuildComponent.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/BuildComponent.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SPF_GetGraphLoops.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SPF_GetGraphLoops.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadSapforRepository.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/Server/ServerCode.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/Server/ServerCode.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/PassCode.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/PassCode.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingServer.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingServer.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestsDatabase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestsDatabase.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforTestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforTestingPlanner.java" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
<property name="UI_DESIGNER_EDITOR_MODE.UIDesignerToolWindowManager.SHOW" value="true" />
|
<property name="UI_DESIGNER_EDITOR_MODE.UIDesignerToolWindowManager.SHOW" value="true" />
|
||||||
<property name="UI_DESIGNER_EDITOR_MODE.UIDesignerToolWindowManager.WIDTH" value="509" />
|
<property name="UI_DESIGNER_EDITOR_MODE.UIDesignerToolWindowManager.WIDTH" value="509" />
|
||||||
<property name="extract.method.default.visibility" value="public" />
|
<property name="extract.method.default.visibility" value="public" />
|
||||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/src/icons" />
|
<property name="last_opened_file_path" value="$PROJECT_DIR$/src/_VisualDVM/Passes/All" />
|
||||||
<property name="project.structure.last.edited" value="Libraries" />
|
<property name="project.structure.last.edited" value="Libraries" />
|
||||||
<property name="project.structure.proportion" value="0.15" />
|
<property name="project.structure.proportion" value="0.15" />
|
||||||
<property name="project.structure.side.proportion" value="0.27322906" />
|
<property name="project.structure.side.proportion" value="0.27322906" />
|
||||||
@@ -107,11 +107,11 @@
|
|||||||
<recent name="controls.Trees" />
|
<recent name="controls.Trees" />
|
||||||
</key>
|
</key>
|
||||||
<key name="CopyFile.RECENT_KEYS">
|
<key name="CopyFile.RECENT_KEYS">
|
||||||
|
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\_VisualDVM\Passes\All" />
|
||||||
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons" />
|
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons" />
|
||||||
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons\versions" />
|
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons\versions" />
|
||||||
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\libs" />
|
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\libs" />
|
||||||
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons\Transformations" />
|
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons\Transformations" />
|
||||||
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\Common\icons" />
|
|
||||||
</key>
|
</key>
|
||||||
<key name="MoveMembersDialog.RECENTS_KEY">
|
<key name="MoveMembersDialog.RECENTS_KEY">
|
||||||
<recent name="_VisualDVM.ComponentsServer.Component.Sapfor.Sapfor" />
|
<recent name="_VisualDVM.ComponentsServer.Component.Sapfor.Sapfor" />
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ public class Sapfor_F extends Sapfor {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public String getAssemblyCommand() {
|
public String getAssemblyCommand() {
|
||||||
return "cd Repo/sapfor/experts/Sapfor_2017/_bin\n" +
|
return "cd Repo/SAPFOR/install\n" +
|
||||||
"cmake ../\n" +
|
"cmake ../\n" +
|
||||||
"make -j 4\n";
|
"make -j 4\n";
|
||||||
}
|
}
|
||||||
@@ -19,7 +19,7 @@ public class Sapfor_F extends Sapfor {
|
|||||||
public File getAssemblyFile() {
|
public File getAssemblyFile() {
|
||||||
return Paths.get(
|
return Paths.get(
|
||||||
Global.RepoDirectory.getAbsolutePath(),
|
Global.RepoDirectory.getAbsolutePath(),
|
||||||
"sapfor/experts/Sapfor_2017/_bin/Sapfor_F").toFile();
|
"SAPFOR/install/Sapfor_F").toFile();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public String getUpdateCommand() {
|
public String getUpdateCommand() {
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public class Visualizer_2 extends OSDComponent {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public String getAssemblyCommand() {
|
public String getAssemblyCommand() {
|
||||||
File src_home= Paths.get(Global.RepoDirectory.getAbsolutePath(),"/sapfor/experts/Sapfor_2017/_src/Server").toFile();
|
File src_home= Paths.get(Global.RepoDirectory.getAbsolutePath(),"SAPFOR/src/Server").toFile();
|
||||||
return "cd " +Utils_.DQuotes(src_home)+
|
return "cd " +Utils_.DQuotes(src_home)+
|
||||||
"\n" +
|
"\n" +
|
||||||
"g++ -O3 -std=c++17 checkUniq.cpp server.cpp -o Visualizer_2 -lpthread -lstdc++fs\n";
|
"g++ -O3 -std=c++17 checkUniq.cpp server.cpp -o Visualizer_2 -lpthread -lstdc++fs\n";
|
||||||
@@ -82,7 +82,7 @@ public class Visualizer_2 extends OSDComponent {
|
|||||||
public File getAssemblyFile() {
|
public File getAssemblyFile() {
|
||||||
return Paths.get(
|
return Paths.get(
|
||||||
Global.RepoDirectory.getAbsolutePath(),
|
Global.RepoDirectory.getAbsolutePath(),
|
||||||
"sapfor/experts/Sapfor_2017/_src/Server/Visualizer_2").toFile();
|
"SAPFOR/src/Server/Visualizer_2").toFile();
|
||||||
}
|
}
|
||||||
public void Connect() throws Exception {
|
public void Connect() throws Exception {
|
||||||
ClearLog();
|
ClearLog();
|
||||||
|
|||||||
@@ -26,6 +26,9 @@ public class Constants {
|
|||||||
public static final String PerformanceAnalyzerDirectoryName = "PerformanceAnalyzer";
|
public static final String PerformanceAnalyzerDirectoryName = "PerformanceAnalyzer";
|
||||||
public static final String KeyDirectoryName = "Keys";
|
public static final String KeyDirectoryName = "Keys";
|
||||||
//--
|
//--
|
||||||
|
//SVN (пока оставить для тестов)
|
||||||
|
public static final String REPOSITORY_AUTHENTICATION = "--username dvmhuser --password dvmh2013 --non-interactive";
|
||||||
|
public static final String DVM_REPOSITORY = "http://svn.dvm-system.org/svn/dvmhrepo/dvm";
|
||||||
//GIT
|
//GIT
|
||||||
public static final String SAPFOR_REPOSITORY = "http://dvmh-server.ddns.net:3000/Alexander_KS/SAPFOR.git";
|
public static final String SAPFOR_REPOSITORY = "http://dvmh-server.ddns.net:3000/Alexander_KS/SAPFOR.git";
|
||||||
public static final String SAPFOR_VERSION_URL= "http://dvmh-server.ddns.net:3000/Alexander_KS/SAPFOR/raw/branch/master/src/Utils/version.h";
|
public static final String SAPFOR_VERSION_URL= "http://dvmh-server.ddns.net:3000/Alexander_KS/SAPFOR/raw/branch/master/src/Utils/version.h";
|
||||||
|
|||||||
@@ -2,16 +2,18 @@ package _VisualDVM.Passes.All;
|
|||||||
import Common.Passes.PassException;
|
import Common.Passes.PassException;
|
||||||
import Common.Utils.Utils_;
|
import Common.Utils.Utils_;
|
||||||
import _VisualDVM.ComponentsServer.Component.Component;
|
import _VisualDVM.ComponentsServer.Component.Component;
|
||||||
|
import _VisualDVM.ComponentsServer.Component.ComponentType;
|
||||||
import _VisualDVM.Global;
|
import _VisualDVM.Global;
|
||||||
import _VisualDVM.Passes.PassCode;
|
import _VisualDVM.Passes.PassCode;
|
||||||
import _VisualDVM.Passes.ProcessPass;
|
import _VisualDVM.Passes.ProcessPass;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
public class BuildComponent extends ProcessPass<Component> {
|
public class BuildComponent extends ProcessPass<Component> {
|
||||||
@Override
|
@Override
|
||||||
protected PassCode necessary() {
|
protected PassCode necessary() {
|
||||||
return PassCode.DownloadRepository;
|
return PassCode.DownloadSapforRepository;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected boolean resetsNecessary() {
|
protected boolean resetsNecessary() {
|
||||||
@@ -29,6 +31,11 @@ public class BuildComponent extends ProcessPass<Component> {
|
|||||||
@Override
|
@Override
|
||||||
protected void body() throws Exception {
|
protected void body() throws Exception {
|
||||||
ShowMessage1("Сборка " + target.getComponentType().getDescription());
|
ShowMessage1("Сборка " + target.getComponentType().getDescription());
|
||||||
|
if (target.getComponentType().equals(ComponentType.Sapfor_F)){
|
||||||
|
File RepoSapfor = new File(Global.RepoDirectory, "SAPFOR");
|
||||||
|
File installationDirectory = new File(RepoSapfor,"install");
|
||||||
|
Utils_.CheckAndCleanDirectory(installationDirectory);
|
||||||
|
}
|
||||||
PerformScript(target.getAssemblyCommand());
|
PerformScript(target.getAssemblyCommand());
|
||||||
if (!target.getAssemblyFile().exists())
|
if (!target.getAssemblyFile().exists())
|
||||||
throw new PassException("Сборка не найдена");
|
throw new PassException("Сборка не найдена");
|
||||||
|
|||||||
37
src/_VisualDVM/Passes/All/DownloadDvmRepository.java
Normal file
37
src/_VisualDVM/Passes/All/DownloadDvmRepository.java
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
package _VisualDVM.Passes.All;
|
||||||
|
import Common.CommonConstants;
|
||||||
|
import _VisualDVM.Constants;
|
||||||
|
import _VisualDVM.Global;
|
||||||
|
import _VisualDVM.Passes.ProcessPass;
|
||||||
|
import _VisualDVM.Utils;
|
||||||
|
import org.apache.commons.io.FileUtils;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
public class DownloadDvmRepository extends ProcessPass {
|
||||||
|
File dvmHome;
|
||||||
|
@Override
|
||||||
|
protected boolean canStart(Object... args) throws Exception {
|
||||||
|
dvmHome = Paths.get(Global.RepoDirectory.getAbsolutePath(),
|
||||||
|
"dvm").toFile();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
private void synchronize(String src, File dst) throws Exception {
|
||||||
|
File loadedFile = Paths.get(dst.getAbsolutePath(), CommonConstants.LOADED).toFile();
|
||||||
|
if (loadedFile.exists()) {
|
||||||
|
PerformScript("cd " +
|
||||||
|
dst.getAbsolutePath() +
|
||||||
|
"\nsvn update " + Constants.REPOSITORY_AUTHENTICATION + "\n");
|
||||||
|
} else {
|
||||||
|
Utils.CleanDirectory(dst);
|
||||||
|
PerformScript("cd Repo\nsvn checkout " + Constants.REPOSITORY_AUTHENTICATION + " " + src + "\n"); //export
|
||||||
|
FileUtils.write(loadedFile, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
protected void body() throws Exception {
|
||||||
|
ShowProgress(1, 0, true);
|
||||||
|
synchronize(Constants.DVM_REPOSITORY, dvmHome);
|
||||||
|
ShowProgress(1, 1, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ import org.apache.commons.io.FileUtils;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
public class DownloadRepository extends ProcessPass {
|
public class DownloadSapforRepository extends ProcessPass {
|
||||||
File sapforHome;
|
File sapforHome;
|
||||||
@Override
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
@@ -23,8 +23,7 @@ public class DownloadRepository extends ProcessPass {
|
|||||||
private void synchronize(String src, File dst) throws Exception {
|
private void synchronize(String src, File dst) throws Exception {
|
||||||
File loadedFile = Paths.get(dst.getAbsolutePath(), CommonConstants.LOADED).toFile();
|
File loadedFile = Paths.get(dst.getAbsolutePath(), CommonConstants.LOADED).toFile();
|
||||||
if (loadedFile.exists()) {
|
if (loadedFile.exists()) {
|
||||||
PerformScript("cd " +
|
PerformScript("cd " + dst.getAbsolutePath() +
|
||||||
dst.getAbsolutePath() +
|
|
||||||
"\ngit pull ");
|
"\ngit pull ");
|
||||||
} else {
|
} else {
|
||||||
Utils.CleanDirectory(dst);
|
Utils.CleanDirectory(dst);
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
package _VisualDVM.Passes;
|
package _VisualDVM.Passes;
|
||||||
import Common.Passes.PassCode_;
|
import Common.Passes.PassCode_;
|
||||||
public enum PassCode implements PassCode_ {
|
public enum PassCode implements PassCode_ {
|
||||||
//-
|
|
||||||
UpdateProperty,
|
UpdateProperty,
|
||||||
UpdateSapforProperty,
|
UpdateSapforProperty,
|
||||||
ShowAllParallelVariants,
|
ShowAllParallelVariants,
|
||||||
@@ -132,7 +131,8 @@ public enum PassCode implements PassCode_ {
|
|||||||
ShowComponentChangesLog,
|
ShowComponentChangesLog,
|
||||||
UpdateComponent,
|
UpdateComponent,
|
||||||
BuildComponent,
|
BuildComponent,
|
||||||
DownloadRepository,
|
DownloadSapforRepository,
|
||||||
|
DownloadDvmRepository,
|
||||||
SaveGraph,
|
SaveGraph,
|
||||||
ApplyBugReportSettings,
|
ApplyBugReportSettings,
|
||||||
DownloadBugReport,
|
DownloadBugReport,
|
||||||
@@ -789,8 +789,10 @@ public enum PassCode implements PassCode_ {
|
|||||||
return "Обновление компонента";
|
return "Обновление компонента";
|
||||||
case BuildComponent:
|
case BuildComponent:
|
||||||
return "Сборка компонента";
|
return "Сборка компонента";
|
||||||
case DownloadRepository:
|
case DownloadSapforRepository:
|
||||||
return "Загрузка репозитория";
|
return "Загрузка репозитория SAPFOR";
|
||||||
|
case DownloadDvmRepository:
|
||||||
|
return "Загрузка репозитория DVM";
|
||||||
case SaveGraph:
|
case SaveGraph:
|
||||||
return "Сделать скриншот графа функций";
|
return "Сделать скриншот графа функций";
|
||||||
case ApplyBugReportSettings:
|
case ApplyBugReportSettings:
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import _VisualDVM.ComponentsServer.UserAccount.UserAccount;
|
|||||||
import _VisualDVM.Constants;
|
import _VisualDVM.Constants;
|
||||||
import _VisualDVM.Global;
|
import _VisualDVM.Global;
|
||||||
import _VisualDVM.GlobalData.Tasks.TaskState;
|
import _VisualDVM.GlobalData.Tasks.TaskState;
|
||||||
import _VisualDVM.Passes.All.DownloadRepository;
|
import _VisualDVM.Passes.All.DownloadDvmRepository;
|
||||||
import _VisualDVM.Passes.All.ZipFolderPass;
|
import _VisualDVM.Passes.All.ZipFolderPass;
|
||||||
import _VisualDVM.Passes.PassCode;
|
import _VisualDVM.Passes.PassCode;
|
||||||
import _VisualDVM.ProjectData.Files.ProjectFile;
|
import _VisualDVM.ProjectData.Files.ProjectFile;
|
||||||
@@ -350,7 +350,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
|||||||
void RefreshDVMTests() throws Exception {
|
void RefreshDVMTests() throws Exception {
|
||||||
UserAccount account = new UserAccount("server", Constants.MailAddress);
|
UserAccount account = new UserAccount("server", Constants.MailAddress);
|
||||||
ServerSapfor serverSapfor = db.serverSapfors.getLastDoneVersion();
|
ServerSapfor serverSapfor = db.serverSapfors.getLastDoneVersion();
|
||||||
DownloadRepository downloadRepository = new DownloadRepository();
|
DownloadDvmRepository downloadRepository = new DownloadDvmRepository();
|
||||||
if (!downloadRepository.Do())
|
if (!downloadRepository.Do())
|
||||||
throw new RepositoryRefuseException("Не удалось обновить репозиторий");
|
throw new RepositoryRefuseException("Не удалось обновить репозиторий");
|
||||||
//-->>
|
//-->>
|
||||||
|
|||||||
Reference in New Issue
Block a user