Re: compiling code?

2019-03-21 Thread AudioGames . net Forum — Developers room : pauliyobo via Audiogames-reflector


  


Re: compiling code?

you need the c++ environment because cython needs cl to compile.

URL: https://forum.audiogames.net/post/421202/#p421202




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-21 Thread AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector


  


Re: compiling code?

I have just 3.7.2.I have 2 computers with the same version of Python, and one can't find vcvarsall.bat, the other one does but can't run some exe when it tries to compile.Thanks.\Hmm, I see it's in the vs installer, I will have to try that.

URL: https://forum.audiogames.net/post/421199/#p421199




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-21 Thread AudioGames . net Forum — Developers room : pauliyobo via Audiogames-reflector


  


Re: compiling code?

have you installed the c++ desktop development thingy from visual studio?If yes, how many versions of python have you on your computer?

URL: https://forum.audiogames.net/post/421155/#p421155




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-21 Thread AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector


  


Re: compiling code?

running build_extbuilding 'py' extensionerror: Unable to find vcvarsall.bat

URL: https://forum.audiogames.net/post/421133/#p421133




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-20 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector


  


Re: compiling code?

The build pipeline works like this:* first, compile all scripts (Python and cython ones) to a binary solution utilizing C/C++ by using cython. There are alot of useful guides and help documents within the cython help, see here: https://cython.readthedocs.io/en/latest … ompilation* afterwards, bundle those modules with the help of pyinstaller. that way, the executable will only contain the bytecode for the launcher code and the binary code for the entire rest of your project.Best Regards.Hijacker

URL: https://forum.audiogames.net/post/420839/#p420839




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-20 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector


  


Re: compiling code?

So if I make a cython file and then use pyinstaller to create an exe, would I get 1 file? Or would the cython file be left alone and accessible to anyone?

URL: https://forum.audiogames.net/post/420824/#p420824




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-20 Thread AudioGames . net Forum — Developers room : pauliyobo via Audiogames-reflector


  


Re: compiling code?

just type pip install cython. It should work

URL: https://forum.audiogames.net/post/420812/#p420812




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-20 Thread AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector


  


Re: compiling code?

Umm, thanks... Note to self: Download 3 gb of stuff and see which part works.I downloaded various packages already and nothing worked.Can you please post a link to the exact persion? I got Python 3.7.2

URL: https://forum.audiogames.net/post/420804/#p420804




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-20 Thread AudioGames . net Forum — Developers room : pauliyobo via Audiogames-reflector


  


Re: compiling code?

install cython and the visual c++ compiler. You can install the desktop development with c++ from Visual Studio

URL: https://forum.audiogames.net/post/420744/#p420744




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-20 Thread AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector


  


Re: compiling code?

Can someone tell me what I need to install to compile .pyd files with cython?Sooner or later it encounters an error.

URL: https://forum.audiogames.net/post/420741/#p420741




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-19 Thread AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector


  


Re: compiling code?

when compiling without windowed, it works 100 percent fine.

URL: https://forum.audiogames.net/post/420533/#p420533




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-19 Thread AudioGames . net Forum — Developers room : pauliyobo via Audiogames-reflector


  


Re: compiling code?

try compiling without windowed and see if it gives you any traceback? For this to happen run from the commandline the executable.

URL: https://forum.audiogames.net/post/420529/#p420529




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-19 Thread AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector


  


Re: compiling code?

Hi, @17, i don't even get a compelation error at all. it only tells me faitle error trying to launch the script...

URL: https://forum.audiogames.net/post/420516/#p420516




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-19 Thread AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector


  


Re: compiling code?

Is it a specific traceback error? Could you post it? When you run a compiled pyinstaller exe it unpacks it into a temporary folder on C drive, sometimes you can get linking errors when your scripts go looking for files which might be either in the temp folder or the script folder, depending on where the working directory is, among other things.

URL: https://forum.audiogames.net/post/420515/#p420515




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-19 Thread AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector


  


Re: compiling code?

that is exactly what i do.In other words, i use the file exploarer to navigate to the folder with my script.py, go to the command prompt and cd to myscript folder, pyinstaller --onefile --windowed... same resault. i am not even using an external library. that confuzes me a lot. if i was using an external library, it was another story...

URL: https://forum.audiogames.net/post/420503/#p420503




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-19 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector


  


Re: compiling code?

@14, how are you launching your pyinstaller? Here's what I do:1: Go to the folder with my scripts.2: Press alt3: Hit down arrow twice and press enter. This in turn will open the cmd that already is in your script folder.4: type pyinstaller myscript.py --onefile --windowed.I'm on windows 8, however, so the instructions may not apply if you're on something like 10.

URL: https://forum.audiogames.net/post/420502/#p420502




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-19 Thread AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector


  


Re: compiling code?

Hi, i don't know what is going on with python, or should i say pyinstaller.I say pyinstaller game.py --onefile --windowedit compiles but when i launch the game, it gives me that faitle error thing. but before compiling the script, i did:python game.py, worked through the game and saw no error.what could the problem be? all the required data files are in the game's folder.

URL: https://forum.audiogames.net/post/420472/#p420472




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-19 Thread AudioGames . net Forum — Developers room : redfox via Audiogames-reflector


  


Re: compiling code?

wait, so py py doesn't let you go into the context menu and hit compile on a .py file? Bad py py!

URL: https://forum.audiogames.net/post/420469/#p420469




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-19 Thread AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector


  


Re: compiling code?

I need some kind of compiler to use cython it seems. I'll have to try home

URL: https://forum.audiogames.net/post/420467/#p420467




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-18 Thread AudioGames . net Forum — Developers room : pauliyobo via Audiogames-reflector


  


Re: compiling code?

@10 You cythonize the modules you need and you will have a .pyd file on windows. I forgot the extension on linux.But in my case the file looks something like this:interface.cp37-win32.pyd interface is the module I've cythonized. Once that's done in the launcher script import this file. Make sure it's the pyd not the original.Then run pyinstaller on the launcher.Sorry, my english is extremely bad, so let me know if I should provide an example.

URL: https://forum.audiogames.net/post/420092/#p420092




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-18 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: compiling code?

@9, so let me see if I understand this:1. Cythonize your code into C/C++2. Compile it into a DLL (yes/no)3. Create a launcher with a function called main and import my compiled DLL as the only libraryIs that right?

URL: https://forum.audiogames.net/post/420078/#p420078




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-18 Thread AudioGames . net Forum — Developers room : pauliyobo via Audiogames-reflector


  


Re: compiling code?

Hi there.To cythonize and link your program in a protected executable, you will need to create a launcher program.The launcher program is the entrypoint of the app it's self, for this to work your application needs to have a function called main() or start() which is called from the launcher.In the launcher you basically import all the libraries used in the program (use the one you've cythonized) and run the entrypoint function.You could improve the launcher by doing a try except block which writes errors to the file.Note that in some cases your executable will be extremely large because pyinstaller has a thing called hooks.Hooks allows you to import other libraries without needing to put the code in the application folder and sometimes numpy will beincluded in your executable because of them. If that happens, just delee the numpy hooks, which is in python\lib\site-packages\pyinstaller\hooks

URL: https://forum.audiogames.net/post/420073/#p420073




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-18 Thread AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector


  


Re: compiling code?

This is interesting, I didn't know that pyinstaller can bundle files that you want it to, thanks!

URL: https://forum.audiogames.net/post/420059/#p420059




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-16 Thread AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector


  


Re: compiling code?

Yep, Cython is probably the only way to do so, and even this is still no 100% guarantee, since its still a Python interpreter required to run the code and there are ways to hack and retrieve code by manipulating the Python interpreter. But if you don't use Cython or some other transpiler to secure and speed up stuff, you'll always be able to read the byte code from within the executable or library zip file and thus get at least the byte code of your source code. There is almost no way around that when using Python. Python is just interpreteted and all interpreted languages are unsafe compared to directly machine-interpreted code.Best Regards.Hijacker

URL: https://forum.audiogames.net/post/419667/#p419667




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-16 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: compiling code?

The only you can do this is to cythonize your code. Cythonization involves a program called cython, which takes python code and translates it into C code which is then compiled and linked into your executable. I'm not too sure on how you actually do it, but I know that Carter's done it.

URL: https://forum.audiogames.net/post/419665/#p419665




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-16 Thread AudioGames . net Forum — Developers room : nathon via Audiogames-reflector


  


Re: compiling code?

Hi,How can we make sure our code is 100% protected, as much as a developer can make it using pyinstaller etc?The last thing I wanna hear is that somebody used pyinstaller extractor and got my source code...

URL: https://forum.audiogames.net/post/419661/#p419661




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-16 Thread AudioGames . net Forum — Developers room : dardar via Audiogames-reflector


  


Re: compiling code?

That is where specfiles come into play.If you open program.spec you will see a line that looks like this:datas=[],If you change that to this for example:datas=[["sounds/*", "sounds/*"]],It will ensure your sounds folder, and  subdirectories or files are included into your .exe file.simply save the file, then run pyinstaller program.spec to recompile.this is explained further here:https://pythonhosted.org/PyInstaller/spec-files.html

URL: https://forum.audiogames.net/post/419642/#p419642




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-16 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector


  


Re: compiling code?

It worked! Thank you! Now why can't google provide that answer?Is there a way of moving the required folders into it as the dist is created? I had fatal errors until I realized that... I didn't have my sounds in the folder.Is there also a way to write that fatal error to a file?

URL: https://forum.audiogames.net/post/419636/#p419636




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-16 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector


  


Re: compiling code?

So here's a problem: I have the build folder, and the only thing that sounds close to my executable is simon.exe.manifest. Is that it? I also have a warning file with 7745 characters that python can't find... Is that normal? I can post both the log of me running the command and the warning file if need be.

URL: https://forum.audiogames.net/post/419632/#p419632




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: compiling code?

2019-03-16 Thread AudioGames . net Forum — Developers room : dardar via Audiogames-reflector


  


Re: compiling code?

hello there!First, congratulations for plucking up the courage to use python, I respect you right away.Second, lets talk about pyinstaller, your new best friend.First things first, don't compile your program into a .exe file until you know it works.So, instead of running pyinstaller myprogram.pyrun: python mypogram.pythis will tell you all of the problems you have.Done that already? Fantastic!Lets talk about a few things about pyinstaller. Here is what I use to compile my python programs:1, if its in development:pyinstaller program.py --onefile2. If its not:pyinstaller program.py --onefile --windowed.But what does this mean?--onefile: this means compress my project into one file only.--windowed: This means make sure that, when the program is run, the python window is hidden.So, why exclude off windowed when in development?Because then you can run your pyinstaller, then do cd dist, and then program.exethat way, if your program freezes, tracebacks or errors, you can see why it did and what the problem is.GOOD TIMES!A note about certain modules:Certain modules, such as accessible_output2, and sound_lib may require you to copy them into the dist folder, I recently discovered a way in which you can write it into the specfile to make it compile them in, but that's a story for another day.Hope this helps, and my pm/email is open to further assistance if you so need. My greatest respect for using python

URL: https://forum.audiogames.net/post/419629/#p419629




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


compiling code?

2019-03-16 Thread AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector


  


compiling code?

So I've been working on something for a few weeks and I believe it's ready to see the light of day, not by the community, but for me. Trouble is, I don't know how to create an executable. Googling "creating an executable in python" Brought me to py installer. Here's a thing, when I run the commands I get about 7700 of characters warning me about not finding this or that module. It gets so bad that pressing enter on the supposed executable just brings in fatal error, which crashes and screws off. So, help? I'm really getting tired of asking. How do I set the paths for the script? Is there a nicer thing out there that all of you use to create your compiled code?

URL: https://forum.audiogames.net/post/419623/#p419623




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector