diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 75a67551d..4b9357e52 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -2866,13 +2866,22 @@ for system administrators. \subsection*{Using a configuration file} %.pg -The default name of the configuration file varies on different -operating systems. On MS-DOS and Windows, it is \mbox{``defaults.nh''} in +The default name and location of the configuration file varies on different +operating systems. If you manually installed on MS-DOS and Windows, +it is \mbox{``defaults.nh''} in the same folder as \mbox{{\it nethack.exe\/}} or \mbox{{\it nethackW.exe\/}}. +If you installed using the Microsoft Store, it is \mbox{``defaults.nh''} in +the folder \mbox{{``\%USERPROFILE\%\textbackslash NetHack''}}. On Unix, Linux and Mac OS X it is \mbox{``.nethackrc''} in the user's home directory. The file may not exist, but it is a normal ASCII text file and can be created with any text editor. +%.pg +If you installed using the Microsoft Store, you will find that we provide +a starting template for you to use to create your \mbox{``defaults.nh''} +configuration file. It is \mbox{``defaults.tmp''} also in the folder +\mbox{{``\%USERPROFILE\%\textbackslash NetHack''}}. + %.pg Any line in the configuration file starting with `{\tt \#}' is treated as a comment. Empty lines are ignored. diff --git a/include/extern.h b/include/extern.h index 6dc781e1d..50d25cc1e 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1825,6 +1825,8 @@ E int NDECL(dohistory); E void FDECL(chdirx, (char *, BOOLEAN_P)); #endif /* CHDIR */ E boolean NDECL(authorize_wizard_mode); +E boolean NDECL(is_desktop_bridge_application); + #endif /* MICRO || WIN32 */ /* ### pcsys.c ### */ diff --git a/include/ntconf.h b/include/ntconf.h index eb106090f..c38770e17 100644 --- a/include/ntconf.h +++ b/include/ntconf.h @@ -285,4 +285,5 @@ extern void FDECL(nhassert_failed, (const char * exp, const char * file, #define nethack_enter(argc, argv) nethack_enter_winnt() extern void FDECL(nethack_exit, (int)) NORETURN; extern boolean FDECL(file_exists, (const char *)); +extern boolean FDECL(file_newer, (const char *, const char *)); #endif /* NTCONF_H */ diff --git a/src/files.c b/src/files.c index 41382c1ce..7228cd7e8 100644 --- a/src/files.c +++ b/src/files.c @@ -944,7 +944,7 @@ boolean regularize_it; /* Obtain the name of the logged on user and incorporate * it into the name. */ - Sprintf(fnamebuf, "%s-%s", get_username(0), plname); + Sprintf(fnamebuf, "%s", plname); if (regularize_it) ++legal; /* skip '*' wildcard character */ (void) fname_encode(legal, '%', fnamebuf, encodedfnamebuf, BUFSZ); @@ -1138,6 +1138,10 @@ get_saved_games() { char *foundfile; const char *fq_save; + const char *fq_new_save; + const char *fq_old_save; + char **files = 0; + int i; Strcpy(plname, "*"); set_savefile_name(FALSE); @@ -1153,20 +1157,44 @@ get_saved_games() ++n; } while (findnext()); } + if (n > 0) { - result = (char **) alloc((n + 1) * sizeof(char *)); /* at most */ - (void) memset((genericptr_t) result, 0, (n + 1) * sizeof(char *)); + files = (char **) alloc((n + 1) * sizeof(char *)); /* at most */ + (void) memset((genericptr_t) files, 0, (n + 1) * sizeof(char *)); if (findfirst((char *) fq_save)) { - j = n = 0; + i = 0; do { - char *r; - r = plname_from_file(foundfile); - if (r) - result[j++] = r; - ++n; + files[i++] = strdup(foundfile); } while (findnext()); } } + + if (n > 0) { + result = (char **) alloc((n + 1) * sizeof(char *)); /* at most */ + (void) memset((genericptr_t) result, 0, (n + 1) * sizeof(char *)); + for(i = 0; i < n; i++) { + char *r; + r = plname_from_file(files[i]); + + if (r) { + + /* rename file if it is not named as expected */ + Strcpy(plname, r); + set_savefile_name(FALSE); + fq_new_save = fqname(SAVEF, SAVEPREFIX, 0); + fq_old_save = fqname(files[i], SAVEPREFIX, 1); + + if(strcmp(fq_old_save, fq_new_save) != 0 && + !file_exists(fq_new_save)) + rename(fq_old_save, fq_new_save); + + result[j++] = r; + } + } + } + + free_saved_games(files); + } #endif #if defined(UNIX) && defined(QT_GRAPHICS) @@ -3169,6 +3197,7 @@ fopen_sym_file() FILE *fp; fp = fopen_datafile(SYMBOLS, "r", HACKPREFIX); + return fp; } diff --git a/sys/winnt/windmain.c b/sys/winnt/windmain.c index b2bb18e79..14734900b 100644 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@ -8,8 +8,11 @@ #include "hack.h" #include "dlb.h" #include +#include #include #include +#include +#include #if 0 #include "wintty.h" @@ -22,7 +25,7 @@ #define E extern static void FDECL(process_options, (int argc, char **argv)); static void NDECL(nhusage); -static char *FDECL(exepath, (char *)); +static char *NDECL(get_executable_path); char *NDECL(exename); boolean NDECL(fakeconsole); void NDECL(freefakeconsole); @@ -50,7 +53,6 @@ extern int NDECL(windows_console_custom_nhgetch); void NDECL(safe_routines); char orgdir[PATHLEN]; -char *dir; boolean getreturn_enabled; extern int redirect_stdout; /* from sys/share/pcsys.c */ extern int GUILaunched; @@ -67,6 +69,279 @@ static struct stat hbuf; extern char orgdir[]; +boolean +is_desktop_bridge_application() +{ + UINT32 length = 0; + LONG rc = GetCurrentPackageFullName(&length, NULL); + + return (rc == ERROR_INSUFFICIENT_BUFFER); +} + +void +get_known_folder_path( + const KNOWNFOLDERID * folder_id, + char * path + , size_t path_size) +{ + PWSTR wide_path; + if (FAILED(SHGetKnownFolderPath(folder_id, 0, NULL, &wide_path))) + error("Unable to get known folder path"); + + size_t converted; + errno_t err; + + err = wcstombs_s(&converted, path, path_size, wide_path, path_size - 1); + + CoTaskMemFree(wide_path); + + if (err != 0) error("Failed folder path string conversion"); +} + +void +create_directory(const char * path) +{ + HRESULT hr = CreateDirectoryA(path, NULL); + + if (FAILED(hr) && hr != ERROR_ALREADY_EXISTS) + error("Unable to create directory '%s'", path); +} + +void +build_known_folder_path( + const KNOWNFOLDERID * folder_id, + char * path, + size_t path_size) +{ + get_known_folder_path(folder_id, path, path_size); + strcat(path, "\\NetHack\\"); + create_directory(path); + strcat(path, "3.6\\"); + create_directory(path); +} + +void +build_environment_path( + const char * env_str, + const char * folder, + char * path, + size_t path_size) +{ + path[0] = '\0'; + + const char * root_path = nh_getenv(env_str); + + if (root_path == NULL) return; + + strcpy_s(path, path_size, root_path); + + char * colon = index(path, ';'); + if (colon != NULL) path[0] = '\0'; + + if (strlen(path) == 0) return; + + append_slash(path); + + if (folder != NULL) { + strcat_s(path, path_size, folder); + strcat_s(path, path_size, "\\"); + } +} + +boolean +folder_file_exists(const char * folder, const char * file_name) +{ + char path[MAX_PATH]; + + if (folder[0] == '\0') return FALSE; + + strcpy(path, folder); + strcat(path, file_name); + return file_exists(path); +} + +/* + * Rules for setting prefix locations + * + * COMMON_NETHACK_PATH = %COMMONPROGRAMFILES%\NetHack\3.6\ + * PROFILE_PATH = %SystemDrive%\Users\%USERNAME%\ + * + * NETHACK_PROFILE_PATH = PROFILE_PATH\NetHack\3.6\ + * NETHACK_PER_USER_DATA_PATH = PROFILE_PATH\AppData\Local\NetHack\3.6\ + * NETHACK_GLOBAL_DATA_PATH = %SystemDrive%\ProgramData\NetHack\3.6\ + * EXECUTABLE_PATH = path to where .exe lives + * + * HACKPREFIX: + * - use environment variable NETHACKDIR if variable is defined + * - otherwise use environment variable HACKDIR if variable is defined + * - otherwise if store install use NETHACK_PROFILE_PATH + * - otherwise if manual install use EXECUTABLE_PATH + * + * LEVELPREFIX, SAVEPREFIX: + * - if store install use NETHACK_PER_USER_DATA_PATH + * - if manual install use HACKPREFIX + * + * BONESPREFIX, SCOREPREFIX, LOCKPREFIX: + * - if store install use NETHACK_GLOBAL_DATA_PATH + * - if manual install use HACKPREFIX + * + * DATAPREFIX + * - if store install use EXECUTABLE_PATH + * - if manual install use HACKPREFIX + * + * SYSCONFPREFIX + * - use COMMON_NETHACK_PATH if sysconf present + * - otherwise use HACKPREFIX + * + * CONFIGPREFIX + * - if manual install use PROFILE_PATH + * - if store install use NETHACK_PROFILE_PATH + */ + +void +set_default_prefix_locations(const char *programPath) +{ + char *envp = NULL; + char *sptr = NULL; + + static char hack_path[MAX_PATH]; + static char executable_path[MAX_PATH]; + static char nethack_profile_path[MAX_PATH]; + static char nethack_per_user_data_path[MAX_PATH]; + static char nethack_global_data_path[MAX_PATH]; + static char sysconf_path[MAX_PATH]; + + strcpy(executable_path, get_executable_path()); + append_slash(executable_path); + + build_environment_path("NETHACKDIR", NULL, hack_path, sizeof(hack_path)); + + if (hack_path[0] == '\0') + build_environment_path("HACKDIR", NULL, hack_path, sizeof(hack_path)); + + build_known_folder_path(&FOLDERID_Profile, nethack_profile_path, + sizeof(nethack_profile_path)); + + build_known_folder_path(&FOLDERID_LocalAppData, + nethack_per_user_data_path, sizeof(nethack_per_user_data_path)); + + build_known_folder_path(&FOLDERID_ProgramData, + nethack_global_data_path, sizeof(nethack_global_data_path)); + + if (hack_path[0] == '\0') + strcpy(hack_path, nethack_profile_path); + + fqn_prefix[LEVELPREFIX] = nethack_per_user_data_path; + fqn_prefix[SAVEPREFIX] = nethack_per_user_data_path; + fqn_prefix[BONESPREFIX] = nethack_global_data_path; + fqn_prefix[DATAPREFIX] = executable_path; + fqn_prefix[SCOREPREFIX] = nethack_global_data_path; + fqn_prefix[LOCKPREFIX] = nethack_global_data_path; + fqn_prefix[CONFIGPREFIX] = nethack_profile_path; + + fqn_prefix[HACKPREFIX] = hack_path; + fqn_prefix[TROUBLEPREFIX] = hack_path; + + build_environment_path("COMMONPROGRAMFILES", "NetHack\\3.6", sysconf_path, + sizeof(sysconf_path)); + + if(!folder_file_exists(sysconf_path, SYSCF_FILE)) + strcpy(sysconf_path, hack_path); + + fqn_prefix[SYSCONFPREFIX] = sysconf_path; + +} + +/* copy file if destination does not exist */ +void +copy_file( + const char * dst_folder, + const char * dst_name, + const char * src_folder, + const char * src_name) +{ + char dst_path[MAX_PATH]; + strcpy(dst_path, dst_folder); + strcat(dst_path, dst_name); + + char src_path[MAX_PATH]; + strcpy(src_path, src_folder); + strcat(src_path, src_name); + + if(!file_exists(src_path)) + error("Unable to copy file '%s' as it does not exist", src_path); + + if(file_exists(dst_path)) + return; + + BOOL success = CopyFileA(src_path, dst_path, TRUE); + if(!success) error("Failed to copy '%s' to '%s'", src_path, dst_path); +} + +/* update file copying if it does not exist or src is newer then dst */ +void +update_file( + const char * dst_folder, + const char * dst_name, + const char * src_folder, + const char * src_name) +{ + char dst_path[MAX_PATH]; + strcpy(dst_path, dst_folder); + strcat(dst_path, dst_name); + + char src_path[MAX_PATH]; + strcpy(src_path, src_folder); + strcat(src_path, src_name); + + if(!file_exists(src_path)) + error("Unable to copy file '%s' as it does not exist", src_path); + + if (!file_newer(src_path, dst_path)) + return; + + BOOL success = CopyFileA(src_path, dst_path, FALSE); + if(!success) error("Failed to update '%s' to '%s'", src_path, dst_path); + +} + +void copy_config_content() +{ + /* Keep templates up to date */ + update_file(fqn_prefix[CONFIGPREFIX], "defaults.tmp", + fqn_prefix[DATAPREFIX], "defaults.nh"); + update_file(fqn_prefix[SYSCONFPREFIX], "sysconf.tmp", + fqn_prefix[DATAPREFIX], SYSCF_FILE); + + /* If the required early game file does not exist, copy it */ + copy_file(fqn_prefix[CONFIGPREFIX], "defaults.nh", + fqn_prefix[DATAPREFIX], "defaults.nh"); + copy_file(fqn_prefix[SYSCONFPREFIX], SYSCF_FILE, + fqn_prefix[DATAPREFIX], SYSCF_FILE); + + /* If a required game file does not exist, copy it */ + /* TODO: Can't HACKDIR be changed during option parsing + causing us to perhaps be checking options against the wrong + symbols file? */ + copy_file(fqn_prefix[HACKPREFIX], SYMBOLS, + fqn_prefix[DATAPREFIX], SYMBOLS); +} + +void +copy_hack_content() +{ + /* Keep Guidebook and opthelp up to date */ + update_file(fqn_prefix[HACKPREFIX], "Guidebook.txt", + fqn_prefix[DATAPREFIX], "Guidebook.txt"); + update_file(fqn_prefix[HACKPREFIX], "opthelp", + fqn_prefix[DATAPREFIX], "opthelp"); + + /* Keep templates up to date */ + update_file(fqn_prefix[HACKPREFIX], "symbols.tmp", + fqn_prefix[DATAPREFIX], "symbols"); + +} + /* * __MINGW32__ Note * If the graphics version is built, we don't need a main; it is skipped @@ -120,110 +395,25 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ #endif hname = "NetHack"; /* used for syntax messages */ + +#if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS) /* Save current directory and make sure it gets restored when * the game is exited. */ if (getcwd(orgdir, sizeof orgdir) == (char *) 0) error("NetHack: current directory path too long"); - dir = nh_getenv("NETHACKDIR"); - if (dir == (char *) 0) - dir = nh_getenv("HACKDIR"); - if (dir == (char *) 0) - dir = exepath(argv[0]); -#ifdef _MSC_VER - if (IsDebuggerPresent()) { - static char exepath[_MAX_PATH]; - /* check if we're running under the debugger so we can get to the right folder anyway */ - if (dir != (char *)0) { - char *top = (char *)0; - - if (strlen(dir) < (_MAX_PATH - 1)) - strcpy(exepath, dir); - top = strstr(exepath, "\\build\\.\\Debug"); - if (!top) top = strstr(exepath, "\\build\\.\\Release"); - if (top) { - *top = '\0'; - if (strlen(exepath) < (_MAX_PATH - (strlen("\\binary\\") + 1))) { - Strcat(exepath, "\\binary\\"); - if (strlen(exepath) < (PATHLEN - 1)) { - dir = exepath; - } - } - } - } - } #endif - if (dir != (char *)0) { - int prefcnt; - int fd; - boolean have_syscf = FALSE; - (void) strncpy(hackdir, dir, PATHLEN - 1); - hackdir[PATHLEN - 1] = '\0'; - fqn_prefix[0] = (char *) alloc(strlen(hackdir) + 2); - Strcpy(fqn_prefix[0], hackdir); - append_slash(fqn_prefix[0]); - for (prefcnt = 1; prefcnt < PREFIX_COUNT; prefcnt++) - fqn_prefix[prefcnt] = fqn_prefix[0]; - /* sysconf should be searched for in this location */ - envp = nh_getenv("COMMONPROGRAMFILES"); - if (envp) { - if ((sptr = index(envp, ';')) != 0) - *sptr = '\0'; - if (strlen(envp) > 0) { - fqn_prefix[SYSCONFPREFIX] = - (char *) alloc(strlen(envp) + 10); - Strcpy(fqn_prefix[SYSCONFPREFIX], envp); - append_slash(fqn_prefix[SYSCONFPREFIX]); - Strcat(fqn_prefix[SYSCONFPREFIX], "NetHack\\"); - } - } + set_default_prefix_locations(argv[0]); - /* okay so we have the overriding and definitive locaton - for sysconf, but only in the event that there is not a - sysconf file there (for whatever reason), check a secondary - location rather than abort. */ +#if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS) + chdir(fqn_prefix[HACKPREFIX]); +#endif - /* Is there a SYSCF_FILE there? */ - fd = open(fqname(SYSCF_FILE, SYSCONFPREFIX, 0), O_RDONLY); - if (fd >= 0) { - /* readable */ - close(fd); - have_syscf = TRUE; - } + copy_config_content(); - if (!have_syscf) { - /* No SYSCF_FILE where there should be one, and - without an installer, a user may not be able - to place one there. So, let's try somewhere else... */ - fqn_prefix[SYSCONFPREFIX] = fqn_prefix[0]; - - /* Is there a SYSCF_FILE there? */ - fd = open(fqname(SYSCF_FILE, SYSCONFPREFIX, 0), O_RDONLY); - if (fd >= 0) { - /* readable */ - close(fd); - have_syscf = TRUE; - } - } - - /* user's home directory should default to this - unless - * overridden */ - envp = nh_getenv("USERPROFILE"); - if (envp) { - if ((sptr = index(envp, ';')) != 0) - *sptr = '\0'; - if (strlen(envp) > 0) { - fqn_prefix[CONFIGPREFIX] = - (char *) alloc(strlen(envp) + 2); - Strcpy(fqn_prefix[CONFIGPREFIX], envp); - append_slash(fqn_prefix[CONFIGPREFIX]); - } - } - } - if (GUILaunched || IsDebuggerPresent()) { + if (GUILaunched || IsDebuggerPresent()) getreturn_enabled = TRUE; - } check_recordfile((char *) 0); iflags.windowtype_deferred = TRUE; @@ -233,10 +423,11 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ failbuf); nethack_exit(EXIT_FAILURE); } - if (!hackdir[0]) - Strcpy(hackdir, orgdir); + process_options(argc, argv); - + + copy_hack_content(); + /* * It seems you really want to play. */ @@ -294,7 +485,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ iflags.renameallowed = FALSE; /* Obtain the name of the logged on user and incorporate * it into the name. */ - Sprintf(fnamebuf, "%s-%s", get_username(0), plname); + Sprintf(fnamebuf, "%s", plname); (void) fname_encode( "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-.", '%', fnamebuf, encodedfnamebuf, BUFSZ); @@ -401,7 +592,7 @@ char *argv[]; */ argc--; argv++; - dir = argv[0] + 2; + const char * dir = argv[0] + 2; if (*dir == '=' || *dir == ':') dir++; if (!*dir && argc > 1) { @@ -664,33 +855,28 @@ void freefakeconsole() } #endif -#define EXEPATHBUFSZ 256 -char exepathbuf[EXEPATHBUFSZ]; - char * -exepath(str) -char *str; +get_executable_path() { - char *tmp, *tmp2; - int bsize; + static char path_buffer[MAX_PATH]; - if (!str) - return (char *) 0; - bsize = EXEPATHBUFSZ; - tmp = exepathbuf; #ifdef UNICODE { TCHAR wbuf[BUFSZ]; GetModuleFileName((HANDLE) 0, wbuf, BUFSZ); - WideCharToMultiByte(CP_ACP, 0, wbuf, -1, tmp, bsize, NULL, NULL); + WideCharToMultiByte(CP_ACP, 0, wbuf, -1, path_buffer, sizeof(path_buffer), NULL, NULL); } #else - *(tmp + GetModuleFileName((HANDLE) 0, tmp, bsize)) = '\0'; + DWORD length = GetModuleFileName((HANDLE) 0, path_buffer, MAX_PATH); + if (length == ERROR_INSUFFICIENT_BUFFER) error("Unable to get module name"); + path_buffer[length] = '\0'; #endif - tmp2 = strrchr(tmp, PATH_SEPARATOR); - if (tmp2) - *tmp2 = '\0'; - return tmp; + + char * seperator = strrchr(path_buffer, PATH_SEPARATOR); + if (seperator) + *seperator = '\0'; + + return path_buffer; } /*ARGSUSED*/ @@ -943,4 +1129,28 @@ const char *path; return TRUE; } +/* + file_newer returns TRUE if the file at a_path is newer then the file + at b_path. If a_path does not exist, it returns FALSE. If b_path + does not exist, it returns TRUE. + */ +boolean +file_newer(a_path, b_path) +const char * a_path; +const char * b_path; +{ + struct stat a_sb; + struct stat b_sb; + + if (stat(a_path, &a_sb)) + return FALSE; + + if (stat(b_path, &b_sb)) + return TRUE; + + if(difftime(a_sb.st_mtime, b_sb.st_mtime) < 0) + return TRUE; + return FALSE; +} + /*windmain.c*/ diff --git a/sys/winnt/winnt.c b/sys/winnt/winnt.c index f6a9aa791..37edbbcbf 100644 --- a/sys/winnt/winnt.c +++ b/sys/winnt/winnt.c @@ -188,15 +188,21 @@ get_username(lan_username_size) int *lan_username_size; { static TCHAR username_buffer[BUFSZ]; - unsigned int status; DWORD i = BUFSZ - 1; - /* i gets updated with actual size */ - status = GetUserName(username_buffer, &i); - if (status) - username_buffer[i] = '\0'; - else - Strcpy(username_buffer, "NetHack"); + Strcpy(username_buffer, "NetHack"); + + /* Our privacy policy for the windows store version of nethack makes + * a promise about not collecting any personally identifiable information. + * Do not allow getting user name if we being run from windows store + * version of nethack. In 3.7, we should remove use of username. + */ + if (!is_desktop_bridge_application()) { + /* i gets updated with actual size */ + if (GetUserName(username_buffer, &i)) + username_buffer[i] = '\0'; + } + if (lan_username_size) *lan_username_size = strlen(username_buffer); return username_buffer; diff --git a/win/win32/mhsplash.c b/win/win32/mhsplash.c index 0271c8081..8dcfd1b39 100644 --- a/win/win32/mhsplash.c +++ b/win/win32/mhsplash.c @@ -170,6 +170,7 @@ mswin_display_splash_window(BOOL show_ver) FILE *nf; iflags.news = 0; /* prevent newgame() from re-displaying news */ + /* BUG: this relies on current working directory */ nf = fopen(NEWS, "r"); if (nf != NULL) { char line[LLEN + 1]; diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index b637c463f..38b4b0b29 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -142,6 +142,7 @@ mswin_init_nhwindows(int *argc, char **argv) # ifdef _DEBUG if (showdebug(NHTRACE_LOG) && !_s_debugfp) { /* truncate trace file */ + /* BUG: this relies on current working directory */ _s_debugfp = fopen(NHTRACE_LOG, "w"); } # endif diff --git a/win/win32/vs2017/.gitignore b/win/win32/vs2017/.gitignore index f87237325..c4775b3c5 100644 --- a/win/win32/vs2017/.gitignore +++ b/win/win32/vs2017/.gitignore @@ -2,3 +2,11 @@ *.db-shm *.db-wal paniclog +_pkginfo.txt +AppPackages +BundleArtifacts +report.xml +*.cer +*.appxbundle +NetHackPackage_StoreKey.pfx +NetHackPackage_TemporaryKey.pfx diff --git a/win/win32/vs2017/Images/BadgeLogo.scale-100.png b/win/win32/vs2017/Images/BadgeLogo.scale-100.png new file mode 100644 index 000000000..0c1dff1b4 Binary files /dev/null and b/win/win32/vs2017/Images/BadgeLogo.scale-100.png differ diff --git a/win/win32/vs2017/Images/BadgeLogo.scale-125.png b/win/win32/vs2017/Images/BadgeLogo.scale-125.png new file mode 100644 index 000000000..45aa7773c Binary files /dev/null and b/win/win32/vs2017/Images/BadgeLogo.scale-125.png differ diff --git a/win/win32/vs2017/Images/BadgeLogo.scale-150.png b/win/win32/vs2017/Images/BadgeLogo.scale-150.png new file mode 100644 index 000000000..6a911cb2a Binary files /dev/null and b/win/win32/vs2017/Images/BadgeLogo.scale-150.png differ diff --git a/win/win32/vs2017/Images/BadgeLogo.scale-200.png b/win/win32/vs2017/Images/BadgeLogo.scale-200.png new file mode 100644 index 000000000..21e20fb67 Binary files /dev/null and b/win/win32/vs2017/Images/BadgeLogo.scale-200.png differ diff --git a/win/win32/vs2017/Images/BadgeLogo.scale-400.png b/win/win32/vs2017/Images/BadgeLogo.scale-400.png new file mode 100644 index 000000000..10fdb8f1e Binary files /dev/null and b/win/win32/vs2017/Images/BadgeLogo.scale-400.png differ diff --git a/win/win32/vs2017/Images/LargeTile.scale-100.png b/win/win32/vs2017/Images/LargeTile.scale-100.png new file mode 100644 index 000000000..2c00fc94e Binary files /dev/null and b/win/win32/vs2017/Images/LargeTile.scale-100.png differ diff --git a/win/win32/vs2017/Images/LargeTile.scale-125.png b/win/win32/vs2017/Images/LargeTile.scale-125.png new file mode 100644 index 000000000..fb1ba8d8e Binary files /dev/null and b/win/win32/vs2017/Images/LargeTile.scale-125.png differ diff --git a/win/win32/vs2017/Images/LargeTile.scale-150.png b/win/win32/vs2017/Images/LargeTile.scale-150.png new file mode 100644 index 000000000..f3ccd1107 Binary files /dev/null and b/win/win32/vs2017/Images/LargeTile.scale-150.png differ diff --git a/win/win32/vs2017/Images/LargeTile.scale-200.png b/win/win32/vs2017/Images/LargeTile.scale-200.png new file mode 100644 index 000000000..0c40a8a72 Binary files /dev/null and b/win/win32/vs2017/Images/LargeTile.scale-200.png differ diff --git a/win/win32/vs2017/Images/LargeTile.scale-400.png b/win/win32/vs2017/Images/LargeTile.scale-400.png new file mode 100644 index 000000000..5c11c508b Binary files /dev/null and b/win/win32/vs2017/Images/LargeTile.scale-400.png differ diff --git a/win/win32/vs2017/Images/LockScreenLogo.scale-200.png b/win/win32/vs2017/Images/LockScreenLogo.scale-200.png new file mode 100644 index 000000000..735f57adb Binary files /dev/null and b/win/win32/vs2017/Images/LockScreenLogo.scale-200.png differ diff --git a/win/win32/vs2017/Images/SmallTile.scale-100.png b/win/win32/vs2017/Images/SmallTile.scale-100.png new file mode 100644 index 000000000..f7e719d06 Binary files /dev/null and b/win/win32/vs2017/Images/SmallTile.scale-100.png differ diff --git a/win/win32/vs2017/Images/SmallTile.scale-125.png b/win/win32/vs2017/Images/SmallTile.scale-125.png new file mode 100644 index 000000000..e5aa2ea1b Binary files /dev/null and b/win/win32/vs2017/Images/SmallTile.scale-125.png differ diff --git a/win/win32/vs2017/Images/SmallTile.scale-150.png b/win/win32/vs2017/Images/SmallTile.scale-150.png new file mode 100644 index 000000000..57d16d648 Binary files /dev/null and b/win/win32/vs2017/Images/SmallTile.scale-150.png differ diff --git a/win/win32/vs2017/Images/SmallTile.scale-200.png b/win/win32/vs2017/Images/SmallTile.scale-200.png new file mode 100644 index 000000000..5e5e0ece8 Binary files /dev/null and b/win/win32/vs2017/Images/SmallTile.scale-200.png differ diff --git a/win/win32/vs2017/Images/SmallTile.scale-400.png b/win/win32/vs2017/Images/SmallTile.scale-400.png new file mode 100644 index 000000000..3ed4e6994 Binary files /dev/null and b/win/win32/vs2017/Images/SmallTile.scale-400.png differ diff --git a/win/win32/vs2017/Images/SplashScreen.scale-100.png b/win/win32/vs2017/Images/SplashScreen.scale-100.png new file mode 100644 index 000000000..d4bab84e3 Binary files /dev/null and b/win/win32/vs2017/Images/SplashScreen.scale-100.png differ diff --git a/win/win32/vs2017/Images/SplashScreen.scale-125.png b/win/win32/vs2017/Images/SplashScreen.scale-125.png new file mode 100644 index 000000000..d97a15fc2 Binary files /dev/null and b/win/win32/vs2017/Images/SplashScreen.scale-125.png differ diff --git a/win/win32/vs2017/Images/SplashScreen.scale-150.png b/win/win32/vs2017/Images/SplashScreen.scale-150.png new file mode 100644 index 000000000..2ce132a50 Binary files /dev/null and b/win/win32/vs2017/Images/SplashScreen.scale-150.png differ diff --git a/win/win32/vs2017/Images/SplashScreen.scale-200.png b/win/win32/vs2017/Images/SplashScreen.scale-200.png new file mode 100644 index 000000000..cbffd4a6a Binary files /dev/null and b/win/win32/vs2017/Images/SplashScreen.scale-200.png differ diff --git a/win/win32/vs2017/Images/SplashScreen.scale-400.png b/win/win32/vs2017/Images/SplashScreen.scale-400.png new file mode 100644 index 000000000..05424b307 Binary files /dev/null and b/win/win32/vs2017/Images/SplashScreen.scale-400.png differ diff --git a/win/win32/vs2017/Images/Square150x150Logo.scale-100.png b/win/win32/vs2017/Images/Square150x150Logo.scale-100.png new file mode 100644 index 000000000..778506203 Binary files /dev/null and b/win/win32/vs2017/Images/Square150x150Logo.scale-100.png differ diff --git a/win/win32/vs2017/Images/Square150x150Logo.scale-125.png b/win/win32/vs2017/Images/Square150x150Logo.scale-125.png new file mode 100644 index 000000000..6c625595e Binary files /dev/null and b/win/win32/vs2017/Images/Square150x150Logo.scale-125.png differ diff --git a/win/win32/vs2017/Images/Square150x150Logo.scale-150.png b/win/win32/vs2017/Images/Square150x150Logo.scale-150.png new file mode 100644 index 000000000..d0471de30 Binary files /dev/null and b/win/win32/vs2017/Images/Square150x150Logo.scale-150.png differ diff --git a/win/win32/vs2017/Images/Square150x150Logo.scale-200.png b/win/win32/vs2017/Images/Square150x150Logo.scale-200.png new file mode 100644 index 000000000..105037a99 Binary files /dev/null and b/win/win32/vs2017/Images/Square150x150Logo.scale-200.png differ diff --git a/win/win32/vs2017/Images/Square150x150Logo.scale-400.png b/win/win32/vs2017/Images/Square150x150Logo.scale-400.png new file mode 100644 index 000000000..3b5c7146b Binary files /dev/null and b/win/win32/vs2017/Images/Square150x150Logo.scale-400.png differ diff --git a/win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-16.png b/win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-16.png new file mode 100644 index 000000000..c37bb5650 Binary files /dev/null and b/win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-16.png differ diff --git a/win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-256.png b/win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-256.png new file mode 100644 index 000000000..c5a031ec3 Binary files /dev/null and b/win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-256.png differ diff --git a/win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-32.png b/win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-32.png new file mode 100644 index 000000000..33651c0e2 Binary files /dev/null and b/win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-32.png differ diff --git a/win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-48.png b/win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-48.png new file mode 100644 index 000000000..3be7763d0 Binary files /dev/null and b/win/win32/vs2017/Images/Square44x44Logo.altform-unplated_targetsize-48.png differ diff --git a/win/win32/vs2017/Images/Square44x44Logo.scale-100.png b/win/win32/vs2017/Images/Square44x44Logo.scale-100.png new file mode 100644 index 000000000..b0b2e6cfd Binary files /dev/null and b/win/win32/vs2017/Images/Square44x44Logo.scale-100.png differ diff --git a/win/win32/vs2017/Images/Square44x44Logo.scale-125.png b/win/win32/vs2017/Images/Square44x44Logo.scale-125.png new file mode 100644 index 000000000..7497e6315 Binary files /dev/null and b/win/win32/vs2017/Images/Square44x44Logo.scale-125.png differ diff --git a/win/win32/vs2017/Images/Square44x44Logo.scale-150.png b/win/win32/vs2017/Images/Square44x44Logo.scale-150.png new file mode 100644 index 000000000..d8291fea8 Binary files /dev/null and b/win/win32/vs2017/Images/Square44x44Logo.scale-150.png differ diff --git a/win/win32/vs2017/Images/Square44x44Logo.scale-200.png b/win/win32/vs2017/Images/Square44x44Logo.scale-200.png new file mode 100644 index 000000000..aa5dce320 Binary files /dev/null and b/win/win32/vs2017/Images/Square44x44Logo.scale-200.png differ diff --git a/win/win32/vs2017/Images/Square44x44Logo.scale-400.png b/win/win32/vs2017/Images/Square44x44Logo.scale-400.png new file mode 100644 index 000000000..ec0fa86b7 Binary files /dev/null and b/win/win32/vs2017/Images/Square44x44Logo.scale-400.png differ diff --git a/win/win32/vs2017/Images/Square44x44Logo.targetsize-16.png b/win/win32/vs2017/Images/Square44x44Logo.targetsize-16.png new file mode 100644 index 000000000..c2f20ed08 Binary files /dev/null and b/win/win32/vs2017/Images/Square44x44Logo.targetsize-16.png differ diff --git a/win/win32/vs2017/Images/Square44x44Logo.targetsize-24.png b/win/win32/vs2017/Images/Square44x44Logo.targetsize-24.png new file mode 100644 index 000000000..87a34d0aa Binary files /dev/null and b/win/win32/vs2017/Images/Square44x44Logo.targetsize-24.png differ diff --git a/win/win32/vs2017/Images/Square44x44Logo.targetsize-24_altform-unplated.png b/win/win32/vs2017/Images/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 000000000..1e2c78548 Binary files /dev/null and b/win/win32/vs2017/Images/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/win/win32/vs2017/Images/Square44x44Logo.targetsize-256.png b/win/win32/vs2017/Images/Square44x44Logo.targetsize-256.png new file mode 100644 index 000000000..d7793c819 Binary files /dev/null and b/win/win32/vs2017/Images/Square44x44Logo.targetsize-256.png differ diff --git a/win/win32/vs2017/Images/Square44x44Logo.targetsize-32.png b/win/win32/vs2017/Images/Square44x44Logo.targetsize-32.png new file mode 100644 index 000000000..089f3635f Binary files /dev/null and b/win/win32/vs2017/Images/Square44x44Logo.targetsize-32.png differ diff --git a/win/win32/vs2017/Images/Square44x44Logo.targetsize-48.png b/win/win32/vs2017/Images/Square44x44Logo.targetsize-48.png new file mode 100644 index 000000000..fcd6b9b25 Binary files /dev/null and b/win/win32/vs2017/Images/Square44x44Logo.targetsize-48.png differ diff --git a/win/win32/vs2017/Images/StoreLogo.backup.png b/win/win32/vs2017/Images/StoreLogo.backup.png new file mode 100644 index 000000000..a90d0b6cd Binary files /dev/null and b/win/win32/vs2017/Images/StoreLogo.backup.png differ diff --git a/win/win32/vs2017/Images/StoreLogo.scale-100.png b/win/win32/vs2017/Images/StoreLogo.scale-100.png new file mode 100644 index 000000000..7eda4fa47 Binary files /dev/null and b/win/win32/vs2017/Images/StoreLogo.scale-100.png differ diff --git a/win/win32/vs2017/Images/StoreLogo.scale-125.png b/win/win32/vs2017/Images/StoreLogo.scale-125.png new file mode 100644 index 000000000..c1a3b87e2 Binary files /dev/null and b/win/win32/vs2017/Images/StoreLogo.scale-125.png differ diff --git a/win/win32/vs2017/Images/StoreLogo.scale-150.png b/win/win32/vs2017/Images/StoreLogo.scale-150.png new file mode 100644 index 000000000..09163a158 Binary files /dev/null and b/win/win32/vs2017/Images/StoreLogo.scale-150.png differ diff --git a/win/win32/vs2017/Images/StoreLogo.scale-200.png b/win/win32/vs2017/Images/StoreLogo.scale-200.png new file mode 100644 index 000000000..854fafb9b Binary files /dev/null and b/win/win32/vs2017/Images/StoreLogo.scale-200.png differ diff --git a/win/win32/vs2017/Images/StoreLogo.scale-400.png b/win/win32/vs2017/Images/StoreLogo.scale-400.png new file mode 100644 index 000000000..9d4176160 Binary files /dev/null and b/win/win32/vs2017/Images/StoreLogo.scale-400.png differ diff --git a/win/win32/vs2017/Images/Wide310x150Logo.scale-100.png b/win/win32/vs2017/Images/Wide310x150Logo.scale-100.png new file mode 100644 index 000000000..3a29f0911 Binary files /dev/null and b/win/win32/vs2017/Images/Wide310x150Logo.scale-100.png differ diff --git a/win/win32/vs2017/Images/Wide310x150Logo.scale-125.png b/win/win32/vs2017/Images/Wide310x150Logo.scale-125.png new file mode 100644 index 000000000..5bde11842 Binary files /dev/null and b/win/win32/vs2017/Images/Wide310x150Logo.scale-125.png differ diff --git a/win/win32/vs2017/Images/Wide310x150Logo.scale-150.png b/win/win32/vs2017/Images/Wide310x150Logo.scale-150.png new file mode 100644 index 000000000..8f35b96b8 Binary files /dev/null and b/win/win32/vs2017/Images/Wide310x150Logo.scale-150.png differ diff --git a/win/win32/vs2017/Images/Wide310x150Logo.scale-200.png b/win/win32/vs2017/Images/Wide310x150Logo.scale-200.png new file mode 100644 index 000000000..a0be94e1a Binary files /dev/null and b/win/win32/vs2017/Images/Wide310x150Logo.scale-200.png differ diff --git a/win/win32/vs2017/Images/Wide310x150Logo.scale-400.png b/win/win32/vs2017/Images/Wide310x150Logo.scale-400.png new file mode 100644 index 000000000..cbffd4a6a Binary files /dev/null and b/win/win32/vs2017/Images/Wide310x150Logo.scale-400.png differ diff --git a/win/win32/vs2017/NetHack.sln b/win/win32/vs2017/NetHack.sln index 172bb7293..0d5df6b89 100644 --- a/win/win32/vs2017/NetHack.sln +++ b/win/win32/vs2017/NetHack.sln @@ -10,7 +10,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetHackW", "NetHackW.vcxpro {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} = {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} {BA3DD34C-04B7-40D0-B373-9329AA9E8945} = {BA3DD34C-04B7-40D0-B373-9329AA9E8945} {642BC75D-ABAF-403E-8224-7C725FD4CB42} = {642BC75D-ABAF-403E-8224-7C725FD4CB42} - {6813477F-64B6-4B97-B230-438D0D233385} = {6813477F-64B6-4B97-B230-438D0D233385} {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC} = {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC} {8A3F81C7-2968-49A8-86BF-2669412AD7DE} = {8A3F81C7-2968-49A8-86BF-2669412AD7DE} EndProjectSection @@ -85,6 +84,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution NetHackProperties.props = NetHackProperties.props EndProjectSection EndProject +Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "NetHackPackage", "NetHackPackage.wapproj", "{6838EC9D-F25D-4779-9CD7-2EDB61E49429}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -205,6 +206,18 @@ Global {BAA70D0F-3EC7-4D10-91F0-974F1F49308B}.Release|Win32.Build.0 = Release|Win32 {BAA70D0F-3EC7-4D10-91F0-974F1F49308B}.Release|x64.ActiveCfg = Release|x64 {BAA70D0F-3EC7-4D10-91F0-974F1F49308B}.Release|x64.Build.0 = Release|x64 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Debug|Win32.ActiveCfg = Debug|Win32 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Debug|Win32.Build.0 = Debug|Win32 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Debug|Win32.Deploy.0 = Debug|Win32 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Debug|x64.ActiveCfg = Debug|x64 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Debug|x64.Build.0 = Debug|x64 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Debug|x64.Deploy.0 = Debug|x64 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Release|Win32.ActiveCfg = Release|Win32 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Release|Win32.Build.0 = Release|Win32 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Release|Win32.Deploy.0 = Release|Win32 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Release|x64.ActiveCfg = Release|x64 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Release|x64.Build.0 = Release|x64 + {6838EC9D-F25D-4779-9CD7-2EDB61E49429}.Release|x64.Deploy.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/win/win32/vs2017/NetHackPackage.appxmanifest b/win/win32/vs2017/NetHackPackage.appxmanifest new file mode 100644 index 000000000..da4928ca9 --- /dev/null +++ b/win/win32/vs2017/NetHackPackage.appxmanifest @@ -0,0 +1,29 @@ + + + + + NetHack 3.6 + NetHack DevTeam + Images\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/win/win32/vs2017/NetHackPackage.wapproj b/win/win32/vs2017/NetHackPackage.wapproj new file mode 100644 index 000000000..daf3091c8 --- /dev/null +++ b/win/win32/vs2017/NetHackPackage.wapproj @@ -0,0 +1,145 @@ + + + + 15.0 + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + $(MSBuildExtensionsPath)\Microsoft\DesktopBridge\ + + + + + + $(BinDir) + + + 6838ec9d-f25d-4779-9cd7-2edb61e49429 + 10.0.17763.0 + 10.0.15063.0 + en-US + NetHackPackage_StoreKey.pfx + NetHackW.vcxproj + 19591BE8832D6EFED75019EACE7C4CA42ABC90D4 + False + True + x86 + 1 + OnApplicationRun + + + Always + + + Always + + + Always + + + Always + + + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NetHackW\defaults.nh + + + NetHackW\Guidebook.txt + + + NetHackW\license + + + NetHackW\nhdat$(VERSION_MAJOR)$(VERSION_MINOR)$(PATCHLEVEL) + + + NetHackW\opthelp + + + NetHackW\symbols + + + NetHackW\sysconf + + + + + + + + + + \ No newline at end of file diff --git a/win/win32/vs2017/Package.StoreAssociation.xml b/win/win32/vs2017/Package.StoreAssociation.xml new file mode 100644 index 000000000..1200895f3 --- /dev/null +++ b/win/win32/vs2017/Package.StoreAssociation.xml @@ -0,0 +1,373 @@ + + + CN=8BDC628A-FAAA-4EBA-8B5B-EB61BA93BA1F + NetHack DevTeam + AAD + http://www.w3.org/2001/04/xmlenc#sha256 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 30485NetHackDevTeam.NetHack3.6 + + NetHack 3.6 + + + + 30485NetHackDevTeam.NetHackBeta + + + \ No newline at end of file diff --git a/win/win32/vs2017/ScreenShot.PNG b/win/win32/vs2017/ScreenShot.PNG new file mode 100644 index 000000000..36d9f9876 Binary files /dev/null and b/win/win32/vs2017/ScreenShot.PNG differ