Show install guide to users that only run shareware
This commit is contained in:
parent
3dd8b5b474
commit
fbf6d5ac9a
2 changed files with 10 additions and 0 deletions
|
|
@ -75,6 +75,12 @@ public class DataActivity extends Activity {
|
|||
* Start downloading the shareware
|
||||
*/
|
||||
public void sendDownloadRequest(View view) {
|
||||
File spawnFile = new File(externalDir + "/spawn.mpq-temp");
|
||||
if (spawnFile.exists() && spawnFile.renameTo(new File(externalDir + "/spawn.mpq"))) {
|
||||
startGame();
|
||||
return;
|
||||
}
|
||||
|
||||
String url = "https://github.com/d07RiV/diabloweb/raw/3a5a51e84d5dab3cfd4fef661c46977b091aaa9c/spawn.mpq";
|
||||
String fileName = "spawn.mpq";
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,11 @@ public class DevilutionXSDLActivity extends SDLActivity {
|
|||
if (!file.exists() || !file.canRead()) {
|
||||
return;
|
||||
}
|
||||
|
||||
File newPath = new File(externalDir + "/" + file.getName());
|
||||
if (file.getName().equals("spawn.mpq"))
|
||||
newPath = new File(externalDir + "/" + file.getName() + "-temp");
|
||||
|
||||
if (newPath.exists()) {
|
||||
if (file.canWrite()) {
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue