How to create an .exe file to simplify talking-head-anime distribution
emoto-yasushi opened this issue · 1 comments
Hello.
I am a developer of iFacialMocap.
I am very happy that your great software supports iFacialMocap.
I recently purchased a PC with RTX2080 Super.
And I finally have enough time to try your software.
Great software!
I am not familiar with Deep Learning code, but I can handle a little Python code.
(The iFacialMocap desktop app is written in Python.)
And since your software is also in Python, I can share with you how I distribute my software.
【About Pyinstaller and innoSetups】
Python has a library called Pyinstaller, and the iFacialMocap desktop app uses it to create .exe files.
(If you use Pyinstaller on a Mac, a .app file will be created.)
In addition, I use innoSetup, an installer creation software for Windows.
With Pyinstaller + innoSetup, users can use your software without the need to install Anaconda.
I have created a sample file of this.
There are very few changes to your code, but I will upload it so you can take a look at it if you have the time.
【Final exe file】
This is the final installer.
https://drive.google.com/file/d/1y2BKE_JhVrFkX5IrNwdIcoDsjGH_aee-/view?usp=sharing
It is approximately 2 GB and can be downloaded from GoogleDrive.
If users have NVidia GPU, users should be able to use talking-head-anime-3-demo without installing Anaconda or any libraries.
【The directory I used to create this exe file】
This is the project I used to create the exe.
https://drive.google.com/file/d/1pKwNUIBYTzr71po0950mCOtHm-qt40qx/view?usp=sharing
I have added an import statement to the init.py in your code.
I also added a .spec file in the root directory, a .iss file, and a .py file to create the startup screen.
To use pyinstaller, run the following command in Anaconda
conda install pyinstaller
Then run the following command in Anaconda
pyinstaller talking-head-anime-3-demo.spec
Before running, you need to slightly change the path to the site-package in the .spec file.
This will create an exe file in the "dist / talking-head-anime-3-demo"
directory.
Since there are too many files to confuse the user, we will use innoSetup to create a single distribution file.
【innoSetup】
Download innoSetup from the following site
https://jrsoftware.org/isdl.php
Then, open "talking-head-anime-3-demo.iss" with innoSetup.
Change the file path inside "talking-head-anime-3-demo.iss"
slightly to suit your environment.
Then press the play button and the installer will be created.
This will take a long time.
【Finally】
Thank you for reading this far.
If you wish to distribute .exe files to your users, you may do so.
If you do not want to distribute .exe files, that is still fine.
I do not plan to submit a pull request because I am not very familiar with how GitHub works and I do not want to mess up your code.
I hope this issue will be helpful to you and will be useful for your future development.
If you want many users to use your software, the means of creating these .exe files will help a little.
I am aware that there have been copyright issues in the promotion of your software.
However, I would be happy if you could use these for future development.
One last time, thank you for creating a great software.
Thank you very much for the tip. I'll be studying them.