added launcher, still need custom launcher to work.

oh and changed the buildnum to something better
This commit is contained in:
EnderZip
2021-09-19 09:35:10 +07:00
parent d7a981392e
commit 0f2710630c
23 changed files with 2500 additions and 187 deletions

View File

@@ -1,186 +1,191 @@
//-----------------------------------------------------------------------------
// PROJECTS.VGC
//
// Project Configurations for all Source(TM) Projects
//-----------------------------------------------------------------------------
/////////////////////////
// Project definitions //
/////////////////////////
$Project "captioncompiler"
{
"utils\captioncompiler\captioncompiler.vpc" [$WIN32]
}
$Project "client"
{
"game\client\client_hl2mp.vpc" [($WIN32||$POSIX) && $HL2MP]
"game\client\client_episodic.vpc" [($WIN32||$POSIX) && $EPISODIC]
"game\client\client_hl2.vpc" [($WIN32||$POSIX) && $HL2]
"game\client\client_sdk.vpc" [($WIN32||$POSIX) && $SDK]
}
$Project "fgdlib"
{
"fgdlib\fgdlib.vpc" [$WIN32]
}
$Project "game_shader_dx9"
{
"materialsystem\stdshaders\game_shader_dx9_hl2mp.vpc" [$HL2MP]
}
$Project "glview"
{
"utils\glview\glview.vpc" [$WIN32]
}
$Project "height2normal"
{
"utils\height2normal\height2normal.vpc" [$WIN32]
}
$Project "server"
{
"game\server\server_hl2mp.vpc" [($WIN32||$POSIX) && $HL2MP]
"game\server\server_episodic.vpc" [($WIN32||$POSIX) && $EPISODIC]
"game\server\server_hl2.vpc" [($WIN32||$POSIX) && $HL2]
"game\server\server_sdk.vpc" [($WIN32||$POSIX) && $SDK]
}
$Project "mathlib"
{
"mathlib\mathlib.vpc" [$WINDOWS||$X360||$POSIX]
}
$Project "motionmapper"
{
"utils\motionmapper\motionmapper.vpc" [$WIN32]
}
$Project "phonemeextractor"
{
"utils\phonemeextractor\phonemeextractor.vpc" [$WIN32]
}
$Project "raytrace"
{
"raytrace\raytrace.vpc" [$WIN32||$X360||$POSIX]
}
$Project "qc_eyes"
{
"utils\qc_eyes\qc_eyes.vpc" [$WIN32]
}
$Project "serverplugin_empty"
{
"utils\serverplugin_sample\serverplugin_empty.vpc" [$WIN32||$POSIX]
}
$Project "shaderapidx9"
{
"materialsystem\shaderapidx9\shaderapidx9.vpc"
}
$Project "tgadiff"
{
"utils\tgadiff\tgadiff.vpc" [$WIN32]
}
$Project "tier1"
{
"tier1\tier1.vpc" [$WINDOWS || $X360||$POSIX]
}
$Project "vbsp"
{
"utils\vbsp\vbsp.vpc" [$WIN32]
}
$Project "vgui_controls"
{
"vgui2\vgui_controls\vgui_controls.vpc" [$WIN32||$X360||$POSIX]
}
$Project "vice"
{
"utils\vice\vice.vpc" [$WIN32]
}
$Project "vrad_dll"
{
"utils\vrad\vrad_dll.vpc" [$WIN32]
}
$Project "vrad_launcher"
{
"utils\vrad_launcher\vrad_launcher.vpc" [$WIN32]
}
$Project "vtf2tga"
{
"utils\vtf2tga\vtf2tga.vpc" [$WIN32]
}
$Project "vtfdiff"
{
"utils\vtfdiff\vtfdiff.vpc" [$WIN32]
}
$Project "vvis_dll"
{
"utils\vvis\vvis_dll.vpc" [$WIN32]
}
$Project "vvis_launcher"
{
"utils\vvis_launcher\vvis_launcher.vpc" [$WIN32]
}
$Project "vpklib"
{
"vpklib/vpklib.vpc" [$WIN32]
}
$Project "vtf"
{
"vtf/vtf.vpc" [$WIN32]
}
$Project "engine"
{
"engine/engine.vpc" [$WIN32]
}
$Project "materialsystem"
{
"materialsystem/materialsystem.vpc" [$WIN32]
}
$Project "studiorender"
{
"studiorender\studiorender.vpc" [$WIN32]
}
$Project "filesystem_stdio"
{
"filesystem/filesystem_stdio.vpc" [$WIN32]
}
$Project "filesystem_steam"
{
"filesystem/filesystem_steam.vpc" [$WIN32]
}
$Project "bsppack"
{
"utils\bsppack\bsppack.vpc" [$WIN32]
}
$Project "bspzip"
{
"utils\bspzip\bspzip.vpc" [$WIN32]
//-----------------------------------------------------------------------------
// PROJECTS.VGC
//
// Project Configurations for all Source(TM) Projects
//-----------------------------------------------------------------------------
/////////////////////////
// Project definitions //
/////////////////////////
$Project "captioncompiler"
{
"utils\captioncompiler\captioncompiler.vpc" [$WIN32]
}
$Project "client"
{
"game\client\client_hl2mp.vpc" [($WIN32||$POSIX) && $HL2MP]
"game\client\client_episodic.vpc" [($WIN32||$POSIX) && $EPISODIC]
"game\client\client_hl2.vpc" [($WIN32||$POSIX) && $HL2]
"game\client\client_sdk.vpc" [($WIN32||$POSIX) && $SDK]
}
$Project "fgdlib"
{
"fgdlib\fgdlib.vpc" [$WIN32]
}
$Project "game_shader_dx9"
{
"materialsystem\stdshaders\game_shader_dx9_hl2mp.vpc" [$HL2MP]
}
$Project "glview"
{
"utils\glview\glview.vpc" [$WIN32]
}
$Project "coolsource" //this is the launcher
{
"launcher\launcher.vpc"
}
$Project "height2normal"
{
"utils\height2normal\height2normal.vpc" [$WIN32]
}
$Project "server"
{
"game\server\server_hl2mp.vpc" [($WIN32||$POSIX) && $HL2MP]
"game\server\server_episodic.vpc" [($WIN32||$POSIX) && $EPISODIC]
"game\server\server_hl2.vpc" [($WIN32||$POSIX) && $HL2]
"game\server\server_sdk.vpc" [($WIN32||$POSIX) && $SDK]
}
$Project "mathlib"
{
"mathlib\mathlib.vpc" [$WINDOWS||$X360||$POSIX]
}
$Project "motionmapper"
{
"utils\motionmapper\motionmapper.vpc" [$WIN32]
}
$Project "phonemeextractor"
{
"utils\phonemeextractor\phonemeextractor.vpc" [$WIN32]
}
$Project "raytrace"
{
"raytrace\raytrace.vpc" [$WIN32||$X360||$POSIX]
}
$Project "qc_eyes"
{
"utils\qc_eyes\qc_eyes.vpc" [$WIN32]
}
$Project "serverplugin_empty"
{
"utils\serverplugin_sample\serverplugin_empty.vpc" [$WIN32||$POSIX]
}
$Project "shaderapidx9"
{
"materialsystem\shaderapidx9\shaderapidx9.vpc"
}
$Project "tgadiff"
{
"utils\tgadiff\tgadiff.vpc" [$WIN32]
}
$Project "tier1"
{
"tier1\tier1.vpc" [$WINDOWS || $X360||$POSIX]
}
$Project "vbsp"
{
"utils\vbsp\vbsp.vpc" [$WIN32]
}
$Project "vgui_controls"
{
"vgui2\vgui_controls\vgui_controls.vpc" [$WIN32||$X360||$POSIX]
}
$Project "vice"
{
"utils\vice\vice.vpc" [$WIN32]
}
$Project "vrad_dll"
{
"utils\vrad\vrad_dll.vpc" [$WIN32]
}
$Project "vrad_launcher"
{
"utils\vrad_launcher\vrad_launcher.vpc" [$WIN32]
}
$Project "vtf2tga"
{
"utils\vtf2tga\vtf2tga.vpc" [$WIN32]
}
$Project "vtfdiff"
{
"utils\vtfdiff\vtfdiff.vpc" [$WIN32]
}
$Project "vvis_dll"
{
"utils\vvis\vvis_dll.vpc" [$WIN32]
}
$Project "vvis_launcher"
{
"utils\vvis_launcher\vvis_launcher.vpc" [$WIN32]
}
$Project "vpklib"
{
"vpklib/vpklib.vpc" [$WIN32]
}
$Project "vtf"
{
"vtf/vtf.vpc" [$WIN32]
}
$Project "engine"
{
"engine/engine.vpc" [$WIN32]
}
$Project "materialsystem"
{
"materialsystem/materialsystem.vpc" [$WIN32]
}
$Project "studiorender"
{
"studiorender\studiorender.vpc" [$WIN32]
}
$Project "filesystem_stdio"
{
"filesystem/filesystem_stdio.vpc" [$WIN32]
}
$Project "filesystem_steam"
{
"filesystem/filesystem_steam.vpc" [$WIN32]
}
$Project "bsppack"
{
"utils\bsppack\bsppack.vpc" [$WIN32]
}
$Project "bspzip"
{
"utils\bspzip\bspzip.vpc" [$WIN32]
}

View File

@@ -0,0 +1,84 @@
@echo off
setlocal
set valveTmpFileFromVS2005=%1%
set valveTmpFileFromVS2005=%valveTmpFileFromVS2005:\\=\%
set valveChangelistName="Visual Studio Auto Checkout"
:: // Make sure we have 2 args
if .%2.==.. (
echo *** [valve_p4_edit] Error calling command! No file specified for checkout!
echo *** Usage: valve_p4_edit.cmd file srcdir ["changelist name"]
echo *** The changelist name is optional. If present, must be quoted. By default it's %valveChangelistName%.
endlocal
exit /b 1
)
if [%3] NEQ [] (
set valveChangelistName=%3
)
:: // Fallback to old functionality and just change file attribs
if NOT "%VALVE_NO_AUTO_P4%"=="" (
echo [valve_p4_edit] VALVE_NO_AUTO_P4 defined. Changing file attribs only!
if EXIST %valveTmpFileFromVS2005% (
attrib -r %valveTmpFileFromVS2005%
)
endlocal
exit /b 0
)
rem // :: // First check if file exists
rem // if NOT EXIST %valveTmpFileFromVS2005% (
rem // :: // File does not exist
rem // rem // echo [valve_p4_edit] %valveTmpFileFromVS2005% does not exist! Skipping p4 edit command.
rem // endlocal
rem // exit /b 0
rem // )
rem //
rem // :: // Check if file is read-only (NOTE: If the file is writable, we don't call p4!)
rem // dir /b /ar %valveTmpFileFromVS2005% >nul 2>&1
rem // if NOT %ERRORLEVEL%==0 (
rem // rem // echo [valve_p4_edit] %valveTmpFileFromVS2005% is already writable. Not calling p4 edit.
rem // endlocal
rem // exit /b 0
rem // )
:: // Put 360 bins into their own changelist
for /f %%A in ('echo %valveTmpFileFromVS2005% ^| find /i "360"') do set valveTmpIs360=%%A
if NOT "%valveTmpIs360%"=="" (
set valveChangelistName="360 Visual Studio Auto Checkout"
)
for /f %%A in ('echo %valveTmpFileFromVS2005% ^| find /i "launcher_main"') do set valveTmpIs360=%%A
if NOT "%valveTmpIs360%"=="" (
set valveChangelistName="360 Visual Studio Auto Checkout"
)
set valveP4EditCall=%2\devtools\bin\valve_p4_edit_to_changelist.cmd %valveTmpFileFromVS2005% %valveChangelistName%
if "%VALVE_WAIT_ON_P4%"=="" (
:: // The file exists and is read-only, so change the file attrib and spawn the Perforce checkout asynchronously
if EXIST %valveTmpFileFromVS2005% attrib -r %valveTmpFileFromVS2005%
start /b cmd /c %valveP4EditCall% EXIT
rem // (NOTE: The EXIT arg is needed because we're using the start command to launch the cmd!)
) ELSE (
:: // Do not use attrib -r if we're doing synchronous p4 edit. If this fails, we want to throw an error below
call %valveP4EditCall%
)
:: // Make sure file is writable if it exists
if NOT EXIST %valveTmpFileFromVS2005% goto End
dir /b /a-r %valveTmpFileFromVS2005% >nul 2>&1
if NOT %ERRORLEVEL%==0 (
:: // Return with an error to stop the build!
echo *** [valve_p4_edit] Error! %valveTmpFileFromVS2005% is not writable!
endlocal
exit /b 1
)
:End
endlocal
exit /b 0

View File

@@ -0,0 +1,52 @@
#!/usr/bin/perl -w
use Data::Dumper;
use FindBin;
use Cwd qw(getcwd abs_path);
use File::Basename;
use lib "$FindBin::Bin/../devtools/lib";
use P4Run;
use strict;
die "Usage: $0 <file>\n" unless @ARGV;
my $path = shift @ARGV;
my $dir = abs_path(dirname($path));
my $file = "$dir/".basename($path);
if ($ENV{VALVE_NO_AUTO_P4})
{
print "VALVE_NO_AUTO_P4 Set. Making $file writable\n";
if ($^O eq 'MSWin32')
{
system('attrib', '-r', $file);
}
else
{
open(my $fh, "<", $file);
my $perm = (stat($fh))[2] | 0220;
chmod $perm, $fh;
}
}
else
{
my $desc = $^O eq 'MSWin32' ? 'Visual Studio Auto Checkout' : 'GCC Auto Checkout';
$desc = '360 Visual Studio Auto Checkout' if $file =~ /_360|launcher_main|default.xex/;
my $change = P4Run::FindChange($desc) || P4Run::NewChange($desc);
die "Failed to create Change List: $desc\n" unless $change;
my ($stat) = P4Run('fstat', $file);
if ($stat)
{
print "Opening $file for edit in CL#$change ($desc)\n";
P4Run('edit', '-c', $change, $file);
}
else
{
print "Adding new file $file to CL#$change ($desc)\n";
open(my $fh, ">", $file); close($fh);
P4Run('add', '-c', $change, '-t', 'xbinary', $file);
unlink($file);
}
}
warn "$file is not writable\n" if (-e $file && ! -w $file);
exit 0;

View File

@@ -0,0 +1,28 @@
@echo off
setlocal
:: // If they've disabled xbcp, then don't use it.
if NOT "%VALVE_NO_XBCP%"=="" (
echo [valve_xbcp_wrapper] VALVE_NO_XBCP defined. Avoiding the copy.
endlocal
exit /b 0
)
set localFilename=%1
set remoteFilename=%2
"%XEDK%\bin\win32\xbcp" /y /t "%localFilename%" "%remoteFilename%"
if %ERRORLEVEL%==1 (
echo XBCP failed. If you don't have an X360 but want to compile its sources, define VALVE_NO_XBCP.
del /q %1%
exit 1
)
:End
endlocal
exit /b 0