Skip to content

Instantly share code, notes, and snippets.

@Taraflex
Created April 21, 2014 21:12
Show Gist options
  • Save Taraflex/11156728 to your computer and use it in GitHub Desktop.
Save Taraflex/11156728 to your computer and use it in GitHub Desktop.
@echo off
setlocal EnableDelayedExpansion
dir /B > temp
echo package{public final class Res{ > Res.as
for /F "delims=" %%a in ('findstr ".png .jpeg .jpg .wbp .txt .xml" temp') do (
set "line=%%a"
for %%k in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
set "line=!line:%%k=%%k!"
)
set "line=!line:.=_!"
set "line=!line: =_!"
echo [Embed ^(source='%%a'^)]public static const !line!:Class >> Res.as
)
del temp
echo }} >> Res.as
compc -source-path . -include-sources . -output res.swc
del Res.as
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment