Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
eirannejad committed Mar 23, 2021
2 parents 6f3e004 + e53ab8d commit 9eb5df2
Show file tree
Hide file tree
Showing 250 changed files with 4,093 additions and 1,221 deletions.
241 changes: 114 additions & 127 deletions Pipfile.lock

Large diffs are not rendered by default.

Binary file modified bin/engines/CPY378/pyRevitLabs.PythonNet.dll
Binary file not shown.
Binary file modified bin/engines/CPY385/pyRevitLabs.PythonNet.dll
Binary file not shown.
Binary file modified bin/engines/IPY2710/pyRevitLoader.dll
Binary file not shown.
Binary file modified bin/engines/IPY2710/pyRevitRunner.dll
Binary file not shown.
Binary file modified bin/engines/IPY2711PR/pyRevitLoader.dll
Binary file not shown.
Binary file modified bin/engines/IPY2711PR/pyRevitRunner.dll
Binary file not shown.
Binary file modified bin/engines/IPY273/pyRevitLoader.dll
Binary file not shown.
Binary file modified bin/engines/IPY273/pyRevitRunner.dll
Binary file not shown.
Binary file modified bin/engines/IPY277/pyRevitLoader.dll
Binary file not shown.
Binary file modified bin/engines/IPY277/pyRevitRunner.dll
Binary file not shown.
Binary file modified bin/engines/IPY278/pyRevitLoader.dll
Binary file not shown.
Binary file modified bin/engines/IPY278/pyRevitRunner.dll
Binary file not shown.
Binary file modified bin/engines/IPY279/pyRevitLoader.dll
Binary file not shown.
Binary file modified bin/engines/IPY279/pyRevitRunner.dll
Binary file not shown.
Binary file removed bin/git2-7ce88e6.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.Common.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.CommonCLI.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.CommonWPF.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.DeffrelDB.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.Emojis.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.Language.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.PyRevit.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.TargetApps.AutoCAD.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.TargetApps.Navisworks.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.TargetApps.Revit.dll
Binary file not shown.
Binary file modified bin/pyrevit-autocomplete.exe
Binary file not shown.
Binary file modified bin/pyrevit-doctor.exe
Binary file not shown.
12 changes: 12 additions & 0 deletions bin/pyrevit-products.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[
{
"product": "pyRevit",
"release": "4.8.6",
"version": "4.8.6",
"key": "{32B7C208-2ACC-4D2B-9C75-5BAEE22E7F85}"
},
{
"product": "pyRevit",
"release": "4.8.5",
Expand Down Expand Up @@ -221,6 +227,12 @@
"version": "4.6.1",
"key": "{EF91A585-DC0C-43B8-B88B-4C130F430E84}"
},
{
"product": "pyRevit CLI",
"release": "4.8.6",
"version": "4.8.6",
"key": "{AB14082F-168E-45DE-98A7-7C99DB00FFE7}"
},
{
"product": "pyRevit CLI",
"release": "4.8.5",
Expand Down
Binary file modified bin/pyrevit-telemetryserver.exe
Binary file not shown.
Binary file modified bin/pyrevit.exe
Binary file not shown.
21 changes: 11 additions & 10 deletions dev/_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,6 @@ def _update_product_data(ver, key, cli=False):
json.dump([x._asdict() for x in pdata], dfile, indent=True)


def _installer_build():
installer = "advancedinstaller.com"
for script in [configs.PYREVIT_AIPFILE, configs.PYREVIT_CLI_AIPFILE]:
print(f"Building installer {script}")
utils.system(
[installer, "/build", op.abspath(script),]
)


def _get_binaries():
for dirname, _, files in os.walk(configs.BINPATH):
for fn in files:
Expand Down Expand Up @@ -115,6 +106,16 @@ def _commit_changes(msg):
utils.system(['git', 'commit', '-m', msg])


def build_installers(args: Dict[str, str]):
"""Build pyRevit and CLI installers"""
installer = "advancedinstaller.com"
for script in [configs.PYREVIT_AIPFILE, configs.PYREVIT_CLI_AIPFILE]:
print(f"Building installer {script}")
utils.system(
[installer, "/build", op.abspath(script),]
)


def create_release(args: Dict[str, str]):
"""Create pyRevit release (build all, create installers)"""
utils.ensure_windows()
Expand Down Expand Up @@ -147,4 +148,4 @@ def create_release(args: Dict[str, str]):

# now build the installers
# installer are signed by the installer builder
_installer_build()
build_installers(args)
4 changes: 2 additions & 2 deletions dev/pyRevit/AssemblyVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;

[assembly: AssemblyVersion("4.8.5")]
[assembly: AssemblyFileVersion("4.8.5")]
[assembly: AssemblyVersion("4.8.6")]
[assembly: AssemblyFileVersion("4.8.6")]
17 changes: 7 additions & 10 deletions dev/pyRevitLabs.PyRevit.Runtime/pyRevitLabs.PyRevit.Runtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,23 @@
<Reference Include="System.Windows.Interactivity">
<HintPath>..\..\bin\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="IKVM.Reflection">
<HintPath>..\..\bin\engines\2710\IKVM.Reflection.dll</HintPath>
</Reference>
<Reference Include="IronPython">
<HintPath>..\..\bin\engines\2710\IronPython.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.dll</HintPath>
</Reference>
<Reference Include="IronPython.Modules">
<HintPath>..\..\bin\engines\2710\IronPython.Modules.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.Modules.dll</HintPath>
</Reference>
<Reference Include="IronPython.SQLite">
<HintPath>..\..\bin\engines\2710\IronPython.SQLite.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.SQLite.dll</HintPath>
</Reference>
<Reference Include="IronPython.Wpf">
<HintPath>..\..\bin\engines\2710\IronPython.Wpf.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.Wpf.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Dynamic">
<HintPath>..\..\bin\engines\2710\Microsoft.Dynamic.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.Microsoft.Dynamic.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Scripting">
<HintPath>..\..\bin\engines\2710\Microsoft.Scripting.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.Microsoft.Scripting.dll</HintPath>
</Reference>
<Reference Include="pyRevitLabs.Common">
<HintPath>..\..\bin\pyRevitLabs.Common.dll</HintPath>
Expand All @@ -100,7 +97,7 @@
<HintPath>..\..\bin\pyRevitLabs.TargetApps.Revit.dll</HintPath>
</Reference>
<Reference Include="pyRevitLoader">
<HintPath>..\..\bin\engines\2710\pyRevitLoader.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLoader.dll</HintPath>
</Reference>
<Reference Include="pyRevitLabs.PythonNet">
<HintPath>..\modules\pyRevitLabs.Python.Net/src/runtime/bin/pyRevitLabs.PythonNet.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,23 @@
<Reference Include="System.Windows.Interactivity">
<HintPath>..\..\bin\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="IKVM.Reflection">
<HintPath>..\..\bin\engines\2710\IKVM.Reflection.dll</HintPath>
</Reference>
<Reference Include="IronPython">
<HintPath>..\..\bin\engines\2710\IronPython.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.dll</HintPath>
</Reference>
<Reference Include="IronPython.Modules">
<HintPath>..\..\bin\engines\2710\IronPython.Modules.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.Modules.dll</HintPath>
</Reference>
<Reference Include="IronPython.SQLite">
<HintPath>..\..\bin\engines\2710\IronPython.SQLite.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.SQLite.dll</HintPath>
</Reference>
<Reference Include="IronPython.Wpf">
<HintPath>..\..\bin\engines\2710\IronPython.Wpf.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.Wpf.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Dynamic">
<HintPath>..\..\bin\engines\2710\Microsoft.Dynamic.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.Microsoft.Dynamic.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Scripting">
<HintPath>..\..\bin\engines\2710\Microsoft.Scripting.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.Microsoft.Scripting.dll</HintPath>
</Reference>
<Reference Include="pyRevitLabs.Common">
<HintPath>..\..\bin\pyRevitLabs.Common.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,23 @@
<Reference Include="System.Windows.Interactivity">
<HintPath>..\..\bin\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="IKVM.Reflection">
<HintPath>..\..\bin\engines\2710\IKVM.Reflection.dll</HintPath>
</Reference>
<Reference Include="IronPython">
<HintPath>..\..\bin\engines\2710\IronPython.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.dll</HintPath>
</Reference>
<Reference Include="IronPython.Modules">
<HintPath>..\..\bin\engines\2710\IronPython.Modules.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.Modules.dll</HintPath>
</Reference>
<Reference Include="IronPython.SQLite">
<HintPath>..\..\bin\engines\2710\IronPython.SQLite.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.SQLite.dll</HintPath>
</Reference>
<Reference Include="IronPython.Wpf">
<HintPath>..\..\bin\engines\2710\IronPython.Wpf.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.Wpf.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Dynamic">
<HintPath>..\..\bin\engines\2710\Microsoft.Dynamic.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.Microsoft.Dynamic.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Scripting">
<HintPath>..\..\bin\engines\2710\Microsoft.Scripting.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.Microsoft.Scripting.dll</HintPath>
</Reference>
<Reference Include="pyRevitLabs.Common">
<HintPath>..\..\bin\pyRevitLabs.Common.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,23 @@
<Reference Include="System.Windows.Interactivity">
<HintPath>..\..\bin\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="IKVM.Reflection">
<HintPath>..\..\bin\engines\2710\IKVM.Reflection.dll</HintPath>
</Reference>
<Reference Include="IronPython">
<HintPath>..\..\bin\engines\2710\IronPython.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.dll</HintPath>
</Reference>
<Reference Include="IronPython.Modules">
<HintPath>..\..\bin\engines\2710\IronPython.Modules.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.Modules.dll</HintPath>
</Reference>
<Reference Include="IronPython.SQLite">
<HintPath>..\..\bin\engines\2710\IronPython.SQLite.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.SQLite.dll</HintPath>
</Reference>
<Reference Include="IronPython.Wpf">
<HintPath>..\..\bin\engines\2710\IronPython.Wpf.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.Wpf.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Dynamic">
<HintPath>..\..\bin\engines\2710\Microsoft.Dynamic.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.Microsoft.Dynamic.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Scripting">
<HintPath>..\..\bin\engines\2710\Microsoft.Scripting.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.Microsoft.Scripting.dll</HintPath>
</Reference>
<Reference Include="pyRevitLabs.Common">
<HintPath>..\..\bin\pyRevitLabs.Common.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,23 @@
<Reference Include="System.Windows.Interactivity">
<HintPath>..\..\bin\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="IKVM.Reflection">
<HintPath>..\..\bin\engines\2710\IKVM.Reflection.dll</HintPath>
</Reference>
<Reference Include="IronPython">
<HintPath>..\..\bin\engines\2710\IronPython.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.dll</HintPath>
</Reference>
<Reference Include="IronPython.Modules">
<HintPath>..\..\bin\engines\2710\IronPython.Modules.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.Modules.dll</HintPath>
</Reference>
<Reference Include="IronPython.SQLite">
<HintPath>..\..\bin\engines\2710\IronPython.SQLite.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.SQLite.dll</HintPath>
</Reference>
<Reference Include="IronPython.Wpf">
<HintPath>..\..\bin\engines\2710\IronPython.Wpf.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.IronPython.Wpf.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Dynamic">
<HintPath>..\..\bin\engines\2710\Microsoft.Dynamic.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.Microsoft.Dynamic.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Scripting">
<HintPath>..\..\bin\engines\2710\Microsoft.Scripting.dll</HintPath>
<HintPath>..\..\bin\engines\IPY2711PR\pyRevitLabs.Microsoft.Scripting.dll</HintPath>
</Reference>
<Reference Include="pyRevitLabs.Common">
<HintPath>..\..\bin\pyRevitLabs.Common.dll</HintPath>
Expand Down
42 changes: 26 additions & 16 deletions dev/pyRevitLabs/pyRevitCLI/PyRevitCLI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,7 @@ private static void ProcessArguments() {
repoUrl: TryGetValue("--source"),
imagePath: TryGetValue("--image"),
destPath: TryGetValue("--dest"),
username: TryGetValue("--username"),
password: TryGetValue("--password")
credentials: TryGetCredentials()
);
}

Expand Down Expand Up @@ -278,11 +277,10 @@ private static void ProcessArguments() {

else if (all("update"))
PyRevitCLICloneCmds.UpdateClone(
allClones: arguments["--all"].IsTrue,
cloneName: TryGetValue("<clone_name>"),
username: TryGetValue("--username"),
password: TryGetValue("--password")
);
allClones: arguments["--all"].IsTrue,
cloneName: TryGetValue("<clone_name>"),
credentials: TryGetCredentials()
);

else
PyRevitCLICloneCmds.PrintClones();
Expand Down Expand Up @@ -362,18 +360,16 @@ private static void ProcessArguments() {
if (IsHelpMode)
PyRevitCLIAppHelps.PrintHelp(PyRevitCLICommandType.Extend);

else if (any("ui", "lib")) {
else if (any("ui", "lib"))
PyRevitCLIExtensionCmds.Extend(
ui: arguments["ui"].IsTrue,
lib: arguments["lib"].IsTrue,
extName: TryGetValue("<extension_name>"),
destPath: TryGetValue("--dest"),
repoUrl: TryGetValue("<repo_url>"),
branchName: TryGetValue("--branch"),
username: TryGetValue("--username"),
password: TryGetValue("--password")
credentials: TryGetCredentials()
);
}

else
PyRevitCLIExtensionCmds.Extend(
Expand Down Expand Up @@ -460,11 +456,10 @@ private static void ProcessArguments() {

else if (all("update"))
PyRevitCLIExtensionCmds.UpdateExtension(
all: arguments["--all"].IsTrue,
extName: TryGetValue("<extension_name>"),
username: TryGetValue("--username"),
password: TryGetValue("--password")
);
all: arguments["--all"].IsTrue,
extName: TryGetValue("<extension_name>"),
credentials: TryGetCredentials()
);

else if (IsHelpMode)
PyRevitCLIAppHelps.PrintHelp(PyRevitCLICommandType.Extensions);
Expand Down Expand Up @@ -921,6 +916,21 @@ internal static string TryGetValue(string key, string defaultValue = null) {
return arguments[key] != null ? arguments[key].Value as string : defaultValue;
}

internal static GitInstallerCredentials TryGetCredentials() {
GitInstallerCredentials credentials = null;
if (TryGetValue("--password") is string password)
credentials = new GitInstallerUsernamePasswordCredentials {
Username = TryGetValue("--username"),
Password = password
};
else if (TryGetValue("--token") is string accessToken)
credentials = new GitInstallerAccessTokenCredentials {
AccessToken = accessToken
};

return credentials;
}

// private:
private static void PrintArguments(IDictionary<string, ValueObject> arguments) {
var activeArgs = arguments.Where(x => x.Value != null && (x.Value.IsTrue || x.Value.IsString));
Expand Down
9 changes: 4 additions & 5 deletions dev/pyRevitLabs/pyRevitCLI/PyRevitCLICloneCmds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ internal static void
}

internal static void
CreateClone(string cloneName, string deployName, string branchName, string repoUrl, string imagePath, string destPath, string username, string password) {
CreateClone(string cloneName, string deployName, string branchName, string repoUrl, string imagePath, string destPath, GitInstallerCredentials credentials) {
// FIXME: implement image
if (cloneName != null) {
// if deployment requested or image path is provided
Expand All @@ -68,8 +68,7 @@ internal static void
branchName: branchName,
repoUrl: repoUrl,
destPath: destPath,
username: username,
password: password
credentials: credentials
);
}
}
Expand Down Expand Up @@ -236,7 +235,7 @@ internal static void
}

internal static void
UpdateClone(bool allClones, string cloneName, string username, string password) {
UpdateClone(bool allClones, string cloneName, GitInstallerCredentials credentials) {
// TODO: ask for closing running Revits

// prepare a list of clones to be updated
Expand Down Expand Up @@ -267,7 +266,7 @@ internal static void
// update clones that do not include this process
foreach (var clone in targetClones) {
logger.Debug("Updating clone \"{0}\"", clone.Name);
PyRevitClones.Update(clone, username, password);
PyRevitClones.Update(clone, credentials);
}

// now update myClone if any, as last step
Expand Down
10 changes: 5 additions & 5 deletions dev/pyRevitLabs/pyRevitCLI/PyRevitCLIExtensionCmds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ internal static void
}

internal static void
Extend(bool ui, bool lib, string extName, string destPath, string repoUrl, string branchName, string username, string password) {
Extend(bool ui, bool lib, string extName, string destPath, string repoUrl, string branchName, GitInstallerCredentials credentials) {
PyRevitExtensionTypes extType = PyRevitExtensionTypes.Unknown;
if (ui)
extType = PyRevitExtensionTypes.UIExtension;
else if (lib)
extType = PyRevitExtensionTypes.LibraryExtension;

PyRevitExtensions.InstallExtension(extName, extType, repoUrl, destPath, branchName, username, password);
PyRevitExtensions.InstallExtension(extName, extType, repoUrl, destPath, branchName, credentials);
}

internal static void
Expand Down Expand Up @@ -207,11 +207,11 @@ internal static void
}

internal static void
UpdateExtension(bool all, string extName, string username, string password) {
UpdateExtension(bool all, string extName, GitInstallerCredentials credentials) {
if (all)
PyRevitExtensions.UpdateAllInstalledExtensions(username, password);
PyRevitExtensions.UpdateAllInstalledExtensions(credentials);
else if (extName != null)
PyRevitExtensions.UpdateExtension(extName, username, password);
PyRevitExtensions.UpdateExtension(extName, credentials);
}
}
}
Loading

0 comments on commit 9eb5df2

Please sign in to comment.