Skip to content

Commit dbff762

Browse files
committed
chore: improve windows app configs
1 parent 1ee87fc commit dbff762

3 files changed

Lines changed: 326 additions & 22 deletions

File tree

lib/common/mobile/windows/windows-application-manager.ts

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,21 +145,30 @@ export class WindowsApplicationManager extends ApplicationManagerBase {
145145

146146
/**
147147
* Returns the path of the runtime's trace log for the most recently started app.
148-
* Inside a UWP process, Win32 GetTempPathW() virtualises to AC\Temp (the app
149-
* container's isolated temp folder) — NOT the WinRT TemporaryFolder (TempState).
150-
* Rust's std::env::temp_dir() calls GetTempPathW(), so the DLL writes to AC\Temp.
148+
* Inside a UWP process, Win32 GetTempPathW() virtualises
149+
* to AC\Temp (the app container's isolated temp folder). Rust's
150+
* std::env::temp_dir() calls GetTempPathW(), so the DLL writes to AC\Temp.
151151
* Falls back to the system temp path when no PFN is known (unpackaged EXE).
152152
*/
153153
public getLogFilePath(): string {
154-
const systemTempLog = path.join(os.tmpdir(), "ns_trace.log");
154+
const systemConsoleLog = path.join(os.tmpdir(), "console.log");
155+
const systemLegacyLog = path.join(os.tmpdir(), "ns_trace.log");
156+
155157
if (this._packageFamilyNames.size > 0) {
156158
const pfn = this._packageFamilyNames.values().next().value as string;
157159
const localAppData = process.env.LOCALAPPDATA;
158160
if (localAppData && pfn) {
159-
return path.join(localAppData, "Packages", pfn, "AC", "Temp", "ns_trace.log");
161+
const consolePath = path.join(localAppData, "Packages", pfn, "AC", "Temp", "console.log");
162+
const legacyPath = path.join(localAppData, "Packages", pfn, "AC", "Temp", "ns_trace.log");
163+
if (fs.existsSync(consolePath)) return consolePath;
164+
if (fs.existsSync(legacyPath)) return legacyPath;
165+
return consolePath;
160166
}
161167
}
162-
return systemTempLog;
168+
169+
if (fs.existsSync(systemConsoleLog)) return systemConsoleLog;
170+
if (fs.existsSync(systemLegacyLog)) return systemLegacyLog;
171+
return systemConsoleLog;
163172
}
164173

165174
/**

lib/options.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,11 @@ export class Options {
234234
hasSensitiveValue: false,
235235
default: APP_FOLDER_NAME,
236236
},
237+
phoneProductId: { type: OptionType.String, hasSensitiveValue: false },
238+
phonePublisherId: { type: OptionType.String, hasSensitiveValue: false },
239+
regenGuid: { type: OptionType.Boolean, hasSensitiveValue: false },
240+
noAutoGuid: { type: OptionType.Boolean, hasSensitiveValue: false },
241+
allowZeroGuid: { type: OptionType.Boolean, hasSensitiveValue: false },
237242
aab: { type: OptionType.Boolean, hasSensitiveValue: false },
238243
performance: { type: OptionType.Object, hasSensitiveValue: true },
239244
appleApplicationSpecificPassword: {

0 commit comments

Comments
 (0)