This is kind of a cop-out, but practical: Until you figure out how to get the binary size down using GHC configuration, you can always use upx. It typically cuts down GHC-generated executable sizes by about 80%.
About your file size, if you went with Pyside there is a cool library called Pysidekick that has a 'hatchet' feature that rebuilds Pyside with just what your application uses to make it smaller. Then you could see if UPX on the binary itself could get you any worth while savings.
Anyways, congratulations on becoming a skilled Python dev :)
Version 1.0.1
This is why you test your shit, even if you think it's all good. Changes to the website weren't adapted in the app and it silently broke.
There's also a version that hasn't been compressed using UPX on the off chance that this is the cause of the start up issues some have been experiencing. You can download this here
Regarding UPX, while I try to convince them that their current website is too scarce on the details, you might want to look at the information on this archive of their old SourceForge site's landing page. (Just remember to click the × on the Wayback Machine header to fix the header alignments.)
It's mature software (initial release in 1998) so, aside from the News section not acknowledging patch releases made since then, the archived landing page is still basically identical to what it'd be today.
(The only differences you'd see are that UPX 3.94 added support for arm64-linux ELF binaries and that NRV would be removed from their list of prior experience because it's been superceded by LZO Professional.)
For the binary size i use upx to reduce it further. With split-obj and upx, I end up with an executable < 2MB instead of the original 10-15MB
P.S: upx i really easy to use, just upx -9 yourBinary
It doesn't need to know what language the executable was written in, when you compile an executable most languages translate to machine code (except for VMs like Java). The viruses make the entry point of the executable point to their own code and at the end of their execution they "jump" to the real entry point and execute the actual program. They work in a similar way to exe compressors such as UPX (it's open source, download the code to see how it works, pretend that the unpacking code it injects is the virus).
Edit: btw most of the malware in the wild doesn't do this, they configure their own executable to run at start up as a service or as a task, some can install themselves as drivers.
This looks to me as if Facepunch have packed certain parts of the game in such a way that causes certain Anti Virus Programs to throw a false positive.
I believe that this is because of the way Facepunch could have encoded the files, File encoding
You will probably find that facepunch needed to make a quick addition to the game at some point, an addition that couldn't be written into the game code itself (READ: CheatPunch) so they probably used an Exe packer/encode to add the extra programs into the main exe.
Just an idea.
http://upx.sourceforge.net/ Exe Packer.
> This is like a hundred lines of C to interact with the Lua API, and then you copy /b the compiled lua files onto the end of the binary?
I wrote a LuaToExe (Windows only) tool at a contract position, and while not difficult, it's not that trivial. For instance, which files do you append to the binary? Do you evaluate dependencies mechanically (my tool did), or require the user to figure out the dependency graph himself and manually specify each file? Where do you extract the files to? The current directory? What if there's an existing file with that name? Do you clean up afterwards? How about extracting to a temp directory? You have to ensure that's created, you have to rebuild directory structures, potentially remap paths, etc. Or you could store the Lua files as a resource in the executable and redirect the file IO routines to read directly from the EXE with no extraction required.
What if the script requires binary extension modules? In that case, the Lua host app and extension modules need to be linked against a DLL version of the Lua API, which means your single EXE can't be the host app itself or it has to come up with some method of having the extension modules link back into the executable.
Lots of decisions to be made and it can get fairly hairy. I ended up with a tool what allowed you to say "lua2exe main.lua" and it would produce a tiny UPX compressed executable that contained main.lua and all it's dependencies, including extension modules, and required no runtime extraction of any data to disk.