Showing posts with label windows 10. Show all posts
Showing posts with label windows 10. Show all posts

Saturday, July 22, 2017

Delphi XE5, dxgettext, Windows 10 : How To Make it all work together


Well I've returned to Delphi, once more. How could I not? Best tool of choice for desktop development (and then some! Mac, Mobile, and more)

Thing is, a few years ago I got used to developing my applications in English (my native language is Spanish), in order to have a multilingual solution from the very start. For that I've always used dxgettext, a free solution, quite efficient and relatively simple to implement.

Enter, Windows 10. Oh that beast.

It seems that something in the most recent Windows 10 releases has broken the implementation of dxgettext. I won't go too deep (I wouldn't know how!) but dxgettext seems to depend on Cygwin, and the Cygwin files in its distribution are way old (same as the package itself, but those are Delphi programs and they do work and work!) and when trying to do things like merging, or decompiling, you might get "bash.exe" running over and over in a loop, until eventually your Windows will hog and you'll have to use the POWER button. Ugly. 

This has been reported by others in here and here and also in the Yahoo Newsgroup.

Tried some of these solutions, involving changes in some DLLs but bash.exe kept coming up with its ugly head once and again.

So, after much testing, I came up with these steps below:
(Also for XE5, or any new Delphi, notice that you might need to use a different .pas unit for gnugettext.pas. See this Link for an updated version)


  1.  Download and fresh install dxgettext-1.2.2.exe from http://dxgettext.po.dk/download as admin. Restart.
  2.  Download Cygwin 32bit from https://cygwin.com/install.html  in a different folder from dxgettext (I took the default, c:\cygwin)
  3. Run setup-x86.exe and select  "Base" Package (Install).  Next, Select Required packages just in case.
  4. Move the following files from dxgettext folder to a backup folder (we'll use some DLL later): cyg*.dll and bash.exe
  5. Copy from c:\cygwin to the dxgettext folder the following files:

    • bash.exe  (set to run as admin)
    • cygwin1.dll
    • cygiconv-2.dll
    • cygintl-8.dll
    • cygreadline7.dll
    • cyggcc_s-1.dll
    • cygncursesw-10.dll


    1. Recover the file(s) below from the backup folder (See #4) and copy to the dxgettext folder.
        cyggettextsrc-0-14-1.dll,  cyggettextlib-0-14-1.dll and  cygintl-3.dll
    2. Running like this, you might get error 740 (requires elevation). So:   Set ggmerge.exe,ggfmt.exe to run as admin

    So far so good; I've tested Merging, Decompiling, Compiling and of course Extraction to Template (this one did work before) and it seems to run ok in my Windows 10 Version 1607 (Anniversary Update I think).

    Hope this can somehow be included in the distribution package; this is an awesome tool and I'm happy if it continues working with this small workaround. 


    Tuesday, January 05, 2016

    Intel Compute Stick / Windows 10 issues and troubleshooting


    This is a draft entry to record my issues with the Intel Compute Stick.

    I started on Win 8.1 with Bing as it was provided, but managed to upgrade to Windows 10 (Only 32bit, Home is allowed by license) without major issues.

    I used the stick primarily as an HTPC device; installed Kodi on it, and little more. Kinda slow, but did work, as Kodi is cool enough to manage a good performance on any platform.

    One day, suddenly, Win10 presented an error - honestly I am not sure which error it was, but after reading some forums about this problem, I guess it was a Windows 10 Update Pack (November update? 10586 version?) that couldn't finish and left the machine in a "limbo" state.

    Thing is, after that, I couldn't even reset the PC to a bare Windows 10 install (it stuck on some percentage after a long time working) even when choosing to lose all my stuff.

    What seems to be working now is the following:

    - Created (with the help of Rufus: select MBR Partition with UEFI!) a bootable USB thumb drive in other Windows machine, with the latest Windows 10 Home 32bit ISO from Microsoft. Note that the Sandisk Extreme thumb drive seems to work, while a Kingston G4 seems to have failed.

    - I was using a crappy USB Hub 2.0 to connect wireless keyboard and the thumb drive.... It was obviously giving me a headache. I moved over to a wired USB keyboard (as per other users' recommendations) and a wired USB mouse, changed the USB Hub to one with external power supply.

    - Also, I was able to do go for the 3 second power button menu (apparently the wireless keyboard was preventing me from getting there) and updated the BIOS version from 18 to 31 (lots of versions in between!)

    - Then I was able to select F10 boot menu, chose the Sandisk thumb with bootable Win10 iso and then started the installation.

    - On the license key prompt I selected "Skip" (with the other hub/keyboard I got an error that there was no storage available or something, asking me to enter a driver for that; it might have been the issue with the wireless combo USB dongle?)

    - I chose to delete the Windows partition and installed over there (about 21gb can't recall exactly). I didn't touch the "images" and other partitions. Not sure what I'll do about that in the future. Don't think they're any worth.

    - Bummer! I chose the wrong ISO (not the first time I do that), and I ended up with Windows 10 Pro installed on the Stick - well, we know it works BUT.. Thing is that Windows appeared as "not activated" and with an error that surely would prevent to activate it even on the phone:

    - After all, that was not the license I was entitled to; Windows 8.1 Bing is freely updated to Windows 10 Home 32BIT ONLY. So, patience, and did it all over again, this time with a thumb drive with the correct Windows 10 Home ISO on it. I did run the setup from inside Windows 10 Pro this time, then deleted the main partition again... And did the whole process...

    - And when finally I reached the desktop and checked on This PC's properties... SUCCESS!! Windows 10 Home, (self) activated!!

    SO - It seems to be working fine! Tomorrow I'll check if it does power up ok, will try to tidy up things a little ( more free space, improve performance etc) *and* try to get an image of this thing in case of more trouble.

    DAY 2
    - The machine booted up without issues; did some performance tweaking, uninstalled some apps and I'm trying to download kodi for Windows.

    - I also followed the instructions in this link to set Wifi as a "metered" connection to avoid the automatic download of updates.. Version 10586 seems to cause trouble. Now I'm on 10240.

    - Pending is to use File History or anything else to create an image of the system in case of trouble. Which seems to be something very likely to happen again.

    - Next thing is to install the Stick drivers from Intel!