Showing posts with label wine. Show all posts
Showing posts with label wine. Show all posts

Saturday, May 2, 2020

non-standard application managers -- wine, python, git, latex (pacman conflicts)

In most Linux distributions, there's a package manager ("PM") application we use to update our OS and any installed applications. The Arch PM is pacman, and full updates require an internet connection for its use. It's a relatively simple process:

# pacman -Syu

The problems begin with applications that have built-in package managers specific to that application. There's only a few, but they are often called upon and u. For example:

  1. LaTeX package manager =tlmgr (TeXLive)
  2. Git package manager = complicated unless at user level. If at user level, install git with pacman and run it as a user, it will just make a directory of source. Otherwise, git apparently downloads "clones" (versions) into /opt, but then generally you want to chmod the clone to foo:foo and move it to a ~/ directory for building, then pacman to install it.
  3. Python package manager = pip
  4. Wine package manager = complicated. Each dll installing in Wine attempts to update itself and will prompt for it. None should be authorized. Also, building a version of Wine that is custom configured for the MSoft app is critical, but the underlying Arch version of wine tends to wipe them out any time it is called.

Using any of these application-specific updaters within Arch leads to failures during the next "pacman". Don't use them at all except when knowing the workarounds (see below). Essentially, there are zero problems for users who install and update the Arch Linux OS and applications using only pacman. Again, the most reliable complete update command:

# pacman -Syu

...or for application removal...

# pacman -Rs

There's also one workaround in Arch that doesn't f*ck up the index: if I download source into some directory and run...

$ makepkg -si [somepkg]

... it will make the package, and then prompt me for the password for install ("-i" flag) at the end and perform a pacman -U [package] at the end of the make. This # pacman -U properly updates the pacman index. As far as I know, # pacman -U is the only way to install outside packages without farking an install. This also means we can reliably use # pacman -Rs to uninstall packages put in through this method.

1. LaTeX - tlmgr 5Gb

2022 edit: I now use pacman, until work on thesis or something, then can do a -Rsn uninstall and do it here.

Don't install any version of LaTex with pacman. It doesn't have enough templates.

Install Tex-Live (LaTeX) directly into a user subdirectory (eg. "/home/foo/latex") and update it through the TexLive PM (tlmgr), but only at the user level, so that no admin level changes, or files used by pacman are affected.

$ cd /home/foo/latex/bin/x86_64-linux
$ tlmgr update --self
$ tlmgr update --all

UNLESS, it's the next year and haven't updated. This is called a "cross-release" update. I had to download that year's update-tlmgr.sh and run it. Described further down in post and here.

2. Git - pacman + manually configure

This took me the longest to learn, as this site agrees. Configuring for upstreaming -- if using as VCS -- is time consuming, but it's different if downloading some source. Update the git app with pacman, update the sources using git commands. Here's the Arch page.

  1. install the foundational Git application using # pacman -S git.

3.Python - pip 2Gb

Nearly every program uses Python, so we want to be sure not to break our Python installation.

The solution required three independent solutions, all three of which I install. I select one of the solutions depending on what the application requires/expects.This solution takes up several gigabytes.

  • initialize a Colab account in Google. See my post here, because there's a few steps to it. Colab handles Jupyter-type operations online. I do this development online (and save files .PY to Drive). I used to do Jupyter environment on the desktop, and this was the heaviest pip user, disrupting pacman almost entirely. IMO, Colab is practically a godsend from Google.
  • when an application requires it, a pacman install of Python. Other applications installed using pacman, may also call for additional Python modules which they add to the basic Python, and/or they may also require an older version of Python to be installed.
  • using pacman install a virtual environment for the
For Python, we can use pip, and for LaTex we can use tlmgr, to upgrade or add features to each app. The overall OS also has a package manager. For Arch, this is pacman. We can use pacman to upgrade or add packages to the Arch OS, including adding Arch versions of Python and LaTeX. The problem is, any actions accomplished with pip or tlmgr are not recorded in the pacman application index. Discrepancies between pacman's index and pip and tlmgr operations lead to significant application and OS problems. Prevention requires decisions during installation.
Contents

problems

The Python case is more complicated to *solve* than the LaTeX situation, because a variety of applications depend on Python, unlike LaTeX. However, both situations equally *cause* pacman update fails for the same, indexing, reason, so that both the Python and the LaTeX cases must be solved.

Python

Many applications rely upon Python. More technically, Python is a dependency for for many applications.

Imagine some application with a Python dependency, say youtube-dl. Imagine that both Python and youtube-dl were installed by pacman. They both work fine. Now suppose the user decides to add a Python module using pip instead of pacman. Everything might be fine with some applications that depend on Python, but youtube-dl is an example of an application sensitive to Python changes. The youtube-dl app looks for versions of Python installed by Arch, but will instead detect versions updated by pip. This discrepancy in turn leads youtube-dl to spawn errors, and errors in turn lead to the application exiting. How can this be solved?

$ youtube-dl https://www.youtube.com/watch?v=QLpz7PtiP2k
Traceback (most recent call last):
File "/usr/bin/youtube-dl", line 6, in
from pkg_resources import load_entry_point
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3259, in
def _initialize_master_working_set():
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3242, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3271, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 584, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 901, in require
needed = self.resolve(parse_requirements(requirements))

More drastically, this can happen with an entire OS. Say the user keeps his OS up to date with pacman, and decides to install Python using pacman. Later, he upgrades Python using Python's pip manager. Still later, the user attempts to update the entire OS, which is a pacman action. As part of its upgrade procedure, pacman verifies the integrity of all installed applications against its index. Since the changes made to Python via pip were not registered into pacman's version index, pacman cannot resolve the pip installed modules against the pacman index. These discrepancies cause the pacman update to exit with errors. No update will be accomplished. How can this be solved?

LaTeX

If having any problems with LaTeX updates, even the tug.org website recommends just replacing with latest edition. However, there is one workaround if things aren't more than a year or two old.

$ tlmgr update --self
tlmgr: Local TeX Live (2020) is older than remote repository (2021).
Cross release updates are only supported with
update-tlmgr-latest(.sh/.exe) -- --upgrade
See https://tug.org/texlive/upgrade.html for details.

For the problem above, download update-tlmgr-latest.sh, make it executable (chmod +x or file manager), and put it in /home/foo/latex or wherever your latex user-level top directory is at. Go into that directory and:

$ sh update-tlmgr-latest.sh -- --upgrade
$ tlmgr update --self
$ tlmgr update --all
.

Wine

Wine also can pull-in specific packages, when we try to make wine bottles. However, any time there's an OS update, pacman will write a new wine directory in ~/.wine. After it's overwritten, it will use that vanilla version instead of the wine bottle we built for the app. How can this be solved?

solutions

In the case of an app like youtube-dl, it's easy to uninstall the entire app (# pacman -Rns) and reinstall. Or to play with uninstalling its pieces until one has a hit

The levels of involvement vary, but the strategy is the same for both Python and for LaTeX: install these independently of Arch from the start, in /home/user directory, and then update any path statements necessary for the Arch installed apps to find the program. Once these are in at the user level, there's no problem updating them with pip and tlmgr, because the updates are strictly within one's home directory, not the larger Arch installation. Accordingly, one can add features at will, which is often desirable when running the latest Spyder or what have you. For LaTeX, it's even less of a hassle, because there are no dependencies: one just needs to update $PATH statements following install. One can create an install in either case using, eg. $ mkdir /home/foo/latex and similarly with Python, though perhaps using a new folder for any version changes.


In the case of the OS update failure, one has no pleasant choices :uninstall then reinstall all of Python (immense time drain), or update the OS using an override (# pacman -SyuI), which then leaves a potentially unstable Python install for its dependencies. This is true with LaTeX also, but nearly zero apps depend on LaTeX.

install notes

I've decided to use the 3rd party updaters to both install (Python - pip, LaTeX - tlmgr for TexLive), There are a couple of considerations.
  • Install in user-level directory
  • update path statements afterward, so the installation can find them. Path statements can be complex, because there are various Path statements to consider.

prevention

Sometimes one doesn't have a choice but to install packages via pip, but then what happens downstream with a pacman upgrade is ugly. It will look like this, and there's a couple of workarounds.
  • uninstall the pip upgrades, upgrade the system via pacman, then go back to pip and install whatever necessary pip packages.
  • add the --overwrite=* flag to the standard "Syu". This causes pacman to simply overwrite any python files that seem inaccurate. This places pacman in the boss position over pip, but it also farks-up the pip version of the installation which, downstream, is a b*tch.

Monday, February 17, 2020

wine notes

Running Windows Programs on Linux (20:10), ExplainingComputers, 2017.
Wine Installation (19:58), Chris Titus Tech, 2019.


Simplistically, when one wishes to install or run a Windows app in Linux, one can open a terminal and...
$ wine fooapp.exe
This command creates a hidden ~/.wine/ folder (or "bottle" in wine-speak). In the folder is a spurious C drive and an imitation Windows file structure. With such a structure in place, Wine operates fooapp.exe consistent with the app's Windows file and library calls.

However, suppose one has more than one Windows app? Perhaps an older Windows app that ran best under WindowsXP, as well as newer Windows apps which run best on Windows10. The single ~/.wine bottle folder can be adjusted to match various Windows applications, but not without slowed performance and/or occasional errors. I wanted a way to reliably run any number of Windows applications with reasonably good performance.

application-level bottles

After reading and viewing several vids1, my solution was to create a Wine bottle for each Windows application I use. A per-application bottle approach is not unwieldy if a person takes the time to keep each bottle lean, and it nearly ensures each Windows app will run predictably. Further, the subfolders for the Wine bottles can be placed into an unhidden directory, eg. ~/wine, making the entire configuration transparent and comprehensible.

configuring

For Wine installation, there were only three...
# pacman -S wine winetricks zenity
Zenity is needed for the winetricks GUI and wine is obviously the emulator. Think of winetricks as the Wine installation aid. I tried PlayOnLinux, but it was always coming-up short on DLL's and sending confusing errors. Some ppl will probably do a MONO installation as well, but I just do whatever version of NET is needed by the Windows app itself, in that bottle.

launching

Suppose I have some Windows app, "fooapp.exe". As noted above, I would configure a bottle for it, eg ~/wine/fooapp. To launch, I want to see any spawned errors and possibly avoid the generic 64-bit Wine version noted at the top of this post. A terminal launch can solve both...
$ WINEARCH=win32 WINEPREFIX=~/wine/fooapp wine fooapp.exe
The two environment setting commands keep Wine locked into the application's bottle and at 32bits. From the terminal I can watch for errors and relaunch winetricks to add additional DLL's. Rinse and repeat.

Once I have trouble-shot the application DLL's and its launch parameters, I'm done with the terminal; I'll want to create a menu item for easy launch. For me, this was a problem. My Windows Manager is IceWM, a great WM, but which only allows a single command per menu item. I needed to set environmental variables also. The only way to do this was with a script, as there was no lightweight application for multiple command menus.
$ nano fooapp.sh
#!/bin/bash
WINEARCH=win32 WINEPREFIX=~/wine/fooapp wine ~/wine/fooapp/drive_c/fooapp.exe
exit 0

$ chmod +x fooapp.sh
$ ./fooapp.sh
...and then in my menu, I have...
$ nano /home/foo/.icewm/windows
prog foo foo sh "/home/foo/wine/fooapp.sh"

shutdown

If Wine crashes, I always run $wineserver -k, just to be sure I've killed all Wine windows and memory usage.

NET

Wine installation will prompt to install mono, so NET operations will work.

safety

Windows stuff is susceptible to viruses, and Wine is not a bona fide sandbox.
  1. there's no reason to run Wine as root, and I make a special effort to avoid mistakenly doing so.
  2. when exiting a Windows app, I can use htop to be sure all processes have been killed.

Sunday, December 29, 2019

wine -- can we do this better?

Wine works but has been useless to me since its creation. Each app requires a custom installation -- that's fine -- but when we start the actual app with the "wine" command preceeding the EXE file, Wine "updates"(overwrites) the custom settings, and one receives the same suboptimal performance as if customization hadn't been accomplished in the first place. Because it's been entirely eliminated. It's essentially a repeat of the old problem we used to have with Python when running "pip" instead of a package manager. But Wine doesn't ask first.

Summary of iRoot steps

See backstory below for the steps regarding this USB connected device.
  1. Download PC version from website.
  2. Enter the ~/.wine and delete all files
  3. Prepare Wine and .NET using winetricks
    $ mkdir .wine/Win7
    $ WINEARCH=win32 WINEPREFIX=/home/$USER/.wine/Win7 winetricks dotnet452 vcrun2010 corefonts wininet
  4. Unzip the downloaded installation file somewhere, eg ~/.wine/Win7install.exe
  5. Install the iRoot program using wine.
    $ WINEPREFIX=/home/$USER/.wine/Win7 wine explorer /desktop=somename,720x480 "/home/$USER/.wine/Win7/iRoot_1.8.9.21144_cid1005.exe"
  6. Connect the tablet via USB and be sure screenlock is off, and data transfer enabled.
  7. Run the program, using wine. You could make an iDesk icon or menu entry with same info.
    $ WINEPREFIX=/home/$USER/.wine/Win7 wine explorer /desktop=somename,720x480 "/home/$USER/.wine/Win7/iRoot/1.8.9.21144/Root.exe"

Summary of audio editor steps

  1. $ mkdir .wine/Win7/audio
  2. $ cp audio.exe .wine/Win7/audio/audio.exe
  3. $ WINEPREFIX=/home/$USER/.wine/Win7 wine explorer "/home/$USER/.wine/Win7/audio/audio.exe"

backstory

For me, there are four applications with operating system complexity inside Linux use: Linux itself, LaTeX, Wine, and Blender. Plus perhaps the only slightly lesser issues of ALSA audio and CUPS printing. This time it was Wine, due to the need for two Windows PC apps, one for audio editing, another (iRoot) for rooting a cheap tablet. The former was straightforward, but the tablet rooting app was apparently developed using the .NET framework, and requires a USB connection to the tablet. As is well known, even in Windows proper, .NET dependent USB connections are horrible. Then add Wine complexity. The plan was to work through the errors to get a good Wine installation, then do the same thing for a good application installation.

part 1 :: wine (12+ hrs)

Strategy: follow someone else. Bracing for turbulence and a lost weekend, I downloaded the iRoot PC app and began Googling. The closest I could find was the Garmin Nüvi PC application for updating maps. It is .NET framework dependent, with a USB connection. Chris Titus has a helpful video (11:45) and a helpful web page on the Garmin. I followed his steps, only with the iRoot app, but wasn't successful. It's important to be specific about failures, the USB device was detected but then...
... and the tablet did not appear in the iRoot app, in spite of being detected beneath the hood.

directory structure

Unless two applications can run on the same version of Windows, each application requires a separate installation of windows. I put them in folders as seen here.
That is, although I keep wine and winetricks in the system, I completely eliminate all their files inside of /home/foot/.wine/. I then add directories for each version of Windows required. Based on my iRoot application, and Chris Titus' stuff above, I knew I wanted to work it into Windows 7.
$ mkdir .wine/Win7
$ WINEARCH=win32 WINEPREFIX=/home/$USER/.wine/Win7 winetricks dotnet452 vcrun2010 corefonts

installation errors

During the .NET (dotnet452) portion of the installation, several files are downloaded from Microsoft. A status box (left) also appears, and displays the error that I lack "Windows Modules Installer Service" (C:\Windows\servicing\TrustedInstaller.exe). I sought this executable afterward, but could not locate it. Based on the terminal, it appears the lack of this file prevented a certain level of software use.
0060:fixme:service:QueryServiceConfig2W Level 6 not implemented
I hoped to perhaps remedy this via the cleanup tool, once the Win7 was in, the next step.
$ WINEARCH=win32 WINEPREFIX="/home/$USER/.wine/Win7" winetricks win7

registry cleanup

This doesn't have to be run, but I was curious about it. With Windows 7 in, I placed the cleanup tool just inside the Windows 7 installation, in /home/foo/.wine/win7/drive_c/. It should look like this:
I had read about the (.NET framework cleanup tool) and wanted this operating. Cleanup would also have to be placed in any other installed folders -- XP, 10, whatever -- in which a person wanted to check their .NET install. The prefix is the OS folder, and then I gave it a 720x480 desktop to run inside, in case the Cleaner requires one.
$ WINEPREFIX="/home/$USER/.wine/win7" wine explorer /desktop=cleaner,720x480 "/home/foo/.wine/win7/drive_c/cleanup_tool.exe"
As it ran, the Cleaner, among many thousands of errors it revealed, noted the lack of level 6 implementation. Here are some of the error notifications...
Level 6 is not implemented.
HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\Components key is not present.
No product/patch data was found.

part 2 :: application (12+ hrs)

First run indicated some missing pieces from my installation
0054:err:wininet:open_http_connection create_netconn failed: 12029
... it appeared the program needed to dial home. So, I added the missing wininet.
$ WINEARCH=win32 WINEPREFIX="/home/$USER/.wine/Win7" winetricks wininet
Here's more of the garbled mess that popped up. The program itself indicated a bug.

dead ends

A collection of various things I tried and which were apparently irrelevant.

lack of Windows Module Installer Service

During .Net (aka. "dotnet452") installation, if the installer is unable to find the Windows Module Installer Service,then it provides an error window. There is a noticeable effect downstream from this.
For example, error messages will appear if one attempts to attach a USB device via USB. This is because Level 6 of the .Net installation was not met. The USB device will successfully be detected, but the device will not be able to send file information or be written to. The complaints will take a form similar to...
0060:fixme:service:QueryServiceConfig2W Level 6 not implemented
The situation has been encountered by others, for example as documented here.

linux library checks - AUR

One of my dead ends was checking the Linux libraries. Mine turned out to be fine, but I read of them being a problem for others and having similar problems. Eg, a Battlenet article noted some missing Linux libraries had led to fails. The only one I thought might be mine was hal, so I checked for it...
$ ldconfig -p | grep hal
... returning nothing. Hal is in the AUR,so it has to be built.I'd want the 32 bit version. My luck, yaourt is no longer functioning.
$ yaourt -Ss hal
package-query: error while loading shared libraries: libalpm.so.11: cannot open shared object file: No such file or directory
$ ldconfig -p | grep alpm
libalpm.so.12 (libc6,x86-64) => /usr/lib/libalpm.so.12
libalpm.so (libc6,x86-64) => /usr/lib/libalpm.so

... so it's annoying as heck. Time to move to yay, I suppose; yaourt getting just too unmaintained -- I'm not going to create softlinks to libraries and such. Buh-bye...

yay build

# nano /etc/sudoers
foo ALL=(ALL) ALL
... otherwise the build will fail. Then...
$ cd Downloads
$ git clone https://aur.archlinux.org/yay.git
$ cd yay
$ makepkg -si

Thursday, July 16, 2015

podcasts, audio cds, wine

Links: Overview of burning options :: Tutorial for Linux burning :: Mixed Data-Audio :: More TOC information

I download 60 minute podcasts and burn them to CD's to play when driving. The problem with a long CD is having to listen to, say, the first 20 minutes to skip to minute 21. MP3 players overcome this, but I don't like MP3 players in traffic: I need to look down at the time stamp. Instead, I break the hour podcast into 12 x 5 minute tracks and burn them to a CD. I can keep my eyes on the road and just twist the knob a couple of times to the track I want, without looking down. Below is my process (about 15 minutes long) for processing a podcast onto a CD. There's also some information related to one-time software installation.

Note: processing audio is not hugely resource-intensive on any system built in the last 15 years. Therefore, no "system requirements" or "rendering" time estimates are included here, unlike posts for video processing.

Steps

  1. Convert podcast into a .wav (audio CD format: 44Khz, 2chan, 16bit little endian)
  2. Set levels and so on
  3. Pick 11 break points and insert a second of silence at each
  4. Save each of the 12 segments using a numbering convention, eg "chunk01", "chunk02", etc
  5. Double-check the folder contains all 12 segments
  6. (optional, time permitting) Provide meta-information to display during CD playback (requires creation of a .toc file)
  7. Burn the segments to a CD as 12 tracks.

1. Convert to WAV (1 min)

Sometimes a podcast will be in a video format, sometimes just an MP3, etc. The line below will convert any format, since it nulls the video.
$ ffmpeg -i podcast.avi -vn -ar 44100 -ac 2 podcast.wav

2. Set levels (2 min)

You can always "normalize" the audio, something useful if you have several WAV's. That would be something like...
$ normalize-audio -m *.wav
For a single large WAV that I'm going to divide into sections, I'll need an audio editor, so I just set the level manually when I open the WAV in the editor.

  wine installation sidebar
If you (like me) prefer some outdated Windows audio editor from the 90's that's like an old glove, installing Wine is necessary to use the app. Wine however requires 32-bit libraries. Therefore, in addition to the 500Mb of extra multilib crap, you risk occasional 32-bit multilib conflicts with your modern x86_64 installation. Accepting that, in Arch, add the "multilib" Arch repository and let pacman do the heavy lifting. Enable the "multilib" repo inside pacman.conf, so pacman can locate and add the libraries.
# nano /etc/pacman.conf
[multilib]
Include = /etc/pacman.d/mirrorlist
# pacman -Syu
# pacman -S wine winetricks lib32-alsa-lib lib32-ncurses
$ wine [path to some old app]
If some of the application sound controls don't work, open $ winecfg and check sound settings for the correct card, and so on.

3. Select, mark divisions (5 min)

With the WAV open in a sound editor, I can place 1 second breaks at the end of a sentence (or other pause in speech), about 5 minutes apart. The one hour podcast is thus divided into 12 segments, with 1 second silence pauses I can see on the timeline. Time permitting, if there are any commercials or unwanted portions of the podcast, I can trim them away at this point.

4. Save the segments (5 min)

Moving from silence divider to silence divider, I save each segment of the WAV as a smaller WAV, labeling each sequentially; "chunk01.wav","chunk02.wav", etc. Burning software will follow my numbering convention, re-assembling the segments, in numbered order, as tracks onto a CD.

5. Double check folder

Verify all 11 or 12 tracks (WAVs) are in the folder and are sequentially named.

6. (optional) provide track information, pre-listen

CD's have about 70-80 minutes available, given 700Mb. If you've trimmed a lot of the podcast, you might add additional tracks to the folder, change the order of play around, etc. Maybe you have time to listen to how the entire CD will ultimately sound, once burned. To do this, make a playlist using a text m3u or pls file and play the playlist using your media player. In this post, I reference simple .m3u files (see bottom of page), but I've used the more complex .pls format in other situations. Additionally, you may want to create a .toc text file for meta information during CD burning. An example of a .toc is
also at the bottom of the page.

7. Burn to CD (2 min)

  burning software sidebar
Because I added one second to each segment when dividing the WAV (see 4 above), I don't want to pad the tracks with additional silence when burning them -- too much silence between tracks. Avoiding padding means using DAO (Disk at Once) burning rather than TAO (Track at Once) burning. Secondly, in Arch, pacman cannot resolve both wodim (cdrkit) and cdrecord (cdrtools), because their libraries conflict. Pick one, in other words. I'm used to cdrecord, but Arch instructions only describe burning in terms of wodim and genisoimage (DVD), so I went with cdrkit. Cdrdao is the most important for my way of burning anyway, and that's a separate package.
# pacman -S cdrkit cdrdao


Installation completed, burning is available. Burn speeds may be tweaked up or down according to impatience or errors, but generally:

1) Burning without a Table of Contents, say from a folder in which WAV's are in numeric order:
$ wodim -v speed=1 dev=/dev/sr0 -dao *.wav
If you want to run a test on whether it burns OK first, insert the "-dummy" option in the line. For pads between tracks add the "-pad" option. Other options on the wodim man page.

2) Burning with a Table of Contents (.toc file) can utilize individualized track names and folder locations while burning, and can include track meta-information to display during playback. The application for this type of burning is cdrdao, but note that cdrdao actually requires a TOC file to burn:
$ cdrdao write --device /dev/sr0 --speed 6 --eject --driver generic-mmc-raw [tocfilename].toc

Other Audio Notes

BPM information: The Mixxx application (pacman -S mixxx) in the Arch repositories will calculate Beats Per Minute.

VLC note: During playback, to disable the orange cone when there is no album art: Tools, Preferences, Select All (Bottom), Interface, Main interface, Qt, unselect "Display background cone or art".

.m3u

This file type is good for doing a test of the CD before we burn it. Inside the m3u, we can move the track order around until it sounds the way we prefer. Below is a minimal example with two tracks -- you can expand the number of tracks using as many WAV's as desired, for example you may want to make a 4 hour playlist for a party. However, a CD cannot contain more than 70-80 minutes of audio, unless you have a stereo that plays MP3 format (a different post), so keep a general idea of your minute total if you ultimately intend to burn it.
$ cat sample.m3u
#EXTM3U

#EXTINF:-1,July 15 Podcast - Part 1 (4:08)
chunk01.wav

#EXTINF:-1,Musical Interlude (3:00)
/home/foo/tracks/sunnyday.wav

.toc

Links: TOC metadata explanation :: More TOC information :: Script for simple TOC production
The TOC is critical during DAO burning, so it's worth reading a couple of posts on them (see links above). A user may wish to modify the TOC from an existing audio CD, produce a TOC from scratch, etc. To examine a TOC from an existing audio CD:
$ cdrdao read-cd --device 0,1,0 --driver generic-mmc-raw somename.toc
These TOC files are easily manipulated with any text editor. Use two forward slashes ("//") to add comments inside the file. I make very simple TOC's, but there are many tweaks available for those who have the time to invest: get into those three links above.

Here's a truncated view of a TOC I made for a divided podcast burn. The actual TOC for the burn is obviously longer since it has more tracks, but you'll get the picture:
$ cat sample.toc
CD_DA

//Track 01
TRACK AUDIO
CD_TEXT {
LANGUAGE 0 {
TITLE "Part 1: 2014-09-24 Speech"
PERFORMER "Matteo Renzi"}
}
FILE "chunk01.wav" 0

//Track 02
TRACK AUDIO
CD_TEXT {
LANGUAGE 0 {
TITLE "Part 2: 2014-09-24 Speech"
PERFORMER "Matteo Renzi"}
}
FILE "chunk02.wav" 0
The information will be displayed for each track. Also, the tracks are only 5 minutes each: when driving, I can spin the knob between tracks without looking down. When stopped, I can glance down to see the actual title of the portion. Have fun and be safe!

Friday, September 5, 2008

Slackware 12.0 - Wine Install

It appears Slackware doesn't include Wine. In early September of 2008, there was a dedicated Wine package available for Slack 10.1 here, but this package made for 10.1, may not have worked with the 2.6.21.5 kernel in Slack 12.0. I thought it best to go with source and compile. The latest Wine package download info is typically found at this portion of the WineHq site. I selected the latest release, which was Wine 1.1.4 in early September 2008.

dependencies

Dependencies are supposed to be the bane of installing Wine. I was unable to locate a dependency list at the WineHQ site to preempt vigilance with configure. Nevertheless, it seemed it would be easy to watch configure, note misses, download and install them, and then re-run configure. It seemed that easy.

I untarred the package and proceeded to the first run of configure, Several apparent problems which didn't appear to be dependency problems displayed as configure scrolled its checks. These scrolling messages seemed to indicate various audio features were unavailable. Here's a few of hundreds that appeared:
checking machine/soundcard.h usability... no
checking machine/soundcard.h presence... no
checking for machine/soundcard.h... no
When configure finished its run, it also provided a message which may have been dependency related:
configure: libcapi20 development files not found, ISDN will not be supported.

Additionally, I looked in /include/config.h to check further for missing dependencies. All told, I didn't think I'd need the audio stuff that was scrolling or the ISDN support the message indicated, so I went to the remaining standard installation steps:
$ ./configure
$ make depend
$ make
# make install
These steps seemed to go well, though in the back of my mind I was a feeling my dependency laziness might bite me later.

configuration


After installation, I began with $ winecfg and received another apparent error message:
$ winecfg
wine: created the configuration directory '/home/doofus/.wine'
Could not load Mozilla. HTML rendering will be disabled.
wine: configuration in '/home/doofus/.wine' has been updated.
Not sure what this meant either, but I kept going, unzipping and installing a Windows gradekeeper program. It started without any problems. So far, so good, though I may yet find that these HTML and audio messages provide some limitations.