Comments (12)
As per Windows 10 Creators Update, elevated command prompt is not mandatory anymore to create symlinks. Refer, this.
from gif-for-cli.
Linux subsystem on Windows works with this at present.Type bash in cmd.exe (yeah it's still in cmd.exe) and deploy it like Linux.
from gif-for-cli.
Please specify the steps to install the dependencies on Windows.
from gif-for-cli.
I'm not sure, it'll likely require changes to run in a Windows env. From what I've read, cmd.exe may not support ANSI escape codes before Windows 10, and in Windows 10 you may need to configure ANSI support yourself.
from gif-for-cli.
Ok. But Powershell does support ANSI escape codes. Check https://github.com/PoshCode/Pansies.
from gif-for-cli.
Ok. Have you tried installing or using on Windows? What errors did you get?
from gif-for-cli.
According to the code dependencies are installed by setup.py
clone the repository cmd or powershell with :
git clone https://github.com/google/gif-for-cli.git
Change directory to gif-for-cli :
cd gif-for-cli
Then install the dependencies using setup.py:
python setup.py install
from gif-for-cli.
If you do that you'll end up with:
Traceback (most recent call last):
File "setup.py", line 33, in
os.symlink('../third_party', symlink_path)
AttributeError: 'module' object has no attribute 'symlink'
from gif-for-cli.
Due to some peculiarities with the way Python packing works, the install script has to temporarily create a symbolic link to that dir. It'll probably have to change for Windows.
If you guys want to work on a PR for Windows support it would be much appreciated. :)
from gif-for-cli.
Why is a symbolic link needed for third party dependencies at all. Can't it just be packaged as a single folder?
from gif-for-cli.
I needed to include a font for the export feature, and it's Google policy to put all 3rd party code in the third_party dir. I tried a number of different ways, but I couldn't get that directory to consistently be included in the .whl and .tar.gz distributions. The best way to ensure the needed files would be available after install was to make it a Python module, but I didn't want third_party
to be a top level module name, as it's too generic, I wanted it to be gif_for_cli.third_party
. After several failed attempts to map the third_party dir to that module name, it seemed the easiest/only way was to just add a temporary symlink.
from gif-for-cli.
Seems a bit daft but I guess you could add Windows support for symlink...though that would require an elevated command prompt to install.
if os.name == "nt":
def symlink_ms(source, link_name):
import ctypes
csl = ctypes.windll.kernel32.CreateSymbolicLinkW
csl.argtypes = (ctypes.c_wchar_p, ctypes.c_wchar_p, ctypes.c_uint32)
csl.restype = ctypes.c_ubyte
flags = 1 if os.path.isdir(source) else 0
try:
if csl(link_name, source.replace('/', '\\'), flags) == 0:
raise ctypes.WinError()
except:
pass
os.symlink = symlink_ms
from gif-for-cli.
Related Issues (20)
- Support saving generated data to a file for local playback HOT 2
- Support for Raspberry Pi HOT 4
- Error: get error in testing HOT 4
- AttributeError: 'NoneType' object has no attribute 'group' when using remote gif URL HOT 5
- ZeroDivisionError: float division by zero HOT 5
- readme fails to mention WHICH ansi escape sequences are supported HOT 1
- --export does not work with local files HOT 2
- --export cuts off right half of gif when using -c HOT 2
- Gifs with blank backgrounds are generated with white backgrounds
- Automation of unit tests.
- Make better image accuracy by improving the algorithm
- Python3 devel requirement HOT 6
- It sees the file (local save and from a remote source) but sees it as empty (Ubuntu VM))
- Gif
- Can't use gif-for-cli (Float division by zero on execute.py) HOT 6
- Process and play in separate calls HOT 1
- No such file or directory error HOT 6
- Why? HOT 5
- Subgif feature HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gif-for-cli.