Skip to content

Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.

Skip .NET's first-run experience (issue #10's question), and bump to 0.4.7

LNPANDY6dc1fe549a21
diff --git a/frontend-qt/nspb_qt/platform_util.py b/frontend-qt/nspb_qt/platform_util.py
index 077d3c40..392db02d 100644
--- a/frontend-qt/nspb_qt/platform_util.py
+++ b/frontend-qt/nspb_qt/platform_util.py
@@ -209,6 +209,11 @@ def child_env(extra: dict[str, str] | None = None) -> dict[str, str]:
env['HOME'] = str(Path.home())
env.setdefault('USER', os.environ.get('USERNAME') or os.environ.get('USER') or 'user')
env.setdefault('DOTNET_CLI_HOME', env['HOME'])
+ # No first-run banner, no telemetry (issue #10's question): the deps panel runs `dotnet
+ # --list-sdks` directly, outside the build script where the same two lines are set. The
+ # telemetry call can hang the very first run on a network that cannot reach Microsoft.
+ env.setdefault('DOTNET_CLI_TELEMETRY_OPTOUT', '1')
+ env.setdefault('DOTNET_NOLOGO', '1')
if extra:
env.update(extra)
return env
diff --git a/frontend/NS-Port-Builder-macOS-arm64.zip b/frontend/NS-Port-Builder-macOS-arm64.zip
index 84c84133..628ec19e 100644
Binary files a/frontend/NS-Port-Builder-macOS-arm64.zip and b/frontend/NS-Port-Builder-macOS-arm64.zip differ
diff --git a/frontend/Sources/NSPortBuilder/ContentView.swift b/frontend/Sources/NSPortBuilder/ContentView.swift
index 09e32248..fe172db1 100644
--- a/frontend/Sources/NSPortBuilder/ContentView.swift
+++ b/frontend/Sources/NSPortBuilder/ContentView.swift
@@ -318,7 +318,7 @@ final class BuildModel: ObservableObject {
// ---- App self-update (GitHub Releases) ----
/// Bump together with each release tag; the update check compares it with the latest release.
- static let appVersion = "0.4.6"
+ static let appVersion = "0.4.7"
@Published var appUpdate: (tag: String, url: String)?
@Published var appBusy = false
@Published var appStatus = ""
diff --git a/scripts/build_ipa_from_nsp.py b/scripts/build_ipa_from_nsp.py
index d028a6bc..c337809e 100755
--- a/scripts/build_ipa_from_nsp.py
+++ b/scripts/build_ipa_from_nsp.py
@@ -1832,6 +1832,11 @@ def main(args=None):
env['HOME'] = os.environ['HOME'] = str(home)
say(f'HOME: {home} (taken from the password database; the environment had none)')
env.setdefault('DOTNET_CLI_HOME', env['HOME']) # .NET writes its first-run state here
+ # No first-run banner, no telemetry: a build neither wants nor reads either, and the telemetry
+ # call can hang the first run on a network that cannot reach Microsoft. setdefault, so a user
+ # who wants telemetry on keeps it.
+ env.setdefault('DOTNET_CLI_TELEMETRY_OPTOUT', '1')
+ env.setdefault('DOTNET_NOLOGO', '1')
configure_dotnet(env)
env.setdefault('J', str(os.cpu_count() or 8)) # shader_split.py's and dmsh_build.py's workers (their default is 8)
py = sys.executable
diff --git a/scripts/sync_upstream.py b/scripts/sync_upstream.py
index a90b004e..55672e36 100644
--- a/scripts/sync_upstream.py
+++ b/scripts/sync_upstream.py
@@ -493,6 +493,18 @@ def patch_nsp(t):
env['HOME'] = os.environ['HOME'] = str(home)
say(f'HOME: {home} (taken from the password database; the environment had none)')
env.setdefault('DOTNET_CLI_HOME', env['HOME']) # .NET writes its first-run state here""")]))
+ # Issue #10 also asked why the first-run experience is not simply skipped. It can be, with the
+ # two knobs .NET still supports (SKIP_FIRST_TIME_EXPERIENCE was retired in .NET Core 3.0): the
+ # banner and the telemetry call are noise for a build, and the telemetry endpoint can hang the
+ # very first run on a mainland connection — which is how a "stuck at dotnet" report looks.
+ P.append(('dotnet quiet', 'DOTNET_CLI_TELEMETRY_OPTOUT', [(
+ " env.setdefault('DOTNET_CLI_HOME', env['HOME']) # .NET writes its first-run state here",
+ """ env.setdefault('DOTNET_CLI_HOME', env['HOME']) # .NET writes its first-run state here
+ # No first-run banner, no telemetry: a build neither wants nor reads either, and the telemetry
+ # call can hang the first run on a network that cannot reach Microsoft. setdefault, so a user
+ # who wants telemetry on keeps it.
+ env.setdefault('DOTNET_CLI_TELEMETRY_OPTOUT', '1')
+ env.setdefault('DOTNET_NOLOGO', '1')""")]))
P.append(('3.9 survey note', "listed = ', '.join('{} ({})'.format(n, mods[n]['kind'])", [(
''' if extra: notes.append(f'modules besides main / sdk: {", ".join(f"{n} ({mods[n]["kind"]})" for n in extra)}; the provisional profile loads {G["modules"][0]} (load order main, subsdk*, sdk)')''',
''' if extra: