1. Unofficial OpenTTD Clones
  2. Untitled project
  3. NML


Ammler  committed 653cb31

Change: build windows executable

  • Participants
  • Parent commits b074ab5
  • Branches default

Comments (0)

Files changed (1)

File .devzone/build/nml.spec

View file
 Group:          Development/Tools
 License:        GPLv2
 URL:            http://dev.openttdcoop.org/projects/nml
-Source0:        nml-%{version}.tar
+Source0:        %{name}-%{version}.tar
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
 %if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
 BuildArch:      noarch
 BuildRequires:  python-ply python-imaging
 #We need Mercurial for auto version detection:
 BuildRequires:  mercurial
+#We need wine for windows nmlc.exe
+BuildRequires:  wine p7zip
 A tool to compile nml files to grf or nfo files,, making newgrf coding easier.
 %setup -qn %{name}
+# create windows executable
+cd wine-archive
+tar xf *
+cd wine*
+rm -rf $HOME/.wine
+mkdir -p $HOME/.wine
+mv -f * $HOME/.wine/
+cd ../..
+wine "C:\\Python27\\pythonw.exe" "C:\\Python27\\Scripts\\cxfreeze" nmlc
+mv dist %{name}-win-%{version} && mkdir dist
+7za a -l -tzip -mx=9 dist/%{name}-win-%{version}.zip %{name}-win-%{version}
 %{__python} setup.py sdist
 #Add ".src" to the source archive file name:
 rename .tar.gz .src.tar.gz dist/*