Jump to content











Photo
- - - - -

[WB 080 - Win7PE_SE] - How to add fonts to your build


  • Please log in to reply
35 replies to this topic

#26 Aeolis

Aeolis

    Frequent Member

  • .script developer
  • 145 posts
  • Location:Rio de Janeiro
  • Interests:I am just trying to learn and help.
  •  
    Brazil

Posted 31 July 2011 - 10:28 PM

Hello folks,

@sbaeder: I have tested your script a few times. And I have found the following problems:

1- It does not copy the font files from the "Add Additional Fonts from this directory:" location to the target Windows\fonts folder. So, I put them manually in the right target folder.

2- Even with the fonts in the right place, after running the Win7PE_SE build the fonts are not available to any "font aware" applications. I think regfont is not running in the right moment at boot time (before windows build the font cache) or it is not running at all, I strong believe in the second option due to the nature of regfont behavior to register fonts.

Dear sbaeder could you, please, check the script? Thank you all for your attention and help.

See you later,

Aeolis

#27 amalux

amalux

    Platinum Member

  • Tutorial Writer
  • 2813 posts
  •  
    United States

Posted 01 August 2011 - 08:52 AM

I think regfont is not running in the right moment at boot time (before windows build the font cache) or it is not running at all..

I had similar luck with script so I tried running regfont on folder both pre and post shell
for /f "tokens=*" %%g in ('dir /b /s *.ttf') do regfont -a "%%g"
with same result, no fonts added to build; even though regfont reports success on all fonts installed. Maybe something missing in Win7PE_SE?

#28 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1338 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 01 August 2011 - 08:10 PM

I have a small doubt: is there a specific place to put the regfont script? I have put it inside the "Build" scripts folder (Projects\Win7PE_SE\Build), is it ok?


The script Level=4 so it needs to be in the folder with scripts of the same level. Examine the scripts in that folder with notepad or something. The level should stated in the top portion of the script. No sure off the top of my head. Level 5 is for Apps. Doesn't go there! If they are also Level=4, you've found the right place to drop the script.

Actually, this is a lot more COMPLEX a question, and there is no one right answer. BOTH levels AND directories are used to create the TREE that winbuilder uses. While it might look like a folder view tht can expand/contract, it is a TREE, and the same folder MAY show up more than once *IF* there are scripts from multiple levels.

So, it is a combination of the level of the script setting the order scripts are executed - and there is more on this in the help docs - AND then the naming of the folders and scripts comes into play to sequence the scripts of a given level, and all that is graphically shown on the WinBuilder TREE view.

#29 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1338 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 01 August 2011 - 08:15 PM

Hello folks,

@sbaeder: I have tested your script a few times. And I have found the following problems:

1- It does not copy the font files from the "Add Additional Fonts from this directory:" location to the target Windows\fonts folder. So, I put them manually in the right target folder.

I'll double check that - BUT a LOG FILE would also be a help here to see if there are missing things on your machine. I use a Win7 - X64 based build machine, and use Win7-X86 SP1 for the source OS. This was a later addition, so I will double check.

2- Even with the fonts in the right place, after running the Win7PE_SE build the fonts are not available to any "font aware" applications. I think regfont is not running in the right moment at boot time (before windows build the font cache) or it is not running at all, I strong believe in the second option due to the nature of regfont behavior to register fonts.

Shouldn't matter about the "cache", and on my testing, I did see the Ariel (thin/bold) added OK in WordPad, so I know it was working OK...

AGAIN, and over the past week I must have said this 50 times...ALWAYS PROVIDE A BUILD LOG (WITH DEBUG) when there is a problem. Not just yelling at you, but ANYONE who has a problem. It is a smll step for you, but MAY provide valuable information for anyone like me trying to help...

Dear sbaeder could you, please, check the script? Thank you all for your attention and help.

Yes - will try it now in a new build.

#30 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1338 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 01 August 2011 - 09:12 PM

1- It does not copy the font files from the "Add Additional Fonts from this directory:" location to the target Windows\fonts folder. So, I put them manually in the right target folder.

Yes - in my haste, added the GUI, but forgot the copy of the files :whistling: Fixed!
Attached File  regfont.script   31.88KB   767 downloads

2- Even with the fonts in the right place, after running the Win7PE_SE build the fonts are not available to any "font aware" applications. I think regfont is not running in the right moment at boot time (before windows build the font cache) or it is not running at all, I strong believe in the second option due to the nature of regfont behavior to register fonts.

fonts.gif

I had similar luck with script so I tried running regfont on folder both pre and post shell

for /f "tokens=*" %%g in ('dir /b /s *.ttf') do regfont -a "%%g"
with same result, no fonts added to build; even though regfont reports success on all fonts installed. Maybe something missing in Win7PE_SE?

Not sure why you are both having issues...Works for me...Here are the Win7PESE scripts I am using for this test...(using Win7 SP1 image, standard copy)
Main Configuration Version[21] ( )  0.831 seconds

 Images configuration Version[10] ( )  3.724 seconds

 Retrieve Tools Version[8] ( )  0.564 seconds

 0 - PreConfig Version[22] ( )  0.443 seconds

 1 - Copy Files Version[28] ( )  94.472 seconds

 2 - Shell & Config Version[24] ( )  14.481 seconds

 5 - WoW64 Basic Version[8] ( )  7.963 seconds

 6 - Common Files Version[3] ( )  1.462 seconds

 9 - Autorun Version[2] ( )  0.309 seconds

 CdDrive %CDDrive% - X: - Y: Version[4] ( )  0.424 seconds

 Common_Api Version[25] ( )  0.032 seconds

 Retrieve More Localized Info Version[18] ( )  1.234 seconds

 0 - Shell Swapper TimeOut Version[1] ( )  0.173 seconds

 1 - Explorer Shell Version[25] ( )  30.973 seconds

 Calculator Version[9] ( )  0.628 seconds

 DirectX 11 Version[11] ( )  18.976 seconds

 HostOS Import Manager Version[1] ( )  0.579 seconds

 Hotplug Version[2] ( )  6.549 seconds

 HwPnP Version[28] ( )  1.430 seconds

 Internet Explorer 8 Version[7] ( )  13.009 seconds

 IE Favorites Version[10] ( )  2.441 seconds

 IE Flash (Only IE) Version[8] ( )  1.965 seconds

 MMC Version[18] ( )  8.441 seconds

 MSI Installer Version[3] ( )  3.001 seconds

 Paint Version[1] ( )  1.010 seconds

 Photo Viewer Version[1] ( )  1.897 seconds

 Wordpad Version[1] ( )  0.705 seconds

 Notepad Version[2] ( )  1.523 seconds

 PENetwork Version[12] ( )  9.937 seconds

 MS Visual C++ Runtimes (2005/2008) Version[3] ( )  2.051 seconds

 Register Fonts Version[2] ( )  0.603 seconds

 Wallpaper Version[4] ( )  3.021 seconds

 BGInfo Version[7] ( )  1.106 seconds

 Context Menu Version[2] ( )  1.323 seconds

 ShutdownPE Version[14] ( )  2.510 seconds

 SideBar Version[5] ( )  10.317 seconds

 Attribute Changer Petges Version[3] ( )  1.207 seconds

 Audio Version[11] ( )  14.377 seconds

 Driver Package Installer Version[2] ( )  6.241 seconds

 USB 3.0 Support Version[6] ( )  8.698 seconds

 Driver Integration Version[3] ( )  48.371 seconds

 Optimizations Version[5] ( )  3.700 seconds

 TrimDownPE Version[2] ( )  2.896 seconds

 1 - Pins Version[3] ( )  2.443 seconds

 3 - PostConfig Version[19] ( )  33.573 seconds

 Save log file Version[2] ( )


If you want to see the full log (practice what I preach!) go to Win7PE SE-Win7x86_2011-Aug-01_16-52.7z on Mediafire

#31 amalux

amalux

    Platinum Member

  • Tutorial Writer
  • 2813 posts
  •  
    United States

Posted 01 August 2011 - 10:17 PM

Yes, you're right, it is working; thanks. In my haste I also did something silly. Anyway, it made a very easy add to an existing script I was working on so through it in DrvLoad03. Glad yours is working as well, choices are always good.

:whistling:

#32 Aeolis

Aeolis

    Frequent Member

  • .script developer
  • 145 posts
  • Location:Rio de Janeiro
  • Interests:I am just trying to learn and help.
  •  
    Brazil

Posted 01 August 2011 - 10:33 PM

Hello folks,

Dear sbaeder I will do it always from now on and I will do my best to improve my script skills! Thank you for your help and explanations. Here is the log for the build I was talking about (the one that I had problems with fonts):

Win7PE SE-Win7x86_2011-jul-31_18-41.7z

I hope it helps.

See you later,

Aeolis

#33 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1338 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 01 August 2011 - 10:40 PM

Hello folks,

Dear sbaeder I will do it always from now on and I will do my best to improve my script skills! Thank you for your help and explanations. Here is the log for the build I was talking about (the one that I had problems with fonts):

Win7PE SE-Win7x86_2011-jul-31_18-41.7z

I hope it helps.

See you later,

Aeolis


OK - try the new script...I will also look over log file to see if I see anything!

But,the exe should do the trick, and as you can see from the image, wordpad did see the newly added fonts...

Cheers
Scott
:cheers:

#34 Aeolis

Aeolis

    Frequent Member

  • .script developer
  • 145 posts
  • Location:Rio de Janeiro
  • Interests:I am just trying to learn and help.
  •  
    Brazil

Posted 14 August 2011 - 04:21 PM

Hello folks,

After a lot of test builds and script learning I have figured out what the problem was. The problem was very simple, I have changed the following line on the original sbaeder's script:

AddPostConfig,%ProgramTitle%,%PE_Programs%\%ProgramFolder%\%ProgramExe%, "-a x:\windows\fonts\*.*",3

To this one:

AddPostConfig,%ProgramTitle%,%PE_Programs%\%ProgramFolder%\%ProgramEXE%,"-a %Windir%\Fonts\*.*",3

The problem was a extra space before the refont.exe parameters, so I removed the extra space and changed the x:\windows\ to a Windows environment variable %Windir% which makes the script more general. I have made a few cosmetic changes to the script itself and tho the script GUI boxes. I have attached to this post the new file, added my name after sbaeder and updated it to version 4. Sbaeder you can remove my name from the script if you don't like. I know you had all the hard work, I have just debugged it a little bit, so feel free to remove my name.

See you later,

Aeolis

regfont.script is here: http://www.mediafire...34bqe8p70alqqoz

#35 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1338 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 14 August 2011 - 08:23 PM

Hello folks,

After a lot of test builds and script learning I have figured out what the problem was. The problem was very simple, I have changed the following line on the original sbaeder's script:

AddPostConfig,%ProgramTitle%,%PE_Programs%\%ProgramFolder%\%ProgramExe%, "-a x:\windows\fonts\*.*",3

To this one:

AddPostConfig,%ProgramTitle%,%PE_Programs%\%ProgramFolder%\%ProgramEXE%,"-a %Windir%\Fonts\*.*",3

The problem was a extra space before the refont.exe parameters, so I removed the extra space and changed the x:\windows\ to a Windows environment variable %Windir% which makes the script more general. I have made a few cosmetic changes to the script itself and tho the script GUI boxes. I have attached to this post the new file, added my name after sbaeder and updated it to version 4. Sbaeder you can remove my name from the script if you don't like. I know you had all the hard work, I have just debugged it a little bit, so feel free to remove my name.

Keeping name like this is FINE, and encouraged since you added to and improved the process! :cheerleader: This way, you learn, and we all benefit!

Scott
  • Aeolis likes this

#36 Aeolis

Aeolis

    Frequent Member

  • .script developer
  • 145 posts
  • Location:Rio de Janeiro
  • Interests:I am just trying to learn and help.
  •  
    Brazil

Posted 14 August 2011 - 10:56 PM

Hello folks,

@sbaeder: Thank you very much for your kind words! I will do my best to improve and I will challenge myself to write my first script. I will try to write a script for ProEject (http://softwarespot....tware/proeject/). It's a really good free portable software to eject drives/disk connected to PC. I have tested it and it works on Win7PE_SE environment, so I will try to write a script to integrate it and autorun it from the "Programs" folder on the Win7PE_SE root (not from the boot.win "Program Files" folder). See you soon!

See you later,

Aeolis




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users