Hi!
The coding is over and you want to publish with Ver 7.73.3 Pro
This is the 5 parts methode that I use to bind all my files in a resource file
.wrs and
create a
.exe for sharing.
The size of all the combined files dropped from 300 megs or so to 83 megs.
Part I : Cleaning 1) Open your main file (main.c)
Look at your code to remove things like :
Shorcuts....on_s do.....
#include <default.c>
Save your main.c
2) Remove old .cd folder
Part II : Publishing ...first timeIn WED (or SED) use File...>Publish...> exe
The purpose of this publish is two fold :
a) This will put all the files for your game in a main.cd folder.
This way, they are grouped and the junk (other files) will not be in the way for the next steps.
b) Test your game using the
.exe (main.exe) to see if everything works.
If there are any problems, they will pop up and you will have to resolve the issues.
Part III : Creating a .wdl file1) Using Window options ...Explorer....the right side of the mouse...find out
how many files are in the
.cd folder
2) Open SED and start a new file
bind_file.wdl.
In this new file place all the names of the files (by hand or by script)
that are present in the main.cd folder from Part II.
effects, levels, menu, models, music, sounds, syntax, terrain, textures, wads Place in the format :
BIND "name.mdl"; ...see the manual
NOTE : I have a small .c script that uses txt_for_dir
This instruction can be used to scan a folder and pick up all the files.3) At the top of this file, insert in C-Script format,
the paths that have to be followed in order to find all the files.
////////////////////////////////////////////////////////////////////////////
// The PATH keyword gives directories where files can be found.
PATH "..\\dr_pcx";
PATH "..\\dr_tga";
PATH "..\\Models";
PATH "..\\Wave_sounds";
/////////////////////////////////////////////////////////////////
// warlock distributable Resource
BIND "warlock.mdl";
BIND "staff.mdl";
Save the file as a
WDL file ex:
bind_file.wdl Part IV : Creating the resourceOpen WED and follow the instructions from the manual :
RESOURCE "resourcename".
WDL files only. Done in Part III
Here's a the quote from the manual ...one instruction per line.
For creating a resource,
1- open a new project in WED,
2- save it under an arbitrary name, ---> game02_date
3- assign a WDL script that contains the BIND statements in Map Properties ex: bind_file.wdl
4- and perform : File ...> Publish....> Resource
The .wrs file is created in a bind_file.cd subdirectory.
a) The publish / resource function takes time.
if errors pop up go back to the
bind_file.wdl and make corrections.
b) Move the file to your work directory :
bind_file.wrsPart V : Adding resource to your publish of the game
In SED create a new file under the name main.wdl (same name as your main.c file)
RESOURCE "bind_file.wrs"; // <------The bind file
PATH "..\\des_pcx";
PATH "..\\des_bmp";
PATH "..\\des_tga";
PATH "..\\Models";
PATH "..\\son_wav";
WINDOW WINSTART
{
MODE STANDARD; // always required
COMMAND "-nwnd"; // no start window
}
Save file as
main.wdlPart V : Publishing ...last action.In WED open your world....the main.c file is attached to this title.
Use : File....>Publish....> Check the following boxes :
Starter and Exe.
Publish this game. You will find the result in main.cd
1)
Open the
main.cd folder
and remove all the unwanted files...
those that you know are in your BIND file.(move them to a temporary folder...just in case you need them) 2)
Check your
.exe file file again.
You might have to add some files to this folder ...ex:
d3dx9_30.dll .
When you can play your game without any error messages you are on your way.
Ottawa