Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
06ad52f
Merge pull request #1 from PhoenicisOrg/master
ImperatorS79 Aug 28, 2017
86fd07c
Update script.js
ImperatorS79 Aug 28, 2017
a6f232b
Merge pull request #2 from PhoenicisOrg/master
ImperatorS79 Aug 28, 2017
a80aa84
Merge pull request #3 from PhoenicisOrg/master
ImperatorS79 Sep 26, 2017
6da4a59
Merge pull request #4 from PhoenicisOrg/master
ImperatorS79 Mar 19, 2018
4a11f65
Merge pull request #8 from PhoenicisOrg/master
ImperatorS79 Apr 9, 2018
b2d5724
Merge pull request #9 from PhoenicisOrg/master
ImperatorS79 May 7, 2018
b7d1f0f
Merge pull request #10 from PhoenicisOrg/master
ImperatorS79 May 13, 2018
533df6e
Merge pull request #11 from PhoenicisOrg/master
ImperatorS79 May 22, 2018
186e4ed
Merge pull request #12 from PhoenicisOrg/master
ImperatorS79 May 29, 2018
99cf1db
Merge pull request #13 from PhoenicisOrg/master
ImperatorS79 Jun 13, 2018
87999b4
Merge pull request #15 from PhoenicisOrg/master
ImperatorS79 Oct 10, 2018
610b258
Merge pull request #16 from PhoenicisOrg/master
ImperatorS79 Oct 12, 2018
ad2ea01
Merge pull request #17 from PhoenicisOrg/master
ImperatorS79 Jan 12, 2019
2e53a22
Merge pull request #18 from PhoenicisOrg/master
ImperatorS79 Jan 18, 2019
ac63d2c
Update dotnet
ImperatorS79 Jan 21, 2019
bf1bc6b
Update dotnet 2
ImperatorS79 Jan 21, 2019
13353cf
Update dotnet 3
ImperatorS79 Jan 21, 2019
1a249af
Update dotnet 4
ImperatorS79 Jan 21, 2019
09d0b7c
Update dotnet 5
ImperatorS79 Jan 21, 2019
a068712
Update dotnet 6
ImperatorS79 Jan 21, 2019
ca65bb0
Update dotnet 7
ImperatorS79 Jan 21, 2019
22346f1
Update script.js
ImperatorS79 Jan 22, 2019
7320fc8
Update script.js
ImperatorS79 Jan 23, 2019
692cf22
Update script.js
ImperatorS79 Jan 23, 2019
79b76c4
Update script.js
ImperatorS79 Jan 23, 2019
0076729
Update script.js
ImperatorS79 Jan 23, 2019
46b6f08
Update script.js
ImperatorS79 Jan 23, 2019
32c12d1
Update script.js
ImperatorS79 Jan 23, 2019
c47772b
Update script.js
ImperatorS79 Jan 23, 2019
dc139db
Fix script.json and delete override
ImperatorS79 Jan 23, 2019
a3c38fe
Fix script.json and delete override 2
ImperatorS79 Jan 23, 2019
70b1b34
Fix codacy
ImperatorS79 Jan 23, 2019
9fcb1cb
Fix ==
ImperatorS79 Jan 24, 2019
17989d8
Include clean-up and regedit.patch()
ImperatorS79 Jan 28, 2019
de5ad53
Remove check osVersion == null
ImperatorS79 Jan 28, 2019
c168ed0
Update script.js
ImperatorS79 Jan 29, 2019
10f93ca
Merge pull request #20 from PhoenicisOrg/master
ImperatorS79 Feb 2, 2019
152c94c
Update script.js
ImperatorS79 Feb 4, 2019
0856059
Update script.js
ImperatorS79 Feb 4, 2019
323c615
Update script.js
ImperatorS79 Feb 4, 2019
e9fd74e
Update script.js
ImperatorS79 Feb 4, 2019
dc1e4d2
Update script.js
ImperatorS79 Feb 4, 2019
6f9b410
Update script.js
ImperatorS79 Feb 4, 2019
09ba966
Update script.js
ImperatorS79 Feb 4, 2019
205e99f
Update dotnet46* install args
ImperatorS79 Feb 5, 2019
83d1b86
Add a verb to remove mono in a clean way (winetricks)
ImperatorS79 Feb 9, 2019
12e3d68
Run npm tools
ImperatorS79 Feb 9, 2019
c8c43c4
YouHOU camelCase !
ImperatorS79 Feb 9, 2019
7e63fd2
Oops
ImperatorS79 Feb 9, 2019
f1eb601
Travis are you happy?
ImperatorS79 Feb 9, 2019
cf6a4a5
Reapply osVersion null checkin (fix mscorlib ressource bug)
ImperatorS79 Feb 9, 2019
7d7375c
Put dotnet4* > dotnet45 in testing
ImperatorS79 Feb 10, 2019
7bd3841
Json align
ImperatorS79 Feb 10, 2019
6a9a456
Display message for manual verb installation
ImperatorS79 Feb 10, 2019
4576b20
Finalization
ImperatorS79 Feb 11, 2019
92fe610
Merge branch 'master' into dotnet
ImperatorS79 Feb 11, 2019
02a0ab2
Remove null check since master changes
ImperatorS79 Feb 12, 2019
07f566c
Merge branch 'dotnet' of http://www.github.com/ImperatorS79/scripts i…
ImperatorS79 Feb 12, 2019
2e04768
removemono -> remove_mono removeMono
ImperatorS79 Feb 12, 2019
4f672e6
Fix Codacy
ImperatorS79 Feb 13, 2019
a6ad465
Codacy changes
ImperatorS79 Feb 14, 2019
04ffb0e
Update script.js
ImperatorS79 Feb 14, 2019
241fc25
Fix spelling mistakes
ImperatorS79 Feb 21, 2019
0d98197
Merge branch 'master' into dotnet
ImperatorS79 Feb 22, 2019
252ded3
Fix conflicts
ImperatorS79 Feb 25, 2019
720e9b3
Update script.js
ImperatorS79 Feb 26, 2019
11cfce3
Update script.js
ImperatorS79 Feb 26, 2019
ade899d
Merge pull request #21 from PhoenicisOrg/master
ImperatorS79 Feb 27, 2019
ea4e9d7
Merge master
ImperatorS79 Feb 27, 2019
4292583
Include by id
ImperatorS79 Feb 27, 2019
bdaf530
Merge branch 'master' into dotnet
ImperatorS79 Mar 2, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions Engines/Wine/Verbs/Remove Mono/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
include("engines.wine.engine.object");
include("utils.functions.filesystem.files");
include("engines.wine.plugins.regedit");

/**
* Verb to remove mono
* @returns {Wine} Wine object
*/
Wine.prototype.removeMono = function () {
if (this.uninstall("Mono"))
{
this.wizard().wait(tr("Please wait..."));
this.regedit().deleteKey("HKLM\\Software\\Microsoft\\.NETFramework\\v2.0.50727\\SBSDisabled");

this.wizard().wait(tr("Please wait..."));
this.regedit().deleteKey("HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v3.5");

this.wizard().wait(tr("Please wait..."));
this.regedit().deleteKey("HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v4");

remove(this.system32directory() + "/mscoree.dll");
if (this.architecture() == "amd64")
{
remove(this.system64directory() + "/mscoree.dll");
}
}

return this;
};

/**
* Verb to remove mono
*/
var verbImplementation = {
install: function (container) {
var wine = new Wine();
wine.prefix(container);
var wizard = SetupWizard(InstallationType.VERBS, "remove_mono", java.util.Optional.empty());
wine.wizard(wizard);
wine.removeMono();
wizard.close();
}
};

/* exported Verb */
var Verb = Java.extend(org.phoenicis.engines.Verb, verbImplementation);
11 changes: 11 additions & 0 deletions Engines/Wine/Verbs/Remove Mono/script.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"scriptName" : "Remove Mono",
"id" : "engines.wine.verbs.remove_mono",
"compatibleOperatingSystems" : [
"MACOSX",
"LINUX"
],
"testingOperatingSystems" : [],
"free" : true,
"requiresPatch" : false
}
31 changes: 22 additions & 9 deletions Engines/Wine/Verbs/dotnet20/script.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,56 @@
include("engines.wine.engine.object");
include("engines.wine.plugins.override_dll");
include("utils.functions.net.resource");
include("engines.wine.verbs.luna");
include("utils.functions.filesystem.files");
include("engines.wine.plugins.windows_version");
include("engines.wine.verbs.remove_mono");


/**
* Verb to install .NET 2.0
* @returns {Wine} Wine object
*/
Wine.prototype.dotnet20 = function () {
var osVersion = this.windowsVersion();

if (this.architecture() == "x86") {
this.windowsVersion("win2k");
var setupFile = new Resource()

var setupFile32 = new Resource()
.wizard(this.wizard())
.url("https://download.lenovo.com/ibmdl/pub/pc/pccbbs/thinkvantage_en/dotnetfx.exe")
.checksum("a3625c59d7a2995fb60877b5f5324892a1693b2a")
.name("dotnetfx.exe")
.get();
this.uninstall("Mono");
remove(this.system32directory() + "/mscoree.dll");

this.removeMono();

this.wizard().wait(tr("Please wait while {0} is installed...", ".NET Framework 2.0"));
this.run(setupFile, ["/q:a", "/c:install.exe /q"], null, false, true);
this.windowsVersion("win7");
this.run(setupFile32, ["/q:a", "/c:install.exe /q"], null, false, true);

this.windowsVersion(osVersion);

remove(this.system32directory() + "/msvcr80.dll");
remove(this.system32directory() + "/msvcm80.dll");
remove(this.system32directory() + "/msvcp80.dll");
}
else {
var setupFile = new Resource()
var setupFile64 = new Resource()
.wizard(this.wizard())
.url("https://download.microsoft.com/download/a/3/f/a3f1bf98-18f3-4036-9b68-8e6de530ce0a/NetFx64.exe")
.checksum("e59cca309463a5d98daeaada83d1b05fed5126c5")
.name("NetFx64.exe")
.get();
this.uninstall("Mono");

this.removeMono();

this.wizard().wait(tr("Please wait while {0} is installed...", ".NET Framework 2.0"));
this.run(setupFile, ["/q:a", "/c:install.exe /q"], null, false, true)
this.run(setupFile64, ["/q:a", "/c:install.exe /q"], null, false, true)
}

//This is in winetricks source, but does not seem to work
//this.wizard().wait(tr("Please wait while executing ngen..."));
//this.run(this.prefixDirectory() + "/drive_c/windows/Microsoft.NET/Framework/v2.0.50727/ngen.exe", "executequeueditems", null, false, true);

return this;
};
43 changes: 32 additions & 11 deletions Engines/Wine/Verbs/dotnet40/script.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
include("engines.wine.engine.object");
include("engines.wine.plugins.override_dll");
include("utils.functions.net.resource");
include("engines.wine.verbs.luna");
include("utils.functions.filesystem.files");
include("engines.wine.plugins.windows_version");
include("engines.wine.verbs.remove_mono");
include("engines.wine.plugins.regedit");


/**
* Verb to install .NET 4.0
* @returns {Wine} Wine object
*/
Wine.prototype.dotnet40 = function () {
if (this.architecture() == "amd64") {
print(tr("This package ({0}) may not fully work on a 64-bit installation. 32-bit prefixes may work better.", "dotnet40"));
}

var osVersion = this.windowsVersion();

var setupFile = new Resource()
.wizard(this.wizard())
.url("http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe")
.checksum("58da3d74db353aad03588cbb5cea8234166d8b99")
.name("dotNetFx40_Full_x86_x64.exe")
.get();

this.uninstall("Mono");
this.removeMono();

this.wizard().wait(tr("Please wait..."));
this.run("reg", ["delete", "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4", "/f"], null, false, true);

remove(this.system32directory() + "/mscoree.dll");
this.windowsVersion("winxp");

this.overrideDLL()
.set("builtin", ["fusion"])
Expand All @@ -30,14 +35,27 @@ Wine.prototype.dotnet40 = function () {
this.wizard().wait(tr("Please wait while {0} is installed...", ".NET Framework 4.0"));
this.run(setupFile, [setupFile, "/q", "/c:\"install.exe /q\""], null, false, true);

this.wizard().wait(tr("Please wait..."));
this.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*fusion");

this.overrideDLL()
.set("native", ["mscoree"])
.do();

this.wizard().wait(tr("Please wait..."));
this.run("reg", ["add", "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full", "/v", "Install", "/t", "REG_DWORD", "/d", "0001", "/f"], null, false, true);
this.wizard().wait(tr("Please wait..."));
this.run("reg", ["add", "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4\Full", "/v", "Version", "/t", "REG_SZ", "/d", "4.0.30319", "/f"], null, false, true);
var regeditFileContent = "REGEDIT4\n" +
"\n" +
"[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full]\n" +
"\"Install\"=dword:0001\n" +
"\"Version\"=\"4.0.30319\"";

this.regedit().patch(regeditFileContent);

//This is in winetricks source, but does not seem to work
//this.wizard().wait(tr("Please wait while executing ngen..."));
//this.run(this.prefixDirectory() + "/drive_c/windows/Microsoft.NET/Framework/v4.0.30319/ngen.exe", "executequeueditems", null, false, true);

this.windowsVersion(osVersion);

return this;
};
Expand All @@ -50,6 +68,10 @@ var verbImplementation = {
var wine = new Wine();
wine.prefix(container);
var wizard = SetupWizard(InstallationType.VERBS, "dotnet40", java.util.Optional.empty());
if (wine.architecture() == "amd64")
{
wizard.message(tr("This package ({0}) may not fully work on a 64-bit installation. 32-bit prefixes may work better.", "dotnet40"));
}
wine.wizard(wizard);
wine.dotnet40();
wizard.close();
Expand All @@ -58,4 +80,3 @@ var verbImplementation = {

/* exported Verb */
var Verb = Java.extend(org.phoenicis.engines.Verb, verbImplementation);

30 changes: 15 additions & 15 deletions Engines/Wine/Verbs/dotnet45/script.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
include("engines.wine.engine.object");
include("engines.wine.plugins.override_dll");
include("engines.wine.plugins.windows_version");
include("utils.functions.net.resource");
include("engines.wine.verbs.luna");
include("utils.functions.filesystem.files");
include("engines.wine.plugins.windows_version");
include("engines.wine.verbs.remove_mono");
include("engines.wine.plugins.regedit");
include("engines.wine.verbs.dotnet40");

/**
* Verb to install .NET 4.5
* @returns {Wine} Wine object
*/
Wine.prototype.dotnet45 = function () {

if (this.architecture() == "amd64") {
throw "{0} cannot be installed in a 64bit wine prefix!".format("dotnet45");
print(tr("This package ({0}) may not fully work on a 64-bit installation. 32-bit prefixes may work better.", "dotnet45"));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why print(...) and not this.wizard().message(...)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I do not know if it is relevant to display this when you are installing an application. But sure it should be done when installing the verb from the container tab.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to show all output information of Phoenicis and its script inside the GUI, except for logs. The reason is, that a user normally only looks at the UI, except in case of an error where he maybe also takes a look at the last ~20 lines of the logs.
print is even worse than a log file, because as far as I know it only shows the message in the console which is normally neither saved after exiting Phoenicis nor open for a normal user opening Phoenicis via a desktop shortcut (i.e. deb or platpak).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I wonder if showing such a warning when installing an app will not confuse people like "this does not seem really stable". I mean the script should be tested so this warning is meaningless when the verb is called inside an application script.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then why add the warning at all?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as a reminder, for people wanting to use the verb (I think I will add it as a message in the verb implementation).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plata @qparis what do you think? How should we print warnings? Via print(...) or this.wizard().message(...)? I think we need to have a standard for this.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depends if the user can react on it. In this case, showing the message in the wizard would mean that a user installing a script which uses this verb would see the message. What is he supposed to do about it (except opening an issue on GitHub asking if this is alright)?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then why do we show the message at all? Everything we print with print is only written in the terminal, which is not really a place where I would look for warning messages as a user.

Maybe we can add an icon with an ? or an ! which shows the warning when hovering over it.
This would still add the warning to the UI but hide it to prevent the user from overreacting?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's in the terminal, we should get it as part of a potential error report (which is IMHO the only use case for this).

}

var OSVersion = this.windowsVersion();
var osVersion = this.windowsVersion();

var setupFile = new Resource()
.wizard(this.wizard())
Expand All @@ -25,12 +24,7 @@ Wine.prototype.dotnet45 = function () {
.name("dotnetfx45_full_x86_x64.exe")
.get();

this.uninstall("Mono");

this.wizard().wait(tr("Please wait..."));
this.run("reg", ["delete", "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4", "/f"], null, false, true);

remove(this.system32directory() + "/mscoree.dll");
this.removeMono();

this.dotnet40();
this.windowsVersion("win7");
Expand All @@ -42,13 +36,16 @@ Wine.prototype.dotnet45 = function () {
this.wizard().wait(tr("Please wait while {0} is installed...", ".NET Framework 4.5"));
this.run(setupFile, [setupFile, "/q", "/c:\"install.exe /q\""], null, false, true);

this.wizard().wait(tr("Please wait..."));
this.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*fusion");

this.overrideDLL()
.set("native", ["mscoree"])
.do();

this.windowsVersion(OSVersion);
this.windowsVersion(osVersion);

if (OSVersion != "win2003") {
if (osVersion != "win2003") {
print(tr("{0} applications can have issues when windows version is not set to \"win2003\"", ".NET 4.5"));
}

Expand All @@ -63,6 +60,10 @@ var verbImplementation = {
var wine = new Wine();
wine.prefix(container);
var wizard = SetupWizard(InstallationType.VERBS, "dotnet45", java.util.Optional.empty());
if (wine.architecture() == "amd64")
{
wizard.message(tr("This package ({0}) may not fully work on a 64-bit installation. 32-bit prefixes may work better.", "dotnet45"));
}
wine.wizard(wizard);
wine.dotnet45();
wizard.close();
Expand All @@ -71,4 +72,3 @@ var verbImplementation = {

/* exported Verb */
var Verb = Java.extend(org.phoenicis.engines.Verb, verbImplementation);

25 changes: 13 additions & 12 deletions Engines/Wine/Verbs/dotnet452/script.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
include("engines.wine.engine.object");
include("engines.wine.plugins.override_dll");
include("engines.wine.plugins.windows_version");
include("utils.functions.net.resource");
include("engines.wine.verbs.luna");
include("utils.functions.filesystem.files");
include("engines.wine.plugins.windows_version");
include("engines.wine.verbs.remove_mono");
include("engines.wine.plugins.regedit");
include("engines.wine.verbs.dotnet40");


/**
* Verb to install .NET 4.5.2
* @returns {Wine} Wine object
*/
Wine.prototype.dotnet452 = function () {
print(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet452"));

var OSVersion = this.windowsVersion();
var osVersion = this.windowsVersion();

var setupFile = new Resource()
.wizard(this.wizard())
Expand All @@ -21,12 +23,7 @@ Wine.prototype.dotnet452 = function () {
.name("NDP452-KB2901907-x86-x64-AllOS-ENU.exe")
.get();

this.uninstall("Mono");

this.wizard().wait(tr("Please wait..."));
this.run("reg", ["delete", "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4", "/f"], null, false, true);

remove(this.system32directory() + "/mscoree.dll");
this.removeMono();

this.dotnet40();
this.windowsVersion("win7");
Expand All @@ -38,13 +35,16 @@ Wine.prototype.dotnet452 = function () {
this.wizard().wait(tr("Please wait while {0} is installed...", ".NET Framework 4.5.2"));
this.run(setupFile, [setupFile, "/q", "/c:\"install.exe /q\""], null, false, true);

this.wizard().wait(tr("Please wait..."));
this.regedit().deleteValue("HKCU\\Software\\Wine\\DllOverrides", "*fusion");

this.overrideDLL()
.set("native", ["mscoree"])
.do();

this.windowsVersion(OSVersion);
this.windowsVersion(osVersion);

if (OSVersion != "win2003") {
if (osVersion != "win2003") {
print(tr("{0} applications can have issues when windows version is not set to \"win2003\"", ".NET 4.5.2"));
}

Expand All @@ -59,6 +59,7 @@ var verbImplementation = {
var wine = new Wine();
wine.prefix(container);
var wizard = SetupWizard(InstallationType.VERBS, "dotnet452", java.util.Optional.empty());
wizard.message(tr("This package ({0}) does not work currently. Use it only for testing!", "dotnet452"));
wine.wizard(wizard);
wine.dotnet452();
wizard.close();
Expand Down
9 changes: 6 additions & 3 deletions Engines/Wine/Verbs/dotnet452/script.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"MACOSX",
"LINUX"
],
"testingOperatingSystems" : [],
"free" : true,
"requiresPatch" : false
"testingOperatingSystems" : [
"MACOSX",
"LINUX"
],
"free" : true,
"requiresPatch" : false
}
Loading