Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit a89021e

Browse files
authored
Merge pull request #71 from Mgamerz/dev
Mass Effect 3 Mod Manager 5.1.3 Build 91
2 parents 1ce2943 + 55a35b0 commit a89021e

20 files changed

Lines changed: 196 additions & 126 deletions
-2.19 MB
Binary file not shown.
1.41 MB
Binary file not shown.

libraries/sevenzipjbinding.jar

2.3 KB
Binary file not shown.

modmanager3.iml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,6 @@
8181
<SOURCES />
8282
</library>
8383
</orderEntry>
84-
<orderEntry type="module-library">
85-
<library name="sevenzipjbinding-AllWindows.jar">
86-
<CLASSES>
87-
<root url="jar://$MODULE_DIR$/libraries/sevenzipjbinding-AllWindows.jar!/" />
88-
</CLASSES>
89-
<JAVADOC />
90-
<SOURCES />
91-
</library>
92-
</orderEntry>
9384
<orderEntry type="module-library">
9485
<library name="sevenzipjbinding.jar">
9586
<CLASSES>
@@ -99,15 +90,7 @@
9990
<SOURCES />
10091
</library>
10192
</orderEntry>
102-
<orderEntry type="module-library">
103-
<library name="filedrop.jar">
104-
<CLASSES>
105-
<root url="jar://$MODULE_DIR$/libraries/filedrop.jar!/" />
106-
</CLASSES>
107-
<JAVADOC />
108-
<SOURCES />
109-
</library>
110-
</orderEntry>
93+
<orderEntry type="library" name="sevenzipjbinding-Windows-amd64" level="project" />
11194
<orderEntry type="module-library">
11295
<library name="commons-validator-1.6.jar">
11396
<CLASSES>
@@ -185,6 +168,15 @@
185168
</library>
186169
</orderEntry>
187170
<orderEntry type="library" name="lib" level="project" />
171+
<orderEntry type="module-library">
172+
<library name="filedrop.jar">
173+
<CLASSES>
174+
<root url="jar://$MODULE_DIR$/libraries/filedrop.jar!/" />
175+
</CLASSES>
176+
<JAVADOC />
177+
<SOURCES />
178+
</library>
179+
</orderEntry>
188180
<orderEntry type="inheritedJdk" />
189181
</component>
190182
</module>

src/com/me3tweaks/modmanager/ME3TweaksUpdaterServiceWindow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ private void UploadFolder(ChannelSftp sftpChannel, String folderSource, String s
406406
try {
407407
Path compressedRootPath = Paths.get(folderSource);
408408
totalBytesToTransfer = ResourceUtils.GetDirectorySize(compressedRootPath, true);
409-
ModManager.debugLogger.writeMessage("Amount of data to upload: " + ResourceUtils.humanReadableByteCount(totalBytesTransferred, true));
409+
ModManager.debugLogger.writeMessage("Amount of data to upload: " + ResourceUtils.humanReadableByteCount(totalBytesToTransfer, true));
410410
ArrayList<Path> files = (ArrayList<Path>) Files.walk(compressedRootPath).filter(predicate).collect(Collectors.toList());
411411
relativePaths = new ArrayList<>();
412412
for (Path file : files) {

src/com/me3tweaks/modmanager/ModManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737

3838
public class ModManager {
3939
public static boolean IS_DEBUG = false;
40-
public static final String VERSION = "5.1.2";
41-
public static long BUILD_NUMBER = 90L;
42-
public static final String BUILD_DATE = "11/21/2018";
40+
public static final String VERSION = "5.1.3";
41+
public static long BUILD_NUMBER = 91L;
42+
public static final String BUILD_DATE = "01/01/2019";
4343
public static final String SETTINGS_FILENAME = "me3cmm.ini";
4444
public static DebugLogger debugLogger;
4545
public static boolean logging = false;
@@ -56,7 +56,7 @@ public class ModManager {
5656
public static final int MIN_REQUIRED_CMDLINE_MAIN = 1;
5757
public static final int MIN_REQUIRED_CMDLINE_MINOR = 0;
5858
public final static int MIN_REQUIRED_CMDLINE_BUILD = 0;
59-
public static int MIN_REQUIRED_CMDLINE_REV = 31; //not static as i can force this via update manifest
59+
public static int MIN_REQUIRED_CMDLINE_REV = 34; //not static as i can force this via update manifest
6060

6161
private final static int MIN_REQUIRED_NET_FRAMEWORK_RELNUM = 461808; //4.7.2
6262
public final static String MIN_REQUIRED_NET_FRAMEWORK_STR = "4.7.2";

src/com/me3tweaks/modmanager/ModManagerWindow.java

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ public int submitBackgroundJob(String taskname, String uiText) {
207207
MainUIBackgroundJob bg = new MainUIBackgroundJob(taskname, uiText);
208208
backgroundJobs.add(bg);
209209
setActivityIcon(true);
210+
if (backgroundJobs.size() == 1 && backgroundJobs.get(0).getUIText() != null) {
211+
labelStatus.setText(backgroundJobs.get(0).getUIText());
212+
}
213+
210214
return bg.hashCode();
211215
}
212216

@@ -3856,11 +3860,25 @@ private void startGame(String CookedDir) {
38563860
return;
38573861
}
38583862
// Executable exists.
3859-
String[] command = {"cmd.exe", "/c", "start", "cmd.exe", "/c", executable.getAbsolutePath()};
3863+
String[] command = {executable.getAbsolutePath()};
38603864
try {
3861-
labelStatus.setText("Launched Mass Effect 3");
3862-
this.setExtendedState(JFrame.ICONIFIED);
3863-
Runtime.getRuntime().exec(command);
3865+
int code = submitBackgroundJob("GameLaunch","Launching Mass Effect 3");
3866+
ProcessBuilder pb = new ProcessBuilder(command);
3867+
pb.directory(new File(startingDir.toString() + "\\Binaries\\Win32"));
3868+
pb.start();
3869+
new java.util.Timer().schedule(
3870+
new java.util.TimerTask() {
3871+
@Override
3872+
public void run() {
3873+
// your code here
3874+
submitJobCompletion(code);
3875+
labelStatus.setText("Launched Mass Effect 3");
3876+
ModManagerWindow.this.setExtendedState(JFrame.ICONIFIED);
3877+
cancel();
3878+
}
3879+
},
3880+
3000
3881+
);
38643882
} catch (IOException e) {
38653883
ModManager.debugLogger.writeErrorWithException("I/O Exception while launching ME3.", e);
38663884

@@ -3984,6 +4002,8 @@ public static String GetBioGameDir() {
39844002
}
39854003

39864004
class BiogameDirChangeListener implements ItemListener {
4005+
4006+
39874007
@Override
39884008
public void itemStateChanged(ItemEvent event) {
39894009
if (event.getStateChange() == ItemEvent.SELECTED) {
@@ -4209,7 +4229,7 @@ protected Boolean doInBackground() throws Exception {
42094229

42104230
// Manual Alternates
42114231
for (AlternateFile af : job.getAlternateFiles()) {
4212-
String substitutefile = af.getSubstituteFile();
4232+
String substitutefile = af.getSubstituteFile(mod.modCMMVer < 5.0);
42134233
if (substitutefile != null) {
42144234
String outputpath = stagingdir + substitutefile;
42154235
ModManager.debugLogger.writeMessage("Copying [MANUAL SUB] mod file to staging: " + substitutefile + " -> " + outputpath);
@@ -4230,7 +4250,7 @@ protected Boolean doInBackground() throws Exception {
42304250

42314251
// Automatically applied alternates
42324252
for (AlternateFile af : mod.getAlternateFiles()) {
4233-
String substitutefile = af.getSubstituteFile();
4253+
String substitutefile = af.getSubstituteFile(mod.modCMMVer < 5.0);
42344254
if (substitutefile != null) {
42354255
String outputpath = stagingdir + substitutefile;
42364256
ModManager.debugLogger.writeMessage("Copying [AUTO SUB] mod file to staging: " + substitutefile + " -> " + outputpath);

src/com/me3tweaks/modmanager/PatchLibraryWindow.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,7 @@
1414
import java.util.ArrayList;
1515
import java.util.List;
1616

17-
import javax.swing.BorderFactory;
18-
import javax.swing.DefaultComboBoxModel;
19-
import javax.swing.DefaultListModel;
20-
import javax.swing.JButton;
21-
import javax.swing.JComboBox;
22-
import javax.swing.JDialog;
23-
import javax.swing.JLabel;
24-
import javax.swing.JList;
25-
import javax.swing.JOptionPane;
26-
import javax.swing.JPanel;
27-
import javax.swing.JScrollPane;
28-
import javax.swing.JSplitPane;
29-
import javax.swing.JTextArea;
30-
import javax.swing.SwingWorker;
17+
import javax.swing.*;
3118
import javax.swing.border.EmptyBorder;
3219
import javax.swing.event.ListSelectionEvent;
3320
import javax.swing.event.ListSelectionListener;
@@ -48,7 +35,6 @@
4835
import com.me3tweaks.modmanager.objects.Patch;
4936
import com.me3tweaks.modmanager.objects.ThreadCommand;
5037
import com.me3tweaks.modmanager.ui.ModCellRenderer;
51-
import com.me3tweaks.modmanager.ui.PatchCellRenderer;
5238

5339
/**
5440
* Patch Window shows the list of patches in the patch library and things you
@@ -283,7 +269,6 @@ private void setupWindow() {
283269
patchModel = new DefaultListModel<Patch>();
284270
patchList.setModel(patchModel);
285271
patchList.addListSelectionListener(this);
286-
patchList.setCellRenderer(new PatchCellRenderer());
287272
for (Patch patch : ModManagerWindow.ACTIVE_WINDOW.getPatchList()) {
288273
patchModel.addElement(patch);
289274
//System.out.println(patch.convertToME3TweaksSQLInsert());

src/com/me3tweaks/modmanager/modupdater/ModUpdateWindow.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,9 @@ public void executeUpdate() {
467467
}
468468

469469
for (String str : upackage.getFilesToDelete()) {
470-
ModManager.debugLogger.writeMessage("Deleting unused file: " + str);
471-
File file = new File(str);
470+
String fileToDelete = upackage.getMod().getModPath() + str; //path is relative
471+
ModManager.debugLogger.writeMessage("Deleting unused file: " + fileToDelete);
472+
File file = new File(fileToDelete);
472473
FileUtils.deleteQuietly(file);
473474
}
474475
ModManager.debugLogger.writeMessage("Update applied, verifying mod...");
@@ -485,7 +486,7 @@ public void executeUpdate() {
485486
ModManager.debugLogger.writeException(e);
486487
}
487488

488-
ModManager.debugLogger.writeMessage("Mod cleaned up, install finished");
489+
ModManager.debugLogger.writeMessage("Staging directory cleanup complete, update has been applied");
489490
}
490491

491492
/**

0 commit comments

Comments
 (0)