First post, by moog
- Rank
- Member
Hello,
I'm writing an ebuild for Counter-Strike 1.5 for Gentoo Linux. Turns out, I can accomplish this right now, but I'd like to make the user aware of what's happening. Here's the workflow of how the ebuild works, and what parts I want to improve before publishing it.
1. src_fetch retrieves Counter-Strike 1.5 full installer from a mirror.
2. Because csv15full.exe is a WISE installer file, we need to use an eclass I'm writing that supports unpacking WISE installers' data.
3. src_unpack calls the main function of the eclass to go through all specified WISE installer files.
4. Done.
The eclass' main function itself breaks down into more steps:
-1. Actually, we interject src_fetch from the caller to also download e_wise, a Pascal program for DOS, Windows and OS/2 that does the job just fine... kinda. It gets the correct results, with a DOS executable it isn't really a vendor lock-in for x86, but it's not as nice as let's say 7z or unrar if they could do it.
1. We extract e_wise to ewise directory so we can use it.
2. Create wise_output directory.
3. Declare a counter and initialize at 0.
4. For each WISE installer file:
4.1. Create a symlink to the WISE installer file and call it ${counter}.exe. DOSifying the long names of these installers isn't something I want to do or feel comfortable doing.
4.2. Create the directory called after the WISE installer file, sans the dot exe.
4.3. `push` this directory into the directory stack
4.4. Create a DOSBox config with an autoexec section that basically makes an instance of DOSBox extract ${counter}.exe into ${WISE_installer_dir}
4.5. Run DOSBox with said config. This will take some time, but out WISE installer will eventually be extracted.
4.6. Do some Bash-fu to clean up the mess - re-create directory structures and rename all the files and put them in correct places. e_wise is kind enough to leave this info in 00000000.BAT file.
4.7. Remove "homeless" and useless files, such as 00000000.BAT, 00000000.TXT and .EWI files (e_wise's way of naming dumped files) that do not belong into any directory structure.
4.8. Move the resulting clean output into wise_output directory.
4.9. Increment ${counter}.
5. Report success.
During wise eclass step 4.5, I would like to redirect the standard output and error of e_wise into the standard output and error of the ebuild process that's calling DOSBox. I'm already running it headless with SDL_VIDEODRIVER=dummy, but how can I go the extra mile to make sure users know what is currently happening in the DOSBox process? I'm unfortunately not very good with Pascal, I don't know what version of Pascal is required to build e_wise, so fixing or even adapting it to my use case is really harder than using it as-is.
edit: No, I can't re-upload the decompressed WISE installer. That's illegal. I can only work with what the Counter-Strike team has released in pre-Steam times in the form they have disseminated.
Audigy 2 ZS in FreeDOS
LinLin adapter documentation
+ various capacitor list threads