Skip to content

Commit

Permalink
ps3netsrv 20240707
Browse files Browse the repository at this point in the history
- Now makeiso can build multiple ISOs by drag & drop multiple folders
- Included nssm.exe to install ps3netsrv as Windows service
  • Loading branch information
aldostools committed Jul 7, 2024
1 parent 6b6c923 commit 1d8c0c9
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 5 deletions.
2 changes: 1 addition & 1 deletion _Projects_/ps3netsrv/bins/Linux/Readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# ps3netsrv for Linux

Here is a RELEASE build of the latest ps3netsrv source code (build 20240210a) for ubuntu 22.04.3 LTS:
Here is a RELEASE build of the latest ps3netsrv source code (build 20240707). Built on Ubuntu 22.04 LTS.
Binary file modified _Projects_/ps3netsrv/bins/Linux/makeiso
Binary file not shown.
Binary file modified _Projects_/ps3netsrv/bins/Linux/ps3netsrv_linuxX86_64
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nssm install ps3netsrv
Binary file modified _Projects_/ps3netsrv/bins/Windows/makeiso.exe
Binary file not shown.
Binary file added _Projects_/ps3netsrv/bins/Windows/nssm.exe
Binary file not shown.
Binary file modified _Projects_/ps3netsrv/bins/Windows/ps3netsrv.exe
Binary file not shown.
58 changes: 54 additions & 4 deletions _Projects_/ps3netsrv/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1794,9 +1794,9 @@ int main(int argc, char *argv[])
// Show build number
set_white_text();
#ifndef MAKEISO
printf("ps3netsrv build 20240210a");
printf("ps3netsrv build 20240707");
#else
printf("makeiso build 20240210a");
printf("makeiso build 20240707");
#endif

set_red_text();
Expand Down Expand Up @@ -1903,6 +1903,10 @@ int main(int argc, char *argv[])
make_iso = VISO_ISO;
#endif
}
#ifdef MAKEISO
else if(argc >= 3)
make_iso = VISO_ISO;
#endif

#ifndef MAKEISO
// Use current path as default
Expand Down Expand Up @@ -2086,11 +2090,15 @@ int main(int argc, char *argv[])
freeifaddrs(addrs);
}
#endif

#endif // #ifndef MAKEISO

if(make_iso)
{
if(strlen(root_directory) >= MAX_PATH_LEN - 10)
{
printf("Path too long: %s\n", root_directory);
goto exit_error;
}

char outfile[MAX_PATH_LEN];
sprintf(outfile, "%s.iso", strrchr(root_directory, '/') + 1);

Expand All @@ -2101,6 +2109,48 @@ int main(int argc, char *argv[])
goto exit_error;
}

#else // if defined(MAKEISO)

if(make_iso)
{
for(int i = 1; i < argc; i++)
{
file_stat_t st;
if(stat_file(argv[i], &st) < 0 || st.mode & S_IFDIR != S_IFDIR)
{
printf("Invalid path: %s\n", argv[i]);
continue;
}

if(strlen(argv[i]) >= MAX_PATH_LEN - 10)
{
printf("Path too long: %s\n", argv[i]);
goto exit_error;
}

strcpy(root_directory, argv[i]);
normalize_path(root_directory, true);

char outfile[MAX_PATH_LEN];
sprintf(outfile, "%s.iso", strrchr(root_directory, '/') + 1);

char *pos1 = strstr(outfile, ".iso."); if(pos1) sprintf(pos1, ".new.iso");
char *pos2 = strstr(outfile, ".ISO."); if(pos2) sprintf(pos2, ".new.iso");

char sfo_path[sizeof(root_directory) + 20];
snprintf(sfo_path, sizeof(sfo_path) - 1, "%s/PS3_GAME/PARAM.SFO", root_directory);

if(stat_file(sfo_path, &st) >= 0)
make_iso = VISO_PS3;
else
make_iso = VISO_ISO;

create_iso(root_directory, outfile, make_iso);
}
goto exit_error;
}
#endif // #ifndef MAKEISO

#ifndef MAKEISO
//////////////
// main loop
Expand Down

0 comments on commit 1d8c0c9

Please sign in to comment.