×

Give a tip

Maxthon Flash & Language Updater


Truuuc
 Share

Recommended Posts

I created a NSIS setup program which automatically downloads and installs the latest version of Maxthon localized language packages.

It can also update Adobe Flash Player plugin and Maxthon included Flash DLL, and delete unwanted translations, included PDF plugin and included Adobe Flash plugin (in order to use the system one).

Mx_Xx_Updater.png

French description

 

This a generic script which you need to edit with notepad or NSIS script editor and modify language, URLs and file name.

eg: Xx > Fr, xx-xx.zip > fr-fr.zip...

 

In order to make the edition easier, you can search "#" in the NSIS script to identify which lines to edit.

For translate GUI and messages, search "Text=" in .ini file and "DetailPrint" and "MessageBox" in .nsi file.

 

1) Download the source code (last MD5: ECDFE90ADCBF9D666E46E7FD1B2866E5).

2) Edit files with notepad, advanced notepad (eg: Notepad++) or NSIS script editor (eg: HM NIS Edit).

Mx_Xx_Update.nsi > NSIS script.

Mx_Xx_Update.ini > GUI file.

3) Download and setup NSIS 3.

4) Download plugins nsUnzip and XML, extract nsUnzip.dll and xml.dll to "%ProgramFiles%\NSIS\Plugins\x86-ansi" and XML.nsh to "%ProgramFiles%\NSIS\Include".

5) Right click on "Mx_Xx_Update.nsi" and compile the script.

 

This NSIS script is designed for translation teams of each country to propose an easy and complete updater to their users.

 

For international use, Maxthon English Updater can do everything exept update language (great for update Adobe Flash Player to all Maxthon localized version).

Mx_En_Updater.png

Source code

 

List of localized updater :

Maxthon French Updater (MD5: B290919A9CB45C2ECB12CD5A9DA8D4A2)

Maxthon English Updater (MD5: 8CE84F3748DF9A671790DC9A3CA20058)

 

Edited by Truuuc
  • Like 3
Tip   Give
Link to comment
Share on other sites

  • 8 months later...
  • 2 weeks later...
  • 3 months later...
  • 5 months later...
Tip   Give
Link to comment
Share on other sites

  • 1 year later...

Sources updated

- Maxthon NG Support.

- Check update online before download Adobe Flash Player (Official Adobe XML).

- Sources compilation with NSIS 3 and plugins nsUnzip and XML (info in first post).

 

Maxthon NG possibility: Update spell checker, update Adobe Flash Player, update included Flash Player plugin, remove included PDF plugin, remove other translations.

Removing included Flash Player dll option disable (not possible with Maxthon 4.9), no update translation (not required).

 

Maxthon Cloud possibility: Update translation and spell checker, update Adobe Flash Player, update or remove included Flash Player plugin, remove included PDF plugin, remove other translations.

Edited by Truuuc
  • Like 1
Tip   Give
Link to comment
Share on other sites

  • -ody- featured this topic

Sources updated - MD5 : E85271E00F111DB0E6661558BE6EE724

- GUI file no up to date (bad "Top" and "Bottom" parameters)

- Completion of English translation

Edited by Truuuc
  • Like 1
Tip   Give
Link to comment
Share on other sites

Sources updated - MD5 : 4861FE464A9F893128BE069749C06E5F

- New name : Mx_Xx_Updater / Maxthon Language Updater (now it's an updater tool, not a language update pack).

- Some GUI modification.

 

Creation of Mx_En_Updater to do everything exept language update (for generic use of features).

Edited by Truuuc
  • Like 2
Tip   Give
Link to comment
Share on other sites

А-а-а! Сложно!
Really, too difficult for just users... 
I want to help with translations in Russian, but I don't understand what I have to do.
Just write terms what we have to translate and we'll do it.
P.S. I can ask users for Ukraine, Germany, Philippines, Bangladesh.

  • Like 1
Tip   Give
Link to comment
Share on other sites

For Russian version rename Mx_Xx_Updater.nsi/.ini as Mx_Ru_Updater

In ini file (GUI), translate all "Text=" line.
eg: [Filed3]
Text=Update Adobe Flash Player
--> Text=<Russian word for "update"> Adobe Flash Player

In nsi file, search all ### comment and follow instruction
eg: Rename $INSTDIR\Bin\Locales\xx-xx.lng $INSTDIR\Bin\Locales\xx-xx.bak ;### localized file name. eg: fr-fr.bak ###
--> Rename $INSTDIR\Bin\Locales\ru-ru.lng $INSTDIR\Bin\Locales\ru-ru.bak
NSISdl::download http://maxthon-fr.com/site/files/fr-fr.zip "$TEMP\${PRODUCT_NAME}\fr-fr.zip" ;### change URL and file name ###
--> NSISdl::download http://maxthon.org.ru/ru-ru.zip "$TEMP\${PRODUCT_NAME}\ru-ru.zip"

Translate all "MessageBox" and "DetailPrint" line (MessageBox with ";" (comment) not needed. It's for debug).
eg: DetailPrint "Downloading Adobe Flash Player PPAPI"
-->   DetailPrint "<Russian word for "downloading"> Adobe Flash Player PPAPI"

With Notepad++ all comments (useless to translaste) are green.
All message in "" are grey, but translate only "MessageBox" and "DetailPrint".
Word start by "$" are variable, not translate it.
eg: var MxFlashVersion
DetailPrint "Actual version: $MxFlashVersion"
--> DetailPrint "<Russian words for "Actual version">: $MxFlashVersion"
 

Edited by Truuuc
Tip   Give
Link to comment
Share on other sites

17 hours ago, Truuuc said:

In ini file (GUI), translate all "Text=" line.
eg: [Filed3]
Text=Update Adobe Flash Player
--> Text=<Russian word for "update"> Adobe Flash Player

Done.

17 hours ago, Truuuc said:

NSISdl::download http://maxthon-fr.com/site/files/fr-fr.zip "$TEMP\${PRODUCT_NAME}\fr-fr.zip" ;### change URL and file name ###
--> NSISdl::download http://maxthon.org.ru/ru-ru.zip "$TEMP\${PRODUCT_NAME}\ru-ru.zip"

This is fake website with malware. And this link does not work.
What is this? Localization file?
Maybe is available on Crowdin (ru-ru.ini for MX 4.9) or Ru-Board (need "локализация", but there are 2 localization for MX 4.4 and 1 for MX 4.9).

Tip   Give
Link to comment
Share on other sites

Fast search on Google for example.

Paste the good URL for Mx 4.4 translation.

 

Example for French translation:  http://maxthon-fr.com/site/files/fr-fr.zip

This line dl the translaton file: 

NSISdl::download http://maxthon-fr.com/site/files/fr-fr.zip "$TEMP\${PRODUCT_NAME}\fr-fr.zip"

This line extract the file: 

nsUnzip::Extract "$TEMP\${PRODUCT_NAME}\fr-fr.zip" "/d=$TEMP\${PRODUCT_NAME}\Translation" /END

And this line copy the ini file on Maxthon Cloud folder: 

CopyFiles "$TEMP\${PRODUCT_NAME}\Translation\*.*" "$INSTDIR"

 

For French version, the .zip containt "Language" folder.

If not for Russian version, add "\Language" in copy line: 

CopyFiles "$TEMP\${PRODUCT_NAME}\Translation\*.*" "$INSTDIR\Language"

 

Tip   Give
Link to comment
Share on other sites

  • 3 weeks later...

I made a few modifications to the Mx_En_Updater.ini file. Just minor changes to the wording.

Also per this post, can you check the code for the MX4.9 flash update.

For some reason when testing (using portable) it's not deleting/copying the pepflashplayer.dll file and also creating a webkit/npplugins folder which isn't required. Version detection seems to be off, or maybe just a portable thing?

  • Like 1
Tip   Give
Link to comment
Share on other sites

Thanks for your modifications!

If you have time you can verify the lines "DetailPrint" and "MessageBox" in .nsi file.

 

For find the Maxthon folder, Mx_Updater check the registry key: HKEY_CURRENT_USER\Software\Maxthon3\Folder

If this key doesn't exist, the default folder is set to: $PROGRAMFILES\Maxthon3

The Maxthon portable version don't use registry, and if the portable Maxthon folder is not in "Program files" you need to select it manualy in Mx_Updater.

 

After this step Mx_Updater check the Maxthon.exe version in "$INSTDIR\Bin"

If the version is less than 4.8.8 = Maxthon Cloud (Webkit\npplugin)

If the version is greater than 4.8.8 = Maxthon NG (Blink\plugins)

Portable version have a Maxthon.exe in Bin folder? Or it's MaxthonPortable.exe (or other name)?

 

Tip   Give
Link to comment
Share on other sites

17 hours ago, Truuuc said:

Portable version have a Maxthon.exe in Bin folder? Or it's MaxthonPortable.exe (or other name)?

 Maxthon.exe in Bin

18 hours ago, Truuuc said:

The Maxthon portable version don't use registry, and if the portable Maxthon folder is not in "Program files" you need to select it manualy in Mx_Updater.

Maybe add a line stating "For Maxthon Portable you must set the correct install folder above" underneath the folder path field.

Everything else looks good.

 

Updated a few lines from the nsi file. Attached below.

Mx_En_Updater.nsi

Tip   Give
Link to comment
Share on other sites

Sources updated - MD5: FE13EDAF7DC2A8F290C131A8B1ED1610

- Better support of Maxthon portable version.

- Error message if Maxhon.exe not detected.

- Minor changes to the wording (thanks to 7twenty).

 

Mx_En_Updater compiled - MD5: 0AAEB89CD7A394AAAB6BE0E1311F7688

 

New bug update, sorry for the trouble.

Edited by Truuuc
  • Like 2
Tip   Give
Link to comment
Share on other sites

  • 1 year later...
 Share