Skip to content
This repository was archived by the owner on Jun 19, 2024. It is now read-only.

Commit f880c6b

Browse files
committed
moved nuget to its own project.
1 parent 4297077 commit f880c6b

File tree

3 files changed

+39
-11
lines changed

3 files changed

+39
-11
lines changed

makefile.uni.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from string import Formatter
2323
from unibuild import Project
2424
from unibuild.modules import build, cmake, git, github, urldownload, msbuild
25-
from unibuild.projects import boost, googletest, lootapi, lz4, nasm, ncc, openssl, sevenzip, sip, usvfs, python, pyqt5, qt5, WixToolkit, zlib
25+
from unibuild.projects import boost, googletest, lootapi, lz4, nasm, ncc, openssl, sevenzip, sip, usvfs, python, pyqt5, qt5, WixToolkit, zlib, nuget
2626
from unibuild.utility import FormatDict
2727
from unibuild.utility.config_utility import cmake_parameters, qt_inst_path
2828

unibuild/projects/ncc.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
from buildtools.buildsystem.visualstudio import ProjectType, VisualStudio2015Solution, VS2015Project
2222
from config import config
2323
from unibuild import Project
24+
from unibuild.projects import nuget
2425
from unibuild.modules import build, msbuild, github, urldownload
2526
from unibuild.utility import lazy
26-
nuget_version = config['nuget_version']
2727

2828
build_path = config['paths']['build']
2929
download_path = config['paths']['download']
@@ -69,16 +69,16 @@ def prepare_nmm(context):
6969
# until this is fixed we lock NMM to the latest nexus release.
7070
Project("ncc") \
7171
.depend(build.Run(r"publish.bat".format("-debug" if config['build_type'] == "Debug" else "-release",
72-
os.path.join(config["paths"]["install"], "bin")),
72+
os.path.join(config["paths"]["install"], "bin")),
7373
working_directory=lazy.Evaluate(lambda: os.path.join(build_path, "NexusClientCli")))
7474
.depend(msbuild.MSBuild(os.path.join(build_path, "Nexus-Mod-Manager", 'NexusClientCli.sln'),
7575
working_directory=lazy.Evaluate(lambda: os.path.join(build_path, "Nexus-Mod-Manager")),
7676
project_platform="Any CPU")
77-
.depend(build.Run(r"nuget.exe restore {}".format(os.path.join(build_path, "Nexus-Mod-Manager", 'NexusClientCli.sln')),
78-
environment=ncc_environment(),
79-
working_directory=lazy.Evaluate(lambda: os.path.join(build_path, "Nexus-Mod-Manager")))
80-
.depend(build.Execute(prepare_nmm, name="append NexusClientCli project to NMM")
81-
.depend(github.Source("Nexus-Mods", "Nexus-Mod-Manager", config["nmm_version"], None, False))
82-
.depend(github.Source(config['Main_Author'], "modorganizer-NCC", config["Main_Branch"])
83-
.set_destination("NexusClientCli")).depend(urldownload.URLDownload("https://dist.nuget.org/win-x86-commandline/v{}/nuget.exe"
84-
.format(nuget_version)))))))
77+
.depend(build.Run(r"nuget.exe restore {}".format(os.path.join(build_path, "Nexus-Mod-Manager", 'NexusClientCli.sln')),
78+
environment=ncc_environment(),
79+
working_directory=lazy.Evaluate(lambda: os.path.join(build_path, "Nexus-Mod-Manager")))
80+
.depend(build.Execute(prepare_nmm, name="append NexusClientCli project to NMM")
81+
.depend(github.Source("Nexus-Mods", "Nexus-Mod-Manager", config["nmm_version"], None, False))
82+
.depend(github.Source(config['Main_Author'], "modorganizer-NCC", config["Main_Branch"])
83+
.set_destination("NexusClientCli")))))) \
84+
.depend("nuget")

unibuild/projects/nuget.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
2+
# Copyright (C) 2016 - 2018 Mod Organizer contributors.
3+
#
4+
# This file is part of Mod Organizer.
5+
#
6+
# Mod Organizer is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# Mod Organizer is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
18+
import os
19+
20+
from config import config
21+
from unibuild import Project
22+
from unibuild.modules import cmake, urldownload
23+
24+
nuget_version = config['nuget_version']
25+
26+
Project("nuget").depend(urldownload.URLDownload("https://dist.nuget.org/win-x86-commandline/v{}/nuget.exe"
27+
.format(nuget_version))
28+
.set_destination("NuGet"))

0 commit comments

Comments
 (0)